mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 17:48:15 +00:00
stable
5
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
|
||
|
|
be668564df |
mcp server: files, /leave and library methods (#7962)
* bots, nodejs: document chat, connection, member contact and network commands, typed commands in library * bots, nodejs: restore apiConnect, wrap domain once, test all connect responses * nodejs: JSDoc for new methods * docs: plan for bot API commands and typed Node library methods * tests: channel prepared with a domain has a verified SimpleX name * docs: apply review fixes to the plan for bot API commands * docs: apply second review pass to the plan for bot API commands * docs: refer the bot API plan to the rewritten test commit * docs: record decisions in the plan for bot API commands * docs: plan tests of the generated Python command strings * python: test the generated strings of the documented commands * docs: plan for files, /leave and library methods in the MCP server * docs: wait at stop in the MCP plan * docs: library methods and /leave mechanics in the MCP plan * mcp: typed library methods for chat commands * docs: plan the message information command for bots * mcp: /leave CHAT owner command to leave a chat at once * docs: file servers, GIF and video choices decided in the MCP plan * docs: file mechanics in the MCP plan * mcp: files of received messages * bots, nodejs: message information with the file servers for bots * docs: plan the relay approval option of receiving files in Node * mcp: download of received files with owner approval * docs: name the xftp-server test helper in the files plan * nodejs: receive files without approving unknown relays * docs: plan the user servers command for bots * bots, nodejs: user servers and relays by operator for bots * nodejs: document the message information method * docs: plan the file upload progress event for bots * mcp: send files with owner approval, refusing private keys * bots: file upload progress event for bots * mcp: /leave template in the agent control chat menu * docs: sent copies are deleted for contacts too, at sndFileCompleteXFTP * bots: drop the file upload progress event * docs: drop the upload progress event plan * nodejs: document user servers and relay approval of received files * mcp: download cards name unknown file servers after the upload * docs: record the wait for the file description in the files plan * mcp: fixed wait at stop for cancelled cards, without /sql * docs: record decision C4, a fixed wait at stop, in the files plan * ci: test the MCP server package on pull requests * ci: state when the MCP workflow can be dispatched * ci: run the MCP server tests when its libraries change * mcp: log the errors of image previews and resizing * mcp: keep files in transfer in the data folder * mcp: restrict sent files by the real paths of refused folders * mcp: validate the file at the send by its inode and change time * mcp: limit ffmpeg and ffprobe to local files and no input commands * mcp: ask the owner for unknown file servers; read approvals at creation * mcp: name downloaded files by their ID; return paths of downloads only * mcp: end each download with a result for the agent and the card * mcp: show files above their sender's size limit as failed * mcp: refuse empty files, as without file and captions too long to send * mcp: tell the owner about failed uploads and unposted received files * mcp: delete resized copies left by the last run at start * mcp: name downloads and leaving in the help and greeting, align docs * mcp: compute the download path for received files only * mcp: send a /receive file to the owner under its name * mcp: keep files received without a download in the chat's folder * mcp: keep a left chat's files and delete them with /delete CHAT files * mcp: test that sent images are resized by the core * mcp: wait 30 minutes for a download's progress before cancelling it * mcp: end a download as deleted only when its message is not found * mcp: delete the copy of a /receive file whose post fails * mcp: count the quoted content in a message's length, as the core sends it * mcp: name received bytes, unknown-server downloads and left chat files plainly * mcp: test refused folders, file changes and download approvals * docs: align MCP server docs with refused folders, leaves and download waits * mcp: move received files only in full, delete partials only of downloads * mcp: report a received file missing from its folder as failed * mcp: move received files of a group's member chats into its folder * mcp: read a video's preview and duration as an MP4 or QuickTime file * mcp: 0.2.0 on simplex-chat 7.1.0-beta.10.1 * mcp: file folders by chat type, /delete cancels downloads, files reply * docs: MCP server specs and plan for 0.2.0 * mcp: /receive gives the agent a file, /forward sends it to the owner * docs: MCP server specs for /receive and /forward of download cards * docs: MCP plan records the temp folder command as a library exception * mcp: /delete cancels resumed downloads; /forward quote fits the limit * docs: MCP specs and plans for /forward quotes and resumed downloads * docs: MCP specs name the source commit they are checked against * docs: MCP PLAN states the /forward quote and move rules * mcp: a download moves its completed file whatever its size * mcp: /receive N all covers its card and later files, not pending ones * docs: MCP files approval scope, reply text and README server wording * mcp: a download approves relays only for a card naming unknown servers * mcp: files in member chats of a group are tracked as in the main chat * docs: MCP relay approval of downloads and files in member chats * mcp: a rejected file gets a card again under the files approval * docs: MCP rejected files under the files approval, README scope * mcp: an offered file without a description gets no card or action * docs: MCP a file without a description is not downloaded * mcp: 0.2.0 on simplex-chat 7.1.0-beta.10.2 * ci: test the MCP server as a scope of build-linux |
||
|
|
d63906ad55 |
mcp server: fixes (#7793)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |
||
|
|
7ffe252659 |
packages: npm public access (#7779)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |
||
|
|
46eb5cc001 |
packages: SimpleX Chat MCP server (#7752)
* packages: simplex-chat MCP server * update * standing approvals per chat, leave tool, simplify * fixes * add error messages * LICENSE * specification * migration * update simplex-chat, tests, fixes * update simplex-chat libraries * use agent peer type * better server and tool descriptions * short readme * reference * images * update readme * update readme * update * change links to master * fix links to point to master branch --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> |