@commonlyai/cli 0.1.96 → 0.1.97
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/package.json +1 -1
- package/src/lib/hooks-config.js +10 -1
package/package.json
CHANGED
package/src/lib/hooks-config.js
CHANGED
|
@@ -215,7 +215,16 @@ export const forwardHookEvent = async ({
|
|
|
215
215
|
const body = await response.json().catch(() => ({}));
|
|
216
216
|
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
217
217
|
if (preTool && body.permissionDecision === 'deny') {
|
|
218
|
-
|
|
218
|
+
// Claude Code reads a PreToolUse decision only from `hookSpecificOutput`. The top-level
|
|
219
|
+
// `{permissionDecision}` this printed before was ignored and the tool ran (measured on
|
|
220
|
+
// Claude Code 2.1.296, 2026-10-14, issue #2145).
|
|
221
|
+
stdout(JSON.stringify({
|
|
222
|
+
hookSpecificOutput: {
|
|
223
|
+
hookEventName: 'PreToolUse',
|
|
224
|
+
permissionDecision: 'deny',
|
|
225
|
+
...(body.reason ? { permissionDecisionReason: body.reason } : {}),
|
|
226
|
+
},
|
|
227
|
+
}));
|
|
219
228
|
}
|
|
220
229
|
return body;
|
|
221
230
|
} catch (error) {
|