Skip to main content
@obversa/runtime compiles graph definitions and records graph decisions and node outcomes. A host can resume unfinished positions from that record.

Install

Node.js 22.12 or later is required.

Public entry points

From @obversa/runtime (packages/runtime/src/api.ts):
  • Graph definitions: compileGraph, dagGraphType, and convergence define dependency graphs and repeated reviews.
  • Graph runs: createGraphExecutor, resolveGraphPlan, and persistRunDefinition run and resume a stored graph.
  • In-process callbacks: createCallbackGate, createCallbackClient, replayCallbackClient, and directRouter manage replayable questions.
  • Stored callbacks: createStoredCallbackClient stores callback history in the run event stream.
  • Proof artifacts: writeProofArtifact stores one stable JSON proof packet and returns its content digest.
  • Accepted results: createAcceptedResultRecord, resolveAcceptedResult, and acceptedResultMatches bind a result to its reviewed inputs, proof, graph, workspace, and caller-supplied reviewer identity.
  • Approval: createApprovalCallbackGate, approvalSubjectDigest, and resolveApproval bind a stored decision to the exact subject bytes. The stored client writes the callback submission and approval together.
  • Job helpers: run, loop, pipeline, dag, and sequence are the older job API.
Subpaths:
  • Testing: @obversa/runtime/testing provides graph definition helpers and mocks.
  • Local storage: @obversa/runtime/storage/local provides createLocalRunStorage.

Runnable example

From an Obversa checkout, run pnpm example:pipeline. The source is examples/packages/pipeline.ts. It stores a three-stage pipeline and runs it through createGraphExecutor. See Built-in pipeline for the report that command prints.