@scotthuang/agent-knock-knock 0.12.16 → 0.12.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +11 -11
  3. package/dist/src/claude-lifecycle-compatibility.d.ts +9 -0
  4. package/dist/src/claude-lifecycle-compatibility.js +50 -5
  5. package/dist/src/claude-lifecycle-compatibility.js.map +1 -1
  6. package/dist/src/claude-local-transcript-provider.js +5 -6
  7. package/dist/src/claude-local-transcript-provider.js.map +1 -1
  8. package/dist/src/claude-terminal-agent-adapter.js +38 -30
  9. package/dist/src/claude-terminal-agent-adapter.js.map +1 -1
  10. package/dist/src/codex-lifecycle-compatibility.d.ts +19 -0
  11. package/dist/src/codex-lifecycle-compatibility.js +37 -0
  12. package/dist/src/codex-lifecycle-compatibility.js.map +1 -1
  13. package/dist/src/codex-store-adapter.js +5 -6
  14. package/dist/src/codex-store-adapter.js.map +1 -1
  15. package/dist/src/codex-terminal-agent-adapter.js +46 -28
  16. package/dist/src/codex-terminal-agent-adapter.js.map +1 -1
  17. package/dist/src/deferred-foreground-application-service.js +1 -0
  18. package/dist/src/deferred-foreground-application-service.js.map +1 -1
  19. package/dist/src/deferred-foreground-boundary.d.ts +2 -0
  20. package/dist/src/deferred-foreground-preparation-cli-adapter.js +2 -0
  21. package/dist/src/deferred-foreground-preparation-cli-adapter.js.map +1 -1
  22. package/dist/src/deferred-foreground-preparation-service.js +4 -2
  23. package/dist/src/deferred-foreground-preparation-service.js.map +1 -1
  24. package/dist/src/deferred-foreground-recovery-cli-adapter.js +1 -0
  25. package/dist/src/deferred-foreground-recovery-cli-adapter.js.map +1 -1
  26. package/dist/src/doctor-capabilities.d.ts +4 -3
  27. package/dist/src/doctor-capabilities.js +26 -6
  28. package/dist/src/doctor-capabilities.js.map +1 -1
  29. package/dist/src/install-doctor-command-adapter.js +1 -1
  30. package/dist/src/install-doctor-command-adapter.js.map +1 -1
  31. package/dist/src/native-thread-lifecycle-cli-adapter.js +17 -2
  32. package/dist/src/native-thread-lifecycle-cli-adapter.js.map +1 -1
  33. package/dist/src/native-thread-transition-application.js +9 -3
  34. package/dist/src/native-thread-transition-application.js.map +1 -1
  35. package/dist/src/openclaw-plugin-command-adapter.js +15 -11
  36. package/dist/src/openclaw-plugin-command-adapter.js.map +1 -1
  37. package/dist/src/openclaw-plugin-helpers.js +22 -1
  38. package/dist/src/openclaw-plugin-helpers.js.map +1 -1
  39. package/dist/src/openclaw-plugin-schemas.js +2 -2
  40. package/dist/src/openclaw-plugin-schemas.js.map +1 -1
  41. package/dist/src/terminal-action-projection.d.ts +1 -1
  42. package/dist/src/terminal-action-projection.js +1 -1
  43. package/dist/src/terminal-action-projection.js.map +1 -1
  44. package/dist/src/terminal-agent-adapter.d.ts +10 -2
  45. package/dist/src/terminal-agent-adapter.js.map +1 -1
  46. package/dist/src/terminal-agent-bridge.d.ts +44 -0
  47. package/dist/src/terminal-agent-bridge.js +348 -48
  48. package/dist/src/terminal-agent-bridge.js.map +1 -1
  49. package/dist/src/terminal-command-cli-adapter.js +98 -47
  50. package/dist/src/terminal-command-cli-adapter.js.map +1 -1
  51. package/dist/src/terminal-delegate-cli-adapter.js +4 -3
  52. package/dist/src/terminal-delegate-cli-adapter.js.map +1 -1
  53. package/dist/src/terminal-dispatch-composition.d.ts +2 -0
  54. package/dist/src/terminal-dispatch-execution.d.ts +2 -0
  55. package/dist/src/terminal-dispatch-execution.js.map +1 -1
  56. package/dist/src/terminal-list-cli-adapter.js +43 -9
  57. package/dist/src/terminal-list-cli-adapter.js.map +1 -1
  58. package/dist/src/terminal-list-renderer.js +21 -8
  59. package/dist/src/terminal-list-renderer.js.map +1 -1
  60. package/dist/src/terminal-watch-cli-adapter.js +27 -0
  61. package/dist/src/terminal-watch-cli-adapter.js.map +1 -1
  62. package/docs/quickstart-herdr.md +2 -2
  63. package/docs/quickstart-tmux.md +4 -4
  64. package/openclaw.plugin.json +1 -1
  65. package/package.json +1 -1
  66. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +12 -10
package/CHANGELOG.md CHANGED
@@ -1,6 +1,35 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.12.18 - 2026-08-27
4
+
5
+ ### Fixed
6
+
7
+ - Make an explicit Codex Send independent of Composer visibility, stability, and exactness. Physical fallback now replaces the current Composer with one `C-u`, injects the new request, waits through the paste window, and dispatches Enter exactly once without a post-text Composer veto. Claude Code remains exact-empty-only.
8
+
9
+ ### Changed
10
+
11
+ - Treat Codex and Claude Code version profiles as regression-test evidence rather than runtime allowlists. A complete but unverified `x.y.z` version keeps every otherwise eligible Watch, native status, new-thread, candidate-list, and exact-resume action available through a generic compatibility profile, with explicit warnings in List, action, doctor, and command results.
12
+ - Advance the model-facing action contract to 22 so Hosts preserve compatibility warnings and advertise Codex `replace_current_composer_and_submit` while continuing to pass only semantic action arguments.
13
+
14
+ ### Security
15
+
16
+ - Preserve exact terminal/process, native-thread, workspace, artifact, approval, composer, candidate, and postcondition checks for unverified versions. Real UI or schema drift fails at runtime, and any result after possibly sending input remains uncertain and must not be retried automatically.
17
+ - Preserve the exact live terminal/process and scanned, non-blocked approval boundary for Codex user-explicit Send. Once its sole mutation sequence begins, an uncertain result must not be retried automatically.
18
+
19
+ ## 0.12.17 - 2026-08-26
20
+
21
+ ### Fixed
22
+
23
+ - Keep an explicit user Send available for a verified mutable Codex prompt even when its composer already contains a stable draft. An empty composer receives the new request, an identical draft receives exactly one Enter without duplicate text injection, and a different draft is cleared once, replaced by the new request, and then submitted once.
24
+ - Use one shared prepared timestamp for a deferred foreground transfer, its Turn submission receipt, and its dispatch ledger, preventing real-clock drift from producing a half-submit authority mismatch between otherwise identical evidence.
25
+
26
+ ### Changed
27
+
28
+ - Advance the model-facing action contract to 20 and add the first Codex nonempty-Composer user-explicit policy, later superseded by the v22 replace-current-Composer behavior. Claude Code user-explicit Send, native inspection, and native lifecycle input remain restricted to a verified empty Composer.
29
+
30
+ ### Security
31
+
32
+ - Revalidate the exact Codex terminal/process identity, non-approval state, stable composer digest, and user request immediately around clear, text, and Enter boundaries. Live working activity remains diagnostic rather than a veto for this user-explicit path. A failure after the sole draft-clear key is uncertain and must not be retried automatically; draft text and opaque composer authority remain outside model-facing actions and durable receipts.
4
33
 
5
34
  ## 0.12.16 - 2026-08-26
6
35
 
package/README.md CHANGED
@@ -42,7 +42,7 @@ After doctor reports `AKK doctor: ready`, send a separate message:
42
42
  /akk inspect this repository and summarize it
43
43
  ```
44
44
 
45
- The second command proves that AKK can find the one send-ready pane, revalidate its process and pane identity, verify a non-blocked approval state and exact empty composer, send the task, and return the result. Parsed `activity_state` and broken AKK management state do not veto this user-explicit Send. Direct `/akk ...` commands need no OpenClaw tool-policy changes.
45
+ The second command proves that AKK can find the one send-ready pane, revalidate its process and pane identity, verify a scanned, non-blocked approval state, send the task, and return the result. Codex Composer visibility, stability, exactness, and parsed working activity do not veto this user-explicit Send: physical fallback sends `C-u` once to replace the current Composer, injects the request, waits through the paste window, and dispatches Enter exactly once without a post-text Composer check. Claude Code still requires an exact empty Composer. Broken AKK management state does not veto the user-explicit Send. Direct `/akk ...` commands need no OpenClaw tool-policy changes.
46
46
 
47
47
  ## See It in Action
48
48
 
@@ -93,21 +93,21 @@ terminal resource / process incarnation
93
93
  └─ Turn 3 (turn_id)
94
94
  ```
95
95
 
96
- The v19 model-facing action contract remains semantic-ID only. `send(session_id, request)` is **session-scoped** (`session_exact`): it creates a new `turn_id` in that exact native coding-agent context and never silently follows a different thread now visible in the pane. `send(terminal_id, request)` may be managed follow-current (`terminal_follow_current`) or the user-priority physical-terminal path (`terminal_user_explicit`), exactly as advertised by the current row. `session_id` and `terminal_id` are mutually exclusive; callers may omit both only when AKK must prove one unique send-ready pane. Human-facing slash selectors remain a discovery convenience, but structured tools never carry selectors or opaque authority values. The trusted plugin/CLI derives fresh terminal, binding, candidate, prompt, and handoff fences internally. Every mutation holds the terminal lock; managed operations additionally use Store locks, while unmanaged user-priority fallback deliberately does not depend on Store health. A managed send creates a Turn and binds only the single rollout that durably accepts that exact request. The `turn_id` is not a destination for later ordinary sends; it is the exact identity used for status, approval, cancellation, renewal, callback retry, close, and callback correlation. If a Turn is `waiting_for_openclaw`, `respond(turn_id, answer)` supplies the answer inside that same Turn instead of creating another one.
96
+ The v22 model-facing action contract remains semantic-ID only. `send(session_id, request)` is **session-scoped** (`session_exact`): it creates a new `turn_id` in that exact native coding-agent context and never silently follows a different thread now visible in the pane. `send(terminal_id, request)` may be managed follow-current (`terminal_follow_current`) or the user-priority physical-terminal path (`terminal_user_explicit`), exactly as advertised by the current row. `session_id` and `terminal_id` are mutually exclusive; callers may omit both only when AKK must prove one unique send-ready pane. Human-facing slash selectors remain a discovery convenience, but structured tools never carry selectors or opaque authority values. The trusted plugin/CLI derives fresh terminal, binding, candidate, prompt, composer, and handoff fences internally. Every mutation holds the terminal lock; managed operations additionally use Store locks, while unmanaged user-priority fallback deliberately does not depend on Store health. A managed send creates a Turn and binds only the single rollout that durably accepts that exact request. The `turn_id` is not a destination for later ordinary sends; it is the exact identity used for status, approval, cancellation, renewal, callback retry, close, and callback correlation. If a Turn is `waiting_for_openclaw`, `respond(turn_id, answer)` supplies the answer inside that same Turn instead of creating another one.
97
97
 
