Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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
..
agent-modules move dashboardPort, claudeCodePackage and extraResourceAttributes to deploy.hive-controller 2026-10-17 13:43:16 +02:00
archetypes archetypes: build an archetype agent from its archetype's module on the hive 2026-10-17 16:27:21 +02:00
builder/check-flake swarm-builder: give the check flake the hive's docs source 2026-10-17 13:39:42 +02:00
container-modules swarm-authelia: run the secret publisher and a journal forwarder inside the container 2026-10-17 00:28:16 +02:00
docs drop option renames and removals older than two weeks 2026-10-16 22:04:57 +02:00
host-modules read an agent's agents.md through the swarm and edit it with git diffs 2026-10-18 12:35:11 +02:00
module-eval read an agent's agents.md through the swarm and edit it with git diffs 2026-10-18 12:35:11 +02:00
packages move the hive's vhosts and matrix discovery out of the gateway 2026-10-17 15:07:33 +02:00
script-tests swarm-bao-agent-pki: decide openbao's restart on the shared locale-independent compare 2026-10-13 17:00:56 +02:00
templates build every agent from the agent-base template 2026-10-17 09:24:52 +02:00
checks.nix add swarm-metrics, an agent CLI for the metrics store 2026-10-17 10:10:17 +02:00
devshell.nix CI and devshell comments say what the config does: jobTimeout bounds jobs, coverage runs nightly, dead timeout keys removed 2026-10-15 08:27:32 +02:00
journald-severity.nix otel: map journald PRIORITY onto a severity at every journald receiver 2026-09-20 14:23:56 +02:00
reserved-hive-fragments.nix swarm: extract the name guards, so the module just says what is forbidden 2026-08-31 18:50:15 +02:00
reserved-names.nix push ci run metrics to victoriametrics, with a grafana board 2026-10-16 20:43:11 +02:00
rust.nix add review classifier rules for this repo 2026-10-12 21:05:38 +02:00
sources.nix rename claude.md to agents.md for agents and the repo 2026-10-18 02:33:06 +02:00
treefmt.nix treefmt: format the web files with prettier 2026-09-02 15:25:07 +02:00