Sibling to ensure_core_avatar (#320). Same one-shot marker-guarded upload pattern, this time aimed at the Forgejo per-org avatar endpoint (`POST /api/v1/orgs/{org}/avatar`). ## SVG-to-PNG at build time Mara: *don't check in the png. instead generate png on the fly or in build.* `hive-c0re/build.rs` renders `branding/agent-configs.svg` → `$OUT_DIR/agent-configs.png` via `rsvg-convert` (librsvg) on every compile; `forge.rs` then `include_bytes!`s the OUT_DIR PNG. The raster never gets checked into git — SVG stays source of truth, the PNG is a build artifact. - `hive-c0re/Cargo.toml`: declares `build = "build.rs"` - `flake.nix`: adds `librsvg` to `naersk-lib.buildPackage` `nativeBuildInputs` (covers both the runtime package and the clippy check derivation) and to the dev shell so local `cargo build` finds `rsvg-convert` on PATH. - For dev builds outside Nix, install librsvg (Debian: `librsvg2-bin`, macOS: `brew install librsvg`). ## Icon design Sibling visual to the main hyperhive mark — same dark base + outer ring + corner-bracket frame so the family reads at a glance. Centre swaps the hexagonal hive for a stacked-config-files motif: three offset sheets, folded-corner affordance, curly-brace `{ }` glyph telegraphing "config file." Brace font-size dropped 78→56 + letter-spacing -3 (#424 mara: "braces cross the boundaries of the page") so the glyphs sit comfortably inside the 120-wide front sheet with clear breathing room on the left/right edges. The stack is shifted so the front sheet centres on canvas-(150, 150); brace text anchors there with `dominant-baseline=central` for true vertical centring. ## Validation - `cargo check` clean (only pre-existing warnings). - One-shot marker honoured: re-runs of `ensure_all` skip after the first success; `rm /var/lib/hyperhive/forge-agent-configs-avatar-set` forces re-upload (useful for icon revisions). - Behaviour mirrors the existing `ensure_core_avatar` pattern. Browser smoke test isn't possible from inside iris's container. Worth eyeballing post-deploy: `http://localhost:3000/agent-configs` should show the new avatar where the default identicon used to be.
33 lines
846 B
TOML
33 lines
846 B
TOML
[package]
|
|
name = "hive-c0re"
|
|
edition.workspace = true
|
|
version.workspace = true
|
|
# Render branding/agent-configs.svg → $OUT_DIR/agent-configs.png at
|
|
# compile time (#424). build.rs shells out to `rsvg-convert`
|
|
# (librsvg, pulled in via flake.nix' naersk nativeBuildInputs); the
|
|
# baked PNG is included via include_bytes! from forge.rs so no
|
|
# raster gets checked into git.
|
|
build = "build.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
axum.workspace = true
|
|
base64.workspace = true
|
|
reqwest.workspace = true
|
|
clap.workspace = true
|
|
hive-sh4re.workspace = true
|
|
libc = "0.2"
|
|
rusqlite.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tokio.workspace = true
|
|
tokio-stream.workspace = true
|
|
tower-http.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|