Commit Graph
5 Commits
Author SHA1 Message Date
gabby 41c18e6c47 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>.
2026-10-13 23:56:06 +00:00
gabby 16e8583921 Move pack-specific scripts into their pack repos
scripts/outlook-auth.py, playwright-browsers.py, and simplex-address.py now
live in pack.outlook/pack.browser/pack.simplex under scripts/. bootstrap.sh,
the Outlook bridge hints, and the docs reference packs/<name>/scripts/; the
Outlook auth helper locates the checkout (and its default token path) by
walking up to the semif_agent package.
2026-10-13 22:21:06 +00:00
gabby 1329de42c4 Bootstrap the skill packs from their own repos; docs for the split
scripts/bootstrap.sh now clones each pack (pack.<name>, listed in the new
committed packs.json) into the gitignored packs/ BEFORE seeding config, so
config-init still generates the pack config fragments; --pack-base overrides
the base derived from the checkout's origin remote. README/AGENTS/PACKGEN/
CODEGEN and the packgen skill describe the per-pack repositories.
2026-10-13 21:55:45 +00:00
gabby 0b02a3feac spec: skills may call a plain HTTP API directly; bridges are opt-in
Reframe bridges as a deliberate choice rather than the mandatory path to
any third-party system. A skill body may call a service's own HTTP API
directly with a stdlib transport; a bridge is warranted only when a
simple, repeatable skill file would be inconsistent, inconvenient, or
unsafe — state (especially auth state), sanitized connectivity, or a
native/heavy protocol. When a bridge fronts a service, the body calls the
bridge and must never reach around it.

Updates CODEGEN.md, PACKGEN.md, TESTGEN.md, README.md, AGENTS.md, the
bridges/__init__.py docstring, the codegen BODY_DIRECTIVES + describe_
bridges() prompt strings, and the tests pinning their wording.
2026-10-13 18:13:24 +00:00
gabby f379c0a746 packs: add PACKGEN.md contract + packgen skill
PACKGEN.md is the authoritative spec for a new pack, the sibling of
CODEGEN.md (body) and TESTGEN.md (test): the pack.json manifest, its
config schema and how it maps onto bridges.<name>/packs.<name>, the
enable switch, referencing a bridge by name, authoring a new bridge
(BridgeService + CATALOG + build_bridge + the optional-dep 503 rule),
acceptance criteria, a worked example, and a checklist.

Add a thin OpenCode skill (.opencode/skills/packgen/SKILL.md) that walks
the workflow and points at PACKGEN.md, and cross-link the contract from
AGENTS.md, README.md, CODEGEN.md, and TESTGEN.md.
2026-10-13 15:25:42 +00:00