@pushary/agent-hooks 0.95.5 → 0.95.7

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 (88) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  3. package/data/cursor-plugin/CHANGELOG.md +7 -0
  4. package/data/cursor-plugin/scripts/pushary-gate.mjs +72 -17
  5. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  6. package/data/vscode-plugin/CHANGELOG.md +6 -0
  7. package/data/vscode-plugin/scripts/pushary-gate.mjs +76 -24
  8. package/dist/bin/pushary-bell-hook.js +18 -18
  9. package/dist/bin/pushary-bell.js +7 -7
  10. package/dist/bin/pushary-claude.js +24 -24
  11. package/dist/bin/pushary-clean.js +18 -18
  12. package/dist/bin/pushary-codex-bridge.js +29 -12
  13. package/dist/bin/pushary-codex-hook.js +29 -29
  14. package/dist/bin/pushary-codex.js +7 -7
  15. package/dist/bin/pushary-connect.js +8 -8
  16. package/dist/bin/pushary-cowork.js +5 -5
  17. package/dist/bin/pushary-daemon.js +24 -24
  18. package/dist/bin/pushary-disconnect.js +8 -8
  19. package/dist/bin/pushary-doctor.js +91 -36
  20. package/dist/bin/pushary-elicitation-hook.js +17 -17
  21. package/dist/bin/pushary-gemini-bridge.js +9 -9
  22. package/dist/bin/pushary-gemini-hook.js +65 -50
  23. package/dist/bin/pushary-hook.js +24 -24
  24. package/dist/bin/pushary-login.js +9 -9
  25. package/dist/bin/pushary-logout.js +6 -6
  26. package/dist/bin/pushary-mode.js +5 -5
  27. package/dist/bin/pushary-notification-hook.js +19 -19
  28. package/dist/bin/pushary-opencode-hook.js +29 -29
  29. package/dist/bin/pushary-permission-denied-hook.js +22 -22
  30. package/dist/bin/pushary-permission-hook.js +22 -22
  31. package/dist/bin/pushary-post-hook.js +19 -19
  32. package/dist/bin/pushary-prompt-hook.js +19 -19
  33. package/dist/bin/pushary-session-end-hook.js +19 -19
  34. package/dist/bin/pushary-session-start-hook.js +22 -22
  35. package/dist/bin/pushary-setup.js +45 -38
  36. package/dist/bin/pushary-stats.js +4 -4
  37. package/dist/bin/pushary-status.js +14 -10
  38. package/dist/bin/pushary-stop-hook.js +19 -19
  39. package/dist/bin/pushary-stopfailure-hook.js +19 -19
  40. package/dist/bin/pushary-suggestions.js +2 -2
  41. package/dist/bin/pushary-transcript-register.js +16 -16
  42. package/dist/bin/pushary-transcripts.js +7 -7
  43. package/dist/bin/pushary-upgrade.js +16 -16
  44. package/dist/bin/pushary-wait.js +8 -7
  45. package/dist/bin/pushary.js +1 -1
  46. package/dist/{chunk-N4VNLISN.js → chunk-4OSQZ5TB.js} +2 -2
  47. package/dist/{chunk-IM2A5H33.js → chunk-54W7ELDQ.js} +1 -1
  48. package/dist/{chunk-UCS65VVR.js → chunk-5GKNAQTG.js} +1 -1
  49. package/dist/{chunk-Z2UWFEJW.js → chunk-6W2WGNO5.js} +7 -7
  50. package/dist/{chunk-2D7BAOMY.js → chunk-7RNY3UHJ.js} +3 -3
  51. package/dist/{chunk-OW6AZDY2.js → chunk-BGX4QUQF.js} +1 -1
  52. package/dist/{chunk-I6GZX3FT.js → chunk-BQL7UDIB.js} +1 -1
  53. package/dist/{chunk-HGUZOUB2.js → chunk-CNUDZS4V.js} +3 -3
  54. package/dist/chunk-CVWG2N3Y.js +16 -0
  55. package/dist/{chunk-BMANRGJQ.js → chunk-EMGGUO2Q.js} +1 -1
  56. package/dist/{chunk-QHWXUNMN.js → chunk-FRXZMCVA.js} +1 -1
  57. package/dist/{chunk-DLLAWCQB.js → chunk-GOQHN2UH.js} +1 -1
  58. package/dist/{chunk-HBHEX3JQ.js → chunk-GQRU4KJF.js} +3 -3
  59. package/dist/{chunk-4RF52LSU.js → chunk-HAXZ6CBF.js} +8 -8
  60. package/dist/{chunk-OEKFD5BC.js → chunk-IZVK6FKD.js} +1 -1
  61. package/dist/{chunk-KAVDAZ7A.js → chunk-L7NOG547.js} +1 -1
  62. package/dist/{chunk-D6PRC3YQ.js → chunk-LZQVAEWP.js} +2 -1
  63. package/dist/{chunk-WDKHZRAS.js → chunk-MC5WUOJJ.js} +41 -0
  64. package/dist/{chunk-6VANQN5Q.js → chunk-NKUE5SJB.js} +2 -2
  65. package/dist/{chunk-QQGNFHIK.js → chunk-PQGLDN4V.js} +2 -2
  66. package/dist/{chunk-CUEZMPLJ.js → chunk-QJPYJVL3.js} +1 -1
  67. package/dist/{chunk-RLXVW4AM.js → chunk-SDNTRS76.js} +1 -1
  68. package/dist/{chunk-4PX4QK2Z.js → chunk-SKPXQRKN.js} +1 -1
  69. package/dist/{chunk-VTO3TNIB.js → chunk-TY6IJY6I.js} +1 -1
  70. package/dist/{chunk-HQIVR7MM.js → chunk-U5RIXR7I.js} +1 -1
  71. package/dist/{chunk-WRDLHR2F.js → chunk-UKMLSQXA.js} +2 -2
  72. package/dist/{chunk-6AEM5RCS.js → chunk-USWT4PTR.js} +1 -1
  73. package/dist/{chunk-D62EONG3.js → chunk-VDI645ZX.js} +1 -1
  74. package/dist/{chunk-OI3DJA7N.js → chunk-VERXHIQF.js} +1 -1
  75. package/dist/{chunk-67YNQ3QA.js → chunk-VIUOGMT5.js} +18 -14
  76. package/dist/{chunk-S5CMLR35.js → chunk-VMQU7YEJ.js} +1 -1
  77. package/dist/{chunk-XLOELLAS.js → chunk-VMZ4SWQD.js} +4 -4
  78. package/dist/{chunk-32RMQO5Z.js → chunk-WAUAYRUQ.js} +47 -4
  79. package/dist/{chunk-VOSGZ6PH.js → chunk-WPS5IM7B.js} +3 -3
  80. package/dist/{chunk-HCMM3BOW.js → chunk-XJQOVWBQ.js} +14 -11
  81. package/dist/{chunk-KI4PA7MQ.js → chunk-XO3JR3OP.js} +90 -18
  82. package/dist/{chunk-IVQMNLSA.js → chunk-XUTSZYYJ.js} +1 -1
  83. package/dist/{chunk-2ZTL3PGN.js → chunk-XZWUOCJZ.js} +1 -1
  84. package/dist/{chunk-BDI2MXTT.js → chunk-Z4JVEL7R.js} +1 -1
  85. package/dist/src/index.d.ts +3 -0
  86. package/dist/src/index.js +10 -10
  87. package/package.json +1 -1
  88. package/dist/chunk-IIENZE2J.js +0 -15
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerTranscript
4
- } from "../chunk-4RF52LSU.js";
5
- import "../chunk-BMANRGJQ.js";
6
- import "../chunk-VOSGZ6PH.js";
7
- import "../chunk-2ZTL3PGN.js";
8
- import "../chunk-CUEZMPLJ.js";
9
- import "../chunk-HBHEX3JQ.js";
10
- import "../chunk-XLOELLAS.js";
11
- import "../chunk-2D7BAOMY.js";
4
+ } from "../chunk-HAXZ6CBF.js";
5
+ import "../chunk-EMGGUO2Q.js";
6
+ import "../chunk-WPS5IM7B.js";
7
+ import "../chunk-XZWUOCJZ.js";
8
+ import "../chunk-QJPYJVL3.js";
9
+ import "../chunk-GQRU4KJF.js";
10
+ import "../chunk-VMZ4SWQD.js";
11
+ import "../chunk-7RNY3UHJ.js";
12
12
  import "../chunk-GOPIMNVC.js";
13
13
  import "../chunk-3AJIK5AO.js";
14
- import "../chunk-4PX4QK2Z.js";
14
+ import "../chunk-SKPXQRKN.js";
15
15
  import "../chunk-EQRS3SGM.js";
16
- import "../chunk-OI3DJA7N.js";
16
+ import "../chunk-VERXHIQF.js";
17
17
  import "../chunk-XHKBHWLX.js";
18
18
  import "../chunk-L4ZCFMWW.js";
19
- import "../chunk-IVQMNLSA.js";
20
- import "../chunk-N4VNLISN.js";
21
- import "../chunk-OW6AZDY2.js";
19
+ import "../chunk-XUTSZYYJ.js";
20
+ import "../chunk-4OSQZ5TB.js";
21
+ import "../chunk-BGX4QUQF.js";
22
22
  import "../chunk-GMXKITVA.js";
23
23
  import "../chunk-DINDL2CF.js";
24
- import "../chunk-S5CMLR35.js";
24
+ import "../chunk-VMQU7YEJ.js";
25
25
  import "../chunk-7QLSKOSU.js";
26
26
  import "../chunk-KZERVKTD.js";
27
- import "../chunk-KAVDAZ7A.js";
27
+ import "../chunk-L7NOG547.js";
28
28
  import "../chunk-2UMNXADU.js";
29
- import "../chunk-WDKHZRAS.js";
29
+ import "../chunk-MC5WUOJJ.js";
30
30
 
31
31
  // bin/pushary-transcript-register.ts
32
32
  var raw = "";
@@ -3,20 +3,20 @@ import {
3
3
  clearPin,
4
4
  fingerprint,
5
5
  loadPin
6
- } from "../chunk-BMANRGJQ.js";
6
+ } from "../chunk-EMGGUO2Q.js";
7
7
  import {
8
8
  transcriptsEnabled
9
- } from "../chunk-OI3DJA7N.js";
9
+ } from "../chunk-VERXHIQF.js";
10
10
  import {
11
11
  exitOnHelpFlag
12
- } from "../chunk-DLLAWCQB.js";
13
- import "../chunk-D6PRC3YQ.js";
12
+ } from "../chunk-GOQHN2UH.js";
13
+ import "../chunk-LZQVAEWP.js";
14
14
  import "../chunk-DINDL2CF.js";
15
- import "../chunk-S5CMLR35.js";
15
+ import "../chunk-VMQU7YEJ.js";
16
16
  import "../chunk-KZERVKTD.js";
17
- import "../chunk-KAVDAZ7A.js";
17
+ import "../chunk-L7NOG547.js";
18
18
  import "../chunk-2UMNXADU.js";
19
- import "../chunk-WDKHZRAS.js";
19
+ import "../chunk-MC5WUOJJ.js";
20
20
 
21
21
  // bin/pushary-transcripts.ts
22
22
  exitOnHelpFlag("transcripts");
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reapplyAllAgents
4
- } from "../chunk-Z2UWFEJW.js";
5
- import "../chunk-6AEM5RCS.js";
4
+ } from "../chunk-6W2WGNO5.js";
5
+ import "../chunk-USWT4PTR.js";
6
6
  import {
7
7
  waitForMachineReadiness
8
- } from "../chunk-32RMQO5Z.js";
9
- import "../chunk-HGUZOUB2.js";
8
+ } from "../chunk-WAUAYRUQ.js";
9
+ import "../chunk-CNUDZS4V.js";
10
10
  import {
11
11
  detectProviderLiveCapabilities,
12
12
  hasSpawnProvider,
13
13
  resolveControlPolicy
14
- } from "../chunk-IM2A5H33.js";
15
- import "../chunk-HBHEX3JQ.js";
14
+ } from "../chunk-54W7ELDQ.js";
15
+ import "../chunk-GQRU4KJF.js";
16
16
  import {
17
17
  daemonHasRemoteProof,
18
18
  daemonServiceManagerAvailable,
@@ -23,8 +23,8 @@ import {
23
23
  replaceDaemonService,
24
24
  stopDaemonService,
25
25
  waitForDaemonRemoteProof
26
- } from "../chunk-XLOELLAS.js";
27
- import "../chunk-2D7BAOMY.js";
26
+ } from "../chunk-VMZ4SWQD.js";
27
+ import "../chunk-7RNY3UHJ.js";
28
28
  import "../chunk-3AJIK5AO.js";
29
29
  import {
30
30
  needsShell
@@ -34,31 +34,31 @@ import {
34
34
  npmErrorMessage,
35
35
  resolveGlobalBinary
36
36
  } from "../chunk-L4ZCFMWW.js";
37
- import "../chunk-IVQMNLSA.js";
38
- import "../chunk-N4VNLISN.js";
37
+ import "../chunk-XUTSZYYJ.js";
38
+ import "../chunk-4OSQZ5TB.js";
39
39
  import {
40
40
  claudeJson,
41
41
  codexConfigToml,
42
42
  cursorPluginDir,
43
43
  geminiSettings,
44
44
  vscodePluginDir
45
- } from "../chunk-OW6AZDY2.js";
45
+ } from "../chunk-BGX4QUQF.js";
46
46
  import {
47
47
  exitOnHelpFlag
48
- } from "../chunk-DLLAWCQB.js";
49
- import "../chunk-D6PRC3YQ.js";
48
+ } from "../chunk-GOQHN2UH.js";
49
+ import "../chunk-LZQVAEWP.js";
50
50
  import {
51
51
  isNewerVersion
52
52
  } from "../chunk-DINDL2CF.js";
53
53
  import {
54
54
  readControlMode
55
- } from "../chunk-S5CMLR35.js";
55
+ } from "../chunk-VMQU7YEJ.js";
56
56
  import "../chunk-KZERVKTD.js";
57
- import "../chunk-KAVDAZ7A.js";
57
+ import "../chunk-L7NOG547.js";
58
58
  import {
59
59
  getApiKey
60
60
  } from "../chunk-2UMNXADU.js";
61
- import "../chunk-WDKHZRAS.js";
61
+ import "../chunk-MC5WUOJJ.js";
62
62
 
63
63
  // bin/pushary-upgrade.ts
64
64
  import { existsSync } from "fs";
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  describeWaitLadder
4
- } from "../chunk-IIENZE2J.js";
4
+ } from "../chunk-CVWG2N3Y.js";
5
5
  import {
6
6
  exitOnFailedResponse
7
- } from "../chunk-RLXVW4AM.js";
8
- import "../chunk-I6GZX3FT.js";
7
+ } from "../chunk-SDNTRS76.js";
8
+ import "../chunk-BQL7UDIB.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-5RUIFDTP.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-DLLAWCQB.js";
15
- import "../chunk-D6PRC3YQ.js";
14
+ } from "../chunk-GOQHN2UH.js";
15
+ import "../chunk-LZQVAEWP.js";
16
16
  import {
17
17
  rejectUnknownFlags
18
18
  } from "../chunk-GMXKITVA.js";
@@ -28,7 +28,7 @@ import {
28
28
  getApiKey,
29
29
  getBaseUrl
30
30
  } from "../chunk-2UMNXADU.js";
31
- import "../chunk-WDKHZRAS.js";
31
+ import "../chunk-MC5WUOJJ.js";
32
32
 
33
33
  // bin/pushary-wait.ts
34
34
  exitOnHelpFlag("wait");
@@ -106,7 +106,8 @@ var main = async () => {
106
106
  process.exit(EXIT.USAGE);
107
107
  }
108
108
  const value = await setWindow(baseUrl, headers, Math.trunc(seconds));
109
- console.log(` ${green("\u2713")} Default push window set to ${cyan(`${value}s`)} ${dim("\u2014 ping your phone that long, then the terminal takes over")}`);
109
+ const ladder = describeWaitLadder({ tool: "*", mode: "push_first", pushFirstSeconds: value, timeoutSeconds: 0, timeoutAction: "escalate" });
110
+ console.log(` ${green("\u2713")} Default push window set to ${cyan(`${value}s`)} ${dim(`(${ladder})`)}`);
110
111
  };
111
112
  main().catch((err) => {
112
113
  if (err instanceof UsageError) {
@@ -3,7 +3,7 @@ import {
3
3
  COMMANDS,
4
4
  isCommandName,
5
5
  renderHelp
6
- } from "../chunk-D6PRC3YQ.js";
6
+ } from "../chunk-LZQVAEWP.js";
7
7
  import {
8
8
  getPackageVersion
9
9
  } from "../chunk-DINDL2CF.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-OW6AZDY2.js";
3
+ } from "./chunk-BGX4QUQF.js";
4
4
  import {
5
5
  writeFileAtomic
6
- } from "./chunk-KAVDAZ7A.js";
6
+ } from "./chunk-L7NOG547.js";
7
7
 
8
8
  // src/identity.ts
9
9
  import { randomUUID } from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-L4ZCFMWW.js";
6
6
  import {
7
7
  MANAGED_PROVIDERS
8
- } from "./chunk-WDKHZRAS.js";
8
+ } from "./chunk-MC5WUOJJ.js";
9
9
 
10
10
  // src/live-capabilities.ts
11
11
  var CLAUDE_BRIDGE_CAPABILITY = "claude-bridge";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-WDKHZRAS.js";
3
+ } from "./chunk-MC5WUOJJ.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  detectClaudeVersion
3
- } from "./chunk-6AEM5RCS.js";
3
+ } from "./chunk-USWT4PTR.js";
4
4
  import {
5
5
  addClaudeMcpServer,
6
6
  addPusharyHooks,
7
7
  addPusharyToolPermissions
8
- } from "./chunk-HGUZOUB2.js";
8
+ } from "./chunk-CNUDZS4V.js";
9
9
  import {
10
10
  claudeWired,
11
11
  codexWired,
12
12
  geminiWired
13
- } from "./chunk-HBHEX3JQ.js";
13
+ } from "./chunk-GQRU4KJF.js";
14
14
  import {
15
15
  CLAUDE_HOOK_EVENTS,
16
16
  GEMINI_HOOK_BINARY,
@@ -21,7 +21,7 @@ import {
21
21
  needsReregistration,
22
22
  registrationSignatures,
23
23
  supportedClaudeEvents
24
- } from "./chunk-2D7BAOMY.js";
24
+ } from "./chunk-7RNY3UHJ.js";
25
25
  import {
26
26
  guardBinary
27
27
  } from "./chunk-3AJIK5AO.js";
@@ -40,14 +40,14 @@ import {
40
40
  codexHooksJson,
41
41
  hasCodexHooks,
42
42
  vscodePluginMcp
43
- } from "./chunk-OW6AZDY2.js";
43
+ } from "./chunk-BGX4QUQF.js";
44
44
  import {
45
45
  readJsonSafe,
46
46
  writeJsonAtomic
47
- } from "./chunk-KAVDAZ7A.js";
47
+ } from "./chunk-L7NOG547.js";
48
48
  import {
49
49
  HOOK_LOCATOR_BINARY
50
- } from "./chunk-WDKHZRAS.js";
50
+ } from "./chunk-MC5WUOJJ.js";
51
51
 
52
52
  // src/reapply.ts
53
53
  import { join } from "path";
@@ -2,15 +2,15 @@ import {
2
2
  NOTIFICATION_MATCHED_TYPES,
3
3
  POSTTOOLUSE_MIRRORED_TOOLS,
4
4
  PRETOOLUSE_PHONE_ANSWERED_TOOLS
5
- } from "./chunk-IVQMNLSA.js";
5
+ } from "./chunk-XUTSZYYJ.js";
6
6
  import {
7
7
  isProtectedByScope
8
- } from "./chunk-OW6AZDY2.js";
8
+ } from "./chunk-BGX4QUQF.js";
9
9
  import {
10
10
  HOOK_BUDGETS,
11
11
  HOOK_LOCATOR_BINARY,
12
12
  PRETOOLUSE_GATED_TOOLS
13
- } from "./chunk-WDKHZRAS.js";
13
+ } from "./chunk-MC5WUOJJ.js";
14
14
 
15
15
  // src/gemini-config.ts
16
16
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_BUDGETS,
3
3
  HOOK_LOCATOR_BINARY
4
- } from "./chunk-WDKHZRAS.js";
4
+ } from "./chunk-MC5WUOJJ.js";
5
5
 
6
6
  // src/removal-scope.ts
