M8: an AI agent attached over MCP comments under its own name (#1414) (#1529)

Every command an MCP client runs acts as the client's name from initialize (clientInfo.title, else .name) with ' (agent)' after it, or 'AI agent' without one, carried to the app as engine.execute {agent}. Its messages, reactions and read state are its own, and its messages are marked (agent: true in the file and comment.list, an Agent label in the thread). The user's name and comments made in the app are unchanged; in live sessions the name and marker travel with the thread.
This commit is contained in:
BFlat
2026-10-29 19:15:19 +07:00
committed by GitHub
parent 3efb2699b6
commit 72b4269383
44 changed files with 350 additions and 30 deletions
+5
View File
@@ -102,6 +102,11 @@ JSON or the gradient shorthand `{"type":"linearGradient","stops":["#hex","#hex"]
(as in `docs/mcp.md`). A parameter the command's doc (`engine.commands`) doesn't list is an error
naming it and the ones it takes, never ignored; `ids` and `id` are always taken.
`agent` (a string, next to `command`) runs the command for an AI agent of that name, as the MCP
server does with its client's name: comments it makes are signed "<agent> (agent)" ("AI agent" for
an empty name), marked `"agent": true`, and keep their own read state. Without it the command acts
as the user (the name from Preferences).
```json
{"id":1,"method":"engine.execute","params":{"command":"shape.rectangle","params":{"x":10,"y":10,"width":100,"height":50}}}
{"id":1,"ok":true,"result":{"id":2}}