diff --git a/docs/2-handbook/swarm/archetypes.md b/docs/2-handbook/swarm/archetypes.md
index 1df0c479b..6b6b845f1 100644
--- a/docs/2-handbook/swarm/archetypes.md
+++ b/docs/2-handbook/swarm/archetypes.md
@@ -23,6 +23,9 @@ The hyperhive flake ships these:
| `android-dev` | installs `android-tools` (`adb`, `fastboot`), Gradle and a JDK; default permissions. |
| `reverse-engineer` | sets `services.hyperhive.agent.rea.enable`: installs REA, Ghidra 12.1 and procps, and allows all REA MCP tools; default permissions and the agent's normal memory cap. |
+Each built-in archetype also sets `services.hyperhive.agent.icon`, so its agents
+show an icon in the swarm UI until their config sets another.
+
## Where an archetype comes from
A flake declares archetypes in its `hyperhiveArchetypes` output:
diff --git a/nix/archetypes/default.nix b/nix/archetypes/default.nix
index 28ed513cc..4bdd250b7 100644
--- a/nix/archetypes/default.nix
+++ b/nix/archetypes/default.nix
@@ -5,10 +5,16 @@
# `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; see
-# docs/2-handbook/swarm/archetypes.md.
+# 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 = { };
+ module =
+ { lib, ... }:
+ {
+ services.hyperhive.agent.icon = lib.mkDefault ./icons/reviewer.svg;
+ };
meta = {
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 = [
@@ -20,8 +26,9 @@
};
android-dev = {
module =
- { pkgs, ... }:
+ { pkgs, lib, ... }:
{
+ services.hyperhive.agent.icon = lib.mkDefault ./icons/android-dev.svg;
environment.systemPackages = [
pkgs.android-tools
pkgs.gradle
@@ -33,9 +40,12 @@
};
};
reverse-engineer = {
- module = {
- services.hyperhive.agent.rea.enable = true;
- };
+ module =
+ { lib, ... }:
+ {
+ services.hyperhive.agent.icon = lib.mkDefault ./icons/reverse-engineer.svg;
+ services.hyperhive.agent.rea.enable = true;
+ };
meta = {
description = "Reverse-engineers binaries and applications: REA and Ghidra 12.1 are installed with their MCP tools allowed. It holds the default permissions.";
};
diff --git a/nix/archetypes/icons/android-dev.svg b/nix/archetypes/icons/android-dev.svg
new file mode 100644
index 000000000..91e05d8b1
--- /dev/null
+++ b/nix/archetypes/icons/android-dev.svg
@@ -0,0 +1,17 @@
+
diff --git a/nix/archetypes/icons/reverse-engineer.svg b/nix/archetypes/icons/reverse-engineer.svg
new file mode 100644
index 000000000..bf4b46e3f
--- /dev/null
+++ b/nix/archetypes/icons/reverse-engineer.svg
@@ -0,0 +1,22 @@
+
diff --git a/nix/archetypes/icons/reviewer.svg b/nix/archetypes/icons/reviewer.svg
new file mode 100644
index 000000000..34b2dbb37
--- /dev/null
+++ b/nix/archetypes/icons/reviewer.svg
@@ -0,0 +1,14 @@
+
diff --git a/nix/module-eval/builder.nix b/nix/module-eval/builder.nix
index 2d3dd02b8..c1495a150 100644
--- a/nix/module-eval/builder.nix
+++ b/nix/module-eval/builder.nix
@@ -291,7 +291,7 @@ let
# output and prints it as JSON. A derivation or a path in `meta` would
# make that evaluation build or copy something; a function would not
# print at all.
- name = "the built-in archetypes carry a module and a meta of plain data, and reviewer can run commands and android-dev installs its toolchain and reverse-engineer turns rea on";
+ name = "the built-in archetypes carry a module and a meta of plain data, and reviewer can run commands and android-dev installs its toolchain and reverse-engineer turns rea on, and each sets an svg icon as a default";
ok =
let
plain =
@@ -316,8 +316,13 @@ let
&& !(lib.elem "meta" reviewer)
&&
lib.elem pkgs.android-tools
- (archetypes.android-dev.module { inherit pkgs; }).environment.systemPackages
- && archetypes.reverse-engineer.module.services.hyperhive.agent.rea.enable;
+ (archetypes.android-dev.module { inherit pkgs lib; }).environment.systemPackages
+ && (archetypes.reverse-engineer.module { inherit lib; }).services.hyperhive.agent.rea.enable
+ && lib.all (icon: lib.hasSuffix ".svg" (toString icon.content)) [
+ (archetypes.reviewer.module { inherit lib; }).services.hyperhive.agent.icon
+ (archetypes.android-dev.module { inherit pkgs lib; }).services.hyperhive.agent.icon
+ (archetypes.reverse-engineer.module { inherit lib; }).services.hyperhive.agent.icon
+ ];
}
{
# `docs.enable` reads `docs.source`, whose default builds from the