98
- v15 generalized the human-priority Codex path; v18 preserves that safety while removing opaque fences from model arguments. It covers a status-card-only Session with no rollout, a quiescent managed pane whose exact open-rollout inventory is complete but cannot identify the foreground candidate, and a supported manual `/clear` whose new logical thread is visible before its rollout materializes. The complete exact inventory domain binds the provider terminal, PID and process birth, workspace and canonical endpoint, and every open rollout's UUID, descriptor, device, inode, canonical path, and pre-submit byte offset. Native foreground resolution may be unavailable only when that independent domain is complete and exact; an incomplete, missing, stale, or changed domain fails closed. A `/clear` resume hint is advisory only. Under the terminal lock, AKK isolates the old Session, creates a separate zero-UUID provisional Session and Turn, sends only the real task, and promotes that target only after the post-submit monitor finds a unique exact request acceptance in the pinned rollout domain. The resulting native UUID may match or differ from the old Session; it is never silently merged back into the predecessor. A rollout-backed Codex row therefore advertises `terminal_follow_current` with `terminal_id`, not `session_exact`; a cached or direct `session_exact` attempt revalidates under the terminal lock, rejects before task text, and never downgrades itself to the follow-current path. Only released predecessor Turn history from a strictly earlier binding epoch is excluded from current-send authority; unresolved current-epoch state still blocks the managed path. The freshly listed semantic-ID action can work in a narrow pane without `/status`. Until promotion commits, strict `session_id` send, `respond`, managed `approve`, `cancel`, native lifecycle, callback delivery, and `native_inspect` remain unavailable. If terminal delivery or native acceptance is uncertain, AKK does not retry the input. Explicit Close is the user's management escape hatch: AKK closes the selected Turn first, sends no terminal input, leaves the coding agent and pane running, and then best-effort releases only linked AKK metadata. Missing, malformed, stale, or newer cleanup records are preserved and reported as warnings instead of vetoing Close. Refresh the list afterward; if the coding agent is still working, Watch can observe it again. v19 adds `terminal_user_explicit`: when the user chooses an advertised exact live physical prompt, only terminal/process identity, a visible prompt with no active approval, and an exactly empty composer may veto a new Send. Broken AKK Turn, Session, deferred-transfer, transition, ledger, or Store state cannot veto that user decision. AKK tries the managed fast path first; if internal state prevents it, AKK delivers the request once as unmanaged work and then best-effort releases the conflicting management. For an omitted target, AKK durably binds the `message_id` to the first selected physical terminal before input whenever runtime durability is available, so a retry cannot move the same request to another pane. An existing or possibly existing same-ID record rejects automatic replay. If no record exists and durability is unavailable, user priority wins: AKK proceeds with a warning, and strict cross-process replay or reselection protection is unavailable for that degraded invocation, so callers must not automatically retry its result. The fallback creates no callback Turn and sends no callback; refresh the list and use Watch to observe the task.
98
+ v15 generalized the human-priority Codex path; v18 preserves that safety while removing opaque fences from model arguments. It covers a status-card-only Session with no rollout, a quiescent managed pane whose exact open-rollout inventory is complete but cannot identify the foreground candidate, and a supported manual `/clear` whose new logical thread is visible before its rollout materializes. The complete exact inventory domain binds the provider terminal, PID and process birth, workspace and canonical endpoint, and every open rollout's UUID, descriptor, device, inode, canonical path, and pre-submit byte offset. Native foreground resolution may be unavailable only when that independent domain is complete and exact; an incomplete, missing, stale, or changed domain fails closed. A `/clear` resume hint is advisory only. Under the terminal lock, AKK isolates the old Session, creates a separate zero-UUID provisional Session and Turn, sends only the real task, and promotes that target only after the post-submit monitor finds a unique exact request acceptance in the pinned rollout domain. The resulting native UUID may match or differ from the old Session; it is never silently merged back into the predecessor. A rollout-backed Codex row therefore advertises `terminal_follow_current` with `terminal_id`, not `session_exact`; a cached or direct `session_exact` attempt revalidates under the terminal lock, rejects before task text, and never downgrades itself to the follow-current path. Only released predecessor Turn history from a strictly earlier binding epoch is excluded from current-send authority; unresolved current-epoch state still blocks the managed path. The freshly listed semantic-ID action can work in a narrow pane without `/status`. Until promotion commits, strict `session_id` send, `respond`, managed `approve`, `cancel`, native lifecycle, callback delivery, and `native_inspect` remain unavailable. If terminal delivery or native acceptance is uncertain, AKK does not retry the input. Explicit Close is the user's management escape hatch: AKK closes the selected Turn first, sends no terminal input, leaves the coding agent and pane running, and then best-effort releases only linked AKK metadata. Missing, malformed, stale, or newer cleanup records are preserved and reported as warnings instead of vetoing Close. Refresh the list afterward; if the coding agent is still working, Watch can observe it again. v19 and v20 introduced and expanded `terminal_user_explicit`; v22 supersedes their Composer-dependent Codex behavior. Codex eligibility now depends on the exact live terminal/process and a scanned, non-blocked approval state, not Composer visibility, stability, or exactness. Physical fallback always sends one `C-u`, injects the new request, waits through the paste window, and dispatches Enter exactly once; after injection, Composer observation cannot veto Enter. Claude Code user-explicit Send, native inspection, and native lifecycle input remain exact-empty-only. The managed fast path may require exact empty before input, but after user-explicit Codex text injection it follows the same no-Composer-veto Enter rule. Broken AKK Turn, Session, deferred-transfer, transition, ledger, or Store state cannot veto the user decision. AKK tries the managed fast path where it is eligible; otherwise it delivers the physical operation once as unmanaged work and then best-effort releases conflicting management. For an omitted target, AKK durably binds the `message_id` to the first selected physical terminal before input whenever runtime durability is available, so a retry cannot move the same request to another pane. An existing or possibly existing same-ID record rejects automatic replay. If no record exists and durability is unavailable, user priority wins: AKK proceeds with a warning, and strict cross-process replay or reselection protection is unavailable for that degraded invocation, so callers must not automatically retry its result. The fallback creates no callback Turn and sends no callback; once its sole mutation sequence begins, an uncertain result must not be retried automatically. Refresh the list and use Watch to observe the task.
99
99
 
100
100
  Approval remains separate from managed attribution. When `list` can prove one exact visible Codex approval prompt, it may advertise managed `approve({turn_id})` or terminal-scoped `approve({terminal_id})`; the latter remains possible when foreground rollout attribution is temporarily unavailable. The user must inspect and explicitly confirm that exact prompt. The plugin/CLI then keeps the confirmation offer private, recaptures the prompt, and revalidates the Store, terminal, process, and prompt fence under lock immediately before sending the exact key once. No token or fingerprint is transported through the model call. Terminal-scoped approval does not attribute the approval to a Turn, mutate Session identity, or create a durable approval receipt, so an uncertain transport result must not be retried blindly. It is never available to auto-approve. A changed prompt, identity, owner, or confirmation offer remains blocked.
101
101
 
102
102
  The private approval fence remains prompt-scoped. AKK hashes the adapter-isolated, exact unredacted approval region together with the terminal/process identity, decision keys and label, prompt kind, working directory, reason/detail, and any request or policy evidence. The whole-screen digest and redacted excerpt remain diagnostic only: output outside the approval region may change without invalidating the same reviewed prompt. A change inside the region—including the command or an otherwise identically redacted secret, choices, highlighted option, prompt kind, or request identity—or a change in the bound process, working directory, or request evidence still rejects with zero approval keys. If the adapter cannot isolate one complete bounded prompt region, approval fails closed. The raw prompt region and its opaque fence are never returned to the model, persisted as public action data, or logged.
103
103
 
104
- Human-friendly selectors such as `only`, `codex`, `claude`, a terminal ID, or `@short-ref` remain a slash-command discovery layer. Structured model tools use semantic IDs instead: strict continuation pre-fills `session_id`, while terminal-scoped Send pre-fills `terminal_id`. Merely observing a mismatch or an unbound rollout inventory never mutates the Store. Managed Send remains available only when AKK can prove its complete managed authority. A listed `terminal_user_explicit` action has the narrower user-priority boundary instead: one exact live physical prompt, no active approval prompt, and an exactly empty composer. AKK internal management or persistence damage does not suppress that action. Other actions likewise expose only their semantic identities, while opaque freshness fences are derived and consumed inside the trusted plugin/CLI boundary.
104
+ Human-friendly selectors such as `only`, `codex`, `claude`, a terminal ID, or `@short-ref` remain a slash-command discovery layer. Structured model tools use semantic IDs instead: strict continuation pre-fills `session_id`, while terminal-scoped Send pre-fills `terminal_id`. Merely observing a mismatch or an unbound rollout inventory never mutates the Store. Managed Send remains available only when AKK can prove its complete managed authority and an exact empty Composer before input. A listed `terminal_user_explicit` action has the narrower user-priority boundary instead: one exact live physical terminal/process and a scanned, non-blocked approval state. Codex applies `replace_current_composer_and_submit`; its Composer may be invisible, truncated, unstable, empty, or nonempty. Claude remains exact-empty-only. Parsed working activity and AKK internal management or persistence damage do not suppress that action. Native inspection and native lifecycle input also remain exact-empty-only. Other actions likewise expose only their semantic identities, while opaque freshness fences are derived and consumed inside the trusted plugin/CLI boundary.
105
105
 
