swarm: /clear starts an agent's next turn on a fresh session
This commit is contained in:
parent
7b62f2c22a
commit
fb9d4b5040
1 changed files with 155 additions and 22 deletions
|
|
@ -356,8 +356,10 @@ The text holds no secret, so nothing goes through the secret store.
|
|||
**Editing.** `PUT /api/agents/<name>/agents-md` takes `{base_revision, diff}`.
|
||||
The diff is a unified diff that names `a/AGENTS.md` and `b/AGENTS.md`, made
|
||||
against the text at `base_revision`. swarm-controller sends it as a request on
|
||||
the agent's command subject `$SWARM.control.<name>`, as it sends a cancel. The
|
||||
harness refuses it when the file isn't at `base_revision`. Otherwise it runs
|
||||
the agent's command subject `$SWARM.control.<name>`, as it sends a cancel. (The same
|
||||
subject carries `POST /api/agents/<name>/new-session`, which the swarm UI sends for
|
||||
`/clear`: the harness queues a session reset that takes effect at the agent's next
|
||||
turn, and answers `acted: true`.) The harness refuses it when the file isn't at `base_revision`. Otherwise it runs
|
||||
`git apply --check` and then `git apply` on a copy of the file, and writes the
|
||||
result over the file only when both pass:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue