claude-remote-approver 0.3.4 → 0.3.6

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/cli.mjs CHANGED
@@ -87,7 +87,7 @@ export async function main(args, deps) {
87
87
  try {
88
88
  input = JSON.parse(deps.stdin);
89
89
  } catch {
90
- const deny = { hookSpecificOutput: { decision: { behavior: "deny" } } };
90
+ const deny = { hookSpecificOutput: { hookEventName: "PermissionRequest", decision: { behavior: "deny" } } };
91
91
  deps.stdout.write(JSON.stringify(deny) + "\n");
92
92
  break;
93
93
  }
@@ -96,7 +96,7 @@ export async function main(args, deps) {
96
96
  try {
97
97
  result = await deps.processHook(input, deps);
98
98
  } catch {
99
- const deny = { hookSpecificOutput: { decision: { behavior: "deny" } } };
99
+ const deny = { hookSpecificOutput: { hookEventName: "PermissionRequest", decision: { behavior: "deny" } } };
100
100
  deps.stdout.write(JSON.stringify(deny) + "\n");
101
101
  break;
102
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-remote-approver",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Approve or deny Claude Code permission prompts remotely from your phone via ntfy.sh",
5
5
  "type": "module",
6
6
  "bin": {
package/src/hook.mjs CHANGED
@@ -45,7 +45,7 @@ export async function processHook(input, { loadConfig, sendNotification, waitFor
45
45
  const config = loadConfig();
46
46
 
47
47
  if (!config.topic) {
48
- return { hookSpecificOutput: { decision: { behavior: "deny" } } };
48
+ return { hookSpecificOutput: { hookEventName: "PermissionRequest", decision: { behavior: "deny" } } };
49
49
  }
50
50
 
51
51
  const requestId = crypto.randomUUID();
@@ -61,8 +61,8 @@ export async function processHook(input, { loadConfig, sendNotification, waitFor
61
61
  actions,
62
62
  requestId,
63
63
  });
64
- } catch {
65
- return { hookSpecificOutput: { decision: { behavior: "deny" } } };
64
+ } catch (err) {
65
+ return { hookSpecificOutput: { hookEventName: "PermissionRequest", decision: { behavior: "deny" } } };
66
66
  }
67
67
 
68
68
  let response;
@@ -73,10 +73,10 @@ export async function processHook(input, { loadConfig, sendNotification, waitFor
73
73
  requestId,
74
74
  timeout: config.timeout * 1000,
75
75
  });
76
- } catch {
77
- return { hookSpecificOutput: { decision: { behavior: "deny" } } };
76
+ } catch (err) {
77
+ return { hookSpecificOutput: { hookEventName: "PermissionRequest", decision: { behavior: "deny" } } };
78
78
  }
79
79
 
80
80
  const behavior = response.approved ? "allow" : "deny";
81
- return { hookSpecificOutput: { decision: { behavior } } };
81
+ return { hookSpecificOutput: { hookEventName: "PermissionRequest", decision: { behavior } } };
82
82
  }