106
106
  An exact human switch while the old Session still has one active Turn is a decision point, not an automatic redirect. The terminal row may expose `handoff_decision` instead of a follow-current send. If the user chooses to close the old Turn, explicit Close takes priority and releases only its AKK management; it does not depend on the live native thread remaining unchanged, sends no terminal input, and does not stop the coding agent. Then list again and use only the newly advertised follow-current send or Watch action. Choosing `keep_source` changes no AKK state: restore the old native thread in the Codex or Claude TUI, then refresh the list.
107
107
 
108
- Native clear/new/resume operations requested through AKK are explicit lifecycle actions, separate from ordinary Turn creation. A successful new/clear creates a new native thread and AKK Session; resume activates the exact historical native thread and its corresponding Session. Each successful lifecycle transition creates no Turn. A human may also run native `/clear`, `/new`, `/resume`, or the equivalent directly in the shared terminal. AKK does not forbid that takeover: the next exact, fresh terminal-scoped follow-current send can absorb the human-driven transition when it is safe, while a `session_id` send deliberately remains pinned to its old context. AKK serializes either transition, verifies the resulting native identity, and advances the terminal binding generation so work and callbacks from the previous context cannot cross the boundary. Exact AKK-driven lifecycle profiles are verified for Codex 0.146.0/0.146.1/0.147.0/0.148.0/0.149.1 and Claude Code 2.1.218/2.1.226/2.1.237.
108
+ Native clear/new/resume operations requested through AKK are explicit lifecycle actions, separate from ordinary Turn creation. A successful new/clear creates a new native thread and AKK Session; resume activates the exact historical native thread and its corresponding Session. Each successful lifecycle transition creates no Turn. A human may also run native `/clear`, `/new`, `/resume`, or the equivalent directly in the shared terminal. AKK does not forbid that takeover: the next exact, fresh terminal-scoped follow-current send can absorb the human-driven transition when it is safe, while a `session_id` send deliberately remains pinned to its old context. AKK serializes either transition, verifies the resulting native identity, and advances the terminal binding generation so work and callbacks from the previous context cannot cross the boundary. Exact AKK-driven lifecycle profiles are regression-tested for Codex 0.146.0/0.146.1/0.147.0/0.148.0/0.149.1 and Claude Code 2.1.218/2.1.226/2.1.237. They are verification records, not an allowlist: another complete `x.y.z` version keeps Watch, native inspection, candidate discovery, new, and resume available through the generic runtime protocol, with a compatibility warning. Runtime structure and postconditions still decide success; a possibly submitted but unproven operation is reported as uncertain and is never retried automatically.
109
109
 
110
- AKK status and native status inspection are different operations. `agent_knock_knock_status` (and `/akk status`) reads AKK Turn state plus a bounded current terminal screen; it does not execute the coding agent's `/status`. When an idle terminal row advertises `native_inspect`, `agent_knock_knock_native_inspect({terminal_id, inspection:"status"})` can execute only that closed, version-scoped inspection. AKK derives and revalidates the fresh binding fence internally. Supported profiles are Codex 0.146.0/0.146.1/0.147.0/0.148.0/0.149.1 and Claude Code 2.1.218/2.1.226/2.1.237. Claude's adapter parses a newly opened Status panel, dismisses that exact panel once, and proves the same pane returned to an idle empty composer. The action creates no Session, Turn, receipt, monitor, or callback. `/usage`, `/cost`, `/stats`, `/usage-credits`, `/model`, `/compact`, arbitrary slash strings, and unsupported versions remain unavailable. In particular, bare Codex `/usage` opens an interactive menu whose later Enter can select an account-side usage-limit reset; do not automate it as a read-only inspection.
110
+ AKK status and native status inspection are different operations. `agent_knock_knock_status` (and `/akk status`) reads AKK Turn state plus a bounded current terminal screen; it does not execute the coding agent's `/status`. When an idle terminal row advertises `native_inspect`, `agent_knock_knock_native_inspect({terminal_id, inspection:"status"})` can execute only that closed inspection. AKK derives and revalidates the fresh binding fence internally. Regression-tested profiles are Codex 0.146.0/0.146.1/0.147.0/0.148.0/0.149.1 and Claude Code 2.1.218/2.1.226/2.1.237; other complete `x.y.z` versions remain callable with a compatibility warning and use the same bounded runtime validation. Claude's adapter parses a newly opened Status panel, dismisses that exact panel once, and proves the same pane returned to an idle empty composer. The action creates no Session, Turn, receipt, monitor, or callback. `/usage`, `/cost`, `/stats`, `/usage-credits`, `/model`, `/compact`, and arbitrary slash strings remain unavailable. A structurally incompatible native status result fails or becomes uncertain after the one permitted input; it is not retried automatically. In particular, bare Codex `/usage` opens an interactive menu whose later Enter can select an account-side usage-limit reset; do not automate it as a read-only inspection.
111
111
 
112
112
  ## Optional: Natural-Language Delegation
113
113
 
