agentapprove 0.1.4 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +8 -0
  2. package/dist/cli.js +24 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -8,6 +8,13 @@ Agent Approve fixes this. When your agent needs approval, you get a push notific
8
8
 
9
9
  Set your policies, configure your privacy level, and let your agents run. We'll find you when they need you.
10
10
 
11
+ ## Important
12
+
13
+ - A valid Agent Approve subscription is required to use this package.
14
+ - You must download the iOS app, run `npx agentapprove`, and pair your device.
15
+ - This package is currently pre-launch software. Public App Store availability is not open yet.
16
+ - If a valid token is not configured, approval hooks will block and show setup guidance.
17
+
11
18
  ## Installation
12
19
 
13
20
  ```bash
@@ -88,6 +95,7 @@ agentapprove --no-e2e # Skip end-to-end encryption setup
88
95
  - Node.js 18+
89
96
  - macOS, Linux, or Windows (with Git Bash / Git for Windows)
90
97
  - System tools: `curl`, `jq`, `openssl` (included with Git Bash on Windows)
98
+ - Agent Approve iOS app and active subscription ($9.99/month or $99/year, 7-day free trial)
91
99
 
92
100
  ## Links
93
101
 
package/dist/cli.js CHANGED
@@ -2413,7 +2413,7 @@ var AGENTS = {
2413
2413
  { name: "BeforeAgent", file: "gemini-before-agent.sh", description: "User prompt capture" },
2414
2414
  { name: "BeforeModel", file: "gemini-before-model.sh", description: "Before LLM request" },
2415
2415
  { name: "AfterModel", file: "gemini-after-model.sh", description: "After LLM response" },
2416
- { name: "BeforeTool", file: "gemini-before-tool.sh", description: "Tool approval", isApprovalHook: true },
2416
+ { name: "BeforeTool", file: "gemini-before-tool.sh", description: "Tool approval", isApprovalHook: true, timeout: 300 },
2417
2417
  { name: "AfterTool", file: "gemini-after-tool.sh", description: "Tool completion logging" },
2418
2418
  { name: "AfterAgent", file: "gemini-stop.sh", description: "Agent stop (iOS input)", timeout: 600 },
2419
2419
  { name: "Notification", file: "gemini-notification.sh", description: "Notifications (logging only)" },
@@ -3135,8 +3135,15 @@ async function installHooksForAgent(agentId, hooksDir, mode = "approval") {
3135
3135
  installedHooks.push(hook.name);
3136
3136
  } else if (agentId === "cursor") {
3137
3137
  const existing = hooksConfig[hook.name];
3138
- const needsTimeout = hook.name === "stop" || hook.name === "subagentStop";
3139
- const hookEntry = needsTimeout ? { command: hookCommand, timeout: 600, loop_limit: 10 } : { command: hookCommand };
3138
+ const needsStopTimeout = hook.name === "stop" || hook.name === "subagentStop";
3139
+ const isApproval = hook.isApprovalHook;
3140
+ const hookEntry = { command: hookCommand };
3141
+ if (needsStopTimeout) {
3142
+ hookEntry.timeout = 600;
3143
+ hookEntry.loop_limit = 10;
3144
+ } else if (isApproval) {
3145
+ hookEntry.timeout = 300;
3146
+ }
3140
3147
  if (!existing) {
3141
3148
  hooksConfig[hook.name] = [hookEntry];
3142
3149
  } else if (Array.isArray(existing)) {
@@ -3208,7 +3215,7 @@ async function installHooksForAgent(agentId, hooksDir, mode = "approval") {
3208
3215
  command: hookCommand
3209
3216
  };
3210
3217
  if (hook.isApprovalHook) {
3211
- hookEntry.timeout = 120;
3218
+ hookEntry.timeout = 300;
3212
3219
  }
3213
3220
  if (hook.timeout) {
3214
3221
  hookEntry.timeout = hook.timeout;
@@ -3231,7 +3238,7 @@ async function installHooksForAgent(agentId, hooksDir, mode = "approval") {
3231
3238
  bash: isWindows() ? toGitBashPath(hookPath) : hookPath
3232
3239
  };
3233
3240
  if (hook.isApprovalHook) {
3234
- hookEntry.timeoutSec = 120;
3241
+ hookEntry.timeoutSec = 300;
3235
3242
  }
3236
3243
  cleanedArray.push(hookEntry);
3237
3244
  hooksConfig[hook.name] = cleanedArray;
@@ -3339,8 +3346,16 @@ function getManualInstructions(agentId, hooksDir) {
3339
3346
  for (const hook of agent.hooks) {
3340
3347
  const hookPath = join(hooksDir, hook.file);
3341
3348
  const hookCmd = buildHookCommand(hookPath, agentId);
3342
- const needsTimeout = hook.name === "stop" || hook.name === "subagentStop";
3343
- hooksObj[hook.name] = needsTimeout ? [{ command: hookCmd, timeout: 600, loop_limit: 10 }] : [{ command: hookCmd }];
3349
+ const needsStopTimeout = hook.name === "stop" || hook.name === "subagentStop";
3350
+ const isApproval = hook.isApprovalHook;
3351
+ const entry = { command: hookCmd };
3352
+ if (needsStopTimeout) {
3353
+ entry.timeout = 600;
3354
+ entry.loop_limit = 10;
3355
+ } else if (isApproval) {
3356
+ entry.timeout = 300;
3357
+ }
3358
+ hooksObj[hook.name] = [entry];
3344
3359
  }
3345
3360
  return JSON.stringify({ hooks: hooksObj }, null, 2);
3346
3361
  } else if (agentId === "gemini-cli") {
@@ -3364,7 +3379,7 @@ function getManualInstructions(agentId, hooksDir) {
3364
3379
  command: hookCmd
3365
3380
  };
3366
3381
  if (isApproval)
3367
- entry.timeout = 120;
3382
+ entry.timeout = 300;
3368
3383
  if (hookTimeout)
3369
3384
  entry.timeout = hookTimeout;
3370
3385
  hooksObj[hook.name] = [entry];
@@ -3380,7 +3395,7 @@ function getManualInstructions(agentId, hooksDir) {
3380
3395
  bash: isWindows() ? toGitBashPath(hookPath) : hookPath
3381
3396
  };
3382
3397
  if (isApproval)
3383
- entry.timeoutSec = 120;
3398
+ entry.timeoutSec = 300;
3384
3399
  hooksObj[hook.name] = [entry];
3385
3400
  }
3386
3401
  return JSON.stringify({ version: 1, hooks: hooksObj }, null, 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentapprove",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Approve AI agent actions from your iPhone or Apple Watch",
5
5
  "type": "module",
6
6
  "bin": {