@pushary/agent-hooks 1.9.135 → 1.9.137

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 (135) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{api-WEDLFKUE.js → api-5H25QRNM.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -28
  5. package/dist/bin/pushary-bell.js +10 -10
  6. package/dist/bin/pushary-claude.js +27 -27
  7. package/dist/bin/pushary-clean.js +41 -41
  8. package/dist/bin/pushary-codex-bridge.js +23 -23
  9. package/dist/bin/pushary-codex-hook.js +58 -42
  10. package/dist/bin/pushary-codex-session.js +8 -8
  11. package/dist/bin/pushary-codex.js +16 -16
  12. package/dist/bin/pushary-connect.js +29 -29
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +43 -43
  15. package/dist/bin/pushary-disconnect.js +28 -28
  16. package/dist/bin/pushary-display-hook.js +57 -31
  17. package/dist/bin/pushary-doctor.js +52 -48
  18. package/dist/bin/pushary-elicitation-hook.js +28 -28
  19. package/dist/bin/pushary-gemini-bridge.js +17 -17
  20. package/dist/bin/pushary-gemini-hook.js +32 -32
  21. package/dist/bin/pushary-hook.js +35 -34
  22. package/dist/bin/pushary-login.js +21 -21
  23. package/dist/bin/pushary-logout.js +27 -27
  24. package/dist/bin/pushary-mcp.js +12 -12
  25. package/dist/bin/pushary-mode.js +15 -15
  26. package/dist/bin/pushary-notification-hook.js +27 -27
  27. package/dist/bin/pushary-opencode-hook.js +31 -31
  28. package/dist/bin/pushary-permission-denied-hook.js +35 -34
  29. package/dist/bin/pushary-permission-hook.js +39 -36
  30. package/dist/bin/pushary-post-hook.js +33 -28
  31. package/dist/bin/pushary-prompt-hook.js +27 -27
  32. package/dist/bin/pushary-session-end-hook.js +27 -27
  33. package/dist/bin/pushary-session-start-hook.js +36 -36
  34. package/dist/bin/pushary-setup.js +57 -55
  35. package/dist/bin/pushary-stats.js +5 -5
  36. package/dist/bin/pushary-status.js +33 -33
  37. package/dist/bin/pushary-stop-hook.js +27 -27
  38. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  39. package/dist/bin/pushary-suggestions.js +15 -15
  40. package/dist/bin/pushary-transcript-register.js +17 -17
  41. package/dist/bin/pushary-transcripts.js +25 -25
  42. package/dist/bin/pushary-upgrade.js +41 -41
  43. package/dist/bin/pushary-wait.js +15 -15
  44. package/dist/bin/pushary.js +7 -7
  45. package/dist/{chunk-LIXCHEDJ.js → chunk-2E46RALI.js} +6 -6
  46. package/dist/{chunk-4YBDKFU2.js → chunk-2MVKT7KH.js} +2 -2
  47. package/dist/{chunk-7JXYR4TC.js → chunk-2R4OVJHS.js} +5 -5
  48. package/dist/{chunk-WPPTHRBO.js → chunk-2XDVEBHI.js} +5 -5
  49. package/dist/{chunk-5GQLZ46V.js → chunk-3HXOR6E5.js} +8 -8
  50. package/dist/{chunk-VND6LN6X.js → chunk-3QBI5C6P.js} +2 -2
  51. package/dist/{chunk-7ASHS5VR.js → chunk-43DT3QWZ.js} +18 -5
  52. package/dist/{chunk-AEOITMCS.js → chunk-4T72AHIA.js} +4 -4
  53. package/dist/{chunk-V7KBG7XH.js → chunk-54TZGPZP.js} +3 -3
  54. package/dist/{chunk-WVOMK2HW.js → chunk-5XDFQ6E3.js} +1 -1
  55. package/dist/{chunk-JDAX2HVS.js → chunk-62GD26OE.js} +2 -2
  56. package/dist/{chunk-VCMJLNEP.js → chunk-6SWFS4GU.js} +2 -2
  57. package/dist/{chunk-65ZWYA5L.js → chunk-6WT5OIRM.js} +10 -10
  58. package/dist/{chunk-MYMADZRU.js → chunk-7NCI2DGB.js} +2 -2
  59. package/dist/{chunk-UCGWTMQD.js → chunk-7VKW7OA5.js} +3 -3
  60. package/dist/{chunk-7GEMAKQL.js → chunk-7XD56GXA.js} +5 -5
  61. package/dist/{chunk-UXPRMNH2.js → chunk-A2YJ2FBR.js} +3 -2
  62. package/dist/{chunk-QUMPSMZN.js → chunk-A4YOXS24.js} +3 -3
  63. package/dist/{chunk-MGTMXF3T.js → chunk-A7R43KOX.js} +3 -3
  64. package/dist/chunk-B4UIRMOE.js +31 -0
  65. package/dist/{chunk-KUAS2DGZ.js → chunk-CMAB4KQG.js} +5 -5
  66. package/dist/{chunk-RGRPDJG3.js → chunk-D7AAAD6W.js} +163 -108
  67. package/dist/{chunk-6RSAOA2P.js → chunk-DBIPNY7J.js} +3 -3
  68. package/dist/{chunk-H4226UC7.js → chunk-DL67HX3D.js} +32 -9
  69. package/dist/{chunk-SULQKUPJ.js → chunk-EJHD44ZN.js} +2 -2
  70. package/dist/{chunk-OUMH4UTT.js → chunk-G73ACPR2.js} +2 -2
  71. package/dist/{chunk-ACI4PZ5N.js → chunk-GS5FH3C2.js} +3 -3
  72. package/dist/{chunk-64QLX4ZC.js → chunk-H2RE3IPK.js} +1 -1
  73. package/dist/{chunk-7DWERNHQ.js → chunk-HY4ATVCT.js} +3 -3
  74. package/dist/{chunk-UDSJKRRI.js → chunk-ICCM3DLT.js} +2 -2
  75. package/dist/{chunk-AXQFLLOB.js → chunk-IHAKBLW2.js} +4 -4
  76. package/dist/{chunk-FP6ZVMF2.js → chunk-IKBTG3OT.js} +1 -1
  77. package/dist/{chunk-DMK3U7GG.js → chunk-IRIXOH4U.js} +1 -1
  78. package/dist/{chunk-U5W3MKPU.js → chunk-JZJ5CM6X.js} +5 -5
  79. package/dist/{chunk-4VVDRMVE.js → chunk-K7YJBVR3.js} +1 -1
  80. package/dist/{chunk-GLAGHQPB.js → chunk-KLV2NQVT.js} +4 -4
  81. package/dist/{chunk-FSLV5FIE.js → chunk-KTVMIG32.js} +4 -4
  82. package/dist/{chunk-Q5GPXYDG.js → chunk-KYD3LHFB.js} +1 -1
  83. package/dist/{chunk-XRO6NRBO.js → chunk-L2GADKFL.js} +6 -6
  84. package/dist/{chunk-IOUCIJ56.js → chunk-LAWI6NQK.js} +1 -1
  85. package/dist/{chunk-IABPEGAA.js → chunk-LNF36PTF.js} +2 -2
  86. package/dist/{chunk-RCZ5ZER4.js → chunk-MD63J3T7.js} +235 -44
  87. package/dist/{chunk-E4RMOK4A.js → chunk-MENTZJHA.js} +1 -1
  88. package/dist/{chunk-TKOALSA5.js → chunk-MQ3I5OIC.js} +8 -8
  89. package/dist/{chunk-BGXXWLS5.js → chunk-MQMVJDII.js} +1 -1
  90. package/dist/{chunk-WTLQMJZ3.js → chunk-N3VCBXI6.js} +3 -3
  91. package/dist/{chunk-EWJXECUK.js → chunk-NN43KGTN.js} +4 -4
  92. package/dist/{chunk-WNPZGHHU.js → chunk-NZD6ISCL.js} +3 -3
  93. package/dist/{chunk-6UARD3WA.js → chunk-PHA6AFOR.js} +3 -3
  94. package/dist/{chunk-LTY5DSWT.js → chunk-PNVTPEO5.js} +3 -3
  95. package/dist/{chunk-G3YIGTFS.js → chunk-POV2TBFA.js} +11 -11
  96. package/dist/{chunk-SFN72Q7W.js → chunk-Q2VV77IY.js} +3 -3
  97. package/dist/{chunk-GRCX2FGD.js → chunk-QXATIKHQ.js} +1 -1
  98. package/dist/{chunk-3KPPXZCO.js → chunk-R6N6FREL.js} +42 -25
  99. package/dist/{chunk-6QZGKKQS.js → chunk-R7CQF2P3.js} +1 -1
  100. package/dist/{chunk-ZJKWDM3S.js → chunk-R7KC57PC.js} +2 -2
  101. package/dist/{chunk-VXYGYCNR.js → chunk-RRUP72V6.js} +1 -1
  102. package/dist/{chunk-ORZ7H3AQ.js → chunk-TLK5YLIE.js} +4 -4
  103. package/dist/{chunk-NBMK6T6R.js → chunk-U3OLXV5Z.js} +2 -2
  104. package/dist/chunk-UP5QXEUU.js +31 -0
  105. package/dist/{chunk-X3NYMHLG.js → chunk-V7ZY7P2X.js} +6 -6
  106. package/dist/{chunk-CGROOSWT.js → chunk-VBWJ756P.js} +5 -5
  107. package/dist/{chunk-OEIU6BNH.js → chunk-VO77WHK4.js} +6 -6
  108. package/dist/{chunk-NWNUS2ET.js → chunk-VV7WRIQT.js} +4 -4
  109. package/dist/{chunk-2K7MZRPH.js → chunk-VVN3RPV6.js} +1 -1
  110. package/dist/{chunk-35RCY4LB.js → chunk-WM7OY63L.js} +1 -1
  111. package/dist/{chunk-RLNJNRYP.js → chunk-WNT4JHK3.js} +1 -1
  112. package/dist/{chunk-ZNST34QH.js → chunk-WXUEOHYY.js} +5 -5
  113. package/dist/{chunk-J42EAEX3.js → chunk-XR27HPYC.js} +2 -1
  114. package/dist/{chunk-XB75IJ3G.js → chunk-Y47BMZUR.js} +1 -1
  115. package/dist/{chunk-4XTB74D3.js → chunk-YHX5YF77.js} +4 -4
  116. package/dist/{chunk-4PPSXQQ6.js → chunk-YOV3LHOL.js} +3 -3
  117. package/dist/{chunk-7KWOR2T2.js → chunk-YQQGIDBC.js} +1 -1
  118. package/dist/{chunk-QLIG4PMT.js → chunk-ZWIJJYN3.js} +4 -4
  119. package/dist/{chunk-UCDPJHZT.js → chunk-ZWLSXECG.js} +2 -2
  120. package/dist/{chunk-UQCVVN7K.js → chunk-ZWURBNA3.js} +1 -1
  121. package/dist/{codex-app-cards-switch-C6DXLVAM.js → codex-app-cards-switch-JU236CG2.js} +11 -11
  122. package/dist/{codex-card-routing-ZMMS4RIR.js → codex-card-routing-LQJEJNTS.js} +2 -2
  123. package/dist/{codex-desktop-launch-DIUFMA45.js → codex-desktop-launch-LRQ4LU64.js} +1 -1
  124. package/dist/{codex-session-launch-S4WTGKRY.js → codex-session-launch-DTGH7ZKM.js} +20 -20
  125. package/dist/{config-BV5FQ536.js → config-34VUNHK6.js} +3 -3
  126. package/dist/{global-upgrade-JZWB67EU.js → global-upgrade-5UAH5DCG.js} +9 -9
  127. package/dist/{identity-G6FQTONT.js → identity-UFJEWGEU.js} +4 -4
  128. package/dist/{live-capabilities-YHMOXY5E.js → live-capabilities-BL3SHFWX.js} +4 -4
  129. package/dist/{paths-XTEJ5LI2.js → paths-YA5ROXGC.js} +3 -3
  130. package/dist/{reapply-MVZKPXIQ.js → reapply-OPQF4DPQ.js} +29 -29
  131. package/dist/src/index.js +34 -33
  132. package/dist/{upgrade-lock-YPAQEEJA.js → upgrade-lock-AZLOOGKV.js} +4 -4
  133. package/dist/{usage-R6PZTIEH.js → usage-ZSV4LFDL.js} +3 -3
  134. package/package.json +1 -1
  135. package/dist/chunk-N2DYYXQI.js +0 -75
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-ZJKWDM3S.js";
3
+ } from "./chunk-R7KC57PC.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-TODDEIYG.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-H4226UC7.js";
9
+ } from "./chunk-DL67HX3D.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-64QLX4ZC.js";
4
+ } from "./chunk-H2RE3IPK.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  isQuestionLimitRefusal,
9
9
  waitForQuestion
