op: lookup
Load another entity’s state into a scratch path for validation or branching.
Allowed phases
| Phase | Status |
|---|---|
preflight | ✓ allowed |
core | ✗ forbidden |
side_effects | ✗ forbidden |
Syntax
- op: lookup
into: /_tmp/show
stream: show_stream
entity_id_expr: intent.show_id
fields:
- title
- available_tickets
- op: if
expr: "_tmp.show == null"
then:
- op: reject
code: SHOW_NOT_FOUNDParameters
| Field | Required | Description |
|---|---|---|
into | yes | Scratch path — use /_tmp/... |
stream | yes | Target stream name (e.g. show_stream) |
entity_id_expr | yes | Expression for entity ID |
fields | no | Optional subset of fields to load |
Behavior
- Preflight for loading entities before
reject. - Inline alternative in expressions:
LOOKUP_FIELD('show_stream', intent.show_id, 'title').
Related operations
See also
- Operations index — all ops by phase
- actions — rule structure and phases
- Intents: Rules — narrative examples