@pushary/agent-hooks 0.89.11 → 0.89.13

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 (80) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +4 -2
  3. package/dist/bin/pushary-bell-hook.js +5 -5
  4. package/dist/bin/pushary-bell.js +11 -11
  5. package/dist/bin/pushary-claude.js +225 -48
  6. package/dist/bin/pushary-clean.js +49 -29
  7. package/dist/bin/pushary-codex-bridge.js +17 -16
  8. package/dist/bin/pushary-codex-hook.js +11 -10
  9. package/dist/bin/pushary-codex.js +7 -7
  10. package/dist/bin/pushary-connect.js +12 -12
  11. package/dist/bin/pushary-daemon-supervisor.d.ts +1 -0
  12. package/dist/bin/pushary-daemon-supervisor.js +27 -0
  13. package/dist/bin/pushary-daemon.js +22 -22
  14. package/dist/bin/pushary-disconnect.js +9 -9
  15. package/dist/bin/pushary-doctor.js +59 -49
  16. package/dist/bin/pushary-elicitation-hook.js +4 -4
  17. package/dist/bin/pushary-gemini-bridge.js +16 -15
  18. package/dist/bin/pushary-gemini-hook.js +10 -9
  19. package/dist/bin/pushary-hook.js +13 -13
  20. package/dist/bin/pushary-login.js +11 -11
  21. package/dist/bin/pushary-logout.js +11 -11
  22. package/dist/bin/pushary-mode.js +5 -5
  23. package/dist/bin/pushary-notification-hook.js +7 -7
  24. package/dist/bin/pushary-opencode-hook.js +10 -9
  25. package/dist/bin/pushary-permission-denied-hook.js +11 -11
  26. package/dist/bin/pushary-permission-hook.js +11 -11
  27. package/dist/bin/pushary-post-hook.js +7 -7
  28. package/dist/bin/pushary-prompt-hook.js +7 -7
  29. package/dist/bin/pushary-session-end-hook.js +7 -7
  30. package/dist/bin/pushary-session-start-hook.js +7 -7
  31. package/dist/bin/pushary-setup.js +87 -59
  32. package/dist/bin/pushary-stats.js +4 -4
  33. package/dist/bin/pushary-status.js +14 -14
  34. package/dist/bin/pushary-stop-hook.js +7 -7
  35. package/dist/bin/pushary-stopfailure-hook.js +7 -7
  36. package/dist/bin/pushary-suggestions.js +2 -2
  37. package/dist/bin/pushary-transcripts.d.ts +1 -0
  38. package/dist/bin/pushary-transcripts.js +79 -0
  39. package/dist/bin/pushary-upgrade.js +21 -21
  40. package/dist/bin/pushary-wait.js +5 -5
  41. package/dist/bin/pushary.js +3 -2
  42. package/dist/{chunk-6XUABEX2.js → chunk-3OXHYPZG.js} +1 -1
  43. package/dist/{chunk-QA72MKIT.js → chunk-3YGGEDJK.js} +5 -5
  44. package/dist/{chunk-IUN6VOKV.js → chunk-4IPSMEGT.js} +68 -46
  45. package/dist/{chunk-XX2V4QS5.js → chunk-4LL6LG5X.js} +2 -2
  46. package/dist/{chunk-J4K75V4D.js → chunk-5MNTWAAJ.js} +10 -9
  47. package/dist/{chunk-KVE5RCQL.js → chunk-5YEF55AX.js} +1 -1
  48. package/dist/{chunk-3SQYKLBW.js → chunk-7JZCADBR.js} +46 -18
  49. package/dist/{chunk-IUWRVTQK.js → chunk-ANMHIZZY.js} +1 -1
  50. package/dist/{chunk-6EKQZA6R.js → chunk-B2HND22S.js} +1 -1
  51. package/dist/{chunk-TRVIRETT.js → chunk-C56VHSXU.js} +1 -1
  52. package/dist/{chunk-TEZ2FZD6.js → chunk-CBGGUEKE.js} +2 -2
  53. package/dist/{chunk-3HFK3UXM.js → chunk-FOGW6O2Y.js} +1 -1
  54. package/dist/{chunk-3XTFX4CL.js → chunk-GMJDQDXU.js} +17 -2
  55. package/dist/{chunk-DKWM5T3P.js → chunk-JTBDBKHU.js} +2 -2
  56. package/dist/{chunk-Q223OM5J.js → chunk-JVLB5CAJ.js} +4 -4
  57. package/dist/{chunk-2LPEZYMC.js → chunk-KNLKHJZR.js} +1 -1
  58. package/dist/{chunk-X4ZUUFKV.js → chunk-L4ZCFMWW.js} +63 -1
  59. package/dist/chunk-M3UABYRT.js +20 -0
  60. package/dist/{chunk-PZRWFWSR.js → chunk-MNTZKFZI.js} +7 -7
  61. package/dist/{chunk-FZ73G2RO.js → chunk-MSTHT2M7.js} +25 -6
  62. package/dist/{chunk-TG3T3M4K.js → chunk-N4QJ3CLX.js} +6 -2
  63. package/dist/{chunk-3CUDMTL4.js → chunk-NBDU3R3G.js} +10 -3
  64. package/dist/{chunk-FXIL7RCL.js → chunk-OX35BSPV.js} +4 -4
  65. package/dist/{chunk-UDBJHQMG.js → chunk-QFJZHVVL.js} +1 -1
  66. package/dist/chunk-QZCFVWA7.js +58 -0
  67. package/dist/{chunk-TY5HVMXT.js → chunk-RAEPAUNJ.js} +1 -1
  68. package/dist/{chunk-NCVIWGVA.js → chunk-S4BLNILH.js} +1 -1
  69. package/dist/{chunk-MZGWKIUZ.js → chunk-VASZ6TWW.js} +7 -3
  70. package/dist/{chunk-SYUIXXQW.js → chunk-VF3RTVWY.js} +1 -1
  71. package/dist/{chunk-LURY4WNF.js → chunk-WHDSJ6PD.js} +1 -1
  72. package/dist/chunk-YKLCWWEI.js +76 -0
  73. package/dist/{chunk-253WC6O5.js → chunk-YXT55PYF.js} +1 -1
  74. package/dist/{chunk-BLODMQKJ.js → chunk-ZO43JTT3.js} +1 -1
  75. package/dist/{chunk-OLAGKKSR.js → chunk-ZP3SNUP7.js} +16 -6
  76. package/dist/{chunk-34GN3IPX.js → chunk-ZWEKONU6.js} +1 -1
  77. package/dist/src/index.d.ts +3 -1
  78. package/dist/src/index.js +15 -11
  79. package/package.json +4 -2
  80. /package/dist/{chunk-X6RXX2NF.js → chunk-QINYXLA5.js} +0 -0
