Files
hyprland-headless-stream-pl…/pyproject.toml
T
Hermenix d770bcd298 feat(live): one port, a router, and a phrase per session (stage 1)
The session-stream web app: a single HTTP listener (9988) that serves a page
per enabled session, keyed by a spoken phrase.

  src/hhstream_live/phrase.py     four EFF-large words + a 5-char base-36 tail
                                  (~77.5 bits); the phrase is the password
  src/hhstream_live/publisher.py  one capture thread + one frame slot per
                                  output, one slot/no queue, capture paused at
                                  zero viewers
  src/hhstream_live/server.py     the router: /, /<phrase>/, /stream.mjpg,
                                  /frame.jpg, /status.json; unknown phrase is
                                  an empty 404, rate-limited
  src/hhstream_live/pages.py      the built-in dark pages (no CDN, no build)
  src/hhstream_live/__main__.py   hhstream-live serve|phrase, standalone

The root page is a form, never a list: the phrase is known only by whoever
enabled the stream. Tests: tests/live (51), all green with the full suite
(958). Not yet wired to the broker -- that is stage 2.
2026-10-06 13:26:02 +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"]