Docs / interfaces-v0.1

Game Composer interfaces — implemented surfaces and targets

Source: specs/interfaces-v0.1.md

Status: reconciled with the reviewed implementation. The manifest contract is game-compose.schema.json (apiVersion: gamecomposer.dev/v0.2); see docs/GAMECOMPOSER-SPEC.md. This file was previously a proposal labelled v0.1; it now distinguishes implemented surfaces (EVIDENCED, code-reviewed) from target / UNKNOWN surfaces.

No playability claim. No launch → input → display E2E pass record exists. Code-level review is not execution and is not evidence that any game is playable. Facts not established by a reviewed artifact are UNKNOWN.

1. CLI (implemented)

The installed executable is gamecompose, with game-compose as an installed alias (pyproject.toml scripts). Both dispatch to gamecomposer.cli:main. EVIDENCED (gamecomposer/cli.py, pyproject.toml).

gamecompose [--file MANIFEST] [--no-open] config
gamecompose [--file MANIFEST] up [SERVICE ...]
gamecompose [--file MANIFEST] ps|status|logs|stop|down [SERVICE ...]
Behavior Status
--file / -f selects the manifest; default gamecomposer.yml. EVIDENCED (argparse)
Actions: config, up, ps, status, logs, stop, down; optional service names select services. EVIDENCED
config prints normalized configuration as JSON and starts no process. EVIDENCED (gamecomposer/api.py)
up prints one line per service (`name: started running
ps / status print Kiri-observed state per service; logs prints labelled output and errors on a failed read; stop / down stop in reverse order and preserve saves/user data. EVIDENCED (code); exact state strings UNKNOWN
Exit 0 success; 1 operation/runtime failure (RuntimeError, OSError); 2 invalid input or validation (ValueError, including ManifestError). EVIDENCED (cli.py)
--json machine-readable flag; structured per-service result objects; stable diagnostic codes; plan revision / stale-revision rejection. Not implemented — target / UNKNOWN
Manifest discovery beyond --file (ancestor search, alternate filenames). UNKNOWN

Selection rules implemented: no service arguments selects all services; explicit names include transitive depends_on dependencies; a partial stop / down that would strand an active dependent is refused. EVIDENCED (gamecomposer/core.py order, gamecomposer/runtime.py _dependents_outside). Serialization of concurrent mutating commands is UNKNOWN (no lock found).

2. SDKs (implemented boundaries)

Python (gamecomposer/sdk.py) — EVIDENCED

Symbol Behavior Status
load_manifest(path) Load, schema-validate, normalize, and return the manifest without starting a process. EVIDENCED
run_project(path, action="config", services=()) Use the same validation and runtime path as the CLI/desktop (gamecomposer.api.execute). EVIDENCED
RuntimeAdapter protocol Declares name, capabilities() -> set[str], and invoke(manifest_path, action, services). EVIDENCED (declaration)
Capability negotiation via capabilities() Declared but not consulted by the reviewed Kiri adapter; no CLI/API surface reports capabilities. UNKNOWN / target

TypeScript (sdk/) — EVIDENCED boundary, UNKNOWN results

Symbol Behavior Status
parseConfig(source, options?) Parses YAML, requires a mapping root, rejects duplicate keys, freezes result; ConfigParseError carries a source name. Schema-agnostic — no field-level validation. EVIDENCED (sdk/src/config.ts)
GameComposerClient.up/down/status() Forward {operation, projectDirectory?, configPath?, signal?} to a generic LifecycleTransport.invoke<Result>; result shapes supplied by the adapter (Result = unknown). EVIDENCED (sdk/src/lifecycle.ts)
Concrete transport / adapter None bundled; no host API client implementation. UNKNOWN
Field-level validation (R7) Absent in TS; the Python loader validates against the shared JSON Schema. Owner of a TS-side validator is unidentified. UNKNOWN (R7 open)

Cancellation: the TS SDK forwards an optional AbortSignal; whether an adapter honours it and what partial state remains are UNKNOWN. Session identifiers are not present in the SDK request; correlation with a player descriptor is UNKNOWN (R3).

3. Desktop

Surface Behavior Status
Tk client (gamecomposer.desktop) In-process client over api.execute; choose a manifest, list services, run config / up / status / logs / stop / down, show output, open the loopback player URL after up. EVIDENCED (gamecomposer/desktop.py)
Electron shell (desktop/) Prototype; displays an unverified state and is not wired to the Python runtime. EVIDENCED as prototype; integration UNKNOWN
Project registration, browser sessions, authorization, host credentials Not implemented in reviewed code. UNKNOWN / target

4. Host API — target only (not implemented)

The following operations were proposed in the earlier draft. No HTTP host service exists in the reviewed code; the Tk client calls api.execute in-process. These routes are UNKNOWN and must not be treated as available.

Proposed operation Behavior (target) Status
GET /v1/projects List authorized local project IDs and display names. UNKNOWN
GET /v1/projects/{project}/services Read observed state of each service. UNKNOWN
POST /v1/projects/{project}/plan Return a plan and diagnostics without starting a game. UNKNOWN
POST /v1/projects/{project}/operations Submit a lifecycle action with selected service IDs; return an operation ID and serialize mutations. UNKNOWN
GET /v1/operations/{operation} Read progress or terminal results, including per-service failures. UNKNOWN
GET /v1/projects/{project}/services/{service}/logs Read service-labelled logs within the project's access scope. UNKNOWN

Plan-revision freshness, per-project authorization, loopback binding, authentication, and browser-origin checks are target requirements, not implemented behavior. UNKNOWN.

5. Browser play (R3)

A descriptor-driven browser player is not implemented. docs/PLAYER-UX.md §5.1 defines the launch descriptor the player would consume; no producer exists in the reviewed code. The implemented NES/SNES examples instead serve a loopback page inside the Kiri guest and open it in the operator's browser — browser-executed emulation, not remote video streaming and not a descriptor-driven player.

  • Manifest → launch descriptor transform and sessionId minting are unowned / UNKNOWN (review finding R3). This spec/schema does not own them; the authoritative descriptor field set is owned by the schema/player-UX owners, and the producer was to be supplied by a host/runtime owner with no implementation here. See docs/GAMECOMPOSER-SPEC.md §6.
  • Native streaming from a remote host (web-stream in the superseded v0.1 draft) is not represented in the v0.2 schema and is not implemented. UNKNOWN / out of scope.
  • Player states (docs/PLAYER-UX.md §5.2, eight states) and CLI/runtime status strings are two unreconciled vocabularies; which is authoritative and who owns the mapping are UNKNOWN (R3).

6. Diagnostics

Stable diagnostic codes (invalid manifests, unknown services, dependency cycles, missing assets, unsupported capabilities, runtime failures, required teardown) were proposed but are not implemented. The CLI surfaces exception text on stderr and an exit code; the TS SDK has no typed error taxonomy beyond ConfigParseError. Exact codes, fields, and UI display rules are UNKNOWN / target.

7. Findings carried into closeout

  • R7 (validator gap): the Python loader (gamecomposer/core.py) now performs field-level validation against specs/game-compose.schema.json via jsonschema; it was not executed in this session (dependency absent here), so runtime behavior is UNKNOWN at execution level. The TypeScript SDK remains schema-agnostic with no identified validator owner — R7 is partially closed.
  • R3 (manifest→descriptor ownership): transform, sessionId minting, and status-enum reconciliation remain unowned / UNKNOWN. Documented, not resolved.
  • R1 (no playability evidence): no E2E pass record; nothing in this file supports a playability claim.

Back to all docs