refactor(#2464): rename hive-ag3nt crate to hive-agent, collapse lib into main

This commit is contained in:
damocles 2026-07-15 01:18:22 +02:00 committed by mara
commit 3f1643c594
57 changed files with 101 additions and 130 deletions

View file

@ -48,7 +48,7 @@ pub fn check_size(label: &str, body: &str) -> Result<(), String> {
/// payload. Cap at 200 chars to fit the chip plus a little
/// descriptive padding without forcing the operator to read a
/// scrolling chunk.
/// NOTE: `hive-ag3nt/src/mcp.rs::write_status_file` mirrors this constant
/// NOTE: `hive-agent/src/mcp.rs::write_status_file` mirrors this constant
/// client-side so invalid text is caught before the file is written.
/// Keep in sync if this value changes.
pub const STATUS_MAX_CHARS: usize = 200;

View file

@ -1178,7 +1178,7 @@ fn choom(name: &str, resume_session: Option<&str>) -> Result<()> {
// right `$HOME/.claude`.
let target = format!("{name}@{container}");
let claude = "/run/current-system/sw/bin/claude";
// Bind-mounted state dir; matches `hive-ag3nt::paths::state_dir()`.
// Bind-mounted state dir; matches `hive-agent::paths::state_dir()`.
let state_dir = format!("/agents/{name}/state");
// Per-turn config the harness writes; matches `paths::config_dir()`.
let cfg = "/run/hive-config";

View file

@ -109,7 +109,7 @@ pub async fn build_all(coord: &Coordinator) -> Vec<ContainerView> {
out
}
/// Host-side mirror of `hive_ag3nt::login::has_session`. Returns true
/// Host-side mirror of `hive_agent::login::has_session`. Returns true
/// if the agent's bound `~/.claude/` dir on disk contains any regular
/// file. Reads each `build_all()` so a login driven from the agent's
/// own web UI reflects on the next snapshot.
@ -225,7 +225,7 @@ fn read_active_model(name: &str) -> Option<String> {
/// Host-side hive + swarm display names, read from the c0re service's
/// own process env. The `hive-c0re.nix` module sets these from
/// `services.hyperhive.{hiveName, swarmName}`. The agent-side
/// `hive-ag3nt::identity::{hive_name, swarm_name}` accessors read the
/// `hive-agent::identity::{hive_name, swarm_name}` accessors read the
/// same env vars after they're forwarded into each sub-agent's
/// harness service environment by `meta::render_flake`; surfacing
/// them here from c0re's own env keeps the manager + agent

View file

@ -20,7 +20,7 @@ use crate::lifecycle;
#[derive(Deserialize)]
pub(super) struct JournalQuery {
/// Optional systemd unit filter — e.g. `hive-ag3nt.service`. When
/// Optional systemd unit filter — e.g. `hive-agent.service`. When
/// omitted, returns the full machine journal.
#[serde(default)]
unit: Option<String>,
@ -57,8 +57,8 @@ pub(super) async fn get_journal(
let lines = q.lines.unwrap_or(500).min(5000);
let unit = match q.unit.as_deref().filter(|s| !s.is_empty()) {
Some(u) => {
// accept hive-ag3nt[.service] — anything else refused.
let allowed = ["hive-ag3nt.service"];
// accept hive-agent[.service] — anything else refused.
let allowed = ["hive-agent.service"];
let unit = if u.ends_with(".service") {
u.to_owned()
} else {

View file

@ -495,7 +495,7 @@ async fn cmd_serve(
}
});
// Per-agent events.sqlite + bash-tasks file cleanup now runs
// agent-side in the harness (`hive_ag3nt::vacuum`): the files are
// agent-side in the harness (`hive_agent::vacuum`): the files are
// agent-owned, so host-side deletes hit PermissionDenied / readonly-db
// under privsep. See issue tracker "perms borked".
// (turn-stats.sqlite has no vacuum — it's one tiny row per turn,

View file

@ -959,7 +959,7 @@ where
then hyperhive.nixosConfigurations.ruth
else hyperhive.nixosConfigurations.agent-base;
input = inputs."agent-${name}";
service = "hive-ag3nt";
service = "hive-agent";
parentEnv = if parent == null then {} else { HIVE_PARENT = parent; };
toolGroupsEnv = if toolGroups == null then {} else { HIVE_TOOL_GROUPS = toolGroups; };
capabilitiesEnv = if capabilities == null then {} else { HIVE_CAPABILITIES = capabilities; };

View file

@ -4,7 +4,7 @@
//! swarm totals + a per-agent rollup + model mix + a *labelled*
//! cost estimate.
//!
//! Why re-read the rows here instead of reusing `hive-ag3nt`'s
//! Why re-read the rows here instead of reusing `hive-agent`'s
//! `stats.rs`: that module lives in a different crate (the agent
//! harness) which hive-c0re can't import. The stable contract is the
//! turn-stats *schema*, so we run a focused query against it. If we