pushary 1.9.108 → 1.9.110

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 (128) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{api-RL5CPDTH.js → api-4MS4CPKY.js} +11 -10
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +27 -26
  5. package/dist/bin/pushary-bell.js +10 -10
  6. package/dist/bin/pushary-claude.js +25 -24
  7. package/dist/bin/pushary-clean.js +34 -33
  8. package/dist/bin/pushary-codex-bridge.js +21 -20
  9. package/dist/bin/pushary-codex-hook.js +32 -31
  10. package/dist/bin/pushary-codex-session.js +8 -8
  11. package/dist/bin/pushary-codex.js +15 -14
  12. package/dist/bin/pushary-connect.js +28 -27
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +41 -40
  15. package/dist/bin/pushary-disconnect.js +27 -26
  16. package/dist/bin/pushary-display-hook.js +17 -16
  17. package/dist/bin/pushary-doctor.js +42 -41
  18. package/dist/bin/pushary-elicitation-hook.js +27 -26
  19. package/dist/bin/pushary-gemini-bridge.js +15 -14
  20. package/dist/bin/pushary-gemini-hook.js +29 -28
  21. package/dist/bin/pushary-hook.js +32 -31
  22. package/dist/bin/pushary-login.js +21 -20
  23. package/dist/bin/pushary-logout.js +26 -25
  24. package/dist/bin/pushary-mcp.js +12 -11
  25. package/dist/bin/pushary-mode.js +15 -15
  26. package/dist/bin/pushary-notification-hook.js +26 -25
  27. package/dist/bin/pushary-opencode-hook.js +28 -27
  28. package/dist/bin/pushary-permission-denied-hook.js +32 -31
  29. package/dist/bin/pushary-permission-hook.js +32 -31
  30. package/dist/bin/pushary-post-hook.js +26 -25
  31. package/dist/bin/pushary-prompt-hook.js +26 -25
  32. package/dist/bin/pushary-session-end-hook.js +26 -25
  33. package/dist/bin/pushary-session-start-hook.js +35 -34
  34. package/dist/bin/pushary-setup.js +46 -45
  35. package/dist/bin/pushary-stats.js +5 -5
  36. package/dist/bin/pushary-status.js +32 -31
  37. package/dist/bin/pushary-stop-hook.js +26 -25
  38. package/dist/bin/pushary-stopfailure-hook.js +26 -25
  39. package/dist/bin/pushary-suggestions.js +15 -15
  40. package/dist/bin/pushary-transcript-register.js +17 -16
  41. package/dist/bin/pushary-transcripts.js +25 -24
  42. package/dist/bin/pushary-upgrade.js +40 -39
  43. package/dist/bin/pushary-wait.js +15 -15
  44. package/dist/bin/pushary.js +7 -7
  45. package/dist/{chunk-UUJQK7DJ.js → chunk-2MJL3ZVW.js} +1 -1
  46. package/dist/{chunk-ZB2WNJXZ.js → chunk-2Q4V4ZP4.js} +4 -4
  47. package/dist/{chunk-NM44KCO6.js → chunk-2U54YY4M.js} +3 -3
  48. package/dist/{chunk-J2HIFUAT.js → chunk-3FQTC27T.js} +7 -7
  49. package/dist/{chunk-HONSMBF2.js → chunk-3OLVEVGW.js} +6 -6
  50. package/dist/{chunk-GUIS6ASL.js → chunk-3QZSG2L4.js} +1 -1
  51. package/dist/{chunk-P3H6I656.js → chunk-4LRFQMTQ.js} +10 -10
  52. package/dist/{chunk-2HC5ISDW.js → chunk-5IRJERK2.js} +2 -2
  53. package/dist/{chunk-KHZCJP7P.js → chunk-5RWBSMCI.js} +17 -14
  54. package/dist/{chunk-S75UO75C.js → chunk-6ZPGNVXS.js} +29 -6
  55. package/dist/{chunk-LMDXQIYT.js → chunk-ALA2OMOM.js} +1 -1
  56. package/dist/{chunk-2BILLNZ4.js → chunk-AXOY7CKN.js} +14 -14
  57. package/dist/{chunk-X3QG5RT5.js → chunk-AZBKSMYC.js} +1 -1
  58. package/dist/{chunk-76JOLPST.js → chunk-BCZSRQ3L.js} +1 -1
  59. package/dist/{chunk-5IAW6G3K.js → chunk-CTBH3E3Z.js} +2 -2
  60. package/dist/{chunk-A37RKFI3.js → chunk-CUOFHW7F.js} +4 -4
  61. package/dist/{chunk-YDQ6OJMF.js → chunk-DLS43QDO.js} +1 -1
  62. package/dist/{chunk-Z5FV7LTD.js → chunk-DOHQKE4Y.js} +2 -2
  63. package/dist/{chunk-IAASPG5B.js → chunk-DP62DH2Q.js} +11 -8
  64. package/dist/{chunk-ZCBTCW3T.js → chunk-DQKTKMR3.js} +3 -3
  65. package/dist/{chunk-UXIUCMFO.js → chunk-DSA5E7IB.js} +5 -5
  66. package/dist/chunk-DZMKNP3I.js +81 -0
  67. package/dist/{chunk-B5Q44HKN.js → chunk-E4ZZMAWF.js} +1 -1
  68. package/dist/{chunk-XN527J4W.js → chunk-FBDUY6RN.js} +1 -1
  69. package/dist/{chunk-4XE3DVF7.js → chunk-FE4CSARF.js} +6 -3
  70. package/dist/{chunk-LK3WA6MK.js → chunk-FLH5MJOS.js} +3 -3
  71. package/dist/{chunk-GBHP3LML.js → chunk-FRY3LB5N.js} +2 -2
  72. package/dist/{chunk-JCSJEMTA.js → chunk-FYSQQW6Q.js} +2 -2
  73. package/dist/{chunk-I3IUS4SR.js → chunk-G2TL4OEY.js} +1 -1
  74. package/dist/{chunk-EMSRB2KH.js → chunk-GOUUFBBP.js} +3 -3
  75. package/dist/{chunk-DIVVLBZZ.js → chunk-HENHPRJN.js} +6 -6
  76. package/dist/{chunk-7X55ZQS3.js → chunk-I2LPRMDP.js} +4 -4
  77. package/dist/{chunk-43PNDDB3.js → chunk-JDIWIRUN.js} +6 -6
  78. package/dist/{chunk-VKTW5WVB.js → chunk-JMQORTFD.js} +2 -2
  79. package/dist/{chunk-GESW4OSZ.js → chunk-JPR4S254.js} +3 -3
  80. package/dist/{chunk-VK4PPVWB.js → chunk-KAG2BWDB.js} +6 -6
  81. package/dist/{chunk-G5HGV6D4.js → chunk-KS3OJ4C2.js} +2 -2
  82. package/dist/{chunk-DS672F57.js → chunk-LJH2QDF3.js} +13 -10
  83. package/dist/{chunk-IHQRLJEP.js → chunk-M6EYOBLJ.js} +5 -5
  84. package/dist/{chunk-TXMYET7E.js → chunk-MOBSQM4B.js} +3 -3
  85. package/dist/{chunk-DH22FQAS.js → chunk-MZDFTXXO.js} +1 -1
  86. package/dist/{chunk-DA57ZI62.js → chunk-NBNWMQH4.js} +7 -3
  87. package/dist/{chunk-CKWV3T7O.js → chunk-NGZB5BVO.js} +6 -6
  88. package/dist/{chunk-O5TB2LMQ.js → chunk-NMSRA7QO.js} +18 -3
  89. package/dist/{chunk-S2TTGX6F.js → chunk-NQAY6G3S.js} +4 -4
  90. package/dist/{chunk-PFZCLG55.js → chunk-OJZ3CVGK.js} +9 -6
  91. package/dist/{chunk-OINGJICB.js → chunk-OKZR3LFO.js} +4 -4
  92. package/dist/{chunk-VCWLGM77.js → chunk-PKN4XIBP.js} +2 -2
  93. package/dist/{chunk-GKCDMAUM.js → chunk-QYBQCMRP.js} +1 -1
  94. package/dist/{chunk-772NHSQB.js → chunk-S2FLLNQI.js} +2 -2
  95. package/dist/{chunk-HH5NNPB5.js → chunk-S7ZX7V5S.js} +1 -1
  96. package/dist/{chunk-RKQVMFHN.js → chunk-SQR7GGOH.js} +5 -5
  97. package/dist/{chunk-MFJHLVIZ.js → chunk-T72BV3CU.js} +4 -4
  98. package/dist/{chunk-ATVZAEM5.js → chunk-TBJ4OMO4.js} +5 -5
  99. package/dist/{chunk-IGO5NDQY.js → chunk-TJUDVI2Y.js} +2 -2
  100. package/dist/{chunk-LIPMEFRA.js → chunk-TKXM3QYK.js} +2 -2
  101. package/dist/{chunk-HLYZEZOI.js → chunk-TR6AJV4Z.js} +2 -2
  102. package/dist/{chunk-FJYUB3ZK.js → chunk-TTDJHOYY.js} +3 -3
  103. package/dist/{chunk-J5PUKKCT.js → chunk-UNHXJLHP.js} +5 -5
  104. package/dist/{chunk-CJTJ55DR.js → chunk-UWQKGWBF.js} +1 -1
  105. package/dist/{chunk-6DKMZBRK.js → chunk-WEWTT7FE.js} +1 -1
  106. package/dist/{chunk-ASCQXNCL.js → chunk-WGQIJJIS.js} +1 -1
  107. package/dist/{chunk-JLJJRBTD.js → chunk-WKBXLLDY.js} +5 -5
  108. package/dist/{chunk-4EMPELDR.js → chunk-WKXSLMKC.js} +4 -4
  109. package/dist/{chunk-FUTFQSRA.js → chunk-X3ROGIHG.js} +1 -1
  110. package/dist/{chunk-B7O4CXFX.js → chunk-XF3K42EV.js} +3 -3
  111. package/dist/{chunk-LL7SW4RL.js → chunk-XNMSVXB4.js} +3 -3
  112. package/dist/{chunk-FE5JENEJ.js → chunk-YLLQZ6MR.js} +2 -2
  113. package/dist/{chunk-OBZQPBUI.js → chunk-ZCFPKN72.js} +4 -4
  114. package/dist/{codex-app-cards-switch-FD2ZWLYL.js → codex-app-cards-switch-MPIXI3DK.js} +11 -11
  115. package/dist/codex-card-routing-YQIWKPSG.js +20 -0
  116. package/dist/{codex-desktop-launch-BN5OABPN.js → codex-desktop-launch-GTKUXNPD.js} +1 -1
  117. package/dist/{codex-session-launch-O3PHQWTS.js → codex-session-launch-AHYAAGRT.js} +18 -17
  118. package/dist/{config-KWP7UXYG.js → config-XMZVS6DQ.js} +3 -3
  119. package/dist/{global-upgrade-NBSY5436.js → global-upgrade-CBBBQIWS.js} +9 -9
  120. package/dist/{identity-RP5I7KTV.js → identity-OQXQU2WN.js} +4 -4
  121. package/dist/{live-capabilities-XC6C47ZH.js → live-capabilities-3UHWJHLY.js} +4 -4
  122. package/dist/{paths-OE5APZ4Q.js → paths-GMKZGF5F.js} +3 -3
  123. package/dist/{reapply-DRZ32BIB.js → reapply-C3WFUQZA.js} +28 -27
  124. package/dist/src/index.d.ts +2 -0
  125. package/dist/src/index.js +31 -30
  126. package/dist/{upgrade-lock-LWTVHYAJ.js → upgrade-lock-J6MD575X.js} +4 -4
  127. package/dist/{usage-5YESCANM.js → usage-KYQUBGEW.js} +3 -3
  128. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-VKTW5WVB.js";
3
+ } from "./chunk-JMQORTFD.js";
4
4
  import {
5
5
  retryAgentCommand
6
- } from "./chunk-FJYUB3ZK.js";
6
+ } from "./chunk-TTDJHOYY.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-YDQ6OJMF.js";
9
+ } from "./chunk-DLS43QDO.js";
10
10
 
11
11
  // src/setup/codex-trust.ts
12
12
  var CODEX_TRUST_TELEMETRY = {
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-O5TB2LMQ.js";
12
+ } from "./chunk-NMSRA7QO.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-PFZCLG55.js";
3
+ } from "./chunk-OJZ3CVGK.js";
4
+ import {
5
+ fetchAsCredential
6
+ } from "./chunk-DZMKNP3I.js";
4
7
  import {
5
8
  NPX_LATEST_COMMAND
6
- } from "./chunk-YDQ6OJMF.js";
9
+ } from "./chunk-DLS43QDO.js";
7
10
 
8
11
  // src/mcp-stdio-bridge.ts
9
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -98,12 +101,13 @@ var createMcpStdioBridge = (deps) => {
98
101
  if (!answered.has(request.id)) await deps.emit(bridgeError(request.id, message));
99
102
  }
100
103
  };
101
- const post = async (line, apiKey) => deps.fetchImpl(deps.endpoint, {
104
+ const requestFor = (line, apiKey) => ({
102
105
  method: "POST",
103
106
  headers: headersFor(apiKey),
104
107
  body: line,
105
108
  signal: AbortSignal.timeout(deps.timeoutMs ?? MCP_BRIDGE_REQUEST_TIMEOUT_MS)
106
109
  });
110
+ const post = async (line, apiKey) => apiKey === null ? deps.fetchImpl(deps.endpoint, requestFor(line, apiKey)) : fetchAsCredential(apiKey, deps.endpoint, requestFor(line, apiKey), deps.fetchImpl);
107
111
  const forward = async (line) => {
108
112
  const parsed = parseBridgeLine(line);
109
113
  if (!parsed.ok) {
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-VCWLGM77.js";
6
+ } from "./chunk-PKN4XIBP.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-GESW4OSZ.js";
9
+ } from "./chunk-JPR4S254.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,25 +18,25 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-5IAW6G3K.js";
21
+ } from "./chunk-CTBH3E3Z.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-JCSJEMTA.js";
26
+ } from "./chunk-FYSQQW6Q.js";
27
27
  import {
28
28
  execNpm,
29
29
  fetchLatestPublishedVersion,
30
30
  npmErrorMessage,
31
31
  readGlobalCliInstallAt,
32
32
  readGlobalPrefix
33
- } from "./chunk-ZCBTCW3T.js";
33
+ } from "./chunk-DQKTKMR3.js";
34
34
  import {
35
35
  EXIT
36
36
  } from "./chunk-BG4HHB7E.js";
37
37
  import {
38
38
  NPX_LATEST_COMMAND
39
- } from "./chunk-YDQ6OJMF.js";
39
+ } from "./chunk-DLS43QDO.js";
40
40
  import {
41
41
  commandsPackage,
42
42
  globalUpgradeEntry,
@@ -3317,6 +3317,11 @@ var AUTH_REJECTION_REASONS = [
3317
3317
  "site_not_found",
3318
3318
  ...AGENT_SITE_REJECTION_REASONS
3319
3319
  ];
3320
+ var CREDENTIAL_REJECTION_HEADER = "x-pushary-credential";
3321
+ var CREDENTIAL_REJECTED = "rejected";
3322
+ var CREDENTIAL_REJECTION_STATUS = 401;
3323
+ var MCP_CREDENTIAL_REJECTION_BODY = JSON.stringify({ error: "invalid_token", error_description: "No authorization provided" });
3324
+ var responseRejectsCredential = (status, headers) => status === CREDENTIAL_REJECTION_STATUS && headers.get(CREDENTIAL_REJECTION_HEADER)?.trim() === CREDENTIAL_REJECTED;
3320
3325
  var TOOL_FAILURE_META_KEY = "pushary/failure";
3321
3326
  var TOOL_FAILURE_CODES = {
3322
3327
  questionLimit: "question_limit",
@@ -3622,6 +3627,7 @@ var fileChangeQuestion = (changes) => {
3622
3627
  const unnamed = changes.length - FILE_CHANGES_NAMED_IN_A_QUESTION;
3623
3628
  return `Allow these ${changes.length} file changes once? ${named}${unnamed > 0 ? ` and ${unnamed} more` : ""}`;
3624
3629
  };
3630
+ var codexElicitationToolName = (serverName, toolName) => `mcp__${serverName}__${toolName}`;
3625
3631
  var withCodexReason = (detail, reason) => text(reason) ? `${detail}
3626
3632
 
3627
3633
  Codex's reason: ${redactSecrets(reason)}` : detail;
@@ -3657,7 +3663,7 @@ var parseCodexNativeApproval = (value) => {
3657
3663
  return {
3658
3664
  ...base,
3659
3665
  codexAsksForAPerson,
3660
- toolName: `mcp__${p.serverName}__${meta.tool_name}`,
3666
+ toolName: codexElicitationToolName(p.serverName, meta.tool_name),
3661
3667
  toolInputs: [meta.tool_params],
3662
3668
  question: p.message,
3663
3669
  detail: redactSecrets([`Risk: ${meta.riskLevel}`, meta.subtitle, JSON.stringify(meta.tool_params)].filter(Boolean).join("\n")),
@@ -3667,7 +3673,7 @@ var parseCodexNativeApproval = (value) => {
3667
3673
  return {
3668
3674
  ...base,
3669
3675
  codexAsksForAPerson,
3670
- toolName: `mcp__${p.serverName}__${meta.tool_name}`,
3676
+ toolName: codexElicitationToolName(p.serverName, meta.tool_name),
3671
3677
  toolInputs: [meta.tool_params],
3672
3678
  question: p.message,
3673
3679
  detail: redactSecrets(JSON.stringify(meta.tool_params)),
@@ -3980,6 +3986,7 @@ var reportableSessionId = (value) => typeof value === "string" && value.length >
3980
3986
  var HOOK_BATCH_MAX_BYTES = 4 * 1024 * 1024;
3981
3987
  var REPO_KEY_MAX_LENGTH = 200;
3982
3988
  var SESSION_ID_MAX_LENGTH = 200;
3989
+ var TOOL_NAME_MAX_LENGTH = 100;
3983
3990
  var WILDCARD_TOOL_PATTERN = "*";
3984
3991
  var isRepoKeyMatch = (ruleRepoKey, currentRepoKey) => {
3985
3992
  if (!ruleRepoKey) return true;
@@ -7748,7 +7755,7 @@ var findBestRoute = (routes, toolName, args, repoKey) => {
7748
7755
  let bestWeight = 0;
7749
7756
  let bestScoped = -1;
7750
7757
  let bestLength = -1;
7751
- const { forms } = restrictionReadingOf(routes.map((route) => route.toolPattern), toolName, args);
7758
+ const forms = formsOfEveryCandidate(routes.map((route) => route.toolPattern), toolName, args);
7752
7759
  for (const candidate of routes) {
7753
7760
  if (!isRepoKeyMatch(candidate.repoKey, repoKey)) continue;
7754
7761
  const rank = matchToolPatternAny(candidate.toolPattern, toolName, forms, PATTERN_INTENT.restrict);
@@ -7800,6 +7807,7 @@ var restrictionReadingOf = (restrictingPatterns, toolName, args) => {
7800
7807
  hidesWhatItRuns: POSIX_SHELL_TOOLS.has(toolName) && spellings.hidesWhatItRuns
7801
7808
  };
7802
7809
  };
7810
+ var formsOfEveryCandidate = (restrictingPatterns, toolName, args) => [...new Set(args.flatMap((arg) => restrictionReadingOf(restrictingPatterns, toolName, [arg]).forms))];
7803
7811
  var restrictingPatternsOf = (policies) => policies.filter(restricts).map((policy) => policy.tool);
7804
7812
  var policyReadingOf = (policies, toolName, args) => restrictionReadingOf(restrictingPatternsOf(policies), toolName, args);
7805
7813
  var stricterRule = (current, challenger) => current !== void 0 && (challenger === void 0 || comparePolicyStrictness(current.policy, challenger.policy) > 0) ? current : challenger;
@@ -8632,6 +8640,11 @@ export {
8632
8640
  hookActivationResult,
8633
8641
  CLIENT_REPORT_PATH,
8634
8642
  clientContextHeaders,
8643
+ CREDENTIAL_REJECTION_HEADER,
8644
+ CREDENTIAL_REJECTED,
8645
+ CREDENTIAL_REJECTION_STATUS,
8646
+ MCP_CREDENTIAL_REJECTION_BODY,
8647
+ responseRejectsCredential,
8635
8648
  TOOL_FAILURE_CODES,
8636
8649
  isToolErrorResult,
8637
8650
  toolFailureCodeOfResult,
@@ -8659,6 +8672,7 @@ export {
8659
8672
  CODEX_NATIVE_APPROVAL_METHODS,
8660
8673
  CODEX_NATIVE_APPROVAL_CHOICES,
8661
8674
  CODEX_NATIVE_APPROVAL_REPLIES,
8675
+ codexElicitationToolName,
8662
8676
  parseCodexNativeApproval,
8663
8677
  codexNativeApprovalResponse,
8664
8678
  transcriptRecordPlaintext,
@@ -8704,6 +8718,7 @@ export {
8704
8718
  HOOK_LOCATOR_BINARY,
8705
8719
  isTokenCount,
8706
8720
  reportableSessionId,
8721
+ TOOL_NAME_MAX_LENGTH,
8707
8722
  normalizeRepoRemote,
8708
8723
  localRepoKey,
8709
8724
  isSafeReadOnlyCommand,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-IHQRLJEP.js";
3
+ } from "./chunk-M6EYOBLJ.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-B7O4CXFX.js";
6
+ } from "./chunk-XF3K42EV.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-JCSJEMTA.js";
9
+ } from "./chunk-FYSQQW6Q.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-T5I4PKOQ.js";
13
13
  import {
14
14
  isRecord,
15
15
  isValidApiKey
16
- } from "./chunk-O5TB2LMQ.js";
16
+ } from "./chunk-NMSRA7QO.js";
17
17
 
18
18
  // src/shared-mcp-key.ts
19
19
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,17 +1,20 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-EMSRB2KH.js";
3
+ } from "./chunk-GOUUFBBP.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-LL7SW4RL.js";
6
+ } from "./chunk-XNMSVXB4.js";
7
+ import {
8
+ fetchAsCredential
9
+ } from "./chunk-DZMKNP3I.js";
7
10
  import {
8
11
  getBaseUrl
9
- } from "./chunk-GKCDMAUM.js";
12
+ } from "./chunk-QYBQCMRP.js";
10
13
  import {
11
14
  isRecord,
12
15
  isToolErrorResult,
13
16
  toolFailureCodeOfResult
14
- } from "./chunk-O5TB2LMQ.js";
17
+ } from "./chunk-NMSRA7QO.js";
15
18
 
16
19
  // src/retry.ts
17
20
  var isRetryable = (err) => {
@@ -105,12 +108,12 @@ var sendMcpRequest = async (apiKey, message, options = {}) => {
105
108
  if (options.sessionId) {
106
109
  headers["Mcp-Session-Id"] = options.sessionId;
107
110
  }
108
- const response = await fetchFn(`${baseUrl}/api/mcp/mcp`, {
111
+ const response = await fetchAsCredential(apiKey, `${baseUrl}/api/mcp/mcp`, {
109
112
  method: "POST",
110
113
  headers,
111
114
  body: JSON.stringify(message),
112
115
  signal: options.timeoutMs ? AbortSignal.any([AbortSignal.timeout(options.timeoutMs), ...options.signal ? [options.signal] : []]) : options.signal
113
- });
116
+ }, fetchFn);
114
117
  const lock = response.ok ? null : await keyCheckFromResponse(response, baseUrl);
115
118
  if (lock?.kind === "locked") throw new SubscriptionRequiredError(lock.plan, lock.upgradeUrl);
116
119
  const body = await response.text();
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-MFJHLVIZ.js";
3
+ } from "./chunk-T72BV3CU.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-JCSJEMTA.js";
10
+ } from "./chunk-FYSQQW6Q.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
14
- } from "./chunk-ZCBTCW3T.js";
14
+ } from "./chunk-DQKTKMR3.js";
15
15
  import {
16
16
  CURSOR_GATE_COVERAGE,
17
17
  CURSOR_GATE_SCRIPT,
@@ -21,7 +21,7 @@ import {
21
21
  isCursorHookPayload,
22
22
  isRecord,
23
23
  toolsCoveredByGateEntry
24
- } from "./chunk-O5TB2LMQ.js";
24
+ } from "./chunk-NMSRA7QO.js";
25
25
 
26
26
  // src/cursor-gate-registration.ts
27
27
  import { dirname, isAbsolute, join, resolve } from "path";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-JCSJEMTA.js";
3
+ } from "./chunk-FYSQQW6Q.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
7
  npmExitedOnPermissionDenied
8
- } from "./chunk-ZCBTCW3T.js";
8
+ } from "./chunk-DQKTKMR3.js";
9
9
  import {
10
10
  writeJsonAtomic
11
11
  } from "./chunk-T5I4PKOQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-YDQ6OJMF.js";
3
+ } from "./chunk-DLS43QDO.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -4,10 +4,10 @@ import {
4
4
  keyPrefix,
5
5
  readConfigFileKey,
6
6
  readMacAppKeyPrefix
7
- } from "./chunk-B7O4CXFX.js";
7
+ } from "./chunk-XF3K42EV.js";
8
8
  import {
9
9
  NPX_LATEST_COMMAND
10
- } from "./chunk-YDQ6OJMF.js";
10
+ } from "./chunk-DLS43QDO.js";
11
11
 
12
12
  // src/key-signed-out.ts
13
13
  var VERDICT_BY_CHECK = {
@@ -7,7 +7,7 @@ import {
7
7
  recordSealerFor,
8
8
  uploadTranscriptRecords,
9
9
  wrapSessionKey
10
- } from "./chunk-4XE3DVF7.js";
10
+ } from "./chunk-FE4CSARF.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-OINGJICB.js";
4
+ } from "./chunk-OKZR3LFO.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-DS672F57.js";
7
+ } from "./chunk-LJH2QDF3.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-JLJJRBTD.js";
10
+ } from "./chunk-WKBXLLDY.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-IAASPG5B.js";
13
+ } from "./chunk-DP62DH2Q.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
17
17
  isGrokHookPayload,
18
18
  isGrokSessionEndStop
19
- } from "./chunk-O5TB2LMQ.js";
19
+ } from "./chunk-NMSRA7QO.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"];
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-DH22FQAS.js";
3
+ } from "./chunk-MZDFTXXO.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-GUIS6ASL.js";
6
+ } from "./chunk-3QZSG2L4.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -15,13 +15,13 @@ import {
15
15
  isBridgeLocator,
16
16
  isProtectedByScope,
17
17
  registerHookEntry
18
- } from "./chunk-JCSJEMTA.js";
18
+ } from "./chunk-FYSQQW6Q.js";
19
19
  import {
20
20
  CURSOR_GATE_EVENTS,
21
21
  HOOK_BUDGETS,
22
22
  HOOK_LOCATOR_BINARY,
23
23
  hookCommandHoldBudget
24
- } from "./chunk-O5TB2LMQ.js";
24
+ } from "./chunk-NMSRA7QO.js";
25
25
 
26
26
  // src/gemini-config.ts
27
27
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  readMacAppAgentKey
3
- } from "./chunk-S2TTGX6F.js";
3
+ } from "./chunk-NQAY6G3S.js";
4
4
  import {
5
5
  API_KEYS_PATH
6
- } from "./chunk-2HC5ISDW.js";
6
+ } from "./chunk-5IRJERK2.js";
7
7
  import {
8
8
  absoluteUrl
9
- } from "./chunk-EMSRB2KH.js";
9
+ } from "./chunk-GOUUFBBP.js";
10
10
  import {
11
11
  findExportedKeyLines,
12
12
  isAdoptedMacAppKey,
@@ -16,10 +16,10 @@ import {
16
16
  readConfigFileKey,
17
17
  readKeySource,
18
18
  readMacAppKeyPrefix
19
- } from "./chunk-B7O4CXFX.js";
19
+ } from "./chunk-XF3K42EV.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-O5TB2LMQ.js";
22
+ } from "./chunk-NMSRA7QO.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-ROVLRXBI.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-ZCBTCW3T.js";
6
+ } from "./chunk-DQKTKMR3.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-O5TB2LMQ.js";
9
+ } from "./chunk-NMSRA7QO.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  claudeConfigDir
3
- } from "./chunk-JCSJEMTA.js";
3
+ } from "./chunk-FYSQQW6Q.js";
4
4
  import {
5
5
  claudePermissionRulesFromSettings
6
- } from "./chunk-O5TB2LMQ.js";
6
+ } from "./chunk-NMSRA7QO.js";
7
7
 
8
8
  // src/claude-permission-rules.ts
9
9
  import { readFileSync, statSync } from "fs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-GKCDMAUM.js";
3
+ } from "./chunk-QYBQCMRP.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeJsonAtomic
7
7
  } from "./chunk-T5I4PKOQ.js";
8
8
  import {
9
9
  readSetupOutcomeProperties
10
- } from "./chunk-O5TB2LMQ.js";
10
+ } from "./chunk-NMSRA7QO.js";
11
11
 
12
12
  // src/diagnostics/service-runtime.ts
13
13
  var unescapeXml = (value) => value.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
@@ -2,16 +2,16 @@ import {
2
2
  NpmInstallError,
3
3
  NpmMissingError,
4
4
  NpmPermissionError
5
- } from "./chunk-ZCBTCW3T.js";
5
+ } from "./chunk-DQKTKMR3.js";
6
6
  import {
7
7
  writeFileAtomic
8
8
  } from "./chunk-T5I4PKOQ.js";
9
9
  import {
10
10
  NPX_LATEST_COMMAND
11
- } from "./chunk-YDQ6OJMF.js";
11
+ } from "./chunk-DLS43QDO.js";
12
12
  import {
13
13
  readSetupAgentFailures
14
- } from "./chunk-O5TB2LMQ.js";
14
+ } from "./chunk-NMSRA7QO.js";
15
15
 
16
16
  // src/setup/config-write.ts
17
17
  var AgentConfigWriteError = class extends Error {
@@ -3,24 +3,24 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-GESW4OSZ.js";
6
+ } from "./chunk-JPR4S254.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-HONSMBF2.js";
13
+ } from "./chunk-3OLVEVGW.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-I3IUS4SR.js";
16
+ } from "./chunk-G2TL4OEY.js";
17
17
  import {
18
18
  readControlMode,
19
19
  readKeySource
20
- } from "./chunk-B7O4CXFX.js";
20
+ } from "./chunk-XF3K42EV.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-GKCDMAUM.js";
23
+ } from "./chunk-QYBQCMRP.js";
24
24
  import {
25
25
  getPackageVersion
26
26
  } from "./chunk-ZVU6WMMU.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-B7O4CXFX.js";
3
+ } from "./chunk-XF3K42EV.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-BG4HHB7E.js";
8
8
  import {
9
9
  redactSecretsFromContent
10
- } from "./chunk-O5TB2LMQ.js";
10
+ } from "./chunk-NMSRA7QO.js";
11
11
 
12
12
  // src/cli/json.ts
13
13
  var writeStdoutFully = (text) => new Promise((resolve, reject) => {
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-O5TB2LMQ.js";
5
+ } from "./chunk-NMSRA7QO.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  CLAUDE_CODE_AGENT
3
- } from "./chunk-KHZCJP7P.js";
3
+ } from "./chunk-5RWBSMCI.js";
4
4
  import {
5
5
  addGeminiMcpServer,
6
6
  removeGeminiMcpServer
7
- } from "./chunk-MFJHLVIZ.js";
7
+ } from "./chunk-T72BV3CU.js";
8
8
  import {
9
9
  compatibleToolLookup
10
- } from "./chunk-76JOLPST.js";
10
+ } from "./chunk-BCZSRQ3L.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-JCSJEMTA.js";
22
+ } from "./chunk-FYSQQW6Q.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-O5TB2LMQ.js";
33
+ } from "./chunk-NMSRA7QO.js";
34
34
 
