Windows: a program asked is now made suspended, put in a job object of its own with kill-on-close, and only then let run. A hung program is stopped with everything it started, at any depth, by ending its job. What a program leaves running after it answers ends when the job closes, and so does everything if wai doctor itself ends. taskkill /T is kept only for when the system will not make or give a job: it follows parents as recorded when it runs, so it misses a descendant whose parent has already ended. On Windows a child inherits its parent's handles, wai doctor's own output among them, so a descendant left running would hold a caller's pipe open. The hang test now starts a grandchild under an image name of its own, sees it run, and asserts it is gone. Browsers: each one found is asked --version alone, through the same ask, with its timeout and its process-group or job stop. Each runs (naming its version), does not run, or gives no answer, and browser.studio and browser.conformance pass only on one that runs. Two kinds are not started, and say so: a WebKit browser, which has no --version and opens a window, and on Windows a windowed program (PE subsystem 2), since the browsers there ignore --version and open a window. The automation package's browsers are asked by their program, found by name in the newest complete revision of each engine. Found and unproven reads not checked; found and failing reads fail. Tests: fake browsers that answer, hang, exit 3, and cannot be started; the PE header reader; the automation package's layout. The quickstart README and the changelog entry say what is asked of a browser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
86 lines
5 KiB
Markdown
86 lines
5 KiB
Markdown
# WAI
|
|
|
|
The `wai` command line, and the reference software `wai dev` runs on your own machine. All
|
|
of it is open source under Apache-2.0, built from the open-standards repository
|
|
(`wai/quickstart/build.sh`).
|
|
|
|
| File | What it is |
|
|
|---|---|
|
|
| `bin/wai` | The command line: `hello`, `create`, `dev`, `verify`, `doctor`, and the envelope tools (`inspect`, `wrap`, `unwrap`, `encode`, `decode` for the mandatory floor, `capabilities`) |
|
|
| `bin/wai-relay` | The relay a room's media goes through: MOQT over QUIC, WebTransport and WebSocket |
|
|
| `bin/wai-room` | The room service: a room's keys, its grants, its clock |
|
|
| `bin/wai-ingest` | The ingest gateway: WHIP, SRT and RTMP into a room, each group signed at the first hop, and WHEP out |
|
|
| `bin/wai-remote-host` | A remote desktop room's host agent |
|
|
| `bin/wai-pack` | The packager: a title as WAI objects, HTTP playlists and a MoQ catalog |
|
|
| `bin/wai-quantum` | The quantum command line: OpenQASM programs run on this machine, the result signed |
|
|
| `share/wai/web/` | The room client a browser loads: its pages and their WebAssembly |
|
|
| `share/wai/studio/` | WAI Studio, which `wai dev` serves at `/_wai/` |
|
|
|
|
## Start
|
|
|
|
```sh
|
|
wai hello # WAI's four steps on a sample: name, dispatch, rebuild, receipt
|
|
wai create my-room --template video-room # a video room in one page
|
|
cd my-room
|
|
wai dev # the relay, the room service and your page, on 127.0.0.1:8080
|
|
wai verify ../wai-hello # the receipts hello wrote, checked offline
|
|
```
|
|
|
|
`wai create --list` names every template. `wai dev --help` gives its options. Nothing here
|
|
needs an account, and nothing is sent off your machine.
|
|
|
|
Keep `bin/` and `share/` side by side: `wai dev` finds the relay, the room service, the room
|
|
client and Studio beside itself. Homebrew and Scoop install `wai-quantum` as a package of its own,
|
|
which `wai` depends on.
|
|
|
|
## Check this machine
|
|
|
|
```sh
|
|
wai doctor # one check to a line; --json for the same as an envelope
|
|
```
|
|
|
|
says whether this machine can run all of this: this `wai` and what `wai` reaches at a prompt, the
|
|
relay and the room service and whether they are of this `wai`'s version, each port in the table
|
|
below, the browsers for Studio and for the browser harnesses, each asked its version and passed
|
|
only when one runs, and where `wai key` keeps keys and who else may reach them. A check that fails says what to do. One that could not be run reads "not
|
|
checked" with the reason, which is not a pass, and the last line says which of the three the run
|
|
came to: passed, failed, or passed with some not checked. It exits 1 when a check failed. It sends
|
|
nothing off this machine, writes nothing, reads no secret and raises no prompt, so on macOS whether
|
|
the login keychain is unlocked always reads not checked, and a browser that would open a window to
|
|
say its version (a WebKit browser, and on Windows any windowed program) is not started and says so.
|
|
|
|
## Ports
|
|
|
|
What each program listens on by default, on 127.0.0.1. `wai dev` serves everything on one
|
|
origin and runs its own relay and room service on free ports behind it; the other rows are each
|
|
daemon's own default, as its example configuration or its source sets it, for running it alone.
|
|
No two of them share a port, so any of them run side by side. A deployment sets its own.
|
|
|
|
| Port | Program | What | Set by |
|
|
|---|---|---|---|
|
|
| 8080 | `wai dev` | your page at `/`, the room service at `/room-api/`, the relay at `/moq`, Studio at `/_wai/` | `--port` |
|
|
| 4443/udp | `wai-relay` | MOQT over QUIC, and WebTransport | `quic_listen` |
|
|
| 4480 | `wai-relay` | MOQT over WebSocket | `websocket_listen` |
|
|
| 9682 | `wai-room` | the room service's HTTP API | `listen` |
|
|
| 8088 | `wai-ingest` | WHIP and WHEP | `[http] listen` |
|
|
| 1935 | `wai-ingest` | RTMP | `[rtmp] listen` |
|
|
| 1936 | `wai-ingest` | RTMPS, off until set | `[rtmp] tls_listen` |
|
|
| 5167 | `wai-ingest` | SCTE 104 automation, off until set | `[injector] listen` |
|
|
| 9000/udp | `wai-ingest` | SRT, off until set | `[contrib.srt] listen` |
|
|
| 9694 | `wai-audit` | the audit collector | `WAI_AUDIT_ADDR` |
|
|
| 8251 | `wai-ledger` | the receipt ledger | `WAI_LEDGER_ADDR` |
|
|
| 8252 | `wai-fleet` | the fleet service | `WAI_FLEET_ADDR` |
|
|
| 8241 | `wai-quantum-service` | the quantum job service | `WAI_QSVC_ADDR` |
|
|
| 9670 | `wai-world-relay` | the interactive worlds' relay | `WAI_RELAY_BIND` |
|
|
| 9690 | `wai_stitched_presentation serve` | the stitched presentation verifier | `--listen` |
|
|
| 8380 | `wai http origin` | an HTTP origin of WAI objects | `--port` |
|
|
|
|
A program that reaches another names that one's port: the room service's `relay_url` is the
|
|
relay's WebSocket (`ws://127.0.0.1:4480/moq`), and the ingest gateway's `[relay] addr` is the
|
|
relay's QUIC endpoint (`127.0.0.1:4443`). joule-moq-room's `tests/ports.rs` holds every row to
|
|
the program that serves it.
|
|
|
|
## More
|
|
|
|
- The standard and its documentation: https://wai.transaction.science/
|
|
- The source: https://git.transaction.science/Transaction-Science/open-standards
|