Reference hosts and runnable examples for the OpenWOP protocol.
Carved out of the openwop/openwop spec corpus (full history preserved) so the
protocol repo stays a lean spec + conformance contract.
examples/hosts/— reference host implementations of the OpenWOP REST + SSE surface:v2-reference/— the v2 reference host: implemented fromspec/v2/core/*.mdand the generated v2 documents, never adapted from a v1 host. Certified on the 2.x suite (see itsconformance.md). Start here for a new integration — v2 is the current protocol major.sqlite/— durable single-file v2 host (better-sqlite3): claim-based dispatch, crash resume, and a walkthrough of porting a v1 host; serves the core run floorpython/— v2 host in Python 3.11, stdlib only (http.server,sqlite3): the same core floor, sharing no code with the TypeScript hosts, so cross-language portability can be measured at v2 (docs/portability-v2.md)postgres/— production-shaped v2 host (pg, or PGlite in process): several host processes share one Postgres, claims are session-level advisory locks, and every write lands in a hash-chained, Ed25519-checkpointed audit log (GET /audit/verify)wasm-sandbox/— RFC 0035 sandboxed-execution reference
examples/(top level) — runnable workflow samples (tiny-workflow,approval-workflow,streaming-client,mcp-tool,branch-fork, …). Samples arefetch-only, speak v2, and default to the v2 reference host; seeexamples/README.mdfor what each one needs.
v2 only. v1 reached end of support on 2026-10-04 (RFC 0234), and no v1 host remains under
hosts/:sqliteandpostgreshave been ported to v2,pythonrewritten for it, and the v1-onlyin-memoryhost removed. Build new hosts againsthosts/v2-reference/and measure them with@openwop/openwop-conformanceat--target-major 2.
# boot the v2 reference host
( cd examples/hosts/v2-reference && npm install --legacy-peer-deps && npm start ) # serves http://127.0.0.1:3838
# in another shell, run v2 samples against it
( cd examples/tiny-workflow && npm test ) # discovery → POST /runs → poll to completed
( cd examples/approval-workflow && npm test ) # suspend at an approval gate, resolve it, complete
( cd examples/streaming-client && npm test ) # the run's event stream over SSEEvery sample sends OpenWOP-Version: 2, uses the unversioned v2 paths (/runs, /runs/{runId}/events),
and projects tenant-bound run ids into one path segment (tenant~2Fopaque).
These hosts are measured against the published @openwop/openwop-conformance suite (2.x is
latest; it targets major 1 or 2 per host). v2-reference/ carries its own certification
bundle and is a row in the corpus INTEROP-MATRIX.md
v2 table. The host-conformance regression gates (SQLite soak + Postgres) live in the
openwop/openwop repo (co-located with the suite),
which checks this repo out to obtain the host source. examples.yml here runs the samples
against the v2 reference host, typechecks and tests the SQLite and Postgres hosts (the Postgres job
against a real Postgres service, two host processes on one database), tests the Python host, and validates that workflow-definition pack references resolve
against the live registry at packs.openwop.dev.
docs/portability-v2.md runs the same workflows against the TypeScript v2
reference host and the Python host and compares terminal state and the RunEvent type sequence
(scripts/portability-v2.mjs re-runs it).
Apache-2.0 (see LICENSE).