atlas
88674eb63a
read an agent's agents.md through the swarm and edit it with git diffs
...
The agent's state/AGENTS.md stays the truth and its harness the only
writer. The harness mirrors the file into a new `agents-md` KV bucket,
and swarm-controller serves that copy, so a read works while the agent is
stopped. An edit is a unified diff plus the revision it was made against,
sent over the agent's existing control subject; the harness refuses a
stale base, applies the diff with `git apply --check` then `git apply` to
a temp copy, and writes the file only when both pass. Fixes #5519 .
Files:
- swarm-queue-client/src/agents_md.rs, lib.rs: the bucket name and
subject, the mirror value, the `ApplyAgentsMd` control command and its
reply. `AgentControl` loses `Copy` because the new variant carries text.
- hive-agent/src/swarm_agents_md.rs, main.rs: the mirror task (start,
10 s re-read, immediate republish after an edit) and the apply.
- hive-agent/src/swarm_input.rs: the control loop answers both commands.
- hive-agent/src/claude_md_watch.rs: its AGENTS.md path is shared.
- hive-agent/Cargo.toml, Cargo.lock: sha1 for the git blob id (already in
the lock), tempfile moves from dev to runtime for the apply directory.
- swarm-controller/src/agents_md.rs, main.rs: the bucket reader and
GET/PUT /api/agents/{name}/agents-md; test AppState literals get the
new field.
- swarm-controller/src/agent_control.rs: the sink hands back raw reply
bytes, so each command decodes its own reply type.
- swarm-controller-api/src/agents_md.rs: the route bodies, shared with
swarmctl.
- swarmctl/src/agents_md.rs, main.rs: `swarmctl agent agents-md get|apply`.
- nix/host-modules/swarm-nats.nix, nix/module-eval/nats-authelia.nix: the
agent's publish grant on its own `$KV.agents-md.<agent>` key.
git needs no new package: agent containers enable programs.git, and the
harness unit's PATH includes /run/current-system/sw.
2026-10-18 12:35:11 +02:00
..
hive-c0re
hive-tls: move the controllers' CA env settings into glue
2026-10-17 16:32:12 +02:00
hive-forge
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
hive-gateway
move the hive's vhosts and matrix discovery out of the gateway
2026-10-17 15:07:33 +02:00
lib
swarm-bao-agent-pki: decide openbao's restart on the shared locale-independent compare
2026-10-13 17:00:56 +02:00
swarm-grafana /dashboards
rename claude.md to agents.md for agents and the repo
2026-10-18 02:33:06 +02:00
bao-bootstrap-policy.hcl
bao: disable the unused approle auth method, declaratively
2026-09-28 22:58:36 +02:00
default.nix
hive-tls: move the controllers' CA env settings into glue
2026-10-17 16:32:12 +02:00
deploy.nix
move dashboardPort, claudeCodePackage and extraResourceAttributes to deploy.hive-controller
2026-10-17 13:43:16 +02:00
glue-bao-readers-policy-order.nix
hive-forge: the controller-token mint writes straight to the store, and the on-disk token goes
2026-10-16 17:48:56 +02:00
glue-bao-readers-store-order.nix
make bao readers want swarm-bao-pki and drop its start limit
2026-10-16 18:29:38 +02:00
glue-bao-tls.nix
add swarm-metrics, an agent CLI for the metrics store
2026-10-17 10:10:17 +02:00
glue-bao-ui-oidc-client.nix
bao: OIDC login to the browser UI via authelia, as a metadata-only viewer
2026-09-28 19:56:38 +02:00
glue-builder-oidc-client.nix
swarm-builder, swarm-claude-login, swarm-review-classifier: forward each container's journal to the swarm collector
2026-10-16 09:10:04 +02:00
glue-ci-metrics-otel-oidc-client.nix
push ci run metrics to victoriametrics, with a grafana board
2026-10-16 20:43:11 +02:00
glue-ci-runner-otel-oidc-client.nix
swarm-ci-runner, swarm-grafana, swarm-victorialogs: forward each container's journal to the swarm collector
2026-10-16 11:22:51 +02:00
glue-claude-login-oidc-client.nix
swarm-builder, swarm-claude-login, swarm-review-classifier: forward each container's journal to the swarm collector
2026-10-16 09:10:04 +02:00
glue-controller-bao-identity.nix
nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable
2026-09-26 01:19:49 +02:00
glue-controller-env.nix
glue-controller-env: the controller always exports otlp to the swarm's collector
2026-10-17 16:33:52 +02:00
glue-controller-oidc-client.nix
swarm-controller: get its otlp pushes past the collector, log failures
2026-10-17 09:44:33 +02:00
glue-forge-controller.nix
glue: forge's controller-dependent settings move out of the forge module
2026-10-13 22:14:28 +02:00
glue-forge-oidc-client.nix
nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable
2026-09-26 01:19:49 +02:00
glue-forge-otel-oidc-client.nix
hive-forge, hive-matrix: forward each container's journal to the swarm collector
2026-10-16 13:50:23 +02:00
glue-grafana-oidc-client.nix
nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable
2026-09-26 01:19:49 +02:00
glue-grafana-otel-oidc-client.nix
swarm-ci-runner, swarm-grafana, swarm-victorialogs: forward each container's journal to the swarm collector
2026-10-16 11:22:51 +02:00
glue-hive-otel-authelia.nix
glue: hive-otel's ordering after authelia moves out of the otel module
2026-10-13 22:04:52 +02:00
glue-hive-tls-bao-identity.nix
hive-tls: the gateway leaf uses the services-issuer identity, not a hive's
2026-10-06 14:54:07 +02:00
glue-hive-tls-controllers.nix
hive-tls: move the controllers' CA env settings into glue
2026-10-17 16:32:12 +02:00
glue-logs-auth-bao-identity.nix
swarm-logs-auth: check agent tokens on the log store's query route
2026-10-13 08:38:05 +02:00
glue-matrix-ctl-bao-identity.nix
swarm-nats, matrix: the queue's and matrix-ctl's store identity paths are their own, not the hive's
2026-10-06 12:04:48 +02:00
glue-matrix-hive-discovery.nix
move the hive's vhosts and matrix discovery out of the gateway
2026-10-17 15:07:33 +02:00
glue-matrix-oidc-client.nix
swarm: OIDC clients registered wherever authelia runs; nats + matrix secrets from bao
2026-10-05 09:58:02 +02:00
glue-matrix-otel-oidc-client.nix
hive-forge, hive-matrix: forward each container's journal to the swarm collector
2026-10-16 13:50:23 +02:00
glue-metrics-auth-bao-identity.nix
add swarm-metrics, an agent CLI for the metrics store
2026-10-17 10:10:17 +02:00
glue-nats-auth-bao-identity.nix
swarm-nats: the auth responder's store identity path is its own, not the hive's
2026-10-06 10:04:30 +02:00
glue-nats-bao-identity.nix
swarm-nats, matrix: the queue's and matrix-ctl's store identity paths are their own, not the hive's
2026-10-06 12:04:48 +02:00
glue-nats-oidc-client.nix
swarm-nats: forward the queue container's journal to the swarm collector
2026-10-16 09:08:21 +02:00
glue-nats-wireguard.nix
glue: nats firewall on the wireguard interface moves out of the nats module
2026-10-14 10:15:19 +02:00
glue-queue-agent-credential.nix
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
glue-review-classifier-oidc-client.nix
swarm-builder, swarm-claude-login, swarm-review-classifier: forward each container's journal to the swarm collector
2026-10-16 09:10:04 +02:00
glue-secret-publisher-authelia.nix
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
glue-secret-publisher-bao-identity.nix
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
glue-swarm-bao-otel-oidc-client.nix
ops: update option pointers after grafana/bao split
2026-10-01 09:53:04 +02:00
glue-swarm-otel-oidc-client.nix
ops: update option pointers after otel split
2026-10-01 13:00:40 +02:00
glue-victorialogs-otel-oidc-client.nix
swarm-ci-runner, swarm-grafana, swarm-victorialogs: forward each container's journal to the swarm collector
2026-10-16 11:22:51 +02:00
glue-victoriametrics-otel-oidc-client.nix
swarm-victoriametrics: forward the container's journal to the swarm collector
2026-10-16 14:47:31 +02:00
hive-matrix-service.nix
drop option renames and removals older than two weeks
2026-10-16 22:04:57 +02:00
hive-matrix.nix
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
hive-network.nix
hyperhive: make the values the meta-flake render reads swarm-wide
2026-10-17 13:43:16 +02:00
hive-options-removed.nix
publish operators' forge-profile pronouns to kv and list them in the agent prompt
2026-10-17 13:10:05 +02:00
hive-priv.nix
hive-priv: lock personality, deny realtime, kernel logs and module loading
2026-10-16 16:06:49 +02:00
hive-tls.nix
hive-tls owns the per-host list of locally fronted service domains
2026-10-17 23:26:53 +02:00
host-ca-removed.nix
drop option renames and removals older than two weeks
2026-10-16 22:04:57 +02:00
hyperhive.nix
hyperhive: make the values the meta-flake render reads swarm-wide
2026-10-17 13:43:16 +02:00
local-defaults.nix
swarm-nats: take the callout issuer and user keys from the store
2026-10-06 14:53:33 +02:00
nats-callout-removed.nix
nats-callout-removed: remove the container's OIDC secret copy here, ungated
2026-10-06 15:25:29 +02:00
otel.nix
move dashboardPort, claudeCodePackage and extraResourceAttributes to deploy.hive-controller
2026-10-17 13:43:16 +02:00
stylix-theme.nix
swarm-ui: apply the operator's stylix theme, same as the dashboard already does
2026-08-24 14:28:25 +02:00
swarm-authelia-service.nix
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
swarm-authelia.nix
authelia: allow only the collector to write to the log store's ingest path
2026-10-17 14:51:35 +02:00
swarm-bao-service.nix
nix: split swarm-bao into service and deploy-mode files
2026-10-01 09:37:36 +02:00
swarm-bao.nix
hive-tls owns the per-host list of locally fronted service domains
2026-10-17 23:26:53 +02:00
swarm-builder.nix
swarm-builder: give the check flake the hive's docs source
2026-10-17 13:39:42 +02:00
swarm-ci-metrics.nix
trust the swarm services ca in swarm-ci-metrics
2026-10-17 23:28:03 +02:00
swarm-ci-runner.nix
swarm-ci-runner, swarm-grafana, swarm-victorialogs: forward each container's journal to the swarm collector
2026-10-16 11:22:51 +02:00
swarm-claude-login.nix
move dashboardPort, claudeCodePackage and extraResourceAttributes to deploy.hive-controller
2026-10-17 13:43:16 +02:00
swarm-controller.nix
swarm-controller: restrict its socket directory to nginx's access group
2026-10-17 13:54:53 +02:00
swarm-grafana-service.nix
swarm-ci-runner, swarm-grafana, swarm-victorialogs: forward each container's journal to the swarm collector
2026-10-16 11:22:51 +02:00
swarm-grafana.nix
log the queue-connect and identity-mint failures the alert rules match
2026-10-17 08:02:41 +02:00
swarm-nats-service.nix
swarm-nats: forward the queue container's journal to the swarm collector
2026-10-16 09:08:21 +02:00
swarm-nats.nix
read an agent's agents.md through the swarm and edit it with git diffs
2026-10-18 12:35:11 +02:00
swarm-otel-service.nix
hyperhive: make the values the meta-flake render reads swarm-wide
2026-10-17 13:43:16 +02:00
swarm-otel.nix
hyperhive: make the values the meta-flake render reads swarm-wide
2026-10-17 13:43:16 +02:00
swarm-required-services.nix
push ci run metrics to victoriametrics, with a grafana board
2026-10-16 20:43:11 +02:00
swarm-review-classifier.nix
move dashboardPort, claudeCodePackage and extraResourceAttributes to deploy.hive-controller
2026-10-17 13:43:16 +02:00
swarm-secret-publisher.nix
swarm-authelia: run the secret publisher and a journal forwarder inside the container
2026-10-17 00:28:16 +02:00
swarm-snapshot-store.nix
snapshot store: bound the transfer on both ends
2026-10-16 11:45:58 +02:00
swarm-ui.nix
move the hive's vhosts and matrix discovery out of the gateway
2026-10-17 15:07:33 +02:00
swarm-victorialogs-service.nix
swarm-ci-runner, swarm-grafana, swarm-victorialogs: forward each container's journal to the swarm collector
2026-10-16 11:22:51 +02:00
swarm-victorialogs.nix
victorialogs and victoriametrics: own the package for each auth responder they run
2026-10-17 18:38:25 +02:00
swarm-victoriametrics-service.nix
swarm-victoriametrics: forward the container's journal to the swarm collector
2026-10-16 14:47:31 +02:00
swarm-victoriametrics.nix
victorialogs and victoriametrics: own the package for each auth responder they run
2026-10-17 18:38:25 +02:00
swarm-wireguard.nix
swarm options: no swarm.* value depends on a deploy option or this host's hive
2026-10-04 18:13:47 +02:00
swarm.nix
hive-tls owns the per-host list of locally fronted service domains
2026-10-17 23:26:53 +02:00