10
- } from "./chunk-XRO6NRBO.js";
10
+ } from "./chunk-L2GADKFL.js";
11
11
  import {
12
12
  SubscriptionRequiredError
13
- } from "./chunk-ZNST34QH.js";
13
+ } from "./chunk-WXUEOHYY.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-RLNJNRYP.js";
16
+ } from "./chunk-WNT4JHK3.js";
17
17
  import {
18
18
  ASK_CONTEXT_MAX,
19
19
  agentQuestionContext,
@@ -23,7 +23,7 @@ import {
23
23
  plainAskOf,
24
24
  questionsShownAsASet,
25
25
  shouldDeferToNativeMode
26
- } from "./chunk-H4226UC7.js";
26
+ } from "./chunk-DL67HX3D.js";
27
27
 
28
28
  // src/native-defer.ts
29
29
  var nativeDeferOptions = () => {
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-V7KBG7XH.js";
7
+ } from "./chunk-54TZGPZP.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-WNPZGHHU.js";
10
+ } from "./chunk-NZD6ISCL.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-LTY5DSWT.js";
13
+ } from "./chunk-PNVTPEO5.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,10 +32,10 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-ZJKWDM3S.js";
35
+ } from "./chunk-R7KC57PC.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-ACI4PZ5N.js";
38
+ } from "./chunk-GS5FH3C2.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -4,37 +4,37 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-35RCY4LB.js";
7
+ } from "./chunk-WM7OY63L.js";
8
8
  import {
9
9
  CommandReceipts,
10
10
  controllerCommandSchema
11
- } from "./chunk-6QZGKKQS.js";
11
+ } from "./chunk-R7CQF2P3.js";
12
12
  import {
13
13
  SESSION_IDLE_TIMEOUT_MS,
14
14
  describeIdleWindow,
15
15
  idleDeadlinePassed,
16
16
  startProcessOwnership
17
- } from "./chunk-4YBDKFU2.js";
17
+ } from "./chunk-2MVKT7KH.js";
18
18
  import {
19
19
  spawnClaude
20
20
  } from "./chunk-H6CL3T2S.js";
21
21
  import {
22
22
  repositoryScopeFor
23
- } from "./chunk-DMK3U7GG.js";
23
+ } from "./chunk-IRIXOH4U.js";
24
24
  import {
25
25
  isAskUserResponse,
26
26
  isDecisionStopped,
27
27
  isWaitForAnswerResponse,
28
28
  withdrawQuestion,
29
29
  writeDegraded
30
- } from "./chunk-XRO6NRBO.js";
30
+ } from "./chunk-L2GADKFL.js";
31
31
  import {
32
32
  readCommandAck
33
- } from "./chunk-XB75IJ3G.js";
33
+ } from "./chunk-Y47BMZUR.js";
34
34
  import {
35
35
  callMcpTool,
36
36
  isRetryable
37
- } from "./chunk-ZNST34QH.js";
37
+ } from "./chunk-WXUEOHYY.js";
38
38
  import {
39
39
  AGENT_QUESTION_DESCRIPTION_MAX,
40
40
  AGENT_QUESTION_HEADER_MAX,
@@ -55,7 +55,7 @@ import {
55
55
  parseCodexQuestions,
56
56
  planElicitationAsk,
57
57
  readElicitationFields
58
- } from "./chunk-H4226UC7.js";
58
+ } from "./chunk-DL67HX3D.js";
59
59
 
60
60
  // src/codex-question-owner.ts
61
61
  import { createHash } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  absoluteUrl
3
- } from "./chunk-SFN72Q7W.js";
3
+ } from "./chunk-Q2VV77IY.js";
4
4
  import {
5
5
  KEY_SCOPE
6
- } from "./chunk-H4226UC7.js";
6
+ } from "./chunk-DL67HX3D.js";
7
7
 
8
8
  // src/cli/approval-settings-pages.ts
9
9
  var API_KEYS_PATH = "/dashboard/agent/settings";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  addGeminiMcpServer,
3
3
  removeGeminiMcpServer
4
- } from "./chunk-ORZ7H3AQ.js";
4
+ } from "./chunk-TLK5YLIE.js";
5
5
  import {
6
6
  CLAUDE_CODE_AGENT
7
- } from "./chunk-RGRPDJG3.js";
7
+ } from "./chunk-D7AAAD6W.js";
8
8
  import {
9
9
  compatibleToolLookup
10
- } from "./chunk-UXPRMNH2.js";
10
+ } from "./chunk-A2YJ2FBR.js";
11
11
  import {
12
12
  CLAUDE_HOOK_EVENTS,
13
13
  PUSHARY_MCP_URL,
@@ -19,7 +19,7 @@ import {
19
19
  isPusharyHook,
20
20
  registerHookEntry,
21
21
  removeClaudeMcpServers
22
- } from "./chunk-ZJKWDM3S.js";
22
+ } from "./chunk-R7KC57PC.js";
23
23
  import {
24
24
  HOOK_COMPATIBLE_PROFILES,
25
25
  PHONE_ANSWERED_TOOLS,
@@ -30,7 +30,7 @@ import {
30
30
  pusharyMissingReason,
31
31
  refusalOutput,
32
32
  withHookHoldBudget
33
- } from "./chunk-H4226UC7.js";
33
+ } from "./chunk-DL67HX3D.js";
34
34
 
