@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.96",
3
+ "version": "0.1.97",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -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
- stdout(JSON.stringify({ permissionDecision: 'deny', ...(body.reason ? { reason: body.reason } : {}) }));
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) {