gateway: show/create the SimpleX contact link (simplex.connect_link seed)
Add a reusable corrId->Future request path to SimplexAdapter so the daemon can be queried off the event loop, expose it as GET /address on the local messaging bridge (injected address_provider; 503 unwired, 502 on daemon failure), and ship a simplex.connect_link seed that reports the bot's short and full contact link honestly, creating it on first call.
This commit is contained in:
1 parent
9057213217
commit
a9b096f2e8
12 files changed
+532
-28
No files matched your search
+3
-2
@@ -86,13 +86,14 @@
|
||||
"display_name": "semif"
|
||||
},
|
||||
"gateway": {
|
||||
"_comment": "Messenger intake. `python -m semif_agent.cli gateway` connects to the local simplex-chat daemon (see `simplex_chat` above) over its JSON WebSocket API and feeds authorized DM text through the normal gate/score/queue/dispatch pipeline; results, authoring questions, and repair offers are sent back to the originating chat. Requires the optional `websockets` package (lazy-imported; the gateway refuses to start without it). allowed_users entries match either a numeric contactId or a display name; default is deny-all unless allow_all_users is set. home_channel receives messages whose origin chat is unknown (e.g. a background repair offer). text_batch_delay concatenates rapid-fire messages from one contact. Groups/attachments are not supported in this first cut.",
|
||||
"_comment": "Messenger intake. `python -m semif_agent.cli gateway` connects to the local simplex-chat daemon (see `simplex_chat` above) over its JSON WebSocket API and feeds authorized DM text through the normal gate/score/queue/dispatch pipeline; results, authoring questions, and repair offers are sent back to the originating chat. Requires the optional `websockets` package (lazy-imported; the gateway refuses to start without it). allowed_users entries match either a numeric contactId or a display name; default is deny-all unless allow_all_users is set. home_channel receives messages whose origin chat is unknown (e.g. a background repair offer). text_batch_delay concatenates rapid-fire messages from one contact. `user_id` is the daemon user whose contact address the connect-link lookup shows/creates (default 1). Groups/attachments are not supported in this first cut.",
|
||||
"simplex": {
|
||||
"enabled": false,
|
||||
"ws_url": "ws://127.0.0.1:5226",
|
||||
"allowed_users": [],
|
||||
"allow_all_users": false,
|
||||
"auto_accept": true,
|
||||
"user_id": 1,
|
||||
"home_channel": "",
|
||||
"reply_prefix": "",
|
||||
"text_batch_delay": 0.8,
|
||||
@@ -103,7 +104,7 @@
|
||||
"max_size": 100
|
||||
},
|
||||
"bridge": {
|
||||
"_comment": "Local HTTP API the gateway serves to skills (send/read SimpleX messages). Skills call it over `http` with the top-level `messaging_bridge_url`; keep that URL in sync with host/port. Binds localhost only; an optional `token` is required in the X-Semif-Token header when set. Set enabled=false to run the gateway without the bridge.",
|
||||
"_comment": "Local HTTP API the gateway serves to skills (send/read SimpleX messages). Skills call it over `http` with the top-level `messaging_bridge_url`; keep that URL in sync with host/port. GET /address shows/creates the bot's contact link (wired to the adapter); /health, /contacts, /inbox, /inbox/next and POST /send are the rest. Binds localhost only; an optional `token` is required in the X-Semif-Token header when set. Set enabled=false to run the gateway without the bridge.",
|
||||
"enabled": true,
|
||||
"host": "127.0.0.1",
|
||||
"port": 5227,
|
||||
|
||||
Reference in new issue
Block a user