feat(daemon): sprint 4 outbound routing + CLI thin-client + ambient mode
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Daemon outbox now stores resolved target_spec + crypto_box ciphertext
+ nonce per row. Drain worker is a forwarder; no per-row resolution at
drain time. Outbound routing is no longer a placeholder.

Schema additions (additive, NULL allowed for legacy rows): outbox.mesh,
target_spec, nonce, ciphertext, priority. v0.9.0 rows keep draining via
the broadcast fallback so existing in-flight rows finish cleanly.

IPC /v1/send resolves the user-friendly to (display name, hex prefix,
full pubkey, @group, *, #topicId) into a broker-format target_spec at
accept time. DMs encrypt via crypto_box; broadcast/topic/group base64
the plaintext. Hex prefixes (16+ chars) match against connected peers.

CLI thin-client routing extends trySendViaDaemon pattern to peer list
and skill list/get. Three new helpers in services/bridge/daemon-route.ts.

SKILL.md gains ambient mode section: after claudemesh install, raw
claude works for the daemon's attached mesh. Launch stays as the
override path.

Spec at .artifacts/specs/2026-05-04-v2-roadmap-completion.md orders
the remaining v2.0.0 work: multi-mesh daemon (1.26), CLI-to-thin-client
(1.27), mesh-to-workspace rename (1.28), HKDF identity (2.0).

Released as 1.25.0 on npm.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-05-04 01:36:16 +01:00
parent 6794aa8512
commit 0e3a5babd9
13 changed files with 482 additions and 23 deletions

View File

@@ -209,12 +209,40 @@ Locked spec: `.artifacts/shipped/2026-05-03-daemon-spec-v0.9.0.md`.
---
## v0.9.x — *daemon promotion: required + thin MCP* — *shipped*
The v0.9.0 foundation got promoted in three quick releases:
- **1.24.0** — daemon required for in-Claude-Code use. MCP server
shrinks from 979 to ~200 LoC of push-pipe (rest is the unrelated
mesh-service proxy mode). `claudemesh install` auto-installs and
starts the daemon service. `claudemesh launch` ensures daemon is
running before spawning Claude.
- **1.25.0** — Sprint 4 outbound routing fix. Daemon was sending
every outbox row as broadcast (`*`); now resolves and encrypts at
IPC accept time, drain is a forwarder. Adds `mesh`, `target_spec`,
`nonce`, `ciphertext`, `priority` columns to the outbox.
- **1.25.0** — CLI thin-client routing for `peer list`,
`skill list`, `skill get`. Same daemon-first / bridge / cold-path
fallback shape as `trySendViaDaemon`.
- **1.25.0** — ambient mode: raw `claude` Just Works after
`claudemesh install`. No more `claudemesh launch` ceremony for the
common case.
What this leaves on the v2.0.0 redesign roadmap is documented at
`.artifacts/specs/2026-05-04-v2-roadmap-completion.md`: daemon
multi-mesh, full CLI-to-thin-client conversion, mesh→workspace
rename, HKDF identity.
---
## v2.0.0 — *the daemon redesign*
The single largest architectural shift. Promotes the persistent
thing (the user's account + identity) to a persistent process (the
daemon), demotes the ephemeral thing (the Claude session) to a thin
client.
client. **Half-shipped via 1.24.0 + 1.25.0; remainder spec'd at
`.artifacts/specs/2026-05-04-v2-roadmap-completion.md`.**
- **`claudemesh-daemon`** — long-lived per-user launchd / systemd
unit. One WebSocket per workspace, persistent across reboots and