dokime-api
Responsibility: the contracts every Dokime party compiles. A plugin, the application, and every shell agree on the shapes defined here and nowhere else. Nothing in this crate runs: there is no execution context, no transport, no registration, and no authoring macro.
Public Surface
Section titled “Public Surface”| Module | Owns |
|---|---|
core | Identifiers, values, scopes, metadata, time |
definition | What a suite says exists: suites, templates, cases, parameters, criteria |
document | What an authored document declares: sections, cards, layout, plots |
domains | Product contribution contracts that are not execution wire |
expressions | Parameter and dataset expressions over product values |
prompts | Operator questions as they are declared and answered |
records | What a durably narrated product fact promises |
settings | Admitted plugin settings and the catalog that declares them |
telemetry | What a sampled channel promises and what one sample carries |
artifacts | Evidence files as the host records and addresses them |
Core identifiers and value types keep their module path, so
dokime_api::domains::InstalledArtifact mirrors dokime::domains::InstalledArtifact.
Dependencies
Section titled “Dependencies”Serde, serde_json for reading a secret reference back out of a Value, and
regex for the pattern rule a prompt field may declare. No Harmos, no Tokio, no
Prost, and no feature flags: a contract that needed any of them would be
behaviour wearing a data shape.
The wasm32 Gate
Section titled “The wasm32 Gate”mise run check:wasm compiles this crate for wasm32-unknown-unknown, and
mise run check runs it. The crate carries zero cfg(target_arch) gates, so
the check is a real claim rather than a compiled-away one: a host-only
dependency or a stray platform assumption fails there rather than in a plugin
author’s build.
Boundary
Section titled “Boundary”The behaviour that reads these contracts is the dokime SDK kit:
the execution context and its grants, the sidecar transport, the authoring
macros, registration, document resolution, the record and telemetry evaluators,
and the prompt authoring trait. The kit re-exports every module above under its
original path, so plugin code names dokime::… and never this crate directly.
The application’s folded state lives in dokime-app, one rung
further up.