Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ PRs target `main`, where breaking API changes are allowed.
Wire changes stay backwards compatible with *published* drafts/versions; an unpublished `-wip` version changes freely.
moq.pro rolls out with relays on the newest and previous release side by side, so those two versions must interoperate as relays. A temporary migration for that is fine when it is clearly marked and easy to delete at the next version migration.
Our libraries prefer moq-lite, so moq-transport compatibility only matters against third-party implementations.
Ask before planning or building work that a large live-media platform would not use, such as mesh networking, robotics, AI agents, P2P, or TCP tunnels: it belongs to Kixel (kixel-ai/kixel.ai), which builds on moq rather than waiting on it.

Build output may live outside the checkout and gets wiped, so scratch never goes in `target/`.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ moq-archive = { version = "0.0.11", path = "rs/moq-archive" }
moq-audio = { version = "0.1.10", path = "rs/moq-audio", default-features = false }
moq-auth = { version = "0.2.1", path = "rs/moq-auth" }
moq-congestion = { version = "0.1.0", path = "rs/moq-congestion" }
# default-features off: moq-auth takes only the endpoint key and its text codec.
# default-features off: dependents opt into only the pieces they use, such as `cpu`.
moq-crypto = { version = "0.0.11", path = "rs/moq-crypto", default-features = false }
moq-hls = { version = "0.5.11", path = "rs/moq-hls", default-features = false }
moq-json = { version = "0.5.8", path = "rs/moq-json" }
Expand Down
1 change: 0 additions & 1 deletion doc/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export default defineConfig({
{ text: "vs RTMP/SRT", link: "/concept/use-case/contribution" },
{ text: "vs WebRTC", link: "/concept/use-case/conferencing" },
{ text: "For AI", link: "/concept/use-case/ai" },
{ text: "For teleoperation", link: "/concept/use-case/teleoperation" },
],
},
],
Expand Down
3 changes: 1 addition & 2 deletions doc/bin/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ What it demonstrates:

Code: [`rs/moq-boy`](https://github.com/moq-dev/moq/tree/main/rs/moq-boy) (emulator
and publisher) and [`demo/boy`](https://github.com/moq-dev/moq/tree/main/demo/boy)
(the `<moq-boy>` element and page). The same
shape covers teleoperation: swap the emulator for a robot.
(the `<moq-boy>` element and page).

## CARLA

Expand Down
42 changes: 1 addition & 41 deletions doc/bin/relay/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ and each field it omits takes the server-wide value. Its patterns replace the
shared ones, so a rule with empty lists revokes. A certificate no rule names
gets `--mtls-*`. The server watches the file: an edit takes effect at each
session's next re-check, and one that fails to load keeps the last valid
config and logs an error. Listener and mesh settings apply on restart.
config and logs an error. Listener settings apply on restart.

```toml
# moq auth serve /etc/moq/auth.toml
Expand Down Expand Up @@ -449,46 +449,6 @@ from its URL, `--auth-url https://relay:<secret>@auth.example.com/` (percent-enc
reserved characters), through the TLS proxy in front of the server. `--listen-secret`
also guards a loopback listener. See `moq auth serve --help` for the rest.

### Mesh enrollment

`--mesh-url URL` also makes the server a mesh coordinator: a device holding an
Ed25519 endpoint key enrolls and receives the relay URLs to dial and a JWT that
publishes `mesh/<id>/**` and subscribes `mesh/**`, where `<id>` is the key in
z-base-32 (52 characters, the form pkarr and iroh's DNS discovery use). It is
verified like any other token, so the verifying keys (`--key`, `--key-dir`,
or `--key-set`) must include `--mesh-key`'s public half.

```bash
moq auth serve --key-dir /etc/moq/keys \
--mesh-url https://mesh.example.com --mesh-listen 127.0.0.1:4441 \
--mesh-key /etc/moq/mesh.jwk --mesh-state /var/lib/moq/mesh.json \
--mesh-relay https://relay.example.com
moq auth mesh create-key --tag robot --reusable --expires 7d
moq auth mesh revoke <endpoint id>
```

Every request proves the endpoint key by signing a fresh, single-use
challenge bound to `--mesh-url`, so no token is issued for a key the caller
does not hold. A device joins with an enrollment key, with no human in the
loop (single-use unless `--reusable`; revoked or expired keys enroll
nothing). It refreshes its token
two thirds of the way through `--mesh-token-ttl` (default 1h) by proving
the key again, so a revoked device is cut off within one token lifetime. A
revoked device cannot enroll again. Each enrollment and refresh also returns
every member's unique, DNS-safe name, defaulting to the device's hostname.

The device-facing API on `--mesh-listen` is meant to be public behind a TLS
proxy, since devices refuse plain `http://` beyond loopback. A challenge holds
no state until a proof uses it, so unauthenticated requests cannot crowd out a
device's; the proxy should still rate-limit each client. The owner's
commands go to `--listen` (`moq auth mesh --url`, `unix:///path` for a
socket), which every relay holding `--listen-secret` could reach, so `--mesh-url`
refuses `--listen-public`. With `--listen-secret` set, the owner presents it
too, as the URL's password: `moq auth mesh --url http://owner:SECRET@127.0.0.1:4440`. A hosted coordinator implements
the same JSON contract, documented in
[`moq_auth::mesh`](https://docs.rs/moq-auth/latest/moq_auth/mesh/); it adds
no token claims.

### Migrating from the relay flags

The 0.14 relay's auth flags moved to `moq auth serve`, and the relay points
Expand Down
1 change: 0 additions & 1 deletion doc/concept/use-case/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ of scale come from.
| [Contribution](/concept/use-case/contribution) | RTMP, SRT | Pull-based delivery, optional on-demand encoding, and instance-based failover. |
| [Conferencing](/concept/use-case/conferencing) | WebRTC | Bidirectional on one session, browser control of the pipeline, no SDP or TURN. |
| [AI](/concept/use-case/ai) | WebRTC, WebSockets | Adjustable reliability, on-demand inference, media and prompts on one connection. |
| [Teleoperation](/concept/use-case/teleoperation) | VPN plus video and control flows | Fresh media, replaceable state, and ordered commands share one session. |
76 changes: 0 additions & 76 deletions doc/concept/use-case/teleoperation.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/lib/rs/moq-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ accept loop that decides in process.
- **Refusals.** `Refusal` carries a `refusal::Reason` (`Refused`, `Forbidden`, or `Expired`) and optional `root` and `tier`. An auth server returns it as JSON with HTTP 403; `Client` returns `Error::Refused(refusal)`. Legacy plain-text 401/403 bodies and unknown reason strings read as `Refused`. Set `root` only from a verified credential, never the dialed path. Embedded relay deciders pass the same shape in `auth::Error::Refused`.
- **Client.** `Client` drives a lease against an auth server over `https://`, `unix://`, or loopback `http://`. It revalidates on cadence and retries through an outage until the grant expires, revokes on a 401, 403, or invalid grant, and reports `end` with the session's byte totals.
- **Server** (feature `serve`). `serve::Server` is the reference auth server behind `moq auth serve`: JWTs from the query or the moq-transport SETUP token, certificate grants, anonymous rules, tiers, and session caps. `Server::router` mounts it in your own axum service.
- **Mesh enrollment.** `mesh` holds the [enrollment contract](/bin/relay/auth#mesh-enrollment): a device proves its Ed25519 endpoint key against a fresh challenge and receives relay URLs and a scoped token. `mesh::Client` (feature `client`) enrolls with an enrollment key and renews before expiry; `mesh::Coordinator` (feature `serve`) answers it.
- **Keys and claims.** Generate HMAC, RSA, ECDSA, or EdDSA keys as JWKs, sign `Claims` (`root`, `publish`, `subscribe`, their optional `Rate` caps, `exp`), and verify them. `Claims::authorize(path)` scopes verified claims to the path a client dialed, exactly as `moq auth serve` does. Roles hold path pattern unions directly.

```bash
Expand Down
6 changes: 1 addition & 5 deletions nix/Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Decided 2026-11-12 (maintainer, /quest-audit before the cut):
offset goes on the wire version after lite-07 (rejected for each: staying
in m2). The padding and JS rung disable quests are parked in m5.
- ✅ Joined m2, each a small break the cut would otherwise freeze: the mesh
[grant shape](/quest/m2/mesh-grant-shape.md) and
[key budget](/quest/m2/mesh-device-bounds.md), since `moq_auth::mesh`
publishes for the first time at this cut;
grant shape and key budget, since `moq_auth::mesh`
publishes for the first time at this cut (both dropped 2026-11-14, when
`moq_auth::mesh` left moq for Kixel);
auth key validation; the
RTMPS connect signature;
usage's derived settings; and two
API fences: [mesh enrollment](/quest/m2/api-mesh-enrollment.md) and
API fences: mesh enrollment (dropped with it) and
the capture selections. None
is on the routes chain, which stays the critical path.
- ✅ Under the path rule a route keeps one sticky down-only flag beside its
Expand Down
24 changes: 0 additions & 24 deletions quest/m2/api-mesh-enrollment.md

This file was deleted.

12 changes: 0 additions & 12 deletions quest/m2/mesh-device-bounds.md

This file was deleted.

43 changes: 0 additions & 43 deletions quest/m2/mesh-grant-shape.md

This file was deleted.

4 changes: 3 additions & 1 deletion quest/m3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ a new necessary API break brings that decision to the maintainer before
proceeding.

Decided 2026-11-03 (maintainer, Kixel's quest audit): byte streams
and the [mesh libraries](/quest/m3/mesh/README.md) rank first here, ahead
and the mesh libraries rank first here, ahead
of [release execution](/quest/m3/release/README.md). Kixel's daemon builds on
them from `main` through a git submodule, so it needs them merged, not
released. They stay out of m1 and m2 so the cut does not wait on them; each
starts as soon as its prerequisites (sockets, fastest-reader pacing, outbound
federation) land. Superseded 2026-11-12 (maintainer, /quest-audit): both moved
to [m1](/quest/m1/README.md), since the cut no longer waits on m1. The mesh
libraries came back 2026-11-13, below; byte streams moved to Kixel 2026-11-14.
The mesh libraries left moq for Kixel on 2026-11-14 (maintainer): moq keeps
what a large live-media platform would use.

Decided 2026-11-12 (maintainer, /quest-audit before the cut), from a read of
every quest against the code and the downstream quest trees:
Expand Down
2 changes: 1 addition & 1 deletion quest/m3/cache-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ stays loop-free under stale state, converges once demand and topology stop
changing, and sends no per-broadcast message for an idle broadcast.

Non-goals: steering clients to the relay that holds a broadcast; decisions
from measured load or RTT ([Link quality](/quest/m5/link-quality.md));
from measured load or RTT (link quality, planned downstream in Kixel);
browsers serving copies they receive; a relay on neither consumer's cheapest
route becoming a shared stop; one copy across a multi-hop sparse overlay
rather than among direct neighbors; and creating links, since routing
Expand Down
1 change: 0 additions & 1 deletion quest/m3/cluster-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,4 @@ setup after the capabilities land.

- [Routing guide](/quest/m3/routing-guide.md) - concept page and federation setup
- [Route wakes](/quest/m4/route-wakes.md) - local work follows affected fronts rather than the whole covered table
- [Link quality](/quest/m5/link-quality.md) - optional measured link cost, distinct from delivery-health failover
- [Cache-aware routing](/quest/m3/cache-routing/README.md) - per-broadcast warm routes ranked against these node routes
4 changes: 2 additions & 2 deletions quest/m3/cluster-routing/federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ session integration (landed in [moq-dev/moq#8023](https://github.com/moq-dev/moq
[route epic](/quest/m2/cluster-routes/README.md). Federation is
relay-to-relay, so browser route-key proofs, the Playwright pin they wait on,
and the mixed-version follow-up (mount takeover) gates the
lite-07 cut, not this. Its consumer, the [mesh node](/quest/m3/mesh/node.md),
is a Rust relay too. Acceptance still brings the js/net route layer for its
lite-07 cut, not this. Its consumer, Kixel's mesh relay node (downstream, in
kixel-ai/kixel.ai), is a Rust relay too. Acceptance still brings the js/net route layer for its
Rust/JS interop checks. Rejected: session integration alone, which drops the
proven contract the wire rule below relies on.

Expand Down
Loading