Codegen & portable fixtures
Generate TypeScript contracts from an app package and move canonical observation worlds between clean evaluators.
Tarski can generate client contracts from the same admitted app package it evaluates, and
can move a fixture’s observation world without serializing derived state. Both surfaces
are available from tarski 0.5.9-preview.8.
TypeScript code generation
tarski codegen typescript --output generated/tarski-contracts.ts
The deterministic artifact covers:
- JSON schemas explicitly bound through
x-tarski-observation-kindorx-tarski-observation-kinds; - declared-query parameter and result-head types;
- entity records and generated entity query names;
- observation and generated client-operation names.
Its header pins the app, evaluator, package, query-catalog, client-contract, source, and artifact digests. Regenerating identical source produces identical bytes. Commit the file and make regeneration plus a clean diff a CI check; a changed contract can no longer silently drift from application types.
An observation kind with no bound schema remains intentionally opaque and is diagnosed in the generation report. Tarski does not infer a domain type from examples or a mapper.
Portable fixture worlds
tarski fixture export fixtures/demo.jsonl --output demo-world.jsonl
tarski fixture import demo-world.jsonl --output imported-world.jsonl
tarski fixture compare fixtures/demo.jsonl imported-world.jsonl \
--output demo-world-comparison.json
An export contains canonical, redacted observations only. It retains actor, session, tenant, correlation, and idempotency metadata needed to replay admission and provenance. It rejects derived facts, intents, effects, and provenance edges: those are evaluator outputs and must be recomputed.
fixture import validates and canonicalizes the observation stream; it does not install a
precomputed worldview. fixture compare replays both inputs in clean isolated worlds and
compares their derived evidence, so a demo seed and its application source can prove they
represent the same contract.