# Changelog

All notable changes to `lifeloop-cli` are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.4.0] - 2026-05-29

### Added
- `lifeloop continuation` subcommand group backing the continuation store
  (`CONTINUATION-001`): thread-keyed, size-bounded, TTL'd continuation blobs
  with `put` / `get` / `drop` / `list` / `drop-thread` operations.
- Host-hook `before-prompt-build` prompt hook for `claude`/`codex`, emitting a
  `FrameOpening` callback with bounded prompt metadata to feed CCD continuity
  evidence capture.
- Compaction host hooks wired to the CCD lifeloop client, with manifest-gated
  pressure renewal so context-pressure events can drive continuation.
- Wire specs `CALLBACK-001` (client callback protocol) and `CONTINUATION-001`
  (continuation store).

### Changed
- Context-pressure checkpoints are now content-backed.

## [0.3.3] - 2026-05-20

### Changed

- Kept renewal state-dir resolution substrate-neutral while making Git-backed
  workspaces gitdir-aware: explicit `--state-dir` still wins, non-Git paths
  continue using `.lifeloop/renewal/`, and linked worktrees/submodules resolve
  through Git's per-worktree state path.
- Updated built-in Codex renewal hook profiles to use
  `LIFELOOP_WORKSPACE_DIR`, `CODEX_PROJECT_DIR`, or `PWD` for workspace path
  discovery instead of requiring `git rev-parse`.

### Fixed

- Codex host-asset merge now removes legacy managed hooks that used Git path
  discovery before installing the current managed hook.

## [0.3.2] - 2026-05-19

### Added

- `lifeloop host-hook --hook on-compaction-notice` records a host
  compaction-signal observation in workspace-local
  `host-context-status.json`, scoped to the supplied `session_id`. The
  handler is host-agnostic: any `--host <id>` whose adapter emits the
  `on-compaction-notice` hook reaches it, matching the value already
  rendered into Claude `settings.json`, the `ccd-renewal` Codex profile,
  and the openclaw/hermes managed-event tables.
- `lifeloop host-hook --hook on-session-end` clears the status file when
  it belongs to the ending session, so the compaction signal does not
  leak into a subsequent session. Both handlers fail closed when
  `session_id` is absent or empty.

## [0.3.1] - 2026-05-19

### Added

- Added token-safe `RenewalAutomationStatus` and `lifeloop renewal status` so
  lifecycle clients can inspect renewal automation state without reading
  continuation tokens.

## [0.3.0] - 2026-05-18

### Added

- Added the opt-in `ccd-renewal` host asset profile and `lifeloop host-hook`
  broker for Codex renewal prepare/continuation through CCD's public CLI.
- Added `renewal.profiles` to adapter manifest renewal claims so profile-scoped
  renewal support is explicit on the wire while remaining backward-compatible.
- Added `asset preview --profile <id>` for rendering built-in lifecycle
  profiles (`ccd-compat`, `ccd-renewal`, and `lifeloop-direct`).
- Added the CCD renewal playbook and Codex conformance coverage for
  wrapper-mediated reset prepare, out-of-band continuation token storage, and
  continuation delivery.

### Changed

- Codex now carries a scoped positive renewal claim for the `ccd-renewal`
  profile. Other built-in adapters continue to omit renewal until evaluated.

### Security

- Pending renewal token files are written fail-closed, never overwrite existing
  pending state, resolve nested repository paths to the parent `.git` state
  directory, and use user-only permissions on Unix.

## [0.2.0] - 2026-05-17

### Added

- Added optional renewal/reset adapter capability claims for native,
  wrapper-mediated, manual, and unavailable reset paths, plus
  continuation observation versus payload-delivery support.

### Removed

- Removed the public `lifeloop::source_files` managed-section renderer
  (`RenderedSourceFile`, `ApplyOutcome`, `ApplyError`, `SourceFileAdapter`,
  `TEMPLATE_VERSION`, `render_for`, and `apply`). Model instruction source
  files are user-owned; Lifeloop no longer renders replacement bodies for
  managed sections inside them. See
  `docs/decisions/source-files-are-user-owned.md` and
  `docs/tombstones/source-files-managed-section.md`.

## [0.1.1] - 2026-05-10

### Added

- Domain module aliases as pure re-exports over the canonical 0.1.0 surface,
  so consumers can use module-shaped imports without changing the underlying
  type design:
  - `lifeloop::event::{LifecycleEventKind, lifecycle_event_kinds}`
  - `lifeloop::manifest::{AdapterManifest, RegisteredAdapter, ConformanceLevel,
    Manifest*, manifest_registry, lookup_manifest}`
  - `lifeloop::adapters::{manifest_registry, lookup_manifest, codex_manifest,
    claude_manifest, hermes_manifest, openclaw_manifest, gemini_manifest,
    opencode_manifest}`
  - `lifeloop::capability::{CapabilityKind, CapabilityRequest,
    CapabilityRequirement, DefaultNegotiationStrategy, NegotiatedPlan,
    PayloadPlacementDecision, PlacementRejection, negotiate}`
- Compile-time + runtime alias-identity test (`tests/domain_modules.rs`) that
  prevents the new submodules from drifting away from their canonical
  counterparts.

### Notes

- This release is **purely additive**. All 0.1.0 paths remain authoritative
  and unchanged.
- The `CapabilityKind` / `CapabilityRequest` split is preserved deliberately:
  `CapabilityKind` is identity (used as a manifest lookup key);
  `CapabilityRequest` adds policy (`desired: SupportState`,
  `level: RequirementLevel`).
- Names like `EventName`, `all_manifests`, `negotiate_capabilities`, and a
  flat `Capability` are intentionally **not** added as aliases — consumers
  should adapt to the published vocabulary.

## [0.1.0] - 2026-05-09

- Initial publish: provider-neutral lifecycle abstraction and normalizer for
  AI harnesses. See `README.md` for the full surface.
