move avatar-PNG helpers to hive-core, configurable org avatar

core_avatar_png() and config_org_avatar_png() were hive-sh4re
functions used only by hive-c0re::forge::users. Move them there as
private path-resolution helpers (core_avatar_png_path,
config_org_avatar_png_path), following the existing
std::env::var(...).expect(...) required-env-var style used elsewhere
in hive-c0re.

The org avatar is now independently configurable:
services.hyperhive.c0re.orgAvatarPng (nullable path, default null)
lets an operator override just the agent-configs org avatar PNG
without replacing the whole assets package. Wired via a new
HIVE_ORG_AVATAR_PNG env var that falls back to the bundled PNG when
the option is unset. The core avatar stays under HIVE_ASSETS_DIR,
unchanged.
This commit is contained in:
iris 2026-08-09 23:04:18 +02:00 committed by mara
commit 3e388d2d46
4 changed files with 55 additions and 25 deletions

View file

@ -50,23 +50,6 @@ pub fn branding_svg() -> PathBuf {
dir().join("branding/hyperhive.svg")
}
/// `$HIVE_ASSETS_DIR/branding/hyperhive.png` — the same mark
/// rasterised, used by `hive-c0re::forge::push_avatar` to upload
/// the forge org avatar.
#[must_use]
pub fn core_avatar_png() -> PathBuf {
dir().join("branding/hyperhive.png")
}
/// `$HIVE_ASSETS_DIR/branding/agent-configs.png` — secondary org
/// mark for the `agent-configs/` mirror org. Rendered from
/// `agent-configs.svg` at asset-build time (was rendered in
/// `hive-c0re/build.rs`).
#[must_use]
pub fn config_org_avatar_png() -> PathBuf {
dir().join("branding/agent-configs.png")
}
/// `$HIVE_ASSETS_DIR/prompts/system.md` — the claude system prompt
/// template. `hive-agent::prompt::render` filters the role markers
/// inside it per agent / manager flavor.