mirror of
https://github.com/zeronsh/comet.git
synced 2026-11-16 18:57:19 +00:00
engine: plugins send messages, start chats and answer questions
A new permission, messages.send, always asked (even for your own plugins),
checked by the engine against this device's grants as plugins/agents does.
- `send_message { chat, text, attachments?, mode? }`: the composer's paths
on this device's copy of the chat (QueueCommand run or steer, or a
QueueMessage row held for the turn's end), by the chat's status wherever
it runs. Files attached need files.read too.
- `new_chat { prompt, device?, project?, harness?, model?, effort?, cwd? }`:
created as createChat creates one, then sent its first message.
- `answer { chat, answers, request? }`: as respond_to_input queues it, the
latest question waiting unless one is named.
- Who sent each message is kept beside the chat's transcript (the doc's
meta `sentBy`, by message or queued row id; shown nowhere) and in
plugin_status actions.
- The turns a plugin's message sets off (or, queued, the next one) carry
its `by`, so the loop guard counts sends: a plugin answering its own
turn's end 16 times in a row has the next send refused. The guard now
counts a change as set off only by the latest event the plugin heard
(its own: counted; anyone else's: the count starts over).
- turn.finished carries the turn's reply (its last 16 KB) with
messages.read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b2688c291c
commit
564da44141
12 changed files with 916 additions and 13 deletions
Loading…
Add table
Add a link
Reference in a new issue