Fix XSD path for installed package (v0.3.1)

Use __file__-based path resolution for envelope.xsd so the schema
loads correctly when xml-pipeline is installed via pip.

Also:
- Add build artifacts to .gitignore
- Bump version to 0.3.1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
dullfig 2026-01-19 22:24:36 -08:00
parent 6b9c378e52
commit d53bc1dfbe
4 changed files with 13 additions and 4 deletions

5
.gitignore vendored
View file

@ -9,6 +9,11 @@ venv/
.venv/ .venv/
ENV/ ENV/
# Build artifacts
build/
dist/
*.egg-info/
# Secrets & config # Secrets & config
.env .env
.env.local .env.local

View file

@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "xml-pipeline" name = "xml-pipeline"
version = "0.3.0" version = "0.3.1"
description = "Schema-driven XML message bus for multi-agent systems" description = "Schema-driven XML message bus for multi-agent systems"
readme = "README.md" readme = "README.md"
requires-python = ">=3.11" requires-python = ">=3.11"

View file

@ -2,4 +2,4 @@
xml-pipeline: Tamper-proof nervous system for multi-agent organisms. xml-pipeline: Tamper-proof nervous system for multi-agent organisms.
""" """
__version__ = "0.3.0" __version__ = "0.3.1"

View file

@ -12,12 +12,16 @@ for diagnostic <huh>).
Part of AgentServer v2.1 message pump. Part of AgentServer v2.1 message pump.
""" """
from pathlib import Path
from lxml import etree from lxml import etree
from xml_pipeline.message_bus.message_state import MessageState from xml_pipeline.message_bus.message_state import MessageState
# Load envelope.xsd once at module import (startup time) # Load envelope.xsd once at module import (startup time)
# In real implementation, move this to a config loader or bus init # Path is relative to this file: steps/ → message_bus/ → xml_pipeline/ → schema/
_ENVELOPE_XSD = etree.XMLSchema(file="xml_pipeline/schema/envelope.xsd") _SCHEMA_PATH = Path(__file__).parent.parent.parent / "schema" / "envelope.xsd"
_ENVELOPE_XSD = etree.XMLSchema(file=str(_SCHEMA_PATH))
async def envelope_validation_step(state: MessageState) -> MessageState: async def envelope_validation_step(state: MessageState) -> MessageState: