Expand description
Provider-neutral lifecycle contracts for AI harnesses.
docs/specs/lifecycle-contract/body.md is the normative target. This module
implements the lifeloop.v0.2 slice of that contract: the wire enums,
lifecycle receipt, payload envelope, and the callback request/response
envelopes that clients implement.
Modules§
- adapters
- Built-in adapter registry and per-harness manifest constructors. Re-exports of canonical crate-root items.
- capability
- Capability vocabulary and negotiation entry point. Re-exports the canonical
router items so consumers can use
lifeloop::capability::*without taking a dependency on theroutermodule path. TheCapabilityKind/CapabilityRequestsplit is preserved deliberately —CapabilityKindis the identity used as a manifest lookup key, andCapabilityRequestadds policy (desired,level). - event
- Lifecycle event vocabulary. Re-exports of canonical crate-root items.
- host_
assets - Host integration asset rendering and merge behavior.
- manifest
- Adapter manifest types and registry. Re-exports of canonical crate-root items.
- protocol
- Hook-protocol payload rendering for harness adapters.
- router
- Lifecycle router skeleton: pre-dispatch validation and adapter resolution.
- telemetry
- Lifecycle telemetry readers.
Structs§
- Acceptable
Placement - Adapter
Manifest - Adapter manifest. Issue #6 lands the full shape; pre-issue-#6 drafts shipped a stub with only schema_version, adapter_id, adapter_version, display_name, roles, integration_modes, and lifecycle_events.
- Callback
Request - Callback
Response - Capability
Degradation - Dispatch
Envelope - Wire shape carrying a
CallbackRequestand the opaquePayloadEnvelopebodies a dispatch is delivering with. - Frame
Context - Lifecycle
Receipt - Manifest
Approval Surface - Capability claim for operator approval/intervention surfaces. Optional; absent means “no operator surface.”
- Manifest
Context Pressure - Capability claim describing how the adapter surfaces
context.pressure_observedlifecycle evidence. - Manifest
Known Degradation - One pre-declared capability degradation the adapter ships with.
Lets a manifest say “this build’s
context_pressurewas native upstream but is currentlyunavailablehere” without firing a runtimecapability.degradedevent. - Manifest
Lifecycle Event Support - Per-event capability claim inside a manifest.
- Manifest
Placement Support - Per-placement capability claim inside a manifest.
- Manifest
Receipts - Capability claim describing receipt emission and ledger support.
- Manifest
Renewal - Capability claim for reset/continuation renewal across a harness boundary. Lifeloop reports whether the adapter can prove the lifecycle path and delivery support; clients own renewal leases, continuation-token policy, and thread/session binding.
- Manifest
Renewal Continuation - Continuation-side renewal capability. Observation means the adapter can prove a continuation boundary happened; payload delivery means it can carry client-provided continuation facts across that boundary.
- Manifest
Renewal Reset - Reset-side renewal capability.
native,wrapper_mediated, andmanualare separate so a manifest can distinguish a real harness reset surface, a launcher/wrapper path, an operator-only path, and the all-unavailable“no safe reset path” case. - Manifest
Session Identity - Per-id support claims for harness identity correlation. Optional on the manifest because a telemetry-only adapter may not expose any of these.
- Manifest
Session Rename - Capability claim for the adapter’s session-rename surface. Optional on the manifest; absent means “no rename concept.”
- Manifest
Telemetry Source - One telemetry source the adapter exposes for lifecycle evidence.
- Payload
Envelope - Payload
Receipt - Payload
Ref - Registered
Adapter - Registry entry pairing an
AdapterManifestwith itsConformanceLevel. - Warning
Enums§
- Adapter
Role - Conformance
Level - Conformance posture of a registered adapter.
- Failure
Class - Frame
Class - Integration
Mode - Lifecycle
Event Kind - Manifest
Placement Class - Manifest placement classes — the trust-neutral, lifecycle-timing vocabulary the adapter manifest uses to declare placement support.
- Negotiation
Outcome - Placement
Class - Placement
Outcome - Receipt
Status - Requirement
Level - Retry
Class - Support
State - Support states for adapter capability claims.
- Validation
Error - Reasons a Lifeloop envelope, payload, or receipt failed validation.
Constants§
Functions§
- claude_
manifest - Claude manifest. Native-hook integration via
.claude/settings.json. - codex_
manifest - Codex manifest. Native-hook integration covers Codex’s stable hook
surface, including
PreCompactin Codex CLI 0.129+. Capability claims here are paired with verification tests intests/manifest_claims.rs. - gemini_
manifest - Gemini pre-conformance manifest.
- hermes_
manifest - Hermes pre-conformance manifest. Reference-adapter integration
supplied as a JSON descriptor at the path declared in
crate::host_assets::HERMES_TARGET_ADAPTER. - lifecycle_
event_ kinds - lookup_
manifest - Resolve a registered adapter by
adapter_id. ReturnsNonefor unknown ids. - manifest_
registry - Built-in adapter manifest registry. Order is stable so callers
that render a
lifeloop adapterslisting get a predictable output without sorting client-side. - openclaw_
manifest - OpenClaw pre-conformance manifest.
- opencode_
manifest - OpenCode pre-conformance manifest.