Ship the bridge with the pack (moved from the agent core)

The core now keeps only the shared bridge contract (semif_agent/bridges/base.py)
and the discovery registry (semif_agent/bridges/registry.py); a pack ships its
own bridge under bridge/<name>.py and the registry imports it by convention from
the pack's declared `bridges`. The bridge's hermetic test moves here too and
runs via the agent repo's tests/test_packs.py (or standalone with conftest.py).
This commit is contained in:
gabby committed 2026-10-13 23:52:52 +00:00
1 parent f0396edf16
commit dcc935f6b8
6 files changed
+2143 -6

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
"""Make the agent checkout importable when running this pack's tests standalone.
A pack's bridge test imports `semif_agent` (the shared bridge contract and the
discovery registry). The pack lives inside an agent checkout at `packs/<name>/`,
so this adds the checkout root to `sys.path` — running the tests through the
agent repo (`pytest tests/test_packs.py`) already provides it, but
`cd packs/<name> && pytest` needs this.
"""
import sys
from pathlib import Path
for _parent in Path(__file__).resolve().parents:
if (_parent / "semif_agent" / "__init__.py").is_file():
if str(_parent) not in sys.path:
sys.path.insert(0, str(_parent))
break