@unotest/protocol
v0.42.0
Published
Cross-runner protocol for the @unotest ecosystem: shared TypeScript types, path constants, the IRunnerAdapter contract that lets @unotest/viewer drive @unotest/web, @unotest/mobile (and future runners) through the same surface. Pure types + pure functions
Readme
@unotest/protocol
Shared protocol types and contracts for the @unotest ecosystem.
Consumed by:
@unotest/web— web (Playwright) test runner@unotest/mobile— mobile test runner@unotest/viewer— localhost viewer (HTTP + WS)
This package contains only:
- TypeScript types (stripped at compile time)
- String constants (filesystem paths, kind literals)
- Pure functions (validators, ID builders) that are browser-safe
No runtime dependencies. No node:fs, no Playwright, no Zod. Anything
that needs an environment lives in the consumer package — not here.
Key contracts
IRunnerAdapter— the surface@unotest/viewerconsumes to start a run without knowing which runner package it's driving. Implementations live in@unotest/weband@unotest/mobile.RunRequest— discriminated union of the run shapes the viewer can ask an adapter to execute.RunArtifact/RunMeta/RunManifest— the on-disk format written by runners underunotest/.runs/<runId>/, read by the viewer.WsMessage— the typed websocket event protocol from viewer-server to viewer-web.QueueTicket/IRunQueue— the run queue's on-disk ticket format, its directory layout (unotest/.queue<target>[.<env>]/) and the engine contract every producer depends on. The implementation isFsRunQueuein@unotest/core(it needs a filesystem; this package does not).
