Every per-agent harness option lived at the top-level `hyperhive.*` while the host tier has always been `services.hyperhive.*`. Move all 52 agent-tier option leaves (33 top-level names across 16 modules) to `services.hyperhive.agent.*`, repoint every read, and keep existing agent configs evaluating through one `mkRenamedOptionModule` per old leaf path in the new nix/agent-modules/renamed-options.nix. The shims are per leaf rather than per namespace: `user`, `mcp`, `otel`, `queue`, `docs`, `forge`, `frontend`, `github`, `gui`, `logs`, `matrix` and `cargo` are plain attrsets of declarations, not submodule-typed options, so a parent-path rename would not reach their children. Three read-only options (`frontend.mergedDist`, `queue.clientIdFile`, `queue.clientSecretFile`) deliberately get no shim — a rename contributes a definition, which a read-only option refuses; the exclusions are commented in place. Refs #4473
34 lines
1.2 KiB
Nix
34 lines
1.2 KiB
Nix
# Screen MCP — screenshot, keyboard, and mouse for GUI agents.
|
|
#
|
|
# Auto-activated when `services.hyperhive.agent.gui.enable = true`. Wires the
|
|
# `hive-screen-mcp` stdio bridge as `extraMcpServers.screen` so claude
|
|
# gets five tools: `screenshot`, `type_text`, `key_press`,
|
|
# `mouse_move`, and `mouse_click`.
|
|
#
|
|
# All tools operate in userspace without `/dev/uinput`:
|
|
# - `grim` takes screenshots via Wayland screencopy
|
|
# - `wtype` handles text + key combos via `zwp-virtual-keyboard-unstable-v1`
|
|
# - mouse tools speak RFB `PointerEvent` directly to the local neatvnc
|
|
# server (port `HIVE_GUI_VNC_PORT`) — the VNC backend's native input path
|
|
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
config = lib.mkIf config.services.hyperhive.agent.gui.enable {
|
|
# Register the screen MCP bridge so claude gets the screen tools.
|
|
services.hyperhive.agent.extraMcpServers.screen = {
|
|
command = "${config.services.hyperhive.agent.packages.hive-screen-mcp}/bin/hive-screen-mcp";
|
|
args = [ ];
|
|
};
|
|
|
|
# grim: Wayland screenshot; wtype: text + key input via virtual-keyboard
|
|
# protocol (compositor-mediated, no /dev/uinput required).
|
|
environment.systemPackages = [
|
|
pkgs.grim
|
|
pkgs.wtype
|
|
];
|
|
};
|
|
}
|