@@ -2,16 +2,11 @@
2
2
  import {
3
3
  describeWaitLadder
4
4
  } from "../chunk-IIENZE2J.js";
5
- import {
6
- claudeWired,
7
- codexWired,
8
- geminiWired,
9
- pusharyHookExecutable
10
- } from "../chunk-FZ73G2RO.js";
11
5
  import {
12
6
  readMachineReadiness
13
- } from "../chunk-TY5HVMXT.js";
7
+ } from "../chunk-RAEPAUNJ.js";
14
8
  import {
9
+ CURSOR_GATE_SCRIPT,
15
10
  agentProbes,
16
11
  detectAgent,
17
12
  detectAllAgents,
@@ -19,42 +14,50 @@ import {
19
14
  isDetected,
20
15
  isPluginRegistered,
21
16
  vscodeSettingsTargets
22
- } from "../chunk-MZGWKIUZ.js";
17
+ } from "../chunk-VASZ6TWW.js";
18
+ import {
19
+ claudeWired,
20
+ codexWired,
21
+ cursorMcpAuthorization,
22
+ cursorWired,
23
+ geminiWired,
24
+ pusharyHookExecutable
25
+ } from "../chunk-MSTHT2M7.js";
23
26
  import {
24
27
  OPENCODE_PLUGIN_PLACEHOLDER,
25
28
  openCodePluginDir,
26
29
  openCodePluginFile,
27
30
  openCodeWired
28
- } from "../chunk-34GN3IPX.js";
31
+ } from "../chunk-ZWEKONU6.js";
29
32
  import {
30
33
  GEMINI_HOOK_BINARY,
31
34
  hasGeminiHooks,
32
35
  missingGeminiHookEvents
33
- } from "../chunk-Q223OM5J.js";
34
- import "../chunk-6EKQZA6R.js";
35
- import "../chunk-SYUIXXQW.js";
36
+ } from "../chunk-JVLB5CAJ.js";
37
+ import "../chunk-B2HND22S.js";
38
+ import "../chunk-VF3RTVWY.js";
36
39
  import {
37
40
  daemonHasRemoteProof,
38
41
  daemonServiceManagerAvailable,
39
42
  hasDaemonServiceDefinition,
40
43
  readDaemonStatus
41
- } from "../chunk-3SQYKLBW.js";
44
+ } from "../chunk-7JZCADBR.js";
42
45
  import {
43
46
  detectProviderLiveCapabilities,
44
47
  hasSpawnProvider,
45
48
  resolveControlPolicy
46
- } from "../chunk-6XUABEX2.js";
49
+ } from "../chunk-3OXHYPZG.js";
47
50
  import "../chunk-XHKBHWLX.js";
48
51
  import {
49
52
  execNpm
50
- } from "../chunk-X4ZUUFKV.js";
53
+ } from "../chunk-L4ZCFMWW.js";
51
54
  import {
52
55
  readLedgerSummary
53
- } from "../chunk-3HFK3UXM.js";
54
- import "../chunk-TG3T3M4K.js";
56
+ } from "../chunk-FOGW6O2Y.js";
57
+ import "../chunk-N4QJ3CLX.js";
55
58
  import {
56
59
  getMachineId
57
- } from "../chunk-DKWM5T3P.js";
60
+ } from "../chunk-JTBDBKHU.js";
58
61
  import {
59
62
  claudeJson,
60
63
  claudeSettings,
@@ -66,6 +69,7 @@ import {
66
69
  codexSkillDir,
67
70
  cursorPluginDir,
68
71
  cursorUserHooks,
72
+ cursorUserMcp,
69
73
  geminiMd,
70
74
  geminiSettings,
71
75
  hasCodexHooks,
@@ -74,58 +78,58 @@ import {
74
78
  readCodexMcpAuth,
75
79
  untrustedCodexHookEvents,
76
80
  vscodePluginDir
77
- } from "../chunk-QA72MKIT.js";
81
+ } from "../chunk-3YGGEDJK.js";
78
82
  import {
79
83
  describeReach,
80
84
  describeRoundTrip,
81
85
  fetchChannels,
82
86
  reachVerdict,
83
87
  verifyRoundTrip
84
- } from "../chunk-2LPEZYMC.js";
88
+ } from "../chunk-KNLKHJZR.js";
85
89
  import "../chunk-3EGEA4KH.js";
86
90
  import {
87
91
  checkApiKey,
88
92
  describeKeyCheck
89
- } from "../chunk-BLODMQKJ.js";
93
+ } from "../chunk-ZO43JTT3.js";
90
94
  import {
91
95
  createIo
92
96
  } from "../chunk-5RUIFDTP.js";
93
- import {
94
- keyPrefix,
95
- readControlMode,
96
- readKeySource
97
- } from "../chunk-3CUDMTL4.js";
98
97
  import {
99
98
  parseFlags
100
99
  } from "../chunk-GMXKITVA.js";
101
100
  import {
102
101
  exitOnHelpFlag
103
- } from "../chunk-LURY4WNF.js";
104
- import "../chunk-3XTFX4CL.js";
105
- import "../chunk-BC3VCZ3E.js";
102
+ } from "../chunk-WHDSJ6PD.js";
103
+ import "../chunk-GMJDQDXU.js";
106
104
  import {
107
105
  getPackageVersion
108
106
  } from "../chunk-DINDL2CF.js";
107
+ import {
108
+ keyPrefix,
109
+ readControlMode,
110
+ readKeySource
111
+ } from "../chunk-NBDU3R3G.js";
112
+ import "../chunk-BC3VCZ3E.js";
109
113
  import {
110
114
  callMcpTool,
111
115
  sendMcpRequest
112
116
  } from "../chunk-BSZYIAZL.js";
113
117
  import "../chunk-SAF6HGAA.js";
114
- import "../chunk-IUWRVTQK.js";
115
118
  import {
116
119
  UsageError
117
120
  } from "../chunk-7QLSKOSU.js";
118
121
  import {
119
122
  EXIT
120
123
  } from "../chunk-KZERVKTD.js";
121
- import "../chunk-XX2V4QS5.js";
124
+ import "../chunk-ANMHIZZY.js";
125
+ import "../chunk-4LL6LG5X.js";
122
126
  import {
123
127
  getBaseUrl
124
128
  } from "../chunk-2UMNXADU.js";
125
129
  import {
126
130
  CURSOR_GATE_EVENTS,
127
131
  HOOK_LOCATOR_BINARY
128
- } from "../chunk-X6RXX2NF.js";
132
+ } from "../chunk-QINYXLA5.js";
129
133
 
130
134
  // bin/pushary-doctor.ts
131
135
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -258,8 +262,8 @@ var extractHookCommand = (entries, needle) => {
258
262
  if (!Array.isArray(entries)) return null;
259
263
  for (const entry of entries) {
260
264
  const hookList = entry.hooks;
261
- if (!Array.isArray(hookList)) continue;
262
- for (const candidate of hookList) {
265
+ const candidates = Array.isArray(hookList) ? hookList : [entry];
266
+ for (const candidate of candidates) {
263
267
  const command = candidate.command;
264
268
  if (typeof command === "string" && command.includes(needle)) return command;
265
269
  }
@@ -609,13 +613,18 @@ var main = async () => {
609
613
  }
610
614
  }
611
615
  const cursorPluginDir2 = cursorPluginDir();
612
- if (existsSync(cursorPluginDir2)) {
616
+ const cursorUserHooksJson = readJson(cursorUserHooks());
617
+ const cursorUserMcpJson = readJson(cursorUserMcp());
618
+ if (cursorWired({
619
+ userHooks: cursorUserHooksJson,
620
+ mcp: cursorUserMcpJson,
621
+ pluginDirExists: existsSync(cursorPluginDir2)
622
+ })) {
613
623
  checking("Cursor");
614
- const cursorUserHooks2 = cursorUserHooks();
615
- const userHooks = readJson(cursorUserHooks2);
624
+ const userHooks = cursorUserHooksJson;
616
625
  const gateEntries = CURSOR_GATE_EVENTS.map((event) => ({
617
626
  event,
618
- entry: userHooks?.hooks?.[event]?.find((h) => String(h.command ?? "").includes("pushary-gate"))
627
+ entry: userHooks?.hooks?.[event]?.find((h) => pusharyHookExecutable(String(h.command ?? "")) !== null)
619
628
  }));
620
629
  const missing = gateEntries.filter(({ entry }) => !entry).map(({ event }) => event);
621
630
  if (missing.length === gateEntries.length) {
@@ -623,7 +632,7 @@ var main = async () => {
623
632
  } else if (missing.length > 0) {
624
633
  check(false, "Cursor: permission gate registered", `${missing.join(", ")} not registered \u2014 re-run setup`);
625
634
  } else {
626
- const paths_ = gateEntries.map(({ entry }) => String(entry.command).match(/"([^"]+)"/)?.[1] ?? "");
635
+ const paths_ = gateEntries.map(({ entry }) => pusharyHookExecutable(String(entry.command)) ?? "");
627
636
  const broken = paths_.filter((path) => !path || !existsSync(path));
628
637
  check(
629
638
  broken.length === 0,
@@ -631,17 +640,18 @@ var main = async () => {
631
640
  broken.length === 0 ? `~/.cursor/hooks.json \u2192 ${paths_[0]} (${gateEntries.length} events)` : `gate script not found: ${broken[0]} \u2014 re-run setup`
632
641
  );
633
642
  }
634
- const cursorMcp = readJson(join(cursorPluginDir2, "mcp.json"));
635
- const cursorServers = cursorMcp?.mcpServers ?? {};
636
- const cursorAuth = cursorServers.pushary?.headers?.Authorization;
643
+ const { authorization: cursorAuth, source: cursorMcpSource } = cursorMcpAuthorization(
644
+ readJson(join(cursorPluginDir2, "mcp.json")),
645
+ cursorUserMcpJson
646
+ );
637
647
  if (!cursorAuth) {
638
- check(false, "Cursor: API key linked", "no Authorization in plugin mcp.json \u2014 re-run setup");
648
+ check(false, "Cursor: API key linked", `no Authorization in ${cursorMcpSource} \u2014 re-run setup`);
639
649
  } else if (cursorAuth.includes("PUSHARY_API_KEY")) {
640
- check(false, "Cursor: API key linked", "plugin relies on $PUSHARY_API_KEY; re-run setup to embed the key so the gate works when Cursor is launched from the GUI");
650
+ check(false, "Cursor: API key linked", `${cursorMcpSource} relies on $PUSHARY_API_KEY; re-run setup to embed the key so the gate works when Cursor is launched from the GUI`);
641
651
  } else if (apiKey && cursorAuth !== `Bearer ${apiKey}`) {
642
652
  check(false, "Cursor: API key matches active key", "the embedded key is not the key hooks use (rotated?) \u2014 re-run setup");
643
653
  } else {
644
- check(true, "Cursor: API key linked", "embedded in plugin mcp.json");
654
+ check(true, "Cursor: API key linked", `embedded in ${cursorMcpSource}`);
645
655
  }
646
656
  } else {
647
657
  skipped("Cursor", installed("cursor") ? "installed, but Pushary is not set up for it" : "not installed");
@@ -658,16 +668,16 @@ var main = async () => {
658
668
  registeredIn.length > 0 ? registeredIn.join(", ") : "not listed in chat.pluginLocations \u2014 re-run setup (an unregistered plugin directory is never loaded)"
659
669
  );
660
670
  const vscodeHooks = readJson(join(vscodePluginDir2, "hooks", "hooks.json"));
661
- const gateEntry = vscodeHooks?.hooks?.PreToolUse?.find((h) => String(h.command ?? "").includes("pushary-gate"));
662
- if (!gateEntry) {
671
+ const gateCommand = extractAgentHookCommand(vscodeHooks?.hooks?.PreToolUse, CURSOR_GATE_SCRIPT);
672
+ if (!gateCommand) {
663
673
  check(false, "VS Code: permission gate present", "no Pushary gate in the plugin hooks.json \u2014 re-run setup");
664
674
  } else {
665
- const scriptPath = String(gateEntry.command).match(/"([^"]+)"/)?.[1] ?? "";
675
+ const scriptPath = pusharyHookExecutable(gateCommand) ?? "";
666
676
  const resolves = scriptPath ? existsSync(scriptPath) : false;
667
677
  check(
668
678
  resolves,
669
679
  "VS Code: permission gate present",
670
- resolves ? scriptPath : `gate script not found: ${scriptPath || gateEntry.command} \u2014 re-run setup`
680
+ resolves ? scriptPath : `gate script not found: ${scriptPath || gateCommand} \u2014 re-run setup`
671
681
  );
672
682
  }
673
683
  const vscodeMcp = readJson(join(vscodePluginDir2, ".mcp.json"));
@@ -14,13 +14,13 @@ import {
14
14
  } from "../chunk-JHJHCMAF.js";
15
15
  import {
16
16
  getMachineId
17
- } from "../chunk-DKWM5T3P.js";
18
- import "../chunk-QA72MKIT.js";
17
+ } from "../chunk-JTBDBKHU.js";
18
+ import "../chunk-3YGGEDJK.js";
19
19
  import "../chunk-BSZYIAZL.js";
20
20
  import "../chunk-SAF6HGAA.js";
21
21
  import "../chunk-7QLSKOSU.js";
22
22
  import "../chunk-KZERVKTD.js";
23
- import "../chunk-XX2V4QS5.js";
23
+ import "../chunk-4LL6LG5X.js";
24
24
  import {
25
25
  getApiKey
26
26
  } from "../chunk-2UMNXADU.js";
@@ -34,7 +34,7 @@ import {
34
34
  planElicitationAsk,
35
35
  readElicitationFields,
36
36
  renderElicitationOutput
37
- } from "../chunk-X6RXX2NF.js";
37
+ } from "../chunk-QINYXLA5.js";
38
38
 
39
39
  // bin/pushary-elicitation-hook.ts
40
40
  import { basename } from "path";
@@ -5,28 +5,35 @@ import {
5
5
  postLiveSession,
6
6
  postLiveSessionUntilAccepted,
7
7
  startLiveSessionHeartbeat
8
- } from "../chunk-OLAGKKSR.js";
9
- import "../chunk-IUN6VOKV.js";
8
+ } from "../chunk-ZP3SNUP7.js";
9
+ import "../chunk-4IPSMEGT.js";
10
+ import "../chunk-QZCFVWA7.js";
11
+ import {
12
+ transcriptsEnabled
13
+ } from "../chunk-M3UABYRT.js";
10
14
  import {
11
15
  startProcessOwnership,
12
16
  withSpawnProcessOwnership
13
- } from "../chunk-TEZ2FZD6.js";
17
+ } from "../chunk-CBGGUEKE.js";
14
18
  import {
15
19
  spawnClaude
16
20
  } from "../chunk-XHKBHWLX.js";
17
21
  import {
18
22
  resolveBinary
19
- } from "../chunk-X4ZUUFKV.js";
23
+ } from "../chunk-L4ZCFMWW.js";
20
24
  import {
21
25
  getMachineId
22
- } from "../chunk-DKWM5T3P.js";
23
- import "../chunk-QA72MKIT.js";
24
- import "../chunk-XX2V4QS5.js";
26
+ } from "../chunk-JTBDBKHU.js";
27
+ import "../chunk-3YGGEDJK.js";
28
+ import "../chunk-NBDU3R3G.js";
29
+ import "../chunk-BC3VCZ3E.js";
30
+ import "../chunk-ANMHIZZY.js";
31
+ import "../chunk-4LL6LG5X.js";
25
32
  import {
26
33
  getApiKey,
27
34
  getBaseUrl
28
35
  } from "../chunk-2UMNXADU.js";
29
- import "../chunk-X6RXX2NF.js";
36
+ import "../chunk-QINYXLA5.js";
30
37
 
31
38
  // bin/pushary-gemini-bridge.ts
32
39
  import { existsSync } from "fs";
@@ -305,13 +312,7 @@ var outcome = await withSpawnProcessOwnership(spawnId, () => runGeminiBridge({
305
312
  resumeSessionId: process.env.PUSHARY_BRIDGE_RESUME_SESSION_ID?.trim() || void 0,
306
313
  command: { command: process.env.PUSHARY_GEMINI_COMMAND?.trim() || resolveBinary("gemini") || "gemini" },
307
314
  signal: abort.signal,
308
- // The bridge's own default is ON (`transcripts?: boolean`, and it opts out only
309
- // on an explicit `false`), but `=== '1'` can never produce `undefined`, so an
310
- // unset env var forced the opt-out on every spawn and the live relay was never
311
- // built. Pass the opt-out only when the user asks for one. The relay stays a
312
- // hard no-op until this account's phone has registered a public key, and what
313
- // it sends is encrypted to that key on this machine.
314
- ...process.env.PUSHARY_TRANSCRIPTS === "0" ? { transcripts: false } : {}
315
+ transcripts: transcriptsEnabled()
315
316
  }));
316
317
  for (const signal of signals) process.off(signal, stop);
317
318
  process.exit(outcome === "stopped" ? 0 : 1);
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isGatingMoment,
4
4
  recordKeylessMoment
5
- } from "../chunk-3HFK3UXM.js";
5
+ } from "../chunk-FOGW6O2Y.js";
6
6
  import {
7
7
  readHookInput
8
8
  } from "../chunk-6CUUA7HO.js";
@@ -21,7 +21,7 @@ import {
21
21
  readLastUserPrompt,
22
22
  repoKeyFor,
23
23
  reportEvent
24
- } from "../chunk-FXIL7RCL.js";
24
+ } from "../chunk-OX35BSPV.js";
25
25
  import {
26
26
  DEFAULT_SESSION,
27
27
  askUser,
@@ -31,22 +31,23 @@ import {
31
31
  waitForAnswer
32
32
  } from "../chunk-JHJHCMAF.js";
33
33
  import {
34
+ UNNAMED_ACTION,
34
35
  deriveActionBody,
35
36
  deriveBlocker,
36
37
  deriveToolTarget,
37
38
  describeToolCall,
38
39
  scopePathFor
39
- } from "../chunk-TG3T3M4K.js";
40
+ } from "../chunk-N4QJ3CLX.js";
40
41
  import {
41
42
  getMachineId
42
- } from "../chunk-DKWM5T3P.js";
43
- import "../chunk-QA72MKIT.js";
43
+ } from "../chunk-JTBDBKHU.js";
44
+ import "../chunk-3YGGEDJK.js";
44
45
  import "../chunk-BSZYIAZL.js";
45
46
  import "../chunk-SAF6HGAA.js";
46
- import "../chunk-IUWRVTQK.js";
47
47
  import "../chunk-7QLSKOSU.js";
48
48
  import "../chunk-KZERVKTD.js";
49
- import "../chunk-XX2V4QS5.js";
49
+ import "../chunk-ANMHIZZY.js";
50
+ import "../chunk-4LL6LG5X.js";
50
51
  import {
51
52
  getApiKey
52
53
  } from "../chunk-2UMNXADU.js";
@@ -58,7 +59,7 @@ import {
58
59
  hookWaitClamped,
59
60
  hookWaitDeadline,
60
61
  resolveGate
61
- } from "../chunk-X6RXX2NF.js";
62
+ } from "../chunk-QINYXLA5.js";
62
63
 
63
64
  // bin/pushary-gemini-hook.ts
64
65
  import { basename } from "path";
@@ -131,7 +132,7 @@ var pushQuestion = async (apiKey, input, lookup, waitSeconds, mode, pollInterval
131
132
  const projectName = basename(input.cwd ?? process.cwd());
132
133
  const description = describeToolCall(lookup.tool, lookup.input, "hook");
133
134
  const result = await askUser(apiKey, {
134
- question: `Allow ${description}?`,
135
+ question: `Allow ${description || UNNAMED_ACTION}?`,
135
136
  type: "confirm",
136
137
  context: `Agent wants to run this in ${projectName}`,
137
138
  agentName: agentNameFor(input),
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePreToolUse
4
- } from "../chunk-J4K75V4D.js";
5
- import "../chunk-6EKQZA6R.js";
6
- import "../chunk-NCVIWGVA.js";
7
- import "../chunk-3HFK3UXM.js";
4
+ } from "../chunk-5MNTWAAJ.js";
5
+ import "../chunk-B2HND22S.js";
6
+ import "../chunk-S4BLNILH.js";
7
+ import "../chunk-FOGW6O2Y.js";
8
8
  import {
9
9
  readHookInput
10
10
  } from "../chunk-6CUUA7HO.js";
11
11
  import "../chunk-YHG74UFF.js";
12
- import "../chunk-FXIL7RCL.js";
12
+ import "../chunk-OX35BSPV.js";
13
13
  import "../chunk-JHJHCMAF.js";
14
- import "../chunk-TG3T3M4K.js";
15
- import "../chunk-DKWM5T3P.js";
16
- import "../chunk-QA72MKIT.js";
14
+ import "../chunk-N4QJ3CLX.js";
15
+ import "../chunk-JTBDBKHU.js";
16
+ import "../chunk-3YGGEDJK.js";
17
17
  import {
18
18
  exitOnHelpFlag
19
- } from "../chunk-LURY4WNF.js";
20
- import "../chunk-3XTFX4CL.js";
19
+ } from "../chunk-WHDSJ6PD.js";
20
+ import "../chunk-GMJDQDXU.js";
21
21
  import "../chunk-DINDL2CF.js";
22
22
  import "../chunk-BSZYIAZL.js";
23
23
  import "../chunk-SAF6HGAA.js";
24
- import "../chunk-IUWRVTQK.js";
25
24
  import "../chunk-7QLSKOSU.js";
26
25
  import "../chunk-KZERVKTD.js";
27
- import "../chunk-XX2V4QS5.js";
26
+ import "../chunk-ANMHIZZY.js";
27
+ import "../chunk-4LL6LG5X.js";
28
28
  import "../chunk-2UMNXADU.js";
29
- import "../chunk-X6RXX2NF.js";
29
+ import "../chunk-QINYXLA5.js";
30
30
 
31
31
  // bin/pushary-hook.ts
32
32
  exitOnHelpFlag("hook");