7
7
  var namesAppLocator = (command) => command.includes(HOOK_LOCATOR_BINARY);
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-WDKHZRAS.js";
16
+ } from "./chunk-MC5WUOJJ.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  supportedClaudeEvents
4
- } from "./chunk-2D7BAOMY.js";
4
+ } from "./chunk-7RNY3UHJ.js";
5
5
  import {
6
6
  guardBinary
7
7
  } from "./chunk-3AJIK5AO.js";
8
8
  import {
9
9
  isProtectedByScope
10
- } from "./chunk-OW6AZDY2.js";
10
+ } from "./chunk-BGX4QUQF.js";
11
11
  import {
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-WDKHZRAS.js";
13
+ } from "./chunk-MC5WUOJJ.js";
14
14
 
15
15
  // src/claude-config.ts
16
16
  import { join } from "path";
@@ -0,0 +1,16 @@
1
+ // src/wait-ladder.ts
2
+ var HAND_BACK = "then hand back to the agent's own prompt";
3
+ var describeWaitLadder = (p) => {
4
+ if (p.mode === "terminal_only") return "no approval alerts, the agent's own prompt decides";
5
+ if (p.mode === "notify_only") return "send an approval alert, then the agent's own prompt decides";
6
+ if (p.mode === "push_only") {
7
+ if (p.timeoutAction === "wait") return `wait for your phone, ${HAND_BACK}`;
8
+ const tail = p.timeoutAction === "approve" ? "then auto-approve" : p.timeoutAction === "deny" ? "then auto-deny" : HAND_BACK;
9
+ return `wait for your phone up to ${p.timeoutSeconds}s, ${tail}`;
10
+ }
11
+ return `when you are away or Pushary cannot tell, ask your phone for ${p.pushFirstSeconds}s, ${HAND_BACK}`;
12
+ };
13
+
14
+ export {
15
+ describeWaitLadder
16
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-KAVDAZ7A.js";
3
+ } from "./chunk-L7NOG547.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -3,7 +3,7 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-4PX4QK2Z.js";
6
+ } from "./chunk-SKPXQRKN.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-D6PRC3YQ.js";
3
+ } from "./chunk-LZQVAEWP.js";
4
4
  import {
5
5
  getPackageVersion
6
6
  } from "./chunk-DINDL2CF.js";
@@ -2,15 +2,15 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-2D7BAOMY.js";
5
+ } from "./chunk-7RNY3UHJ.js";
6
6
  import {
7
7
  CODEX_HOOK_EVENTS,
8
8
  hasCodexHooks
9
- } from "./chunk-OW6AZDY2.js";
9
+ } from "./chunk-BGX4QUQF.js";
10
10
  import {
11
11
  CURSOR_GATE_EVENTS,
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-WDKHZRAS.js";
13
+ } from "./chunk-MC5WUOJJ.js";
14
14
 
15
15
  // src/diagnostics/wiring.ts
16
16
  var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -3,19 +3,19 @@ import {
3
3
  loadPin,
4
4
  savePin,
5
5
  verifyRecipients
6
- } from "./chunk-BMANRGJQ.js";
6
+ } from "./chunk-EMGGUO2Q.js";
7
7
  import {
8
8
  hookOwnerOf
9
- } from "./chunk-VOSGZ6PH.js";
9
+ } from "./chunk-WPS5IM7B.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-XLOELLAS.js";
12
+ } from "./chunk-VMZ4SWQD.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
17
  wrapSessionKey
18
- } from "./chunk-4PX4QK2Z.js";
18
+ } from "./chunk-SKPXQRKN.js";
19
19
  import {
20
20
  fetchTranscriptRecipients,
21
21
  uploadTranscriptRecords
@@ -23,17 +23,17 @@ import {
23
23
  import {
24
24
  transcriptEnvironmentPreference,
25
25
  transcriptsEnabled
26
- } from "./chunk-OI3DJA7N.js";
26
+ } from "./chunk-VERXHIQF.js";
27
27
  import {
28
28
  codexHome,
29
29
  pusharyDir
30
- } from "./chunk-OW6AZDY2.js";
30
+ } from "./chunk-BGX4QUQF.js";
31
31
  import {
32
32
  readTranscriptPreference
33
- } from "./chunk-S5CMLR35.js";
33
+ } from "./chunk-VMQU7YEJ.js";
34
34
  import {
35
35
  writeJsonAtomic
36
- } from "./chunk-KAVDAZ7A.js";
36
+ } from "./chunk-L7NOG547.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-4RF52LSU.js";
3
+ } from "./chunk-HAXZ6CBF.js";
4
4
 