35
35
  // src/config-document.ts
36
36
  import { parse, stringify } from "smol-toml";
@@ -13,16 +13,16 @@ import {
13
13
  } from "./chunk-G66WIAST.js";
14
14
  import {
15
15
  keyPrefix
16
- } from "./chunk-B7O4CXFX.js";
16
+ } from "./chunk-XF3K42EV.js";
17
17
  import {
18
18
  getBaseUrl
19
- } from "./chunk-GKCDMAUM.js";
19
+ } from "./chunk-QYBQCMRP.js";
20
20
  import {
21
21
  NPX_LATEST_COMMAND
22
- } from "./chunk-YDQ6OJMF.js";
22
+ } from "./chunk-DLS43QDO.js";
23
23
  import {
24
24
  isValidApiKey
25
- } from "./chunk-O5TB2LMQ.js";
25
+ } from "./chunk-NMSRA7QO.js";
26
26
 
27
27
  // src/cli/login-ui.ts
28
28
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-O5TB2LMQ.js";
3
+ } from "./chunk-NMSRA7QO.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-Z5FV7LTD.js";
3
+ } from "./chunk-DOHQKE4Y.js";
4
4
  import {
5
5
  configFilePath
6
- } from "./chunk-GKCDMAUM.js";
6
+ } from "./chunk-QYBQCMRP.js";
7
7
  import {
8
8
  backupFile,
9
9
  readJsonSafe,
@@ -14,7 +14,7 @@ import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord,
16
16
  isValidApiKey
17
- } from "./chunk-O5TB2LMQ.js";
17
+ } from "./chunk-NMSRA7QO.js";
18
18
 
19
19
  // src/shell-alias.ts
20
20
  import { homedir } from "os";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-I3IUS4SR.js";
3
+ } from "./chunk-G2TL4OEY.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-GKCDMAUM.js";
6
+ } from "./chunk-QYBQCMRP.js";
7
7
  import {
8
8
  NetworkError
9
9
  } from "./chunk-YU2EUD7O.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  clientContextHeaders,
15
15
  redactSecretsFromContent
16
- } from "./chunk-O5TB2LMQ.js";
16
+ } from "./chunk-NMSRA7QO.js";
17
17
 
18
18
  // src/cli/net.ts
19
19
  import { createRequire } from "module";