@@ -6,38 +6,38 @@ import "../chunk-3EGEA4KH.js";
6
6
  import {
7
7
  checkApiKey,
8
8
  describeKeyCheck
9
- } from "../chunk-BLODMQKJ.js";
9
+ } from "../chunk-ZO43JTT3.js";
10
10
  import {
11
11
  createIo
12
12
  } from "../chunk-5RUIFDTP.js";
13
- import {
14
- readKeySource,
15
- writeKey
16
- } from "../chunk-3CUDMTL4.js";
17
13
  import {
18
14
  parseFlags
19
15
  } from "../chunk-GMXKITVA.js";
20
16
  import {
21
17
  exitOnHelpFlag
22
- } from "../chunk-LURY4WNF.js";
23
- import "../chunk-3XTFX4CL.js";
24
- import "../chunk-BC3VCZ3E.js";
18
+ } from "../chunk-WHDSJ6PD.js";
19
+ import "../chunk-GMJDQDXU.js";
25
20
  import {
26
21
  getPackageVersion
27
22
  } from "../chunk-DINDL2CF.js";
23
+ import {
24
+ readKeySource,
25
+ writeKey
26
+ } from "../chunk-NBDU3R3G.js";
27
+ import "../chunk-BC3VCZ3E.js";
28
28
  import "../chunk-SAF6HGAA.js";
29
- import "../chunk-IUWRVTQK.js";
30
29
  import {
31
30
  UsageError
32
31
  } from "../chunk-7QLSKOSU.js";
33
32
  import {
34
33
  EXIT
35
34
  } from "../chunk-KZERVKTD.js";
36
- import "../chunk-XX2V4QS5.js";
35
+ import "../chunk-ANMHIZZY.js";
36
+ import "../chunk-4LL6LG5X.js";
37
37
  import "../chunk-2UMNXADU.js";
38
38
  import {
39
39
  isValidApiKey
40
- } from "../chunk-X6RXX2NF.js";
40
+ } from "../chunk-QINYXLA5.js";
41
41
 
42
42
  // bin/pushary-login.ts
43
43
  exitOnHelpFlag("login");
@@ -4,35 +4,35 @@ import {
4
4
  codexConfigToml,
5
5
  cursorUserMcp,
6
6
  geminiSettings
7
- } from "../chunk-QA72MKIT.js";
7
+ } from "../chunk-3YGGEDJK.js";
8
8
  import {
9
9
  createIo
10
10
  } from "../chunk-5RUIFDTP.js";
11
- import {
12
- clearKey,
13
- readKeySource
14
- } from "../chunk-3CUDMTL4.js";
15
11
  import {
16
12
  parseFlags
17
13
  } from "../chunk-GMXKITVA.js";
18
14
  import {
19
15
  exitOnHelpFlag
20
- } from "../chunk-LURY4WNF.js";
21
- import "../chunk-3XTFX4CL.js";
22
- import "../chunk-BC3VCZ3E.js";
16
+ } from "../chunk-WHDSJ6PD.js";
17
+ import "../chunk-GMJDQDXU.js";
23
18
  import "../chunk-DINDL2CF.js";
24
- import "../chunk-IUWRVTQK.js";
19
+ import {
20
+ clearKey,
21
+ readKeySource
22
+ } from "../chunk-NBDU3R3G.js";
23
+ import "../chunk-BC3VCZ3E.js";
25
24
  import {
26
25
  UsageError
27
26
  } from "../chunk-7QLSKOSU.js";
28
27
  import {
29
28
  EXIT
30
29
  } from "../chunk-KZERVKTD.js";
31
- import "../chunk-XX2V4QS5.js";
30
+ import "../chunk-ANMHIZZY.js";
31
+ import "../chunk-4LL6LG5X.js";
32
32
  import {
33
33
  getBaseUrl
34
34
  } from "../chunk-2UMNXADU.js";
35
- import "../chunk-X6RXX2NF.js";
35
+ import "../chunk-QINYXLA5.js";
36
36
 
37
37
  // bin/pushary-logout.ts
38
38
  import { existsSync } from "fs";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnFailedResponse
4
- } from "../chunk-253WC6O5.js";
5
- import "../chunk-BLODMQKJ.js";
4
+ } from "../chunk-YXT55PYF.js";
5
+ import "../chunk-ZO43JTT3.js";
6
6
  import {
7
7
  createIo
8
8
  } from "../chunk-5RUIFDTP.js";
@@ -11,8 +11,8 @@ import {
11
11
  } from "../chunk-GMXKITVA.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-LURY4WNF.js";
15
- import "../chunk-3XTFX4CL.js";
14
+ } from "../chunk-WHDSJ6PD.js";
15
+ import "../chunk-GMJDQDXU.js";
16
16
  import "../chunk-DINDL2CF.js";
17
17
  import "../chunk-SAF6HGAA.js";
