@pushary/agent-hooks 1.9.170 → 1.9.174

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 (148) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{api-3KBPIGV4.js → api-MNYX7TLY.js} +12 -12
  3. package/dist/bin/pushary-audit.js +4 -4
  4. package/dist/bin/pushary-bell-hook.js +31 -31
  5. package/dist/bin/pushary-bell.js +13 -12
  6. package/dist/bin/pushary-calls.js +16 -16
  7. package/dist/bin/pushary-claude.js +37 -39
  8. package/dist/bin/pushary-clean.js +49 -47
  9. package/dist/bin/pushary-codex-bridge.js +27 -27
  10. package/dist/bin/pushary-codex-hook.js +47 -49
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +20 -19
  13. package/dist/bin/pushary-connect.js +37 -37
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +57 -56
  16. package/dist/bin/pushary-disconnect.js +30 -30
  17. package/dist/bin/pushary-display-hook.js +26 -26
  18. package/dist/bin/pushary-doctor.js +54 -53
  19. package/dist/bin/pushary-elicitation-hook.js +34 -33
  20. package/dist/bin/pushary-gemini-bridge.js +25 -23
  21. package/dist/bin/pushary-gemini-hook.js +41 -43
  22. package/dist/bin/pushary-hook.js +39 -39
  23. package/dist/bin/pushary-login.js +32 -26
  24. package/dist/bin/pushary-logout.js +41 -33
  25. package/dist/bin/pushary-mcp.js +13 -13
  26. package/dist/bin/pushary-mode.js +17 -17
  27. package/dist/bin/pushary-notification-hook.js +30 -30
  28. package/dist/bin/pushary-opencode-hook.js +47 -56
  29. package/dist/bin/pushary-permission-denied-hook.js +39 -39
  30. package/dist/bin/pushary-permission-hook.js +39 -39
  31. package/dist/bin/pushary-post-hook.js +31 -31
  32. package/dist/bin/pushary-prompt-hook.js +30 -30
  33. package/dist/bin/pushary-session-end-hook.js +32 -32
  34. package/dist/bin/pushary-session-start-hook.js +42 -42
  35. package/dist/bin/pushary-sessions.js +15 -15
  36. package/dist/bin/pushary-setup.js +79 -68
  37. package/dist/bin/pushary-stats.js +5 -5
  38. package/dist/bin/pushary-status.js +38 -38
  39. package/dist/bin/pushary-stop-hook.js +30 -30
  40. package/dist/bin/pushary-stopfailure-hook.js +30 -30
  41. package/dist/bin/pushary-suggestions.js +17 -17
  42. package/dist/bin/pushary-transcript-register.js +21 -21
  43. package/dist/bin/pushary-transcripts.js +29 -29
  44. package/dist/bin/pushary-upgrade.js +46 -46
  45. package/dist/bin/pushary-wait.js +17 -17
  46. package/dist/bin/pushary.js +8 -8
  47. package/dist/{chunk-MPJAXUN2.js → chunk-2EHDZOJA.js} +14 -14
  48. package/dist/{chunk-BZILLAPJ.js → chunk-2IEU6RX5.js} +1 -1
  49. package/dist/{chunk-LEXVQXZU.js → chunk-3FOW4K2L.js} +4 -4
  50. package/dist/{chunk-UCND4JHN.js → chunk-3L5DXDPK.js} +1 -1
  51. package/dist/{chunk-3ZO7WCMV.js → chunk-4IOCYW6O.js} +3 -3
  52. package/dist/{chunk-NJSBHEEW.js → chunk-4NXEOPXZ.js} +1 -1
  53. package/dist/{chunk-352FIVVH.js → chunk-55L4JSPA.js} +1 -1
  54. package/dist/{chunk-EBHIVYSD.js → chunk-57C45LJT.js} +2 -2
  55. package/dist/{chunk-5OI4EW6G.js → chunk-5JCKVJC6.js} +5 -5
  56. package/dist/{chunk-GVIKF73A.js → chunk-5LIGHRBH.js} +1 -1
  57. package/dist/{chunk-TIRZZCS4.js → chunk-6355EUTT.js} +4 -4
  58. package/dist/{chunk-DXHRKDP7.js → chunk-6BZCNKCY.js} +5 -5
  59. package/dist/{chunk-7RNLPI6H.js → chunk-6HYQSAMW.js} +3 -3
  60. package/dist/{chunk-3UNQJ6AO.js → chunk-76T3UMRC.js} +32 -33
  61. package/dist/{chunk-65U6TH6P.js → chunk-7VG4JO77.js} +4 -4
  62. package/dist/{chunk-JNUZYDUC.js → chunk-7XALAS43.js} +3 -3
  63. package/dist/{chunk-W4NCWOVL.js → chunk-7YVSQ342.js} +1 -1
  64. package/dist/{chunk-TGYM6UQJ.js → chunk-A3JTWB74.js} +2 -2
  65. package/dist/{chunk-CNPTWWKJ.js → chunk-A3YA4EIY.js} +3 -3
  66. package/dist/{chunk-L6UCFQKZ.js → chunk-BHBHY35A.js} +4 -4
  67. package/dist/{chunk-IWKEIVDF.js → chunk-C7SKKHMD.js} +7 -5
  68. package/dist/{chunk-QJNI6MPV.js → chunk-CDUTYRXO.js} +4 -4
  69. package/dist/{chunk-DXUPOVJP.js → chunk-CPV25VW5.js} +1 -1
  70. package/dist/{chunk-2OMWK322.js → chunk-CTLI2HJE.js} +5 -5
  71. package/dist/{chunk-BX45H3DU.js → chunk-DJS7W4SC.js} +6 -6
  72. package/dist/{chunk-2TRYSF64.js → chunk-DNJKQHK2.js} +20 -1
  73. package/dist/{chunk-FTE5ECGI.js → chunk-DPHYIJNF.js} +4 -4
  74. package/dist/{chunk-57MF5I5V.js → chunk-E2WABTIY.js} +7 -7
  75. package/dist/{chunk-OKM76UDB.js → chunk-ET2BWLQX.js} +3 -3
  76. package/dist/{chunk-OJUW7QW2.js → chunk-FAMKGTCF.js} +1 -1
  77. package/dist/{chunk-HP5RU3OU.js → chunk-FPF7ZSH5.js} +3 -3
  78. package/dist/{chunk-SKDSU735.js → chunk-FS7WOHFO.js} +5 -5
  79. package/dist/{chunk-LILP3T24.js → chunk-GGNKMBCN.js} +4 -4
  80. package/dist/{chunk-NYDJHJIJ.js → chunk-GPHESUOZ.js} +6 -6
  81. package/dist/{chunk-TBH5WLIA.js → chunk-GTCNACQ2.js} +5 -5
  82. package/dist/{chunk-K5HACZJ3.js → chunk-H3MY3EQP.js} +4 -4
  83. package/dist/{chunk-DVBRMNFM.js → chunk-HGVGOGVD.js} +3 -3
  84. package/dist/{chunk-NWKXT7LC.js → chunk-HLK3ZELO.js} +2 -2
  85. package/dist/{chunk-CLT4J5N5.js → chunk-HUJWZIQ2.js} +2 -2
  86. package/dist/{chunk-HXVCULWA.js → chunk-HZGSGLK4.js} +6 -6
  87. package/dist/{chunk-7AENNOGX.js → chunk-IP4NJN6G.js} +1 -1
  88. package/dist/{chunk-MVWWEQQG.js → chunk-IQNM745W.js} +3 -3
  89. package/dist/{chunk-GZZ7XGL5.js → chunk-JG2ZVO5L.js} +1 -1
  90. package/dist/{chunk-RSVW634O.js → chunk-JXOVA3JW.js} +6 -6
  91. package/dist/{chunk-HZANYISD.js → chunk-K5NBHOE6.js} +2 -2
  92. package/dist/{chunk-3I3RUJRD.js → chunk-LH5JTAAH.js} +2 -2
  93. package/dist/{chunk-IHNII3GT.js → chunk-LIVVVKIZ.js} +3 -3
  94. package/dist/{chunk-AVN4A4A6.js → chunk-M4KQPSMS.js} +1 -1
  95. package/dist/{chunk-SDLL4YPS.js → chunk-MF6FSDM4.js} +3 -3
  96. package/dist/{chunk-SSKNRWWS.js → chunk-N73CKAC6.js} +1 -1
  97. package/dist/{chunk-YEZL4T4K.js → chunk-O4AAXXXP.js} +4 -4
  98. package/dist/{chunk-OHVQ75S7.js → chunk-OBNVYNPQ.js} +3 -3
  99. package/dist/{chunk-CFZUESTS.js → chunk-OFKKNHYJ.js} +1 -1
  100. package/dist/{chunk-EGPOBJZG.js → chunk-OLKAGHOO.js} +1 -1
  101. package/dist/{chunk-LML7I4FY.js → chunk-PAYK5BD7.js} +2 -2
  102. package/dist/{chunk-WI2WYKSE.js → chunk-PDIN6FE5.js} +1 -1
  103. package/dist/{chunk-TODDEIYG.js → chunk-PM2NRK6Y.js} +12 -2
  104. package/dist/{chunk-SADLXUUA.js → chunk-PWJ76P2L.js} +7 -7
  105. package/dist/{chunk-T33PQ3TE.js → chunk-PZNVSYIY.js} +6 -6
  106. package/dist/{chunk-UDPXX6YR.js → chunk-QCZMBOMF.js} +1 -1
  107. package/dist/{chunk-CXKAP6DR.js → chunk-R3EIRYON.js} +5 -5
  108. package/dist/{chunk-ZA7N6SUH.js → chunk-R4RL4UDT.js} +5 -5
  109. package/dist/{chunk-W4TTC7MU.js → chunk-RIHIXQAL.js} +12 -12
  110. package/dist/{chunk-XI7MSL4R.js → chunk-RT6FAMIF.js} +27 -26
  111. package/dist/{chunk-IV7WDCKS.js → chunk-S3X6WLW5.js} +1 -1
  112. package/dist/{chunk-6KL27ETS.js → chunk-SHLAHE46.js} +10 -10
  113. package/dist/{chunk-5TNFIUN3.js → chunk-SNY4ABHS.js} +4 -4
  114. package/dist/{chunk-CYTPQDQY.js → chunk-TCE3J44Z.js} +1 -1
  115. package/dist/{chunk-VX6ZYAOA.js → chunk-TRXYUOWW.js} +8 -8
  116. package/dist/{chunk-A2DVMIX4.js → chunk-TU5DTA2V.js} +1 -1
  117. package/dist/{chunk-TNYOSIAY.js → chunk-UJ6ZJNHK.js} +3 -3
  118. package/dist/{chunk-XR27HPYC.js → chunk-UOPOVQ2P.js} +2 -1
  119. package/dist/{chunk-L77OIGRB.js → chunk-US4LUIFU.js} +20 -0
  120. package/dist/{chunk-KE5ED475.js → chunk-VCWHZDP3.js} +3 -3
  121. package/dist/{chunk-FD7JHIET.js → chunk-VH2DDTBE.js} +12 -12
  122. package/dist/{chunk-2SMEEXDR.js → chunk-VLEKL3PF.js} +1 -1
  123. package/dist/{chunk-Y6ILCLKE.js → chunk-VRNGMRJA.js} +1 -1
  124. package/dist/{chunk-RGE64J2V.js → chunk-WAZIEUIG.js} +7 -5
  125. package/dist/{chunk-LT3B5432.js → chunk-WWVVLMPJ.js} +5 -3
  126. package/dist/{chunk-TTTMOX73.js → chunk-X5LTD4VA.js} +2 -2
  127. package/dist/{chunk-MPCJB6I7.js → chunk-XZOYXQ6J.js} +6 -6
  128. package/dist/{chunk-JTFD3KQ6.js → chunk-YDYKKSFU.js} +224 -75
  129. package/dist/{chunk-BFZHRQJU.js → chunk-YE7WPP7M.js} +1 -1
  130. package/dist/{chunk-IGKHWARK.js → chunk-YFOR2JQQ.js} +2 -2
  131. package/dist/{chunk-7E4OSMST.js → chunk-YXLWKFKC.js} +6 -6
  132. package/dist/{chunk-GFWQNXX7.js → chunk-Z6YRFNN3.js} +5 -5
  133. package/dist/{chunk-EPBS4KJR.js → chunk-ZLXN26UD.js} +6 -6
  134. package/dist/{codex-app-cards-switch-AKCQRBUP.js → codex-app-cards-switch-MJA47AZY.js} +13 -13
  135. package/dist/{codex-card-routing-QGOX4RNI.js → codex-card-routing-2MDDCMAO.js} +2 -2
  136. package/dist/{codex-desktop-launch-SCQW4KAV.js → codex-desktop-launch-7IVPOMSK.js} +1 -1
  137. package/dist/{codex-session-launch-4EVYIYEQ.js → codex-session-launch-U6JUH6X6.js} +24 -24
  138. package/dist/{config-QIHLQCEV.js → config-S2OVEI6F.js} +3 -3
  139. package/dist/{global-upgrade-WHSNOE3E.js → global-upgrade-XGDWDFQN.js} +11 -11
  140. package/dist/{identity-NEXDWMLO.js → identity-7LLNHIP3.js} +5 -5
  141. package/dist/{live-capabilities-CC7L4VDX.js → live-capabilities-CI46M4XO.js} +6 -6
  142. package/dist/{paths-J3MVJDQI.js → paths-FVQYVHLH.js} +4 -4
  143. package/dist/reapply-M4DKHUZX.js +69 -0
  144. package/dist/src/index.js +38 -38
  145. package/dist/{upgrade-lock-7PPYIRBP.js → upgrade-lock-DTWLFPH2.js} +5 -5
  146. package/dist/{usage-GDUDYZSV.js → usage-IHNVIPGZ.js} +3 -3
  147. package/package.json +1 -1
  148. package/dist/reapply-6FNUVXCL.js +0 -69
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-SDLL4YPS.js";
3
+ } from "./chunk-MF6FSDM4.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-CXKAP6DR.js";
4
+ } from "./chunk-R3EIRYON.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-65U6TH6P.js";
7
+ } from "./chunk-7VG4JO77.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-SDLL4YPS.js";
11
+ } from "./chunk-MF6FSDM4.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-L77OIGRB.js";
14
+ } from "./chunk-US4LUIFU.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -3,7 +3,7 @@ import {
3
3
  HOOK_BUDGETS,
