Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: the create form picks an archetype from tiles with their icons

An archetype's meta gets an optional icon, the SVG text (at most 16 KiB), which
the controller checks, stores and serves on GET /api/archetypes. The built-in
archetypes read theirs from nix/archetypes/icons. The create form shows each
archetype as a tile with its icon and name, laid out like the broadcast screen's
agent tiles, in place of the dropdown, and draws the SVG through an img data URL.
This commit is contained in:
iris 2026-11-11 09:08:03 +01:00 • committed by mara
commit 53224d877e

View file

@ -3,11 +3,12 @@
# `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, and `prompt`, the
# text the create form prefills the new agent's AGENTS.md with (the built-ins
# read theirs from ./prompts/<name>.md); see docs/2-handbook/swarm/archetypes.md.
# Every archetype sets `services.hyperhive.agent.icon` (with `mkDefault`) to an
# SVG in `icons/`, so its agents show one until their config sets another.
# `inference`, in the shapes `POST /api/agents` takes them, `icon`, the SVG text
# the create form shows beside the archetype, and `prompt`, the text the create
# form prefills the new agent's AGENTS.md with (the built-ins read theirs from
# ./prompts/<name>.md); see docs/2-handbook/swarm/archetypes.md. Every archetype
# sets `services.hyperhive.agent.icon` (with `mkDefault`) to an SVG in `icons/`,
# so its agents show one until their config sets another.
{
reviewer = {
module =
@ -16,6 +17,7 @@
services.hyperhive.agent.icon = lib.mkDefault ./icons/reviewer.svg;
};
meta = {
icon = builtins.readFile ./icons/reviewer.svg;
description = "Reviews pull requests and replies. It can run hive-forge and git (execution), and holds messaging and inbox; it has no get_agent_meta (meta).";
permissions = [
"messaging"
@ -37,6 +39,7 @@
];
};
meta = {
icon = builtins.readFile ./icons/android-dev.svg;
description = "Builds Android apps: adb and fastboot (android-tools), Gradle and a JDK are installed. It holds the default permissions.";
prompt = builtins.readFile ./prompts/android-dev.md;
};
@ -49,6 +52,7 @@
services.hyperhive.agent.rea.enable = true;
};
meta = {
icon = builtins.readFile ./icons/reverse-engineer.svg;
description = "Reverse-engineers binaries and applications: REA and Ghidra 12.1 are installed with their MCP tools allowed. It holds the default permissions.";
prompt = builtins.readFile ./prompts/reverse-engineer.md;
};