@scotthuang/agent-knock-knock 0.13.16 → 0.13.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 (184) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +4 -4
  3. package/dist/src/claude-terminal-agent-adapter.js +1 -1
  4. package/dist/src/claude-terminal-agent-adapter.js.map +1 -1
  5. package/dist/src/codex-app-server-interaction-client.js +68 -26
  6. package/dist/src/codex-app-server-interaction-client.js.map +1 -1
  7. package/dist/src/codex-app-server-read-client.js +52 -20
  8. package/dist/src/codex-app-server-read-client.js.map +1 -1
  9. package/dist/src/codex-astra-composer-proof.js +1 -1
  10. package/dist/src/codex-astra-composer-proof.js.map +1 -1
  11. package/dist/src/codex-async-question-adapter.js +14 -4
  12. package/dist/src/codex-async-question-adapter.js.map +1 -1
  13. package/dist/src/codex-lifecycle-compatibility.d.ts +1 -1
  14. package/dist/src/codex-lifecycle-compatibility.js +9 -3
  15. package/dist/src/codex-lifecycle-compatibility.js.map +1 -1
  16. package/dist/src/codex-open-rollout-inventory.d.ts +51 -0
  17. package/dist/src/codex-open-rollout-inventory.js +365 -0
  18. package/dist/src/codex-open-rollout-inventory.js.map +1 -0
  19. package/dist/src/codex-paginated-thread-binding.js +1 -1
  20. package/dist/src/codex-paginated-thread-binding.js.map +1 -1
  21. package/dist/src/codex-permission-surface.d.ts +1 -1
  22. package/dist/src/codex-permission-surface.js +1 -1
  23. package/dist/src/codex-permission-surface.js.map +1 -1
  24. package/dist/src/codex-rollout-bound-completion.d.ts +44 -0
  25. package/dist/src/codex-rollout-bound-completion.js +357 -0
  26. package/dist/src/codex-rollout-bound-completion.js.map +1 -0
  27. package/dist/src/codex-rollout-file.d.ts +15 -0
  28. package/dist/src/codex-rollout-file.js +98 -0
  29. package/dist/src/codex-rollout-file.js.map +1 -0
  30. package/dist/src/codex-rollout-human-task.d.ts +61 -0
  31. package/dist/src/codex-rollout-human-task.js +555 -0
  32. package/dist/src/codex-rollout-human-task.js.map +1 -0
  33. package/dist/src/codex-rollout-interaction-evidence.d.ts +48 -0
  34. package/dist/src/codex-rollout-interaction-evidence.js +521 -0
  35. package/dist/src/codex-rollout-interaction-evidence.js.map +1 -0
  36. package/dist/src/codex-rollout-inventory.d.ts +5 -0
  37. package/dist/src/codex-rollout-inventory.js +81 -0
  38. package/dist/src/codex-rollout-inventory.js.map +1 -0
  39. package/dist/src/codex-rollout-records.d.ts +49 -0
  40. package/dist/src/codex-rollout-records.js +298 -0
  41. package/dist/src/codex-rollout-records.js.map +1 -0
  42. package/dist/src/codex-sqlite-thread-query.d.ts +85 -0
  43. package/dist/src/codex-sqlite-thread-query.js +440 -0
  44. package/dist/src/codex-sqlite-thread-query.js.map +1 -0
  45. package/dist/src/codex-status-history-navigation.d.ts +1 -1
  46. package/dist/src/codex-status-history-navigation.js +1 -1
  47. package/dist/src/codex-status-history-navigation.js.map +1 -1
  48. package/dist/src/codex-store-adapter.d.ts +3 -50
  49. package/dist/src/codex-store-adapter.js +5 -796
  50. package/dist/src/codex-store-adapter.js.map +1 -1
  51. package/dist/src/codex-terminal-agent-adapter.js +4 -2
  52. package/dist/src/codex-terminal-agent-adapter.js.map +1 -1
  53. package/dist/src/native-thread-lifecycle-cli-adapter.d.ts +4 -134
  54. package/dist/src/native-thread-lifecycle-cli-adapter.js +19 -633
  55. package/dist/src/native-thread-lifecycle-cli-adapter.js.map +1 -1
  56. package/dist/src/native-thread-lifecycle-cli-contract.d.ts +138 -0
  57. package/dist/src/native-thread-lifecycle-cli-contract.js +2 -0
  58. package/dist/src/native-thread-lifecycle-cli-contract.js.map +1 -0
  59. package/dist/src/semantic-permission-control.js +33 -6
  60. package/dist/src/semantic-permission-control.js.map +1 -1
  61. package/dist/src/semantic-tool-descriptions.d.ts +26 -0
  62. package/dist/src/semantic-tool-descriptions.js +259 -0
  63. package/dist/src/semantic-tool-descriptions.js.map +1 -0
  64. package/dist/src/semantic-tool-runtime.js +45 -37
  65. package/dist/src/semantic-tool-runtime.js.map +1 -1
  66. package/dist/src/semantic-tool-schemas.js +134 -33
  67. package/dist/src/semantic-tool-schemas.js.map +1 -1
  68. package/dist/src/terminal-action-contracts.d.ts +4 -0
  69. package/dist/src/terminal-action-contracts.js +695 -0
  70. package/dist/src/terminal-action-contracts.js.map +1 -0
  71. package/dist/src/terminal-composer-classifier.d.ts +1 -1
  72. package/dist/src/terminal-composer-classifier.js +2 -2
  73. package/dist/src/terminal-composer-classifier.js.map +1 -1
  74. package/dist/src/terminal-interaction-response-bridge.js +1 -1
  75. package/dist/src/terminal-interaction-response-bridge.js.map +1 -1
  76. package/dist/src/terminal-list-renderer.d.ts +1 -2
  77. package/dist/src/terminal-list-renderer.js +8 -424
  78. package/dist/src/terminal-list-renderer.js.map +1 -1
  79. package/dist/src/terminal-model-control-action-policy.d.ts +1 -1
  80. package/dist/src/terminal-model-control-availability.d.ts +1 -1
  81. package/dist/src/terminal-model-control-availability.js +1 -1
  82. package/dist/src/terminal-model-control-availability.js.map +1 -1
  83. package/dist/src/terminal-model-control-cli-adapter.d.ts +34 -0
  84. package/dist/src/terminal-model-control-cli-adapter.js +669 -0
  85. package/dist/src/terminal-model-control-cli-adapter.js.map +1 -0
  86. package/dist/src/terminal-model-control-contract.d.ts +198 -0
  87. package/dist/src/terminal-model-control-contract.js +15 -0
  88. package/dist/src/terminal-model-control-contract.js.map +1 -0
  89. package/dist/src/terminal-model-control-input.d.ts +29 -0
  90. package/dist/src/terminal-model-control-input.js +86 -0
  91. package/dist/src/terminal-model-control-input.js.map +1 -0
  92. package/dist/src/terminal-model-control-profile.d.ts +5 -1
  93. package/dist/src/terminal-model-control-profile.js +21 -7
  94. package/dist/src/terminal-model-control-profile.js.map +1 -1
  95. package/dist/src/terminal-model-control-subject.d.ts +52 -0
  96. package/dist/src/terminal-model-control-subject.js +73 -0
  97. package/dist/src/terminal-model-control-subject.js.map +1 -1
  98. package/dist/src/terminal-model-control-surface.d.ts +82 -0
  99. package/dist/src/terminal-model-control-surface.js +688 -0
  100. package/dist/src/terminal-model-control-surface.js.map +1 -0
  101. package/dist/src/terminal-model-control.d.ts +6 -270
  102. package/dist/src/terminal-model-control.js +11 -988
  103. package/dist/src/terminal-model-control.js.map +1 -1
  104. package/dist/src/terminal-model-selection.d.ts +33 -0
  105. package/dist/src/terminal-model-selection.js +143 -0
  106. package/dist/src/terminal-model-selection.js.map +1 -0
  107. package/dist/src/terminal-monitor-application-service.js +38 -59
  108. package/dist/src/terminal-monitor-application-service.js.map +1 -1
  109. package/dist/src/terminal-monitor-attention-store.d.ts +65 -0
  110. package/dist/src/terminal-monitor-attention-store.js +518 -0
  111. package/dist/src/terminal-monitor-attention-store.js.map +1 -0
  112. package/dist/src/terminal-monitor-collateral-recovery.d.ts +12 -0
  113. package/dist/src/terminal-monitor-collateral-recovery.js +415 -0
  114. package/dist/src/terminal-monitor-collateral-recovery.js.map +1 -0
  115. package/dist/src/terminal-monitor-interaction-projection.d.ts +19 -0
  116. package/dist/src/terminal-monitor-interaction-projection.js +48 -0
  117. package/dist/src/terminal-monitor-interaction-projection.js.map +1 -0
  118. package/dist/src/terminal-monitor-startup-recovery.d.ts +15 -0
  119. package/dist/src/terminal-monitor-startup-recovery.js +767 -0
  120. package/dist/src/terminal-monitor-startup-recovery.js.map +1 -0
  121. package/dist/src/terminal-monitor-state-cli-adapter.d.ts +2 -104
  122. package/dist/src/terminal-monitor-state-cli-adapter.js +28 -1640
  123. package/dist/src/terminal-monitor-state-cli-adapter.js.map +1 -1
  124. package/dist/src/terminal-monitor-state-contract.d.ts +108 -0
  125. package/dist/src/terminal-monitor-state-contract.js +8 -0
  126. package/dist/src/terminal-monitor-state-contract.js.map +1 -0
  127. package/dist/src/terminal-native-inspection-bridge.d.ts +4 -153
  128. package/dist/src/terminal-native-inspection-bridge.js +7 -646
  129. package/dist/src/terminal-native-inspection-bridge.js.map +1 -1
  130. package/dist/src/terminal-native-inspection-contract.d.ts +128 -0
  131. package/dist/src/terminal-native-inspection-contract.js +38 -0
  132. package/dist/src/terminal-native-inspection-contract.js.map +1 -0
  133. package/dist/src/terminal-native-inspection-profile.d.ts +15 -0
  134. package/dist/src/terminal-native-inspection-profile.js +189 -0
  135. package/dist/src/terminal-native-inspection-profile.js.map +1 -0
  136. package/dist/src/terminal-native-inspection-proof.d.ts +62 -0
  137. package/dist/src/terminal-native-inspection-proof.js +362 -0
  138. package/dist/src/terminal-native-inspection-proof.js.map +1 -0
  139. package/dist/src/terminal-permission-control-bridge.js +1 -1
  140. package/dist/src/terminal-permission-control-bridge.js.map +1 -1
  141. package/dist/src/terminal-permission-control.js +5 -1
  142. package/dist/src/terminal-permission-control.js.map +1 -1
  143. package/dist/src/terminal-questionnaire-adapter.js +5 -2
  144. package/dist/src/terminal-questionnaire-adapter.js.map +1 -1
  145. package/dist/src/terminal-runtime-cli-adapter.d.ts +2 -1
  146. package/dist/src/terminal-runtime-cli-adapter.js +1 -1
  147. package/dist/src/terminal-runtime-cli-adapter.js.map +1 -1
  148. package/dist/src/terminal-submission-acceptance.d.ts +5 -148
  149. package/dist/src/terminal-submission-acceptance.js +21 -1845
  150. package/dist/src/terminal-submission-acceptance.js.map +1 -1
  151. package/dist/src/terminal-watch-anchor-capture.d.ts +9 -0
  152. package/dist/src/terminal-watch-anchor-capture.js +139 -0
  153. package/dist/src/terminal-watch-anchor-capture.js.map +1 -0
  154. package/dist/src/terminal-watch-cli-adapter.d.ts +3 -117
  155. package/dist/src/terminal-watch-cli-adapter.js +10 -1992
  156. package/dist/src/terminal-watch-cli-adapter.js.map +1 -1
  157. package/dist/src/terminal-watch-cli-contract.d.ts +117 -0
  158. package/dist/src/terminal-watch-cli-contract.js +2 -0
  159. package/dist/src/terminal-watch-cli-contract.js.map +1 -0
  160. package/dist/src/terminal-watch-fallback-observation.d.ts +15 -0
  161. package/dist/src/terminal-watch-fallback-observation.js +249 -0
  162. package/dist/src/terminal-watch-fallback-observation.js.map +1 -0
  163. package/dist/src/terminal-watch-interaction-observation.d.ts +26 -0
  164. package/dist/src/terminal-watch-interaction-observation.js +262 -0
  165. package/dist/src/terminal-watch-interaction-observation.js.map +1 -0
  166. package/dist/src/terminal-watch-observation-adapter.d.ts +4 -0
  167. package/dist/src/terminal-watch-observation-adapter.js +307 -0
  168. package/dist/src/terminal-watch-observation-adapter.js.map +1 -0
  169. package/dist/src/terminal-watch-observation-evidence.d.ts +25 -0
  170. package/dist/src/terminal-watch-observation-evidence.js +184 -0
  171. package/dist/src/terminal-watch-observation-evidence.js.map +1 -0
  172. package/dist/src/terminal-watch-response-authority.d.ts +6 -0
  173. package/dist/src/terminal-watch-response-authority.js +333 -0
  174. package/dist/src/terminal-watch-response-authority.js.map +1 -0
  175. package/dist/src/terminal-watch-response-cli-adapter.d.ts +3 -0
  176. package/dist/src/terminal-watch-response-cli-adapter.js +230 -0
  177. package/dist/src/terminal-watch-response-cli-adapter.js.map +1 -0
  178. package/dist/src/terminal-watch-terminal-identity.d.ts +39 -0
  179. package/dist/src/terminal-watch-terminal-identity.js +380 -0
  180. package/dist/src/terminal-watch-terminal-identity.js.map +1 -0
  181. package/docs/codex-0.160.0-compatibility.md +126 -0
  182. package/docs/codex-permissions.md +12 -1
  183. package/package.json +3 -2
  184. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +3 -3
