Expand description
The --context-query declaration spelling (#92).
A trigger’s declared context is a saved query, and since 1.5.1 the
declaration may bind the query’s parameters from the FIRING ITEM using
the same JSON pointers --dedup-key already understands:
triage_ctx # parameterless (1.5.0 form)
triage_ctx($session = /session) # one binding
triage_ctx($session = /session, $from = /email/from)The whole spelling is stored verbatim in the Trigger grain’s
context_query field, so what a fired run gets to see stays on the
declaration — auditable and replicating — rather than in host config.
At fire time the evaluator resolves each pointer against the item’s
payload and runs the saved query with those bindings. Resolution is
fail-closed like --dedup-key’s unidentifiable path: an unresolvable
pointer, or a pointer landing on a non-scalar, refuses the firing
rather than running the query with a hole in it.
Structs§
- Context
Query Spec - A parsed
--context-queryspelling.
Functions§
- parse_
context_ query - Parse a
--context-queryspelling:nameorname($p = /ptr, $q = /ptr).