Concepts
- Package validation: standalone validation of a package before Runtime use.
- Provider initialization: initialize(context) prepares a loaded Provider.
- Readiness: BaseCapabilityProvider is ready after successful initialization.
- Health: health_check() reports Provider condition without side effects.
- Shutdown: shutdown() releases Provider resources and stops execution.
Lifecycle
The Runtime validates a package, loads the declared Python entrypoint, enables and initializes the Provider, then evaluates its health. execute is valid only when the base Provider is ready. A failed initialization does not retain its initialization context. Shutdown cancels background tasks created through create_background_task before invoking on_shutdown.
Execution lifecycle
The SDK does not expose a remote execution state machine. During one direct execution call, a Provider MAY report progress through the injected reporter and then returns a result or raises an error. Runtime persistence and external task state are Runtime concerns, not a Provider wire contract.
Runtime → Provider : execute(request, context)Provider → Provider : validate request and inputsProvider → Runtime : progress callback (zero or more)alt completedProvider → Runtime : resultelse failed or cancelledProvider → Runtime : CapabilityError
Cancellation and recovery
The Runtime supplies a cancellation token and may call the optional CancellableProvider.cancel. The Provider SHOULD stop safely and raise CancellationCapabilityError when cooperative cancellation is observed.
Recovery is optional. A Provider that implements RecoveryCapableProvider can answer probe_execution(execution_id, external_ref) with observed facts. It MUST use unknown or unavailable when it cannot establish a fact and MUST NOT replay a non-idempotent action merely because the Runtime restarted.

