op: lookup

Load another entity’s state into a scratch path for validation or branching.

Allowed phases

PhaseStatus
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_FOUND

Parameters

FieldRequiredDescription
intoyesScratch path — use /_tmp/...
streamyesTarget stream name (e.g. show_stream)
entity_id_expryesExpression for entity ID
fieldsnoOptional subset of fields to load

Behavior

  • Preflight for loading entities before reject.
  • Inline alternative in expressions: LOOKUP_FIELD('show_stream', intent.show_id, 'title').

reject · if

See also