Expand description
Shared media runtime types + small leaf helpers. Consumed by both mur-core
(VLC control, media tools) and mur-agent-runtime (WatchScheduler), which
cannot depend on mur-core — so the snapshot-selection and VLC-status-parsing
logic that both need lives here rather than being duplicated.
Structs§
- VlcRuntime
- Per-session VLC HTTP connection details. Generated once and persisted so repeated tool calls reach the same running VLC instance.
- VlcStatus
- Parsed subset of VLC’s
requests/status.xml. - Watch
Session - Persisted proactive-watch session state. Written by the MCP
watch_*tools (viamur-core) and read by the runtimeWatchScheduler.
Enums§
- Consent
- Whether the user has agreed to proactive interjections this session.
Functions§
- load_
runtime - Load the persisted VLC runtime (
vlc.json), orNoneif absent/unparseable. Used by the runtime supervisor to allowlist VLC’s HTTP port in the kernel sandbox, and anywhere else that needs the current VLC connection details. - load_
watch - Load the watch session, or a default (all-off) session if absent/unparseable.
- newest_
file - Return the most recently modified regular file in
dir, if any. - newest_
file_ excluding - Like
newest_file, but returnsNonewhen the newest file equalsexclude— the snapshot that already existed before a capture was requested. This requires a freshly captured frame rather than silently falling back to a stale snapshot from a previous session. - parse_
status_ xml - Parse the subset of VLC’s
status.xmlusing a proper XML reader. Missing fields default sensibly. - runtime_
dir - The shared runtime state directory (
~/.mur/runtime). Holdsvlc.json,watch.json, and the VLC snapshot dir — all owned by the runtime and lying outside any single agent’s home, so the sandbox must grant this directory (not the individual files) for co-watching to work under enforced confinement. - runtime_
path - Path to the persisted VLC runtime config.
- save_
watch - Persist the watch session atomically (temp + rename).
- watch_
path - Path to the persisted watch session.