pushary 1.9.76 → 1.9.77

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 (125) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{api-YDCHRRA4.js → api-IGMCPM35.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +26 -26
  6. package/dist/bin/pushary-clean.js +33 -33
  7. package/dist/bin/pushary-codex-bridge.js +21 -21
  8. package/dist/bin/pushary-codex-hook.js +30 -30
  9. package/dist/bin/pushary-codex-session.js +8 -8
  10. package/dist/bin/pushary-codex.js +13 -13
  11. package/dist/bin/pushary-connect.js +26 -26
  12. package/dist/bin/pushary-cowork.js +5 -5
  13. package/dist/bin/pushary-daemon.js +122 -66
  14. package/dist/bin/pushary-disconnect.js +25 -25
  15. package/dist/bin/pushary-display-hook.js +16 -16
  16. package/dist/bin/pushary-doctor.js +41 -41
  17. package/dist/bin/pushary-elicitation-hook.js +25 -25
  18. package/dist/bin/pushary-gemini-bridge.js +15 -15
  19. package/dist/bin/pushary-gemini-hook.js +27 -27
  20. package/dist/bin/pushary-hook.js +29 -29
  21. package/dist/bin/pushary-login.js +20 -20
  22. package/dist/bin/pushary-logout.js +24 -24
  23. package/dist/bin/pushary-mcp.js +11 -11
  24. package/dist/bin/pushary-mode.js +15 -15
  25. package/dist/bin/pushary-notification-hook.js +24 -24
  26. package/dist/bin/pushary-opencode-hook.js +26 -26
  27. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  28. package/dist/bin/pushary-permission-hook.js +29 -29
  29. package/dist/bin/pushary-post-hook.js +24 -24
  30. package/dist/bin/pushary-prompt-hook.js +24 -24
  31. package/dist/bin/pushary-session-end-hook.js +26 -26
  32. package/dist/bin/pushary-session-start-hook.js +34 -34
  33. package/dist/bin/pushary-setup.js +46 -46
  34. package/dist/bin/pushary-stats.js +5 -5
  35. package/dist/bin/pushary-status.js +31 -31
  36. package/dist/bin/pushary-stop-hook.js +24 -24
  37. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  38. package/dist/bin/pushary-suggestions.js +15 -15
  39. package/dist/bin/pushary-transcript-register.js +46 -18
  40. package/dist/bin/pushary-transcripts.js +19 -19
  41. package/dist/bin/pushary-upgrade.js +39 -39
  42. package/dist/bin/pushary-wait.js +15 -15
  43. package/dist/bin/pushary.js +7 -7
  44. package/dist/{chunk-2QFYEB3P.js → chunk-2IOQHB3C.js} +5 -5
  45. package/dist/{chunk-R3HXGHRQ.js → chunk-2OWG667E.js} +1 -1
  46. package/dist/{chunk-NJTAUEW6.js → chunk-2YRNRYZW.js} +1 -1
  47. package/dist/{chunk-C2AR7QXU.js → chunk-3UYMJZXV.js} +2 -2
  48. package/dist/{chunk-B2PFCS72.js → chunk-4ZXFOT44.js} +2 -2
  49. package/dist/{chunk-47TIRGS5.js → chunk-6WOG2SCC.js} +1 -0
  50. package/dist/{chunk-GJVV2EUC.js → chunk-6XOEYBWJ.js} +3 -3
  51. package/dist/{chunk-KWGOKO4E.js → chunk-7AQEWD2J.js} +3 -3
  52. package/dist/{chunk-FAGQAR6I.js → chunk-7CU7OGWP.js} +263 -5
  53. package/dist/{chunk-GII565PB.js → chunk-7HYNAA6B.js} +1 -1
  54. package/dist/{chunk-MTRZQR2R.js → chunk-A3BF7SGM.js} +3 -3
  55. package/dist/{chunk-T2EJ3H6Y.js → chunk-ABAWD6QM.js} +3 -3
  56. package/dist/{chunk-TFYFQM5C.js → chunk-BUBC4R5J.js} +2 -2
  57. package/dist/{chunk-5M5F4IWR.js → chunk-CIMFZIGP.js} +1 -1
  58. package/dist/{chunk-E7U4YM4A.js → chunk-CKUFXQUJ.js} +3 -3
  59. package/dist/{chunk-DZF2M3LM.js → chunk-CS5PJXL7.js} +6 -6
  60. package/dist/{chunk-57MQNSM5.js → chunk-CU65AFT4.js} +1 -1
  61. package/dist/{chunk-CMNB4IZO.js → chunk-D5NLXF72.js} +3 -3
  62. package/dist/{chunk-7LLC4R66.js → chunk-DYDA77FS.js} +4 -4
  63. package/dist/{chunk-5FV472Q2.js → chunk-EFHCTIFT.js} +1 -1
  64. package/dist/{chunk-7ZOWQBHQ.js → chunk-ESHMWZXX.js} +5 -5
  65. package/dist/{chunk-YLB4AGZJ.js → chunk-EV47UGDK.js} +1 -1
  66. package/dist/{chunk-CHIOUBPB.js → chunk-FBLVK2WR.js} +13 -13
  67. package/dist/{chunk-XLGD5LDG.js → chunk-FXQCSU4L.js} +3 -3
  68. package/dist/{chunk-4LX5QUFV.js → chunk-GI3PX2JU.js} +1 -1
  69. package/dist/{chunk-MMVIKXCP.js → chunk-GL34UITI.js} +3 -3
  70. package/dist/{chunk-VELPOV2F.js → chunk-GOJO2OLP.js} +4 -4
  71. package/dist/{chunk-JNV5LOZH.js → chunk-GV7FB5L3.js} +4 -4
  72. package/dist/{chunk-3YU6NIIL.js → chunk-H4GOJIOK.js} +4 -4
  73. package/dist/{chunk-NFUV25JZ.js → chunk-HGVUTO67.js} +3 -3
  74. package/dist/{chunk-M7JFGDGP.js → chunk-IHT33GZN.js} +1 -1
  75. package/dist/{chunk-Y4OBAK4I.js → chunk-INBG473K.js} +4 -2
  76. package/dist/{chunk-QUGP76DQ.js → chunk-J2NPFRDI.js} +6 -6
  77. package/dist/{chunk-DB3NOEDW.js → chunk-JJPBWBAF.js} +6 -6
  78. package/dist/{chunk-S7C5NY4R.js → chunk-JLYVYHD2.js} +1 -1
  79. package/dist/{chunk-5NW7VM35.js → chunk-K2MW33DG.js} +2 -2
  80. package/dist/{chunk-NVLKH5FS.js → chunk-KUI2KGRZ.js} +9 -9
  81. package/dist/{chunk-BUR2LYQI.js → chunk-LD5LSJ2B.js} +2 -2
  82. package/dist/{chunk-UEY4SHY2.js → chunk-LIEPMKTX.js} +1 -1
  83. package/dist/{chunk-YDPGBBV7.js → chunk-MQBQRXTN.js} +5 -5
  84. package/dist/{chunk-M5VJ3HXB.js → chunk-MRTGCXG4.js} +6 -6
  85. package/dist/{chunk-IRLHN5UP.js → chunk-NHIEDRZR.js} +2 -2
  86. package/dist/{chunk-E2VJ7B7D.js → chunk-NNV2XS3Y.js} +6 -6
  87. package/dist/{chunk-NQA56AMZ.js → chunk-OJ4EEE2B.js} +6 -6
  88. package/dist/{chunk-VZSSL6US.js → chunk-OXA2P5NJ.js} +10 -10
  89. package/dist/{chunk-CUD6SYDG.js → chunk-P4IFREOO.js} +1 -1
  90. package/dist/{chunk-W5AUTVVL.js → chunk-P7CGVHH5.js} +5 -5
  91. package/dist/{chunk-7SFP6Y5U.js → chunk-PAPUUZOP.js} +603 -162
  92. package/dist/{chunk-F7R7M5MG.js → chunk-PGZFXNRJ.js} +1 -1
  93. package/dist/{chunk-WLHHDDVA.js → chunk-PKHNZTHY.js} +3 -3
  94. package/dist/{chunk-PPD64MZW.js → chunk-PUF3BL6C.js} +1 -1
  95. package/dist/{chunk-JZ5KV2FK.js → chunk-PZWC3JXW.js} +5 -5
  96. package/dist/{chunk-7KYQ24FI.js → chunk-PZXQUV3P.js} +4 -4
  97. package/dist/{chunk-SWRNJ3BP.js → chunk-QBCV27CM.js} +3 -3
  98. package/dist/{chunk-Y2CYSVWU.js → chunk-QGOY3HNV.js} +6 -6
  99. package/dist/{chunk-IRN6JLSM.js → chunk-QS2IKPQW.js} +4 -4
  100. package/dist/{chunk-2BK2EQOB.js → chunk-QVP6F6BX.js} +7 -7
  101. package/dist/{chunk-XJ5DYPTM.js → chunk-RYDT6Y32.js} +4 -4
  102. package/dist/{chunk-5KPMDLXB.js → chunk-S2UHLCF5.js} +3 -3
  103. package/dist/{chunk-UMBVIFP5.js → chunk-SNHAXVCJ.js} +1 -1
  104. package/dist/{chunk-MAWC4PJV.js → chunk-SUOW4HJB.js} +5 -5
  105. package/dist/{chunk-KGWLDNNT.js → chunk-TK3XMPG2.js} +4 -4
  106. package/dist/{chunk-WK2L3XVQ.js → chunk-UBQ3TG3B.js} +1 -1
  107. package/dist/{chunk-USZJJWZL.js → chunk-UU2CQFSJ.js} +2 -2
  108. package/dist/{chunk-WRCM4XGY.js → chunk-UUX6Q3CB.js} +2 -2
  109. package/dist/{chunk-ITLWEGLE.js → chunk-WFSE7NRM.js} +15 -5
  110. package/dist/{chunk-ZY25SNFQ.js → chunk-XYNQA6YC.js} +1 -1
  111. package/dist/{chunk-74ONBRPF.js → chunk-Y5YJLBML.js} +4 -4
  112. package/dist/{chunk-USMUW3LI.js → chunk-ZZFYV26G.js} +2 -2
  113. package/dist/{codex-app-cards-switch-3OUTABVU.js → codex-app-cards-switch-LTZCEFYB.js} +11 -11
  114. package/dist/{codex-desktop-launch-JH3E2CIA.js → codex-desktop-launch-DBJBV66U.js} +1 -1
  115. package/dist/{codex-session-launch-GR363OQN.js → codex-session-launch-6RTU73OP.js} +18 -18
  116. package/dist/{config-R43UFHX7.js → config-YREUMA6Z.js} +3 -3
  117. package/dist/{global-upgrade-73GP4MZM.js → global-upgrade-EYLSJXXN.js} +10 -10
  118. package/dist/{identity-CA7CZGDL.js → identity-WIM6NVLP.js} +4 -4
  119. package/dist/{live-capabilities-RCGMQIIZ.js → live-capabilities-SU3BEP2Z.js} +5 -5
  120. package/dist/{paths-H7VNNB46.js → paths-XV3FXWOM.js} +3 -3
  121. package/dist/{reapply-3UIA3CUO.js → reapply-Q7QC3MWL.js} +27 -27
  122. package/dist/src/index.js +28 -28
  123. package/dist/{upgrade-lock-ZTLX5PDF.js → upgrade-lock-A2ALHHUG.js} +4 -4
  124. package/dist/{usage-C53NVWC2.js → usage-UNEATRXG.js} +3 -3
  125. package/package.json +1 -1
@@ -8,8 +8,8 @@ import "../chunk-MLKGABMK.js";
8
8
  var args = process.argv.slice(2);
9
9
  if (args[0] === "codex") args.shift();
10
10
  var appBehindTheProxy = args[0] === "--desktop-proxy" && args[2] === "--" ? args[1] : void 0;
11
- if (args[0] !== "--desktop-proxy") (await import("../usage-C53NVWC2.js")).exitOnHelpFlag("codex");
12
- var loadWhatReadsTheAccount = () => Promise.all([import("../config-R43UFHX7.js"), import("../identity-CA7CZGDL.js")]);
11
+ if (args[0] !== "--desktop-proxy") (await import("../usage-UNEATRXG.js")).exitOnHelpFlag("codex");
12
+ var loadWhatReadsTheAccount = () => Promise.all([import("../config-YREUMA6Z.js"), import("../identity-WIM6NVLP.js")]);
13
13
  var loadedWhenThePassThroughStarted = appBehindTheProxy === void 0 ? null : loadWhatReadsTheAccount().catch(() => null);
14
14
  var desktopAccount = async () => {
15
15
  try {
@@ -19,7 +19,7 @@ var desktopAccount = async () => {
19
19
  return null;
20
20
  }
21
21
  };
22
- var desktopLaunch = await import("../codex-desktop-launch-JH3E2CIA.js").catch(() => null);
22
+ var desktopLaunch = await import("../codex-desktop-launch-DBJBV66U.js").catch(() => null);
23
23
  if (desktopLaunch === null && appBehindTheProxy !== void 0) {
24
24
  process.exitCode = await letCodexRunWithoutPushary(appBehindTheProxy, args.slice(3));
25
25
  } else {
@@ -27,15 +27,15 @@ if (desktopLaunch === null && appBehindTheProxy !== void 0) {
27
27
  const stop = () => abort.abort();
28
28
  if (!args[0]?.startsWith("--desktop")) for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, stop);
29
29
  try {
30
- const { codexDesktopCommand } = desktopLaunch ?? await import("../codex-desktop-launch-JH3E2CIA.js");
30
+ const { codexDesktopCommand } = desktopLaunch ?? await import("../codex-desktop-launch-DBJBV66U.js");
31
31
  const desktop = await codexDesktopCommand(args, [process.execPath, ...process.execArgv, process.argv[1], "codex"], desktopAccount);
32
32
  if (desktop !== null) process.exitCode = desktop;
33
33
  else {
34
34
  const [{ getApiKey, getBaseUrl }, { getMachineId }, { resolveProviderBinary }, { codexSessionDirectory, launchCodexSession }] = await Promise.all([
35
- import("../config-R43UFHX7.js"),
36
- import("../identity-CA7CZGDL.js"),
37
- import("../live-capabilities-RCGMQIIZ.js"),
38
- import("../codex-session-launch-GR363OQN.js")
35
+ import("../config-YREUMA6Z.js"),
36
+ import("../identity-WIM6NVLP.js"),
37
+ import("../live-capabilities-SU3BEP2Z.js"),
38
+ import("../codex-session-launch-6RTU73OP.js")
39
39
  ]);
40
40
  const binary = resolveProviderBinary("codex");
41
41
  if (!binary) throw new Error("Install Codex first, then run pushary codex");
@@ -1,33 +1,33 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reportEvent
4
- } from "../chunk-NVLKH5FS.js";
5
- import "../chunk-ZY25SNFQ.js";
4
+ } from "../chunk-KUI2KGRZ.js";
5
+ import "../chunk-XYNQA6YC.js";
6
6
  import {
7
7
  askUser,
8
8
  isDecisionStopped,
9
9
  waitForAnswer
10
- } from "../chunk-7ZOWQBHQ.js";
10
+ } from "../chunk-ESHMWZXX.js";
11
11
  import "../chunk-POFBE6ZY.js";
12
- import "../chunk-JNV5LOZH.js";
13
- import "../chunk-E7U4YM4A.js";
14
- import "../chunk-KWGOKO4E.js";
12
+ import "../chunk-GV7FB5L3.js";
13
+ import "../chunk-CKUFXQUJ.js";
14
+ import "../chunk-7AQEWD2J.js";
15
15
  import {
16
16
  getMachineId
17
- } from "../chunk-BUR2LYQI.js";
18
- import "../chunk-5NW7VM35.js";
19
- import "../chunk-7KYQ24FI.js";
20
- import "../chunk-T2EJ3H6Y.js";
17
+ } from "../chunk-LD5LSJ2B.js";
18
+ import "../chunk-K2MW33DG.js";
19
+ import "../chunk-PZXQUV3P.js";
20
+ import "../chunk-ABAWD6QM.js";
21
21
  import {
22
22
  getApiKey
23
- } from "../chunk-M7JFGDGP.js";
23
+ } from "../chunk-IHT33GZN.js";
24
24
  import "../chunk-PPY5N2E6.js";
25
25
  import "../chunk-KZERVKTD.js";
26
26
  import {
27
27
  NPX_LATEST_COMMAND
28
- } from "../chunk-R3HXGHRQ.js";
28
+ } from "../chunk-2OWG667E.js";
29
29
  import "../chunk-QTOLNRET.js";
30
- import "../chunk-Y4OBAK4I.js";
30
+ import "../chunk-INBG473K.js";
31
31
  import "../chunk-MLKGABMK.js";
32
32
 
33
33
  // bin/pushary-codex.ts
@@ -1,53 +1,53 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  printKeyCheck
4
- } from "../chunk-DZF2M3LM.js";
4
+ } from "../chunk-CS5PJXL7.js";
5
5
  import {
6
6
  connectDevice,
7
7
  connectExistingApp,
8
8
  printConnectInstructions
9
- } from "../chunk-XJ5DYPTM.js";
9
+ } from "../chunk-RYDT6Y32.js";
10
10
  import "../chunk-3EGEA4KH.js";
11
- import "../chunk-Y2CYSVWU.js";
12
- import "../chunk-B2PFCS72.js";
11
+ import "../chunk-QGOY3HNV.js";
12
+ import "../chunk-4ZXFOT44.js";
13
13
  import {
14
14
  CONNECTED_THROUGH_MAC_APP,
15
15
  PAIR_FROM_MAC_APP,
16
16
  readMacAppConnection
17
- } from "../chunk-YDPGBBV7.js";
18
- import "../chunk-USMUW3LI.js";
17
+ } from "../chunk-MQBQRXTN.js";
18
+ import "../chunk-ZZFYV26G.js";
19
19
  import "../chunk-QCGNGEGE.js";
20
- import "../chunk-QUGP76DQ.js";
20
+ import "../chunk-J2NPFRDI.js";
21
21
  import {
22
22
  createIo
23
23
  } from "../chunk-FO3MDD26.js";
24
24
  import {
25
25
  exitOnHelpFlag
26
- } from "../chunk-WK2L3XVQ.js";
27
- import "../chunk-3YU6NIIL.js";
28
- import "../chunk-KGWLDNNT.js";
29
- import "../chunk-PPD64MZW.js";
30
- import "../chunk-5FV472Q2.js";
26
+ } from "../chunk-UBQ3TG3B.js";
27
+ import "../chunk-H4GOJIOK.js";
28
+ import "../chunk-TK3XMPG2.js";
29
+ import "../chunk-PUF3BL6C.js";
30
+ import "../chunk-EFHCTIFT.js";
31
31
  import {
32
32
  parseFlags
33
33
  } from "../chunk-NMUI3ZWG.js";
34
34
  import {
35
35
  readKeySource
36
- } from "../chunk-7LLC4R66.js";
37
- import "../chunk-NVLKH5FS.js";
38
- import "../chunk-ZY25SNFQ.js";
39
- import "../chunk-7ZOWQBHQ.js";
36
+ } from "../chunk-DYDA77FS.js";
37
+ import "../chunk-KUI2KGRZ.js";
38
+ import "../chunk-XYNQA6YC.js";
39
+ import "../chunk-ESHMWZXX.js";
40
40
  import "../chunk-POFBE6ZY.js";
41
- import "../chunk-JNV5LOZH.js";
41
+ import "../chunk-GV7FB5L3.js";
42
42
  import {
43
43
  checkApiKey
44
- } from "../chunk-E7U4YM4A.js";
45
- import "../chunk-KWGOKO4E.js";
46
- import "../chunk-BUR2LYQI.js";
47
- import "../chunk-5NW7VM35.js";
48
- import "../chunk-7KYQ24FI.js";
49
- import "../chunk-T2EJ3H6Y.js";
50
- import "../chunk-M7JFGDGP.js";
44
+ } from "../chunk-CKUFXQUJ.js";
45
+ import "../chunk-7AQEWD2J.js";
46
+ import "../chunk-LD5LSJ2B.js";
47
+ import "../chunk-K2MW33DG.js";
48
+ import "../chunk-PZXQUV3P.js";
49
+ import "../chunk-ABAWD6QM.js";
50
+ import "../chunk-IHT33GZN.js";
51
51
  import {
52
52
  UsageError
53
53
  } from "../chunk-PPY5N2E6.js";
@@ -56,9 +56,9 @@ import {
56
56
  } from "../chunk-KZERVKTD.js";
57
57
  import {
58
58
  isInvocationOf
59
- } from "../chunk-R3HXGHRQ.js";
59
+ } from "../chunk-2OWG667E.js";
60
60
  import "../chunk-QTOLNRET.js";
61
- import "../chunk-Y4OBAK4I.js";
61
+ import "../chunk-INBG473K.js";
62
62
  import "../chunk-MLKGABMK.js";
63
63
 
64
64
  // bin/pushary-connect.ts
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  coworkOutput,
4
4
  parseCoworkOptions
5
- } from "../chunk-MTRZQR2R.js";
5
+ } from "../chunk-A3BF7SGM.js";
6
6
  import {
7
7
  canOpenBrowser,
8
8
  openInBrowser
9
9
  } from "../chunk-PUZZELE6.js";
10
10
  import {
11
11
  exitOnHelpFlag
12
- } from "../chunk-WK2L3XVQ.js";
13
- import "../chunk-PPD64MZW.js";
12
+ } from "../chunk-UBQ3TG3B.js";
13
+ import "../chunk-PUF3BL6C.js";
14
14
  import "../chunk-NMUI3ZWG.js";
15
15
  import {
16
16
  UsageError
@@ -18,11 +18,11 @@ import {
18
18
  import {
19
19
  EXIT
20
20
  } from "../chunk-KZERVKTD.js";
21
- import "../chunk-R3HXGHRQ.js";
21
+ import "../chunk-2OWG667E.js";
22
22
  import "../chunk-QTOLNRET.js";
23
23
  import {
24
24
  CLAUDE_CONNECTOR_GUIDE
25
- } from "../chunk-Y4OBAK4I.js";
25
+ } from "../chunk-INBG473K.js";
26
26
  import "../chunk-MLKGABMK.js";
27
27
 
28
28
  // bin/pushary-cowork.ts
@@ -1,30 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  inspectConfiguredManagedProviders
4
- } from "../chunk-VZSSL6US.js";
4
+ } from "../chunk-OXA2P5NJ.js";
5
5
  import {
6
6
  HEARTBEAT_INTERVAL_MS,
7
7
  sendHeartbeat
8
- } from "../chunk-2QFYEB3P.js";
9
- import "../chunk-USZJJWZL.js";
8
+ } from "../chunk-2IOQHB3C.js";
9
+ import "../chunk-UU2CQFSJ.js";
10
10
  import {
11
11
  readSignedOutDiagnosis
12
- } from "../chunk-B2PFCS72.js";
12
+ } from "../chunk-4ZXFOT44.js";
13
13
  import {
14
14
  HERMES_INSTALL_MARKER_FILE,
15
15
  defaultHermesHome,
16
16
  parseHermesInstallMarker
17
- } from "../chunk-FAGQAR6I.js";
17
+ } from "../chunk-7CU7OGWP.js";
18
18
  import {
19
19
  writeHuman
20
20
  } from "../chunk-QCGNGEGE.js";
21
- import "../chunk-W5AUTVVL.js";
22
- import "../chunk-SWRNJ3BP.js";
23
- import "../chunk-C2AR7QXU.js";
24
- import "../chunk-QUGP76DQ.js";
21
+ import "../chunk-P7CGVHH5.js";
22
+ import "../chunk-QBCV27CM.js";
23
+ import "../chunk-3UYMJZXV.js";
24
+ import "../chunk-J2NPFRDI.js";
25
25
  import {
26
26
  exitOnHelpFlag
27
- } from "../chunk-WK2L3XVQ.js";
27
+ } from "../chunk-UBQ3TG3B.js";
28
28
  import {
29
29
  codexBinaryIsBroken,
30
30
  detectProviderLiveCapabilities,
@@ -33,8 +33,8 @@ import {
33
33
  launchableProviders,
34
34
  resolveControlPolicy,
35
35
  trackProviderInventory
36
- } from "../chunk-74ONBRPF.js";
37
- import "../chunk-NFUV25JZ.js";
36
+ } from "../chunk-Y5YJLBML.js";
37
+ import "../chunk-HGVUTO67.js";
38
38
  import {
39
39
  SESSION_REAP_SILENCE_MS,
40
40
  describeIdleWindow,
@@ -42,17 +42,17 @@ import {
42
42
  listProcessProofs,
43
43
  ownsLiveProcess,
44
44
  silentSpawnedProofs
45
- } from "../chunk-XLGD5LDG.js";
46
- import "../chunk-UMBVIFP5.js";
45
+ } from "../chunk-FXQCSU4L.js";
46
+ import "../chunk-SNHAXVCJ.js";
47
47
  import {
48
48
  readLocalAutoUpdateReport
49
- } from "../chunk-CMNB4IZO.js";
49
+ } from "../chunk-D5NLXF72.js";
50
50
  import {
51
51
  startRegisteredTranscripts
52
- } from "../chunk-7SFP6Y5U.js";
53
- import "../chunk-YLB4AGZJ.js";
52
+ } from "../chunk-PAPUUZOP.js";
53
+ import "../chunk-EV47UGDK.js";
54
54
  import "../chunk-MHUKYYYR.js";
55
- import "../chunk-3YU6NIIL.js";
55
+ import "../chunk-H4GOJIOK.js";
56
56
  import {
57
57
  DAEMON_LEASE_RENEW_INTERVAL_MS,
58
58
  acquireDaemonLease,
@@ -69,53 +69,53 @@ import {
69
69
  requestDaemonHandoff,
70
70
  stopDaemonRunning,
71
71
  writeDaemonNeedsLogin
72
- } from "../chunk-DB3NOEDW.js";
72
+ } from "../chunk-JJPBWBAF.js";
73
73
  import {
74
74
  hookOwnerOf
75
- } from "../chunk-KGWLDNNT.js";
76
- import "../chunk-PPD64MZW.js";
77
- import "../chunk-5FV472Q2.js";
75
+ } from "../chunk-TK3XMPG2.js";
76
+ import "../chunk-PUF3BL6C.js";
77
+ import "../chunk-EFHCTIFT.js";
78
78
  import "../chunk-NMUI3ZWG.js";
79
- import "../chunk-ITLWEGLE.js";
79
+ import "../chunk-WFSE7NRM.js";
80
80
  import "../chunk-XMSDA5WA.js";
81
- import "../chunk-5M5F4IWR.js";
81
+ import "../chunk-CIMFZIGP.js";
82
82
  import {
83
83
  spawnClaude
84
84
  } from "../chunk-XHKBHWLX.js";
85
85
  import {
86
86
  readControlMode
87
- } from "../chunk-7LLC4R66.js";
87
+ } from "../chunk-DYDA77FS.js";
88
88
  import {
89
89
  pendingCommandReceipts,
90
90
  removePendingCommand
91
- } from "../chunk-NVLKH5FS.js";
92
- import "../chunk-ZY25SNFQ.js";
93
- import "../chunk-7ZOWQBHQ.js";
91
+ } from "../chunk-KUI2KGRZ.js";
92
+ import "../chunk-XYNQA6YC.js";
93
+ import "../chunk-ESHMWZXX.js";
94
94
  import "../chunk-POFBE6ZY.js";
95
- import "../chunk-JNV5LOZH.js";
96
- import "../chunk-E7U4YM4A.js";
97
- import "../chunk-KWGOKO4E.js";
95
+ import "../chunk-GV7FB5L3.js";
96
+ import "../chunk-CKUFXQUJ.js";
97
+ import "../chunk-7AQEWD2J.js";
98
98
  import {
99
99
  getMachineId
100
- } from "../chunk-BUR2LYQI.js";
101
- import "../chunk-5NW7VM35.js";
100
+ } from "../chunk-LD5LSJ2B.js";
101
+ import "../chunk-K2MW33DG.js";
102
102
  import {
103
103
  claudeConfigDir,
104
104
  codexHome
105
- } from "../chunk-7KYQ24FI.js";
105
+ } from "../chunk-PZXQUV3P.js";
106
106
  import {
107
107
  resolveBinary,
108
108
  writeJsonAtomicDurable
109
- } from "../chunk-T2EJ3H6Y.js";
109
+ } from "../chunk-ABAWD6QM.js";
110
110
  import {
111
111
  getApiKey,
112
112
  getBaseUrl
113
- } from "../chunk-M7JFGDGP.js";
113
+ } from "../chunk-IHT33GZN.js";
114
114
  import "../chunk-PPY5N2E6.js";
115
115
  import {
116
116
  EXIT
117
117
  } from "../chunk-KZERVKTD.js";
118
- import "../chunk-R3HXGHRQ.js";
118
+ import "../chunk-2OWG667E.js";
119
119
  import "../chunk-QTOLNRET.js";
120
120
  import {
121
121
  CLAUDE_INBOX,
@@ -145,13 +145,14 @@ import {
145
145
  parseHermesAdmission,
146
146
  parseHermesReplayCursor,
147
147
  qualifyHermesReceiptMode
148
- } from "../chunk-Y4OBAK4I.js";
148
+ } from "../chunk-INBG473K.js";
149
149
  import "../chunk-MLKGABMK.js";
150
150
 
151
151
  // src/native-host-receiver.ts
152
152
  import { join as join2 } from "path";
153
153
  import { homedir } from "os";
154
154
  import { readFileSync as readFileSync3 } from "fs";
155
+ import { createHash as createHash2 } from "crypto";
155
156
 
156
157
  // src/native-host.ts
157
158
  import WebSocket from "ws";
@@ -525,7 +526,7 @@ var NativeHostClient = class {
525
526
  if (!node.isFile() || node.uid !== process.getuid?.() || node.size > 4096 || (node.mode & 63) !== 0)
526
527
  throw new Error("unsafe intent");
527
528
  const v = JSON.parse(readFileSync(file, "utf8"));
528
- if (!nativeRecord(v) || v.version !== NATIVE_INPUT.journalVersion || v.agent !== this.options.agent || v.sessionId !== sessionId || v.commandId !== commandId || v.home !== resolve(this.options.home) || typeof v.submittedAtMs !== "number" || !Number.isSafeInteger(v.submittedAtMs) || typeof v.accepted !== "boolean" || v.hermesCursor !== void 0 && !parseHermesReplayCursor(v.hermesCursor))
529
+ if (!nativeRecord(v) || v.version !== NATIVE_INPUT.journalVersion || v.agent !== this.options.agent || v.sessionId !== sessionId || v.commandId !== commandId || v.home !== resolve(this.options.home) || typeof v.submittedAtMs !== "number" || !Number.isSafeInteger(v.submittedAtMs) || typeof v.accepted !== "boolean" || v.settlementScope !== void 0 && typeof v.settlementScope !== "string" || v.hermesCursor !== void 0 && !parseHermesReplayCursor(v.hermesCursor))
529
530
  throw new Error("invalid intent");
530
531
  const hermesCursor = parseHermesReplayCursor(v.hermesCursor);
531
532
  return {
@@ -537,6 +538,7 @@ var NativeHostClient = class {
537
538
  submittedAtMs: v.submittedAtMs,
538
539
  accepted: v.accepted,
539
540
  settled: v.settled === true,
541
+ settlementScope: v.settlementScope,
540
542
  ...hermesCursor ? { hermesCursor } : {}
541
543
  };
542
544
  } catch (e) {
@@ -554,7 +556,7 @@ var NativeHostClient = class {
554
556
  if (!nativeRecord(raw) || !nativeIdentifier(raw.sessionId) || !nativeIdentifier(raw.commandId))
555
557
  return [];
556
558
  const intent = this.readIntent(raw.sessionId, raw.commandId);
557
- return intent?.accepted && !intent.settled ? [{ sessionId: intent.sessionId, commandId: intent.commandId }] : [];
559
+ return intent?.accepted && !intent.settled && intent.settlementScope === this.options.settlementScope ? [{ sessionId: intent.sessionId, commandId: intent.commandId }] : [];
558
560
  } catch {
559
561
  return [];
560
562
  }
@@ -586,6 +588,7 @@ var NativeHostClient = class {
586
588
  home: resolve(this.options.home),
587
589
  submittedAtMs: Date.now(),
588
590
  accepted: false,
591
+ settlementScope: this.options.settlementScope,
589
592
  ...hermesCursor ? { hermesCursor } : {}
590
593
  })
591
594
  );
@@ -724,6 +727,7 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
724
727
  const baseUrl = options.baseUrl ?? getBaseUrl();
725
728
  const abort = new AbortController();
726
729
  const busy = /* @__PURE__ */ new Set();
730
+ const settling = /* @__PURE__ */ new Set();
727
731
  const heartbeats = /* @__PURE__ */ new Map();
728
732
  const settlements = /* @__PURE__ */ new Map();
729
733
  let scanning = false;
@@ -746,7 +750,8 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
746
750
  };
747
751
  const settle = async (commandId) => {
748
752
  const pending = settlements.get(commandId);
749
- if (!pending) return false;
753
+ if (!pending || settling.has(commandId) || settling.size >= CLAUDE_INBOX_RECEIVER.maxConcurrent) return false;
754
+ settling.add(commandId);
750
755
  try {
751
756
  const receipt = await post("/api/agent/command/ack", {
752
757
  ...pending,
@@ -755,7 +760,9 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
755
760
  });
756
761
  if (!isCommandAcknowledgementReceipt(receipt))
757
762
  throw new Error("native acknowledgement missing receipt");
758
- client.confirmSettlement(pending.sessionId, commandId);
763
+ const current = settlements.get(commandId);
764
+ if (current?.state !== pending.state || current.failureCode !== pending.failureCode || current.sessionId !== pending.sessionId) return false;
765
+ if (pending.state === "delivered") client.confirmSettlement(pending.sessionId, commandId);
759
766
  settlements.delete(commandId);
760
767
  return true;
761
768
  } catch (error) {
@@ -764,15 +771,13 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
764
771
  error instanceof Error ? error.message : "native receipt recovery failed"
765
772
  );
766
773
  return false;
774
+ } finally {
775
+ settling.delete(commandId);
767
776
  }
768
777
  };
769
778
  const receive = async (sessionId) => {
770
779
  busy.add(sessionId);
771
780
  try {
772
- if ([...settlements.values()].some(
773
- (receipt) => receipt.sessionId === sessionId
774
- ))
775
- return;
776
781
  const raw = await post("/api/agent/command/native", {
777
782
  operation: "claim" /* claim */,
778
783
  sessionId,
@@ -804,7 +809,13 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
804
809
  state: "delivered"
805
810
  });
806
811
  }
807
- for (const commandId of [...settlements.keys()]) await settle(commandId);
812
+ for (const [commandId, receipt] of [...settlements]) {
813
+ if (settling.size >= CLAUDE_INBOX_RECEIVER.maxConcurrent) break;
814
+ if (settling.has(commandId)) continue;
815
+ settlements.delete(commandId);
816
+ settlements.set(commandId, receipt);
817
+ void settle(commandId);
818
+ }
808
819
  const sessions = (await client.sessions()).filter(options.ownsSession).slice(0, CLAUDE_INBOX_MAX_SESSIONS);
809
820
  if (!sessions.length) return;
810
821
  for (const session of sessions) {
@@ -871,6 +882,8 @@ var ownsHermes = (home) => {
871
882
  }
872
883
  };
873
884
  var startNativeHostReceivers = (apiKey, machineId, report) => {
885
+ const baseUrl = getBaseUrl().replace(/\/+$/, "");
886
+ const settlementScope = createHash2("sha256").update(`${baseUrl}\0${apiKey}\0${machineId}`).digest("hex");
874
887
  const homes = {
875
888
  ["codex" /* codex */]: codexHome(),
876
889
  ["hermes" /* hermes */]: defaultHermesHome()
@@ -878,11 +891,13 @@ var startNativeHostReceivers = (apiKey, machineId, report) => {
878
891
  const stops = Object.values(NativeInputAgent).map((agent) => {
879
892
  const home = homes[agent];
880
893
  return startNativeInputReceiver(apiKey, machineId, {
894
+ baseUrl,
881
895
  client: new NativeHostClient({
882
896
  agent,
883
897
  home,
884
898
  report,
885
- journalDir: join2(homedir(), ".pushary", NATIVE_INPUT.journalDirectory)
899
+ journalDir: join2(homedir(), ".pushary", NATIVE_INPUT.journalDirectory),
900
+ settlementScope
886
901
  }),
887
902
  agentType: agent,
888
903
  agentName: agent === "codex" /* codex */ ? "Codex" : "Hermes",
@@ -928,15 +943,14 @@ import { join as join4, basename as basename2 } from "path";
928
943
  import { homedir as homedir2 } from "os";
929
944
 
930
945
  // src/claude-inbox.ts
931
- import { createHash as createHash2, randomUUID } from "crypto";
932
- import { execFileSync } from "child_process";
946
+ import { createHash as createHash3, randomUUID } from "crypto";
933
947
  import {
934
948
  closeSync as closeSync2,
935
949
  fsyncSync as fsyncSync2,
936
950
  lstatSync as lstatSync2,
937
951
  mkdirSync as mkdirSync2,
938
952
  openSync as openSync2,
939
- readFileSync as readFileSync4,
953
+ readFileSync as readFileSync5,
940
954
  readdirSync as readdirSync2,
941
955
  readSync,
942
956
  statSync,
@@ -946,21 +960,35 @@ import {
946
960
  import { dirname as dirname2, isAbsolute, join as join3, resolve as resolve2 } from "path";
947
961
  import { Socket } from "net";
948
962
  import { setTimeout as delay } from "timers/promises";
949
- var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
950
- var digest = (value) => createHash2("sha256").update(value).digest("hex");
951
- var readObject = (file) => {
952
- const stat = lstatSync2(file);
953
- if (!stat.isFile() || stat.size > CLAUDE_INBOX.maxRecordBytes || stat.uid !== process.getuid?.())
954
- throw new Error("Invalid inbox record");
955
- return JSON.parse(readFileSync4(file, "utf8"));
963
+
964
+ // src/claude-process-identity.ts
965
+ import { execFileSync } from "child_process";
966
+ import { readFileSync as readFileSync4, readlinkSync } from "fs";
967
+ var linuxProcessStart = (stat) => {
968
+ const closingName = stat.lastIndexOf(")");
969
+ if (closingName < 0) return null;
970
+ const fields = stat.slice(closingName + 1).trim().split(/\s+/);
971
+ if (!/^\d+ \(/.test(stat) || fields[0] === "Z" || fields[0] === "X") return null;
972
+ const ticks = fields[19];
973
+ return ticks && /^\d+$/.test(ticks) ? ticks : null;
956
974
  };
957
- var readKey = (file) => {
958
- const value = readObject(file);
959
- return object(value) && typeof value.peerToken === "string" && /^[0-9a-f]{32}$/.test(value.peerToken) && typeof value.procStart === "string" ? { peerToken: value.peerToken, procStart: value.procStart } : null;
975
+ var linuxProcessDomain = (machineId, namespace) => {
976
+ const machine = machineId.trim();
977
+ if (!/^[a-f0-9]{32}$/i.test(machine) || !/^pid:\[\d+\]$/.test(namespace)) return null;
978
+ return `linux:${machine}:${namespace}`;
979
+ };
980
+ var currentClaudeProcessDomain = () => {
981
+ if (process.platform !== "linux") return null;
982
+ try {
983
+ return linuxProcessDomain(readFileSync4("/etc/machine-id", "utf8"), readlinkSync("/proc/self/ns/pid"));
984
+ } catch {
985
+ return null;
986
+ }
960
987
  };
961
- var processStart = (pid) => {
962
- if (process.platform !== "darwin") return null;
988
+ var currentClaudeProcessStart = (pid) => {
963
989
  try {
990
+ if (process.platform === "linux") return linuxProcessStart(readFileSync4(`/proc/${pid}/stat`, "utf8"));
991
+ if (process.platform !== "darwin") return null;
964
992
  return execFileSync("/bin/ps", ["-p", String(pid), "-o", "lstart="], {
965
993
  encoding: "utf8",
966
994
  env: { ...process.env, TZ: "UTC", LC_ALL: "C" },
@@ -970,6 +998,25 @@ var processStart = (pid) => {
970
998
  return null;
971
999
  }
972
1000
  };
1001
+ var matchesClaudeProcess = (session, platform, processStart, pidDomain) => {
1002
+ if (!processStart || processStart !== session.procStart) return false;
1003
+ if (platform === "linux") return pidDomain !== null && pidDomain === session.pidDomain;
1004
+ return platform === "darwin";
1005
+ };
1006
+
1007
+ // src/claude-inbox.ts
1008
+ var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1009
+ var digest = (value) => createHash3("sha256").update(value).digest("hex");
1010
+ var readObject = (file) => {
1011
+ const stat = lstatSync2(file);
1012
+ if (!stat.isFile() || stat.size > CLAUDE_INBOX.maxRecordBytes || stat.uid !== process.getuid?.())
1013
+ throw new Error("Invalid inbox record");
1014
+ return JSON.parse(readFileSync5(file, "utf8"));
1015
+ };
1016
+ var readKey = (file) => {
1017
+ const value = readObject(file);
1018
+ return object(value) && typeof value.peerToken === "string" && /^[0-9a-f]{32}$/.test(value.peerToken) && typeof value.procStart === "string" ? { peerToken: value.peerToken, procStart: value.procStart } : null;
1019
+ };
973
1020
  var transcriptPath = (config, session) => join3(
974
1021
  config,
975
1022
  "projects",
@@ -1054,11 +1101,12 @@ var ClaudeInboxClient = class {
1054
1101
  return sessions.flatMap((file) => {
1055
1102
  try {
1056
1103
  const session = parseClaudeInboxSession(
1057
- readObject(join3(this.options.configDir, "sessions", file))
1104
+ readObject(join3(this.options.configDir, "sessions", file)),
1105
+ this.options.platform ?? process.platform
1058
1106
  );
1059
1107
  if (!session || file !== `${session.pid}.json` || !isAbsolute(session.cwd) || !isAbsolute(session.messagingSocketPath))
1060
1108
  return [];
1061
- if ((this.options.processStart ?? processStart)(session.pid) !== session.procStart)
1109
+ if (!this.processMatches(session))
1062
1110
  return [];
1063
1111
  const socket = lstatSync2(session.messagingSocketPath);
1064
1112
  if (!socket.isSocket() || socket.uid !== process.getuid?.()) return [];
@@ -1071,6 +1119,14 @@ var ClaudeInboxClient = class {
1071
1119
  return [];
1072
1120
  }
1073
1121
  }
1122
+ processMatches(session) {
1123
+ return matchesClaudeProcess(
1124
+ session,
1125
+ this.options.platform ?? process.platform,
1126
+ (this.options.processStart ?? currentClaudeProcessStart)(session.pid),
1127
+ (this.options.pidDomain ?? currentClaudeProcessDomain)()
1128
+ );
1129
+ }
1074
1130
  key(session) {
1075
1131
  const canonicalSocket = session.messagingSocketPath.replace(
1076
1132
  /^\/private(?=\/(?:tmp|var|etc)\/)/,
@@ -1135,7 +1191,7 @@ var ClaudeInboxClient = class {
1135
1191
  if (!key) return "wake_not_sent" /* notSent */;
1136
1192
  const socket = await connectInbox(session.messagingSocketPath);
1137
1193
  if (!socket) return "wake_not_sent" /* notSent */;
1138
- if (signal?.aborted || (this.options.processStart ?? processStart)(session.pid) !== session.procStart) {
1194
+ if (signal?.aborted || !this.processMatches(session)) {
1139
1195
  socket.destroy();
1140
1196
  return "wake_not_sent" /* notSent */;
1141
1197
  }