Skip to content

Runtime and scheduler event catalogue

Use the event family and consumer together when selecting a subscription. FlowEventsDispatcher delivers named runtime payloads, accepts typed facts from an external scheduler, and maps selected runtime notifications to ExecKernelEvent objects. FlowAnalyticsEvent (FAE) has a separate analytics contract.

Consumer Input Identity and time
A FlowEventsDispatcher listener The payload array for the subscribed event. The event name is the subscription key. Runtime operations add operation_id, runtime_event_id, event_sequence and an integer timestamp.
A capture started by startCapture() stopCapture(): array returns rows containing event, payload, flow_id, session_id and timestamp. The last three row fields are nullable. The nested payload remains the listener payload. Captures include alias deliveries.
A scheduler subscriber SchedulerEvent::toArray() plus dispatcher correlation fields. The worker supplies event_id and occurred_at. The dispatcher marks the payload event_source: scheduler and event_phase: external.
EventBridgeInterface::publish(ExecKernelEvent $event): void A typed object with type, data and correlation properties. The runtime mapper derives eventId from the runtime identity and bridge type.
AnalyticsEmitterInterface::emit(FlowAnalyticsEvent $event): void An analytics value object whose toArray() uses camelCase keys. sessionId, numeric flowId and timestamp belong to the FAE contract.

Download the envelope examples. The runtime payload and bridge object came from starting the same session; the scheduler and FAE examples were constructed through their respective public types. The JSON representation of the bridge lists its object properties and renders its enum as its string value.

The dispatcher exposes these methods; each callback receives one payload array:

on(string $event, callable $listener): void
onGraph(string $event, string $graphCode, callable $listener): void
onFlow(string $event, int $flowId, callable $listener): void
onSession(string $event, string $sessionId, callable $listener): void

onGraph uses the canonical graph_code; onFlow uses the numeric legacy identifier. Delivery visits global, graph, flow and session listeners in that order where their correlation is available, then monitors and the bridge. Alias delivery follows the canonical delivery. Registering or changing subscriptions during an operation is rejected.

Listener and bridge failures are isolated from the completed runtime result. onDeliveryFailure can observe the delivery channel, event and exception class. That isolation does not retry the delivery or persist it.

Within an operation, result notifications are retained until successful completion; a failed operation discards its result notifications and retains diagnostic observations. A deferred RuntimeEventBatch exposes publish(): bool and discard(): bool. The first action consumes it; subsequent actions return false. A result event reports a logical result. A durable store write and an external delivery require their own confirmation.

For integration procedure and publication after persistence, see Events and listeners.

These fields are added by an active runtime operation. A generic dispatch outside an operation does not acquire an operation identity merely by using a familiar event name.

Field Type Meaning
graph_code string Canonical graph identity.
graph_version string|null Revision associated with the operation.
flow_id int when available Legacy numeric graph identity.
session_id string|null Session correlation supplied to the operation.
timestamp int Unix time in seconds.
operation_id string Explicit nonempty operation ID or a generated 32-character hexadecimal ID.
operation_kind string Operation label, such as start or choose.
event_sequence int Sequence within the operation, beginning at 1.
runtime_event_id string SHA-256 identity derived from graph, session, operation and sequence.
event_phase result or diagnostic Whether the event asserts a logical result or reports observation during the operation.
canonical_event string Original event name, including when a listener receives its alias.

Payloads are copied as declarative data. A field named session contains the domain representation described in Session state and serialization contracts. It is not a store receipt.

The tables below list event-specific fields in addition to the operation fields. Node and edge IDs are integers, session is an array, and available_edges contains edge IDs. The runtime can evaluate conditions when preparing available choices; those condition observations can therefore occur outside a selected transition.

Canonical event Phase Emission and event-specific fields
engine.start Diagnostic Start operation entry; no additional fields.
engine.choose Diagnostic Choice operation entry; no additional fields.
engine.started Result Start completed: node.
runtime.session_started Result Initial payload: session, node, payload_type, available_edges, lang.
session.created Result Newly created domain state: session.
engine.transitioned Result Choice completed: edge, from_node, to_node, session.
runtime.node_visited Result New node payload after a choice: node, payload_type, session, available_edges.
session.serialized Result A domain-state serialization is available: session. It can occur at more than one runtime layer and does not confirm saving.
session.restored Result State was restored: session, payload_type.
runtime.session_resumed Result Resumed payload: session, node, payload_type, available_edges, lang.
terminal.reached, engine.terminal.reached Result A start or choice reached a terminal node: node, outputs, session.
runtime.session_finished Result A choice reached a terminal node: node, session. Resuming a terminal session does not emit this event; starting directly on a terminal node does not imply it either.
payload.build Diagnostic Payload construction: payload_type, duration_ms, node_id.
runtime.error_detected, runtime.fatal_error, engine.error Diagnostic Error-formatting paths: error and exception. Their presence depends on the path that formats the failure.
Canonical event Phase Emission and event-specific fields
navigation.start Diagnostic Transition begins: current_node, selected_edge.
navigation.edge.validated Diagnostic The selected edge has valid endpoints: edge, from_node, to_node.
navigation.conditions.start Diagnostic Selected-edge conditions begin: edge, conditions_total.
navigation.condition.pass Diagnostic Predicate accepted: node_id, edge, edge_id, rule, input, actual, result: true, reason: null, ek_code: null, duration_ms.
navigation.condition.fail Diagnostic Predicate rejected: session, node_id, edge, edge_id, rule, input, actual, result: false, reason, ek_code, context, duration_ms.
navigation.conditions.invalid Diagnostic Invalid temporal condition declaration: edge, ek_code, rule, reason.
navigation.cycle.check Diagnostic Cycle check: edge and the edge-history array history.
navigation.cycle.detected Diagnostic Cycle rejected: edge, history, ek_code.
navigation.next_node.resolved Result Destination resolved: edge, next_node.
navigation.session.updated Result Candidate state updated: session, edge, from_node, to_node, terminal.
navigation.end Result Navigation payload completed: payload_type, from_node, node, edge, latency_ms.

Condition input, actual, reason and context depend on the rule family. They are diagnostic values; the selected edge and its result remain separate fields.

Canonical event Phase Additional fields and meaning
runtime.temporal.rule_evaluated Diagnostic graph_version, node_id, edge_id, rule_index, rule, params, nullable window_id, allowed, reason, ek_code, evaluation_timezone, local_time, occurred_at, context_scope: candidate. Reports a predicate evaluation against candidate context.
runtime.session_expired Diagnostic ek_code: EK-TIME-002, reason, graph_code, graph_version, node_id, created_at, last_activity_at, session_age, session_ttl, idle_age, idle_ttl, hard_expiration, observed_at, occurred_at. Reports expiry observed by the runtime.

observed_at is an integer instant; occurred_at is a UTC timestamp string. local_time retains the evaluation timezone offset. A temporal predicate result is independent of a scheduler’s report that a cron trigger fired, a time window opened, or a worker observed session expiry.

The DSL loader also uses the dispatcher. It emits graph.load.start, graph.load.nodes.indexed, graph.load.edges.indexed, graph.load.metadata.ready and graph.load.complete, in that order, with the completed load summary: loader, nodes_count, edges_count, checksum, graph_code, graph_version and duration_ms. These stage names do not constitute separate timed spans around the individual indexing operations.

graph_checksum_mismatch supplies checksum, expected_checksum, loader and graph_code. graph_invalid supplies nullable flow_id, ek_code, reason, loader and the available graph_code and exception context. Loader correlation can include session_id and timestamp when the caller provides GraphLoadEventContext; no session operation is implied.

Configured monitors produce derived EK:monitor.* diagnostics through their telemetry sink. runtime.operation.outcome is a private monitor observation and cannot be submitted through generic dispatch. See Metrics and monitoring for monitor outputs and configuration.

SchedulerEvent represents a fact supplied by the actual worker. The constructor requires:

new SchedulerEvent(
string $eventType,
string $eventId,
string $occurredAt,
string $schedulerInstanceId,
string $severity,
array $context = [],
);

