gateway: serve a local messaging bridge so skills can send/read SimpleX
The gateway now exposes a localhost stdlib HTTP API (bridge.py) that
buffers authorized inbound DMs and forwards outbound sends, so a skill
body never opens a WebSocket to the simplex-chat daemon. Endpoints:
GET /health, /contacts, /inbox (peek), /inbox/next (pop oldest unread),
POST /send (resolve id/display name onto the adapter's outbound queue).
GatewayService gains an observer hook and inbox.dispatch (pull-only mode).
Expose the capability to codegen (SKILL.md, BODY_DIRECTIVES, elicitation,
TESTGEN.md) and add the simplex.next_message seed (SemIf recipient
resolution) with its hermetic loopback test. Config: messaging_bridge_url
plus gateway.simplex.{inbox,bridge}; bootstrap keeps them in sync.
This commit is contained in:
1 parent
b348f19486
commit
08d6bb23e2
19 files changed
+1006
-29
No files matched your search
@@ -633,6 +633,12 @@ BODY_DIRECTIVES = (
|
||||
"body.\n"
|
||||
"Declare the integration as a module-level `INTEGRATION` dict exactly as "
|
||||
"SKILL.md specifies: service, transport, config_vars.\n"
|
||||
"If this skill sends or reads SimpleX messages, call the messenger "
|
||||
"gateway's local HTTP bridge (the `messaging_bridge_url` value from "
|
||||
"`ctx.config`; endpoints: GET /inbox, GET /inbox/next?contact=, POST "
|
||||
"/send) — never open a WebSocket to the simplex-chat daemon. Resolve which "
|
||||
"contact/conversation with a `ctx.engine` sub-decision, and send only when "
|
||||
"the request or requirements ask for it.\n"
|
||||
)
|
||||
|
||||
|
||||
@@ -1061,6 +1067,7 @@ ELICITATION_EXAMPLES = [
|
||||
"How does it authenticate with the service, and should that credential come from the app's config?",
|
||||
"What does a successful run look like — what should it report back to you?",
|
||||
"If the service is unreachable or refuses the action, should the run fail loudly or record 'could not complete' as the result?",
|
||||
"Should this skill send or read SimpleX messages through the messaging gateway, and if so which conversation (resolved by contact name)?",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user