Runtime profile 0.2
Durable execution uses the same contracts.
Contracts define meaning. Interoperability connects live applications. The runtime adds admission, persistence, retries, recovery, and honest outcomes when effects cannot be known.
Four layers, one contract model
An application can consume a record type, publish an event, or provide an action without becoming a workflow engine. Each layer has one job.
1. Contracts define
Record, event, and action artifacts share one identity, SemVer, JSON Schema, digest, registry, and conflict model.
2. Applications connect
CloudEvents and action envelopes carry exact contract evidence. Source and provider declarations bind live implementations to artifacts. Events are multicast; actions resolve to one provider.
3. The runtime admits
A workflow names compatible contracts. Admission resolves and pins the exact event source, action provider, handler, versions, and digests that the run may use.
4. Durable execution recovers
Runs, attempts, leases, checkpoints, timers, cursors, and outcomes survive crashes. The authorization host remains the final boundary for every dispatch.
Readable requirements become exact evidence
Authors name behavior and a compatible version. The admitted plan records exact immutable bindings before any action runs.
type: runtime_workflow
id: canvas.zone.set-status
version: 1.0.0
name: Set status from canvas zone
enabled: true
triggers:
- id: drop-on-status-zone
event:
id: canvas.drop
version: ^1.0.0
steps:
- id: patch-task-status
action:
id: mdbase.record.patch
version: ^2.0.0
provider:
application: task-editor
input:
path:
$expr: event.data.record.path
patch:
status:
$expr: event.data.target.valueA matching schema or SemVer range never grants access. The runtime admits exact candidates, and the embedding host still authorizes the actual event delivery and action dispatch.
Standard runtime records
The mdbase.runtime.standard@0.2.0 pack supplies ordinary mdbase types, contracts, and JSON Schemas. Runtime state stays inspectable with the same collection tools as other records.
| Records | Purpose |
|---|---|
runtime_workflow, runtime_policy | Portable workflow intent, provider selection, and capability grants |
runtime_run, runtime_action_attempt | Run state, exact bindings, requests, attempts, and outcomes |
runtime_checkpoint, runtime_timer | Recovery position, leases, one-shot scheduling, and missed-run policy |
runtime_diagnostic, runtime_dead_letter | Portable failure evidence and work that needs operator attention |
Open the workflow JSON Schema ยท Inspect the complete standard pack
Profiles and implementations
| Profile | Covered behavior | Does not imply |
|---|---|---|
event_action_interop/0.1 | CloudEvents, declarations, validation, multicast, action resolution, and exact evidence | Persistence, retries, timers, or workflow recovery |
runtime/0.2 | Admission, deterministic execution, journals, attempts, leases, recovery, cancellation, and timers | Authorization or unrelated collection profiles |
watch | Collection change delivery and ordering | Portable event contracts or durable workflow behavior |
The TypeScript @callumalpass/mdbase-runtime package provides browser-safe record validation and admission. The Rust mdbase-runtime crate supplies durable in-memory, SQLite, and PostgreSQL execution.