hand agents the dashboard port, pinned claude and otel labels at container start
The three values that differ per host (deploy.hive-controller.dashboardPort, claudeCodePackage and otel.extraResourceAttributes) no longer go into the meta flake. hive-priv writes them into the container's /etc/hyperhive-hive-facts with the hive name and domain, and the agent reads them at boot: - HIVE_DASHBOARD_PORT reaches every unit through the hive-facts generator; the web UI still defaults to 7000 without it. - `claude` on PATH is a wrapper that runs HYPERHIVE_CLAUDE_CODE_PATH's claude when it is there, and the container's own claude-code otherwise. The host's serve.json keeps gc-rooting the pinned build. - OTEL_RESOURCE_ATTRIBUTES moves out of the units' Environment= into a boot-time generator, which appends HYPERHIVE_OTEL_EXTRA_RESOURCE_ATTRIBUTES. The agent options services.hyperhive.agent.claudeCodePath (now a removed option) and otel.extraResourceAttributes go; only the meta render set them. render_flake takes no HiveEnv any more, so the memory-cap render test and render_hive_flake_at, which only existed to vary HiveEnv into the render, go with it. Refs #4857
This commit is contained in:
parent
a32c144b80
commit
9113651c10
23 changed files with 408 additions and 335 deletions
|
|
@ -43,8 +43,8 @@ pub struct Coordinator {
|
|||
/// Git rev of the hyperhive checkout this host runs. Pins the meta
|
||||
/// flake's `hyperhive` input; `None` makes the meta render fail.
|
||||
pub hyperhive_rev: Option<String>,
|
||||
/// Store path of the `claude-code` build every agent runs, written
|
||||
/// into each per-agent flake as `services.hyperhive.agent.claudeCodePath`. Set by
|
||||
/// Store path of the `claude-code` build every agent runs, handed to
|
||||
/// each container at start as `HYPERHIVE_CLAUDE_CODE_PATH`. Set by
|
||||
/// the NixOS module option
|
||||
/// `services.hyperhive.deploy.hive-controller.claudeCodePackage`
|
||||
/// (which resolves the package and hands us its path). `None` = every
|
||||
|
|
@ -55,9 +55,9 @@ pub struct Coordinator {
|
|||
/// closure and all. The host module is what keeps it from being
|
||||
/// garbage-collected — see that option.
|
||||
pub claude_code_path: Option<String>,
|
||||
/// TCP port the host's hive-c0re dashboard listens on. Inlined into
|
||||
/// each per-agent flake so the agent's web UI can build the right
|
||||
/// rebuild-button URL pointing back at the dashboard.
|
||||
/// TCP port the host's hive-c0re dashboard listens on. Handed to each
|
||||
/// container at start as `HIVE_DASHBOARD_PORT`, so the agent's web UI
|
||||
/// can build the rebuild-button URL pointing back at the dashboard.
|
||||
pub dashboard_port: u16,
|
||||
/// Per-agent systemd `CPUQuota=` value (e.g. `"200%"`). Written into
|
||||
/// the `container@h-<name>.service.d/` drop-in on every spawn/rebuild.
|
||||
|
|
@ -193,7 +193,7 @@ pub struct HiveEnv {
|
|||
pub hyperhive_rev: Option<String>,
|
||||
/// Store path of the `claude-code` agents run, or `None` for "each
|
||||
/// agent keeps the one out of its own nixpkgs". Travels into the
|
||||
/// container as `services.hyperhive.agent.claudeCodePath` — a plain string, kept
|
||||
/// container as `HYPERHIVE_CLAUDE_CODE_PATH` — a plain string, kept
|
||||
/// alive host-side by the module that resolved it.
|
||||
pub claude_code_path: Option<String>,
|
||||
pub dashboard_port: u16,
|
||||
|
|
|
|||
Loading…
Reference in a new issue