Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/archetypes/default.nix
atlas 51035eac1d archetypes: prefill the create form from flake-declared agent archetypes
A flake declares agent archetypes in its `hyperhiveArchetypes` output,
`<name> = { module; meta; }`. The hyperhive flake ships `reviewer`
(default permissions without `execution`).

swarm-builder answers `$SWARM.builder.archetypes` with the `meta` of
every archetype its own hyperhive source declares. swarm-controller asks
once the queue connects and every 10 minutes, checks each archetype as
`POST /api/agents` checks its settings, and stores the result in the
`agent-archetypes` KV bucket when it changed. `GET /api/archetypes`
serves it, and the create form's archetype select prefills permissions,
resource caps and inference from it.

The agent created is an ordinary agent with its own config repo; the
archetype's module is not applied yet.

Refs #5386
2026-10-17 12:57:20 +02:00

20 lines
764 B
Nix

# The archetypes this flake ships, exposed as `hyperhiveArchetypes`. Each is
# `{ module; meta; }`: `module` is a NixOS module for the agent's container,
# `meta` is plain data (no derivations, no `pkgs`), because the swarm
# builder evaluates `meta` alone and swarm-controller stores it as JSON.
# `meta` fields: `description` (required), `permissions`, `limits`,
# `inference`, in the shapes `POST /api/agents` takes them; see
# docs/swarm/archetypes.md.
{
reviewer = {
module = { };
meta = {
description = "Reviews what it is sent. No shell: it holds the default permissions minus execution, so it cannot run hive-forge, git or any other command.";
permissions = [
"messaging"
"meta"
"inbox"
];
};
};
}