S2UI home · Raw Markdown · GitHub

S2UI/1 — Supervisor-to-UI

Status: public DRAFT, release 0.2.0 (23 Nov 2026). This document is an original specification draft, published at https://yakov.khalinsky.com/s2ui/ with its source in the public s2ui repository. Implementation status is stated honestly in §2: parts of S2UI/1 are running code (RunDigest v1 and the surface composer, in the reference supervisor; the command tools and the Beth layer above it, in the reference Beth service) and one part is still design only (the catalogue file).

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be read as in RFC 2119.


1. What S2UI is

S2UI (Supervisor-to-UI) is a profile of A2UI 1.0, not a new wire format and not a fork of A2UI. A2UI standardises how an agent describes a user interface. S2UI standardises one narrower thing: how a supervisor — a system that runs a team of agents on a task, in stages, in work units, under a verdict, sometimes waiting on a human — publishes the state of its runs so that a user interface can render them, and how that interface asks the supervisor to act.

An implementer who has never seen the reference implementation should be able to implement S2UI from this document and the schemas beside it. The reference implementation is private; this specification is written to stand without it.

S2UI is named in parallel with A2UI (Agent-to-UI): A2UI covers agent → screen; S2UI covers supervisor → screen.

1.1 Differentiation


2. The four parts, and their status

S2UI/1 bundles four versioned parts:

#PartSchemaStatus (23 Nov 2026)
1RunDigest v1schema/run-digest-v1.schema.jsonImplemented. Shipping in the reference implementation (its list_run_digests tool, and supervisor_status → structuredContent.digest), validated against real runs.
2Beth catalog v1schema/beth-catalog-v1-draft.schema.jsonDRAFT. Defined in prose in the reference implementation's decision record; no catalogue file ships yet. The reference composer uses Basic Catalog components only (Text, Card, Column, List).
3Command setschema/s2ui-command-v1-draft.schema.jsonImplemented; envelope DRAFT. The commands ship in the reference Beth layer as app-only MCP tools (plus model-visible start_run) over an audited command layer: per-run authorisation, a fresh-state check before acting, idempotency keys, an append-only audit log. The envelope schema remains draft.
4Surface lifecycle rulesschema/s2ui-surface-v1-draft.schema.json + §7–§8Implemented in the reference supervisor. Its state-reporting MCP tools return deterministically composed surfaces beside the digest. The surface examples in this package are real composer output (release 0.1.1; in 0.1.0 they were 0.9.1-style draft compositions — see the changelog).

Anything in this spec that describes part 2 describes the design contract, not running behaviour. Conforming implementations MUST NOT claim those parts are live in the reference implementation until they are. Part 4's composer is live in the reference supervisor; whether any given host renders its surfaces is host-dependent (see §8).


3. Principles

  1. Deterministic composition only. Surfaces are composed from RunDigest snapshots by code and templates. An LLM MUST NOT compose UI in the observability path.
  2. The supervisor is the source of truth. A UI layer (Beth or any other) is a view and a command proxy. Killing the UI layer MUST never orphan, stop or lose a run. Supervisors MUST be re-discoverable from their own registry, not from the UI's cache.
  3. A detailed drill-in stays outside S2UI. Every digest links to a per-run detailed view (links.watchUrl). S2UI surfaces summarise; they do not replace event feeds or logs.
  4. Actions are authorised by the supervisor, never by the envelope. S2UI standardises how a command is expressed. It does not grant permission. See §9.
  5. Honest liveness. A live surface MAY present itself as live. A snapshot surface MUST carry its updatedAt and offer refresh, and MUST NOT present itself as live.

4. RunDigest v1 (normative)

A RunDigest is a snapshot of one supervised run, folded from the run's record and events. It is not a delta.

4.1 Known v1 limits (recorded, not hidden)

From the reference implementation's own mapping notes:

4.2 Generic-core naming (applied in this package)

The schema in this package is the public core: field names are implementation-neutral, and implementation-specific data belongs in the optional top-level extensions object, keyed by profile name — never in new core fields. The naming pass that produced the core was applied before first publication, when renaming cost nothing; from publication on, the core follows §10: no in-place renames, a change is a new version beside the old one.

4.3 Mapping from the reference implementation's earlier naming

The reference implementation originally emitted an earlier, implementation-specific naming internally. On 23 Nov 2026 it adopted this public core (citing release 0.1.0 of this package): its RunDigest boundary now emits the public names, and its repository vendors this schema file itself. The table below records the mapping from the earlier internal naming — it is the transformation this package's digest examples were published under, and it is what a reader needs when comparing pre-adoption output from that implementation:

Public core (this package)Reference implementation's internal v1 (pre-adoption)
digestVersion: "1" (string)version: 1 (integer)
subjectrepo (a local working-directory path)
workUnitspackages
agents[].currentWorkUnitIdagents[].currentPackageId
workUnits.items[].ref (opaque locator)packages.items[].branch
attention[].workUnitIdattention[].packageId
state finalizingstate merging
state interruptedmapped to stopped (no such state)
required: the minimal core set (§4)all top-level fields required (several nullable)
links open object, watchUrl optionallinks.watchUrl required
extensions object— (not emitted)

Consumers should expect current reference-implementation output in public-core names; output produced before the adoption commit uses the right-hand names. Producers implementing S2UI from this spec MUST emit the public names.


5. The Beth catalog v1 (DRAFT)

A catalogue is an A2UI catalogue document: a stable catalogId, the component names surfaces may use, named surface templates, and an instructions field — Markdown that an agent SDK MAY inject into an LLM's system prompt. That field is the LLM installation mechanism; there is no code install for a host that only needs to understand the catalogue.

For v1:


6. Surfaces (DRAFT)

An S2UI surface payload is a list of A2UI 1.0 messages for one surface. The snapshot form — the form the reference composer emits today, and the form of this package's examples — is a single createSurface message (version "1.0") carrying the components and the full data model inline. Component text binds to the data model with {"@path": ...} references. Live surfaces MAY follow with updateComponents and updateDataModel messages, and deleteSurface when the surface's lifecycle ends (§7).


7. Surface lifecycle rules (DRAFT)


8. The surface inside MCP tools (the §3A embedding)

The S2UI surface ships inside MCP tool results, not beside them. Every MCP tool that reports run state also returns the S2UI surface for that state.

Supervisor tools (reference names):

Layer tools (reference names):

Host fallback: for hosts with MCP Apps but no native A2UI renderer, the same tools also carry an MCP App (ui://) resource bundling a renderer that consumes the identical S2UI payload. One payload, two render paths — never two payloads to keep in sync.


9. Commands (DRAFT)

The command set is: answer_attention, approve_run, stop_run, and check_run_state. The request envelope is defined by s2ui-command-v1-draft.schema.json.


10. Versioning


11. Conformance

An implementation is S2UI-conforming for a part when:

tools/validate in this package checks example and producer files against the schemas. Passing it is necessary, not sufficient, for conformance.


12. Non-goals


Provenance

Original prose written for this package, 23 Nov 2026, from the reference implementation's private decision record, its RunDigest v1 implementation and its surface composer. First published 23 Nov 2026 as release 0.1.0; release 0.1.1 the same day replaced the draft surface examples with real composer output in the A2UI 1.0 envelope form, 0.1.2 recorded the reference implementation's adoption of the public core (§4.3), and 0.1.3 removed references to that private implementation by name throughout the package. No text is adapted from A2UI's documents.