Skip to content

feat(messenger): the MAX Messenger for cli-messaging's shared commands - #260

Merged
leemour merged 2 commits into
mainfrom
feat/max-messenger
Sep 30, 2026
Merged

leemour merged 2 commits into
mainfrom
feat/max-messenger

Conversation

@leemour

@leemour leemour commented Sep 30, 2026

Copy link
Copy Markdown
Owner

T6 item 5 (plan docs_ai/plans/2026-09-30-max-onto-services.md, corrected as built).

  • src/messenger.ts — maxMessenger: app, provider: "max", resolveSettings in the shared shape, connect (profile cache, run events, no send guard; reuses max serve through createClient), and guard: over a journaling max serve it reserves nothing and records only refusals (RISK-76), like sharedJournal for max's own commands.
  • max serve: the command's operationId crosses the socket beside the frame; the server journals under it. The server's guard now journals sendId, not the numeric cid (3b leftover).
  • No services override, savedChatId or partnerOf yet — they come with group 2.
  • cli-messaging 0.66.0 (ConnectOptions.events, Messenger.guard).

Tests: settings table (src/messenger.test.ts), forwarded write journaled under the command's operation id (src/server/server.test.ts). Checked: lint, typecheck, 1182 tests, test:matrix, docs:check.

🤖 Generated with Claude Code

leemour and others added 2 commits September 30, 2026 22:01
T6 item 5. src/messenger.ts: app, provider, settings in the shared shape
(a table test holds them to max's own for the same config file), connect
over a MaxClient with the profile's cache, the run's events and no send
guard, and a guard of its own: over a journaling max serve it reserves
nothing and records only refusals, as max's own commands do (RISK-76).

The server connection sends the command's operationId beside a forwarded
frame, and the server journals the write under it. The server's guard
also journals sendId instead of MAX's numeric cid, which 3b missed.

cli-messaging 0.66.0. No command uses the Messenger yet; item 6 moves
messages delete onto it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The per-file coverage floor caught src/messenger.ts at 25%. The rule a
guard follows over max serve is overServer now, tested with a fake server;
connect and the guard are tested through a command with max's environment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour
leemour merged commit 3e62fdb into main Sep 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant