Commit Graph
14 Commits
Author SHA1 Message Date
Denton Social ddc5cb66c8 bridges: standalone third-party API bridges; isolate the command gateway
Split messaging UX (invite links, read, send) out of the command gateway into a
new `semif_agent.bridges` layer. Each bridge is its own process (`cli bridge`)
against its own service daemon/profile; the SimpleX bridge owns a second
simplex-chat daemon and buffers every inbound DM, so a message sent to the
connect-link address shows up in `simplex.next_message`.

- new: bridges/{base,inbox,registry,simplex}.py + neutral semif_agent/simplex_ws.py
- gateway: delete bridge.py; drop address/observer/pull-mode from the command path
- codegen: inject the bridge catalog (describe_bridges) into body + elicitation prompts
- seeds: repoint simplex.next_message/connect_link to top-level `simplex_bridge_url`
- config/bootstrap: new top-level `bridges` block + `simplex_bridge_url`; render
  semif-simplex-forward + semif-bridge units; gateway config loses bridge/inbox
- docs: AGENTS.md gateway isolation is non-negotiable
2026-09-28 15:24:44 -05:00
Denton Social 08d6bb23e2 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.
2026-09-26 21:39:39 -05:00
Denton Social b348f19486 gateway: parse v7 rcvMsgContent shape and profile display name
Inbound DMs were silently dropped: simplex-chat v7 tags received text as
{"type": "rcvMsgContent", "msgContent": {"type": "text", ...}}, but
_parse_chat_item required a flat {"type": "text", "text": ...}. Every
message returned None (no gateway_message/gateway_sent/denied ever fired) so
pepper got no reply.

- parse content.msgContent.text, tolerating the DB/Aeson constructor-keyed
  nesting as well
- resolve the peer name from profile.displayName first; v7's contact
  displayName is null and localDisplayName is collision-suffixed (pepper_1)
- update the synthetic fixture to the real wire shape and add regression tests
- set PYTHONUNBUFFERED=1 in the rendered gateway unit so journal logging is live
2026-09-26 19:51:52 -05:00
Denton Social 5f05c5c749 bootstrap: split --llm-url (local) from --codegen-url (guppy), pull the local model
The small self-assessment model runs on this box's local ollama; only codegen
travels to the peer host. Replace the single --peer-ollama (which pointed llm
and codegen at guppy) with --llm-url (default http://127.0.0.1:11434) and
--codegen-url (default guppy). Bootstrap now pulls llm.model from the local
ollama if missing (API /api/pull, CLI fallback) and probes llm and codegen
separately (codegen WARN-only, never auto-pulled). Correct AGENTS: guppy is the
codegen host, jarvis runs its own ollama for qwen3.5:4b.
2026-09-26 19:27:12 -05:00
Denton Social c92aff5038 gateway: run simplex-chat bot under a PTY so it pumps WS events
Plain bot mode under systemd has no controlling terminal, so the CLI accepts
the WebSocket socket but never emits receivedContactRequest/newChatItems —
contact requests hung unaccepted. Wrap ExecStart in script(1) to allocate a
PTY; the events then flow and the gateway auto-accepts. Add util-linux to
bootstrap prereqs.
2026-09-26 18:45:19 -05:00
Denton Social 6059bec1e4 gateway: run simplex-chat in bot mode, not relay/headless
In v7 --headless means "chat relay" (requires --relay) and yields a relay
address, not a user contact address, so the bot could not be added as a
contact. Run bot mode instead (-p PORT --create-bot-display-name), which needs
no TTY and is restart-safe. simplex-address.py now creates the user contact
address on first run (/_address + /_show_address), and bootstrap invokes it
after the services start and prints the link.
2026-09-26 18:33:57 -05:00
Denton Social 756d4b47b7 gateway: add simplex-address helper for onboarding
The daemon does not print its contact address; query /_show_address over the
WebSocket API. scripts/simplex-address.py reads ws_url from config.json and
prints the bot's short/full contact link so a human can add it in their
SimpleX app. bootstrap.sh points at it in the next-steps hint.
2026-09-26 17:29:40 -05:00
Denton Social 5df560a922 bootstrap: put simplex profile under .runtime/simplex/, apply changed units
-d is a path prefix, so pass .runtime/simplex/simplex_v1 to keep the daemon
DBs inside the profile dir. Also detect a changed rendered unit and restart
already-running services so a rerun applies template changes.
2026-09-26 17:27:47 -05:00
Denton Social a6f46b735d bootstrap: simplex-chat v7 headless requires --relay
The pinned v7.0.3 daemon exits with '--headless option requires --relay'.
Add --relay to semif-simplex.service (hermes' daemon already uses both).
2026-09-26 17:26:14 -05:00
Denton Social 483c51f559 bootstrap: contain install artifacts in .runtime/, provision SimpleX gateway
Move every installed artifact into a gitignored .runtime/ tree inside the
checkout (venv, SemIf engine, GGUF, HF cache, simplex-chat binary/profile,
rendered systemd units) so an end user can find and debug the whole stack in
one place. Pin simplex-chat v7.0.3 in config.example.json (url+sha256) and
have bootstrap download it, render semif-simplex.service + semif-gateway.service
from scripts/systemd/ templates, symlink them into the user unit dir, and
enable them. Add --simplex-allowed-users/--simplex-home-channel/--simplex-display-name
flags and write the gateway block into config.json. Add the AGENTS.md
containment rule.
2026-09-26 17:23:37 -05:00
Denton Social db35cb66dc bootstrap: write /v1 base_url for peer llm/codegen; probe the OpenAI-compat path 2026-09-25 02:23:13 -05:00
Denton Social 2297bbd6aa centralize staging engine deps in a committed requirements manifest 2026-09-25 01:58:39 -05:00
Denton Social 72af30f449 bootstrap: reuse the running checkout instead of re-cloning semif-agent 2026-09-25 01:44:29 -05:00
Denton Social 67027ecc20 add jarvis bootstrap script with pinned engine deps; guppy becomes ollama-only 2026-09-25 01:40:03 -05:00