4
4
  KILL_REASON,
5
5
  OPENCODE_APPROVAL_EVENT
6
- } from "./chunk-L77OIGRB.js";
6
+ } from "./chunk-US4LUIFU.js";
7
7
 
8
8
  // src/opencode-plugin.ts
9
9
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-5OI4EW6G.js";
3
+ } from "./chunk-5JCKVJC6.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-SSKNRWWS.js";
6
+ } from "./chunk-N73CKAC6.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-IV7WDCKS.js";
9
+ } from "./chunk-S3X6WLW5.js";
10
10
 
11
11
  // src/mcp-stdio-bridge.ts
12
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-XI7MSL4R.js";
3
+ } from "./chunk-RT6FAMIF.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomic
3
- } from "./chunk-TODDEIYG.js";
3
+ } from "./chunk-PM2NRK6Y.js";
4
4
  import {
5
5
  __export
6
6
  } from "./chunk-MLKGABMK.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  callDecisionStore,
3
3
  identifyingToolInput
4
- } from "./chunk-XI7MSL4R.js";
4
+ } from "./chunk-RT6FAMIF.js";
5
5
  import {
6
6
  canonicalJson
7
- } from "./chunk-SDLL4YPS.js";
7
+ } from "./chunk-MF6FSDM4.js";
8
8
 
