From 6ab667901da186a06b58a04948ace8e4e12cc81a Mon Sep 17 00:00:00 2001
From: iris
Date: Thu, 21 May 2026 20:13:30 +0200
Subject: [PATCH] agent page: link to the agent's forge profile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add a '⬡ forge ↗' link to the per-agent page's meta row, next to
the stats + screen links. It opens the agent's Forgejo profile
(http://:3000/
diff --git a/hive-ag3nt/src/web_ui.rs b/hive-ag3nt/src/web_ui.rs
index 123a1ae..6e17024 100644
--- a/hive-ag3nt/src/web_ui.rs
+++ b/hive-ag3nt/src/web_ui.rs
@@ -383,6 +383,11 @@ struct StateSnapshot {
/// (i.e. `/etc/hyperhive/gui.json` was present at harness startup).
/// When true, the UI may render a `🖥 screen` link to `/screen`.
gui_enabled: bool,
+ /// Whether this agent has a Forgejo account wired — its
+ /// `forge-token` file exists in the state dir. When true the UI
+ /// links to the agent's forge profile at `:3000/`
+ /// (the per-agent forge user is named after the agent).
+ forge_present: bool,
}
#[derive(Serialize)]
@@ -485,6 +490,7 @@ async fn api_state(State(state): State) -> axum::Json {
ctx_usage,
cost_usage,
gui_enabled: state.gui_vnc_port.is_some(),
+ forge_present: crate::paths::state_dir().join("forge-token").is_file(),
})
}