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.
This commit is contained in:
gabby committed 2026-10-13 18:13:24 +00:00
1 parent f379c0a746
commit 0b02a3feac
10 files changed
+122 -59

No files matched your search

+8 -5
View File
@@ -354,8 +354,9 @@ fine-tuning loop — it is not yet the fine-tune itself.
- **Messenger command gateway (SimpleX + LXMF)** — take commands and reply over DM.
- **Voice gateway** — a local microphone front end: wake word + speech-to-text +
text-to-speech, all local (openWakeWord / faster-whisper / Piper).
- **Standalone bridge services** — a token-guarded localhost HTTP layer in front
of third-party systems, so generated bodies never speak native protocols.
- **Standalone bridge services** — an optional token-guarded localhost HTTP
layer for third-party systems that need state/auth, a native protocol, or a
sanitized surface; a plain HTTP API is called directly.
- **Seeds** — shipped real starter skills: `nextcloud.create_event` (the
authoritative worked example), `nextcloud.next_event` (Nextcloud CalDAV),
`nextcloud.create_task` (Nextcloud task list),
@@ -748,9 +749,11 @@ python -m semif_agent.cli gateway --platform voice
`cli bridge` runs standalone bridges: each is a process that stands up a small,
token-guarded localhost HTTP API in front of one third-party system (and, where
the system needs one, owns its own daemon/profile). Generated skill bodies call
them like any HTTP service (base URL from a config var), so they never speak a
native protocol directly.
the system needs one, owns its own daemon/profile). A bridge is a deliberate
choice for a system that needs state (especially auth state), a native or heavy
protocol, or one sanitized surface — a skill may call a plain HTTP API directly.
When a bridge fronts a service, generated skill bodies call it like any HTTP
service (base URL from a config var) and never speak the native protocol.
The first bridge is **SimpleX** (`semif_agent/bridges/simplex.py`), with its own
simplex-chat daemon separate from the gateway's. Its HTTP surface: