hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 780df10d9d swarm: name the agent client after its hive, not after "agent"
`agent-<hive>` reads as "the agent named <hive>" — which is the one thing that
identity does not carry, since it is minted per hive. It becomes
`hive-<hive>-agent`: the hive's own id, extended.

The rename is not a string swap. `hive-foo-agent` satisfies the hive parse too
(it strips to a hive named `foo-agent`), so the responder's agent rule now runs
BEFORE its hive rule — most specific wins. Hive-first would have handed every
agent its hive's grant, including writing that hive's status key, with nothing
to report it: the client authenticates and is merely able to do more than it
should.

`Policy::new`'s overlap check goes with the prefix it was written for. The
invariant the suffix form needs instead is that the suffix is non-empty: an
empty one makes `strip_suffix` succeed on every hive id, so the two principals
become one string and whichever arm runs first answers for both.

The suffix form also introduces a collision the prefix form did not have: a hive
genuinely named `foo-agent` mints `hive-foo-agent`, which is hive `foo`'s agent
id. The responder cannot see it — it has no roster, deliberately — so
`swarm-authelia.nix` asserts at eval that no hive name ends with the suffix. The
existing duplicate-id assertion does not cover this: it fires only when both
`foo` and `foo-agent` are on the roster, and with `foo-agent` alone there is no
duplicate, just a hive quietly receiving its agents' grant.

A test written by analogy with `the_prefix_alone_names_no_hive` failed, correctly
— `hive--agent` is a hive named `-agent` under the hive parse, which this module
cannot rule out. It now asserts only the part this module owns: no empty hive
name is ever expanded into a subject.
2026-09-12 10:33:06 +02:00
..
agent-modules docs, mcp.nix: an overridable default is not unconditional, and there are four subagent tools 2026-09-11 16:58:12 +02:00
docs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
host-modules swarm: name the agent client after its hive, not after "agent" 2026-09-12 10:33:06 +02:00
packages nix: wire the independent hive-subagent-daemon systemd unit and MCP server 2026-09-09 23:45:12 +02:00
templates refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
checks.nix hive-forge: add markdown-docs generator and CI freshness check 2026-09-02 19:38:34 +02:00
devshell.nix types: let nix own the reserved-name blacklist 2026-08-27 16:36:42 +02:00
module-eval.nix glue-matrix-bao-token: say why the store returned nothing 2026-09-12 03:43:38 +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 swarm: refuse hive names that CONTAIN a word identifiers are composed from 2026-08-31 18:50:15 +02:00
rust.nix docs(rust): the dep-cache comment no longer describes two consumers 2026-08-11 22:29:56 +02:00
sources.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
treefmt.nix treefmt: format the web files with prettier 2026-09-02 15:25:07 +02:00