Skip to main content
Every contract run produces one or more BoundaryLogEvents — one per attempt that fails on a retry, plus a terminal event when the run finishes. This is the shape that hits the network (or your custom write sink).

Shape

BoundaryLogEvent is a tagged union on ok. Successful runs always emit a single terminal event; failed runs emit one event per non-terminal attempt plus a terminal event when retries are exhausted.

Field-level reference

Identity

Run metadata (always sent)

Failure attribution (always sent on FailedEvent)

There is no capture.errors flag — these are structural fields that always appear when ok: false. Without them a failure event is just a flag. If a failure message would leak data, fix it at the source — rewrite the rule’s failure message, or use beforeSend to scrub issues before the event leaves.

Repair context

Gated by capture.repairs (default on). Present only on FailedEvent with final: false — the repair message is the prompt that’s about to be sent before the next attempt.

Raw data (opt-in)

Treat these as sensitive. See Capture policy and Redaction.

SDK attribution

Stamped automatically. Used for attribution on the dashboard and for debugging version-specific behavior. runtime is "node/<version>" on Node, "browser" where navigator.userAgent exists, or omitted on edge runtimes.

Lifecycle

Each hop runs before the event is visible on the next. If capture strips a field, it can’t be added back by beforeSend for that event.

Example success event

Example failure event (terminal)

See also

Capture policy

Three optional buckets, plus the always-on fields

createBoundaryLogger

Full options reference