No description
Find a file
2026-05-15 16:43:20 +02:00
docs Phase 7e: damocles migration plan; CLAUDE.md phase status 2026-05-15 00:32:26 +02:00
hive-ag3nt docs: README + TODO split; trim CLAUDE.md; fix async form 415 2026-05-15 16:41:15 +02:00
hive-c0re docs: README + TODO split; trim CLAUDE.md; fix async form 415 2026-05-15 16:41:15 +02:00
hive-sh4re nix templates: factor harness-base.nix (shared scaffolding incl. gitconfig) 2026-05-15 16:10:55 +02:00
nix programs.git.enable + harness PATH tracks systemPackages 2026-05-15 16:16:14 +02:00
.gitignore gitignore .claude/settings.local.json 2026-05-15 14:44:58 +02:00
Cargo.lock agent ui: live event panel via SSE + stream-json 2026-05-15 15:01:26 +02:00
Cargo.toml turn loop: tool whitelist (no web/task), no skip-permissions 2026-05-15 14:41:38 +02:00
CLAUDE.md docs: README + TODO split; trim CLAUDE.md; fix async form 415 2026-05-15 16:41:15 +02:00
flake.lock fmt 2026-05-14 22:27:03 +02:00
flake.nix treefmt: add taplo (toml) formatter 2026-05-14 23:02:42 +02:00
README.md readme: drop "read next" + add minimal host flake.nix example 2026-05-15 16:43:20 +02:00
TODO.md docs: README + TODO split; trim CLAUDE.md; fix async form 415 2026-05-15 16:41:15 +02:00

hyperhive

Multi-Claude-Code-agent orchestration on nixos-containers.

A host-side Rust daemon (hive-c0re) spawns nspawn-isolated agent containers and brokers messages between them. A manager agent (hm1nd) coordinates the swarm and gates lifecycle changes on user approval via git commits, surfaced through a vibec0re-styled HTTP dashboard.

                     ┌────────────────────────┐
                     │  hive-c0re (Rust)      │
        operator ──▶ │  • lifecycle           │ ─▶ nixos-containers
                     │  • broker (sqlite)     │     ├── hm1nd       (manager)
                     │  • approvals (sqlite)  │     ├── h-alice     (sub-agent)
                     │  • dashboard :7000     │     └── h-bob       ...
                     │  • per-agent sockets   │
                     └────────────────────────┘

Each container runs a harness binary that drives claude --print --continue in a turn loop, exposes a per-agent web UI with a live event stream, and talks to the broker over a bind-mounted unix socket via an embedded MCP server claude calls into.

Host config

Minimal flake.nix for a host that runs hive-c0re:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
    hyperhive.url = "git+https://git.berlin.ccc.de/vinzenz/hyperhive";
  };

  outputs = { nixpkgs, hyperhive, ... }: {
    nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        hyperhive.nixosModules.hive-c0re
        ({ ... }: {
          nixpkgs.overlays = [
            hyperhive.overlays.default
            hyperhive.overlays.claude-unstable
          ];
          services.hive-c0re = {
            enable = true;
            hyperhiveFlake = "${hyperhive}";
          };
          # ... rest of your host config (hardware, networking, users, …)
          system.stateVersion = "25.11";
        })
      ];
    };
  };
}

hive-c0re will then:

  • open its admin socket at /run/hyperhive/host.sock + dashboard on :7000,
  • auto-create the manager container (hm1nd) if missing,
  • auto-rebuild any managed container whose hyperhive rev is stale.

Build / deploy

# inside the repo (devshell first; no global cargo)
nix develop -c cargo check
nix develop -c cargo clippy --workspace --all-targets -- -D warnings

# evaluate everything (rust+nix+toml fmt + clippy)
nix flake check

# deploy to a host that imports `hyperhive.nixosModules.hive-c0re`
cd ~/Repos/<nixos-config-repo>
nix flake update --update-input hyperhive
sudo nixos-rebuild switch --flake .#<host>

The host config also needs hyperhive.overlays.default applied — the module's default package = pkgs.hyperhive requires the overlay.