hive-c0re: render the new agent option paths into generated agent flakes

meta.rs writes each agent's flake, and it still named the pre-move
`hyperhive.*` paths — so every agent rebuild would print a rename
deprecation warning about a line no human wrote and no operator could fix.
A warning nobody can act on trains everyone to ignore the ones that matter,
which is the whole value of the alias shims.

Repoints the FORWARDED_VAR_OPTIONS table and every other emitted option
assignment (otel.*, docs.source, claudeCodePath, github.enable, user.name,
claudeMemoryMaxBytes) to `services.hyperhive.agent.*`, with the test
expectations that pin the rendered text. The flake input named `hyperhive`
(`hyperhive.url`, `hyperhive.inputs.nixpkgs.follows`,
`hyperhive.nixosConfigurations.*`), hive-tier `services.hyperhive.*` paths,
and the `@hyperhive.local` git identity share the word and are untouched.

Also repoints the same option paths where they appear in comments, rustdoc
and runtime message strings across the other crates — a refusal message
naming `hyperhive.allowedRecipients` sends an operator to a path that will
stop existing. Prose under docs/ is deliberately not in this commit.

Refs #4473
This commit is contained in:
atlas 2026-09-17 20:19:30 +02:00
commit 6ea81aae65
30 changed files with 138 additions and 121 deletions

View file

@ -1,7 +1,7 @@
//! `hive-screen-mcp` — stdio MCP bridge for GUI agents.
//!
//! Provides screenshot, keyboard-input, and mouse tools for agents running a
//! Weston Wayland compositor (`hyperhive.gui.enable = true`). Each tool:
//! Weston Wayland compositor (`services.hyperhive.agent.gui.enable = true`). Each tool:
//!
//! - `screenshot` → `grim` (always available with gui enabled)
//! - `type_text` → `wtype` (Wayland virtual-keyboard protocol, no daemon)
@ -18,7 +18,7 @@
//!
//! `WAYLAND_DISPLAY` and `XDG_RUNTIME_DIR` are injected globally by the
//! `weston-vnc` module. `HIVE_GUI_VNC_PORT` is set by the harness service
//! when `hyperhive.gui.enable = true` (defaults to 5900 if absent).
//! when `services.hyperhive.agent.gui.enable = true` (defaults to 5900 if absent).
use anyhow::Result;
use rmcp::{
@ -203,7 +203,7 @@ impl ScreenMcp {
description = "Take a screenshot of the agent's Wayland display and save it as a PNG \
file under `/tmp/`. Returns the path to the saved file pass that path to the \
`Read` tool to view the image visually. Requires `grim` and a live \
`WAYLAND_DISPLAY` (provided automatically when `hyperhive.gui.enable = true`)."
`WAYLAND_DISPLAY` (provided automatically when `services.hyperhive.agent.gui.enable = true`)."
)]
async fn screenshot(&self) -> String {
let ms = std::time::SystemTime::now()
@ -222,7 +222,7 @@ impl ScreenMcp {
injection). Supports arbitrary Unicode. For special keys (Enter, Tab, Escape, \
function keys, arrow keys) or modifier combos, use `key_press` instead. \
Requires a live `WAYLAND_DISPLAY` (provided automatically when \
`hyperhive.gui.enable = true`)."
`services.hyperhive.agent.gui.enable = true`)."
)]
async fn type_text(&self, Parameters(args): Parameters<TypeTextArgs>) -> String {
cmd_result(run_cmd("wtype", &[&args.text]).await)
@ -236,7 +236,7 @@ impl ScreenMcp {
with `+`-separated parts where all but the last are modifiers (`ctrl+c`, \
`ctrl+shift+t`, `super+l`, `alt+F4`). Modifier names: `ctrl`, `shift`, `alt`, \
`super`. Requires a live `WAYLAND_DISPLAY` (provided automatically when \
`hyperhive.gui.enable = true`)."
`services.hyperhive.agent.gui.enable = true`)."
)]
async fn key_press(&self, Parameters(args): Parameters<KeyPressArgs>) -> String {
// Parse "mod1+mod2+key" into: -M mod1 -M mod2 -k key -m mod2 -m mod1