9
9
  // src/phone-approval.ts
10
10
  import { createHash } from "crypto";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  fetchAsCredential
3
- } from "./chunk-SSKNRWWS.js";
3
+ } from "./chunk-N73CKAC6.js";
4
4
  import {
5
5
  keyCheckFromResponse
6
- } from "./chunk-OHVQ75S7.js";
6
+ } from "./chunk-OBNVYNPQ.js";
7
7
  import {
8
8
  installNetworkDefaults
9
- } from "./chunk-OKM76UDB.js";
9
+ } from "./chunk-ET2BWLQX.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-A2DVMIX4.js";
12
+ } from "./chunk-TU5DTA2V.js";
13
13
  import {
14
14
  isRecord,
15
15
  isToolErrorResult,
16
16
  toolFailureCodeOfResult
17
- } from "./chunk-L77OIGRB.js";
17
+ } from "./chunk-US4LUIFU.js";
18
18
 
19
19
  // src/retry.ts
20
20
  var isRetryable = (err) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFinalCommandAckRefusal
3
- } from "./chunk-L77OIGRB.js";
3
+ } from "./chunk-US4LUIFU.js";
4
4
 
5
5
  // src/command-ack-outcome.ts
6
6
  var SETTLED_ACK = { outcome: "settled" };
@@ -3,16 +3,16 @@ import {
3
3
  NpmMissingError,
4
4
  NpmPermissionError,
5
5
  NpmReleaseAgeError
6
- } from "./chunk-LILP3T24.js";
6
+ } from "./chunk-GGNKMBCN.js";
7
7
  import {
8
8
  writeFileAtomic
9
- } from "./chunk-TODDEIYG.js";
9
+ } from "./chunk-PM2NRK6Y.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-IV7WDCKS.js";
12
+ } from "./chunk-S3X6WLW5.js";
13
13
  import {
14
14
  readSetupAgentFailures
15
- } from "./chunk-L77OIGRB.js";
15
+ } from "./chunk-US4LUIFU.js";
16
16
 
