Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/archetypes/default.nix

84 lines
3 KiB
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, `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 =
{ lib, ... }:
{
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"
"inbox"
"execution"
];
prompt = builtins.readFile ./prompts/reviewer.md;
};
};
android-dev = {
module =
{ pkgs, lib, ... }:
{
services.hyperhive.agent.icon = lib.mkDefault ./icons/android-dev.svg;
environment.systemPackages = [
pkgs.android-tools
pkgs.gradle
pkgs.jdk
];
};
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;
};
};
reverse-engineer = {
module =
{ lib, ... }:
{
services.hyperhive.agent.icon = lib.mkDefault ./icons/reverse-engineer.svg;
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;
};
};
ruth = {
module =
{ lib, ... }:
{
services.hyperhive.agent.icon = lib.mkDefault ./icons/ruth.svg;
};
meta = {
icon = builtins.readFile ./icons/ruth.svg;
description = "The manager agent the setup assistant creates. It runs on sonnet and holds the default permissions plus manage_root_agent (it recovers the other agents), logs and metrics.";
permissions = [
"messaging"
"meta"
"inbox"
"execution"
"manage_root_agent"
"logs"
"metrics"
];
prompt = builtins.readFile ./prompts/ruth.md;
inference = {
model = "sonnet";
};
};
};
}