open-standards/wai/wai-studio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dcharlot f1258784d4
All checks were successful
joule-moq-web browser client / joule-moq-web · does this change touch it (push) Successful in 9s
wai cross-architecture byte-equality / does this change touch it (push) Successful in 14s
wai-app and Create / wai-app · does this change touch it (push) Successful in 27s
wai-audit collector and player integration / does this change touch it (push) Successful in 25s
WAI operation catalogue / does this change touch it (push) Successful in 14s
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (push) Successful in 33s
wai-fleet service / does this change touch it (push) Successful in 11s
wai-ops integer operators / does this change touch it (push) Successful in 9s
wai-key-proxy / does this change touch it (push) Successful in 11s
wai-ledger service / does this change touch it (push) Successful in 11s
wai-quantum command line / does this change touch it (push) Successful in 6s
wai-quantum docs, course and locales / does this change touch it (push) Successful in 5s
wai-quantum editors / does this change touch it (push) Successful in 8s
wai-quantum OpenQASM reader / does this change touch it (push) Successful in 6s
wai-quantum for JavaScript / does this change touch it (push) Successful in 9s
wai-quantum resource estimation / does this change touch it (push) Successful in 10s
wai-quantum pulse and dynamics / does this change touch it (push) Successful in 6s
wai-quantum other formats / does this change touch it (push) Successful in 10s
wai-quantum contract / does this change touch it (push) Successful in 12s
wai-quantum for Python / does this change touch it (push) Successful in 6s
wai-quantum extension points / does this change touch it (push) Successful in 7s
wai-quantum service / does this change touch it (push) Successful in 8s
wai-quantum error correction and mitigation / does this change touch it (push) Successful in 10s
wai-quantum studio and desktop / does this change touch it (push) Successful in 8s
wai-quantum verdicts and repairs / does this change touch it (push) Successful in 9s
wai-quantum variational and algorithm library / does this change touch it (push) Successful in 9s
wai-quantum views in agent hosts / does this change touch it (push) Successful in 6s
wai-sink-android native sink library / does this change touch it (push) Successful in 7s
wai-sink-swift native sink package / does this change touch it (push) Successful in 7s
wai-vector vector graphics / does this change touch it (push) Successful in 7s
WAI Studio / does this change touch it (push) Successful in 8s
wai cross-architecture byte-equality / macos-arm64 (reference) (push) Successful in 39s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (push) Successful in 39s
wai cross-architecture byte-equality / linux-x86_64 (push) Successful in 48s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 1m24s
wai-ops integer operators / independent checker (Python) (push) Successful in 15s
wai-ops integer operators / wasm32 under Node (push) Successful in 34s
wai-ops integer operators / wasm32-wasip2 (wasmtime) (push) Successful in 1m8s
wai-ops integer operators / linux-x86_64 (push) Successful in 1m13s
wai-quantum service / service energy · linux packages (push) Successful in 1m26s
wai-fleet service / service · macos (push) Successful in 1m18s
wai-audit collector and player integration / collector · linux (push) Successful in 1m31s
wai-ops integer operators / macos-arm64 (push) Successful in 49s
joule-code conformance gate / Build + round-trip C1-C4 vectors (push) Successful in 2m37s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (push) Successful in 8s
wai-fleet service / service · linux (push) Successful in 2m5s
wai-quantum command line / command line · macos (push) Successful in 1m32s
wai-quantum editors / editors · macos (push) Successful in 59s
joule-code conformance gate / joule-moq-relay, every target (push) Successful in 3m35s
wai-ledger service / service · macos (push) Successful in 1m17s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (push) Successful in 43s
wai cross-architecture byte-equality / linux-aarch64 (push) Successful in 38s
wai-ledger service / service · linux (push) Successful in 1m56s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 2m19s
wai-quantum pulse and dynamics / the same bits · macos (push) Successful in 56s
wai-quantum docs, course and locales / the course and the command line's languages · linux (push) Successful in 2m18s
wai-quantum OpenQASM reader / reader and corpus · linux (push) Successful in 2m6s
wai-ops integer operators / linux-aarch64 (push) Successful in 1m20s
wai-quantum editors / editors · linux (push) Successful in 2m23s
wai-quantum contract / the policy is linked, and the deprecations page reads (push) Successful in 5s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (push) Successful in 1m38s
wai-key-proxy / proxy · linux (push) Successful in 3m26s
wai-quantum command line / command line · linux (push) Successful in 3m26s
wai-quantum resource estimation / estimation and calibration · linux, release (push) Successful in 1m39s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 4m34s
wai-quantum for Python / python · macos (push) Successful in 2m8s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (push) Successful in 55s
wai-quantum extension points / the registry and the example · linux-arm64 (push) Successful in 2m28s
joule-code conformance gate / joule-moq-ingest, every target (push) Successful in 6m16s
wai-quantum for JavaScript / javascript · linux (push) Successful in 2m26s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (push) Successful in 2m34s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (push) Successful in 1m35s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 2m14s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (push) Successful in 51s
wai-vector vector graphics / linux-aarch64 (push) Successful in 2m25s
wai-quantum service / service · macos (push) Successful in 4m8s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 3m26s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (push) Successful in 7m38s
wai-quantum for Python / python · linux (push) Successful in 2m42s
wai-quantum extension points / the registry and the example · linux (push) Successful in 2m20s
wai-quantum other formats / readers, writers and the set · linux (push) Successful in 3m40s
wai-quantum contract / API compatibility · linux (push) Successful in 4m15s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (push) Successful in 3m38s
wai-vector vector graphics / macos-arm64 (push) Successful in 2m3s
wai-quantum studio and desktop / desktop app · windows (push) Successful in 9m6s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (push) Successful in 2m37s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (push) Successful in 1m28s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 4m56s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (push) Successful in 1m51s
wai-quantum contract / schemas and the committed tool lists · linux (push) Successful in 6m17s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (push) Successful in 2m19s
wai-quantum studio and desktop / studio · browser (push) Successful in 3m39s
wai-quantum service / service · linux (push) Successful in 5m1s
wai-vector vector graphics / wasm32-wasip2 (wasmtime) (push) Successful in 59s
wai-vector vector graphics / wasm32 under Node (push) Successful in 52s
wai-vector vector graphics / fuzz, peak allocation, comparison count (push) Successful in 20s
wai-vector vector graphics / linux-x86_64 (push) Successful in 2m17s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 1m0s
wai-quantum views in agent hosts / views · the page and its engine (push) Successful in 3m6s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 4m52s
wai-quantum views in agent hosts / views · a scripted host (push) Successful in 3m22s
wai-vector vector graphics / independent checker (Python) (push) Successful in 3m10s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (push) Successful in 16m37s
wai-vector vector graphics / wasm32 in three browser engines (push) Successful in 5m45s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 10m21s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (push) Successful in 17m42s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 16m3s
WAI Studio / Studio in WebKit · linux (push) Successful in 23m28s
Merge pull request 'Wave A: public-name check, WebAssembly determinism in CI, decode-path reporting, and pin by default' (#616) from wai/wave-a into main
2026-11-04 20:25:41 -05:00
..
core Cargo: no minimum-supported-version floor, because the policy is latest stable 2026-11-03 17:42:20 -05:00
e2e WAI Studio: Escape closes the palette from its search field too; the e2e holds it 2026-10-28 02:08:48 -04:00
scripts WAI Studio on the web: one front end, its core in WebAssembly, served by wai dev at /_wai/ 2026-10-27 15:22:51 -04:00
src wai conform sink: the native sink through the conformance runner, and wai verify --conformant admits a result only for a run that passed 2026-11-04 12:29:01 -05:00
test WAI Studio e2e: a publisher in the room before a viewer joins; WebKit on Linux in Playwright's image; scrollable blocks focusable; Quantum Studio's critique a named group 2026-10-27 16:17:25 -04:00
.gitignore WAI Studio on the web: one front end, its core in WebAssembly, served by wai dev at /_wai/ 2026-10-27 15:22:51 -04:00
build.mjs WAI Studio on the web: one front end, its core in WebAssembly, served by wai dev at /_wai/ 2026-10-27 15:22:51 -04:00
package-lock.json WAI Studio on the web: one front end, its core in WebAssembly, served by wai dev at /_wai/ 2026-10-27 15:22:51 -04:00
package.json WAI Studio on the web: one front end, its core in WebAssembly, served by wai dev at /_wai/ 2026-10-27 15:22:51 -04:00
README.md WAI Studio: README, CI (wai-studio.yml, cli_studio in the quickstart step), one target directory per workspace in e2e/run.sh 2026-10-27 15:38:01 -04:00

WAI Studio on the web

One front end for the WAI toolchain, with two hosts, chosen when the page starts:

  • hosted: the core in WebAssembly, in the tab. What you open is read there; nothing is uploaded, and there is no account. The WAI site serves it at /studio/.
  • local: served by wai dev at /_wai/, on the origin it already serves on loopback. The core in WebAssembly does what a tab can, and the local wai does the rest, reached through the dev stack's own routes (/_wai/api/).

The panels

Panel Hosted Through wai dev
Inspect A .wai file opened or dropped: its envelope, its capabilities with the registry's row for each, its provenance (what it refines, what it was derived from, its security), SPEC §4's verdict at this sink, and its receipts when its receipt index is opened with it The same, and the local wai's own report, with every codec it holds
Verify and receipts Receipt indexes with their group receipts, and the object where it is opened too, checked in the tab by the verifier wai verify runs, each line with its reason code The same
Encode, decode, package The mandatory floor: decode PNG, FLAC and zstd, encode PNG and zstd; any registered capability's bytes wrapped in an envelope The same, and every codec the local wai holds
Rooms A room's signed description from its service; join it as a viewer, through the room client; a pre-call test of a relay (its WebSocket binding and its SETUP, timed) The same, against the dev room
Run — The stack wai dev started: its routes, each service and the loopback address it listens on, the room service's health, the relay's session records, each log as it grows
Quantum Quantum Studio (../quantum-studio/), unchanged, as a panel The same

The command palette (the top bar's button, or Ctrl+K, ⌘K on macOS) lists every operation of the WAI catalogue by its id. One this host runs opens the panel that runs it; one it does not says where it runs: its command line, its wai mcp tool, the service route it is served at, or Studio served by wai dev.

The actions come from the catalogue

The operation catalogue (../catalogue/ops.json, written by wai ops export from the table in wai-rs) names every operation. scripts/actions.mjs generates Studio's action table from it (src/actions.generated.js), and src/bindings.js binds by hand the operations Studio runs: their panel, and how each host runs them (in the tab, through the local wai, or by the page). node scripts/actions.mjs --check fails on drift:

  • an action with no operation: a binding, a call of the core, or an operation wai dev runs for the page, whose id the catalogue does not hold;
  • an operation placed client or both (it runs on this side of a service, as a page does) with no action;
  • a mismatched name: the generated table not what the catalogue generates; a binding run in the tab whose call is not the core's noun_verb; a call of the core or an operation of wai dev bound to another host than the one that runs it; an operation id in the source that names no operation.

Until the catalogue is on main, ops.pending.json is a copy of its export from the pull request that brings it, and the check reads that; once ../catalogue/ops.json exists, the check reads it and fails until the copy is deleted.

The core

core/ (wai-studio-core) is the wai crate the command line is built from, with the floor and the receipt checks, bound for WebAssembly. Each call is an operation of the catalogue, named noun_verb, and answers the JSON envelope (envelope/1) the command line prints with --json: envelope_inspect, envelope_wrap, envelope_unwrap, media_decode, media_encode, receipt_verify, registry_list. It reads no file and opens no connection.

cd core && cargo build --locked --release --target wasm32-unknown-unknown
wasm-bindgen --target web --out-dir pkg --out-name wai_studio_core \
  "$CARGO_TARGET_DIR/wasm32-unknown-unknown/release/wai_studio_core.wasm"

The floor's zstd is C: its archive for wasm32 needs an archiver that indexes WebAssembly objects, llvm-ar (AR_wasm32_unknown_unknown); macOS's own ar writes one the linker finds no symbol in. e2e/run.sh picks llvm-ar where there is one.

Building and hosting

npm ci && node build.mjs --core-pkg core/pkg [--quantum ../quantum-studio/dist]

writes dist/: wai-studio.js, wai-studio-worker.js, wai-studio.css, tokens.css, the core in pkg/, Quantum Studio in quantum/ when given, index.html (the local host's page) and hosted.html (the hosted host standing alone), and BUILD.json with each file's SHA-256.

wai dev serves dist/ at /_wai/ when it finds it: $WAI_STUDIO, or share/wai/studio beside the wai binary. A host page mounts Studio on an element:

<div id="wai-studio" data-host="hosted" data-embedded
     data-core-pkg="/studio/pkg/wai_studio_core.js" data-worker="/studio/wai-studio-worker.js"
     data-service="/room-api" data-room-page="/studio/room.html"
     data-moq-transport="/room/room-transport.js" data-moq-session="/room/room-session.js"
     data-moq-pkg="/room/moq/pkg/wai_room_moq.js"
     data-quantum-script="/quantum-studio/studio.js" data-quantum-css="/quantum-studio/studio.css"
     data-quantum-pkg="/quantum-ide/pkg/wai_quantum_ide.js" data-quantum-worker="/quantum-studio/worker.js"
     data-quantum-service="/quantum-jobs"></div>
<script type="module" src="/studio/wai-studio.js"></script>

The dev stack's routes for Studio

wai dev opens no listener for Studio. Under /_wai/api/ on its origin:

Route What it answers
GET /_wai/api/state the stack: origin, room service, relay, each service with its process and loopback address, its logs, what the local wai decodes and encodes
GET /_wai/api/log?name=&from= a log (relay, room, conversation) from a byte on
GET /_wai/api/sessions the relay's session records
POST /_wai/api/op/<id> envelope.inspect, media.decode or media.encode, run by the local wai on the bytes sent, in a directory of its own, removed after

Every request must name the origin as its host (127.0.0.1:<port>, localhost:<port> or [::1]:<port>), carry X-WAI-Studio: 1, and state no other origin or fetch site.

Testing it

bash e2e/run.sh [--browsers chromium,webkit,firefox]

builds wai, the relay, the room service, the core, the room client's packages, the quantum engine, Quantum Studio and Studio; runs the unit tests (test/: the generation and every rule of the drift check, the palette's "where it runs", the local core's calls, and each panel's calls on the core) and the drift check; then e2e/studio.e2e.mjs against a wai dev stack, on both hosts, in Chromium, WebKit and Firefox:

  • each panel the host shows loads, and Run on the local host alone;
  • Inspect and Verify on vectors of ../http-conformance/, their results those its cases expect;
  • the floor decoded and encoded in the tab, a payload wrapped and inspected;
  • the dev room joined as a viewer, and the pre-call test against its relay;
  • the stack in Run, every service on loopback;
  • Quantum Studio mounted;
  • the palette: every operation, one this host runs opening its panel, one it does not saying where it runs;
  • axe finds no WCAG 2.2 A or AA violation on any panel; no console error, no failed request; nothing scrolls sideways at a phone's width.

core/ has its own tests (cargo test --locked), and wai-rs/tests/cli_studio.rs runs wai dev against a stand-in relay and room service: /_wai/ answers, every socket the stack listens on is on loopback, and the local wai runs an operation for the page.

Apache-2.0.