eventType must be one of the 20 names below. Both identifiers must be nonempty strings with no surrounding whitespace. Severity is info, warning, error or critical; the general constructor has no severity default.

occurredAt requires an explicit instant of the form YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±HH:MM. Fractional seconds are not accepted here. The object normalizes it to UTC Z and exposes the corresponding integer timestamp.

The factory methods produce the following contexts. A ? suffix in this table means the factory permits a null value; the general constructor’s context validation is not a schema requiring every factory field.

Event suffix after SCHED. Factory Context fields Factory severity
LIFECYCLE.START lifecycleStart version: string info
LIFECYCLE.STOP lifecycleStop reason: string info
LIFECYCLE.RESTART lifecycleRestart reason: string info
LIFECYCLE.HEARTBEAT lifecycleHeartbeat uptime_seconds: int, queued_tasks: int info
TASK.ENQUEUED taskEnqueued task_id: string, session_id: ?string, flow_code: ?string, node_id: ?int, edge_id: ?int, run_at: string, task_type: string info
TASK.DISPATCHED taskDispatched task_id, session_id?, flow_code?, node_id?, edge_id?, with the types above info
TASK.COMPLETED taskCompleted task_id: string, duration_ms: int, result: string info
TASK.RETRIED taskRetried task_id: string, retry: int, max_retries: int, reason: string warning
TASK.TIMEOUT taskTimeout task_id: string, timeout_ms: int warning
TASK.DROPPED taskDropped task_id: string, reason: string warning
ERROR.TASK_FAILED errorTaskFailed task_id: string, session_id: ?string, error_code: string, message: string, retry: int, max_retries: int, optional metadata: array error
ERROR.INTERNAL errorInternal Optional metadata: array error
ERROR.BACKEND_UNAVAILABLE errorBackendUnavailable Optional metadata: array error
CRON.TRIGGER_FIRED cronTriggerFired trigger_id: string, scheduled_for: string, flow_code: ?string, session_id: ?string, metadata: array info
TIME.WINDOW_OPENED timeWindowOpened flow_code: ?string, node_id: ?int, edge_id: ?int, window_id: ?string, from: ?string, to: ?string, optional metadata: array info
TIME.WINDOW_CLOSED timeWindowClosed The same fields as TIME.WINDOW_OPENED info
TIME.SESSION_EXPIRED sessionExpired session_id: string, flow_code: string, expired_at: string, reason: string, optional metadata: array info
BACKPRESSURE.APPLIED backpressureApplied reason: string, queued_tasks: int, limit: int, action: string warning
BACKPRESSURE.RELEASED backpressureReleased queued_tasks: int info
THROTTLING.APPLIED throttlingApplied reason: string, limit: int warning

Context is copied as declarative data. Present non-null session, graph, task, window and trigger IDs must be nonempty strings without surrounding whitespace; node_id and edge_id must be actual integers. Simultaneous flow_code and graph_code must agree.

Cron facts require trigger_id and scheduled_for, and the scheduled instant cannot follow occurredAt. Time-window bounds use explicit instants and cannot be inverted. Expiry facts require session, graph identity, reason and expired_at no later than occurredAt.

The typed dispatcher entry point is:

dispatchSchedulerEvent(
SchedulerEvent $event,
?int $flowId = null,
?string $sessionId = null,
?int $timestamp = null,
): void

It rejects publication inside an active runtime operation. Explicit timestamp must equal the typed event’s timestamp; explicit session correlation must agree with the context. Generic dispatch rejects both SCHED.* names and their scheduler aliases.

SchedulerDispatcher also offers family-specific publishers: publishLifecycleEvent, publishTaskEvent, publishErrorEvent, publishTemporalEvent and publishBackpressureEvent. Their family validation and correlation arguments preserve the typed event boundary.

This is a complete example listener payload for a completion fact:

{
"event_type": "SCHED.TASK.COMPLETED",
"event_id": "sched-event-1",
"occurred_at": "2026-01-01T00:00:02Z",
"scheduler_instance_id": "worker-a",
"severity": "info",
"context": {
"task_id": "task-1",
"duration_ms": 15,
"result": "accepted"
},
"event_source": "scheduler",
"event_phase": "external",
"canonical_event": "SCHED.TASK.COMPLETED",
"session_id": "event-session",
"timestamp": 1767225602
}