@@ -215,7 +215,7 @@ For one complete first run, follow [Agent Knock Knock in 5 minutes](https://gith
215
215
 
216
216
  ## Usage
217
217
 
218
- AKK discovers verified Codex and Claude Code panes across workspaces. It sends work only to a pane that is already running in tmux or supported Herdr and at a verified idle prompt; it never starts a coding agent for you.
218
+ AKK discovers live Codex and Claude Code panes across workspaces. Managed Send requires a verified idle prompt; an advertised `terminal_user_explicit` Send may also steer a working pane when its exact terminal/process identity and approval boundary remain valid. Codex Composer observation is advisory for this user-explicit path, while Claude still requires exact empty. AKK never starts a coding agent for you.
219
219
 
220
220
  If exactly one send-ready coding-agent pane exists across all workspaces, send a task directly:
221
221
 
@@ -250,7 +250,7 @@ The core command surface is intentionally small:
250
250
 
251
251
  `/akk list` performs a controlled reconciliation across managed turns, and managed `/akk status` limits reconciliation to the selected turn. This can close records whose idle retention has elapsed and restore eligible missing monitors, but it does not send terminal input or retry managed-Turn callback delivery. A `watch_id` status reads that independent Watch record. The running OpenClaw supervisor coordinates two separate reconciliation passes every five seconds and at startup: one restores eligible `waiting_for_agent` Turn monitors, while the other observes active Terminal Watches and retries their durable callback outboxes. Each pass has its own error boundary, so one failure does not starve the other. Standalone shell queries are read-only unless their command explicitly reconciles, and resolving a selector never changes turn state.
252
252
 
253
- Selectors fail closed: `only` works only with one actionable target, `latest` requires a unique newest target, and `codex` or `claude` must identify exactly one eligible pane. These names and `@short-ref` are human-facing slash-command resolution inputs. The v19 structured model contract does not expose a `selector`: JSON actions carry an authoritative `session_id`, `terminal_id`, `turn_id`, `watch_id`, or other semantic entity ID. For ordinary send, exactly one of `session_id` and `terminal_id` may be supplied, or both may be omitted to require one unique send-ready pane. Approval likewise uses only `turn_id` or `terminal_id` after explicit confirmation. Before every terminal operation, AKK derives fresh opaque authority internally and revalidates the expected agent PID and provider-owned terminal identity. `terminal_user_explicit` additionally requires the exact live prompt, no active approval, and an empty composer, but does not require healthy AKK management state.
253
+ Selectors fail closed: `only` works only with one actionable target, `latest` requires a unique newest target, and `codex` or `claude` must identify exactly one eligible pane. These names and `@short-ref` are human-facing slash-command resolution inputs. The v22 structured model contract does not expose a `selector`: JSON actions carry an authoritative `session_id`, `terminal_id`, `turn_id`, `watch_id`, or other semantic entity ID. For ordinary send, exactly one of `session_id` and `terminal_id` may be supplied, or both may be omitted to require one unique send-ready pane. Approval likewise uses only `turn_id` or `terminal_id` after explicit confirmation. Before every terminal operation, AKK derives fresh opaque authority internally and revalidates the expected agent PID and provider-owned terminal identity. `terminal_user_explicit` additionally requires a scanned, non-blocked approval state. Codex Composer visibility, stability, exactness, and parsed working activity are not eligibility requirements; Claude still requires an exact empty Composer.
254
254
 
255
255
  To ask AKK itself to change native context, first copy the full `terminal_id` from `/akk list`; lifecycle commands do not accept an ordinary-send `@short-ref` or loose agent selector. `/akk threads <exact-terminal-id>` lists exact, same-workspace candidates with a deterministic number, a collision-safe display-only `@short-id`, and the complete UUID. `/akk resume-thread <exact-terminal-id>` without a selection shows that list. A complete UUID remains compatible. A number or short ID resolves only against the latest list displayed in the same OpenClaw conversation incarnation; both expire after five minutes and fail after terminal, process, workspace, binding, candidate-set, or relevant action changes. AKK resolves that human navigation to the complete UUID and derives fresh private evidence under lock. `previous` (or `刚才那个`) is advertised only when the current Session's latest committed lifecycle transition identifies exactly one currently verified resumable source; it never guesses from title, recency, or static lineage. If `previous` is present, use only its exact prefilled semantic-ID action for a natural-language “刚才那个” request. Structured lifecycle mutations are `new_thread({terminal_id})` and `resume_thread({terminal_id,native_thread_id})`. AKK does not poll bindings or adopt observed switches in the background: a human-driven switch is adopted only as part of an explicit, fresh terminal-scoped send. If a recorded owner process exits, the next lifecycle listing can classify that sole historical binding as resumable, and the resume mutation compare-and-swap detaches it before touching the terminal. Stale, expired, unsupported, busy, ambiguous, active-elsewhere, or unverifiable transitions fail closed. Do not ask AKK to send `/clear`, `/new`, `/resume`, `/status`, Codex `/fork`, `/side`, or `/btw`, Claude `/branch`, or any other first-line native slash command as an ordinary task or answer; use an advertised AKK action, express the request in natural language, or enter an unsupported native command manually in the terminal UI.
256
256
 
@@ -258,15 +258,15 @@ The number and short-ID resume forms refer only to that displayed snapshot; neit
258
258
 
259
259
  To request a native Codex status card or Claude Status panel, first run `agent_knock_knock_list` and use only that terminal row's advertised `native_inspect({terminal_id,inspection:"status"})` action. The structured tool schema is closed to those two semantic fields; callers cannot provide `/status`, another slash command, or an authority token. AKK serializes the inspection with terminal mutations, derives and revalidates its private binding fence and exact terminal identity, and returns only after it proves one fresh bounded status result and an idle postcondition. Codex status probes additionally require an exact viewport of at least 80 columns to preserve the full Session UUID, cross the versioned paste-settle boundary, and dispatch Enter exactly once. An initially narrow or unknown viewport fails before text input with a widen/zoom diagnostic; post-injection viewport or composer drift fails closed before Enter and leaves the draft for manual inspection. Codex `/status` and that viewport requirement apply only to operations that must prove the UUID before terminal input. An otherwise eligible terminal-scoped ordinary task can send once and bind from exact native acceptance afterward, so it does not run `/status` or fail merely because the pane is narrow. For Claude, the inspection safely dismisses the exact modal once. It never turns ordinary `send` or `respond` into a slash-command escape hatch.
260
260
 
261
- The current OpenClaw surface registers 16 tools, and the top-level v19 `action_contracts` documents Terminal Watch alongside closed native inspection, user-priority current-pane Send/approval, lifecycle, and Turn actions. Every model-facing action carries semantic IDs only; opaque freshness and compare-and-swap fences stay inside the trusted plugin/CLI boundary. `available_actions` remains the authority for ordinary current actions. A listed `terminal_user_explicit` Send prioritizes the user's exact live physical prompt over broken AKK internal state: AKK attempts managed delivery first, then may deliver unmanaged without a callback before attempting best-effort management release. Refresh and use Watch afterward. Explicit Close is always available for a selected managed Turn after user confirmation, including deferred-transfer and handoff conflicts; it releases AKK management without terminal input or stopping the coding agent. A terminal row may also expose a nested `blocking_turns[].recovery_action` for the same user-owned Close. Invoke the advertised semantic-ID action, then refresh the list before doing anything else.
261
+ The current OpenClaw surface registers 16 tools, and the top-level v22 `action_contracts` documents Terminal Watch alongside closed native inspection, user-priority current-pane Send/approval, lifecycle, and Turn actions. Every model-facing action carries semantic IDs only; opaque freshness and compare-and-swap fences stay inside the trusted plugin/CLI boundary. `available_actions` remains the authority for ordinary current actions. A listed `terminal_user_explicit` Send prioritizes the user's exact live physical terminal/process over broken AKK internal state. Codex physical fallback replaces the current Composer with the new request and submits once without a post-text Composer veto; Claude remains empty-only. AKK attempts managed delivery where eligible, then may deliver unmanaged without a callback before attempting best-effort management release. Refresh and use Watch afterward. Explicit Close is always available for a selected managed Turn after user confirmation, including deferred-transfer and handoff conflicts; it releases AKK management without terminal input or stopping the coding agent. A terminal row may also expose a nested `blocking_turns[].recovery_action` for the same user-owned Close. Invoke the advertised semantic-ID action, then refresh the list before doing anything else.
262
262
 
263
263
  For natural-language tool use, `agent_knock_knock_list` is terminal-first. Each live pane appears exactly once in `terminals[]`; `process_state` reports whether its coding-agent process is alive and `activity_state` reports the parsed screen state. `managed.session_id` identifies the continuing AKK session, `managed.current_turn` is its optional active Turn, and `managed.recent_turn` is retained history; retained Turns do not occupy the terminal. A human-driven native-thread mismatch remains honestly classified as `management_state="conflict"`; its `handoff_state` is `external_handoff_adoptable` only when the row advertises the fenced follow-current `send`, otherwise it is `external_handoff_blocked`. `management_state="unavailable"` means only that AKK's management projection could not be read; the separately observed live terminal facts and any advertised `terminal_user_explicit` Send remain authoritative. Listing never performs the adoption. Pass `all=true` to include older entries in `managed.history`. By default, `unavailable_managed_turns[]` contains attention-needed records whose pane cannot be presented as a live terminal; `all=true` also includes retained unavailable history.
264
264
 
265
- Use only an `available_actions` entry returned in the current list, begin with its prefilled semantic IDs, and supply every `missing_required` field. The only additional action sources are a terminal row's nested `handoff_decision.choices.take_over_current.action` and an exact `blocking_turns[].recovery_action`; both require explicit user confirmation. When advertised, a managed Session's strict send uses `send({session_id,request})` and creates a new Turn only in that Session's native context. Terminal-scoped Send uses `send({terminal_id,request})`. A `terminal_user_explicit` action is the user-priority path: healthy AKK state still takes the managed fast path, while broken AKK state receives one unmanaged delivery with no callback before best-effort management release. Refresh the list and use Watch afterward. Structured Send never exposes a selector. `respond` and managed controls use `turn_id`; terminal-scoped approval uses `terminal_id` only after explicit confirmation. Native inspection uses `{terminal_id,inspection:"status"}`. Other raw controls may be used only through the exact action their row advertises. `timeoutSeconds` is unsupported, and monitoring limits should be omitted unless the user explicitly asks to change them. AKK derives fresh opaque fences and revalidates availability under lock before every side effect.
265
+ Use only an `available_actions` entry returned in the current list, begin with its prefilled semantic IDs, and supply every `missing_required` field. The only additional action sources are a terminal row's nested `handoff_decision.choices.take_over_current.action` and an exact `blocking_turns[].recovery_action`; both require explicit user confirmation. When advertised, a managed Session's strict send uses `send({session_id,request})` and creates a new Turn only in that Session's native context. Terminal-scoped Send uses `send({terminal_id,request})`. A `terminal_user_explicit` action is the user-priority path: healthy AKK state still takes the managed fast path where its exact-empty pre-input requirements hold, while Codex physical fallback always replaces the current Composer with the request and submits it once without a post-text Composer veto. Claude can fall back only from an exact empty Composer. Unmanaged delivery has no callback and is followed by best-effort management release. Refresh the list and use Watch afterward. Structured Send never exposes a selector, draft text, or composer authority. `respond` and managed controls use `turn_id`; terminal-scoped approval uses `terminal_id` only after explicit confirmation. Native inspection uses `{terminal_id,inspection:"status"}`. Other raw controls may be used only through the exact action their row advertises. `timeoutSeconds` is unsupported, and monitoring limits should be omitted unless the user explicitly asks to change them. AKK derives fresh opaque fences and revalidates availability under lock before every side effect.
266
266
 
267
267
  On first attach, the target terminal must be explicitly named by the user; AKK never guesses which already-running pane should receive a task.
268
268
 
269
- The top-level v19 action contracts include `watch` and `unwatch` as well as `send`, manual `approve`, `native_inspect`, `list_resumable_threads`, `new_thread`, `resume_thread`, and conflict-only `reconcile_binding`. Their model-facing mutation shapes are deliberately small: `watch({terminal_id})`; `send({session_id|terminal_id,request})` with the targets mutually exclusive; managed `approve({turn_id})` or terminal-scoped `approve({terminal_id})`; `native_inspect({terminal_id,inspection})`; `new_thread({terminal_id})`; `resume_thread({terminal_id,native_thread_id})`; and `reconcile_binding({terminal_id,conflicting_session_id})`. The listed Send scope distinguishes managed delivery from `terminal_user_explicit`; the latter is gated by physical prompt safety, not AKK management health, and an unmanaged fallback has no callback. Approval, handoff takeover, and reconciliation require explicit user confirmation, but none transports a token, revision, binding ID/generation, candidate fence, handoff-only live-native-UUID fence, or approval fingerprint through the model. `native_thread_id` remains the intentional semantic identity for resume. `watch` returns a `watch_id`; Watch status and `unwatch` use only that ID. Human-facing resume numbers and short IDs remain conversation-scoped navigation aids that AKK resolves to the complete native thread ID before the structured action. Orphan close retains `expected_message_id` or `expected_transition_id` because those are entity identities, not opaque authority tokens. The plugin/CLI derives and revalidates all freshness fences privately under the canonical locks. Store format remains 1 and writer protocol remains 5.
269
+ The top-level v22 action contracts include `watch` and `unwatch` as well as `send`, manual `approve`, `native_inspect`, `list_resumable_threads`, `new_thread`, `resume_thread`, and conflict-only `reconcile_binding`. Their model-facing mutation shapes are deliberately small: `watch({terminal_id})`; `send({session_id|terminal_id,request})` with the targets mutually exclusive; managed `approve({turn_id})` or terminal-scoped `approve({terminal_id})`; `native_inspect({terminal_id,inspection})`; `new_thread({terminal_id})`; `resume_thread({terminal_id,native_thread_id})`; and `reconcile_binding({terminal_id,conflicting_session_id})`. The listed Send scope distinguishes managed delivery from `terminal_user_explicit`; the latter is gated by exact terminal/process identity and scanned, non-blocked approval state, not AKK management health or Codex Composer observation, and an unmanaged fallback has no callback. Approval, handoff takeover, and reconciliation require explicit user confirmation, but none transports a token, revision, binding ID/generation, candidate or composer fence, handoff-only live-native-UUID fence, or approval fingerprint through the model. `native_thread_id` remains the intentional semantic identity for resume. `watch` returns a `watch_id`; Watch status and `unwatch` use only that ID. Human-facing resume numbers and short IDs remain conversation-scoped navigation aids that AKK resolves to the complete native thread ID before the structured action. Orphan close retains `expected_message_id` or `expected_transition_id` because those are entity identities, not opaque authority tokens. The plugin/CLI derives and revalidates all freshness fences privately under the canonical locks. Store format remains 1 and writer protocol remains 5.
270
270
 
271
271
  Workspace is not a routing boundary. AKK can list, inspect, and control verified panes across projects; when more than one target matches, choose one listed `terminal_id` for a structured tool or one listed selector for a slash command.
272
272
 
@@ -7,8 +7,17 @@ export interface ClaudeLifecycleCompatibilityProfile {
7
7
  readonly nativeStatusPanelRequiredValues: Readonly<Record<string, string>>;
8
8
  readonly resumableSourceVersions: readonly string[];
9
9
  }
10
+ export declare const CLAUDE_UNVERIFIED_LIFECYCLE_BEHAVIOR_PROFILE = "claude-code-unverified-runtime-v1";
11
+ export declare const CLAUDE_UNVERIFIED_NATIVE_INSPECTION_BEHAVIOR_PROFILE = "claude-code-unverified-native-status-v1";
10
12
  export declare const DEFAULT_CLAUDE_LIFECYCLE_VERSION = "2.1.218";
11
13
  export declare function claudeLifecycleCompatibilityProfile(agentVersion: string | undefined): ClaudeLifecycleCompatibilityProfile | undefined;
14
+ export declare function isValidClaudeSemanticVersion(agentVersion: string | undefined): agentVersion is string;
15
+ /**
16
+ * Selects a runtime protocol without turning the exact tested-version registry
17
+ * into an allowlist. Missing or malformed versions remain unknown.
18
+ */
19
+ export declare function claudeRuntimeLifecycleCompatibilityProfile(agentVersion: string | undefined): ClaudeLifecycleCompatibilityProfile | undefined;
20
+ export declare function claudeRuntimeCompatibilityWarning(agentVersion: string | undefined): string | undefined;
12
21
  export declare function claudeLifecycleBehaviorProfile(agentVersion: string | undefined): string | undefined;
13
22
  export declare function claudeNativeInspectionBehaviorProfile(agentVersion: string | undefined): string | undefined;
14
23
  export declare function supportedClaudeLifecycleVersions(): readonly string[];
@@ -21,6 +21,9 @@ const CLAUDE_STATUS_PANEL_FIELDS_2_1_226 = Object.freeze([
21
21
  "MCP servers",
22
22
  "Setting sources"
23
23
  ]);
24
+ const CLAUDE_VERSION_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/u;
25
+ export const CLAUDE_UNVERIFIED_LIFECYCLE_BEHAVIOR_PROFILE = "claude-code-unverified-runtime-v1";
26
+ export const CLAUDE_UNVERIFIED_NATIVE_INSPECTION_BEHAVIOR_PROFILE = "claude-code-unverified-native-status-v1";
24
27
  const CLAUDE_LIFECYCLE_PROFILES = Object.freeze({
25
28
  "2.1.218": Object.freeze({
26
29
  lifecycleBehaviorProfile: "claude-code-2.1.218",
@@ -58,6 +61,25 @@ const CLAUDE_LIFECYCLE_PROFILES = Object.freeze({
58
61
  ])
59
62
  })
60
63
  });
64
+ /**
65
+ * Best-effort runtime protocol for complete x.y.z Claude Code versions
66
+ * that AKK has not regression-tested yet. This deliberately reuses the newest
67
+ * verified, bounded Status modal shape; a real TUI change therefore fails at
68
+ * observation instead of being blocked solely by its version number.
69
+ */
70
+ const CLAUDE_UNVERIFIED_LIFECYCLE_PROFILE = Object.freeze({
71
+ lifecycleBehaviorProfile: CLAUDE_UNVERIFIED_LIFECYCLE_BEHAVIOR_PROFILE,
72
+ nativeInspectionBehaviorProfile: CLAUDE_UNVERIFIED_NATIVE_INSPECTION_BEHAVIOR_PROFILE,
73
+ nativeInspectionComposerStableMs: 80,
74
+ nativeInspectionComposerSettleTimeoutMs: 5_000,
75
+ nativeStatusPanelFields: CLAUDE_STATUS_PANEL_FIELDS_2_1_226,
76
+ nativeStatusPanelRequiredValues: Object.freeze({
77
+ "Session kind": "interactive"
78
+ }),
79
+ // Runtime candidate compatibility is structural and semver-based below;
80
+ // this exact-version registry field remains only as historical evidence.
81
+ resumableSourceVersions: Object.freeze([])
82
+ });
61
83
  // Preserve the historical optional-call default. Production discovery always
62
84
  // supplies the exact running version, while callers that omitted it before the
63
85
  // multi-profile registry continue to inspect 2.1.218 fixtures deterministically.
@@ -67,6 +89,31 @@ export function claudeLifecycleCompatibilityProfile(agentVersion) {
67
89
  ? CLAUDE_LIFECYCLE_PROFILES[agentVersion]
68
90
  : undefined;
69
91
  }
92
+ export function isValidClaudeSemanticVersion(agentVersion) {
93
+ if (!agentVersion) {
94
+ return false;
95
+ }
96
+ return CLAUDE_VERSION_PATTERN.test(agentVersion);
97
+ }
98
+ /**
99
+ * Selects a runtime protocol without turning the exact tested-version registry
100
+ * into an allowlist. Missing or malformed versions remain unknown.
101
+ */
102
+ export function claudeRuntimeLifecycleCompatibilityProfile(agentVersion) {
103
+ if (!isValidClaudeSemanticVersion(agentVersion)) {
104
+ return undefined;
105
+ }
106
+ return claudeLifecycleCompatibilityProfile(agentVersion) ??
107
+ CLAUDE_UNVERIFIED_LIFECYCLE_PROFILE;
108
+ }
109
+ export function claudeRuntimeCompatibilityWarning(agentVersion) {
110
+ if (!isValidClaudeSemanticVersion(agentVersion) ||
111
+ claudeLifecycleCompatibilityProfile(agentVersion)) {
112
+ return undefined;
113
+ }
114
+ return `Claude Code ${agentVersion} has not been regression-tested by AKK; ` +
115
+ "the command will use the generic compatibility profile and may fail if the UI changed";
116
+ }
70
117
  export function claudeLifecycleBehaviorProfile(agentVersion) {
71
118
  return claudeLifecycleCompatibilityProfile(agentVersion)
72
119
  ?.lifecycleBehaviorProfile;
@@ -79,14 +126,12 @@ export function supportedClaudeLifecycleVersions() {
79
126
  return Object.keys(CLAUDE_LIFECYCLE_PROFILES);
80
127
  }
81
128
  export function claudeLifecycleSourceVersionSupported(runningAgentVersion, sourceAgentVersion) {
82
- if (!sourceAgentVersion) {
83
- return false;
84
- }
85
- return claudeLifecycleCompatibilityProfile(runningAgentVersion)
86
- ?.resumableSourceVersions.includes(sourceAgentVersion) === true;
129
+ return isValidClaudeSemanticVersion(runningAgentVersion) &&
130
+ isValidClaudeSemanticVersion(sourceAgentVersion);
87
131
  }
88
132
  export function profiledClaudeNativeStatusPanelFields() {
89
133
  return [...new Set(Object.values(CLAUDE_LIFECYCLE_PROFILES)
134
+ .concat(CLAUDE_UNVERIFIED_LIFECYCLE_PROFILE)
90
135
  .flatMap((profile) => profile.nativeStatusPanelFields))];
91
136
  }
92
137
  //# sourceMappingURL=claude-lifecycle-compatibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-lifecycle-compatibility.js","sourceRoot":"","sources":["../../src/claude-lifecycle-compatibility.ts"],"names":[],"mappings":"AAUA,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC;IACvD,SAAS;IACT,cAAc;IACd,YAAY;IACZ,KAAK;IACL,YAAY;IACZ,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,iBAAiB;CAClB,CAAC,CAAC;AAEH,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC;IACvD,SAAS;IACT,cAAc;IACd,YAAY;IACZ,cAAc;IACd,KAAK;IACL,YAAY;IACZ,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,iBAAiB;CAClB,CAAC,CAAC;AAEH,MAAM,yBAAyB,GAE3B,MAAM,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACvB,wBAAwB,EAAE,qBAAqB;QAC/C,+BAA+B,EAC7B,mCAAmC;QACrC,gCAAgC,EAAE,EAAE;QACpC,uCAAuC,EAAE,KAAK;QAC9C,uBAAuB,EAAE,kCAAkC;QAC3D,+BAA+B,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,uBAAuB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;KACpD,CAAC;IACF,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACvB,wBAAwB,EAAE,qBAAqB;QAC/C,+BAA+B,EAC7B,mCAAmC;QACrC,gCAAgC,EAAE,EAAE;QACpC,uCAAuC,EAAE,KAAK;QAC9C,uBAAuB,EAAE,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AAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,mCAAmC,CAAC,mBAAmB,CAAC;QAC7D,EAAE,uBAAuB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,qCAAqC;IACnD,OAAO,CAAC,GAAG,IAAI,GAAG,CAChB,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC;aACrC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,CACzD,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"claude-lifecycle-compatibility.js","sourceRoot":"","sources":["../../src/claude-lifecycle-compatibility.ts"],"names":[],"mappings":"AAUA,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC;IACvD,SAAS;IACT,cAAc;IACd,YAAY;IACZ,KAAK;IACL,YAAY;IACZ,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,iBAAiB;CAClB,CAAC,CAAC;AAEH,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC;IACvD,SAAS;IACT,cAAc;IACd,YAAY;IACZ,cAAc;IACd,KAAK;IACL,YAAY;IACZ,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,iBAAiB;CAClB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAC1B,6CAA6C,CAAC;AAEhD,MAAM,CAAC,MAAM,4CAA4C,GACvD,mCAAmC,CAAC;AACtC,MAAM,CAAC,MAAM,oDAAoD,GAC/D,yCAAyC,CAAC;AAE5C,MAAM,yBAAyB,GAE3B,MAAM,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACvB,wBAAwB,EAAE,qBAAqB;QAC/C,+BAA+B,EAC7B,mCAAmC;QACrC,gCAAgC,EAAE,EAAE;QACpC,uCAAuC,EAAE,KAAK;QAC9C,uBAAuB,EAAE,kCAAkC;QAC3D,+BAA+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;AAED,MAAM,UAAU,qCAAqC,CACnD,mBAAuC,EACvC,kBAAsC;IAEtC,OAAO,4BAA4B,CAAC,mBAAmB,CAAC;QACtD,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,qCAAqC;IACnD,OAAO,CAAC,GAAG,IAAI,GAAG,CAChB,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC;aACrC,MAAM,CAAC,mCAAmC,CAAC;aAC3C,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,CACzD,CAAC,CAAC;AACL,CAAC"}
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
2
2
  import fs from "node:fs";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
- import { claudeLifecycleBehaviorProfile, claudeLifecycleSourceVersionSupported, DEFAULT_CLAUDE_LIFECYCLE_VERSION, supportedClaudeLifecycleVersions } from "./claude-lifecycle-compatibility.js";
5
+ import { claudeLifecycleSourceVersionSupported, claudeRuntimeLifecycleCompatibilityProfile, DEFAULT_CLAUDE_LIFECYCLE_VERSION, } from "./claude-lifecycle-compatibility.js";
6
6
  import { redactString } from "./runtime-log.js";
7
7
  import { isRecord } from "./value-guards.js";
8
8
  import { validateTerminalSubmissionAcceptanceEvidence } from "./terminal-submission-facts.js";
@@ -27,9 +27,8 @@ export function listClaudeHistoricalSessions(options) {
27
27
  const cwd = path.resolve(options.cwd);
28
28
  const claudeHome = path.resolve(options.claudeHome ?? defaultClaudeHome());
29
29
  const agentVersion = options.agentVersion ?? DEFAULT_CLAUDE_LIFECYCLE_VERSION;
30
- if (!claudeLifecycleBehaviorProfile(agentVersion)) {
31
- throw new Error("Claude lifecycle candidates require one of the supported exact versions: " +
32
- supportedClaudeLifecycleVersions().join(", "));
30
+ if (!claudeRuntimeLifecycleCompatibilityProfile(agentVersion)) {
31
+ throw new Error("Claude lifecycle candidates require a complete x.y.z Claude Code version");
33
32
  }
34
33
  const projectsRoot = projectsRootPath(claudeHome);
35
34
  if (!isRealDirectory(projectsRoot)) {
@@ -112,7 +111,7 @@ export function revalidateClaudeThreadLifecycleCandidate(candidate, options) {
112
111
  !path.isAbsolute(token.cwd) ||
113
112
  path.resolve(token.cwd) !== path.resolve(options.cwd) ||
114
113
  !CLAUDE_SESSION_ID_PATTERN.test(token.nativeThreadId) ||
115
- !claudeLifecycleBehaviorProfile(options.agentVersion)) {
114
+ !claudeRuntimeLifecycleCompatibilityProfile(options.agentVersion)) {
116
115
  return {
117
116
  status: "unsafe",
118
117
  reason: "candidate is not an exact Claude root-interactive session"
@@ -173,7 +172,7 @@ export function revalidateClaudeThreadLifecycleCandidate(candidate, options) {
173
172
  function inspectClaudeHistoricalSession({ projectsRoot, cwd, sessionId, agentVersion }) {
174
173
  if (!isRealDirectory(projectsRoot) ||
175
174
  !CLAUDE_SESSION_ID_PATTERN.test(sessionId) ||
176
- !claudeLifecycleBehaviorProfile(agentVersion)) {
175
+ !claudeRuntimeLifecycleCompatibilityProfile(agentVersion)) {
177
176
  return undefined;
178
177
  }
179
178
  const relativePath = expectedTranscriptRelativePath(sessionId, cwd);