17
17
  // src/setup/config-write.ts
18
18
  var AgentConfigWriteError = class extends Error {
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  external_exports,
3
3
  readOwnerOnlyJson
4
- } from "./chunk-352FIVVH.js";
4
+ } from "./chunk-55L4JSPA.js";
5
5
  import {
6
6
  fetchAsCredential
7
- } from "./chunk-SSKNRWWS.js";
7
+ } from "./chunk-N73CKAC6.js";
8
8
  import {
9
9
  getBaseUrl
10
- } from "./chunk-A2DVMIX4.js";
10
+ } from "./chunk-TU5DTA2V.js";
11
11
  import {
12
12
  writeJsonAtomicDurable
13
- } from "./chunk-TODDEIYG.js";
13
+ } from "./chunk-PM2NRK6Y.js";
14
14
  import {
15
15
  compressTranscriptRecord,
16
16
  redactSecretsFromContent,
17
17
  transcriptRecordPlaintext
18
- } from "./chunk-L77OIGRB.js";
18
+ } from "./chunk-US4LUIFU.js";
19
19
 
20
20
  // src/transcript-recipient-pin.ts
21
21
  import { createHash } from "crypto";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-SDLL4YPS.js";
3
+ } from "./chunk-MF6FSDM4.js";
4
4
  import {
5
5
  readJsonSafe
6
- } from "./chunk-TODDEIYG.js";
6
+ } from "./chunk-PM2NRK6Y.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-L77OIGRB.js";
9
+ } from "./chunk-US4LUIFU.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -2,39 +2,39 @@ import {
2
2
  forgetPhoneApproval,
3
3
  rememberPhoneApproval,
4
4
  takePhoneApproval
5
- } from "./chunk-EBHIVYSD.js";
5
+ } from "./chunk-57C45LJT.js";
6
6
  import {
7
7
  claudeSettingsLocationFor,
8
8
  readClaudePermissionRules
9
- } from "./chunk-HZANYISD.js";
9
+ } from "./chunk-K5NBHOE6.js";
10
10
  import {
11
11
  defersToNativeMode
12
- } from "./chunk-W4NCWOVL.js";
12
+ } from "./chunk-7YVSQ342.js";
13
13
  import {
14
14
  askAgentQuestions,
15
15
  outcomeOfFailedAsk,
16
16
  storedWaitDeadline
17
- } from "./chunk-ZA7N6SUH.js";
17
+ } from "./chunk-R4RL4UDT.js";
18
18
  import {
19
19
  reportMachineDenial
20
- } from "./chunk-IWKEIVDF.js";
20
+ } from "./chunk-C7SKKHMD.js";
21
21
  import {
22
22
  isGatingMoment,
23
23
  recordKeylessMoment
24
- } from "./chunk-2SMEEXDR.js";
24
+ } from "./chunk-VLEKL3PF.js";
25
25
  import {
26
26
  isAdmitted,
27
27
  readAdmissionRules
28
- } from "./chunk-2OMWK322.js";
28
+ } from "./chunk-CTLI2HJE.js";
29
29
  import {
30
30
  isDeferAnswer,
31
31
  oncePerSession
32
- } from "./chunk-NJSBHEEW.js";
32
+ } from "./chunk-4NXEOPXZ.js";
33
33
  import {
34
34
  activeHookSource,
35
35
  activeIdentity,
36
36
  namedSource
37
- } from "./chunk-CXKAP6DR.js";
37
+ } from "./chunk-R3EIRYON.js";
38
38
  import {
39
39
  DEFAULT_SESSION,
40
40
  approvalAwaitingRetry,
@@ -57,7 +57,7 @@ import {
57
57
  settleQuestionsForToolUse,
58
58
  sweepFilesOlderThan,
59
59
  userScope
60
- } from "./chunk-XI7MSL4R.js";
60
+ } from "./chunk-RT6FAMIF.js";
61
61
  import {
62
62
  UNNAMED_ACTION,
63
63
  deriveAction,
@@ -68,12 +68,7 @@ import {
68
68
  patchDeletesFiles,
69
69
  permissionDeniedAction,
70
70
  scopePathFor
71
- } from "./chunk-CFZUESTS.js";
72
- import {
73
- branchFor,
74
- repoKeyFor,
75
- repositoryScopeFor
76
- } from "./chunk-2TRYSF64.js";
71
+ } from "./chunk-OFKKNHYJ.js";
77
72
  import {
78
73
  askUser,
79
74
  cancelQuestion,
@@ -90,23 +85,29 @@ import {
90
85
  waitForQuestion,
91
86
  waitsForThePhone,
92
87
  withdrawQuestion
93
- } from "./chunk-7E4OSMST.js";
88
+ } from "./chunk-YXLWKFKC.js";
89
+ import {
90
+ branchFor,
91
+ projectNameFor,
92
+ repoKeyFor,
93
+ repositoryScopeFor
94
+ } from "./chunk-DNJKQHK2.js";
94
95
  import {
95
96
  getMachineId
96
- } from "./chunk-IGKHWARK.js";
97
+ } from "./chunk-YFOR2JQQ.js";
97
98
  import {
98
99
  POSTTOOLUSE_MIRRORED_TOOLS
99
- } from "./chunk-SDLL4YPS.js";
100
+ } from "./chunk-MF6FSDM4.js";
100
101
  import {
101
102
  getApiKey,
102
103
  getBaseUrl
103
- } from "./chunk-A2DVMIX4.js";
104
+ } from "./chunk-TU5DTA2V.js";
104
105
  import {
105
106
  writeFileAtomic
106
- } from "./chunk-TODDEIYG.js";
107
+ } from "./chunk-PM2NRK6Y.js";
107
108
  import {
108
109
  NPX_LATEST_COMMAND
109
- } from "./chunk-IV7WDCKS.js";
110
+ } from "./chunk-S3X6WLW5.js";
110
111
  import {
111
112
  AGENT_QUESTION_STRATEGY,
112
113
  AGENT_QUESTION_TOOL,
@@ -140,6 +141,7 @@ import {
140
141
  claudePermissionRequestOutput,
141
142
  claudePreToolUseOutput,
142
143
  claudePromptTakesTheCall,
144
+ claudeQuestionAnswers,
143
145
  claudeStoppedPermissionRequestOutput,
144
146
  claudeStoppedPreToolUseOutput,
145
147
  denyReasonFrom,
@@ -177,7 +179,7 @@ import {
177
179
  timeoutActionWithoutLocalPrompt,
178
180
  unansweredRefusalReason,
179
181
  unapprovedScopeReason
180
- } from "./chunk-L77OIGRB.js";
182
+ } from "./chunk-US4LUIFU.js";
181
183
 
182
184
  // src/terminal-answer-watch.ts
183
185
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -294,9 +296,6 @@ var reportDecisionEpisode = async (apiKey, input) => {
294
296
  }
295
297
  };
296
298
 
297
- // src/hook.ts
298
- import { basename } from "path";
299
-
300
299
  // src/pre-tool-use-output.ts
301
300
  var allow = (reason) => claudePreToolUseOutput("allow", reason);
302
301
  var deny = (reason) => claudePreToolUseOutput("deny", reason);
@@ -585,7 +584,7 @@ var outcomeOfDispatch = (decided) => {
585
584
  };
586
585
  var dispatchModeDecision = async (apiKey, input, toolPolicy, machineId, trainingConsent = false, scopeReason, scopePath, terminalLive, askReason, matchedRoute) => {
587
586
  const description = describeToolCall(input.tool_name, input.tool_input, "hook");
588
- const projectName = basename(input.cwd ?? process.cwd());
587
+ const projectName = projectNameFor(input.cwd);
589
588
  const sessionId = input.session_id;
590
589
  const toolTarget = deriveToolTarget(input.tool_name, input.tool_input);
591
590
  const ownPrompt = hasItsOwnApprovalPrompt(ACTIVE_SOURCE);
@@ -697,7 +696,7 @@ var handleAskUserQuestion = async (apiKey, input, modeState) => {
697
696
  if (questionHandedToTheTerminal(input.tool_name, modeState)) return void 0;
698
697
  const questions = parseAgentQuestions(input.tool_input ?? {});
699
698
  if (!questions) return void 0;
700
- const projectName = basename(input.cwd ?? process.cwd());
699
+ const projectName = projectNameFor(input.cwd);
701
700
  const deadline = hookWaitDeadline(START_MS, effectiveWaitSeconds("wait", 0, "claude"), "claude", Date.now());
702
701
  const outcome = await askAgentQuestions(apiKey, {
703
702
  toolName: AGENT_QUESTION_TOOL,
@@ -709,7 +708,7 @@ var handleAskUserQuestion = async (apiKey, input, modeState) => {
709
708
  }, questions);
710
709
  switch (outcome.kind) {
711
710
  case "answered":
712
- return allowWithInput({ ...input.tool_input ?? {}, answers: outcome.answers });
711
+ return allowWithInput({ ...input.tool_input ?? {}, answers: claudeQuestionAnswers(questions, outcome.answers) });
713
712
  case "stopped":
714
713
  case "unavailable":
715
714
  return halted(DECISION_STOP_REASON);
@@ -721,7 +720,7 @@ var PLAN_APPROVE = "Approve, start coding";
721
720
  var PLAN_KEEP_PLANNING = "Keep planning";
722
721
  var handleExitPlanMode = async (apiKey, input) => {
723
722
  const toolInput = input.tool_input ?? {};
724
- const projectName = basename(input.cwd ?? process.cwd());
723
+ const projectName = projectNameFor(input.cwd);
725
724
  const deadline = hookWaitDeadline(START_MS, effectiveWaitSeconds("wait", 0, "claude"), "claude", Date.now());
726
725
  let result;
727
726
  try {
@@ -761,7 +760,7 @@ var handleKeyless = (input) => {
761
760
  recordKeylessMoment({
762
761
  ts: Date.now(),
763
762
  tool: input.tool_name,
764
- project: basename(input.cwd ?? process.cwd()),
763
+ project: projectNameFor(input.cwd),
765
764
  sessionId: input.session_id
766
765
  });
767
766
  }
@@ -1044,7 +1043,7 @@ var reportPermissionDenied = (input) => reportEvent({
1044
1043
  occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
1045
1044
  toolUseId: input.tool_use_id,
1046
1045
  agentType: ACTIVE_AGENT.type,
1047
- agentName: agentNameIn(basename(input.cwd ?? process.cwd())),
1046
+ agentName: agentNameIn(projectNameFor(input.cwd)),
1048
1047
  action: permissionDeniedAction(input.tool_name),
1049
1048
  sessionId: input.session_id,
1050
1049
  ...permissionModeOf(input)
@@ -1061,7 +1060,7 @@ var notifyPermissionDenied = async (apiKey, input) => {
1061
1060
  if (claimThrottle(`permdenied:${sessionKey}:${input.tool_name}`, PERMISSION_DENIED_NOTICE_WINDOW_MS) !== "passed") return;
1062
1061
  const mode = await fetchModeState(apiKey, input.session_id).catch(() => null);
1063
1062
  if (mode?.kill || mode?.mode === "terminal_only") return;
1064
- const projectName = basename(input.cwd ?? process.cwd());
1063
+ const projectName = projectNameFor(input.cwd);
1065
1064
  await sendNotification(apiKey, {
1066
1065
  title: `Auto mode blocked ${input.tool_name}`,
1067
1066
  body: `Your agent was denied ${input.tool_name} in ${projectName}.`,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-CLT4J5N5.js";
3
+ } from "./chunk-HUJWZIQ2.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-BZILLAPJ.js";
6
+ } from "./chunk-2IEU6RX5.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -16,13 +16,13 @@ import {
16
16
  isBridgeLocator,
17
17
  isProtectedByScope,
18
18
  registerHookEntry
19
- } from "./chunk-SDLL4YPS.js";
19
+ } from "./chunk-MF6FSDM4.js";
20
20
  import {
21
21
  CURSOR_GATE_EVENTS,
22
22
  HOOK_BUDGETS,
23
23
  HOOK_LOCATOR_BINARY,
24
24
  hookCommandHoldBudget
25
- } from "./chunk-L77OIGRB.js";
25
+ } from "./chunk-US4LUIFU.js";
26
26
 
27
27
  // src/gemini-config.ts
28
28
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -9,7 +9,7 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-DVBRMNFM.js";
12
+ } from "./chunk-HGVGOGVD.js";
13
13
  import {
14
14
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
15
15
  CODEX_APP_LAUNCH_VARIABLE
@@ -19,10 +19,10 @@ import {
19
19
  } from "./chunk-QCGNGEGE.js";
20
20
  import {
21
21
  xml
22
- } from "./chunk-VX6ZYAOA.js";
22
+ } from "./chunk-TRXYUOWW.js";
23
23
  import {
24
24
  writeFileAtomic
25
- } from "./chunk-TODDEIYG.js";
25
+ } from "./chunk-PM2NRK6Y.js";
26
26
 
27
27
  // src/codex-app-cards-switch.ts
28
28
  import { execFileSync as execFileSync2 } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shouldDeferToNativeMode
3
- } from "./chunk-L77OIGRB.js";
3
+ } from "./chunk-US4LUIFU.js";
4
4
 
5
5
  // src/native-defer.ts
6
6
  var nativeDeferOptions = () => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  findNativeClaudeInstall
3
- } from "./chunk-CYTPQDQY.js";
3
+ } from "./chunk-TCE3J44Z.js";
4
4
  import {
5
5
  isFile
6
- } from "./chunk-TODDEIYG.js";
6
+ } from "./chunk-PM2NRK6Y.js";
7
7
 
8
8
  // src/wrapper/claudeBinary.ts
9
9
  import { homedir } from "os";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  spawnClaude
3
- } from "./chunk-Y6ILCLKE.js";
3
+ } from "./chunk-VRNGMRJA.js";
4
4
  import {
5
5
  CODEX_HOOK_EVENTS,
6
6
  CODEX_REQUIRED_APPROVAL_EVENTS,
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-SDLL4YPS.js";
10
+ } from "./chunk-MF6FSDM4.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-LILP3T24.js";
13
+ } from "./chunk-GGNKMBCN.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-UQTQ6HPO.js";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-HXVCULWA.js";
3
+ } from "./chunk-HZGSGLK4.js";
4
4
  import {
5
5
  matchMacAccountStep,
6
6
  retryAgentCommand
7
- } from "./chunk-TIRZZCS4.js";
7
+ } from "./chunk-6355EUTT.js";
8
8
  import {
9
9
  canChangeApprovalSettings
10
- } from "./chunk-LML7I4FY.js";
10
+ } from "./chunk-PAYK5BD7.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND,
16
16
  npmExecSetupCommandFor
17
- } from "./chunk-IV7WDCKS.js";
17
+ } from "./chunk-S3X6WLW5.js";
18
18
  import {
19
19
  LATEST_DIST_TAG
20
20
  } from "./chunk-UQTQ6HPO.js";
@@ -4,18 +4,20 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-XI7MSL4R.js";
7
+ } from "./chunk-RT6FAMIF.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
11
- } from "./chunk-CFZUESTS.js";
11
+ } from "./chunk-OFKKNHYJ.js";
12
+ import {
13
+ projectNameFor
14
+ } from "./chunk-DNJKQHK2.js";
12
15
  import {
13
16
  machineDecisionFor,
14
17
  wireVerdictFor
15
- } from "./chunk-L77OIGRB.js";
18
+ } from "./chunk-US4LUIFU.js";
16
19
 
17
20
  // src/machine-decision-audit.ts
18
- import { basename } from "path";
19
21
  var reportMachineDenial = async (input, verdict, agent) => {
20
22
  const decision = machineDecisionFor(wireVerdictFor(verdict, 0));
21
23
  if (!decision) return;
@@ -33,7 +35,7 @@ var reportMachineDenial = async (input, verdict, agent) => {
33
35
  occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
34
36
  toolUseId: input.tool_use_id,
35
37
  agentType: agent.type,
36
- agentName: `${agent.label} - ${basename(input.cwd ?? process.cwd())}`,
38
+ agentName: `${agent.label} - ${projectNameFor(input.cwd)}`,
37
39
  action: permissionDeniedAction(input.tool_name),
38
40
  sessionId: input.session_id,
39
41
  decisionSource: "policy_auto",
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  UNNAMED_ACTION
3
- } from "./chunk-CFZUESTS.js";
3
+ } from "./chunk-OFKKNHYJ.js";
4
4
  import {
5
5
  askUser,
6
6
  isAwayPaused,
7
7
  isLocalQuestionHandoff,
8
8
  unavailableQuestionUnlessRefused,
9
9
  waitForQuestion
10
- } from "./chunk-7E4OSMST.js";
10
+ } from "./chunk-YXLWKFKC.js";
11
11
  import {
12
12
  getMachineId
13
- } from "./chunk-IGKHWARK.js";
13
+ } from "./chunk-YFOR2JQQ.js";
14
14
  import {
15
15
  hookWaitClamped,
16
16
  hookWaitDeadline,
17
17
  scopeBreachReasonOf
18
- } from "./chunk-L77OIGRB.js";
18
+ } from "./chunk-US4LUIFU.js";
19
19
 
20
20
  // src/pushed-question.ts
21
21
  var scopeQuestionOf = (verdict) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-L77OIGRB.js";
3
+ } from "./chunk-US4LUIFU.js";
4
4
 
5
5
  // src/cli/terminal-row.ts
6
6
  var visibleLength = (text) => text.replace(/\x1b\[[0-9;]*m/g, "").length;
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-K5HACZJ3.js";
4
+ } from "./chunk-H3MY3EQP.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-FD7JHIET.js";
7
+ } from "./chunk-VH2DDTBE.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-CXKAP6DR.js";
10
+ } from "./chunk-R3EIRYON.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-7E4OSMST.js";
13
+ } from "./chunk-YXLWKFKC.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
17
17
  isGrokHookPayload,
18
18
  isGrokSessionEndStop
19
- } from "./chunk-L77OIGRB.js";
19
+ } from "./chunk-US4LUIFU.js";
20
20
 
21
21
  // src/tool-hook-input.ts
22
22
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
@@ -14,7 +14,7 @@ import {
14
14
  reachVerdict,
15
15
  reachesYou,
16
16
  verifyDelivery
17
- } from "./chunk-HXVCULWA.js";
17
+ } from "./chunk-HZGSGLK4.js";
18
18
  import {
19
19
  describeRevokeAttempt,
20
20
  keyNoLongerAccepted,
@@ -29,20 +29,20 @@ import {
29
29
  isCI,
30
30
  terminalColumns,
31
31
  useColor
32
- } from "./chunk-DXUPOVJP.js";
32
+ } from "./chunk-CPV25VW5.js";
33
33
  import {
34
34
  checkApiKey
35
- } from "./chunk-OHVQ75S7.js";
35
+ } from "./chunk-OBNVYNPQ.js";
36
36
  import {
37
37
  reportedInstallSource
38
- } from "./chunk-3I3RUJRD.js";
38
+ } from "./chunk-LH5JTAAH.js";
39
39
  import {
40
40
  NPX_LATEST_COMMAND
41
- } from "./chunk-IV7WDCKS.js";
41
+ } from "./chunk-S3X6WLW5.js";
42
42
  import {
43
43
  NO_PAIRING_COMPUTER,
44
44
  PAIR_TTL_SECONDS
45
- } from "./chunk-L77OIGRB.js";
45
+ } from "./chunk-US4LUIFU.js";
46
46
 
47
47
  // src/onboarding.ts
48
48
  import qrcodeTerminal from "qrcode-terminal";