open-standards/wai/wai-app/templates/README.md
Transaction Science 608cd843e9 wai-app: Create's crate, a library with no binary, whose export wai create writes
wai/wai-ui becomes wai/wai-app, the library `wai_app`, with no binary and no `cli`
feature: `wai`, built with its feature `app`, is its command line and its MCP
server. Its served files are named wai-app-* (the WebAssembly package wai_app),
the recordings wai-app-*.json.

- export.rs gives the files of a starter project for a program and the facts its
  project file holds (title, summary, `wai dev`'s mode for the app's room, a watch
  room's file, a show's audience); `wai create --from app.oui` writes them, the
  project file and the licence. The export no longer writes app.json, room.toml,
  relay.toml, package.json, check.mjs or serve.mjs: wai.json names the room, `wai
  dev` runs it and `wai app check` checks the project. Its README and AGENTS.md
  say so, and the README its licence.
- runtime.rs reads a Create runtime by its listing (create/wai-app-runtime.json),
  checking each file's SHA-256.
- bridge.rs keeps the bridge on 127.0.0.1 a coding agent streams a program into
  the page through, with a stream helper; the stdio server, its tools and the
  binary's test go (`wai mcp --toolset app` serves them).
- The page's Export hands over app.oui, the program in its canonical form, and the
  command that makes it a project; the ZIP writer and the page's export in
  WebAssembly go. The page names `wai mcp --toolset app` for the coding agent.
- joule-ui/docs/create.md §4 and §5: the export as `wai create --from app.oui`, and
  the agent's tools app_guide, app_check, app_stream and app_export.

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

1.4 KiB

{{TITLE}}

A WAI app made with Create: {{SUMMARY}}

It is an ordinary WAI project, made by wai create --from app.oui. app.oui is the app, one widget a line. The WAI widgets that render it, and the room client under them, are in vendor/. wai.json names the room that wai dev runs for it.

Run it

wai app check   # the app, the room wai.json names for it, and the runtime under vendor/
wai dev         # the relay, the room service and this page on http://127.0.0.1:8080/

{{WATCH}}

What you see

{{WHAT}} The page's receipts show every action you take there, sealed into a log the page signs and checks.

Change it

Edit app.oui (the widgets and their signatures are in AGENTS.md), then run wai app check. It refuses a line the registry does not accept, naming the line and the reason. A change to the app's room (its kind, a show's audience, a watch room's file) goes into wai.json too, and wai app check says when the two disagree.

Development and production

Everything wai dev starts listens on 127.0.0.1 alone, and its keys are made in .wai/, which is never committed. In production, the room service runs with keys of its own, kept outside the repository, behind a front that serves this page with TLS and passes /room-api/ to the room service and /moq to the relay on the same origin. No model key or other secret is part of this project.

Licence

Apache-2.0: see LICENSE.