rename(#162): scrub remaining hm1nd references from comments and MCP instructions
All functional renames (MANAGER_NAME, MANAGER_AGENT → "root") were done in earlier commits. This cleans up the stale `hm1nd` strings that remained in doc comments, test fixture labels, and the manager MCP server instructions (which told the manager its config lived at /agents/hm1nd/config/agent.nix).
This commit is contained in:
parent
f9de183f4e
commit
ab278affc7
9 changed files with 16 additions and 16 deletions
|
|
@ -1013,7 +1013,7 @@ pub struct GetLooseEndsArgs {
|
||||||
|
|
||||||
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
|
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
|
||||||
pub struct RequestApplyCommitArgs {
|
pub struct RequestApplyCommitArgs {
|
||||||
/// Agent whose config repo the commit lives in (use `"hm1nd"` for the
|
/// Agent whose config repo the commit lives in (use `"root"` for the
|
||||||
/// manager's own config).
|
/// manager's own config).
|
||||||
pub agent: String,
|
pub agent: String,
|
||||||
/// Commit sha (full or short, 7-40 hex chars) in that agent's
|
/// Commit sha (full or short, 7-40 hex chars) in that agent's
|
||||||
|
|
@ -1124,7 +1124,7 @@ pub struct EditScheduleArgs {
|
||||||
|
|
||||||
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
|
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
|
||||||
pub struct GetLogsArgs {
|
pub struct GetLogsArgs {
|
||||||
/// Logical agent name to fetch logs for (e.g. `gui`, `hm1nd`).
|
/// Logical agent name to fetch logs for (e.g. `gui`, `root`).
|
||||||
/// hive-c0re maps it to the underlying machine name (`h-gui`)
|
/// hive-c0re maps it to the underlying machine name (`h-gui`)
|
||||||
/// itself — pass the plain agent name, not the `h-` form.
|
/// itself — pass the plain agent name, not the `h-` form.
|
||||||
pub agent: String,
|
pub agent: String,
|
||||||
|
|
@ -1580,7 +1580,7 @@ impl ManagerServer {
|
||||||
|
|
||||||
#[tool(
|
#[tool(
|
||||||
description = "Submit a config change for operator approval. Pass the agent name \
|
description = "Submit a config change for operator approval. Pass the agent name \
|
||||||
(e.g. `alice` or `hm1nd` for the manager's own config) and a commit sha (7-40 hex \
|
(e.g. `alice` or `root` for the manager's own config) and a commit sha (7-40 hex \
|
||||||
chars, full or short) in that agent's proposed config repo — a branch/tag name like \
|
chars, full or short) in that agent's proposed config repo — a branch/tag name like \
|
||||||
`main` is rejected, the approval pins the exact commit. On approval hive-c0re \
|
`main` is rejected, the approval pins the exact commit. On approval hive-c0re \
|
||||||
rebuilds the container."
|
rebuilds the container."
|
||||||
|
|
@ -1785,7 +1785,7 @@ impl ManagerServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tool_handler(
|
#[tool_handler(
|
||||||
instructions = "You are the hyperhive manager (hm1nd). You coordinate sub-agents and \
|
instructions = "You are the hyperhive manager (root). You coordinate sub-agents and \
|
||||||
relay between them and the operator. Use `send` to talk to agents/operator, `recv` \
|
relay between them and the operator. Use `send` to talk to agents/operator, `recv` \
|
||||||
to drain your inbox. Privileged: `request_init_config` (step 1 of new-agent \
|
to drain your inbox. Privileged: `request_init_config` (step 1 of new-agent \
|
||||||
creation — seeds the proposed config repo so you can customise agent.nix; \
|
creation — seeds the proposed config repo so you can customise agent.nix; \
|
||||||
|
|
@ -1800,7 +1800,7 @@ impl ManagerServer {
|
||||||
question or reminder row by id), `set_status` / `get_agent_meta` (publish your \
|
question or reminder row by id), `set_status` / `get_agent_meta` (publish your \
|
||||||
own status text + query identity/status of any agent — `get_agent_meta` with \
|
own status text + query identity/status of any agent — `get_agent_meta` with \
|
||||||
no arg replaces the old `whoami` self-introspection). The manager's own config lives at \
|
no arg replaces the old `whoami` self-introspection). The manager's own config lives at \
|
||||||
`/agents/hm1nd/config/agent.nix`."
|
`/agents/root/config/agent.nix`."
|
||||||
)]
|
)]
|
||||||
impl ServerHandler for ManagerServer {}
|
impl ServerHandler for ManagerServer {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
//! Per-agent path resolution for state, harness, and credential directories.
|
//! Per-agent path resolution for state, harness, and credential directories.
|
||||||
//!
|
//!
|
||||||
//! All agents (including the manager `hm1nd`) use `/agents/{label}/state`
|
//! All agents (including the manager `root`) use `/agents/{label}/state`
|
||||||
//! for agent-owned durable notes, and `/agents/{label}/harness` for
|
//! for agent-owned durable notes, and `/agents/{label}/harness` for
|
||||||
//! harness-internal files (`hyperhive-events.sqlite`, `hyperhive-model`, etc.)
|
//! harness-internal files (`hyperhive-events.sqlite`, `hyperhive-model`, etc.)
|
||||||
//! that should not clutter what claude sees as "my notes dir".
|
//! that should not clutter what claude sees as "my notes dir".
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ shared closer
|
||||||
let rendered = render(
|
let rendered = render(
|
||||||
&PRODUCTION_TEMPLATE,
|
&PRODUCTION_TEMPLATE,
|
||||||
Flavor::Manager,
|
Flavor::Manager,
|
||||||
"hm1nd",
|
"root",
|
||||||
"she/her",
|
"she/her",
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
|
@ -346,7 +346,7 @@ shared closer
|
||||||
let manager = render(
|
let manager = render(
|
||||||
&PRODUCTION_TEMPLATE,
|
&PRODUCTION_TEMPLATE,
|
||||||
Flavor::Manager,
|
Flavor::Manager,
|
||||||
"hm1nd",
|
"root",
|
||||||
"she/her",
|
"she/her",
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
|
@ -390,7 +390,7 @@ You are hyperhive agent `{label}` (qualified: `{qualified_label}`){hive_identity
|
||||||
let rendered = render(
|
let rendered = render(
|
||||||
IDENTITY_FIXTURE,
|
IDENTITY_FIXTURE,
|
||||||
Flavor::Manager,
|
Flavor::Manager,
|
||||||
"hm1nd",
|
"root",
|
||||||
"she/her",
|
"she/her",
|
||||||
None,
|
None,
|
||||||
Some("constellat1on"),
|
Some("constellat1on"),
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn build_map_filters_manager() {
|
fn build_map_filters_manager() {
|
||||||
// Use MANAGER_NAME in the input so the assert below actually
|
// Use MANAGER_NAME in the input so the assert below actually
|
||||||
// exercises the filter path — a literal `"hm1nd"` would pass
|
// exercises the filter path — a literal `"root"` would pass
|
||||||
// trivially if the constant ever changed and the filter
|
// trivially if the constant ever changed and the filter
|
||||||
// silently became a no-op.
|
// silently became a no-op.
|
||||||
let names: Vec<String> = ["iris", MANAGER_NAME, "argus"]
|
let names: Vec<String> = ["iris", MANAGER_NAME, "argus"]
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ pub struct DashboardLink {
|
||||||
pub struct ContainerView {
|
pub struct ContainerView {
|
||||||
/// Logical agent name (no `h-` prefix). Used in action URLs.
|
/// Logical agent name (no `h-` prefix). Used in action URLs.
|
||||||
pub name: String,
|
pub name: String,
|
||||||
/// Container name as nixos-container sees it (`h-foo`, `hm1nd`).
|
/// Container name as nixos-container sees it (`h-foo`, `root`).
|
||||||
pub container: String,
|
pub container: String,
|
||||||
pub is_manager: bool,
|
pub is_manager: bool,
|
||||||
pub port: u16,
|
pub port: u16,
|
||||||
|
|
@ -273,7 +273,7 @@ fn read_status(name: &str) -> (Option<String>, Option<i64>) {
|
||||||
/// the manager, the logical agent name otherwise — so callers can
|
/// the manager, the logical agent name otherwise — so callers can
|
||||||
/// reuse the same string they used to look the agent up.
|
/// reuse the same string they used to look the agent up.
|
||||||
pub async fn read_agent_status_live(name: &str) -> (Option<String>, Option<i64>, bool) {
|
pub async fn read_agent_status_live(name: &str) -> (Option<String>, Option<i64>, bool) {
|
||||||
// The lifecycle helper wants the on-disk name (`hm1nd` for the
|
// The lifecycle helper wants the on-disk name (`root` for the
|
||||||
// manager, the bare logical name for sub-agents) and internally
|
// manager, the bare logical name for sub-agents) and internally
|
||||||
// adds the `h-` prefix. Map the broker-side `MANAGER_AGENT`
|
// adds the `h-` prefix. Map the broker-side `MANAGER_AGENT`
|
||||||
// sentinel back to the lifecycle name here so callers don't have
|
// sentinel back to the lifecycle name here so callers don't have
|
||||||
|
|
|
||||||
|
|
@ -2561,7 +2561,7 @@ fn transient_label(k: crate::coordinator::TransientKind) -> &'static str {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert either a logical name or a container name back to the logical
|
/// Convert either a logical name or a container name back to the logical
|
||||||
/// name. Sub-agents are `h-foo` → `foo`; manager stays `hm1nd`.
|
/// name. Sub-agents are `h-foo` → `foo`; manager stays `root`.
|
||||||
fn strip_container_prefix(name: &str) -> String {
|
fn strip_container_prefix(name: &str) -> String {
|
||||||
name.strip_prefix(lifecycle::AGENT_PREFIX)
|
name.strip_prefix(lifecycle::AGENT_PREFIX)
|
||||||
.unwrap_or(name)
|
.unwrap_or(name)
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ async fn cmd_serve(
|
||||||
tracing::warn!(error = ?e, "startup migration failed");
|
tracing::warn!(error = ?e, "startup migration failed");
|
||||||
}
|
}
|
||||||
// Auto-create the manager container if it isn't there yet. Block
|
// Auto-create the manager container if it isn't there yet. Block
|
||||||
// on this — without hm1nd the system has no manager harness.
|
// on this — without root the system has no manager harness.
|
||||||
// Failures are logged but allowed: a broken auto-spawn shouldn't
|
// Failures are logged but allowed: a broken auto-spawn shouldn't
|
||||||
// make the dashboard unreachable for debugging.
|
// make the dashboard unreachable for debugging.
|
||||||
if let Err(e) = auto_update::ensure_manager(&coord).await {
|
if let Err(e) = auto_update::ensure_manager(&coord).await {
|
||||||
|
|
|
||||||
|
|
@ -951,7 +951,7 @@ fn handle_edit_schedule(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Permission check for `CancelSchedule` on the manager surface.
|
/// Permission check for `CancelSchedule` on the manager surface.
|
||||||
/// `requester` (always `hm1nd` here) can cancel its own schedules.
|
/// `requester` (always `root` here) can cancel its own schedules.
|
||||||
/// Sub-agent ownership is delegated to topology — see
|
/// Sub-agent ownership is delegated to topology — see
|
||||||
/// `crate::topology::is_descendant_of`. Also reused by
|
/// `crate::topology::is_descendant_of`. Also reused by
|
||||||
/// `handle_fire_schedule_now` — fire-auth follows the same shape.
|
/// `handle_fire_schedule_now` — fire-auth follows the same shape.
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ pub fn write_payload(agent: &str, host_path: &Path, message: &str) -> Result<(),
|
||||||
/// under. Every agent sees its state at `/agents/<container>/state/`
|
/// under. Every agent sees its state at `/agents/<container>/state/`
|
||||||
/// (see `lifecycle::set_nspawn_flags`). Auto-file paths use the same
|
/// (see `lifecycle::set_nspawn_flags`). Auto-file paths use the same
|
||||||
/// prefix so the round-trip is symmetric. The manager logical name
|
/// prefix so the round-trip is symmetric. The manager logical name
|
||||||
/// maps to its container name (`hm1nd`) per `lifecycle::MANAGER_NAME`.
|
/// maps to its container name (`root`) per `lifecycle::MANAGER_NAME`.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn container_state_prefix(agent: &str) -> String {
|
pub fn container_state_prefix(agent: &str) -> String {
|
||||||
if agent == hive_sh4re::MANAGER_AGENT {
|
if agent == hive_sh4re::MANAGER_AGENT {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue