pushary 1.9.19 → 1.9.21

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 (102) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/bin/pushary-bell-hook.js +27 -27
  3. package/dist/bin/pushary-bell.js +14 -12
  4. package/dist/bin/pushary-claude.js +26 -26
  5. package/dist/bin/pushary-clean.js +36 -33
  6. package/dist/bin/pushary-codex-bridge.js +18 -18
  7. package/dist/bin/pushary-codex-hook.js +32 -32
  8. package/dist/bin/pushary-codex.js +13 -13
  9. package/dist/bin/pushary-connect.js +25 -25
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +33 -33
  12. package/dist/bin/pushary-disconnect.js +25 -25
  13. package/dist/bin/pushary-doctor.js +34 -34
  14. package/dist/bin/pushary-elicitation-hook.js +27 -27
  15. package/dist/bin/pushary-gemini-bridge.js +14 -14
  16. package/dist/bin/pushary-gemini-hook.js +29 -29
  17. package/dist/bin/pushary-hook.js +31 -31
  18. package/dist/bin/pushary-login.js +13 -13
  19. package/dist/bin/pushary-logout.js +36 -20
  20. package/dist/bin/pushary-mcp.js +10 -10
  21. package/dist/bin/pushary-mode.js +13 -13
  22. package/dist/bin/pushary-notification-hook.js +26 -26
  23. package/dist/bin/pushary-opencode-hook.js +28 -28
  24. package/dist/bin/pushary-permission-denied-hook.js +31 -31
  25. package/dist/bin/pushary-permission-hook.js +30 -30
  26. package/dist/bin/pushary-post-hook.js +26 -26
  27. package/dist/bin/pushary-prompt-hook.js +26 -26
  28. package/dist/bin/pushary-session-end-hook.js +26 -26
  29. package/dist/bin/pushary-session-start-hook.js +30 -30
  30. package/dist/bin/pushary-setup.js +76 -51
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +34 -29
  33. package/dist/bin/pushary-stop-hook.js +26 -26
  34. package/dist/bin/pushary-stopfailure-hook.js +26 -26
  35. package/dist/bin/pushary-suggestions.js +13 -13
  36. package/dist/bin/pushary-transcript-register.js +19 -19
  37. package/dist/bin/pushary-transcripts.js +9 -9
  38. package/dist/bin/pushary-upgrade.js +31 -31
  39. package/dist/bin/pushary-wait.js +13 -13
  40. package/dist/bin/pushary.js +7 -7
  41. package/dist/{chunk-YONHM5BQ.js → chunk-247PAUW6.js} +1 -1
  42. package/dist/{chunk-QLG6UKIB.js → chunk-2V55RBUR.js} +5 -5
  43. package/dist/{chunk-5RMD75P2.js → chunk-4BKAZ4JN.js} +10 -6
  44. package/dist/{chunk-HYPSYXP4.js → chunk-4RJQPI36.js} +5 -5
  45. package/dist/{chunk-XQ4HTTBB.js → chunk-4WHNRAOK.js} +1 -1
  46. package/dist/{chunk-VCLDXVR3.js → chunk-5PW6GMQO.js} +3 -3
  47. package/dist/{chunk-2V2CCTGQ.js → chunk-6WBIQQHO.js} +1 -1
  48. package/dist/{chunk-XGHXQUDG.js → chunk-6WINXCXY.js} +1 -1
  49. package/dist/{chunk-KT36OCRW.js → chunk-7AFLHL2R.js} +6 -3
  50. package/dist/{chunk-FT7UNIS3.js → chunk-AQFEP65J.js} +2 -1
  51. package/dist/{chunk-7TSL3JCX.js → chunk-AXBFNQG6.js} +1 -1
  52. package/dist/{chunk-LHGB64O2.js → chunk-B6KZME5D.js} +1 -1
  53. package/dist/{chunk-E2RXTRM2.js → chunk-BDL6GJOQ.js} +4 -4
  54. package/dist/{chunk-DKFAJHLI.js → chunk-BERMVODT.js} +9 -8
  55. package/dist/{chunk-LXYNKZFP.js → chunk-BV5JPACQ.js} +2 -2
  56. package/dist/{chunk-FEKP3NJR.js → chunk-CEF4UQ3X.js} +21 -8
  57. package/dist/{chunk-MGW26CW7.js → chunk-ESHO7OC3.js} +1 -1
  58. package/dist/{chunk-4ABHSCFJ.js → chunk-FH4O3QGQ.js} +29 -26
  59. package/dist/{chunk-3FG2VCH3.js → chunk-FUXCWF4Y.js} +11 -8
  60. package/dist/{chunk-23QKUOEV.js → chunk-G4TV5GYU.js} +2 -2
  61. package/dist/{chunk-TBTCBAQC.js → chunk-GMJOSAAP.js} +11 -11
  62. package/dist/{chunk-2YAHQ763.js → chunk-I52ALHOM.js} +5 -5
  63. package/dist/{chunk-6TQLZP7F.js → chunk-IEYFFMTU.js} +3 -3
  64. package/dist/{chunk-T27NT7LJ.js → chunk-II6OFDB3.js} +4 -4
  65. package/dist/{chunk-TNZYTGAJ.js → chunk-IIQ77WUJ.js} +6 -6
  66. package/dist/{chunk-ATDOYZXC.js → chunk-IM7EGZVH.js} +1 -1
  67. package/dist/{chunk-CRW4P7JU.js → chunk-JHAPJRAN.js} +1 -1
  68. package/dist/{chunk-6GQDOO5P.js → chunk-L5NPRGVE.js} +10 -9
  69. package/dist/{chunk-A6U4RRFM.js → chunk-LUDGBOLV.js} +2 -2
  70. package/dist/{chunk-KRDQQL2X.js → chunk-NBGJ3EOE.js} +2 -2
  71. package/dist/{chunk-MID7BURF.js → chunk-NVXC6ZBR.js} +2 -2
  72. package/dist/{chunk-SB2GN6OP.js → chunk-OYIN77HO.js} +3 -2
  73. package/dist/{chunk-Z4YQ7ZMO.js → chunk-PCF7JUTP.js} +3 -3
  74. package/dist/{chunk-5LQRUBFB.js → chunk-PCVAK67W.js} +1 -1
  75. package/dist/{chunk-SEZUF33H.js → chunk-PYWZYM74.js} +5 -14
  76. package/dist/{chunk-AXG5QMRM.js → chunk-QHY3UDYC.js} +3 -3
  77. package/dist/{chunk-SIOYJRL4.js → chunk-RVP6COOQ.js} +2 -2
  78. package/dist/{chunk-QDRDDVLH.js → chunk-SVQOEVAT.js} +4 -4
  79. package/dist/{chunk-B4OS2OVD.js → chunk-TBCXMW2C.js} +3 -3
  80. package/dist/{chunk-XUUE6MYM.js → chunk-TJ4KMPYO.js} +10 -10
  81. package/dist/{chunk-5C2GFTWE.js → chunk-TQIPIFL7.js} +1 -1
  82. package/dist/{chunk-5PYLU6OS.js → chunk-TVBEHME2.js} +7 -6
  83. package/dist/{chunk-FRZS7XQF.js → chunk-U6GYFWT4.js} +8 -5
  84. package/dist/{chunk-736I6CBY.js → chunk-UKCRTTKF.js} +1 -1
  85. package/dist/{chunk-UAA4BEYM.js → chunk-UZ2YEGIT.js} +3 -3
  86. package/dist/{chunk-6HMCOGKJ.js → chunk-VBPASZU7.js} +13 -8
  87. package/dist/{chunk-YXYSPMD3.js → chunk-VD2AWSER.js} +2 -2
  88. package/dist/{chunk-MHYXM43K.js → chunk-VRXX2AY2.js} +2 -2
  89. package/dist/{chunk-6WEC3KZP.js → chunk-VTR4VRL2.js} +1 -1
  90. package/dist/{chunk-BIQF3C4H.js → chunk-XNO3CSVW.js} +1 -1
  91. package/dist/{chunk-DVLQ4TVD.js → chunk-Y2BOLNJV.js} +5 -5
  92. package/dist/{chunk-W4TZAKOD.js → chunk-Y6PZ3B5U.js} +2 -2
  93. package/dist/{chunk-NILVJ7HV.js → chunk-YCL2V5FD.js} +9 -9
  94. package/dist/{chunk-YAU4JCYI.js → chunk-YLLGKY7K.js} +3 -3
  95. package/dist/{chunk-OWUDBHXW.js → chunk-Z5EYCMJH.js} +2 -2
  96. package/dist/{chunk-SXVXANPI.js → chunk-ZNAGS7O7.js} +3 -3
  97. package/dist/{global-upgrade-XEMENBZA.js → global-upgrade-AHRKGQ7M.js} +7 -7
  98. package/dist/{paths-VW5CI5KS.js → paths-AGUCNYQ5.js} +2 -2
  99. package/dist/{reapply-7KPSIO4L.js → reapply-BUCDXIIM.js} +21 -21
  100. package/dist/src/index.js +20 -20
  101. package/dist/{upgrade-lock-VT6XMQMB.js → upgrade-lock-7Z5WBZVH.js} +4 -4
  102. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-YONHM5BQ.js";
3
+ } from "./chunk-247PAUW6.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-GMXKITVA.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-7QLSKOSU.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-LHGB64O2.js";
12
+ } from "./chunk-B6KZME5D.js";
13
13
  import {
14
14
  CLAUDE_CONNECTOR_GUIDE,
15
15
  CLAUDE_CONNECTOR_STEPS,
@@ -17,7 +17,7 @@ import {
17
17
  CLAUDE_CONNECTOR_URL,
18
18
  COWORK_CONNECTOR_LIMIT,
19
19
  COWORK_STANDING_INSTRUCTIONS
20
- } from "./chunk-6HMCOGKJ.js";
20
+ } from "./chunk-VBPASZU7.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-NILVJ7HV.js";
3
+ } from "./chunk-YCL2V5FD.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var denyReasonFrom = (value, note) => {
@@ -2,23 +2,23 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-YAU4JCYI.js";
5
+ } from "./chunk-YLLGKY7K.js";
6
6
  import {
7
7
  AGENT_CHOICES
8
- } from "./chunk-YONHM5BQ.js";
8
+ } from "./chunk-247PAUW6.js";
9
9
  import {
10
10
  BELL_HOOK_BINARY
11
- } from "./chunk-7TSL3JCX.js";
11
+ } from "./chunk-AXBFNQG6.js";
12
12
  import {
13
13
  CODEX_HOOK_EVENTS,
14
14
  hasCodexHooks,
15
15
  holdBudgetOf
16
- } from "./chunk-FEKP3NJR.js";
16
+ } from "./chunk-CEF4UQ3X.js";
17
17
  import {
18
18
  CURSOR_GATE_EVENTS,
19
19
  HOOK_LOCATOR_BINARY,
20
20
  hookCommandHoldBudget
21
- } from "./chunk-6HMCOGKJ.js";
21
+ } from "./chunk-VBPASZU7.js";
22
22
 
23
23
  // src/diagnostics/bridge.ts
24
24
  import { execFileSync } from "child_process";
@@ -228,14 +228,6 @@ var hasAppCommand = (value) => commandsIn(value).some((command) => {
228
228
  const executable = pusharyHookExecutable(command);
229
229
  return executable !== null && isBridgeLocator(executable);
230
230
  });
231
- var mcpBearerKey = (document, containerKey, headersKey) => {
232
- const servers = isRecord(document?.[containerKey]) ? document[containerKey] : null;
233
- const pushary = isRecord(servers?.pushary) ? servers.pushary : null;
234
- const headers = isRecord(pushary?.[headersKey]) ? pushary[headersKey] : null;
235
- const authorization = headers?.Authorization;
236
- const match = typeof authorization === "string" ? authorization.trim().match(/^Bearer\s+(\S+)$/) : null;
237
- return match?.[1] ?? null;
238
- };
239
231
  var captureMcpServer = (document, containerKey) => {
240
232
  const container = document[containerKey];
241
233
  const servers = isRecord(container) ? container : null;
@@ -347,7 +339,6 @@ export {
347
339
  holdsLong,
348
340
  describeOtherHolder,
349
341
  describeHoldSentence,
350
- mcpBearerKey,
351
342
  captureMcpServer,
352
343
  restoreMcpServer,
353
344
  captureHookTakeover,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-DKFAJHLI.js";
3
+ } from "./chunk-BERMVODT.js";
4
4
  import {
5
5
  codexHomeFrom,
6
6
  resolvePathBinary
7
- } from "./chunk-FEKP3NJR.js";
7
+ } from "./chunk-CEF4UQ3X.js";
8
8
  import {
9
9
  HOOK_COMPATIBLE_PROFILES
10
- } from "./chunk-6HMCOGKJ.js";
10
+ } from "./chunk-VBPASZU7.js";
11
11
 
12
12
  // src/hermes-config.ts
13
13
  import { execFileSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-W4TZAKOD.js";
3
+ } from "./chunk-Y6PZ3B5U.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-LHGB64O2.js";
6
+ } from "./chunk-B6KZME5D.js";
7
7
 
8
8
  // src/setup/codex-trust.ts
9
9
  var CODEX_TRUST_TELEMETRY = {
@@ -2,25 +2,25 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-2YAHQ763.js";
5
+ } from "./chunk-I52ALHOM.js";
6
6
  import {
7
7
  createIo
8
8
  } from "./chunk-FO3MDD26.js";
9
9
  import {
10
10
  readKeySource
11
- } from "./chunk-4ABHSCFJ.js";
11
+ } from "./chunk-FH4O3QGQ.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-UAA4BEYM.js";
17
+ } from "./chunk-UZ2YEGIT.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-XQ4HTTBB.js";
23
+ } from "./chunk-4WHNRAOK.js";
24
24
 
25
25
  // src/cli/report-key.ts
26
26
  var { dim, yellow } = createIo();
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-KRDQQL2X.js";
3
+ } from "./chunk-NBGJ3EOE.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-XQ4HTTBB.js";
9
+ } from "./chunk-4WHNRAOK.js";
10
10
  import {
11
11
  clientContextHeaders,
12
12
  getPackageVersion
13
- } from "./chunk-6HMCOGKJ.js";
13
+ } from "./chunk-VBPASZU7.js";
14
14
 
15
15
  // src/cli/net.ts
16
16
  import { createRequire } from "module";
@@ -3,41 +3,41 @@ import {
3
3
  loadPin,
4
4
  savePin,
5
5
  verifyRecipients
6
- } from "./chunk-6WEC3KZP.js";
6
+ } from "./chunk-VTR4VRL2.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-6GQDOO5P.js";
9
+ } from "./chunk-L5NPRGVE.js";
10
10
  import {
11
11
  buildTranscriptRecords,
12
12
  decodePublicKey,
13
13
  generateSessionKey,
14
14
  wrapSessionKey
15
- } from "./chunk-XGHXQUDG.js";
15
+ } from "./chunk-6WINXCXY.js";
16
16
  import {
17
17
  fetchTranscriptRecipients,
18
18
  uploadTranscriptRecords
19
- } from "./chunk-ATDOYZXC.js";
19
+ } from "./chunk-IM7EGZVH.js";
20
20
  import {
21
21
  transcriptEnvironmentPreference,
22
22
  transcriptsEnabled
23
- } from "./chunk-2V2CCTGQ.js";
23
+ } from "./chunk-6WBIQQHO.js";
24
24
  import {
25
25
  hookOwnerOf
26
- } from "./chunk-SEZUF33H.js";
26
+ } from "./chunk-PYWZYM74.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-4ABHSCFJ.js";
29
+ } from "./chunk-FH4O3QGQ.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-FEKP3NJR.js";
33
+ } from "./chunk-CEF4UQ3X.js";
34
34
  import {
35
35
  writeJsonAtomic
36
- } from "./chunk-FT7UNIS3.js";
36
+ } from "./chunk-AQFEP65J.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-XQ4HTTBB.js";
40
+ } from "./chunk-4WHNRAOK.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-6HMCOGKJ.js";
4
+ } from "./chunk-VBPASZU7.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -14,19 +14,19 @@ import {
14
14
  } from "./chunk-FO3MDD26.js";
15
15
  import {
16
16
  callMcpTool
17
- } from "./chunk-SXVXANPI.js";
17
+ } from "./chunk-ZNAGS7O7.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-MID7BURF.js";
20
+ } from "./chunk-NVXC6ZBR.js";
21
21
  import {
22
22
  NPX_LATEST_COMMAND
23
- } from "./chunk-LHGB64O2.js";
23
+ } from "./chunk-B6KZME5D.js";
24
24
  import {
25
25
  NO_PAIRING_COMPUTER,
26
26
  PAIR_TTL_SECONDS,
27
27
  classifyConfirmResponse,
28
28
  isAnswerSource
29
- } from "./chunk-6HMCOGKJ.js";
29
+ } from "./chunk-VBPASZU7.js";
30
30
 
31
31
  // src/reach.ts
32
32
  var reachVerdict = (channels) => {
@@ -746,10 +746,10 @@ var describePairingScreen = (screen) => [
746
746
  bold("Connect your phone"),
747
747
  "Scan this with your phone's camera or the Pushary app.",
748
748
  `${dim("Or open on your phone:")} ${cyan(screen.universalLink)}`,
749
- `Your phone will show ${cyan(screen.fingerprint)}. Check it matches.`,
750
749
  `${dim("Already have the app and it opened a browser? Use")} ${cyan(screen.deepLink)}`,
751
750
  dim(PAIR_GET_APP_LINE)
752
751
  ];
752
+ var describePairingFingerprint = (fingerprint) => `Your phone will show ${cyan(fingerprint)}. Check it matches.`;
753
753
  var SYSTEM_PAIR_CLOCK = { now: () => Date.now(), sleep };
754
754
  var startPairing = async (cliPublicKey, computer) => {
755
755
  try {
@@ -853,10 +853,11 @@ var connectViaAppPairing = async (options = {}) => {
853
853
  }
854
854
  const { pairId, code } = started;
855
855
  const { qrLink, universalLink, deepLink } = buildPairLinks(pairId, keypair.publicKeyB64, apiBase(), code);
856
- for (const line of describePairingScreen({ universalLink, fingerprint: publicKeyFingerprint(keypair.publicKeyB64), deepLink })) {
856
+ for (const line of describePairingScreen({ universalLink, deepLink })) {
857
857
  console.log(` ${line}`);
858
858
  }
859
859
  await printQr(qrLink);
860
+ console.log(` ${describePairingFingerprint(publicKeyFingerprint(keypair.publicKeyB64))}`);
860
861
  const startedAt = clock.now();
861
862
  const deadline = requestedAt + PAIR_TIMEOUT_MS;
862
863
  let hintShown = false;
@@ -1,18 +1,21 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-E2RXTRM2.js";
4
+ } from "./chunk-BDL6GJOQ.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-SEZUF33H.js";
7
+ } from "./chunk-PYWZYM74.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-FEKP3NJR.js";
11
+ } from "./chunk-CEF4UQ3X.js";
12
+ import {
13
+ isRecord
14
+ } from "./chunk-VBPASZU7.js";
12
15
 
13
16
  // src/cursor-config.ts
14
17
  var hookCommandOf = (entry) => {
15
- const command = entry && typeof entry === "object" && !Array.isArray(entry) ? entry.command : void 0;
18
+ const command = isRecord(entry) ? entry.command : void 0;
16
19
  return typeof command === "string" ? command : "";
17
20
  };
18
21
  var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
@@ -38,7 +41,7 @@ var isCursorPluginLeftover = (name) => name.startsWith(`${CURSOR_PLUGIN_NAME}${C
38
41
  var isPusharyCursorPluginManifest = (contents) => {
39
42
  try {
40
43
  const manifest = JSON.parse(contents);
41
- return typeof manifest === "object" && manifest !== null && !Array.isArray(manifest) && manifest.name === CURSOR_PLUGIN_NAME;
44
+ return isRecord(manifest) && manifest.name === CURSOR_PLUGIN_NAME;
42
45
  } catch {
43
46
  return false;
44
47
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-6HMCOGKJ.js";
3
+ } from "./chunk-VBPASZU7.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-B4OS2OVD.js";
3
+ } from "./chunk-TBCXMW2C.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-KZERVKTD.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-XQ4HTTBB.js";
12
+ } from "./chunk-4WHNRAOK.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-6HMCOGKJ.js";
16
+ } from "./chunk-VBPASZU7.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -676,6 +676,9 @@ var redactSecrets = (text) => applyRedactionRules(SECRET_REDACTION_RULES, text);
676
676
  var redactSecretsFromContent = (text) => applyRedactionRules(CUT_OFF_TEXT_REDACTION_RULES, text);
677
677
  var redactSecretsDeep = (text) => redactSecrets(text).replace(HIGH_ENTROPY_RULE.pattern, HIGH_ENTROPY_RULE.replacement);
678
678
 
679
+ // ../contracts/src/json-record.ts
680
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
681
+
679
682
  // ../contracts/src/shell-analysis.ts
680
683
  var SHELL_WORD_SEPARATOR = /[ \t\n]/;
681
684
  var ARITHMETIC_EVALUATING_EXPANSION = /\$[#+=~^]*(?:[A-Za-z_][A-Za-z0-9_]*|[0-9]+|[-?$!@*#])?\[/;
@@ -880,7 +883,6 @@ var AUTH_REJECTION_REASONS = [
880
883
  var DECLINED_AGENTS_FILE = "declined-agents.json";
881
884
  var DECLINED_AGENTS_VERSION = 1;
882
885
  var isDeclinableAgent = (value) => typeof value === "string" && DISCONNECT_AGENT_IDS.includes(value);
883
- var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
884
886
  var canonicalAgents = (agents) => [...new Set(agents)].sort();
885
887
  var parseDeclinedAgents = (value) => {
886
888
  if (!isRecord(value) || value.version !== DECLINED_AGENTS_VERSION || !Array.isArray(value.agents)) return [];
@@ -1063,7 +1065,6 @@ var hasNativeApprovalPrompt = (source, event) => !(source === "cursor" && event
1063
1065
  var SUPPORT_EMAIL = "business@pushary.com";
1064
1066
  var SUPPORT_DISCORD = "https://discord.gg/9v3VvUByrr";
1065
1067
  var HOOK_LOCATOR_BINARY = "pushary-bridge";
1066
- var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1067
1068
  var isTokenCount = (value) => typeof value === "number" && Number.isInteger(value) && value >= 0;
1068
1069
  var reportableSessionId = (value) => typeof value === "string" && value.length > 0 && value.length <= SESSION_ID_MAX_LENGTH ? value : null;
1069
1070
  var HOOK_BATCH_MAX_BYTES = 4 * 1024 * 1024;
@@ -1901,7 +1902,9 @@ var mcpToolNameNeedsAPerson = (toolName) => {
1901
1902
  };
1902
1903
  var allowsSessionToolGrant = (toolName) => SESSION_TOOL_GRANT_TOOLS.has(toolName) || parseMcpToolName(toolName) !== void 0 && !isPusharyOwnTool(toolName.toLowerCase()) && !mcpToolNameNeedsAPerson(toolName);
1903
1904
  var isSessionToolGrant = (policy) => Boolean(policy.sessionId) && allowsSessionToolGrant(policy.tool) && isAutoApprove(policy);
1904
- var API_KEY_PATTERN = /^pk_[a-f0-9]+\.[a-f0-9]+$/;
1905
+ var API_KEY_PREFIX_SHAPE = "pk_[a-f0-9]+";
1906
+ var API_KEY_PREFIX_PATTERN = new RegExp(`^${API_KEY_PREFIX_SHAPE}$`);
1907
+ var API_KEY_PATTERN = new RegExp(`^${API_KEY_PREFIX_SHAPE}\\.[a-f0-9]+$`);
1905
1908
  var isValidApiKey = (value) => API_KEY_PATTERN.test(value);
1906
1909
  var ACTION_BODY_MAX = 4e3;
1907
1910
  var DECISION_LINE_MAX = 500;
@@ -2612,7 +2615,7 @@ var settingsPermissionList = (permissions, kind) => {
2612
2615
  };
2613
2616
  var boundedUnion = (lists) => [...new Set(lists.flat())].slice(0, MAX_AGENT_PERMISSION_RULES_PER_KIND);
2614
2617
  var claudePermissionRulesFromSettings = (documents) => {
2615
- const permissionBlocks = documents.flatMap((document) => isRecord2(document) && isRecord2(document.permissions) ? [document.permissions] : []);
2618
+ const permissionBlocks = documents.flatMap((document) => isRecord(document) && isRecord(document.permissions) ? [document.permissions] : []);
2616
2619
  const collect = (kind) => boundedUnion(permissionBlocks.map((permissions) => settingsPermissionList(permissions, kind)));
2617
2620
  return { allow: collect("allow"), ask: collect("ask"), deny: collect("deny") };
2618
2621
  };
@@ -3033,16 +3036,16 @@ var globalInstallTarget = (owner, ownName) => {
3033
3036
  return LEGACY_PACKAGE;
3034
3037
  }
3035
3038
  };
3036
- var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3037
- var declaresOwnershipProbe = (bin) => isRecord3(bin) && typeof bin[OWNERSHIP_PROBE_COMMAND] === "string";
3039
+ var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3040
+ var declaresOwnershipProbe = (bin) => isRecord2(bin) && typeof bin[OWNERSHIP_PROBE_COMMAND] === "string";
3038
3041
  var cliManifestName = (manifest) => {
3039
- if (!isRecord3(manifest) || !isCliPackageName(manifest.name) || !declaresOwnershipProbe(manifest.bin)) return void 0;
3042
+ if (!isRecord2(manifest) || !isCliPackageName(manifest.name) || !declaresOwnershipProbe(manifest.bin)) return void 0;
3040
3043
  return manifest.name;
3041
3044
  };
3042
3045
  var classifyGlobalFolder = (name, read) => {
3043
3046
  if (read.kind === "unreadable") return { kind: "unseen" };
3044
3047
  const { manifest } = read;
3045
- if (!isRecord3(manifest) || cliManifestName(manifest) !== name) return { kind: "foreign" };
3048
+ if (!isRecord2(manifest) || cliManifestName(manifest) !== name) return { kind: "foreign" };
3046
3049
  return { kind: "ours", installed: { name, version: typeof manifest.version === "string" ? manifest.version : void 0 } };
3047
3050
  };
3048
3051
  var classifyGlobalInstall = (installed, owner) => {
@@ -3151,6 +3154,7 @@ export {
3151
3154
  redactSecrets,
3152
3155
  redactSecretsFromContent,
3153
3156
  redactSecretsDeep,
3157
+ isRecord,
3154
3158
  degradedLine,
3155
3159
  hookWritePath,
3156
3160
  MAX_HOOK_ACTIVATION_EVIDENCE_ROWS,
@@ -3200,6 +3204,7 @@ export {
3200
3204
  isAutoApprove,
3201
3205
  FILE_TARGET_TOOLS,
3202
3206
  parseMcpToolName,
3207
+ API_KEY_PREFIX_PATTERN,
3203
3208
  isValidApiKey,
3204
3209
  ACTION_BODY_MAX,
3205
3210
  DECISION_LINE_MAX,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-SXVXANPI.js";
3
+ } from "./chunk-ZNAGS7O7.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-LHGB64O2.js";
6
+ } from "./chunk-B6KZME5D.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -2,10 +2,10 @@ import {
2
2
  autoUpdateLock,
3
3
  installPackageGlobally,
4
4
  npmErrorMessage
5
- } from "./chunk-FEKP3NJR.js";
5
+ } from "./chunk-CEF4UQ3X.js";
6
6
  import {
7
7
  writeJsonAtomic
8
- } from "./chunk-FT7UNIS3.js";
8
+ } from "./chunk-AQFEP65J.js";
9
9
 
10
10
  // src/upgrade-lock.ts
11
11
  import { fork } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-FT7UNIS3.js";
3
+ } from "./chunk-AQFEP65J.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-XQ4HTTBB.js";
12
+ } from "./chunk-4WHNRAOK.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -5,18 +5,18 @@ import {
5
5
  import {
6
6
  SubscriptionRequiredError,
7
7
  callMcpTool
8
- } from "./chunk-SXVXANPI.js";
8
+ } from "./chunk-ZNAGS7O7.js";
9
9
  import {
10
10
  installNetworkDefaults,
11
11
  isNetworkFailure
12
- } from "./chunk-B4OS2OVD.js";
12
+ } from "./chunk-TBCXMW2C.js";
13
13
  import {
14
14
  clientReportClaims
15
- } from "./chunk-FEKP3NJR.js";
15
+ } from "./chunk-CEF4UQ3X.js";
16
16
  import {
17
17
  getApiKey,
18
18
  getBaseUrl
19
- } from "./chunk-XQ4HTTBB.js";
19
+ } from "./chunk-4WHNRAOK.js";
20
20
  import {
21
21
  ASK_AGENT_NAME_MAX,
22
22
  ASK_QUESTION_MAX,
@@ -24,7 +24,7 @@ import {
24
24
  DECISION_LINE_MAX,
25
25
  degradedLine,
26
26
  truncateLine
27
- } from "./chunk-6HMCOGKJ.js";
27
+ } from "./chunk-VBPASZU7.js";
28
28
 
29
29
  // src/client-report-claim.ts
30
30
  import { createHash } from "crypto";
@@ -8,10 +8,10 @@ import {
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand,
10
10
  resolvePathBinary
11
- } from "./chunk-FEKP3NJR.js";
11
+ } from "./chunk-CEF4UQ3X.js";
12
12
  import {
13
13
  getPackageVersion
14
- } from "./chunk-6HMCOGKJ.js";
14
+ } from "./chunk-VBPASZU7.js";
15
15
 
16
16
  // src/codex-app-server.ts
17
17
  import { existsSync, realpathSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-CRW4P7JU.js";
5
+ } from "./chunk-JHAPJRAN.js";
6
6
  import {
7
7
  cancelQuestion,
8
8
  clientErrorKindOf,
@@ -10,26 +10,26 @@ import {
10
10
  reportClientError,
11
11
  sendNotification,
12
12
  waitForAnswer
13
- } from "./chunk-DVLQ4TVD.js";
13
+ } from "./chunk-Y2BOLNJV.js";
14
14
  import {
15
15
  withRetry
16
- } from "./chunk-SXVXANPI.js";
16
+ } from "./chunk-ZNAGS7O7.js";
17
17
  import {
18
18
  getMachineId
19
- } from "./chunk-KRDQQL2X.js";
19
+ } from "./chunk-NBGJ3EOE.js";
20
20
  import {
21
21
  reportedInstallSource
22
- } from "./chunk-MID7BURF.js";
22
+ } from "./chunk-NVXC6ZBR.js";
23
23
  import {
24
24
  canonicalJson
25
- } from "./chunk-FEKP3NJR.js";
25
+ } from "./chunk-CEF4UQ3X.js";
26
26
  import {
27
27
  writeFileAtomic
28
- } from "./chunk-FT7UNIS3.js";
28
+ } from "./chunk-AQFEP65J.js";
29
29
  import {
30
30
  getApiKey,
31
31
  getBaseUrl
32
- } from "./chunk-XQ4HTTBB.js";
32
+ } from "./chunk-4WHNRAOK.js";
33
33
  import {
34
34
  ACTION_BODY_MAX,
35
35
  AGENT_LABELS_BY_TYPE,
@@ -60,7 +60,7 @@ import {
60
60
  resolvePolicy,
61
61
  toToolLookup,
62
62
  truncateLine
63
- } from "./chunk-6HMCOGKJ.js";
63
+ } from "./chunk-VBPASZU7.js";
64
64
 
65
65
  // ../hook-mapping/src/describe.ts
66
66
  import { isAbsolute, relative, resolve } from "path";
@@ -5,16 +5,16 @@ import {
5
5
  import {
6
6
  NOTIFICATION_MATCHED_TYPES,
7
7
  POSTTOOLUSE_MIRRORED_TOOLS
8
- } from "./chunk-CRW4P7JU.js";
8
+ } from "./chunk-JHAPJRAN.js";
9
9
  import {
10
10
  isProtectedByScope,
11
11
  registerHookEntry
12
- } from "./chunk-FEKP3NJR.js";
12
+ } from "./chunk-CEF4UQ3X.js";
13
13
  import {
14
14
  CLAUDE_PRETOOLUSE_MATCHER,
15
15
  HOOK_BUDGETS,
16
16
  HOOK_LOCATOR_BINARY
17
- } from "./chunk-6HMCOGKJ.js";
17
+ } from "./chunk-VBPASZU7.js";
18
18
 
19
19
  // src/gemini-config.ts
20
20
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -10,10 +10,10 @@ import {
10
10
  resolvePackageVersionFromBinary,
11
11
  resolvePathBinary,
12
12
  resolvePathBinaryAsync
13
- } from "./chunk-FEKP3NJR.js";
13
+ } from "./chunk-CEF4UQ3X.js";
14
14
  import {
15
15
  MANAGED_PROVIDERS
16
- } from "./chunk-6HMCOGKJ.js";
16
+ } from "./chunk-VBPASZU7.js";
17
17
 
18
18
  // src/setup/codex-install.ts
19
19
  var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-UAA4BEYM.js";
3
+ } from "./chunk-UZ2YEGIT.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-B4OS2OVD.js";
6
+ } from "./chunk-TBCXMW2C.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-XQ4HTTBB.js";
9
+ } from "./chunk-4WHNRAOK.js";
10
10
 
11
11
  // src/retry.ts
12
12
  var isRetryable = (err) => {
@@ -5,15 +5,15 @@ import {
5
5
  readGlobalUpgradeSubject,
6
6
  upgradeInstalledPackage,
7
7
  withUpgradeLock
8
- } from "./chunk-QLG6UKIB.js";
9
- import "./chunk-MHYXM43K.js";
10
- import "./chunk-VCLDXVR3.js";
8
+ } from "./chunk-2V55RBUR.js";
9
+ import "./chunk-VRXX2AY2.js";
10
+ import "./chunk-5PW6GMQO.js";
11
11
  import "./chunk-POFBE6ZY.js";
12
12
  import "./chunk-KZERVKTD.js";
13
- import "./chunk-FEKP3NJR.js";
14
- import "./chunk-FT7UNIS3.js";
15
- import "./chunk-LHGB64O2.js";
16
- import "./chunk-6HMCOGKJ.js";
13
+ import "./chunk-CEF4UQ3X.js";
14
+ import "./chunk-AQFEP65J.js";
15
+ import "./chunk-B6KZME5D.js";
16
+ import "./chunk-VBPASZU7.js";
17
17
  export {
18
18
  finishGlobalUpgrade,
19
19
  finishUpgradeWithLock,
@@ -32,8 +32,8 @@ import {
32
32
  pusharyDir,
33
33
  vscodePluginDir,
34
34
  vscodePluginMcp
35
- } from "./chunk-FEKP3NJR.js";
36
- import "./chunk-6HMCOGKJ.js";
35
+ } from "./chunk-CEF4UQ3X.js";
36
+ import "./chunk-VBPASZU7.js";
37
37
  export {
38
38
  autoUpdateLock,
39
39
  autoUpdateLog,