SchedulerEvent::toArray() ends at context. The dispatcher adds the remaining fields, plus graph_code from context when available and flow_id when supplied. It does not generate operation_id, event_sequence or runtime_event_id for scheduler facts.

Canonical name Delivered alias
navigation.next_node.resolved navigator.transition
navigation.condition.pass condition.evaluate
navigation.condition.fail condition.evaluate
navigation.cycle.detected cyclebreaker.block
SCHED.LIFECYCLE.START scheduler_started
SCHED.LIFECYCLE.STOP scheduler_stopped
SCHED.CRON.TRIGGER_FIRED cron_trigger_fired
SCHED.TASK.ENQUEUED task_scheduled
SCHED.TASK.COMPLETED task_completed
SCHED.ERROR.TASK_FAILED task_failed

An alias preserves the payload, canonical_event and event identity. Subscribing to both names observes two deliveries of the same fact. Monitors and bridge mapping run for the canonical delivery only.

ExecKernelEvent has required properties type: ExecKernelEventType, data: array, timestamp: int and sessionId: string. Optional properties default to null: graphCode: ?string, flowId: ?int, operationId: ?string, eventId: ?string, phase: ?string and sequence: ?int.

The dispatcher only maps events when it has a session ID and timestamp. The following table describes that mapper; a bridge can also receive explicitly constructed events from other producers.

Runtime source Bridge type data
runtime.session_started, runtime.node_visited node.enter node_id: int, available_edges: int[]
runtime.session_resumed session.resumed node_id: int, available_edges: int[]
navigation.edge.validated edge.evaluated edge_id: int, source_node_id: int, target_node_id: int
navigation.condition.pass condition.check edge_id: int, rule: string, result: true
navigation.condition.fail condition.check and condition.failed The check has result: false; the failure has edge_id, rule and reason: ?string.
payload.build payload.built payload_type: ?string, duration_ms: ?float
navigation.session.updated edge.selected and session.updated Selection: edge_id: int. Update: history: int[] containing edge history, and context: array. A session array is required; selection also requires an integer edge ID.
terminal.reached terminal.reached node_id: int, outputs: array
runtime.error_detected, runtime.fatal_error engine.error exception: string, message: ?string, context: array

Mappings requiring node, edge or rule data are skipped when the source lacks the needed values. The mapper sets eventId to runtime_event_id + ":" + type.value when that runtime identity exists. A failed condition therefore creates two bridge identities with the same operation sequence. It copies graph, flow, operation, phase and sequence correlation; it does not convert scheduler facts to these bridge types.

FAE is the analytics contract exposed by FlowAnalyticsEvent and resources/schemas/execkernel_analytics_event_schema.json. The dispatcher mapper above does not automatically produce FAE records.

Field Type and requirement
sessionId Required nonempty UTF-8 string without control characters.
timestamp Required RFC 3339 instant; the PHP object takes DateTimeImmutable. This format can retain fractional seconds.
flowId Required integer, including when metadata carries a canonical graph code.
nodeId Required integer. For flow_abandon, it identifies the last known node.
eventType flow_start, node_view, edge_visible, edge_selected, flow_end or flow_abandon.
edgeId Required integer for edge_visible and edge_selected; absent or null for the other schema variants. The PHP object’s toArray() includes a null key for those variants.
context, metadata Optional JSON objects. The PHP representation emits empty objects when empty. Nested values must remain declarative.
metadata.graphCode, metadata.label Strings when present. graphCode supplements flowId.

The schema rejects additional top-level properties. Its camelCase keys and analytics names stay distinct from runtime and scheduler names:

{
"sessionId": "event-session",
"flowId": 7,
"eventType": "node_view",
"nodeId": 10,
"edgeId": null,
"context": {},
"metadata": {"graphCode": "event-contract"},
"timestamp": "2026-01-01T00:00:00+00:00"
}

Choosing an emitter or bridge establishes the consumer contract. Storage, retries and external delivery guarantees depend on the implementation connected to that consumer.