Projections
Built-in projections materialize views from streams or $all without changing the source event log. State lives under data/projections/<name>/.
Runtimes
Section titled “Runtimes”| Runtime | Program | Notes |
|---|---|---|
builtin |
count, count_by_type, sum_field, latest_by_key, group_count |
Fast fixed aggregations |
cel |
CEL expression over event, state, position, version |
JSON numbers are doubles; cast with double(...) / int(double(...)) |
starlark |
def reduce(event, state): ... |
Sandboxed; no FS/network |
JavaScript is not supported. WASM is not available in the current documented runtime set.
Lifecycle
Section titled “Lifecycle”./bin/chronacta projection create -name orders-count -runtime builtin -program count \ -source-stream orders-1 \ -filter 'event.event_type == "OrderCreated" || event.event_type == "OrderPaid"'./bin/chronacta projection rebuild -name orders-count./bin/chronacta projection result -name orders-count./bin/chronacta projection status -name orders-count./bin/chronacta projection verify-checkpoint -name orders-countOptional create flags: -event-types, -filter (CEL bool), -initial-state, -version.
Operational commands: enable, disable, resume, restore-checkpoint, migrate, detect-stalled, errors, dead-letters, delete.
Semantics
Section titled “Semantics”- Checkpoint advances only after successful processing (or intentional skip of non-matching source events)
- Stream-scoped projections ignore other streams but still scan
$allby global position - Prefer
rebuildafter create when historical events already exist - Failures retry then poison into dead letters; source log is unchanged
- Projection files are included in versioned backups
Postgres read models
Section titled “Postgres read models”For SQL/UI/BI, project events into Postgres with a YAML schema and chronacta sqlgen (DDL/DML). JSON projections above stay for ops. See postgres-projections.md.
See also CLI and the examples/projection-test binary.

