Expand description
The mapping language the store adapters and the tool overrides share (RFC 0025 §4, RFC 0028 §4): render an argument object / URL / body from a template over named inputs, and extract a value from a result.
- JSON templates — a JSON text with
{name}placeholders: a placeholder inside quotes ("{key}") is substituted as JSON-escaped string content; a bare placeholder ("seq": {seq},"state": {envelope}) is substituted as the JSON serialization of the value; the result must parse as JSON. A template that is exactly one bare placeholder yields the value itself. - Text templates —
{name}substituted textually (URLs, header values). CEL:expressions — evaluated over the same inputs (featurecel; an error without the feature).- Extraction — a JSON pointer (
/result/structuredContent/state), a dotted path (result.structuredContent.state, numeric segments index arrays), orCEL:over the context.
No dependency: placeholders are {ident} or {{ident}} where ident is
[A-Za-z_][A-Za-z0-9_.]* (dotted paths reach into object inputs) — JSON
braces are followed by " / } / whitespace, never an identifier, so the
two never collide.
Structs§
- Mapping
Error - A rendering/extraction failure (a template that does not parse, an unknown placeholder, a CEL error).
Functions§
- extract
- Extract a value from
ctxby JSON pointer, dotted path, orCEL:.Nonewhen the path does not resolve (a CEL error isErr). - render_
json - Render a JSON template (or a
CEL:expression) into a value. - render_
text - Render a text template (
{name}substituted textually) or aCEL:expression (its result stringified). - store_
vars - Build the standard
Varsfor a store operation. - truthy
- Truthiness for
ok/conflictpredicates:true, a non-zero number, a non-empty string/array/object. - vars_
from - Convenience: an object →
Vars.
Type Aliases§
- Vars
- The named inputs a template renders over.