mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-16 10:58:10 +00:00
stable
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9d3241b06c |
mcp: Claude Code plugin, a SimpleX group per session (0.3.0) (#8116)
* mcp: remove HTTP serve and register modes
* mcp: read plugin options
* mcp: add daemon data root layout
* mcp: keep actions per session
* mcp: serve tools for one session profile
* mcp: add plain QR code text
* mcp: share the Main group across sessions
* mcp: promote only the first joiner to owner
* mcp: add the daemon socket protocol
* mcp: fix socket UTF-8 and late error handling
* mcp: open session agents and the hub
* mcp: order hub control work on one chain
* mcp: add the daemon
* mcp: fix daemon disconnects, stop and idle calls
* mcp: create the socket token atomically
* mcp: add the daemon client
* mcp: handle spawn errors and a stopped daemon
* mcp: add the stdio session server
* mcp: retry session calls after a daemon restart
* mcp: add the SessionStart hook and link commands
* mcp: remove unused shell quoting
* mcp: wire session, daemon and hook commands
* mcp: reject inherited names as commands
* mcp: add the Claude Code plugin
* mcp: add the plugin marketplace
* mcp: test the daemon end to end
* mcp: say Main group in tool descriptions
* mcp: document the plugin and the daemon
* mcp: record session titles from the hook
* mcp: allow long tool calls
* mcp: name the SimpleX daemon in texts
* mcp: quote no-owner texts and cite hook docs
* mcp: drop the project from title requests
* mcp: record Claude Code plugin checks
* mcp: qualify Claude Code check evidence
* mcp: start new profiles without preset contact
* mcp: remove unit test temp folders
* mcp: fix preset contact review findings
* mcp: expire each action with its own timer
* mcp: wait for decisions without a tick
* mcp: expire actions on core events and requests
* mcp: document the delivery poll at stop
* mcp: assert the socket handler error log
* mcp: complete only the session's own connects
* mcp: move closeServer to the test fixtures
* mcp: drop the name from session requests
* mcp: listen before the hub opens
* mcp: keep the approval mode per session
* mcp: pre-approve the skill commands
* mcp: a group per session under one Claude profile, approved by owners
* mcp: prompts, answers and tool-use approval in the session group, 0.3.0
* mcp: reply to prompts of stopped sessions, skip prompts echoed in a tag
* mcp: document the Claude Code plugin of 0.3.0
* mcp: name one-line commands in the plugin reference
* mcp: real-session checks without a channel command
* mcp: specify the Claude Code plugin, and serve as built in 0.3.0
* mcp: run the plugin from its own build and shrinkwrap, without npx
* mcp: start with a torn session file, and on file systems without links
* mcp: start the daemon with only the environment variables it uses
* mcp: one group per Claude Code process, re-attach, late contacts
* mcp: document one session per process, re-attach and the plugin launch
* mcp: hold prompts after a daemon start until the session attaches
* mcp: document prompts held after a daemon start
* mcp: pack production dependencies only, for a faster plugin install
* mcp: keep resumed sessions' groups, quote by hook start, order prompts
* mcp: document resumed sessions, turn records and ordered prompts
* mcp: quote each prompt once, post without refused quotes, answer first
* mcp: wait for a stopping daemon to release the lock
* mcp: double the re-attach delay once per attempt
* mcp: read a token file of another user as serve 0.2 did
* mcp: cut long prompts and answers to fit the daemon's body limit
* mcp: document quotes, refused quotes, the lock wait and long prompts
* mcp: open a titled new session only after its process registers
* mcp: document titles held until the session server registers
* mcp: skip late turn records and tag-only prompts, describe after failures
* mcp: take over the lock atomically, keep held titles across stops
* mcp: document turn records, tag-only prompts, the lock and held titles
* mcp: delete groups of sessions closed 7 days; no group for claude -p
* mcp: keep the approved mode in the session group, the link off /status
* mcp: apply leaving, removal and demotion in the Main group to sessions
* mcp: reply sends a file after an owner's approval when non-owners see it
* mcp: spec of closed groups, -p runs, mode, membership and reply cards
* mcp: resume after a running group deletion, continue past failed ones
* mcp: post terminal prompts in the current group of a resumed session
* mcp: show only the file's name and size on a reply card
* mcp: the hooks of a run Claude Code marks unattended post nothing
* mcp: serve lists its tools with the metadata of 0.2
* mcp: list leaves out the session's tool-use and mode cards
* mcp: one starter takes over a stale lock also without hard links
* mcp: test a resume after deletion, reply cards and demotion end to end
* mcp: document resumes after deletion, unattended runs and reply cards
* mcp: spec of round 5 fixes, with source links at their lines
* mcp: no permission relay in a run without a group or with invalid options
* mcp: spec of the permission relay of a run without a group
* mcp: every session keeps its group, claude -p runs included
* mcp: changes of the Main group's members leave session groups as they are
* mcp: every member who joins from the Main group prompts and approves
* mcp: reply cards match send cards; /approve N all sends later files too
While a session group has a guest, a member added without the Main group, the card of a reply shows its caption, the file's type, path and size, and an image's or a video's preview, as a card of send does. /approve N all approves that file, the other pending reply files and every later one of the group, until /revoke; the approval is kept in the group's custom data and counts while its approver joined from the Main group and stays in the group.
* mcp: the Main group says everyone in it is trusted with all sessions
The short description and the welcome message of the Main group, also of an existing one at the daemon's start, and a message at each member's join say that everyone in the group is trusted with all Claude Code sessions of the hub: they can join each session's group by /join N, prompt Claude and approve its actions.
* mcp: a session group says whether each joiner came from the Main group
When a member joins a session's group, Claude posts there that the member joined from the Main group, and their messages are prompts and they can approve actions, or that the member joined as a guest, whose messages are not prompts and who gets Claude's files only after an approval. The welcome message of a new session group says that members who join from the Main group prompt the session and approve its actions.
* mcp: test Main group members, guests and reply approvals end to end
A member who joins the Main group by an owner's link and a session's group by /join prompts and approves there, also after removal from the Main group; a guest added by a group link gets reply files after an approval, /approve N all sends later files at once, and /revoke ends it. The Main group and the session group post the join statements.
* mcp: document the trust of the Main group, guests and kept session groups
REFERENCE, README and TESTING describe that every member of the Main group prompts and approves in the sessions' groups, that changes in the Main group leave the sessions' groups as they are, the join statements, guests and the reply card with /approve N all and /revoke. The texts about deleted groups of closed sessions, runs without a group and the cascade of Main group changes are removed, as their behaviour was reverted.
* mcp: spec of the trust of the Main group, guests and kept session groups
The spec describes approvers as the members invited through the Main group, the statements of trust and standing, the reply card with /approve N all and /revoke, and Main group changes that leave the session groups as they are. The sections on deleted groups of closed sessions, runs without a group and the cascade are removed, flow 30 among them, and the source links point at the lines of this commit.
* mcp: claude -p and unattended runs get no session and no group again
A run whose CLAUDE_CODE_ENTRYPOINT is sdk-cli, sdk-ts or sdk-py, or whose CLAUDE_CODE_SESSION_ATTENDED is 0, gets no session and no group: its hooks post nothing, and its session server answers every call with the text of a run that is not interactive, without the daemon. Only the deletion of the groups of closed sessions stays removed.
* mcp: no group for the server of a claude -p run under a VS Code session
A claude -p run started by a command of a session of the VS Code extension or the desktop app keeps that session's entrypoint, and its MCP server gets the session's CLAUDE_CODE_SESSION_ATTENDED 1; only its hooks get 0. Its SessionStart hook now sends /title with unattended for its Claude Code process, and the daemon refuses /session from that process with status 403 for 10 seconds, before or after the title; the session server then answers every call with the text of a run that is not interactive and registers no more. The tests take the environments of a recorded run of Claude Code 2.1.319.
* mcp: Claude's channel and reply texts name members from the Main group
The channel instructions and the description of reply say that prompts come from the members who joined the session's group from the Main group, and that one of them approves a file while the group has a guest, in place of the owners.
* mcp: test that the session server stays out of the modern MCP era
Claude Code 2.1.319 registers no channel for a server that negotiates the modern protocol revision 2026-07-28. The test sends Claude Code's server/discover probe and its initialize, and expects Method not found and the revision 2025-11-25, so that an SDK upgrade that turns the modern era on fails the tests.
* mcp: document runs without a group and the refused server of claude -p
REFERENCE describes again the runs that are not interactive, and the refusal of the session server of a claude -p run under a VS Code session; TESTING restores the real-session checks of such runs, adds the one under a VS Code session, and names the recorded environments and the protocol era test.
* mcp: spec of runs without a group, the unattended mark and the MCP era
The spec describes again the runs that are not interactive, in flow 30 and the tables, with the mark of the process of a claude -p run under a VS Code session, the 403 of its session server and the end of its retries; it states the revision 2025-11-25 and the server/discover answer that keep the channel registered, and the channel instructions in their new words. Source links point at the lines of this commit.
* mcp: // passes a / command to Claude, /! an owner's ! command
In a session's group, every one-line message that starts with / is a command of the group. A message that starts with // reaches Claude without its first /, so //model sonnet arrives as /model sonnet. A message that starts with /! from a member whose member in the Main group is an owner reaches Claude as !...; from another member it gets the reply Only owners of the Main group can send ! commands to Claude. A message that starts with ! is not passed, and gets the reply Messages starting with ! reach Claude only from owners, as /!command.
* mcp: an unknown command in a session's group gets Unknown command.
The reply to a one-line / message that is not a command of a session's group no longer lists the commands, which the group's menu and the cards show; its text Unknown command. waits for the user's wording. The agent control chat of serve keeps its commands reply.
* mcp: guests' messages reach Claude as prompts
Every member of a session's group but User prompts the session, a guest added to the group directly too; approvals and tool-use verdicts still count only from members who joined from the Main group. Claude's channel instructions and the description of reply name the members of the group.
* mcp: split answers and terminal prompts at the size of a message
Answers and terminal prompts are posted in parts that each fit one message by the size check of send, fitsMessage, with the quote in the first part of an answer, in place of parts of 12000 encoded bytes: a Latin part holds 14962 characters, a Cyrillic part 7481 and a CJK part 4987. An answer quotes its prompt when the quote fits with an empty text.
* mcp: the option approve_guest_files turns the guests' file cards off
The plugin option approve_guest_files, a boolean on by default, passed to the session server as CLAUDE_PLUGIN_OPTION_APPROVE_GUEST_FILES: on, a file of reply waits for its card while the group has a guest, and /approve N all works as before; off, reply sends the file at once. The daemon applies the option of each /session and /title to all sessions, as the expiry, and refuses a config without it.
* mcp: test end to end that a guest prompts and each join is posted once
The trust test checks that the guest's message reaches the session as a prompt, and that the Main group and the session's group hold one join post for each member: the core raises joinedGroupMember for a member the hub hosts and connectedToGroupMember for one another member hosts, one of the two for each connection, in the same case of its CON handler.
* mcp: document //, /!, Unknown command., guest prompts, parts and the option
REFERENCE describes the commands and prompts of a session's group with // and /!, the reply Unknown command., the guests' prompts, the parts of a message's size, and the option approve_guest_files; README states the guests' prompts; TESTING adds a real-session check of // and /! and the e2e checks of guest prompts and single join posts.
* mcp: a space in the prompt queue of a session
Formatting of the line that queues a prompt.
* mcp: an answer drops the quote that leaves no room for its first character
The quote of an answer is kept when it fits with the answer's first character, so that the first part fits one message.
* mcp: spec of //, /!, guest prompts, parts and approve_guest_files
The spec describes the commands and prompts of a session's group with // and /!, the reply Unknown command., the guests' prompts, the parts that each fit one message with a quote that fits the first character, the option approve_guest_files, and one post for each join.
* mcp: document an answer without the quote that leaves it no room
REFERENCE states that an answer is posted without the quote when the quote leaves no room for its first character.
* mcp: a reply too large with its quote is posted without it
Claude's posts with a quote are sent again without it also when the core refuses them with largeMsg, as replies that quote a message near the size limit are.
* mcp: no command reply to a one-line / part that User posts
The control of a session's group drops the commands of User, the member of the hub's contact marked simplexMcpUser, in the order of the other commands, so a part of a terminal prompt that starts with / gets no reply.
* mcp: a part of a long text is searched within one message size
textParts searches each part among the next 15602 characters, the most a message holds, in place of the whole rest of the text; the parts stay the same.
* mcp: reply refuses a caption too long for a message with its file
reply checks the file's message with its caption as send does, before the post and before the card: text: too long for a message with this TYPE; shorten it.
* mcp: the daemon forgets the unattended marks older than 10 s
Each new mark of an unattended run removes the marks of 10 seconds ago and older, which no longer refuse a session server.
* mcp: test end to end the reply to a prompt as long as a message
The mirroring test sends the longest text the member's core sends to a session without Claude Code and waits for Session 1 is not running. without the quote; before
|