document reading and editing an agent's agents.md through the swarm
docs/swarm/README.md gets the routes, the revision, the apply semantics and the stopped-agent behaviour; the persistence doc points there from the AGENTS.md entry. The swarm-controller, swarm-controller-api and swarmctl READMEs and the repo map in AGENTS.md list the new bodies and routes. docs/tools/swarmctl-cli.md is regenerated for `swarmctl agent agents-md`, whose help text loses two passive phrasings vale flags.
This commit is contained in:
parent
88674eb63a
commit
9add99838c
8 changed files with 124 additions and 13 deletions
|
|
@ -16,6 +16,9 @@ This document contains the help content for the `swarmctl` command-line program.
|
|||
* [`swarmctl agent permissions get`↴](#swarmctl-agent-permissions-get)
|
||||
* [`swarmctl agent permissions set`↴](#swarmctl-agent-permissions-set)
|
||||
* [`swarmctl agent permissions clear`↴](#swarmctl-agent-permissions-clear)
|
||||
* [`swarmctl agent agents-md`↴](#swarmctl-agent-agents-md)
|
||||
* [`swarmctl agent agents-md get`↴](#swarmctl-agent-agents-md-get)
|
||||
* [`swarmctl agent agents-md apply`↴](#swarmctl-agent-agents-md-apply)
|
||||
* [`swarmctl schedule`↴](#swarmctl-schedule)
|
||||
* [`swarmctl schedule add`↴](#swarmctl-schedule-add)
|
||||
* [`swarmctl schedule list`↴](#swarmctl-schedule-list)
|
||||
|
|
@ -71,6 +74,7 @@ Manage agents across the swarm
|
|||
* `mint-forge-token` — Check one agent's forge token, and mint it if it's missing or stale
|
||||
* `inference` — Show the model, effort, subagent models and subagent cap the swarm sets for an agent, or change the model, effort and subagent models
|
||||
* `permissions` — Show or change the permissions the swarm grants an agent
|
||||
* `agents-md` — Show an agent's AGENTS.md, or edit it with a diff
|
||||
|
||||
|
||||
|
||||
|
|
@ -274,6 +278,61 @@ Clear the agent's permissions, so the default applies again
|
|||
|
||||
|
||||
|
||||
## `swarmctl agent agents-md`
|
||||
|
||||
Show an agent's AGENTS.md, or edit it with a diff.
|
||||
|
||||
`get` shows the copy the agent last published, so it works while the agent isn't running. `apply` hands the diff to the agent, which applies it to the file with `git apply`; it needs the agent running.
|
||||
|
||||
**Usage:** `swarmctl agent agents-md <COMMAND>`
|
||||
|
||||
###### **Subcommands:**
|
||||
|
||||
* `get` — Print an agent's AGENTS.md on stdout, and its revision on stderr
|
||||
* `apply` — Apply a unified diff to an agent's AGENTS.md
|
||||
|
||||
|
||||
|
||||
## `swarmctl agent agents-md get`
|
||||
|
||||
Print an agent's AGENTS.md on stdout, and its revision on stderr
|
||||
|
||||
**Usage:** `swarmctl agent agents-md get [OPTIONS] <AGENT>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<AGENT>` — Agent name
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
|
||||
|
||||
|
||||
## `swarmctl agent agents-md apply`
|
||||
|
||||
Apply a unified diff to an agent's AGENTS.md.
|
||||
|
||||
The diff names `a/AGENTS.md` and `b/AGENTS.md`, as `diff -u a/AGENTS.md b/AGENTS.md` writes it. The agent refuses it when the file is no longer at `--base`, or when it doesn't apply, and leaves the file as it was.
|
||||
|
||||
**Usage:** `swarmctl agent agents-md apply [OPTIONS] --base <REVISION> <AGENT> <DIFF_FILE>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<AGENT>` — Agent name
|
||||
* `<DIFF_FILE>` — The file holding the diff
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--base <REVISION>` — The revision you made the diff against, as `get` printed it. It's the git blob id of that text, so `git hash-object` of the unedited file prints it too
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
|
||||
|
||||
|
||||
## `swarmctl schedule`
|
||||
|
||||
Manage scheduled prompts.
|
||||
|
|
|
|||
Loading…
Reference in a new issue