@@ -0,0 +1,695 @@
1
+ export const TERMINAL_WATCH_ACTION_USE = "Observe this exact terminal without sending input. AKK uses an exact task " +
2
+ "anchor when available and otherwise falls back to best-effort terminal " +
3
+ "activity. Call agent_knock_knock_watch with this exact terminal_id; " +
4
+ "version, ownership, and artifact uncertainty are warnings rather than " +
5
+ "Watch vetoes.";
6
+ export function listActionContracts() {
7
+ return {
8
+ version: 30,
9
+ instructions: actionContractInstructions(),
10
+ field_semantics: actionFieldSemantics(),
11
+ actions: terminalActionCatalog()
12
+ };
13
+ }
14
+ function actionContractInstructions() {
15
+ return [
16
+ "Treat terminals[] as the primary resource and use only mutation actions " +
17
+ "present in available_actions, except the snapshot-bound " +
18
+ "terminals[].handoff_decision.choices.take_over_current.action and an exact " +
19
+ "terminals[].blocking_turns[].recovery_action. Read-only Watch is the " +
20
+ "separate user-intent exception: one complete exact terminal_id may be " +
21
+ "watched even when available_actions.watch is absent. Either nested mutation " +
22
+ "action requires explicit user confirmation; after it succeeds, refresh list " +
23
+ "before any follow-current send.",
24
+ "A merely unverified complete Codex or Claude Code x.y.z version adds " +
25
+ "compatibility_warnings and action compatibility_warning diagnostics without " +
26
+ "vetoing an otherwise eligible action solely for lacking an exact " +
27
+ "regression-tested profile. Known incompatible protocols disable affected " +
28
+ "actions before input. Codex 0.157.0/0.157.1 paginated durable history and " +
29
+ "fullscreen command menus disable managed completion callbacks, native thread " +
30
+ "lifecycle, and automated native status dispatch; explicit terminal Send and " +
31
+ "warning-bearing terminal_activity Watch remain available subject to native " +
32
+ "UI safety checks. That Watch observes terminal activity without proving " +
33
+ "exact task completion. Execute only the advertised mutation actions; actual " +
34
+ "UI, artifact, identity, and postcondition evidence decides success. Never " +
35
+ "automatically retry a result that says terminal input may already have " +
36
+ "occurred.",
37
+ "A terminal_user_explicit send is the user's physical-terminal authority. It " +
38
+ "is gated only by one exact live physical terminal/process, a scanned, " +
39
+ "non-blocked approval state, no active native questionnaire, and no " +
40
+ "positively identified menu, editor, history search, or read-only viewer that " +
41
+ "owns input; parsed working activity and Codex rollout ambiguity do not veto " +
42
+ "it; Composer visibility, stability, exactness, or existing draft contents do " +
43
+ "not veto it; and AKK Turn, Session, deferred-transfer, transition, ledger, " +
44
+ "and Store health are not eligibility vetoes. Codex clears the current " +
45
+ "Composer once with C-u; Claude Code uses a sentinel-backed native C-s " +
46
+ "stash-clear transaction that is independent of the cursor position and does " +
47
+ "not interrupt an active turn, then proves the main Composer empty. Each then " +
48
+ "injects the new request, waits through the paste window, and dispatches " +
49
+ "Enter exactly once. After text injection, no Composer observation may veto " +
50
+ "Enter. AKK tries the managed fast path first; a source-less Codex pane " +
51
+ "freezes all current rollout roots and binds a provisional Session/Turn only " +
52
+ "after one anchored or newly opened rollout durably accepts the exact request " +
53
+ "hash. Zero matches stay pending; multiple matches or identity drift become " +
54
+ "uncertain without replay. If managed preparation fails before input, AKK " +
55
+ "performs the physical fallback as unmanaged work, best-effort attaches an " +
56
+ "exact Terminal Watch callback, then releases conflicting AKK management. " +
57
+ "Once exact request acceptance and terminal attribution are established, that " +
58
+ "Watch may expose a supported exact questionnaire as an owner-bound response " +
59
+ "offer through status and watch_id; terminal-activity observations and " +
60
+ "manual_required interactions remain notification-only. When runtime " +
61
+ "durability is available, an omitted target binds its message_id to the first " +
62
+ "selected physical terminal and an existing or possibly existing same-ID " +
63
+ "record rejects automatic replay. If no record exists and durability is " +
64
+ "unavailable, user priority wins: AKK proceeds with a warning, and callers " +
65
+ "must not automatically retry that degraded result. The fallback creates no " +
66
+ "managed callback Turn; Watch attachment failure is reported without changing " +
67
+ "a successful Send. Send output separates terminal_input_dispatched, " +
68
+ "agent_acceptance, management_mode, observation_mode, and " +
69
+ "callback/interaction capabilities. Once its sole mutation sequence begins, " +
70
+ "an uncertain result must not be retried automatically; watch-status remains " +
71
+ "the callback recovery path.",
72
+ "The session_exact scope uses session_id only when it is prefilled by the " +
73
+ "listed send action. A rollout-backed managed Codex pane instead uses the " +
74
+ "terminal_follow_current scope with its exact terminal_id because even one " +
75
+ "materialized rollout does not prove the current TUI foreground thread. AKK " +
76
+ "derives and revalidates current terminal authority internally. A turn id is " +
77
+ "never an ordinary send target.",
78
+ "A user-explicit raw terminal selector, or a uniquely delegated raw send with " +
79
+ "no selector, is only a discovery choice. If that terminal already has one " +
80
+ "rollout-backed managed Codex source, the managed fast path captures fresh " +
81
+ "candidate authority under the terminal and Store locks and still uses the " +
82
+ "same v3 follow-current transfer; it never degrades to sole-root strict " +
83
+ "continuation. If that managed path proves zero input and fails, the separate " +
84
+ "terminal_user_explicit path may deliver once as unmanaged work.",
85
+ "Read-only native-thread listing targets an exact terminal_id. Native-thread " +
86
+ "new/resume mutations use terminal_id and, for resume, one complete " +
87
+ "native_thread_id; AKK resolves and revalidates current lifecycle authority " +
88
+ "internally. They never create a Turn.",
89
+ "Native inspection is a separate terminal action: use only its closed " +
90
+ "inspection enum and current exact terminal_id. AKK resolves current " +
91
+ "lifecycle authority internally, and AKK status does not execute a native " +
92
+ "slash command.",
93
+ "Native model control is a separate explicit exact-physical-pane action. " +
94
+ "model_options requires one currently advertised terminal_id, an exact live " +
95
+ "pane/process, no approval, questionnaire/editor, read-only viewer, or active " +
96
+ "Turn, and either an idle empty Composer or one stable profiled Codex " +
97
+ "0.154.0/0.155.1 /model Composer residual. It obtains choices dynamically " +
98
+ "from the native catalog. Profiled Codex 0.154.0/0.155.1 requires either one " +
99
+ "exact current native Session or a verified-zero-rollout pane; Claude still " +
100
+ "requires one exact current native Session. identify_foreground is diagnostic " +
101
+ "rather than a prerequisite. For an exact Composer residual, model_options " +
102
+ "uses separate residual-bound authority to continue that same native slash " +
103
+ "command into read-only discovery. Whether entered from empty or a residual, " +
104
+ "model_options must dismiss to exact empty, consume any residual-entry " +
105
+ "authority, and return a fresh ordinary one-shot set_model offer. An " +
106
+ "already-open exact native picker is never advertised as model_options: List " +
107
+ "marks it non-idle and advertises repair_model_control only. " +
108
+ "repair_model_control is cleanup-only: it never presses Enter, never offers " +
109
+ "or continues into set_model, and requires refresh List then model_options " +
110
+ "after restoring empty. set_model consumes one exact model/reasoning-effort " +
111
+ "tuple from that same-controller catalog offer, revalidates every physical " +
112
+ "and UI boundary under lock, and reports uncertain without automatic retry " +
113
+ "when its postcondition cannot be proven.",
114
+ "Foreground identification is an explicit Codex-only diagnostic for an exact " +
115
+ "empty idle Composer whose native identity is unresolved. identify_foreground " +
116
+ "sends exactly one closed /status under the terminal lock, mutates no Store " +
117
+ "state, and returns a 30-second pane/process/cwd/screen-bound observation " +
118
+ "that grants no later authority. identify_and_send keeps that same terminal " +
119
+ "lock, revalidates the observation, and sends one task; it never falls back " +
120
+ "to unmanaged delivery. Final Session identity still comes only from the " +
121
+ "rollout that uniquely accepts the exact task. Ordinary list, status, and " +
122
+ "send never invoke this probe.",
123
+ "Terminal Watch is a read-only user-directed observation of one exact live " +
124
+ "terminal. AKK prefers an exact durable task anchor and otherwise degrades to " +
125
+ "best-effort terminal-activity observation; version, artifact, managed " +
126
+ "ownership, and stale action-advertisement uncertainty produce warnings " +
127
+ "rather than vetoing Watch. It sends no terminal input and creates no AKK " +
128
+ "Session or Turn. Pass the exact terminal_id and use watch_id for later " +
129
+ "status or unwatch operations.",
130
+ "A verified, idle human native-thread switch may expose a terminal-scoped " +
131
+ "send; that action atomically adopts the live context before creating its " +
132
+ "Turn. A conclusively ended Codex rollout may expose the same snapshot-bound " +
133
+ "operation only after AKK proves zero current rollout and an exact empty " +
134
+ "composer; it detaches the ended Session and creates an isolated virgin " +
135
+ "Session. A status-card-only zero-rollout source or any otherwise eligible " +
136
+ "quiescent rollout-backed source with a complete nonempty pinned open-rollout " +
137
+ "inventory may also expose this exact action. One materialized rollout does " +
138
+ "not prove the current Codex TUI foreground thread, and a /clear resume hint " +
139
+ "is diagnostic only. AKK freezes any released predecessor Turn history, " +
140
+ "submits the ordinary task once, and binds a separate provisional Session " +
141
+ "only after one post-anchor rollout uniquely accepts that exact request. The " +
142
+ "accepted UUID may equal or differ from the predecessor without merging their " +
143
+ "Session lineages, and narrow panes do not require /status. Until that " +
144
+ "promotion commits, strict session_id send, respond, approve, cancel, native " +
145
+ "lifecycle, and native_inspect remain unavailable, and the provisional " +
146
+ "binding has no callback authority. If dispatch, acceptance, or post-submit " +
147
+ "binding is uncertain, do not retry automatically. Explicit Close always " +
148
+ "honors the user's decision to release AKK management of the selected Turn; " +
149
+ "it sends no terminal input, never stops the coding agent or pane, and " +
150
+ "reports best-effort cleanup warnings without vetoing the Close. Refresh list " +
151
+ "afterward and use Watch when the coding agent is still working. Other " +
152
+ "input-producing binding actions remain fail-closed.",
153
+ "List resumable threads before resume; use only a complete native_thread_id and the action returned for that candidate.",
154
+ "Structured follow-current actions use only the exact terminal_id prefilled " +
155
+ "by that terminal row. Human slash commands may use an explicitly named " +
156
+ "discovery selector. AKK resolves and revalidates current action authority " +
157
+ "internally; never infer or guess a target.",
158
+ "Use respond only for an in-flight turn that is explicitly waiting for OpenClaw.",
159
+ "A native interaction response is a separate status-bound mutation. In the " +
160
+ "same controller conversation, call agent_knock_knock_status for the exact " +
161
+ "managed Turn or response-capable exact Watch, review its current pending " +
162
+ "interaction_state, and then call agent_knock_knock_respond_interaction with " +
163
+ "exactly one matching subject id (turn_id or watch_id), plus only that " +
164
+ "projection's interaction_id, question_id, and option_id values or bounded " +
165
+ "typed text. A Codex async_question defaults to advertised steer_current_turn " +
166
+ "and optionally accepts advertised queue_next_turn as delivery_mode; a " +
167
+ "blocking questionnaire forbids it. One call resolves only the current step; " +
168
+ "refresh status before every later question or final confirmation. " +
169
+ "Terminal-activity Watch observations and manual_required interactions are " +
170
+ "notification-only. Never invent semantic ids, expose private prompt " +
171
+ "authority, raw keys, or menu indexes, or retry a response whose terminal " +
172
+ "input may have occurred.",
173
+ "Retry submission is never automatic. Only when the current exact Turn " +
174
+ "exposes available_actions.retry_submission, ask for explicit user " +
175
+ "confirmation and call its prefilled agent_knock_knock_send {turn_id} form " +
176
+ "unchanged. It never accepts replacement text or caller-selected terminal, " +
177
+ "Session, timeout, or callback route data, and execution revalidates the " +
178
+ "durable submission and live terminal under lock before any input.",
179
+ "Manual approval binds the exact prompt the user reviewed. After explicit " +
180
+ "confirmation, call only the currently advertised approve action; AKK keeps " +
181
+ "the prompt authority private and recaptures the exact terminal, process, " +
182
+ "request, and prompt before sending a decision key. A prompt without complete " +
183
+ "exact evidence is not approvable.",
184
+ "Managed controls target turn_id. A raw terminal may be controlled only " +
185
+ "through its own list-prefilled conversation_id action. When a Codex managed " +
186
+ "prompt has no usable AKK Turn owner, list may expose one manual " +
187
+ "terminal-scoped approve action after exact observation. It does not mutate " +
188
+ "the Turn or Session binding, has no durable dispatch receipt, and is never " +
189
+ "eligible for automatic approval. If its result is interrupted, refresh " +
190
+ "status and inspect the live prompt instead of retrying blindly.",
191
+ "Start with the action's prefilled arguments, supply every missing_required " +
192
+ "field, and consult the top-level action's optional fields only when needed.",
193
+ "Authoritative full IDs are prefilled; short_ref is for display and human input.",
194
+ "Availability is a snapshot. terminal_user_explicit revalidates the exact " +
195
+ "live process and provider-owned terminal identity plus the scanned, " +
196
+ "non-blocked approval state; AKK recovery state and Codex Composer " +
197
+ "observation never veto it. Other actions revalidate their action-specific " +
198
+ "workspace, activity, management, and recovery authority before side effects."
199
+ ];
200
+ }
201
+ function actionFieldSemantics() {
202
+ return {
203
+ process_state: {
204
+ terminals: "physical_terminal_process_liveness",
205
+ authoritative_for_tool_calls: false
206
+ },
207
+ status: {
208
+ managed_turns: "managed_turn_lifecycle",
209
+ authoritative_for_tool_calls: false
210
+ },
211
+ activity_state: {
212
+ terminals: "legacy_conservative_effective_activity_projection",
213
+ authoritative_for_tool_calls: false
214
+ },
215
+ screen_state: {
216
+ terminals: "live_terminal_screen_activity_classification",
217
+ authoritative_for_tool_calls: false
218
+ },
219
+ screen_reason: {
220
+ terminals: "bounded_evidence_for_screen_state",
221
+ authoritative_for_tool_calls: false
222
+ },
223
+ native_identity_state: {
224
+ terminals: "foreground_native_identity_resolution_without_mutation_authority",
225
+ authoritative_for_tool_calls: false
226
+ },
227
+ durable_activity_state: {
228
+ terminals: "exact_native_artifact_task_activity_when_available",
229
+ authoritative_for_tool_calls: false
230
+ },
231
+ durable_activity_reason: {
232
+ terminals: "bounded_evidence_or_limitation_for_durable_activity_state",
233
+ authoritative_for_tool_calls: false
234
+ },
235
+ managed: {
236
+ current_turn: "the authoritative dispatch-ledger owner, never inferred from history",
237
+ recent_turn: "the latest visible non-owning turn in the current managed session",
238
+ session_id: "the continuing agent context; it is an ordinary-send target only when the " +
239
+ "listed send action explicitly prefills it, and rollout-backed Codex uses the " +
240
+ "listed follow-current terminal action instead",
241
+ binding_id: "the immutable terminal-binding generation currently authorized for this Session",
242
+ history: "older turns, present only with --all"
243
+ },
244
+ available_actions: {
245
+ meaning: "currently_safe_mutation_actions_and_watch_discovery",
246
+ authoritative_for_tool_calls: true,
247
+ read_only_watch_exception: "an explicit exact terminal_id remains callable when available_actions.watch is absent"
248
+ },
249
+ native_agent_identity_observation: {
250
+ meaning: "the latest bounded native identity probe; verified_absent is distinct from an unavailable resolver",
251
+ authoritative_for_tool_calls: false
252
+ },
253
+ management_conflict: {
254
+ verified_empty_native_session: "a previously bound Codex rollout is conclusively closed; only the exact " +
255
+ "snapshot-bound send in available_actions may detach it and create an " +
256
+ "isolated virgin Session"
257
+ },
258
+ handoff_state: {
259
+ meaning: "why a managed conflict-scoped follow-current send is available or blocked; " +
260
+ "it does not veto terminal_user_explicit physical Send",
261
+ verified_empty_native_session_adoptable: "the exact current terminal snapshot permits the listed conflict send; availability is revalidated before terminal input"
262
+ },
263
+ handoff_decision: {
264
+ meaning: "an explicit human choice required before superseding an active source Turn",
265
+ authoritative_action_path: "terminals[].handoff_decision.choices.take_over_current.action",
266
+ requires_explicit_user_confirmation: true,
267
+ after_success: "refresh list before using a follow-current send action"
268
+ },
269
+ blocking_turns: {
270
+ meaning: "terminal-incarnation-wide unresolved managed Turns that suppress managed " +
271
+ "send, lifecycle, and native-inspection actions but never " +
272
+ "terminal_user_explicit physical Send; each exact Turn remains explicitly " +
273
+ "closable even during a deferred transfer or human handoff",
274
+ authoritative_action_path: "terminals[].blocking_turns[].recovery_action",
275
+ requires_explicit_user_confirmation: true,
276
+ after_success: "refresh list before using any terminal action"
277
+ }
278
+ };
279
+ }
280
+ function terminalActionCatalog() {
281
+ return {
282
+ send: {
283
+ tool: "agent_knock_knock_send",
284
+ target_argument: "session_id",
285
+ initial_attach_target_argument: "terminal_id",
286
+ managed_scopes: {
287
+ session_exact: {
288
+ target_arguments: ["session_id"],
289
+ follows_current_terminal: false
290
+ },
291
+ terminal_follow_current: {
292
+ target_arguments: ["terminal_id"],
293
+ follows_current_terminal: true
294
+ }
295
+ },
296
+ initial_attach_scope: "A terminal_user_explicit structured call uses the terminal_id prefilled by " +
297
+ "an exact live terminal row's available send action, or omits the target only " +
298
+ "when exactly one send-ready pane exists. Human slash commands may preserve a " +
299
+ "discovery selector explicitly named by the user. This user-priority scope " +
300
+ "depends only on the exact live physical terminal/process, a scanned, " +
301
+ "non-blocked approval state, and no proven input-owning questionnaire, " +
302
+ "editor, menu, or read-only viewer. Composer visibility, exactness, and " +
303
+ "existing draft contents are advisory. Codex clears the current Composer once " +
304
+ "with C-u; Claude Code uses a sentinel-backed native C-s stash-clear " +
305
+ "transaction that is independent of the cursor position and does not " +
306
+ "interrupt an active turn, then proves the main Composer empty. Each injects " +
307
+ "the request, waits through the paste window, and dispatches Enter exactly " +
308
+ "once without a post-text Composer veto. The managed fast path may require " +
309
+ "exact empty before input. If that managed path cannot deliver before input, " +
310
+ "the physical operation runs once as unmanaged work with no managed callback " +
311
+ "Turn; AKK then best-effort attaches an exact Terminal Watch callback and " +
312
+ "releases stale management. Watch attachment failure never changes a " +
313
+ "successful Send.",
314
+ terminal_user_explicit_composer_policy: "replace_current_composer_and_submit",
315
+ // v28 compatibility alias. New consumers use the agent-neutral field.
316
+ codex_terminal_user_explicit_composer_policy: "replace_current_composer_and_submit",
317
+ required: ["request"],
318
+ optional: [
319
+ "session_id",
320
+ "terminal_id",
321
+ "type",
322
+ "idleTimeoutMinutes",
323
+ "agentTimeoutMinutes",
324
+ "agentHardTimeoutMinutes"
325
+ ],
326
+ unsupported: ["timeoutSeconds"],
327
+ status_card_only_deferred_scope: "A zero-Turn Codex status-card binding has no rollout; only its listed " +
328
+ "follow-current send creates an isolated provisional Session and binds it " +
329
+ "after exact request acceptance. Until promotion commits, strict managed " +
330
+ "controls, native lifecycle, native_inspect, and callback authority remain " +
331
+ "unavailable; an uncertain dispatch, acceptance, or post-submit binding must " +
332
+ "not be retried automatically.",
333
+ candidate_rollout_deferred_scope: "A quiescent rollout-backed Codex source uses a listed follow-current send " +
334
+ "whenever AKK can pin a complete nonempty candidate inventory. Inventory " +
335
+ "status resolved means only that one rollout is materialized; it does not " +
336
+ "prove the current TUI foreground thread. Released predecessor Turn history " +
337
+ "stays read-only while a separate provisional Session sends once and waits " +
338
+ "for one unique post-anchor request acceptance. A /clear resume hint is " +
339
+ "diagnostic only and is not routing authority. Same-UUID and different-UUID " +
340
+ "results keep separate Session lineages; zero, multiple, drifted, or " +
341
+ "uncertain acceptance is never retried blindly. Explicit Close is the " +
342
+ "user-owned escape hatch: it closes the AKK Turn first, then best-effort " +
343
+ "releases only linked AKK metadata without terminal input or coding-agent " +
344
+ "interruption.",
345
+ ordinary_use: "Create a new managed Turn through the exact action listed for the pane when " +
346
+ "the managed fast path succeeds. An explicit session_id never follows the " +
347
+ "pane and is unavailable for rollout-backed Codex Sessions; their listed " +
348
+ "follow-current action binds only the unique exact rollout that accepts the " +
349
+ "submitted request. The managed path can attach an unmanaged pane, adopt one " +
350
+ "verified human-selected native context, detach a verified-empty Codex " +
351
+ "source, or replace an eligible status-card/candidate-rollout source. A " +
352
+ "terminal_user_explicit action gives the user's selected exact live physical " +
353
+ "terminal/process priority over broken AKK internal state: Codex clears the " +
354
+ "current Composer once with C-u; Claude Code uses a sentinel-backed native " +
355
+ "C-s stash-clear transaction that is independent of the cursor position and " +
356
+ "does not interrupt an active turn, then proves the main Composer empty. Each " +
357
+ "injects the request, waits through the paste window, and dispatches Enter " +
358
+ "exactly once without any post-text Composer veto. The unmanaged path has no " +
359
+ "managed callback Turn; it best-effort attaches an exact Terminal Watch " +
360
+ "callback and releases conflicting management afterward. Watch attachment " +
361
+ "failure is a warning and never revokes delivery."
362
+ },
363
+ retry_submission: {
364
+ tool: "agent_knock_knock_send",
365
+ target_argument: "turn_id",
366
+ required: ["turn_id"],
367
+ accepts_only: ["turn_id"],
368
+ creates_turn: false,
369
+ caller_supplies_request_text: false,
370
+ may_retransmit_original_request_text: true,
371
+ retransmit_condition: "durable structured proof that Enter was never attempted plus a positively empty live composer",
372
+ requires_explicit_user_confirmation: true,
373
+ candidate_source: "the current exact managed Turn's available_actions.retry_submission",
374
+ scope: "Recover only the original durable submission whose text injection is proven " +
375
+ "but Enter dispatch remains uncertain. AKK either submits the proven exact " +
376
+ "existing draft once, or retransmits the immutable original request once only " +
377
+ "after structured no-Enter proof and a positively empty live composer. It " +
378
+ "revalidates all terminal, identity, route, composer, and one-shot authority " +
379
+ "under lock and otherwise fails closed."
380
+ },
381
+ watch: {
382
+ tool: "agent_knock_knock_watch",
383
+ target_argument: "terminal_id",
384
+ required: ["terminal_id"],
385
+ optional: ["hardTimeoutMinutes"],
386
+ creates_turn: false,
387
+ creates_session: false,
388
+ sends_terminal_input: false,
389
+ candidate_source: "terminals[].available_actions.watch",
390
+ scope: "Observe the user's exact selected live terminal without input. AKK prefers " +
391
+ "an exact durable task anchor; if version, artifact, task, managed-ownership, " +
392
+ "or action-advertisement evidence cannot support that anchor, Watch remains " +
393
+ "available through a warning-bearing terminal_activity fallback. That " +
394
+ "fallback reports best_effort confidence and stable-idle activity, not proof " +
395
+ "that one exact task completed. Only an absent or unobservable exact " +
396
+ "terminal, or failure to persist the Watch, is a hard error. Watch never " +
397
+ "adopts the task as AKK work or blocks later terminal use."
398
+ },
399
+ unwatch: {
400
+ tool: "agent_knock_knock_unwatch",
401
+ target_argument: "watch_id",
402
+ required: ["watch_id"],
403
+ creates_turn: false,
404
+ creates_session: false,
405
+ sends_terminal_input: false,
406
+ requires_user_intent: true
407
+ },
408
+ new_thread: {
409
+ tool: "agent_knock_knock_new_thread",
410
+ target_argument: "terminal_id",
411
+ required: ["terminal_id"],
412
+ creates_turn: false,
413
+ creates_session: true,
414
+ requires_user_intent: true
415
+ },
416
+ list_resumable_threads: {
417
+ tool: "agent_knock_knock_list_resumable_threads",
418
+ target_argument: "terminal_id",
419
+ required: ["terminal_id"],
420
+ side_effect_free: true
421
+ },
422
+ native_inspect: {
423
+ tool: "agent_knock_knock_native_inspect",
424
+ target_argument: "terminal_id",
425
+ required: ["terminal_id", "inspection"],
426
+ supported_inspections: ["status"],
427
+ creates_turn: false,
428
+ creates_session: false,
429
+ mutates_store: false,
430
+ sends_terminal_input: true,
431
+ candidate_source: "terminals[].available_actions.native_inspect"
432
+ },
433
+ model_options: {
434
+ tool: "agent_knock_knock_model_options",
435
+ target_argument: "terminal_id",
436
+ required: ["terminal_id"],
437
+ creates_turn: false,
438
+ creates_session: false,
439
+ mutates_store: false,
440
+ sends_terminal_input: true,
441
+ input_scope: "Fixed /model discovery, or one residual-bound continuation of that exact command, followed by exact Escape dismissal",
442
+ authority_scopes: [
443
+ "native_session",
444
+ "terminal_user_explicit_model_control",
445
+ "terminal_user_explicit_model_control_residual_entry"
446
+ ],
447
+ native_identity_requirement: {
448
+ codex: "exact_current_session_or_verified_zero_rollout_profile",
449
+ claude: "exact_current_session"
450
+ },
451
+ zero_rollout_codex_supported: true,
452
+ safety_boundary: "Exact live pane/process, no approval, questionnaire/editor, read-only " +
453
+ "viewer, or active Turn, plus either an idle empty Composer or one exact " +
454
+ "stable profiled Codex 0.154.0/0.155.1 /model Composer residual.",
455
+ candidate_source: "terminals[].available_actions.model_options"
456
+ },
457
+ permission_options: {
458
+ tool: "agent_knock_knock_permission_options",
459
+ target_argument: "terminal_id",
460
+ required: ["terminal_id"],
461
+ creates_turn: false,
462
+ creates_session: false,
463
+ mutates_store: false,
464
+ sends_terminal_input: true,
465
+ input_scope: "Closed Codex /status and /permissions discovery, followed by exact dismissal to an empty Composer.",
466
+ authority_scope: "terminal_user_explicit_permission_control",
467
+ safety_boundary: "Exact live pane/process, verified idle empty Composer, no active Turn, " +
468
+ "transition, approval, questionnaire/editor, or viewer.",
469
+ candidate_source: "terminals[].available_actions.permission_options"
470
+ },
471
+ set_permissions: {
472
+ tool: "agent_knock_knock_set_permissions",
473
+ target_argument: "terminal_id",
474
+ required: ["terminal_id", "mode"],
475
+ semantic_choice_source: "The preceding permission_options result in this same controller conversation.",
476
+ scope: "current_session",
477
+ accepts_raw_command_or_keys: false,
478
+ postcondition_required: true,
479
+ uncertain_retry_allowed: false,
480
+ candidate_source: "permission_options.available_actions.set_permissions"
481
+ },
482
+ repair_model_control: {
483
+ tool: "agent_knock_knock_repair_model_control",
484
+ target_argument: "terminal_id",
485
+ required: ["terminal_id"],
486
+ creates_turn: false,
487
+ creates_session: false,
488
+ mutates_store: false,
489
+ sends_terminal_input: true,
490
+ input_scope: "Reversible dismissal and clearing of one exact profiled Codex " +
491
+ "0.154.0/0.155.1 /model Composer residue or open native picker; never Enter, " +
492
+ "task submission, approval, or model selection.",
493
+ authority_scope: "terminal_user_explicit_model_control_repair",
494
+ accepts_raw_command_or_keys: false,
495
+ empty_composer_postcondition_required: true,
496
+ uncertain_retry_allowed: false,
497
+ after_success: "Refresh list, then run model_options before a deliberate set_model attempt.",
498
+ candidate_source: "terminals[].available_actions.repair_model_control"
499
+ },
500
+ set_model: {
501
+ tool: "agent_knock_knock_set_model",
502
+ target_argument: "terminal_id",
503
+ required: ["terminal_id", "model", "reasoning_effort"],
504
+ semantic_tuple_source: "The immediately preceding model_options result in the same controller conversation.",
505
+ authority_scopes: [
506
+ "native_session",
507
+ "terminal_user_explicit_model_control"
508
+ ],
509
+ native_identity_requirement: {
510
+ codex: "exact_current_session_or_verified_zero_rollout_profile",
511
+ claude: "exact_current_session"
512
+ },
513
+ identify_foreground_required: false,
514
+ accepts_raw_command_or_keys: false,
515
+ postcondition_required: true,
516
+ uncertain_retry_allowed: false,
517
+ candidate_source: "model_options.available_actions.set_model"
518
+ },
519
+ identify_foreground: {
520
+ tool: "agent_knock_knock_identify_foreground",
521
+ target_argument: "terminal_id",
522
+ required: ["terminal_id"],
523
+ creates_turn: false,
524
+ creates_session: false,
525
+ mutates_store: false,
526
+ sends_terminal_input: true,
527
+ terminal_submission: "exactly_one_closed_status_probe",
528
+ proof_ttl_ms: 30000,
529
+ proof_grants_authority: false,
530
+ requires_user_intent: true,
531
+ candidate_source: "terminals[].available_actions.identify_foreground"
532
+ },
533
+ identify_and_send: {
534
+ tool: "agent_knock_knock_identify_and_send",
535
+ target_argument: "terminal_id",
536
+ required: ["terminal_id", "request"],
537
+ creates_turn: true,
538
+ creates_session: true,
539
+ sends_terminal_input: true,
540
+ terminal_lock_scope: "status_probe_through_task_dispatch",
541
+ unmanaged_fallback: false,
542
+ final_identity_source: "unique_exact_request_acceptance",
543
+ requires_user_intent: true,
544
+ candidate_source: "terminals[].available_actions.identify_and_send"
545
+ },
546
+ resume_thread: {
547
+ tool: "agent_knock_knock_resume_thread",
548
+ target_argument: "terminal_id",
549
+ required: [
550
+ "terminal_id",
551
+ "native_thread_id"
552
+ ],
553
+ creates_turn: false,
554
+ requires_user_intent: true,
555
+ candidate_source: "list_resumable_threads"
556
+ },
557
+ reconcile_binding: {
558
+ tool: "agent_knock_knock_reconcile_binding",
559
+ target_argument: "terminal_id",
560
+ required: [
561
+ "terminal_id",
562
+ "conflicting_session_id"
563
+ ],
564
+ creates_turn: false,
565
+ sends_terminal_input: false,
566
+ requires_user_intent: true,
567
+ effect: "Detach one exactly listed conflicting Session binding without adopting the live replacement thread."
568
+ },
569
+ respond: {
570
+ tool: "agent_knock_knock_respond",
571
+ target_argument: "turn_id",
572
+ required: ["turn_id", "request"],
573
+ ordinary_use: "Answer an agent question inside the explicitly selected in-flight turn without creating another turn."
574
+ },
575
+ respond_interaction: {
576
+ tool: "agent_knock_knock_respond_interaction",
577
+ target_arguments: {
578
+ exactly_one_of: ["turn_id", "watch_id"]
579
+ },
580
+ managed_target_argument: "turn_id",
581
+ watch_target_argument: "watch_id",
582
+ interaction_argument: "interaction_id",
583
+ required: ["interaction_id", "answers"],
584
+ optional: ["delivery_mode"],
585
+ candidate_source: "terminal_status.interaction_state for a managed Turn or " +
586
+ "watch.interaction_state for a response-capable exact Watch, returned by " +
587
+ "agent_knock_knock_status in the same controller conversation",
588
+ watch_scope: "Only an exact current Watch interaction whose Status projection advertises " +
589
+ "capabilities.respond=true may use watch_id. Terminal-activity and " +
590
+ "manual_required Watch interactions remain notification-only.",
591
+ answer_contract: "Use only the current projection's opaque question_id and option_id values, " +
592
+ "or its bounded typed free_text answer. An async_question defaults to " +
593
+ "advertised steer_current_turn or accepts explicit advertised queue_next_turn " +
594
+ "as delivery_mode; questionnaire forbids delivery_mode. Raw terminal keys, " +
595
+ "menu indexes, rendered labels, prompt fingerprints, versions, and terminal " +
596
+ "commands are not accepted.",
597
+ one_step_per_call: true,
598
+ requires_fresh_status: true,
599
+ requires_same_controller_conversation: true,
600
+ manual_required_sends_input: false,
601
+ uncertain_retry_allowed: false
602
+ },
603
+ status: {
604
+ tool: "agent_knock_knock_status",
605
+ target_arguments: {
606
+ exactly_one_of: ["turn_id", "conversation_id", "watch_id"]
607
+ },
608
+ managed_target_argument: "turn_id",
609
+ watch_target_argument: "watch_id",
610
+ watch_scope: "Use only the authoritative watch_id prefilled by a current Terminal Watch row.",
611
+ compatibility_target_argument: "conversation_id",
612
+ compatibility_scope: "A deprecated legacy Turn alias, or only the exact selector prefilled by an " +
613
+ "unmanaged raw-terminal row's available status action; never construct, " +
614
+ "guess, or reuse it.",
615
+ required: [],
616
+ optional: ["idleTimeoutMinutes", "trace"]
617
+ },
618
+ approve: {
619
+ tool: "agent_knock_knock_approve",
620
+ target_arguments: {
621
+ exactly_one_of: ["turn_id", "terminal_id"]
622
+ },
623
+ managed_target_argument: "turn_id",
624
+ terminal_target_argument: "terminal_id",
625
+ required: [],
626
+ optional: ["decision"],
627
+ decisions: ["approve_once", "reject"],
628
+ decision_scope: "Use only a semantic decision advertised by the current approval action. " +
629
+ "Never pass raw keys, menu indexes, or labels. Omission remains approve_once " +
630
+ "for compatibility.",
631
+ terminal_scoped_scope: "Only the latest list-prefilled Codex terminal_id action may approve a " +
632
+ "managed current prompt without a usable Turn owner. It remains " +
633
+ "human-confirmed, uses private server-bound reviewed-prompt authority, " +
634
+ "revalidates exact terminal/process/Session/dispatch/prompt state before " +
635
+ "keys, never mutates managed state, has no durable dispatch receipt, cannot " +
636
+ "be auto-approved, and must not be blindly retried after an interrupted " +
637
+ "result.",
638
+ approval_authority: "private_server_bound_reviewed_prompt",
639
+ missing_prompt_region_evidence: "not_approvable",
640
+ requires_explicit_user_confirmation: true,
641
+ requires_fresh_status: true
642
+ },
643
+ cancel: {
644
+ tool: "agent_knock_knock_cancel",
645
+ target_argument: "turn_id",
646
+ compatibility_target_argument: "conversation_id",
647
+ compatibility_scope: "A deprecated legacy Turn alias, or only the exact selector prefilled by an " +
648
+ "unmanaged raw-terminal row's available cancellation action; never construct, " +
649
+ "guess, or reuse it.",
650
+ required: ["turn_id"],
651
+ optional: ["idleTimeoutMinutes"],
652
+ requires_user_intent: true
653
+ },
654
+ renew: {
655
+ tool: "agent_knock_knock_renew",
656
+ target_argument: "turn_id",
657
+ compatibility_target_argument: "conversation_id",
658
+ compatibility_scope: "Deprecated legacy Turn alias only; unmanaged raw-terminal rows never advertise renew.",
659
+ required: ["turn_id"],
660
+ optional: ["minutes"]
661
+ },
662
+ retry_callback: {
663
+ tool: "agent_knock_knock_retry_callback",
664
+ target_argument: "turn_id",
665
+ compatibility_target_argument: "conversation_id",
666
+ compatibility_scope: "Deprecated legacy Turn alias only; unmanaged raw-terminal rows never advertise callback retry.",
667
+ required: ["turn_id"]
668
+ },
669
+ close: {
670
+ tool: "agent_knock_knock_close",
671
+ target_argument: "turn_id",
672
+ compatibility_target_argument: "conversation_id",
673
+ compatibility_scope: "A deprecated legacy Turn alias, or only the exact selector prefilled by an " +
674
+ "unmanaged raw-terminal row's orphan-close action; never construct, guess, or " +
675
+ "reuse it.",
676
+ required: ["turn_id"],
677
+ optional: [
678
+ "reason",
679
+ "expected_message_id",
680
+ "expected_transition_id"
681
+ ],
682
+ requires_explicit_user_confirmation: true,
683
+ user_priority: true,
684
+ sends_terminal_input: false,
685
+ stops_coding_agent: false,
686
+ cleanup_policy: "Close the selected AKK Turn first. Linked transfer, Session, ledger, and " +
687
+ "callback cleanup is best-effort; missing, stale, malformed, or newer " +
688
+ "metadata is preserved and reported as a warning rather than blocking Close.",
689
+ handoff_scope: "After explicit confirmation, a handoff Close follows the same user-priority " +
690
+ "management-release path and does not depend on a private live-terminal " +
691
+ "fence."
692
+ }
693
+ };
694
+ }
695
+ //# sourceMappingURL=terminal-action-contracts.js.map