Files
hyprland-headless-stream-pl…/pyproject.toml
T
HermenixandClaude Opus 5 5f94833a76 Merge origin/main into feat/keyboard-input: keep both the stream and the
keyboard sides

origin/main brought the session live-stream feature (stage 1): the
`hhstream_live` router, its phrase generator and wordlist, the
`sessions.stream.*` module options with their loopback-vs-openFirewall
assertion and the one firewall port, the `vm-stream-firewall` check, and
`tests/live/`. This branch adds keyboard input: the `key`/`type` ops, the
uploaded XKB keymap, `sessions.keyboard.{layout,model,variant,options}`
and the four `--xkb-*` flags on the driver unit, `vm-keyboard` and
`vm-keyboard-de`, and their docs.

The two features are independent, so every conflict wanted both sides.
Four files, resolved as follows.

checks/default.nix -- both the header list and the attribute set take all
three new checks: `vm-keyboard`, `vm-keyboard-de` (the same file with
`keyboardLayout = "de"`, because the layout reaches the keymap only
through the driver unit's argv) and `vm-stream-firewall`, which stays a
non-`sessionArgs` consumer with main's comment saying why. Neither side's
check list is reduced; the flake now exposes ten.

nix/package.nix -- one `pythonImportsCheck` list with both sides' entries:
`hhstream_pointer.keymap` and the vendored
`virtual_keyboard_unstable_v1` from here, `hhstream_live.server` from
main. The surrounding hunks were not in conflict, so the branch's
xkbcommon dependency and main's wordlist `postFixup` both survive, and
both ran in this merge's `checks.unit` build (`wordlist ok: 7772 words`).

nix/module.nix -- the sole conflict was textual: both sides open a new
sub-option block immediately after `sessions.pointer`. Both blocks are
kept, `keyboard` then `stream`, each with its own closing. Everything
else in the file merged cleanly, so `loopbackBinds`, the
openFirewall-on-loopback assertion and
`networking.firewall.allowedTCPPorts` are present alongside the driver
unit's `--xkb-layout`/`--xkb-model`/`--xkb-variant`/`--xkb-options`.

README.dev.md -- the `checks/` layout listing keeps both entries in the
file's existing order, `vm-keyboard.nix` then `vm-stream-firewall.nix`.

Verified: `nix flake check --no-build` evaluates every output green, and
`nix build .#checks.x86_64-linux.unit` passes -- 977 passed, 2 skipped,
0 failed, over both sides' suites. The VM checks were not run (they boot
a software-rendered compositor and must run one at a time).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjpHyir6hxyjdw2o1RwQmn
2026-10-11 02:57:55 +00:00

43 lines
2.0 KiB
TOML

[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "hhstream"
version = "0.1.0"
description = "Publish a headless Hyprland session's frames on a Unix socket"
requires-python = ">=3.11"
# The frame socket, the CLI and the broker are stdlib-only by policy
# (docs/CONTRACT-sessions.md §6, rule 3). The input driver is the one
# exception, twice over: talking Wayland means speaking the wire protocol, and
# turning a keysym name into the keycode-plus-modifier-mask that *this* layout
# needs means compiling an XKB keymap. Re-implementing either here would be a
# worse idea than a dependency, and `xkbcommon` is deliberately NOT optional --
# an optional one would let `tests/pointer/test_keymap.py` skip, and the
# unmappable-character path is exactly the one that must not rot.
dependencies = ["pywayland>=0.4", "xkbcommon>=1.0"]
[project.scripts]
hhstream-server = "hhstream.server:main"
hhstream-client = "hhstream.client:main"
# The one front door: frames/launch/record verbs plus the `session` namespace.
hhstream = "hhstream.cli:main"
# The session daemon. A separate process on purpose: it outlives every CLI call.
hhstreamd = "hhstreamd.__main__:main"
# The pointer driver. Its own process because a Wayland client needs its own
# connection, and a blocked one must not stall the broker.
hhstream-pointer = "hhstream_pointer.__main__:main"
# The session-stream web app (one port, a page per enabled session). Its own
# process beside the pointer driver: a LAN-facing HTTP parser must not be able
# to stall session lifecycle, and `grim` blocking must not reach the broker.
hhstream-live = "hhstream_live.__main__:main"
[tool.setuptools.packages.find]
where = ["src"]
# The phrase generator reads this at runtime, so it has to be *installed*, not
# just present in the checkout: a wheel (and the Nix build) that dropped it
# would make every `enable` fail with an empty wordlist.
[tool.setuptools.package-data]
hhstream_live = ["wordlist.txt"]