Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

emit from any rule mode

emit Name { value } publishes value to sink Name. Allowed in any rule body whose required sinks are in scope. In fn and query, emit fires once per fresh evaluation; cache hits do not re-emit. Sinks are observation channels and never affect the queryable extent.

Sinks

A sink is the typed publication channel emit targets:

sink-decl ::= attribute* 'pub'? 'sink' Ident ':' TypeExpr ';'
pub sink AuditLog: LeaseEvent;
pub sink HitlQueue: ReviewTask;
pub sink Notify:    Notification;

Delivery (log file, webhook, message queue, HITL ticket) is a runtime concern; the language guarantees only that emitted values match the sink’s declared type. An emit statement in a mutate body refuses with OE1318 (mutate) rather than silently dropping the emission.