bridges: daemon-backed message history + true unread

The in-memory inbox is a receive buffer, not the daemon's read state, so
the bridge could not see messages that arrived while it was down. Query
/_get chats <userId> count=<n> with a ChatListQuery unread filter
(chatStats{unreadCount, minUnreadItemId} + chatItem.meta.itemStatus
rcvNew/rcvRead) and /_get chat @<id> count=<n> over the existing
corrId->Future path, and expose GET /unread and GET /history?contact=<id>.
Both are read-only (v7 has no mark-read command) and degrade like
/address: 503 not connected, 502 lookup failure, 400 without a contact.
The live /inbox buffer is unchanged.
This commit is contained in:
Denton Social committed 2026-09-30 12:10:34 -05:00
1 parent 4a4fe850e0
commit e93db6ec09
6 files changed
+564 -17

No files matched your search

+11 -4
View File
@@ -503,10 +503,17 @@ GET /health
GET /contacts
GET /inbox # peek buffered inbound DMs
GET /inbox/next?contact=<id> # pop oldest unread
GET /unread # daemon's persistent unread chats (read-only; 503/502)
GET /history?contact=<id>&count=<n> # recent messages for one chat (read-only; 503/502)
GET /address # show/create the contact link (503 not connected, 502 failure)
POST /send {"recipient": "<id|display_name>", "text": "..."}
```
`/unread` and `/history` read the daemon's own state (`/_get chats` / `/_get chat`),
so they see messages that arrived while the bridge was down — unlike the live
`/inbox` receive buffer. Both are read-only: v7 has no mark-read command, so
acking is a client-side read receipt, not an API call.
`simplex_bridge_url` (top-level config) is what skills call; the bridge catalog
is injected into every codegen prompt via `describe_bridges()`, so it is the
single source of bridge specifics. Adding a bridge = a class + a config block +
@@ -589,11 +596,11 @@ logging, `dream` cost pass, REPL + JSONL CLI; live `create_category` /
contract → test → auto-run → re-dispatch); tiered config + first-fire
collection; runtime repair loop; the closed `response` canned tree; real
integrations with `INTEGRATION` declarations; the SimpleX command gateway and the
standalone SimpleX bridge + seeds.
standalone SimpleX bridge + seeds (contact-list refresh, daemon-backed message
history / true unread).
**Next.** Real fine-tuning from grounded decision rows ("dreaming") with
validation + pinned-revision swap; queue persistence; more intake sources
(events/timers); dashboard run-requeue cross-linking; per-decision thresholds and
calibration; more bridges; a richer SimpleX read path (message history / true
unread, contact-list refresh, a `simplex.send_message` seed). See `AGENTS.md` for
the detailed backlog and known gotchas.
calibration; more bridges; a `simplex.send_message` seed. See `AGENTS.md` for the
detailed backlog and known gotchas.