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:
1 parent
f379c0a746
commit
0b02a3feac
10 files changed
+122
-59
No files matched your search
+7
-6
@@ -87,12 +87,13 @@ A stdlib-only Python script that:
|
||||
Assert the server actually received the expected request (method, path,
|
||||
headers, body) where practical. The loopback address exists only in the test;
|
||||
the body must read its endpoint from config.
|
||||
- For a messaging skill (a body that talks to a bridge service), stand up a
|
||||
loopback server implementing the bridge endpoints the body uses (the bridge
|
||||
catalog injected into this prompt lists them) and assert the body built the
|
||||
real requests. If the catalog names an auth header, set the fixture token in
|
||||
the fixture config and assert the body sent that header. Never connect to a
|
||||
real service daemon or a live bridge.
|
||||
- For a body that talks to a bridge service (or any fixed HTTP API), stand up a
|
||||
loopback server implementing the endpoints the body uses (the bridge catalog
|
||||
injected into this prompt lists a bridge's; for a direct HTTP API, mirror the
|
||||
routes the body calls) and assert the body built the real requests. If the
|
||||
catalog names an auth header, set the fixture token in the fixture config and
|
||||
assert the body sent that header. Never connect to a real service daemon or a
|
||||
live bridge.
|
||||
- For non-HTTP transports (IMAP, SMTP, subprocess, ...), exercise config
|
||||
resolution, argument construction, and error paths (missing or misconfigured
|
||||
values) without performing the real I/O.
|
||||
|
||||
Reference in new issue
Block a user