Skip to main content

Module lifecycle

Module lifecycle 

Source

Structs§

LifecycleMetricsSnapshot
Process-local, redacted lifecycle counters. These deliberately use fixed fields rather than provider, command, process, or thread labels so callers can monitor lifecycle health without exposing execution details.
TurnLifecycleRecord
A versioned, durable lifecycle transition for an individual turn.
TurnLifecycleSnapshot
Latest known lifecycle state for each turn plus tolerant-read diagnostics.

Enums§

TurnCleanupOwnership
What the runtime can prove about work owned by a turn at the time of a lifecycle transition. This deliberately avoids provider names, command lines, PIDs, and other sensitive execution details.
TurnCleanupState
Whether provider cleanup was requested or observed for a turn transition.
TurnLifecycleReason
Why a lifecycle transition occurred, when the runtime can determine one.
TurnLifecycleState
Durable state for a turn’s runtime lifecycle.

Constants§

TURN_LIFECYCLE_CORRUPTION_STATE_KEY
TURN_LIFECYCLE_EXTENSION_ID
TURN_LIFECYCLE_SCHEMA_VERSION
TURN_LIFECYCLE_STATE_KEY

Functions§

latest_turn_lifecycle_records
Selects the latest valid lifecycle record for each turn and counts corrupt lifecycle extension records without making the enclosing thread unreadable.
turn_lifecycle_corruption_marker
Creates an in-memory diagnostic record when a thread store skipped malformed extension-state lines. The marker intentionally carries only a count; raw bytes may contain prompts, command output, or secrets.
turn_lifecycle_snapshot