5
5
  // src/admission.ts
6
6
  import { readFileSync } from "fs";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2UMNXADU.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-WDKHZRAS.js";
6
+ } from "./chunk-MC5WUOJJ.js";
7
7
 
8
8
  // src/cli/fsx.ts
9
9
  import { copyFileSync, existsSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
@@ -125,7 +125,8 @@ var COMMAND_OPTIONS = {
125
125
  ],
126
126
  doctor: [
127
127
  ["--json", "Emit every check as one object instead of the screen"],
128
- ["--roundtrip", "Also send a real question and wait for you to answer it on your phone"],
128
+ ["--roundtrip", "Send a synthetic question and report the returned answer; does not test hooks"],
129
+ ["--activation claude_code --activation-target <path>", "Read correlated evidence for one unique scratch file; sends no test question"],
129
130
  ["--no-push", "Run every check without waking a device"],
130
131
  ["--bundle", "Write a redacted diagnostics file you can attach to a support thread"]
131
132
  ],
@@ -34,6 +34,7 @@ var defaults = {
34
34
  setupCommand: null,
35
35
  setupChoice: null,
36
36
  setupGuide: "",
37
+ activationGuide: null,
37
38
  enforcementDetail: "Cooperative. The agent chooses when to ask; no native permission interception.",
38
39
  capabilityNote: "",
39
40
  documented: true
@@ -42,6 +43,7 @@ var AGENTS = {
42
43
  claude_code: {
43
44
  ...defaults,
44
45
  label: "Claude Code",
46
+ activationGuide: "/docs/agents/guides/claude-code#verify-a-real-approval",
45
47
  hookSource: "claude",
46
48
  policyAgent: "claude_code",
47
49
  repoAware: true,
@@ -958,6 +960,23 @@ p:12:small=n:1e-7`
958
960
  }
959
961
  ];
960
962
  var AUTHORIZATION_PERMIT_TTL_SECONDS = 60 * 60;
963
+ var ANSWER_SOURCES = [
964
+ "dashboard",
965
+ "mobile_app",
966
+ "mobile_background",
967
+ "decide_page",
968
+ "live_page",
969
+ "answer_link",
970
+ "inbox",
971
+ "slack",
972
+ "mac_app",
973
+ // Nobody. A decision opened on a workspace's sandbox site is settled by the
974
+ // simulator instead of being delivered, and the ledger has to say so: a
975
+ // sandbox row that looked like a human answer would be indistinguishable
976
+ // evidence of a person who was never asked.
977
+ "sandbox"
978
+ ];
979
+ var isAnswerSource = (value) => typeof value === "string" && ANSWER_SOURCES.includes(value);
961
980
  var classifyDecisionRisk = (toolName, toolTarget) => {
962
981
  const parts = [toolName, toolTarget ?? ""];
963
982
  const matchesAny = (patterns) => parts.some((part) => patterns.some((re) => re.test(part)));
@@ -1524,6 +1543,23 @@ var elicitationContentFromAnswers = (ask, answers) => {
1524
1543
  return content;
1525
1544
  };
1526
1545
 
1546
+ // ../contracts/src/hook-activation.ts
1547
+ var hookWritePath = (toolName, input) => toolName === "Write" && typeof input.file_path === "string" && input.file_path.startsWith("/") && input.file_path.length <= 4096 ? input.file_path : void 0;
1548
+ var HOOK_ACTIVATION_RESULTS = ["unverified", "approved_executed", "denied_observed", "unexpected_execution", "tool_failed"];
1549
+ var isHookActivationReport = (value) => {
1550
+ if (!value || typeof value !== "object") return false;
1551
+ const report = value;
1552
+ return typeof report.agentType === "string" && typeof report.machineId === "string" && typeof report.target === "string" && report.target.length > 0 && report.target.length <= 4096 && typeof report.truncated === "boolean" && Array.isArray(report.evidence) && report.evidence.length <= 20 && (!report.truncated || report.evidence.length === 0) && report.evidence.every((item) => {
1553
+ if (!item || typeof item !== "object") return false;
1554
+ const row = item;
1555
+ return ["correlationId", "sessionId", "toolUseId", "toolName", "createdAt"].every((key) => typeof row[key] === "string" && row[key].length > 0 && row[key].length <= 256) && (row.answerSource === null || isAnswerSource(row.answerSource)) && HOOK_ACTIVATION_RESULTS.includes(row.result) && Number.isFinite(Date.parse(row.createdAt)) && (row.occurredAt === null || typeof row.occurredAt === "string" && Number.isFinite(Date.parse(row.occurredAt))) && (row.observedAt === null || typeof row.observedAt === "string" && Number.isFinite(Date.parse(row.observedAt))) && (row.result === "unverified" || row.occurredAt !== null && row.observedAt !== null && row.producer !== null && isAnswerSource(row.answerSource) && row.answerSource !== "sandbox") && (row.producer === null || row.producer === "hook" || row.producer === "uplink");
1556
+ });
1557
+ };
1558
+ var hookActivationResult = (report) => {
1559
+ if (report?.evidence.some((row) => row.result === "unexpected_execution")) return "unexpected_execution";
1560
+ return report && !report.truncated && report.evidence.length === 1 ? report.evidence[0].result : "unverified";
1561
+ };
1562
+
1527
1563
  export {
1528
1564
  CLAUDE_CONNECTOR_URL,
1529
1565
  CLAUDE_CONNECTOR_GUIDE,
@@ -1531,11 +1567,15 @@ export {
1531
1567
  CLAUDE_CONNECTOR_STEPS,
1532
1568
  CLAUDE_CONNECTOR_TEST,
1533
1569
  COWORK_STANDING_INSTRUCTIONS,
1570
+ AGENTS,
1534
1571
  HOOK_SOURCES,
1535
1572
  AGENT_LABELS_BY_TYPE,
1536
1573
  DISCONNECTABLE_AGENTS,
1537
1574
  REPO_AWARE_AGENTS,
1538
1575
  MANAGED_PROVIDERS,
1576
+ hookWritePath,
1577
+ isHookActivationReport,
1578
+ hookActivationResult,
1539
1579
  normalizeKeyScope,
1540
1580
  parseAgentQuestion,
1541
1581
  parseAgentQuestions,
@@ -1558,6 +1598,7 @@ export {
1558
1598
  DECISION_LINE_MAX,
1559
1599
  redactSecrets,
1560
1600
  redactSecretsDeep,
1601
+ isAnswerSource,
1561
1602
  buildDecisionEpisodeFeatures,
1562
1603
  resolveAutoResolveOrigin,
1563
1604
  resolvePolicy,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-HQIVR7MM.js";
3
+ } from "./chunk-U5RIXR7I.js";
4
4
  import {
5
5
  codexHomeFrom
6
- } from "./chunk-OW6AZDY2.js";
6
+ } from "./chunk-BGX4QUQF.js";
7
7
 
8
8
  // src/vscode-config.ts
9
9
  import { homedir } from "os";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-OW6AZDY2.js";
3
+ } from "./chunk-BGX4QUQF.js";
4
4
  import {
5
5
  readJsonSafe
6
- } from "./chunk-KAVDAZ7A.js";
6
+ } from "./chunk-L7NOG547.js";
7
7
 
8
8
  // src/process-ownership.ts
9
9
  import { createHash, randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_LOCATOR_BINARY
3
- } from "./chunk-WDKHZRAS.js";
3
+ } from "./chunk-MC5WUOJJ.js";
4
4
 
5
5
  // src/diagnostics/bridge.ts
6
6
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  describeKeyCheck,
3
3
  keyCheckFromResponse
4
- } from "./chunk-I6GZX3FT.js";
4
+ } from "./chunk-BQL7UDIB.js";
5
5
  import {
6
6
  createIo
7
7
  } from "./chunk-5RUIFDTP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecrets
3
- } from "./chunk-WDKHZRAS.js";
3
+ } from "./chunk-MC5WUOJJ.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-S5CMLR35.js";
3
+ } from "./chunk-VMQU7YEJ.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_BUDGETS,
3
3
  OPENCODE_APPROVAL_EVENT
4
- } from "./chunk-WDKHZRAS.js";
4
+ } from "./chunk-MC5WUOJJ.js";
5
5
 
6
6
  // src/opencode-plugin.ts
7
7
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";