@tom2012/cc-web 2026.5.11-d → 2026.5.11-e
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/bin/ccweb-approval-hook.js +11 -0
- package/package.json +1 -1
|
@@ -126,6 +126,17 @@ function postJson({ port, path: urlPath, body, signature }) {
|
|
|
126
126
|
|
|
127
127
|
if (!toolName) { failClosed('missing tool_name'); return; }
|
|
128
128
|
|
|
129
|
+
// Tools that are NOT real permission asks — they are user-interactive UI
|
|
130
|
+
// primitives whose semantics are richer than allow/deny:
|
|
131
|
+
// - AskUserQuestion: Claude's multi-choice picker (Ink TUI arrow-key
|
|
132
|
+
// selection). Intercepting collapses N-option choice into 2-state
|
|
133
|
+
// allow/deny and loses the question.
|
|
134
|
+
// - ExitPlanMode: presents the plan and asks for accept / edit / reject.
|
|
135
|
+
// A 2-state allow/deny dialog drops the "edit" path entirely.
|
|
136
|
+
// Pass through to TUI so the user gets the native picker.
|
|
137
|
+
const TUI_PASSTHROUGH_TOOLS = new Set(['AskUserQuestion', 'ExitPlanMode']);
|
|
138
|
+
if (TUI_PASSTHROUGH_TOOLS.has(toolName)) { passThroughToTui(); return; }
|
|
139
|
+
|
|
129
140
|
// Claude Code v2.1.114+ no longer sends tool_use_id in PermissionRequest
|
|
130
141
|
// payloads. Synthesize a deterministic id so retries of the same permission
|
|
131
142
|
// request dedupe against the same pending entry in ApprovalManager.
|