Expand description
Intent value model: origin, builders, accessors, and fail-closed validation.
An Intent is a SIM value: a kind-tagged Expr::Map that also carries an
origin (operator plus logical tick) and the fields its kind requires. This
module builds and inspects Intents over Expr (no parallel data model),
validates them structurally into a IntentError, and resolves the targets
an Intent references against a caller-supplied predicate so an Intent naming
an unknown target produces a diagnostic rather than a partial mutation.
Structs§
- Intent
Error - A structured Intent validation diagnostic: where the problem is and what it is.
- Origin
- The origin of an Intent: which operator issued it and at what logical tick.
Enums§
- Operator
- Who issued an Intent. Recorded on every Intent for audit; both a human (through the browser) and an agent (through the runner) are peers on the bus.
Functions§
- field
- Read a top-level Intent field by name.
- intent
- Build an Intent value: a
kind-tagged map carryingoriginthenfields. - intent_
kind_ of - If
expris akind-tagged map, return the kind symbol. - origin
- Parse the origin of an Intent, if present and well-formed.
- referenced_
targets - The list of
(field-label, target-expr)references an Intent carries, by kind. Port references (from/to) contribute their innernode. - resolve_
targets - Resolve every target an Intent references against
is_known, returning a diagnostic for the first unknown target. A failed resolution means the editor must not produce an operation: nothing mutates. - validate_
intent - Validate that
expris a structurally well-formed Intent, failing closed with anIntentErrorotherwise.