35
35
  // src/config-document.ts
36
36
  import { parse, stringify } from "smol-toml";
@@ -251,6 +251,18 @@ function normalizeToolCall(profile, input) {
251
251
  const lookup = compatibleToolLookup(profile, input.tool_name, input.tool_input ?? {}, input.cwd);
252
252
  return { ...input, tool_name: lookup.tool, tool_input: lookup.input };
253
253
  }
254
+ var SHELL_ESCAPED_PATH_KEYS = ["file_path", "path", "filePath", "notebook_path"];
255
+ var ESCAPED_SHELL_SPECIAL = /\\([ \t()[\]{};|*?$`'"#&<>!~,])/g;
256
+ var pathAsPreToolUseSeesIt = (path, platform) => platform === "win32" ? path.trim() : path.trim().replace(ESCAPED_SHELL_SPECIAL, "$1");
257
+ var permissionRequestAsPreToolUseSeesIt = (profile, input, platform) => {
258
+ if (profile?.permissionRequestPaths !== "shell_escaped" || !input.tool_input) return input;
259
+ const toolInput = { ...input.tool_input };
260
+ for (const key of SHELL_ESCAPED_PATH_KEYS) {
261
+ const value = toolInput[key];
262
+ if (typeof value === "string") toolInput[key] = pathAsPreToolUseSeesIt(value, platform);
263
+ }
264
+ return { ...input, tool_input: toolInput };
265
+ };
254
266
  var grokHome = (home = homedir(), environment = process.env) => environment.GROK_HOME?.trim() || join(home, ".grok");
255
267
  var compatibleFilePath = (file, home = homedir()) => join(file.root === "grok_home" ? grokHome(home) : home, ...file.path);
256
268
  var compatibleDocuments = (profile, home) => {
@@ -463,6 +475,7 @@ export {
463
475
  namedSource,
464
476
  activeHookSource,
465
477
  normalizeToolCall,
478
+ permissionRequestAsPreToolUseSeesIt,
466
479
  grokHome,
467
480
  compatibleFilePath,
468
481
  compatibleDocuments,
@@ -12,7 +12,7 @@ import {
12
12
  reachVerdict,
13
13
  reachesYou,
14
14
  verifyDelivery
15
- } from "./chunk-X3NYMHLG.js";
15
+ } from "./chunk-V7ZY7P2X.js";
16
16
  import {
17
17
  humanIsTty,
18
18
  writeHuman
@@ -24,14 +24,14 @@ import {
24
24
  } from "./chunk-FO3MDD26.js";
25
25
  import {
26
26
  reportedInstallSource
27
- } from "./chunk-IABPEGAA.js";
27
+ } from "./chunk-LNF36PTF.js";
28
28
  import {
29
29
  NPX_LATEST_COMMAND
30
- } from "./chunk-BGXXWLS5.js";
30
+ } from "./chunk-MQMVJDII.js";
31
31
  import {
32
32
  NO_PAIRING_COMPUTER,
33
33
  PAIR_TTL_SECONDS
34
- } from "./chunk-H4226UC7.js";
34
+ } from "./chunk-DL67HX3D.js";
35
35
 
36
36
  // src/onboarding.ts
37
37
  import qrcodeTerminal from "qrcode-terminal";
@@ -2,16 +2,16 @@ import {
2
2
  NpmInstallError,
3
3
  NpmMissingError,
4
4
  NpmPermissionError
5
- } from "./chunk-ACI4PZ5N.js";
5
+ } from "./chunk-GS5FH3C2.js";
6
6
  import {
7
7
  writeFileAtomic
8
8
  } from "./chunk-TODDEIYG.js";
9
9
  import {
10
10
  NPX_LATEST_COMMAND
11
- } from "./chunk-BGXXWLS5.js";
11
+ } from "./chunk-MQMVJDII.js";
12
12
  import {
13
13
  readSetupAgentFailures
14
- } from "./chunk-H4226UC7.js";
14
+ } from "./chunk-DL67HX3D.js";
15
15
 
16
16
  // src/setup/config-write.ts
17
17
  var AgentConfigWriteError = class extends Error {
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-H4226UC7.js";
12
+ } from "./chunk-DL67HX3D.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-ZJKWDM3S.js";
3
+ } from "./chunk-R7KC57PC.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
7
  npmExitedOnPermissionDenied
8
- } from "./chunk-ACI4PZ5N.js";
8
+ } from "./chunk-GS5FH3C2.js";
9
9
  import {
10
10
  writeJsonAtomic
11
11
  } from "./chunk-TODDEIYG.js";
@@ -7,10 +7,10 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-ZJKWDM3S.js";
10
+ } from "./chunk-R7KC57PC.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-ACI4PZ5N.js";
13
+ } from "./chunk-GS5FH3C2.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-WIIMW5YO.js";
@@ -8,13 +8,13 @@ import {
8
8
  } from "./chunk-G66WIAST.js";
9
9
  import {
10
10
  ensureDaemonRunning
11
- } from "./chunk-RCZ5ZER4.js";
11
+ } from "./chunk-MD63J3T7.js";
12
12
  import {
13
13
  hookOwnerOf
14
- } from "./chunk-ORZ7H3AQ.js";
14
+ } from "./chunk-TLK5YLIE.js";
15
15
  import {
16
16
  hookMeaning
17
- } from "./chunk-UXPRMNH2.js";
17
+ } from "./chunk-A2YJ2FBR.js";
18
18
  import {
19
19
  buildTranscriptRecords,
20
20
  decodePublicKey,
@@ -25,29 +25,29 @@ import {
25
25
  recordSealerFor,
26
26
  uploadTranscriptRecords,
27
27
  wrapSessionKey
28
- } from "./chunk-4PPSXQQ6.js";
28
+ } from "./chunk-YOV3LHOL.js";
29
29
  import {
30
30
  external_exports
31
31
  } from "./chunk-XMSDA5WA.js";
32
32
  import {
33
33
  transcriptEnvironmentPreference,
34
34
  transcriptsEnabled
35
- } from "./chunk-UQCVVN7K.js";
35
+ } from "./chunk-ZWURBNA3.js";
36
36
  import {
37
37
  fetchAsCredential
38
- } from "./chunk-2K7MZRPH.js";
38
+ } from "./chunk-VVN3RPV6.js";
39
39
  import {
40
40
  readTranscriptPreference
41
- } from "./chunk-LTY5DSWT.js";
41
+ } from "./chunk-PNVTPEO5.js";
42
42
  import {
43
43
  claudeConfigDir,
44
44
  codexHome,
45
45
  pusharyDir
46
- } from "./chunk-ZJKWDM3S.js";
46
+ } from "./chunk-R7KC57PC.js";
47
47
  import {
48
48
  getApiKey,
49
49
  getBaseUrl
50
- } from "./chunk-FP6ZVMF2.js";
50
+ } from "./chunk-IKBTG3OT.js";
51
51
  import {
52
52
  writeJsonAtomic,
53
53
  writeJsonAtomicDurable
@@ -59,7 +59,7 @@ import {
59
59
  isHookSource,
60
60
  isRecord,
61
61
  redactSecretsFromContent
62
- } from "./chunk-H4226UC7.js";
62
+ } from "./chunk-DL67HX3D.js";
63
63
 
64
64
  // src/transcript-recipient-pin.ts
65
65
  import { createHash } from "crypto";
@@ -9,13 +9,13 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-UCGWTMQD.js";
12
+ } from "./chunk-7VKW7OA5.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
16
16
  import {
17
17
  xml
18
- } from "./chunk-RCZ5ZER4.js";
18
+ } from "./chunk-MD63J3T7.js";
19
19
  import {
20
20
  writeFileAtomic
21
21
  } from "./chunk-TODDEIYG.js";
@@ -531,8 +531,8 @@ var loadedOnce = (load) => {
531
531
  };
532
532
 
533
533
  // src/codex-desktop-proxy.ts
534
- var loadThePhone = () => import("./api-WEDLFKUE.js");
535
- var loadTheCardRouting = () => import("./codex-card-routing-ZMMS4RIR.js");
534
+ var loadThePhone = () => import("./api-5H25QRNM.js");
535
+ var loadTheCardRouting = () => import("./codex-card-routing-LQJEJNTS.js");
536
536
  var theFirstCardLoadsAgain = () => {
537
537
  };
538
538
  var ASKS_WITHOUT_ROUTING = {};
@@ -1085,7 +1085,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1085
1085
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1086
1086
  }
1087
1087
  if (args[0] === APP_CARDS_FLAG) {
1088
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-C6DXLVAM.js");
1088
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-JU236CG2.js");
1089
1089
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1090
1090
  }
1091
1091
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-EWJXECUK.js";
4
+ } from "./chunk-NN43KGTN.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-65ZWYA5L.js";
7
+ } from "./chunk-6WT5OIRM.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-7ASHS5VR.js";
10
+ } from "./chunk-43DT3QWZ.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-XRO6NRBO.js";
13
+ } from "./chunk-L2GADKFL.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
17
17
  isGrokHookPayload,
18
18
  isGrokSessionEndStop
19
- } from "./chunk-H4226UC7.js";
19
+ } from "./chunk-DL67HX3D.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"];
@@ -17,6 +17,7 @@ import {
17
17
  hookCompatibleProfileBySource,
18
18
  isClaudeWakePrompt,
19
19
  isTokenCount,
20
+ namesAFilePath,
20
21
  parseCommitId,
21
22
  parseMcpToolName,
22
23
  redactSecrets,
@@ -24,7 +25,7 @@ import {
24
25
  reportableSessionId,
25
26
  toToolLookup,
26
27
  truncateLine
27
- } from "./chunk-H4226UC7.js";
28
+ } from "./chunk-DL67HX3D.js";
28
29
 
29
30
  // ../hook-mapping/src/commit-receipt.ts
30
31
  var COMMIT_OUTPUT_MAX_LENGTH = 65536;
@@ -225,7 +226,7 @@ var patchedFilesIn = (input) => [...new Set(PATCH_ARG_KEYS.flatMap((key) => pars
225
226
  var lookupsForInput = (profile, toolName, input, absolute) => {
226
227
  const gateInput = profile.source === "grok" && toolName === "apply_patch" ? { patch: input.patch, diff: input.patch } : input;
227
228
  const lookup = toToolLookup(profile, toolName, gateInput, absolute);
228
- if (!lookup.unreadable) return [lookup];
229
+ if (!lookup.unreadable || namesAFilePath(profile, gateInput)) return [lookup];
229
230
  const files = patchedFilesIn(gateInput);
230
231
  if (files.length === 0) return [lookup];
231
232
  return files.slice(0, GATE_MAX_TOOL_INPUTS + 1).map((file) => toToolLookup(profile, toolName, { ...gateInput, file_path: absolute(file) }, absolute));
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-VCMJLNEP.js";
3
+ } from "./chunk-6SWFS4GU.js";
4
4
  import {
5
5
  retryAgentCommand
6
- } from "./chunk-V7KBG7XH.js";
6
+ } from "./chunk-54TZGPZP.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-BGXXWLS5.js";
9
+ } from "./chunk-MQMVJDII.js";
10
10
 
11
11
  // src/setup/codex-trust.ts
12
12
  var CODEX_TRUST_TELEMETRY = {
@@ -5,10 +5,10 @@ import {
5
5
  hermesAppWiringRecord,
6
6
  hermesConfigReceipt,
7
7
  hermesSetupReceipt
8
- } from "./chunk-ZJKWDM3S.js";
8
+ } from "./chunk-R7KC57PC.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-ACI4PZ5N.js";
11
+ } from "./chunk-GS5FH3C2.js";
12
12
  import {
13
13
  readJsonSafe,
14
14
  writeJsonAtomic
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-WIIMW5YO.js";
20
20
  import {
21
21
  isRecord
22
- } from "./chunk-H4226UC7.js";
22
+ } from "./chunk-DL67HX3D.js";
23
23
 
24
24
  // src/hermes/plugin-payload.ts
25
25
  import { createHash } from "crypto";
@@ -0,0 +1,31 @@
1
+ import {
2
+ configFilePath
3
+ } from "./chunk-IKBTG3OT.js";
4
+ import {
5
+ readJsonSafe,
6
+ writeJsonAtomic
7
+ } from "./chunk-TODDEIYG.js";
8
+ import {
9
+ readSetupOutcomeProperties
10
+ } from "./chunk-DL67HX3D.js";
11
+
12
+ // src/setup/failure-record.ts
13
+ import { dirname, join } from "path";
14
+ var failurePath = () => join(dirname(configFilePath()), "last-setup-failure.json");
15
+ var saveSetupFailure = (body, path = failurePath()) => {
16
+ const properties = readSetupOutcomeProperties(body);
17
+ if (properties.exitCode === null || properties.exitCode === 0) return;
18
+ writeJsonAtomic(path, { ...properties, recordedAt: (/* @__PURE__ */ new Date()).toISOString() }, 384);
19
+ };
20
+ var readSetupFailure = (path = failurePath()) => {
21
+ const result = readJsonSafe(path);
22
+ if (result.kind !== "ok" || typeof result.value !== "object" || result.value === null || Array.isArray(result.value)) return null;
23
+ const body = result.value;
24
+ if (!("recordedAt" in body) || typeof body.recordedAt !== "string" || body.recordedAt.length > 30 || !Number.isFinite(Date.parse(body.recordedAt))) return null;
25
+ return { ...readSetupOutcomeProperties({ ...body }), recordedAt: body.recordedAt };
26
+ };
27
+
28
+ export {
29
+ saveSetupFailure,
30
+ readSetupFailure
31
+ };
@@ -3,24 +3,24 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-6RSAOA2P.js";
6
+ } from "./chunk-DBIPNY7J.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-RCZ5ZER4.js";
13
+ } from "./chunk-MD63J3T7.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-RLNJNRYP.js";
16
+ } from "./chunk-WNT4JHK3.js";
17
17
  import {
18
18
  readControlMode,
19
19
  readKeySource
20
- } from "./chunk-LTY5DSWT.js";
20
+ } from "./chunk-PNVTPEO5.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-FP6ZVMF2.js";
23
+ } from "./chunk-IKBTG3OT.js";
24
24
  import {
25
25
  getPackageVersion
26
26
  } from "./chunk-WIIMW5YO.js";