Decouple bridges: ship each with its pack
The core no longer owns concrete bridge implementations. A bridge now ships inside the pack that declares it (packs/<name>/bridge/<name>.py, plus its package marker, optional client module, and hermetic test), and the core registry imports it by convention from the pack's `bridges`. Core keeps only: - bridges/base.py: BridgeInfo + BridgeService (shared HTTP/JSON/auth layer), plus a new BridgeService.from_config build hook (a bridge that needs the scheduler's `llm` client or top-level fallback values declares that itself, replacing build_bridge's per-name special-casing) and checkout_root() so a pack-relative bridge can still anchor .runtime/ paths; - bridges/inbox.py: the generic MessagingInbox; - bridges/llm.py: the one shared, pack-less LLMBridge (CORE_BRIDGES); - bridges/registry.py: discovery (discover_bridge_classes/known_infos/ describe_bridges/derived_config_vars/build_bridge/run_bridges) scanning each pack's bridge/ dir, plus load_pack_bridge_module/package for tests. Moved to their packs: simplex, nextcloud (+client), outlook (+client), browser (+client) — each with its hermetic test. tests/test_bridges.py now covers the core (shared LLM bridge + registry); tests/test_packs.py runs every pack's bridge test. Docs (AGENTS.md, PACKGEN.md, README.md) updated. Packs pushed separately to pack.<name>.
This commit is contained in:
1 parent
16e8583921
commit
41c18e6c47
21 files changed
+485
-7476
No files matched your search
@@ -7,11 +7,12 @@ A pack is a folder with a ``pack.json`` manifest and a ``skills/`` store::
|
||||
skills/nextcloud/{create_event,create_task,next_event}/
|
||||
|
||||
The manifest binds the pieces that used to be scattered by convention — the
|
||||
concern, its category descriptions, the bridge(s) it talks to, its runtime
|
||||
requirements, and its config schema/defaults — so "the Nextcloud product, its
|
||||
bridge, its skills, and its settings" are one thing. Bridge *code* stays in
|
||||
``semif_agent/bridges`` (isolation is non-negotiable); a pack references a
|
||||
bridge by name.
|
||||
concern, its category descriptions, the bridge(s) it ships and talks to, its
|
||||
runtime requirements, and its config schema/defaults — so "the Nextcloud
|
||||
product, its bridge, its skills, and its settings" are one thing. A bridge
|
||||
*ships with its pack* (``packs/<name>/bridge/``); the core keeps only the shared
|
||||
contract (``semif_agent/bridges/base.py``) and the discovery registry
|
||||
(``semif_agent/bridges/registry.py``). Gateway isolation is non-negotiable.
|
||||
|
||||
A pack can be enabled/disabled as a unit: disabling it drops its categories from
|
||||
the tree and stops its bridge (see ``pack_enabled``). This is the same switch
|
||||
|
||||
Reference in new issue
Block a user