Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/module-eval
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-forge-bao.nix module-eval: restore seven zero-cost literal-pin cases 2026-10-17 08:00:29 +02:00
agent-github-bao.nix module-eval: restore seven zero-cost literal-pin cases 2026-10-17 08:00:29 +02:00
agent-icon.nix nix: split module-eval into per-subsystem checks 2026-09-20 04:25:54 +02:00
agent-matrix.nix module-eval: evaluate shared fixture configs once 2026-10-13 08:14:50 +02:00
agent-memory.nix subagent, bash: run each subagent run and bash task in its own cgroup 2026-10-13 12:25:27 +02:00
agent-otel.nix remove otel.metricIntervalMs and the host-level otel.debug 2026-10-17 08:00:14 +02:00
agent-plugins.nix module-eval: drop 18 redundant cases and merge assertion-only hosts 2026-10-17 08:00:29 +02:00
agent-queue-bao.nix add swarm-metrics, an agent CLI for the metrics store 2026-10-17 10:10:17 +02:00
agent-runtime.nix module-eval: drop 18 redundant cases and merge assertion-only hosts 2026-10-17 08:00:29 +02:00
agent-user.nix module-eval: restore seven zero-cost literal-pin cases 2026-10-17 08:00:29 +02:00
bao-basics.nix hive-tls owns the per-host list of locally fronted service domains 2026-10-17 23:26:53 +02:00
bao-controller.nix module-eval: drop 18 redundant cases and merge assertion-only hosts 2026-10-17 08:00:29 +02:00
bao-grants.nix swarm-bao: the agent-token checkers' cert roles issue batch tokens 2026-10-17 16:28:27 +02:00
bao-matrix-reader.nix module-eval: drop 18 redundant cases and merge assertion-only hosts 2026-10-17 08:00:29 +02:00
bao-otel-collector.nix make bao readers want swarm-bao-pki and drop its start limit 2026-10-16 18:29:38 +02:00
builder.nix archetypes: build an archetype agent from its archetype's module on the hive 2026-10-17 16:27:21 +02:00
ci-metrics.nix trust the swarm services ca in swarm-ci-metrics 2026-10-17 23:28:03 +02:00
core-toggle.nix hive-tls owns the per-host list of locally fronted service domains 2026-10-17 23:26:53 +02:00
forge-placement.nix drop option renames and removals older than two weeks 2026-10-16 22:04:57 +02:00
grafana.nix grafana: forward the host env to the logs datasource plugin 2026-10-16 23:20:16 +02:00
hive-otel.nix swarm-authelia: run the secret publisher and a journal forwarder inside the container 2026-10-17 00:28:16 +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
journald-severity.nix module-eval: assert the severity table once, not once per tier 2026-09-20 14:23:56 +02:00
lib.nix share the flake's pkgs in host module-eval fixtures 2026-10-17 12:31:57 +02:00
matrix-core.nix move the hive's vhosts and matrix discovery out of the gateway 2026-10-17 15:07:33 +02:00
name-guards.nix module-eval: drop 18 redundant cases and merge assertion-only hosts 2026-10-17 08:00:29 +02:00
nats-authelia.nix read an agent's agents.md through the swarm and edit it with git diffs 2026-10-18 12:35:11 +02:00
nats-tls.nix hive-tls owns the per-host list of locally fronted service domains 2026-10-17 23:26:53 +02:00
secret-publisher.nix swarm-authelia: run the secret publisher and a journal forwarder inside the container 2026-10-17 00:28:16 +02:00
shared.nix victorialogs and victoriametrics: own the package for each auth responder they run 2026-10-17 18:38:25 +02:00
snapshot-store.nix module-eval: restore seven zero-cost literal-pin cases 2026-10-17 08:00:29 +02:00
swarm-otel-core.nix swarm-otel: keep the collector's OIDC secret on the host's /run, not in the container's root 2026-10-15 21:45:48 +02:00
swarm-otel-identity.nix authelia: allow only the collector to write to the log store's ingest path 2026-10-17 14:51:35 +02:00
swarm-services-switch.nix hive-tls owns the per-host list of locally fronted service domains 2026-10-17 23:26:53 +02:00