icons for the swarm's own forge accounts, and a default agent icon
The builder, ci-metrics and review-classifier forge accounts get an avatar: an icon each in a hexagonal frame, the hyperhive logo when one is missing. The controller sets them with a short-lived write:user token it mints for the account, since only an account can set its own avatar. An agent with no icon of its own shows a default agent icon in the swarm UI, a robot head in a round frame, instead of the dimmed hyperhive mark.
This commit is contained in:
parent
51479d9fe8
commit
91cf4d2ae1
4 changed files with 389 additions and 8 deletions
|
|
@ -210,6 +210,8 @@ let
|
|||
"${deployCfg.swarm-controller.configOrgAvatarPng}"
|
||||
else
|
||||
"${config.services.hyperhive.deploy.hive-controller.assets}/share/hyperhive/branding/agent-configs.png";
|
||||
# The swarm services' own forge accounts' avatars (`forge/service_avatars.rs`).
|
||||
SWARM_CONTROLLER_SERVICE_ICON_DIR = "${config.services.hyperhive.deploy.hive-controller.assets}/share/hyperhive/branding";
|
||||
};
|
||||
|
||||
# How the forge must address this controller to deliver a swarm-wide
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#
|
||||
# Output layout:
|
||||
# $out/share/hyperhive/branding/{hyperhive,agent-configs}.{svg,png}
|
||||
# $out/share/hyperhive/branding/service-*.{svg,png} (the swarm services' forge avatars)
|
||||
# $out/share/hyperhive/prompts/{system.md, claude-settings.json}
|
||||
#
|
||||
# The repo docs/ tree is a SEPARATE derivation (./reference-docs.nix)
|
||||
|
|
@ -42,6 +43,9 @@ stdenv.mkDerivation {
|
|||
rsvg-convert --width 300 --height 300 \
|
||||
-o branding/agent-configs.png \
|
||||
branding/agent-configs.svg
|
||||
for svg in branding/service-*.svg; do
|
||||
rsvg-convert --width 300 --height 300 -o "''${svg%.svg}.png" "$svg"
|
||||
done
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ in
|
|||
swarm-ui = pkgs.callPackage ./swarm-ui.nix {
|
||||
branding-svg = ../../branding/hyperhive.svg;
|
||||
branding-svg-maskable = ../../branding/hyperhive-maskable.svg;
|
||||
agent-default-svg = ../../branding/agent-default.svg;
|
||||
};
|
||||
|
||||
# Bundled browser assets — see ./frontend.nix. Output is
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
buildNpmPackage,
|
||||
branding-svg,
|
||||
branding-svg-maskable,
|
||||
agent-default-svg,
|
||||
librsvg,
|
||||
}:
|
||||
|
||||
|
|
@ -66,6 +67,8 @@ buildNpmPackage {
|
|||
mkdir -p $out
|
||||
cp -r packages/swarm-ui/dist/. $out/
|
||||
cp ${branding-svg} $out/favicon.svg
|
||||
# What an agent with no icon of its own shows (`AgentIcon.tsx`).
|
||||
cp ${agent-default-svg} $out/agent-default.svg
|
||||
rsvg-convert -w 192 -h 192 ${branding-svg} -o $out/icon-192.png
|
||||
rsvg-convert -w 512 -h 512 ${branding-svg} -o $out/icon-512.png
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue