feat(messenger): the MAX Messenger for cli-messaging's shared commands - #260
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T6 item 5 (plan
docs_ai/plans/2026-09-30-max-onto-services.md, corrected as built).src/messenger.ts—maxMessenger:app,provider: "max",resolveSettingsin the shared shape,connect(profile cache, run events, no send guard; reusesmax servethroughcreateClient), andguard: over a journalingmax serveit reserves nothing and records only refusals (RISK-76), likesharedJournalfor max's own commands.max serve: the command'soperationIdcrosses the socket beside the frame; the server journals under it. The server's guard now journalssendId, not the numericcid(3b leftover).servicesoverride,savedChatIdorpartnerOfyet — they come with group 2.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