hyperhive/nix/agent-modules/packages.nix
iris 0b3268feae feat(#2305): hive-screen-mcp — screenshot + input MCP for GUI agents
New crate hive-screen-mcp: a stdio MCP bridge activated automatically
when an agent has hyperhive.gui.enable = true. Provides five tools:

- screenshot   — grim → saves PNG, returns path for Read tool
- type_text    — wtype → Unicode text input (no daemon)
- key_press    — ydotool key → combos like ctrl+c, super+l
- mouse_move   — ydotool mousemove --absolute
- mouse_click  — ydotool click, optionally with prior move

New nix/agent-modules/screen.nix: wires the MCP bridge into
extraMcpServers.screen; adds grim + wtype to systemPackages. Adds
hyperhive.gui.screenInput option (default false) which enables the
ydotoold daemon + ydotool for mouse/keyboard injection via /dev/uinput.

screenshot and type_text work without screenInput. key_press,
mouse_move, and mouse_click return a ydotool error until ydotoold is
running and /dev/uinput is accessible in the container.
2026-07-20 20:55:27 +02:00

22 lines
984 B
Nix

# The hyperhive-built packages the harness modules consume, threaded
# in explicitly as an option — no overlay. The flake's
# `nixosModules.{agent-base,ruth}` set this to the flake's own package
# outputs via `lib.mkDefault`, so a per-agent override of an
# individual key still wins.
{ lib, ... }:
{
options.hyperhive.packages = lib.mkOption {
type = lib.types.attrsOf lib.types.package;
internal = true;
description = ''
hyperhive package outputs consumed by the harness modules: the
per-binary daemon/CLI packages (`hive-agent`, `hive-agent-mcp`,
`hive-agent-wake`, `hive-bash-daemon`, `hive-bash-mcp`,
`hive-forge`, `hive-matrix-daemon`, `hive-matrix-mcp`,
`hive-metric`, `hive-screen-mcp`) plus the `assets`, `frontend` and
`reference-docs` trees. Wired by the flake's agent-base/ruth
nixosModules to `hyperhive.packages.<system>.*`; override an
individual key per-agent to swap in a patched binary.
'';
};
}