@scotthuang/agent-knock-knock 0.13.16 → 0.13.17
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.
- package/CHANGELOG.md +8 -0
- package/dist/src/claude-terminal-agent-adapter.js +1 -1
- package/dist/src/claude-terminal-agent-adapter.js.map +1 -1
- package/dist/src/codex-app-server-interaction-client.js +68 -26
- package/dist/src/codex-app-server-interaction-client.js.map +1 -1
- package/dist/src/codex-app-server-read-client.js +52 -20
- package/dist/src/codex-app-server-read-client.js.map +1 -1
- package/dist/src/codex-astra-composer-proof.js +1 -1
- package/dist/src/codex-astra-composer-proof.js.map +1 -1
- package/dist/src/codex-open-rollout-inventory.d.ts +51 -0
- package/dist/src/codex-open-rollout-inventory.js +365 -0
- package/dist/src/codex-open-rollout-inventory.js.map +1 -0
- package/dist/src/codex-paginated-thread-binding.js +1 -1
- package/dist/src/codex-paginated-thread-binding.js.map +1 -1
- package/dist/src/codex-rollout-bound-completion.d.ts +44 -0
- package/dist/src/codex-rollout-bound-completion.js +357 -0
- package/dist/src/codex-rollout-bound-completion.js.map +1 -0
- package/dist/src/codex-rollout-file.d.ts +15 -0
- package/dist/src/codex-rollout-file.js +98 -0
- package/dist/src/codex-rollout-file.js.map +1 -0
- package/dist/src/codex-rollout-human-task.d.ts +61 -0
- package/dist/src/codex-rollout-human-task.js +555 -0
- package/dist/src/codex-rollout-human-task.js.map +1 -0
- package/dist/src/codex-rollout-interaction-evidence.d.ts +48 -0
- package/dist/src/codex-rollout-interaction-evidence.js +521 -0
- package/dist/src/codex-rollout-interaction-evidence.js.map +1 -0
- package/dist/src/codex-rollout-inventory.d.ts +5 -0
- package/dist/src/codex-rollout-inventory.js +81 -0
- package/dist/src/codex-rollout-inventory.js.map +1 -0
- package/dist/src/codex-rollout-records.d.ts +49 -0
- package/dist/src/codex-rollout-records.js +298 -0
- package/dist/src/codex-rollout-records.js.map +1 -0
- package/dist/src/codex-sqlite-thread-query.d.ts +85 -0
- package/dist/src/codex-sqlite-thread-query.js +440 -0
- package/dist/src/codex-sqlite-thread-query.js.map +1 -0
- package/dist/src/codex-status-history-navigation.d.ts +1 -1
- package/dist/src/codex-status-history-navigation.js +1 -1
- package/dist/src/codex-status-history-navigation.js.map +1 -1
- package/dist/src/codex-store-adapter.d.ts +3 -50
- package/dist/src/codex-store-adapter.js +5 -796
- package/dist/src/codex-store-adapter.js.map +1 -1
- package/dist/src/codex-terminal-agent-adapter.js +1 -1
- package/dist/src/codex-terminal-agent-adapter.js.map +1 -1
- package/dist/src/native-thread-lifecycle-cli-adapter.d.ts +4 -134
- package/dist/src/native-thread-lifecycle-cli-adapter.js +19 -633
- package/dist/src/native-thread-lifecycle-cli-adapter.js.map +1 -1
- package/dist/src/native-thread-lifecycle-cli-contract.d.ts +138 -0
- package/dist/src/native-thread-lifecycle-cli-contract.js +2 -0
- package/dist/src/native-thread-lifecycle-cli-contract.js.map +1 -0
- package/dist/src/semantic-permission-control.js +33 -6
- package/dist/src/semantic-permission-control.js.map +1 -1
- package/dist/src/semantic-tool-descriptions.d.ts +26 -0
- package/dist/src/semantic-tool-descriptions.js +259 -0
- package/dist/src/semantic-tool-descriptions.js.map +1 -0
- package/dist/src/semantic-tool-runtime.js +45 -37
- package/dist/src/semantic-tool-runtime.js.map +1 -1
- package/dist/src/semantic-tool-schemas.js +134 -33
- package/dist/src/semantic-tool-schemas.js.map +1 -1
- package/dist/src/terminal-action-contracts.d.ts +4 -0
- package/dist/src/terminal-action-contracts.js +695 -0
- package/dist/src/terminal-action-contracts.js.map +1 -0
- package/dist/src/terminal-composer-classifier.d.ts +1 -1
- package/dist/src/terminal-composer-classifier.js +2 -2
- package/dist/src/terminal-composer-classifier.js.map +1 -1
- package/dist/src/terminal-interaction-response-bridge.js +1 -1
- package/dist/src/terminal-interaction-response-bridge.js.map +1 -1
- package/dist/src/terminal-list-renderer.d.ts +1 -2
- package/dist/src/terminal-list-renderer.js +8 -424
- package/dist/src/terminal-list-renderer.js.map +1 -1
- package/dist/src/terminal-model-control-action-policy.d.ts +1 -1
- package/dist/src/terminal-model-control-availability.d.ts +1 -1
- package/dist/src/terminal-model-control-availability.js +1 -1
- package/dist/src/terminal-model-control-availability.js.map +1 -1
- package/dist/src/terminal-model-control-cli-adapter.d.ts +34 -0
- package/dist/src/terminal-model-control-cli-adapter.js +669 -0
- package/dist/src/terminal-model-control-cli-adapter.js.map +1 -0
- package/dist/src/terminal-model-control-contract.d.ts +198 -0
- package/dist/src/terminal-model-control-contract.js +15 -0
- package/dist/src/terminal-model-control-contract.js.map +1 -0
- package/dist/src/terminal-model-control-input.d.ts +29 -0
- package/dist/src/terminal-model-control-input.js +86 -0
- package/dist/src/terminal-model-control-input.js.map +1 -0
- package/dist/src/terminal-model-control-profile.d.ts +2 -0
- package/dist/src/terminal-model-control-profile.js +6 -0
- package/dist/src/terminal-model-control-profile.js.map +1 -1
- package/dist/src/terminal-model-control-subject.d.ts +52 -0
- package/dist/src/terminal-model-control-subject.js +73 -0
- package/dist/src/terminal-model-control-subject.js.map +1 -1
- package/dist/src/terminal-model-control-surface.d.ts +82 -0
- package/dist/src/terminal-model-control-surface.js +688 -0
- package/dist/src/terminal-model-control-surface.js.map +1 -0
- package/dist/src/terminal-model-control.d.ts +6 -270
- package/dist/src/terminal-model-control.js +11 -988
- package/dist/src/terminal-model-control.js.map +1 -1
- package/dist/src/terminal-model-selection.d.ts +33 -0
- package/dist/src/terminal-model-selection.js +143 -0
- package/dist/src/terminal-model-selection.js.map +1 -0
- package/dist/src/terminal-monitor-application-service.js +38 -59
- package/dist/src/terminal-monitor-application-service.js.map +1 -1
- package/dist/src/terminal-monitor-attention-store.d.ts +65 -0
- package/dist/src/terminal-monitor-attention-store.js +518 -0
- package/dist/src/terminal-monitor-attention-store.js.map +1 -0
- package/dist/src/terminal-monitor-collateral-recovery.d.ts +12 -0
- package/dist/src/terminal-monitor-collateral-recovery.js +415 -0
- package/dist/src/terminal-monitor-collateral-recovery.js.map +1 -0
- package/dist/src/terminal-monitor-interaction-projection.d.ts +19 -0
- package/dist/src/terminal-monitor-interaction-projection.js +48 -0
- package/dist/src/terminal-monitor-interaction-projection.js.map +1 -0
- package/dist/src/terminal-monitor-startup-recovery.d.ts +15 -0
- package/dist/src/terminal-monitor-startup-recovery.js +767 -0
- package/dist/src/terminal-monitor-startup-recovery.js.map +1 -0
- package/dist/src/terminal-monitor-state-cli-adapter.d.ts +2 -104
- package/dist/src/terminal-monitor-state-cli-adapter.js +28 -1640
- package/dist/src/terminal-monitor-state-cli-adapter.js.map +1 -1
- package/dist/src/terminal-monitor-state-contract.d.ts +108 -0
- package/dist/src/terminal-monitor-state-contract.js +8 -0
- package/dist/src/terminal-monitor-state-contract.js.map +1 -0
- package/dist/src/terminal-native-inspection-bridge.d.ts +4 -153
- package/dist/src/terminal-native-inspection-bridge.js +7 -646
- package/dist/src/terminal-native-inspection-bridge.js.map +1 -1
- package/dist/src/terminal-native-inspection-contract.d.ts +128 -0
- package/dist/src/terminal-native-inspection-contract.js +38 -0
- package/dist/src/terminal-native-inspection-contract.js.map +1 -0
- package/dist/src/terminal-native-inspection-profile.d.ts +15 -0
- package/dist/src/terminal-native-inspection-profile.js +185 -0
- package/dist/src/terminal-native-inspection-profile.js.map +1 -0
- package/dist/src/terminal-native-inspection-proof.d.ts +62 -0
- package/dist/src/terminal-native-inspection-proof.js +362 -0
- package/dist/src/terminal-native-inspection-proof.js.map +1 -0
- package/dist/src/terminal-permission-control-bridge.js +1 -1
- package/dist/src/terminal-permission-control-bridge.js.map +1 -1
- package/dist/src/terminal-runtime-cli-adapter.d.ts +2 -1
- package/dist/src/terminal-runtime-cli-adapter.js +1 -1
- package/dist/src/terminal-runtime-cli-adapter.js.map +1 -1
- package/dist/src/terminal-submission-acceptance.d.ts +5 -148
- package/dist/src/terminal-submission-acceptance.js +21 -1845
- package/dist/src/terminal-submission-acceptance.js.map +1 -1
- package/dist/src/terminal-watch-anchor-capture.d.ts +9 -0
- package/dist/src/terminal-watch-anchor-capture.js +139 -0
- package/dist/src/terminal-watch-anchor-capture.js.map +1 -0
- package/dist/src/terminal-watch-cli-adapter.d.ts +3 -117
- package/dist/src/terminal-watch-cli-adapter.js +10 -1992
- package/dist/src/terminal-watch-cli-adapter.js.map +1 -1
- package/dist/src/terminal-watch-cli-contract.d.ts +117 -0
- package/dist/src/terminal-watch-cli-contract.js +2 -0
- package/dist/src/terminal-watch-cli-contract.js.map +1 -0
- package/dist/src/terminal-watch-fallback-observation.d.ts +15 -0
- package/dist/src/terminal-watch-fallback-observation.js +249 -0
- package/dist/src/terminal-watch-fallback-observation.js.map +1 -0
- package/dist/src/terminal-watch-interaction-observation.d.ts +26 -0
- package/dist/src/terminal-watch-interaction-observation.js +262 -0
- package/dist/src/terminal-watch-interaction-observation.js.map +1 -0
- package/dist/src/terminal-watch-observation-adapter.d.ts +4 -0
- package/dist/src/terminal-watch-observation-adapter.js +307 -0
- package/dist/src/terminal-watch-observation-adapter.js.map +1 -0
- package/dist/src/terminal-watch-observation-evidence.d.ts +25 -0
- package/dist/src/terminal-watch-observation-evidence.js +184 -0
- package/dist/src/terminal-watch-observation-evidence.js.map +1 -0
- package/dist/src/terminal-watch-response-authority.d.ts +6 -0
- package/dist/src/terminal-watch-response-authority.js +333 -0
- package/dist/src/terminal-watch-response-authority.js.map +1 -0
- package/dist/src/terminal-watch-response-cli-adapter.d.ts +3 -0
- package/dist/src/terminal-watch-response-cli-adapter.js +230 -0
- package/dist/src/terminal-watch-response-cli-adapter.js.map +1 -0
- package/dist/src/terminal-watch-terminal-identity.d.ts +39 -0
- package/dist/src/terminal-watch-terminal-identity.js +380 -0
- package/dist/src/terminal-watch-terminal-identity.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
// Model-facing wording is data; execution and authority stay in the tool runtime.
|
|
2
|
+
export const semanticToolDescriptions = {
|
|
3
|
+
akk: "Send coding work through existing Codex or Claude Code shared terminals, " +
|
|
4
|
+
"inspect managed Turns, observe a user-selected terminal with durable " +
|
|
5
|
+
"read-only Terminal Watch, manage native threads, and safely inspect or " +
|
|
6
|
+
"change an idle pane's native model selection or Codex permissions.",
|
|
7
|
+
watch: "Start one durable read-only Terminal Watch for the user's exact selected " +
|
|
8
|
+
"Codex or Claude Code terminal. AKK prefers an exact durable task anchor; if " +
|
|
9
|
+
"version, artifact, task, managed-ownership, or action-advertisement evidence " +
|
|
10
|
+
"is unavailable, it remains callable and returns warnings while using " +
|
|
11
|
+
"best-effort terminal activity. That fallback reports stable-idle activity, " +
|
|
12
|
+
"not proof of exact task completion. Watch creates no AKK Session or Turn, " +
|
|
13
|
+
"sends no terminal input, and never adopts or blocks the terminal task.",
|
|
14
|
+
unwatch: "Stop one exact durable Terminal Watch by its authoritative watch_id. This " +
|
|
15
|
+
"cancels observation only; it sends no terminal input and does not interrupt, " +
|
|
16
|
+
"adopt, or otherwise mutate the human's coding-agent task.",
|
|
17
|
+
list_resumable_threads: "List structurally verified native Codex or Claude Code threads for one exact " +
|
|
18
|
+
"terminal. A valid unverified agent version remains callable with a " +
|
|
19
|
+
"compatibility warning. Resume only a row with resumable=true by passing this " +
|
|
20
|
+
"terminal_id and that row's complete native_thread_id. AKK retains candidate " +
|
|
21
|
+
"and binding freshness evidence privately. Number and short-id fields are " +
|
|
22
|
+
"slash-command display aids, never tool arguments. This is read-only for " +
|
|
23
|
+
"Session/Turn state and creates no AKK Turn.",
|
|
24
|
+
native_inspect: "Execute one closed native status inspection in an exact Codex or Claude Code " +
|
|
25
|
+
"terminal. Verified versions use their regression-tested profile; unverified " +
|
|
26
|
+
"complete x.y.z versions remain callable through the generic runtime protocol " +
|
|
27
|
+
"and return a compatibility warning. Pass only terminal_id and " +
|
|
28
|
+
"inspection=status; AKK refreshes binding authority privately. Arbitrary " +
|
|
29
|
+
"slash commands remain unavailable. This creates no AKK Session, Turn, " +
|
|
30
|
+
"receipt, monitor, or callback.",
|
|
31
|
+
new_thread: "Start and verify a clean native coding-agent thread in the exact terminal_id " +
|
|
32
|
+
"after explicit user intent. A valid unverified agent version remains " +
|
|
33
|
+
"callable with a compatibility warning. AKK refreshes lifecycle authority " +
|
|
34
|
+
"privately. Never send /clear as ordinary task text. This creates a new AKK " +
|
|
35
|
+
"Session but no Turn.",
|
|
36
|
+
reconcile_binding: "Detach one exact conflicting managed Session binding without adopting the " +
|
|
37
|
+
"live replacement thread. Pass only the advertised terminal_id and " +
|
|
38
|
+
"conflicting_session_id after explicit user confirmation; AKK refreshes all " +
|
|
39
|
+
"revision and binding authority privately. This sends no coding-agent input " +
|
|
40
|
+
"and creates no Turn.",
|
|
41
|
+
resume_thread: "Resume one exact structurally verified historical native thread after " +
|
|
42
|
+
"explicit user intent. A valid unverified agent version remains callable with " +
|
|
43
|
+
"a compatibility warning. Pass only terminal_id and one complete " +
|
|
44
|
+
"native_thread_id from a resumable=true row; AKK refreshes binding and " +
|
|
45
|
+
"candidate evidence privately. This creates or reactivates an AKK Session but " +
|
|
46
|
+
"no Turn.",
|
|
47
|
+
status: "Inspect one exact AKK-managed Turn by its authoritative turn_id, one durable " +
|
|
48
|
+
"Terminal Watch by its authoritative watch_id, or use only a raw terminal " +
|
|
49
|
+
"row's own prefilled compatibility selector. These targets are mutually " +
|
|
50
|
+
"exclusive. The deprecated conversation_id remains a legacy Turn alias and " +
|
|
51
|
+
"the list-prefilled raw-terminal input; never construct it. User-selected " +
|
|
52
|
+
"Watch status reports whether it uses an exact task anchor or best-effort " +
|
|
53
|
+
"terminal activity without implying Watch sent or adopted the task; that task " +
|
|
54
|
+
"may independently be managed. Automatic terminal_user_explicit fallback " +
|
|
55
|
+
"Watch status describes the exact request AKK physically sent without " +
|
|
56
|
+
"claiming a managed Turn. AKK never starts a coding agent.",
|
|
57
|
+
send: "Start a new AKK Turn, use one advertised terminal_user_explicit " +
|
|
58
|
+
"user-priority send, or explicitly recover one current uncertain submission " +
|
|
59
|
+
"only through its advertised retry_submission action. Ordinary send requires " +
|
|
60
|
+
"request and may use session_id or terminal_id exactly as advertised. " +
|
|
61
|
+
"terminal_user_explicit requires one exact live physical terminal/process, a " +
|
|
62
|
+
"scanned non-blocked approval state, and no input-owning native " +
|
|
63
|
+
"questionnaire/editor, menu, or read-only viewer; parsed working activity, " +
|
|
64
|
+
"Codex rollout ambiguity, AKK management state, ordinary main-Composer " +
|
|
65
|
+
"visibility, stability, exactness, and existing draft contents do not veto " +
|
|
66
|
+
"physical delivery. Profiled Codex 0.154.0/0.155.1 exact collapsed " +
|
|
67
|
+
"async-question summaries remain sendable, while expanded, clipped, or " +
|
|
68
|
+
"ambiguous editors receive zero input. Codex sends C-u once to replace the " +
|
|
69
|
+
"current Composer; Claude Code uses a sentinel-backed native C-s stash-clear " +
|
|
70
|
+
"transaction that is independent of the cursor position and does not " +
|
|
71
|
+
"interrupt an active turn, then proves the main Composer empty. Each injects " +
|
|
72
|
+
"the request, waits through the paste window, and dispatches Enter exactly " +
|
|
73
|
+
"once without a post-text Composer veto. A source-less Codex terminal freezes " +
|
|
74
|
+
"all current rollout roots before input, then promotes a provisional " +
|
|
75
|
+
"Session/Turn only when exactly one anchored or newly opened rollout durably " +
|
|
76
|
+
"accepts the exact request hash; zero matches remain pending and ambiguity " +
|
|
77
|
+
"becomes uncertain without replay. If managed preparation fails before input, " +
|
|
78
|
+
"AKK still delivers once as unmanaged work, then best-effort attaches an " +
|
|
79
|
+
"exact Terminal Watch callback. After exact request acceptance and terminal " +
|
|
80
|
+
"attribution, a supported questionnaire on that Watch may expose owner-bound " +
|
|
81
|
+
"response authority through Status and its watch_id; terminal-activity " +
|
|
82
|
+
"observations and manual_required interactions remain notification-only. Read " +
|
|
83
|
+
"terminal_input_dispatched, agent_acceptance, management_mode, " +
|
|
84
|
+
"observation_mode, and capabilities independently. Watch attachment failure " +
|
|
85
|
+
"never changes a successful Send. Once the mutation sequence begins, an " +
|
|
86
|
+
"uncertain result must not be automatically retried. Retry submission is the " +
|
|
87
|
+
"mutually exclusive exact {turn_id} form and cannot change request text or " +
|
|
88
|
+
"routing. Draft text, composer digests, and opaque freshness authority stay " +
|
|
89
|
+
"private. A Turn id is never an ordinary-send destination. Managed acceptance " +
|
|
90
|
+
"is asynchronous: yield and wait for its callback or an explicit status " +
|
|
91
|
+
"request.",
|
|
92
|
+
respond: "Respond to a question or blocked callback in one exact in-flight AKK turn. " +
|
|
93
|
+
"This continues that turn and does not create a new turn; for later ordinary " +
|
|
94
|
+
"work refresh agent_knock_knock_list and use that terminal row's currently " +
|
|
95
|
+
"advertised send action.",
|
|
96
|
+
respond_interaction: "Answer exactly one current native interaction step shown by " +
|
|
97
|
+
"agent_knock_knock_status in this controller conversation. Supply exactly one " +
|
|
98
|
+
"authoritative subject target: turn_id for a managed Turn or watch_id for an " +
|
|
99
|
+
"interactive Terminal Watch, plus interaction_id and one typed semantic " +
|
|
100
|
+
"answer. single_select uses selected_option_ids with one advertised " +
|
|
101
|
+
"option_id; free_text uses text; confirm uses confirm. For async_question, " +
|
|
102
|
+
"delivery_mode defaults to steer_current_turn; select queue_next_turn " +
|
|
103
|
+
"explicitly only when advertised; omit it for a blocking questionnaire. AKK " +
|
|
104
|
+
"consumes only that subject's displayed private offer and revalidates the " +
|
|
105
|
+
"exact discriminator-specific shape, prompt, owner, task attribution, and " +
|
|
106
|
+
"terminal authority before any input. A displayed expiry is a freshness " +
|
|
107
|
+
"boundary: after it passes, AKK must prove the same exact live interaction " +
|
|
108
|
+
"again instead of rejecting an otherwise live prompt. Raw keys, menu indexes, " +
|
|
109
|
+
"rendered labels, fingerprints, versions, and terminal commands are never " +
|
|
110
|
+
"accepted. An uncertain response must never be retried blindly.",
|
|
111
|
+
approve: "Dispatch one closed semantic decision for the current exact permission " +
|
|
112
|
+
"request only after the user reviews and explicitly chooses it. decision " +
|
|
113
|
+
"defaults to approve_once for compatibility; reject is available only on a " +
|
|
114
|
+
"managed Turn when the adapter proves a safe native reject choice. Use " +
|
|
115
|
+
"turn_id for a managed Turn or terminal_id for a separately advertised " +
|
|
116
|
+
"approve_once-only terminal action. AKK privately refreshes the prompt and " +
|
|
117
|
+
"authority, then recaptures it under lock. Raw keys, indexes, and labels are " +
|
|
118
|
+
"not accepted. Never retry an interrupted decision blindly.",
|
|
119
|
+
renew: "Renew monitoring for one exact stalled turn_id without sending text or keys " +
|
|
120
|
+
"to the coding agent. Use this when the user wants a still-live long-running " +
|
|
121
|
+
"terminal task to keep monitoring after an inactivity stall.",
|
|
122
|
+
retry_callback: "Retry a persisted AKK callback for an exact turn that failed before reaching " +
|
|
123
|
+
"the controller Host. The original callback message id and turn identity are " +
|
|
124
|
+
"reused for idempotent delivery.",
|
|
125
|
+
cancel: "Interrupt one exact AKK turn_id, or use only an unmanaged raw terminal row's " +
|
|
126
|
+
"own prefilled cancel action. Claude sends Escape; Codex uses its declared " +
|
|
127
|
+
"interrupt key. The shared terminal pane remains open for human takeover.",
|
|
128
|
+
close: "Honor an explicit user request to close one managed turn_id and release AKK " +
|
|
129
|
+
"management. Raw orphan recovery may instead use conversation_id with " +
|
|
130
|
+
"expected_message_id or expected_transition_id. Close never sends terminal " +
|
|
131
|
+
"input, stops the coding agent, or closes the shared pane. Deferred transfer, " +
|
|
132
|
+
"Session, ledger, and callback cleanup is best-effort and cannot veto closing " +
|
|
133
|
+
"the Turn; warnings identify metadata AKK preserved. Refresh list afterward " +
|
|
134
|
+
"and use Watch if the coding agent is still working.",
|
|
135
|
+
list: "List live AKK terminal resources and Terminal Watches. The model-facing " +
|
|
136
|
+
"result is a compact projection: available_actions contains current semantic " +
|
|
137
|
+
"action names and action_inputs contains only their dynamic semantic inputs. " +
|
|
138
|
+
"Follow the installed agent-knock-knock skill for action meaning, target " +
|
|
139
|
+
"rules, safety boundaries, and recovery behavior; AKK privately revalidates " +
|
|
140
|
+
"every mutation.",
|
|
141
|
+
model_options: "Inspect the exact current native model catalog for one explicitly selected " +
|
|
142
|
+
"physical Codex or Claude Code pane. This is the required read-only first " +
|
|
143
|
+
"step before set_model. Profiled Codex 0.154.0/0.155.1 accepts one exact " +
|
|
144
|
+
"current native Session or a verified-zero-rollout pane without " +
|
|
145
|
+
"identify_foreground; Claude Code still requires one exact current native " +
|
|
146
|
+
"Session. AKK requires an exact live pane/process, no active Turn, and no " +
|
|
147
|
+
"approval, questionnaire/editor, or read-only viewer. The Composer must be " +
|
|
148
|
+
"empty unless current List privately binds this action to one exact stable " +
|
|
149
|
+
"profiled Codex 0.154.0/0.155.1 /model residual, which AKK may continue into " +
|
|
150
|
+
"the native picker without retyping it. That residual-bound authority is " +
|
|
151
|
+
"consumed by discovery; after restoring an exact empty Composer, AKK retains " +
|
|
152
|
+
"only fresh ordinary terminal/catalog authority for one set_model attempt in " +
|
|
153
|
+
"this exact controller conversation. It obtains model ids and " +
|
|
154
|
+
"reasoning-effort values from the native UI/runtime and exposes only semantic " +
|
|
155
|
+
"choices. Codex advertises scope=current_and_new_sessions; Claude Code " +
|
|
156
|
+
"advertises scope=current_session. Arbitrary commands, keys, menu indexes, " +
|
|
157
|
+
"labels, and hidden authority are never accepted.",
|
|
158
|
+
repair_model_control: "Clear one exact stale profiled Codex 0.154.0/0.155.1 /model completion " +
|
|
159
|
+
"surface, exact bare /model Composer, or exact open native model picker left " +
|
|
160
|
+
"by a failed native model-control attempt. This explicit one-shot repair is " +
|
|
161
|
+
"available only when the current AKK list proves the same exact pane/process, " +
|
|
162
|
+
"the closed profiled model-control residue, no active Turn, and no approval, " +
|
|
163
|
+
"questionnaire/editor, or read-only viewer. Pass only terminal_id; AKK " +
|
|
164
|
+
"privately derives and revalidates every physical, screen, and Composer fence " +
|
|
165
|
+
"before each reversible cleanup input. It never submits a task, selects a " +
|
|
166
|
+
"model, approves a prompt, accepts raw commands or keys, or automatically " +
|
|
167
|
+
"continues into model_options/set_model. An open picker receives dismissal " +
|
|
168
|
+
"authority only, never Enter authority. outcome=uncertain must never be " +
|
|
169
|
+
"retried automatically.",
|
|
170
|
+
set_model: "Change exactly one already-open physical coding-agent pane to one semantic " +
|
|
171
|
+
"model and reasoning-effort tuple from the immediately preceding " +
|
|
172
|
+
"model_options result in this same controller conversation. AKK consumes the " +
|
|
173
|
+
"private current-snapshot offer, revalidates the exact pane/process plus idle " +
|
|
174
|
+
"and empty native UI under lock, rejects active Turns and every input-owning " +
|
|
175
|
+
"prompt/viewer, and verifies the effective postcondition. Profiled Codex " +
|
|
176
|
+
"0.154.0/0.155.1 accepts one exact current native Session or a " +
|
|
177
|
+
"verified-zero-rollout pane without identify_foreground; Claude Code still " +
|
|
178
|
+
"requires one exact current native Session. Codex scope is " +
|
|
179
|
+
"current_and_new_sessions: the model and ordinary efforts (including max) are " +
|
|
180
|
+
"persisted, but ultra remains current-session-only; the future model is " +
|
|
181
|
+
"reported while the native TUI's unobservable fallback effort is omitted. " +
|
|
182
|
+
"Claude Code scope is current_session and leaves future defaults unchanged. " +
|
|
183
|
+
"Parameters never accept scope, raw commands, slash text, keys, menu indexes, " +
|
|
184
|
+
"display labels, fingerprints, or tokens. outcome=uncertain must never be " +
|
|
185
|
+
"retried automatically.",
|
|
186
|
+
identify_foreground: "Explicitly identify the foreground Codex native thread in one exact idle " +
|
|
187
|
+
"terminal by issuing the closed /status probe once. The result is a " +
|
|
188
|
+
"short-lived diagnostic bound to the current pane, process, cwd, and screen " +
|
|
189
|
+
"generation; it creates no Session or Turn and grants no later response, " +
|
|
190
|
+
"approval, lifecycle, or send authority. Ordinary list/status never runs this " +
|
|
191
|
+
"probe.",
|
|
192
|
+
identify_and_send: "Explicitly identify the foreground Codex native thread with one closed " +
|
|
193
|
+
"/status probe, then dispatch one task while retaining the same terminal " +
|
|
194
|
+
"lock. This is an optional managed-attachment enhancement, not a prerequisite " +
|
|
195
|
+
"for ordinary human Send. The short-lived status observation never becomes " +
|
|
196
|
+
"durable identity: only the rollout that uniquely accepts the exact task may " +
|
|
197
|
+
"own the resulting Session/Turn. If the probe or boundary becomes uncertain, " +
|
|
198
|
+
"AKK does not send or retry the task.",
|
|
199
|
+
};
|
|
200
|
+
export const semanticCommandGuidance = [
|
|
201
|
+
"Use /akk permissions on an advertised idle Codex terminal before /akk " +
|
|
202
|
+
"set-permissions. Read the current permission mode and returned built-in " +
|
|
203
|
+
"choices, then apply the requested or authorized mode. Full Access is an " +
|
|
204
|
+
"ordinary option with no additional user confirmation; AKK automatically " +
|
|
205
|
+
"handles its native confirmation inside the closed permission transaction, " +
|
|
206
|
+
"never through generic approve. Ordinary Send does not change permissions. " +
|
|
207
|
+
"Scope is the current session/thread and may survive Resume; global defaults " +
|
|
208
|
+
"remain unchanged. Send the task only after a verified matching effective " +
|
|
209
|
+
"mode. An uncertain result must not be retried automatically.",
|
|
210
|
+
"Use /akk <task> when exactly one send-ready coding-agent terminal pane " +
|
|
211
|
+
"should receive new work. Send-ready means an exact live process and terminal " +
|
|
212
|
+
"plus a scanned, non-blocked approval state. Parsed working activity and " +
|
|
213
|
+
"ordinary main-Composer visibility, stability, exactness, or existing draft " +
|
|
214
|
+
"contents do not veto this user-priority path. A proven input-owning native " +
|
|
215
|
+
"approval, questionnaire/editor, menu, or read-only viewer remains a " +
|
|
216
|
+
"zero-input boundary; profiled Codex 0.154.0/0.155.1 exact collapsed " +
|
|
217
|
+
"async-question summaries remain sendable, while expanded, clipped, or " +
|
|
218
|
+
"ambiguous editors do not. Codex sends C-u once to replace the current " +
|
|
219
|
+
"Composer; Claude Code uses a sentinel-backed native C-s stash-clear " +
|
|
220
|
+
"transaction that is independent of the cursor position and does not " +
|
|
221
|
+
"interrupt an active turn, then proves the main Composer empty. Each injects " +
|
|
222
|
+
"the request, waits through the paste window, and dispatches Enter exactly " +
|
|
223
|
+
"once; after text injection, no Composer observation may veto Enter. Managed " +
|
|
224
|
+
"Send may still require exact empty before input, while native inspection and " +
|
|
225
|
+
"native lifecycle input remain exact-empty-only. Broken or stale AKK " +
|
|
226
|
+
"management activity records do not veto the user's physical Send. Structured " +
|
|
227
|
+
"tools use only semantic identifiers returned by AKK: session_id for an exact " +
|
|
228
|
+
"managed context, terminal_id for the currently verified pane, turn_id for " +
|
|
229
|
+
"one managed Turn, watch_id for one Terminal Watch, and native_thread_id for " +
|
|
230
|
+
"one resumable native thread. Draft text, composer digests, and opaque " +
|
|
231
|
+
"freshness authority stay private; AKK revalidates them under its locks. Once " +
|
|
232
|
+
"the mutation sequence begins, an uncertain result must not be automatically " +
|
|
233
|
+
"retried. /akk watch is read-only and follows user intent: it prefers an " +
|
|
234
|
+
"exact task anchor, but version, artifact, managed ownership, and " +
|
|
235
|
+
"action-advertisement uncertainty degrade to a warning-bearing " +
|
|
236
|
+
"terminal-activity Watch instead of vetoing the request. New/clear/resume, " +
|
|
237
|
+
"approval, reconciliation, handoff, and recovery still require the documented " +
|
|
238
|
+
"user intent or explicit confirmation. AKK never starts a coding-agent " +
|
|
239
|
+
"process.",
|
|
240
|
+
"Use /akk models on one exact currently advertised physical pane before /akk " +
|
|
241
|
+
"set-model. Profiled Codex 0.154.0/0.155.1 may use either one exact current " +
|
|
242
|
+
"native Session or a verified-zero-rollout pane; identify_foreground is " +
|
|
243
|
+
"diagnostic and is never a prerequisite for that zero-rollout path. Claude " +
|
|
244
|
+
"Code still requires one exact current native Session. Both steps require no " +
|
|
245
|
+
"active Turn and no approval, questionnaire/editor, or read-only viewer. " +
|
|
246
|
+
"model_options normally requires an empty Composer; when List binds it to one " +
|
|
247
|
+
"exact stable Codex /model residual, it may continue only that residual into " +
|
|
248
|
+
"read-only catalog discovery. repair_model_control remains the separate " +
|
|
249
|
+
"clear-only alternative and never presses Enter or selects anything. Only ids " +
|
|
250
|
+
"and reasoning efforts from that current native catalog are valid. Codex " +
|
|
251
|
+
"changes the current session and persists the selected model for future " +
|
|
252
|
+
"sessions; ordinary efforts, including max, are also persisted, while ultra " +
|
|
253
|
+
"remains current-session-only and Codex chooses a non-ultra future fallback. " +
|
|
254
|
+
"Claude Code changes only the current session. Read effective and " +
|
|
255
|
+
"new_session_defaults separately. Model control never accepts slash text, raw " +
|
|
256
|
+
"keys, menu indexes, display labels, scope overrides, or private authority; " +
|
|
257
|
+
"an uncertain outcome must not be retried automatically."
|
|
258
|
+
];
|
|
259
|
+
//# sourceMappingURL=semantic-tool-descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-tool-descriptions.js","sourceRoot":"","sources":["../../src/semantic-tool-descriptions.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,2EAA2E;QAC9E,uEAAuE;QACvE,yEAAyE;QACzE,oEAAoE;IACtE,KAAK,EAAE,2EAA2E;QAChF,8EAA8E;QAC9E,+EAA+E;QAC/E,uEAAuE;QACvE,6EAA6E;QAC7E,4EAA4E;QAC5E,wEAAwE;IAC1E,OAAO,EAAE,4EAA4E;QACnF,+EAA+E;QAC/E,2DAA2D;IAC7D,sBAAsB,EAAE,+EAA+E;QACrG,qEAAqE;QACrE,+EAA+E;QAC/E,8EAA8E;QAC9E,2EAA2E;QAC3E,0EAA0E;QAC1E,6CAA6C;IAC/C,cAAc,EAAE,+EAA+E;QAC7F,8EAA8E;QAC9E,+EAA+E;QAC/E,gEAAgE;QAChE,0EAA0E;QAC1E,wEAAwE;QACxE,gCAAgC;IAClC,UAAU,EAAE,+EAA+E;QACzF,uEAAuE;QACvE,2EAA2E;QAC3E,6EAA6E;QAC7E,sBAAsB;IACxB,iBAAiB,EAAE,4EAA4E;QAC7F,oEAAoE;QACpE,6EAA6E;QAC7E,6EAA6E;QAC7E,sBAAsB;IACxB,aAAa,EAAE,wEAAwE;QACrF,+EAA+E;QAC/E,kEAAkE;QAClE,wEAAwE;QACxE,+EAA+E;QAC/E,UAAU;IACZ,MAAM,EAAE,+EAA+E;QACrF,2EAA2E;QAC3E,yEAAyE;QACzE,4EAA4E;QAC5E,2EAA2E;QAC3E,2EAA2E;QAC3E,+EAA+E;QAC/E,0EAA0E;QAC1E,uEAAuE;QACvE,2DAA2D;IAC7D,IAAI,EAAE,kEAAkE;QACtE,6EAA6E;QAC7E,8EAA8E;QAC9E,uEAAuE;QACvE,8EAA8E;QAC9E,iEAAiE;QACjE,4EAA4E;QAC5E,wEAAwE;QACxE,4EAA4E;QAC5E,oEAAoE;QACpE,wEAAwE;QACxE,4EAA4E;QAC5E,8EAA8E;QAC9E,sEAAsE;QACtE,8EAA8E;QAC9E,4EAA4E;QAC5E,+EAA+E;QAC/E,sEAAsE;QACtE,8EAA8E;QAC9E,4EAA4E;QAC5E,+EAA+E;QAC/E,0EAA0E;QAC1E,6EAA6E;QAC7E,8EAA8E;QAC9E,wEAAwE;QACxE,+EAA+E;QAC/E,gEAAgE;QAChE,6EAA6E;QAC7E,yEAAyE;QACzE,8EAA8E;QAC9E,4EAA4E;QAC5E,6EAA6E;QAC7E,+EAA+E;QAC/E,yEAAyE;QACzE,UAAU;IACZ,OAAO,EAAE,6EAA6E;QACpF,8EAA8E;QAC9E,4EAA4E;QAC5E,yBAAyB;IAC3B,mBAAmB,EAAE,8DAA8D;QACjF,+EAA+E;QAC/E,8EAA8E;QAC9E,yEAAyE;QACzE,qEAAqE;QACrE,4EAA4E;QAC5E,uEAAuE;QACvE,6EAA6E;QAC7E,2EAA2E;QAC3E,2EAA2E;QAC3E,yEAAyE;QACzE,4EAA4E;QAC5E,+EAA+E;QAC/E,2EAA2E;QAC3E,gEAAgE;IAClE,OAAO,EAAE,yEAAyE;QAChF,0EAA0E;QAC1E,4EAA4E;QAC5E,wEAAwE;QACxE,wEAAwE;QACxE,4EAA4E;QAC5E,8EAA8E;QAC9E,4DAA4D;IAC9D,KAAK,EAAE,8EAA8E;QACnF,8EAA8E;QAC9E,6DAA6D;IAC/D,cAAc,EAAE,+EAA+E;QAC7F,8EAA8E;QAC9E,iCAAiC;IACnC,MAAM,EAAE,+EAA+E;QACrF,4EAA4E;QAC5E,0EAA0E;IAC5E,KAAK,EAAE,8EAA8E;QACnF,uEAAuE;QACvE,4EAA4E;QAC5E,+EAA+E;QAC/E,+EAA+E;QAC/E,6EAA6E;QAC7E,qDAAqD;IACvD,IAAI,EAAE,0EAA0E;QAC9E,8EAA8E;QAC9E,8EAA8E;QAC9E,0EAA0E;QAC1E,6EAA6E;QAC7E,iBAAiB;IACnB,aAAa,EAAE,6EAA6E;QAC1F,2EAA2E;QAC3E,0EAA0E;QAC1E,iEAAiE;QACjE,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,4EAA4E;QAC5E,8EAA8E;QAC9E,0EAA0E;QAC1E,8EAA8E;QAC9E,8EAA8E;QAC9E,+DAA+D;QAC/D,+EAA+E;QAC/E,wEAAwE;QACxE,4EAA4E;QAC5E,kDAAkD;IACpD,oBAAoB,EAAE,yEAAyE;QAC7F,8EAA8E;QAC9E,6EAA6E;QAC7E,+EAA+E;QAC/E,8EAA8E;QAC9E,wEAAwE;QACxE,+EAA+E;QAC/E,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,yEAAyE;QACzE,wBAAwB;IAC1B,SAAS,EAAE,6EAA6E;QACtF,kEAAkE;QAClE,8EAA8E;QAC9E,+EAA+E;QAC/E,8EAA8E;QAC9E,0EAA0E;QAC1E,gEAAgE;QAChE,4EAA4E;QAC5E,4DAA4D;QAC5D,+EAA+E;QAC/E,yEAAyE;QACzE,2EAA2E;QAC3E,6EAA6E;QAC7E,+EAA+E;QAC/E,2EAA2E;QAC3E,wBAAwB;IAC1B,mBAAmB,EAAE,2EAA2E;QAC9F,qEAAqE;QACrE,6EAA6E;QAC7E,0EAA0E;QAC1E,+EAA+E;QAC/E,QAAQ;IACV,iBAAiB,EAAE,yEAAyE;QAC1F,0EAA0E;QAC1E,+EAA+E;QAC/E,4EAA4E;QAC5E,8EAA8E;QAC9E,8EAA8E;QAC9E,sCAAsC;CAChC,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,wEAAwE;QACtE,0EAA0E;QAC1E,0EAA0E;QAC1E,0EAA0E;QAC1E,4EAA4E;QAC5E,4EAA4E;QAC5E,8EAA8E;QAC9E,2EAA2E;QAC3E,8DAA8D;IAChE,yEAAyE;QACvE,+EAA+E;QAC/E,0EAA0E;QAC1E,6EAA6E;QAC7E,6EAA6E;QAC7E,sEAAsE;QACtE,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,sEAAsE;QACtE,sEAAsE;QACtE,8EAA8E;QAC9E,4EAA4E;QAC5E,8EAA8E;QAC9E,+EAA+E;QAC/E,sEAAsE;QACtE,+EAA+E;QAC/E,+EAA+E;QAC/E,4EAA4E;QAC5E,8EAA8E;QAC9E,wEAAwE;QACxE,+EAA+E;QAC/E,8EAA8E;QAC9E,0EAA0E;QAC1E,mEAAmE;QACnE,gEAAgE;QAChE,4EAA4E;QAC5E,+EAA+E;QAC/E,wEAAwE;QACxE,UAAU;IACZ,8EAA8E;QAC5E,6EAA6E;QAC7E,yEAAyE;QACzE,4EAA4E;QAC5E,8EAA8E;QAC9E,0EAA0E;QAC1E,+EAA+E;QAC/E,8EAA8E;QAC9E,yEAAyE;QACzE,+EAA+E;QAC/E,0EAA0E;QAC1E,yEAAyE;QACzE,6EAA6E;QAC7E,8EAA8E;QAC9E,mEAAmE;QACnE,+EAA+E;QAC/E,6EAA6E;QAC7E,yDAAyD;CACnD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { semanticCommandGuidance, semanticToolDescriptions } from "./semantic-tool-descriptions.js";
|
|
1
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
3
|
import { isRecord, nonBlankString as stringValue } from "./value-guards.js";
|
|
3
4
|
import { AKK_CALLBACK_METHOD, akkUsageText, buildAkkCommandCliArgs, compactAkkListModelProjection, formatAkkListCommandResult, formatAkkModelOptionsCommandResult, formatAkkRepairModelControlCommandResult, formatAkkRespondCommandResult, formatAkkSetModelCommandResult, formatAkkThreadsCommandResult, formatAkkThreadTransitionCommandResult, formatAkkUnwatchCommandResult, formatAkkWatchCommandResult, isAkkRepairModelControlSuccess, isAkkSetModelSuccess, isAkkThreadTransitionSuccess, parseAkkCommand, resolvePluginStoreDir } from "./semantic-tool-command-helpers.js";
|
|
@@ -27,21 +28,17 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
27
28
|
beginSemanticToolCatalog(api);
|
|
28
29
|
const command = {
|
|
29
30
|
name: "akk",
|
|
30
|
-
description:
|
|
31
|
+
description: semanticToolDescriptions.akk,
|
|
31
32
|
acceptsArgs: true,
|
|
32
33
|
requiresAuthentication: true,
|
|
33
34
|
progressMessage: "AKK is handling the request...",
|
|
34
|
-
promptGuidance: [
|
|
35
|
-
"Use /akk permissions on an advertised idle Codex terminal before /akk set-permissions. Read the current permission mode and returned built-in choices, then apply the requested or authorized mode. Full Access is an ordinary option with no additional user confirmation; AKK automatically handles its native confirmation inside the closed permission transaction, never through generic approve. Ordinary Send does not change permissions. Scope is the current session/thread and may survive Resume; global defaults remain unchanged. Send the task only after a verified matching effective mode. An uncertain result must not be retried automatically.",
|
|
36
|
-
"Use /akk <task> when exactly one send-ready coding-agent terminal pane should receive new work. Send-ready means an exact live process and terminal plus a scanned, non-blocked approval state. Parsed working activity and ordinary main-Composer visibility, stability, exactness, or existing draft contents do not veto this user-priority path. A proven input-owning native approval, questionnaire/editor, menu, or read-only viewer remains a zero-input boundary; profiled Codex 0.154.0/0.155.1 exact collapsed async-question summaries remain sendable, while expanded, clipped, or ambiguous editors do not. Codex sends C-u once to replace the current Composer; Claude Code uses a sentinel-backed native C-s stash-clear transaction that is independent of the cursor position and does not interrupt an active turn, then proves the main Composer empty. Each injects the request, waits through the paste window, and dispatches Enter exactly once; after text injection, no Composer observation may veto Enter. Managed Send may still require exact empty before input, while native inspection and native lifecycle input remain exact-empty-only. Broken or stale AKK management activity records do not veto the user's physical Send. Structured tools use only semantic identifiers returned by AKK: session_id for an exact managed context, terminal_id for the currently verified pane, turn_id for one managed Turn, watch_id for one Terminal Watch, and native_thread_id for one resumable native thread. Draft text, composer digests, and opaque freshness authority stay private; AKK revalidates them under its locks. Once the mutation sequence begins, an uncertain result must not be automatically retried. /akk watch is read-only and follows user intent: it prefers an exact task anchor, but version, artifact, managed ownership, and action-advertisement uncertainty degrade to a warning-bearing terminal-activity Watch instead of vetoing the request. New/clear/resume, approval, reconciliation, handoff, and recovery still require the documented user intent or explicit confirmation. AKK never starts a coding-agent process.",
|
|
37
|
-
"Use /akk models on one exact currently advertised physical pane before /akk set-model. Profiled Codex 0.154.0/0.155.1 may use either one exact current native Session or a verified-zero-rollout pane; identify_foreground is diagnostic and is never a prerequisite for that zero-rollout path. Claude Code still requires one exact current native Session. Both steps require no active Turn and no approval, questionnaire/editor, or read-only viewer. model_options normally requires an empty Composer; when List binds it to one exact stable Codex /model residual, it may continue only that residual into read-only catalog discovery. repair_model_control remains the separate clear-only alternative and never presses Enter or selects anything. Only ids and reasoning efforts from that current native catalog are valid. Codex changes the current session and persists the selected model for future sessions; ordinary efforts, including max, are also persisted, while ultra remains current-session-only and Codex chooses a non-ultra future fallback. Claude Code changes only the current session. Read effective and new_session_defaults separately. Model control never accepts slash text, raw keys, menu indexes, display labels, scope overrides, or private authority; an uncertain outcome must not be retried automatically."
|
|
38
|
-
],
|
|
35
|
+
promptGuidance: [...semanticCommandGuidance],
|
|
39
36
|
execute: async (ctx) => handleAkkCommand(api, ctx, displayedResumeSnapshots)
|
|
40
37
|
};
|
|
41
38
|
registerSemanticListTool(api);
|
|
42
39
|
registerCliTool(api, {
|
|
43
40
|
name: "agent_knock_knock_watch",
|
|
44
|
-
description:
|
|
41
|
+
description: semanticToolDescriptions.watch,
|
|
45
42
|
parameters: watchParameters,
|
|
46
43
|
normalizeTurnIdentity: false,
|
|
47
44
|
buildArgs: (params, toolContext) => {
|
|
@@ -63,7 +60,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
63
60
|
});
|
|
64
61
|
registerCliTool(api, {
|
|
65
62
|
name: "agent_knock_knock_unwatch",
|
|
66
|
-
description:
|
|
63
|
+
description: semanticToolDescriptions.unwatch,
|
|
67
64
|
parameters: unwatchParameters,
|
|
68
65
|
normalizeTurnIdentity: false,
|
|
69
66
|
buildArgs: (params) => {
|
|
@@ -79,7 +76,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
79
76
|
});
|
|
80
77
|
registerCliTool(api, {
|
|
81
78
|
name: "agent_knock_knock_list_resumable_threads",
|
|
82
|
-
description:
|
|
79
|
+
description: semanticToolDescriptions.list_resumable_threads,
|
|
83
80
|
parameters: listResumableThreadsParameters,
|
|
84
81
|
normalizeTurnIdentity: false,
|
|
85
82
|
buildArgs: (params) => {
|
|
@@ -96,7 +93,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
96
93
|
});
|
|
97
94
|
registerCliTool(api, {
|
|
98
95
|
name: "agent_knock_knock_native_inspect",
|
|
99
|
-
description:
|
|
96
|
+
description: semanticToolDescriptions.native_inspect,
|
|
100
97
|
parameters: nativeInspectParameters,
|
|
101
98
|
normalizeTurnIdentity: false,
|
|
102
99
|
buildArgs: async (params) => {
|
|
@@ -126,7 +123,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
126
123
|
registerForegroundIdentificationTools(api);
|
|
127
124
|
registerCliTool(api, {
|
|
128
125
|
name: "agent_knock_knock_new_thread",
|
|
129
|
-
description:
|
|
126
|
+
description: semanticToolDescriptions.new_thread,
|
|
130
127
|
parameters: newThreadParameters,
|
|
131
128
|
normalizeTurnIdentity: false,
|
|
132
129
|
isErrorResult: (result) => !isAkkThreadTransitionSuccess(result),
|
|
@@ -148,7 +145,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
148
145
|
});
|
|
149
146
|
registerCliTool(api, {
|
|
150
147
|
name: "agent_knock_knock_reconcile_binding",
|
|
151
|
-
description:
|
|
148
|
+
description: semanticToolDescriptions.reconcile_binding,
|
|
152
149
|
parameters: reconcileBindingParameters,
|
|
153
150
|
normalizeTurnIdentity: false,
|
|
154
151
|
buildArgs: async (params, toolContext) => {
|
|
@@ -190,7 +187,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
190
187
|
});
|
|
191
188
|
registerCliTool(api, {
|
|
192
189
|
name: "agent_knock_knock_resume_thread",
|
|
193
|
-
description:
|
|
190
|
+
description: semanticToolDescriptions.resume_thread,
|
|
194
191
|
parameters: resumeThreadParameters,
|
|
195
192
|
normalizeTurnIdentity: false,
|
|
196
193
|
isErrorResult: (result) => !isAkkThreadTransitionSuccess(result),
|
|
@@ -226,7 +223,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
226
223
|
defineSemanticCatalogTool(api, {
|
|
227
224
|
label: "AKK Status",
|
|
228
225
|
name: "agent_knock_knock_status",
|
|
229
|
-
description:
|
|
226
|
+
description: semanticToolDescriptions.status,
|
|
230
227
|
inputSchema: statusParameters,
|
|
231
228
|
async execute(toolContext, _toolCallId, params, signal) {
|
|
232
229
|
return withHostBridgeInvocationSignal(signal, async () => {
|
|
@@ -246,7 +243,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
246
243
|
defineSemanticCatalogTool(api, {
|
|
247
244
|
label: "AKK Send",
|
|
248
245
|
name: "agent_knock_knock_send",
|
|
249
|
-
description:
|
|
246
|
+
description: semanticToolDescriptions.send,
|
|
250
247
|
inputSchema: sendParameters,
|
|
251
248
|
async execute(toolContext, toolCallId, params, signal) {
|
|
252
249
|
return withHostBridgeInvocationSignal(signal, async () => {
|
|
@@ -267,7 +264,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
267
264
|
});
|
|
268
265
|
registerCliTool(api, {
|
|
269
266
|
name: "agent_knock_knock_respond",
|
|
270
|
-
description:
|
|
267
|
+
description: semanticToolDescriptions.respond,
|
|
271
268
|
parameters: respondParameters,
|
|
272
269
|
buildArgs: (params, toolContext, toolCallId) => {
|
|
273
270
|
const config = isRecord(api.pluginConfig) ? api.pluginConfig : {};
|
|
@@ -292,7 +289,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
292
289
|
});
|
|
293
290
|
registerCliTool(api, {
|
|
294
291
|
name: "agent_knock_knock_respond_interaction",
|
|
295
|
-
description:
|
|
292
|
+
description: semanticToolDescriptions.respond_interaction,
|
|
296
293
|
parameters: respondInteractionParameters,
|
|
297
294
|
buildArgs: (params, toolContext) => buildPrivateInteractionResponseArgs(api, params, {
|
|
298
295
|
sessionKey: requiredControllerSessionKey(toolContext?.sessionKey),
|
|
@@ -301,7 +298,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
301
298
|
});
|
|
302
299
|
registerCliTool(api, {
|
|
303
300
|
name: "agent_knock_knock_approve",
|
|
304
|
-
description:
|
|
301
|
+
description: semanticToolDescriptions.approve,
|
|
305
302
|
parameters: approveParameters,
|
|
306
303
|
buildArgs: (params, toolContext) => buildPrivateApprovalArgs(api, params, {
|
|
307
304
|
sessionKey: requiredControllerSessionKey(toolContext?.sessionKey),
|
|
@@ -310,7 +307,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
310
307
|
});
|
|
311
308
|
registerCliTool(api, {
|
|
312
309
|
name: "agent_knock_knock_renew",
|
|
313
|
-
description:
|
|
310
|
+
description: semanticToolDescriptions.renew,
|
|
314
311
|
parameters: renewParameters,
|
|
315
312
|
buildArgs: (params) => {
|
|
316
313
|
const config = isRecord(api.pluginConfig) ? api.pluginConfig : {};
|
|
@@ -323,7 +320,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
323
320
|
});
|
|
324
321
|
registerCliTool(api, {
|
|
325
322
|
name: "agent_knock_knock_retry_callback",
|
|
326
|
-
description:
|
|
323
|
+
description: semanticToolDescriptions.retry_callback,
|
|
327
324
|
parameters: retryCallbackParameters,
|
|
328
325
|
buildArgs: (params) => {
|
|
329
326
|
const config = isRecord(api.pluginConfig) ? api.pluginConfig : {};
|
|
@@ -335,7 +332,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
335
332
|
});
|
|
336
333
|
registerCliTool(api, {
|
|
337
334
|
name: "agent_knock_knock_cancel",
|
|
338
|
-
description:
|
|
335
|
+
description: semanticToolDescriptions.cancel,
|
|
339
336
|
parameters: cancelParameters,
|
|
340
337
|
buildArgs: (params) => {
|
|
341
338
|
const config = isRecord(api.pluginConfig) ? api.pluginConfig : {};
|
|
@@ -348,7 +345,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
348
345
|
});
|
|
349
346
|
registerCliTool(api, {
|
|
350
347
|
name: "agent_knock_knock_close",
|
|
351
|
-
description:
|
|
348
|
+
description: semanticToolDescriptions.close,
|
|
352
349
|
parameters: closeParameters,
|
|
353
350
|
isErrorResult: isBlockedTerminalDispatchResult,
|
|
354
351
|
buildArgs: (params) => {
|
|
@@ -368,7 +365,7 @@ export function createAkkSemanticToolCatalog(api, displayedResumeSnapshots) {
|
|
|
368
365
|
function registerSemanticListTool(api) {
|
|
369
366
|
registerCliTool(api, {
|
|
370
367
|
name: "agent_knock_knock_list",
|
|
371
|
-
description:
|
|
368
|
+
description: semanticToolDescriptions.list,
|
|
372
369
|
parameters: listParameters,
|
|
373
370
|
modelProjection: compactAkkListModelProjection,
|
|
374
371
|
compactText: true,
|
|
@@ -393,7 +390,7 @@ function registerSemanticListTool(api) {
|
|
|
393
390
|
function registerModelControlTools(api) {
|
|
394
391
|
registerCliTool(api, {
|
|
395
392
|
name: "agent_knock_knock_model_options",
|
|
396
|
-
description:
|
|
393
|
+
description: semanticToolDescriptions.model_options,
|
|
397
394
|
parameters: modelOptionsParameters,
|
|
398
395
|
timeoutMs: MODEL_OPTIONS_CLI_TIMEOUT_MS,
|
|
399
396
|
normalizeTurnIdentity: false,
|
|
@@ -417,7 +414,7 @@ function registerModelControlTools(api) {
|
|
|
417
414
|
});
|
|
418
415
|
registerCliTool(api, {
|
|
419
416
|
name: "agent_knock_knock_repair_model_control",
|
|
420
|
-
description:
|
|
417
|
+
description: semanticToolDescriptions.repair_model_control,
|
|
421
418
|
parameters: repairModelControlParameters,
|
|
422
419
|
timeoutMs: REPAIR_MODEL_CONTROL_CLI_TIMEOUT_MS,
|
|
423
420
|
normalizeTurnIdentity: false,
|
|
@@ -441,7 +438,7 @@ function registerModelControlTools(api) {
|
|
|
441
438
|
});
|
|
442
439
|
registerCliTool(api, {
|
|
443
440
|
name: "agent_knock_knock_set_model",
|
|
444
|
-
description:
|
|
441
|
+
description: semanticToolDescriptions.set_model,
|
|
445
442
|
parameters: setModelParameters,
|
|
446
443
|
timeoutMs: SET_MODEL_CLI_TIMEOUT_MS,
|
|
447
444
|
normalizeTurnIdentity: false,
|
|
@@ -455,7 +452,7 @@ function registerModelControlTools(api) {
|
|
|
455
452
|
function registerForegroundIdentificationTools(api) {
|
|
456
453
|
registerCliTool(api, {
|
|
457
454
|
name: "agent_knock_knock_identify_foreground",
|
|
458
|
-
description:
|
|
455
|
+
description: semanticToolDescriptions.identify_foreground,
|
|
459
456
|
parameters: identifyForegroundParameters,
|
|
460
457
|
normalizeTurnIdentity: false,
|
|
461
458
|
buildArgs: async (params) => {
|
|
@@ -476,7 +473,7 @@ function registerForegroundIdentificationTools(api) {
|
|
|
476
473
|
});
|
|
477
474
|
registerCliTool(api, {
|
|
478
475
|
name: "agent_knock_knock_identify_and_send",
|
|
479
|
-
description:
|
|
476
|
+
description: semanticToolDescriptions.identify_and_send,
|
|
480
477
|
parameters: identifyAndSendParameters,
|
|
481
478
|
isErrorResult: isSubmissionError,
|
|
482
479
|
buildArgs: async (params, toolContext, toolCallId) => {
|
|
@@ -708,7 +705,9 @@ async function handleAkkLifecycleCommand(api, ctx, parsed, config, displayedResu
|
|
|
708
705
|
if (parsed.action === "resume-thread" &&
|
|
709
706
|
parsed.selection &&
|
|
710
707
|
["number", "short-id"].includes(parsed.selection.kind)) {
|
|
711
|
-
requiredString(ctx.sessionId, "Controller conversation incarnation is required for number or short-id
|
|
708
|
+
requiredString(ctx.sessionId, "Controller conversation incarnation is required for number or short-id " +
|
|
709
|
+
"Resume; run /akk threads again in the current conversation or use the " +
|
|
710
|
+
"complete UUID");
|
|
712
711
|
const mutationArgs = buildAkkCommandCliArgs(parsed, config, {
|
|
713
712
|
sessionKey: ctx.sessionKey,
|
|
714
713
|
selectionScope,
|
|
@@ -853,7 +852,8 @@ async function runSendRequest(api, params, toolContext, messageId) {
|
|
|
853
852
|
if (Object.hasOwn(params, "turn_id")) {
|
|
854
853
|
const unexpected = Object.keys(params).filter((key) => key !== "turn_id");
|
|
855
854
|
if (unexpected.length > 0) {
|
|
856
|
-
throw new Error("send retry_submission accepts exactly turn_id; do not pass request,
|
|
855
|
+
throw new Error("send retry_submission accepts exactly turn_id; do not pass request, " +
|
|
856
|
+
"terminal_id, session_id, timeout overrides, or callback route data");
|
|
857
857
|
}
|
|
858
858
|
const turnId = authoritativeManagedId(params.turn_id, "turn_id");
|
|
859
859
|
await privateActionArguments(api, {
|
|
@@ -1057,7 +1057,9 @@ async function runDelegate(api, params, toolContext) {
|
|
|
1057
1057
|
do_not_retry: true,
|
|
1058
1058
|
reason: parsed.reason,
|
|
1059
1059
|
openclaw_next_action: parsed.openclaw_next_action,
|
|
1060
|
-
note: "AKK sent the terminal input but could not fence later side effects to an
|
|
1060
|
+
note: "AKK sent the terminal input but could not fence later side effects to an " +
|
|
1061
|
+
"exact native session. Do not retry or continue automatically; inspect the " +
|
|
1062
|
+
"pane and close this Turn."
|
|
1061
1063
|
}
|
|
1062
1064
|
: submissionUncertain
|
|
1063
1065
|
? {
|
|
@@ -1065,7 +1067,8 @@ async function runDelegate(api, params, toolContext) {
|
|
|
1065
1067
|
do_not_retry: true,
|
|
1066
1068
|
reason: parsed.reason,
|
|
1067
1069
|
openclaw_next_action: parsed.openclaw_next_action,
|
|
1068
|
-
note: "AKK could not prove whether the terminal accepted Enter. Do not retry
|
|
1070
|
+
note: "AKK could not prove whether the terminal accepted Enter. Do not retry " +
|
|
1071
|
+
"automatically; inspect the exact AKK Turn record and shared terminal."
|
|
1069
1072
|
}
|
|
1070
1073
|
: submissionAborted
|
|
1071
1074
|
? parsed.safe_to_retry === true && parsed.do_not_retry !== true
|
|
@@ -1083,7 +1086,8 @@ async function runDelegate(api, params, toolContext) {
|
|
|
1083
1086
|
do_not_retry: true,
|
|
1084
1087
|
reason: parsed.reason,
|
|
1085
1088
|
openclaw_next_action: parsed.openclaw_next_action,
|
|
1086
|
-
note: "AKK could not prove a durable safe abort. Do not retry automatically;
|
|
1089
|
+
note: "AKK could not prove a durable safe abort. Do not retry automatically; " +
|
|
1090
|
+
"inspect the exact Turn and terminal dispatch ledger."
|
|
1087
1091
|
}
|
|
1088
1092
|
: submissionNotAccepted
|
|
1089
1093
|
? {
|
|
@@ -1091,7 +1095,8 @@ async function runDelegate(api, params, toolContext) {
|
|
|
1091
1095
|
do_not_retry: true,
|
|
1092
1096
|
reason: parsed.reason,
|
|
1093
1097
|
openclaw_next_action: parsed.openclaw_next_action,
|
|
1094
|
-
note: "AKK proved terminal transport but the exact draft is still present in the
|
|
1098
|
+
note: "AKK proved terminal transport but the exact draft is still present in the " +
|
|
1099
|
+
"agent composer. Do not retry automatically; inspect the shared pane."
|
|
1095
1100
|
}
|
|
1096
1101
|
: submissionPending
|
|
1097
1102
|
? {
|
|
@@ -1099,13 +1104,16 @@ async function runDelegate(api, params, toolContext) {
|
|
|
1099
1104
|
do_not_retry: true,
|
|
1100
1105
|
reason: parsed.reason,
|
|
1101
1106
|
openclaw_next_action: parsed.openclaw_next_action,
|
|
1102
|
-
note: "AKK proved only terminal transport and is still waiting for native agent
|
|
1107
|
+
note: "AKK proved only terminal transport and is still waiting for native agent " +
|
|
1108
|
+
"acceptance. Do not retry or report the task as accepted."
|
|
1103
1109
|
}
|
|
1104
1110
|
: {
|
|
1105
1111
|
openclaw_next_action: {
|
|
1106
1112
|
action: "yield",
|
|
1107
|
-
reason: "The coding agent is working in the shared terminal. End this controller turn
|
|
1108
|
-
|
|
1113
|
+
reason: "The coding agent is working in the shared terminal. End this controller turn " +
|
|
1114
|
+
"now and wait for an Agent Knock Knock callback.",
|
|
1115
|
+
do_not: "Do not poll terminal internals while waiting. Further communication must use " +
|
|
1116
|
+
"Agent Knock Knock tools so the same shared terminal remains authoritative.",
|
|
1109
1117
|
expected_callback: "The callback will be injected into this controller session by its configured callback transport."
|
|
1110
1118
|
},
|
|
1111
1119
|
note: "The task was sent to the shared terminal. The controller Host should yield now and wait for the callback turn."
|