mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-01 14:26:49 -06:00
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:
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user