remove c0re.operatorPronouns and c0re.contextWindowTokens
Both options are now ignored with a warning (the swarm-peers-removed.nix shape), so a host that still sets one keeps evaluating. - operatorPronouns: the agents' system prompt names the pronouns as she/her, the value the harness fell back to and the option's default. The --operator-pronouns flag, HiveEnv field, meta-flake let binding and HIVE_OPERATOR_PRONOUNS env var are gone. - contextWindowTokens: the per-family defaults (haiku 200000, sonnet 1000000, opus 1000000) move into hive-agent's harness_state as a table; the window the API reports after a turn still wins. The --context-window-tokens flag, HiveEnv field and the rendered HIVE_CONTEXT_WINDOW_TOKENS_<KEY> env vars are gone.
This commit is contained in:
parent
5cd1f16405
commit
4b5707768c
18 changed files with 151 additions and 258 deletions
|
|
@ -67,20 +67,6 @@ pub struct Coordinator {
|
|||
/// each per-agent flake so the agent's web UI can build the right
|
||||
/// rebuild-button URL pointing back at the dashboard.
|
||||
pub dashboard_port: u16,
|
||||
/// Operator pronouns (free text) — `she/her` by default, set via
|
||||
/// the NixOS module option `services.hive-c0re.operatorPronouns`.
|
||||
/// Reaches each container as the `HIVE_OPERATOR_PRONOUNS` env var
|
||||
/// (injected into `systemd.services.<harness>.environment` by the
|
||||
/// meta flake); the harness substitutes it into the agent /
|
||||
/// manager system prompt at boot.
|
||||
pub operator_pronouns: String,
|
||||
/// Per-model context-window sizes in tokens. Set via the host-level
|
||||
/// `services.hive-c0re.contextWindowTokens` NixOS option; injected
|
||||
/// into each container as `HIVE_CONTEXT_WINDOW_TOKENS_<KEY_UPPER>`
|
||||
/// by the meta flake renderer. The harness uses these to derive
|
||||
/// compaction / auto-reset watermarks and exposes the active value
|
||||
/// on `/api/state` as `context_window_tokens`.
|
||||
pub context_window_tokens: std::collections::HashMap<String, u64>,
|
||||
/// Per-agent systemd `CPUQuota=` value (e.g. `"200%"`). Written into
|
||||
/// the `container@h-<name>.service.d/` drop-in on every spawn/rebuild.
|
||||
pub agent_cpu_quota: String,
|
||||
|
|
@ -100,9 +86,8 @@ pub struct Coordinator {
|
|||
/// estimate on the ST4TS tab. Set via `services.hyperhive.modelPrices`
|
||||
/// and passed to `hive-c0re serve --model-prices <json>`. Models not
|
||||
/// in the table fall back to the built-in estimate in `hive_stats`.
|
||||
/// hive-c0re-local (read only by the `/api/stats-hive` handler), so —
|
||||
/// unlike `context_window_tokens` — it is *not* part of `HiveEnv` and
|
||||
/// is never injected into containers.
|
||||
/// hive-c0re-local (read only by the `/api/stats-hive` handler), so it
|
||||
/// is *not* part of `HiveEnv` and is never injected into containers.
|
||||
pub model_prices: crate::hive_stats::PriceTable,
|
||||
agents: Mutex<HashMap<String, AgentSocket>>,
|
||||
/// Tombstone for transients that have JUST been cleared. The
|
||||
|
|
@ -224,8 +209,6 @@ pub struct HiveEnv {
|
|||
/// alive host-side by the module that resolved it.
|
||||
pub claude_code_path: Option<String>,
|
||||
pub dashboard_port: u16,
|
||||
pub operator_pronouns: String,
|
||||
pub context_window_tokens: std::collections::HashMap<String, u64>,
|
||||
/// Per-agent systemd `CPUQuota=` value (e.g. `"200%"`).
|
||||
pub agent_cpu_quota: String,
|
||||
/// Per-agent systemd `MemoryMax=` value (e.g. `"4G"`).
|
||||
|
|
@ -247,12 +230,6 @@ impl Default for HiveEnv {
|
|||
nixpkgs_flake: String::new(),
|
||||
claude_code_path: None,
|
||||
dashboard_port: 7000,
|
||||
operator_pronouns: "she/her".to_string(),
|
||||
context_window_tokens: std::collections::HashMap::from([
|
||||
("haiku".to_string(), 200_000),
|
||||
("sonnet".to_string(), 1_000_000),
|
||||
("opus".to_string(), 1_000_000),
|
||||
]),
|
||||
agent_cpu_quota: "200%".to_string(),
|
||||
agent_memory_max: "4G".to_string(),
|
||||
// Slightly below the kernel default of 100, so agent
|
||||
|
|
@ -317,9 +294,7 @@ mod serve_config_tests {
|
|||
assert_eq!(sc.env.hyperhive_flake, "/x");
|
||||
assert_eq!(sc.env.dashboard_port, 1234);
|
||||
// omitted → HiveEnv::default()
|
||||
assert_eq!(sc.env.operator_pronouns, "she/her");
|
||||
assert_eq!(sc.env.agent_cpu_quota, "200%");
|
||||
assert_eq!(sc.env.context_window_tokens.get("sonnet"), Some(&1_000_000));
|
||||
assert!(sc.model_prices.contains_key("opus"));
|
||||
}
|
||||
|
||||
|
|
@ -432,8 +407,6 @@ impl Coordinator {
|
|||
nixpkgs_flake,
|
||||
claude_code_path,
|
||||
dashboard_port,
|
||||
operator_pronouns,
|
||||
context_window_tokens,
|
||||
agent_cpu_quota,
|
||||
agent_memory_max,
|
||||
agent_cpu_weight,
|
||||
|
|
@ -473,8 +446,6 @@ impl Coordinator {
|
|||
nixpkgs_flake,
|
||||
claude_code_path,
|
||||
dashboard_port,
|
||||
operator_pronouns,
|
||||
context_window_tokens,
|
||||
agent_cpu_quota,
|
||||
agent_memory_max,
|
||||
agent_cpu_weight,
|
||||
|
|
@ -506,8 +477,6 @@ impl Coordinator {
|
|||
nixpkgs_flake: self.nixpkgs_flake.clone(),
|
||||
claude_code_path: self.claude_code_path.clone(),
|
||||
dashboard_port: self.dashboard_port,
|
||||
operator_pronouns: self.operator_pronouns.clone(),
|
||||
context_window_tokens: self.context_window_tokens.clone(),
|
||||
agent_cpu_quota: self.agent_cpu_quota.clone(),
|
||||
agent_memory_max: self.agent_memory_max.clone(),
|
||||
agent_cpu_weight: self.agent_cpu_weight,
|
||||
|
|
|
|||
Loading…
Reference in a new issue