18
18
  import {
@@ -25,7 +25,7 @@ import {
25
25
  getApiKey,
26
26
  getBaseUrl
27
27
  } from "../chunk-2UMNXADU.js";
28
- import "../chunk-X6RXX2NF.js";
28
+ import "../chunk-QINYXLA5.js";
29
29
 
30
30
  // bin/pushary-mode.ts
31
31
  exitOnHelpFlag("mode");
@@ -4,19 +4,19 @@ import {
4
4
  } from "../chunk-6CUUA7HO.js";
5
5
  import {
6
6
  handleNotification
7
- } from "../chunk-FXIL7RCL.js";
7
+ } from "../chunk-OX35BSPV.js";
8
8
  import "../chunk-JHJHCMAF.js";
9
- import "../chunk-TG3T3M4K.js";
10
- import "../chunk-DKWM5T3P.js";
11
- import "../chunk-QA72MKIT.js";
9
+ import "../chunk-N4QJ3CLX.js";
10
+ import "../chunk-JTBDBKHU.js";
11
+ import "../chunk-3YGGEDJK.js";
12
12
  import "../chunk-BSZYIAZL.js";
13
13
  import "../chunk-SAF6HGAA.js";
14
- import "../chunk-IUWRVTQK.js";
15
14
  import "../chunk-7QLSKOSU.js";
16
15
  import "../chunk-KZERVKTD.js";
17
- import "../chunk-XX2V4QS5.js";
16
+ import "../chunk-ANMHIZZY.js";
17
+ import "../chunk-4LL6LG5X.js";
18
18
  import "../chunk-2UMNXADU.js";
19
- import "../chunk-X6RXX2NF.js";
19
+ import "../chunk-QINYXLA5.js";
20
20
 
21
21
  // bin/pushary-notification-hook.ts
22
22
  var main = async () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isGatingMoment,
4
4
  recordKeylessMoment
5
- } from "../chunk-3HFK3UXM.js";
5
+ } from "../chunk-FOGW6O2Y.js";
6
6
  import {
7
7
  readHookInput
8
8
  } from "../chunk-6CUUA7HO.js";
@@ -19,7 +19,7 @@ import {
19
19
  policyRequestFor,
20
20
  readLastPrompt,
21
21
  repoKeyFor
22
- } from "../chunk-FXIL7RCL.js";
22
+ } from "../chunk-OX35BSPV.js";
23
23
  import {
24
24
  DEFAULT_SESSION,
25
25
  askUser,
@@ -31,22 +31,23 @@ import {
31
31
  import {
32
32
  HOOK_FALLBACK_MAX,
33
33
  OPENCODE_TOOL_NAMES,
34
+ UNNAMED_ACTION,
34
35
  deriveActionBody,
35
36
  deriveBlocker,
36
37
  deriveToolTarget,
37
38
  describeToolCall,
38
39
  scopePathFor
39
- } from "../chunk-TG3T3M4K.js";
40
+ } from "../chunk-N4QJ3CLX.js";
40
41
  import {
41
42
  getMachineId
42
- } from "../chunk-DKWM5T3P.js";
43
- import "../chunk-QA72MKIT.js";
43
+ } from "../chunk-JTBDBKHU.js";
44
+ import "../chunk-3YGGEDJK.js";
44
45
  import "../chunk-BSZYIAZL.js";
45
46
  import "../chunk-SAF6HGAA.js";
46
- import "../chunk-IUWRVTQK.js";
47
47
  import "../chunk-7QLSKOSU.js";
48
48
  import "../chunk-KZERVKTD.js";
49
- import "../chunk-XX2V4QS5.js";
49
+ import "../chunk-ANMHIZZY.js";
50
+ import "../chunk-4LL6LG5X.js";
50
51
  import {
51
52
  getApiKey
52
53
  } from "../chunk-2UMNXADU.js";
@@ -60,7 +61,7 @@ import {
60
61
  hookWaitDeadline,
61
62
  redactSecrets,
62
63
  resolveGate
63
- } from "../chunk-X6RXX2NF.js";
64
+ } from "../chunk-QINYXLA5.js";
64
65
 
65
66
  // bin/pushary-opencode-hook.ts
66
67
  import { basename } from "path";
@@ -114,7 +115,7 @@ var pollForAnswer = async (apiKey, correlationId, deadlineMs, pollInterval = 2e3
114
115
  var agentNameFor = (input) => `${OPENCODE_AGENT.label} - ${basename(input.cwd ?? process.cwd())}`;
115
116
  var describeFor = (input, lookup) => {
116
117
  if (lookup.tool) return describeToolCall(lookup.tool, lookup.input, "hook");
117
- return redactSecrets(input.title ?? "").trim().slice(0, HOOK_FALLBACK_MAX) || "this request";
118
+ return redactSecrets(input.title ?? "").trim().slice(0, HOOK_FALLBACK_MAX) || UNNAMED_ACTION;
118
119
  };
119
120
  var pushQuestion = async (apiKey, input, lookup, waitSeconds, mode, pollInterval = 2e3) => {
120
121
  const projectName = basename(input.cwd ?? process.cwd());