Skip to content

Studio internals

Studio is a Vue 3 + Vite app that reads two things:

  1. Static manifest.nwire/*.json produced by the scanner at build time.
  2. Live telemetry stream/_nwire/telemetry/* exposed by the running app.

It does not import any framework runtime. Anything Studio renders, you can also get over plain HTTP.

The scanner

@nwire/scan walks the app's modules and produces:

.nwire/
├── manifest.json       — top-level app shape
├── actions.json        — every defineAction with persona/journeyStep/slo
├── events.json         — every defineEvent with outcome/audience
├── actors.json         — every defineActor with schema/states/stuckThresholds
├── projections.json    — every defineProjection with sourceEvents
├── queries.json        — every defineQuery
├── workflows.json      — every defineWorkflow with states/timers
├── routes.json         — HTTP transport surface
├── modules.json        — module declarations + needs + provides
└── graph.json          — derived: cross-module dep graph

The scanner runs:

  • On nwire cache (one-shot).
  • Automatically through the Vite plugin during nwire dev.
  • In Studio's middleware on first request (so a fresh clone produces a manifest without prebuild).

The live endpoints

httpInterface({ inspect: true }) mounts under /_nwire/:

PathPurpose
/_nwire/manifestReturns the static manifest
/_nwire/telemetry/recent?limit=100Ring buffer of recent records
/_nwire/telemetry/streamSSE stream of live records
/_nwire/dispatchPOST a JSON envelope, the runtime dispatches it (Studio dispatch UI)

One ring buffer is shared per wire so multi-app dev-all doesn't fork the stream.

The runner

@nwire/runner powers the Studio Run page. The supervisor spawns the chosen topology as a child process, streams stdout/stderr, monitors health, and feeds telemetry into the same SSE channel.

The two-terminal workflow (one for the app, one for Studio) collapses to one Studio window.

Pages

  • Overview — counts (actions, events, actors, projections), version, last build.
  • Topology — Vue Flow graph of module dependencies.
  • Modules — per-module browser.
  • Actions / Events / Actors / Projections / Queries / Workflows / Resolvers — typed list + per-item drill-down.
  • Routes — HTTP surface.
  • Live — telemetry stream with filters.
  • EventStorm — three reading levels (events-only / process flow / detailed) with Play Trace replay.
  • Run — pick a topology, start, stream stdout.
  • Dispatch — form-driven dispatch of any action.

OSS vs Cloud

  • OSS (this repo) — static manifest + single-deploy live stream.
  • Cloud (future @nwire/studio-cloud) — history, multi-deploy, AI debug, team accounts.

See also

MIT licensed.