open-standards/joule-code/joule-code-rs/crates/joule-moq-remote/Cargo.toml
Transaction Science 91271ef917 joule-moq-remote: a sealing key a session, sealed inputs opened before they are injected; TLS to the room service and the relay
The host makes an X25519 sealing key for each session and states it in its screen statement; the
gate decides every input by all nine rules of remote-desktop §5.3 (wai-rs's decide_opened),
opening a sealed input with the session's opening key, and the host injects what it seals. The
opening key stays in the session unless --opening-key writes it (mode 0600, never over a file)
for a verifier. The headless viewer seals its key, text and clipboard actions to the screen's
sealing key, keeps the records it receives, and follows another principal's events when told.

The agent reaches the room service over https:// and the relay over wss://: rustls with ring,
the system's roots and any certificate a PEM file names (--ca), every chain and name verified.
tls::front is a TLS front for a plain backend. Lock files gain tokio-rustls and the new edges
alone.

tests/tls.rs: the service and the relay through a TLS front, trusted by a PEM file; refused under
the system's roots alone, and for a certificate that names another host. tests/loopback.rs:
alice's typing sealed, injected as typed, absent from what bob receives; her text in the clear
refused input_unsealed; the session verified at the opened level.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 10:43:13 -04:00

55 lines
2.7 KiB
TOML

[package]
name = "joule-moq-remote"
version = "0.1.0"
description = "A host agent for WAI remote desktop rooms (wai.live.remote) over joule-moq-relay: it captures a screen, encodes it with the platform's encoder, publishes it as the room's screen track with its receipts, decides every input by the host's rules of the extension and injects what they accept, signing a screen statement and an outcome for every input."
edition = "2024"
rust-version = "1.97"
license = "Apache-2.0"
repository = "https://github.com/transaction-science/open-standards"
# A workspace of its own, with its own lock file, as joule-moq-room is: it builds on wai-rs
# (the room's records are WAI's), whose features would otherwise be unified into every crate of
# the joule-code workspace.
[workspace]
# The relay's wtransport, vendored with its WebTransport session close; the joule-code
# workspace patches it the same way (vendor/wtransport/VENDORED.md).
[patch.crates-io]
wtransport = { path = "../../vendor/wtransport" }
[lib]
path = "src/lib.rs"
[[bin]]
name = "wai-remote-host"
path = "src/main.rs"
[dependencies]
joule-moq = { path = "../joule-moq" }
joule-moq-relay = { path = "../joule-moq-relay" }
# The room's records (live-rooms, live-events) and the remote desktop extension's statements,
# rules and verifier: no codec chain.
wai = { path = "../../../../wai/wai-rs", default-features = false, features = ["remote_desktop"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "net", "io-util", "signal"] }
tracing = "0.1"
tracing-subscriber = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
ed25519-dalek = { version = "2", features = ["rand_core"] }
rand_core_06 = { package = "rand_core", version = "0.6", features = ["getrandom"] }
sha2 = "0.10"
hex = "0.4"
# TLS to the room service (https://) and the relay (wss://): rustls with ring, as the relay
# builds it, the operating system's roots, and the WebSocket client the relay's binding takes.
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] }
rustls-native-certs = "0.8"
tokio-tungstenite = "0.29"
# The platform adapters on Linux: dlopen for the X11 client library (so a host without it still
# builds and runs with the pattern source), and the input device's ioctls.
[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }