pushary 1.9.75 → 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 (126) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{api-L3BIISGS.js → api-IGMCPM35.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +26 -25
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +27 -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 +31 -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 +123 -66
  14. package/dist/bin/pushary-disconnect.js +25 -25
  15. package/dist/bin/pushary-display-hook.js +17 -16
  16. package/dist/bin/pushary-doctor.js +41 -41
  17. package/dist/bin/pushary-elicitation-hook.js +26 -25
  18. package/dist/bin/pushary-gemini-bridge.js +15 -15
  19. package/dist/bin/pushary-gemini-hook.js +28 -27
  20. package/dist/bin/pushary-hook.js +30 -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 +25 -24
  26. package/dist/bin/pushary-opencode-hook.js +27 -26
  27. package/dist/bin/pushary-permission-denied-hook.js +30 -29
  28. package/dist/bin/pushary-permission-hook.js +30 -29
  29. package/dist/bin/pushary-post-hook.js +25 -24
  30. package/dist/bin/pushary-prompt-hook.js +25 -24
  31. package/dist/bin/pushary-session-end-hook.js +27 -26
  32. package/dist/bin/pushary-session-start-hook.js +35 -34
  33. package/dist/bin/pushary-setup.js +50 -267
  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 +25 -24
  37. package/dist/bin/pushary-stopfailure-hook.js +25 -24
  38. package/dist/bin/pushary-suggestions.js +15 -15
  39. package/dist/bin/pushary-transcript-register.js +47 -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-JCZWWBBA.js → chunk-2IOQHB3C.js} +5 -5
  45. package/dist/{chunk-UIS332AZ.js → chunk-2OWG667E.js} +1 -1
  46. package/dist/{chunk-UEJTWQVF.js → chunk-2YRNRYZW.js} +1 -1
  47. package/dist/{chunk-UU3CDLIX.js → chunk-3UYMJZXV.js} +2 -2
  48. package/dist/{chunk-HXV2SY2V.js → chunk-4ZXFOT44.js} +2 -2
  49. package/dist/{chunk-L2FQBHIR.js → chunk-6WOG2SCC.js} +3 -2
  50. package/dist/{chunk-6BFLDHPM.js → chunk-6XOEYBWJ.js} +3 -3
  51. package/dist/{chunk-SOHJ37NA.js → chunk-7AQEWD2J.js} +3 -3
  52. package/dist/{chunk-VGHWK5Z2.js → chunk-7CU7OGWP.js} +263 -5
  53. package/dist/{chunk-GAAN3Y7V.js → chunk-7HYNAA6B.js} +1 -1
  54. package/dist/{chunk-EVBG5YUO.js → chunk-A3BF7SGM.js} +3 -3
  55. package/dist/{chunk-AUDYAVNM.js → chunk-ABAWD6QM.js} +3 -3
  56. package/dist/{chunk-Z7ORL6SC.js → chunk-BUBC4R5J.js} +2 -2
  57. package/dist/{chunk-RPKFXNOJ.js → chunk-CIMFZIGP.js} +2 -2
  58. package/dist/{chunk-SIJHPGUW.js → chunk-CKUFXQUJ.js} +3 -3
  59. package/dist/{chunk-P4TWTQ6V.js → chunk-CS5PJXL7.js} +6 -6
  60. package/dist/{chunk-LRYZXY4V.js → chunk-CU65AFT4.js} +1 -1
  61. package/dist/{chunk-M7BXAWUC.js → chunk-D5NLXF72.js} +3 -3
  62. package/dist/{chunk-LIDUPDEY.js → chunk-DYDA77FS.js} +4 -4
  63. package/dist/{chunk-4DH54LS7.js → chunk-EFHCTIFT.js} +1 -1
  64. package/dist/{chunk-EOGVWCLF.js → chunk-ESHMWZXX.js} +5 -5
  65. package/dist/{chunk-T6RWREWU.js → chunk-EV47UGDK.js} +1 -1
  66. package/dist/{chunk-UBANQ4EZ.js → chunk-FBLVK2WR.js} +13 -13
  67. package/dist/{chunk-FEC3JUIH.js → chunk-FXQCSU4L.js} +3 -3
  68. package/dist/{chunk-I73UQU7K.js → chunk-GI3PX2JU.js} +1 -1
  69. package/dist/{chunk-SFJOGZQV.js → chunk-GL34UITI.js} +3 -3
  70. package/dist/{chunk-4T25BBBO.js → chunk-GOJO2OLP.js} +4 -4
  71. package/dist/{chunk-32JJ5KV3.js → chunk-GV7FB5L3.js} +4 -4
  72. package/dist/{chunk-3SAF4QXU.js → chunk-H4GOJIOK.js} +4 -4
  73. package/dist/{chunk-QDUDXJAF.js → chunk-HGVUTO67.js} +3 -3
  74. package/dist/{chunk-53D6FFVE.js → chunk-IHT33GZN.js} +1 -1
  75. package/dist/{chunk-QRS7FQHE.js → chunk-INBG473K.js} +8 -2
  76. package/dist/{chunk-E5XYFIYL.js → chunk-J2NPFRDI.js} +6 -6
  77. package/dist/{chunk-DCHZ5JOI.js → chunk-JJPBWBAF.js} +6 -6
  78. package/dist/{chunk-DX65IDBI.js → chunk-JLYVYHD2.js} +1 -1
  79. package/dist/{chunk-DARPCQPY.js → chunk-K2MW33DG.js} +2 -2
  80. package/dist/{chunk-JFVLMWKY.js → chunk-KUI2KGRZ.js} +9 -9
  81. package/dist/{chunk-BGEUAJYL.js → chunk-LD5LSJ2B.js} +2 -2
  82. package/dist/{chunk-JOMG6J64.js → chunk-LIEPMKTX.js} +1 -1
  83. package/dist/chunk-MHUKYYYR.js +239 -0
  84. package/dist/{chunk-I6TIZMM3.js → chunk-MQBQRXTN.js} +5 -5
  85. package/dist/{chunk-DOG3BQFO.js → chunk-MRTGCXG4.js} +6 -6
  86. package/dist/{chunk-EH5OLIP2.js → chunk-NHIEDRZR.js} +236 -20
  87. package/dist/{chunk-PV5XEBFI.js → chunk-NNV2XS3Y.js} +6 -6
  88. package/dist/{chunk-WL3V2UV4.js → chunk-OJ4EEE2B.js} +6 -6
  89. package/dist/{chunk-D4X4BQVQ.js → chunk-OXA2P5NJ.js} +10 -10
  90. package/dist/{chunk-BRG4XS2H.js → chunk-P4IFREOO.js} +1 -1
  91. package/dist/{chunk-MD4UJICD.js → chunk-P7CGVHH5.js} +5 -5
  92. package/dist/{chunk-ZX3KEXO3.js → chunk-PAPUUZOP.js} +626 -164
  93. package/dist/{chunk-PGLNE556.js → chunk-PGZFXNRJ.js} +1 -1
  94. package/dist/{chunk-3PPL64AG.js → chunk-PKHNZTHY.js} +9 -4
  95. package/dist/{chunk-NCTABQMC.js → chunk-PUF3BL6C.js} +1 -1
  96. package/dist/{chunk-EM2RSWDA.js → chunk-PZWC3JXW.js} +5 -5
  97. package/dist/{chunk-2J4IVUEA.js → chunk-PZXQUV3P.js} +4 -4
  98. package/dist/{chunk-7O54GE5C.js → chunk-QBCV27CM.js} +3 -3
  99. package/dist/{chunk-SNUHX5GQ.js → chunk-QGOY3HNV.js} +6 -6
  100. package/dist/{chunk-7FNSQMQ2.js → chunk-QS2IKPQW.js} +4 -4
  101. package/dist/{chunk-CI6MDBQB.js → chunk-QVP6F6BX.js} +7 -7
  102. package/dist/{chunk-CLHRSK5L.js → chunk-RYDT6Y32.js} +4 -4
  103. package/dist/{chunk-HRRGIVIL.js → chunk-S2UHLCF5.js} +3 -3
  104. package/dist/{chunk-R7V6BPEV.js → chunk-SNHAXVCJ.js} +1 -1
  105. package/dist/{chunk-4GWKKUQ5.js → chunk-SUOW4HJB.js} +5 -5
  106. package/dist/{chunk-TPYZFYQ5.js → chunk-TK3XMPG2.js} +4 -4
  107. package/dist/{chunk-XO7LP3JC.js → chunk-UBQ3TG3B.js} +1 -1
  108. package/dist/{chunk-SHW6KK2K.js → chunk-UU2CQFSJ.js} +2 -2
  109. package/dist/{chunk-5EQOUZYE.js → chunk-UUX6Q3CB.js} +2 -2
  110. package/dist/{chunk-SONZCJY5.js → chunk-WFSE7NRM.js} +23 -6
  111. package/dist/{chunk-DUOBFECC.js → chunk-XYNQA6YC.js} +1 -1
  112. package/dist/{chunk-KDUWFGY2.js → chunk-Y5YJLBML.js} +4 -4
  113. package/dist/{chunk-2DB7TBA7.js → chunk-ZZFYV26G.js} +2 -2
  114. package/dist/{codex-app-cards-switch-CN3G7GZW.js → codex-app-cards-switch-LTZCEFYB.js} +11 -11
  115. package/dist/{codex-desktop-launch-GFZXCDSL.js → codex-desktop-launch-DBJBV66U.js} +1 -1
  116. package/dist/{codex-session-launch-4F2UGQYE.js → codex-session-launch-6RTU73OP.js} +18 -18
  117. package/dist/{config-BLHDUDCS.js → config-YREUMA6Z.js} +3 -3
  118. package/dist/{global-upgrade-IZEC22BQ.js → global-upgrade-EYLSJXXN.js} +10 -10
  119. package/dist/{identity-3HGTEP5Q.js → identity-WIM6NVLP.js} +4 -4
  120. package/dist/{live-capabilities-AZK664T7.js → live-capabilities-SU3BEP2Z.js} +5 -5
  121. package/dist/{paths-ROMZUSEX.js → paths-XV3FXWOM.js} +3 -3
  122. package/dist/{reapply-IJYRR4YK.js → reapply-Q7QC3MWL.js} +27 -27
  123. package/dist/src/index.js +29 -28
  124. package/dist/{upgrade-lock-FGEZPX56.js → upgrade-lock-A2ALHHUG.js} +4 -4
  125. package/dist/{usage-HCURE44F.js → usage-UNEATRXG.js} +3 -3
  126. 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-HCURE44F.js")).exitOnHelpFlag("codex");
12
- var loadWhatReadsTheAccount = () => Promise.all([import("../config-BLHDUDCS.js"), import("../identity-3HGTEP5Q.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-GFZXCDSL.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-GFZXCDSL.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-BLHDUDCS.js"),
36
- import("../identity-3HGTEP5Q.js"),
37
- import("../live-capabilities-AZK664T7.js"),
38
- import("../codex-session-launch-4F2UGQYE.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-JFVLMWKY.js";
5
- import "../chunk-DUOBFECC.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-EOGVWCLF.js";
10
+ } from "../chunk-ESHMWZXX.js";
11
11
  import "../chunk-POFBE6ZY.js";
12
- import "../chunk-32JJ5KV3.js";
13
- import "../chunk-SIJHPGUW.js";
14
- import "../chunk-SOHJ37NA.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-BGEUAJYL.js";
18
- import "../chunk-DARPCQPY.js";
19
- import "../chunk-2J4IVUEA.js";
20
- import "../chunk-AUDYAVNM.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-53D6FFVE.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-UIS332AZ.js";
28
+ } from "../chunk-2OWG667E.js";
29
29
  import "../chunk-QTOLNRET.js";
30
- import "../chunk-QRS7FQHE.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-P4TWTQ6V.js";
4
+ } from "../chunk-CS5PJXL7.js";
5
5
  import {
6
6
  connectDevice,
7
7
  connectExistingApp,
8
8
  printConnectInstructions
9
- } from "../chunk-CLHRSK5L.js";
9
+ } from "../chunk-RYDT6Y32.js";
10
10
  import "../chunk-3EGEA4KH.js";
11
- import "../chunk-SNUHX5GQ.js";
12
- import "../chunk-HXV2SY2V.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-I6TIZMM3.js";
18
- import "../chunk-2DB7TBA7.js";
17
+ } from "../chunk-MQBQRXTN.js";
18
+ import "../chunk-ZZFYV26G.js";
19
19
  import "../chunk-QCGNGEGE.js";
20
- import "../chunk-E5XYFIYL.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-XO7LP3JC.js";
27
- import "../chunk-3SAF4QXU.js";
28
- import "../chunk-TPYZFYQ5.js";
29
- import "../chunk-NCTABQMC.js";
30
- import "../chunk-4DH54LS7.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-LIDUPDEY.js";
37
- import "../chunk-JFVLMWKY.js";
38
- import "../chunk-DUOBFECC.js";
39
- import "../chunk-EOGVWCLF.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-32JJ5KV3.js";
41
+ import "../chunk-GV7FB5L3.js";
42
42
  import {
43
43
  checkApiKey
44
- } from "../chunk-SIJHPGUW.js";
45
- import "../chunk-SOHJ37NA.js";
46
- import "../chunk-BGEUAJYL.js";
47
- import "../chunk-DARPCQPY.js";
48
- import "../chunk-2J4IVUEA.js";
49
- import "../chunk-AUDYAVNM.js";
50
- import "../chunk-53D6FFVE.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-UIS332AZ.js";
59
+ } from "../chunk-2OWG667E.js";
60
60
  import "../chunk-QTOLNRET.js";
61
- import "../chunk-QRS7FQHE.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-EVBG5YUO.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-XO7LP3JC.js";
13
- import "../chunk-NCTABQMC.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-UIS332AZ.js";
21
+ import "../chunk-2OWG667E.js";
22
22
  import "../chunk-QTOLNRET.js";
23
23
  import {
24
24
  CLAUDE_CONNECTOR_GUIDE
25
- } from "../chunk-QRS7FQHE.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-D4X4BQVQ.js";
4
+ } from "../chunk-OXA2P5NJ.js";
5
5
  import {
6
6
  HEARTBEAT_INTERVAL_MS,
7
7
  sendHeartbeat
8
- } from "../chunk-JCZWWBBA.js";
9
- import "../chunk-SHW6KK2K.js";
8
+ } from "../chunk-2IOQHB3C.js";
9
+ import "../chunk-UU2CQFSJ.js";
10
10
  import {
11
11
  readSignedOutDiagnosis
12
- } from "../chunk-HXV2SY2V.js";
12
+ } from "../chunk-4ZXFOT44.js";
13
13
  import {
14
14
  HERMES_INSTALL_MARKER_FILE,
15
15
  defaultHermesHome,
16
16
  parseHermesInstallMarker
17
- } from "../chunk-VGHWK5Z2.js";
17
+ } from "../chunk-7CU7OGWP.js";
18
18
  import {
19
19
  writeHuman
20
20
  } from "../chunk-QCGNGEGE.js";
21
- import "../chunk-MD4UJICD.js";
22
- import "../chunk-7O54GE5C.js";
23
- import "../chunk-UU3CDLIX.js";
24
- import "../chunk-E5XYFIYL.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-XO7LP3JC.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-KDUWFGY2.js";
37
- import "../chunk-QDUDXJAF.js";
36
+ } from "../chunk-Y5YJLBML.js";
37
+ import "../chunk-HGVUTO67.js";
38
38
  import {
39
39
  SESSION_REAP_SILENCE_MS,
40
40
  describeIdleWindow,
@@ -42,16 +42,17 @@ import {
42
42
  listProcessProofs,
43
43
  ownsLiveProcess,
44
44
  silentSpawnedProofs
45
- } from "../chunk-FEC3JUIH.js";
46
- import "../chunk-R7V6BPEV.js";
45
+ } from "../chunk-FXQCSU4L.js";
46
+ import "../chunk-SNHAXVCJ.js";
47
47
  import {
48
48
  readLocalAutoUpdateReport
49
- } from "../chunk-M7BXAWUC.js";
49
+ } from "../chunk-D5NLXF72.js";
50
50
  import {
51
51
  startRegisteredTranscripts
52
- } from "../chunk-ZX3KEXO3.js";
53
- import "../chunk-T6RWREWU.js";
54
- import "../chunk-3SAF4QXU.js";
52
+ } from "../chunk-PAPUUZOP.js";
53
+ import "../chunk-EV47UGDK.js";
54
+ import "../chunk-MHUKYYYR.js";
55
+ import "../chunk-H4GOJIOK.js";
55
56
  import {
56
57
  DAEMON_LEASE_RENEW_INTERVAL_MS,
57
58
  acquireDaemonLease,
@@ -68,53 +69,53 @@ import {
68
69
  requestDaemonHandoff,
69
70
  stopDaemonRunning,
70
71
  writeDaemonNeedsLogin
71
- } from "../chunk-DCHZ5JOI.js";
72
+ } from "../chunk-JJPBWBAF.js";
72
73
  import {
73
74
  hookOwnerOf
74
- } from "../chunk-TPYZFYQ5.js";
75
- import "../chunk-NCTABQMC.js";
76
- import "../chunk-4DH54LS7.js";
75
+ } from "../chunk-TK3XMPG2.js";
76
+ import "../chunk-PUF3BL6C.js";
77
+ import "../chunk-EFHCTIFT.js";
77
78
  import "../chunk-NMUI3ZWG.js";
78
- import "../chunk-SONZCJY5.js";
79
+ import "../chunk-WFSE7NRM.js";
79
80
  import "../chunk-XMSDA5WA.js";
80
- import "../chunk-RPKFXNOJ.js";
81
+ import "../chunk-CIMFZIGP.js";
81
82
  import {
82
83
  spawnClaude
83
84
  } from "../chunk-XHKBHWLX.js";
84
85
  import {
85
86
  readControlMode
86
- } from "../chunk-LIDUPDEY.js";
87
+ } from "../chunk-DYDA77FS.js";
87
88
  import {
88
89
  pendingCommandReceipts,
89
90
  removePendingCommand
90
- } from "../chunk-JFVLMWKY.js";
91
- import "../chunk-DUOBFECC.js";
92
- import "../chunk-EOGVWCLF.js";
91
+ } from "../chunk-KUI2KGRZ.js";
92
+ import "../chunk-XYNQA6YC.js";
93
+ import "../chunk-ESHMWZXX.js";
93
94
  import "../chunk-POFBE6ZY.js";
94
- import "../chunk-32JJ5KV3.js";
95
- import "../chunk-SIJHPGUW.js";
96
- import "../chunk-SOHJ37NA.js";
95
+ import "../chunk-GV7FB5L3.js";
96
+ import "../chunk-CKUFXQUJ.js";
97
+ import "../chunk-7AQEWD2J.js";
97
98
  import {
98
99
  getMachineId
99
- } from "../chunk-BGEUAJYL.js";
100
- import "../chunk-DARPCQPY.js";
100
+ } from "../chunk-LD5LSJ2B.js";
101
+ import "../chunk-K2MW33DG.js";
101
102
  import {
102
103
  claudeConfigDir,
103
104
  codexHome
104
- } from "../chunk-2J4IVUEA.js";
105
+ } from "../chunk-PZXQUV3P.js";
105
106
  import {
106
107
  resolveBinary,
107
108
  writeJsonAtomicDurable
108
- } from "../chunk-AUDYAVNM.js";
109
+ } from "../chunk-ABAWD6QM.js";
109
110
  import {
110
111
  getApiKey,
111
112
  getBaseUrl
112
- } from "../chunk-53D6FFVE.js";
113
+ } from "../chunk-IHT33GZN.js";
113
114
  import "../chunk-PPY5N2E6.js";
114
115
  import {
115
116
  EXIT
116
117
  } from "../chunk-KZERVKTD.js";
117
- import "../chunk-UIS332AZ.js";
118
+ import "../chunk-2OWG667E.js";
118
119
  import "../chunk-QTOLNRET.js";
119
120
  import {
120
121
  CLAUDE_INBOX,
@@ -144,13 +145,14 @@ import {
144
145
  parseHermesAdmission,
145
146
  parseHermesReplayCursor,
146
147
  qualifyHermesReceiptMode
147
- } from "../chunk-QRS7FQHE.js";
148
+ } from "../chunk-INBG473K.js";
148
149
  import "../chunk-MLKGABMK.js";
149
150
 
150
151
  // src/native-host-receiver.ts
151
152
  import { join as join2 } from "path";
152
153
  import { homedir } from "os";
153
154
  import { readFileSync as readFileSync3 } from "fs";
155
+ import { createHash as createHash2 } from "crypto";
154
156
 
155
157
  // src/native-host.ts
156
158
  import WebSocket from "ws";
@@ -524,7 +526,7 @@ var NativeHostClient = class {
524
526
  if (!node.isFile() || node.uid !== process.getuid?.() || node.size > 4096 || (node.mode & 63) !== 0)
525
527
  throw new Error("unsafe intent");
526
528
  const v = JSON.parse(readFileSync(file, "utf8"));
527
- 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))
528
530
  throw new Error("invalid intent");
529
531
  const hermesCursor = parseHermesReplayCursor(v.hermesCursor);
530
532
  return {
@@ -536,6 +538,7 @@ var NativeHostClient = class {
536
538
  submittedAtMs: v.submittedAtMs,
537
539
  accepted: v.accepted,
538
540
  settled: v.settled === true,
541
+ settlementScope: v.settlementScope,
539
542
  ...hermesCursor ? { hermesCursor } : {}
540
543
  };
541
544
  } catch (e) {
@@ -553,7 +556,7 @@ var NativeHostClient = class {
553
556
  if (!nativeRecord(raw) || !nativeIdentifier(raw.sessionId) || !nativeIdentifier(raw.commandId))
554
557
  return [];
555
558
  const intent = this.readIntent(raw.sessionId, raw.commandId);
556
- 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 }] : [];
557
560
  } catch {
558
561
  return [];
559
562
  }
@@ -585,6 +588,7 @@ var NativeHostClient = class {
585
588
  home: resolve(this.options.home),
586
589
  submittedAtMs: Date.now(),
587
590
  accepted: false,
591
+ settlementScope: this.options.settlementScope,
588
592
  ...hermesCursor ? { hermesCursor } : {}
589
593
  })
590
594
  );
@@ -723,6 +727,7 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
723
727
  const baseUrl = options.baseUrl ?? getBaseUrl();
724
728
  const abort = new AbortController();
725
729
  const busy = /* @__PURE__ */ new Set();
730
+ const settling = /* @__PURE__ */ new Set();
726
731
  const heartbeats = /* @__PURE__ */ new Map();
727
732
  const settlements = /* @__PURE__ */ new Map();
728
733
  let scanning = false;
@@ -745,7 +750,8 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
745
750
  };
746
751
  const settle = async (commandId) => {
747
752
  const pending = settlements.get(commandId);
748
- if (!pending) return false;
753
+ if (!pending || settling.has(commandId) || settling.size >= CLAUDE_INBOX_RECEIVER.maxConcurrent) return false;
754
+ settling.add(commandId);
749
755
  try {
750
756
  const receipt = await post("/api/agent/command/ack", {
751
757
  ...pending,
@@ -754,7 +760,9 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
754
760
  });
755
761
  if (!isCommandAcknowledgementReceipt(receipt))
756
762
  throw new Error("native acknowledgement missing receipt");
757
- 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);
758
766
  settlements.delete(commandId);
759
767
  return true;
760
768
  } catch (error) {
@@ -763,15 +771,13 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
763
771
  error instanceof Error ? error.message : "native receipt recovery failed"
764
772
  );
765
773
  return false;
774
+ } finally {
775
+ settling.delete(commandId);
766
776
  }
767
777
  };
768
778
  const receive = async (sessionId) => {
769
779
  busy.add(sessionId);
770
780
  try {
771
- if ([...settlements.values()].some(
772
- (receipt) => receipt.sessionId === sessionId
773
- ))
774
- return;
775
781
  const raw = await post("/api/agent/command/native", {
776
782
  operation: "claim" /* claim */,
777
783
  sessionId,
@@ -803,7 +809,13 @@ var startNativeInputReceiver = (apiKey, machineId, options) => {
803
809
  state: "delivered"
804
810
  });
805
811
  }
806
- 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
+ }
807
819
  const sessions = (await client.sessions()).filter(options.ownsSession).slice(0, CLAUDE_INBOX_MAX_SESSIONS);
808
820
  if (!sessions.length) return;
809
821
  for (const session of sessions) {
@@ -870,6 +882,8 @@ var ownsHermes = (home) => {
870
882
  }
871
883
  };
872
884
  var startNativeHostReceivers = (apiKey, machineId, report) => {
885
+ const baseUrl = getBaseUrl().replace(/\/+$/, "");
886
+ const settlementScope = createHash2("sha256").update(`${baseUrl}\0${apiKey}\0${machineId}`).digest("hex");
873
887
  const homes = {
874
888
  ["codex" /* codex */]: codexHome(),
875
889
  ["hermes" /* hermes */]: defaultHermesHome()
@@ -877,11 +891,13 @@ var startNativeHostReceivers = (apiKey, machineId, report) => {
877
891
  const stops = Object.values(NativeInputAgent).map((agent) => {
878
892
  const home = homes[agent];
879
893
  return startNativeInputReceiver(apiKey, machineId, {
894
+ baseUrl,
880
895
  client: new NativeHostClient({
881
896
  agent,
882
897
  home,
883
898
  report,
884
- journalDir: join2(homedir(), ".pushary", NATIVE_INPUT.journalDirectory)
899
+ journalDir: join2(homedir(), ".pushary", NATIVE_INPUT.journalDirectory),
900
+ settlementScope
885
901
  }),
886
902
  agentType: agent,
887
903
  agentName: agent === "codex" /* codex */ ? "Codex" : "Hermes",
@@ -927,15 +943,14 @@ import { join as join4, basename as basename2 } from "path";
927
943
  import { homedir as homedir2 } from "os";
928
944
 
929
945
  // src/claude-inbox.ts
930
- import { createHash as createHash2, randomUUID } from "crypto";
931
- import { execFileSync } from "child_process";
946
+ import { createHash as createHash3, randomUUID } from "crypto";
932
947
  import {
933
948
  closeSync as closeSync2,
934
949
  fsyncSync as fsyncSync2,
935
950
  lstatSync as lstatSync2,
936
951
  mkdirSync as mkdirSync2,
937
952
  openSync as openSync2,
938
- readFileSync as readFileSync4,
953
+ readFileSync as readFileSync5,
939
954
  readdirSync as readdirSync2,
940
955
  readSync,
941
956
  statSync,
@@ -945,21 +960,35 @@ import {
945
960
  import { dirname as dirname2, isAbsolute, join as join3, resolve as resolve2 } from "path";
946
961
  import { Socket } from "net";
947
962
  import { setTimeout as delay } from "timers/promises";
948
- var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
949
- var digest = (value) => createHash2("sha256").update(value).digest("hex");
950
- var readObject = (file) => {
951
- const stat = lstatSync2(file);
952
- if (!stat.isFile() || stat.size > CLAUDE_INBOX.maxRecordBytes || stat.uid !== process.getuid?.())
953
- throw new Error("Invalid inbox record");
954
- 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;
955
974
  };
956
- var readKey = (file) => {
957
- const value = readObject(file);
958
- 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
+ }
959
987
  };
960
- var processStart = (pid) => {
961
- if (process.platform !== "darwin") return null;
988
+ var currentClaudeProcessStart = (pid) => {
962
989
  try {
990
+ if (process.platform === "linux") return linuxProcessStart(readFileSync4(`/proc/${pid}/stat`, "utf8"));
991
+ if (process.platform !== "darwin") return null;
963
992
  return execFileSync("/bin/ps", ["-p", String(pid), "-o", "lstart="], {
964
993
  encoding: "utf8",
965
994
  env: { ...process.env, TZ: "UTC", LC_ALL: "C" },
@@ -969,6 +998,25 @@ var processStart = (pid) => {
969
998
  return null;
970
999
  }
971
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
+ };
972
1020
  var transcriptPath = (config, session) => join3(
973
1021
  config,
974
1022
  "projects",
@@ -1053,11 +1101,12 @@ var ClaudeInboxClient = class {
1053
1101
  return sessions.flatMap((file) => {
1054
1102
  try {
1055
1103
  const session = parseClaudeInboxSession(
1056
- readObject(join3(this.options.configDir, "sessions", file))
1104
+ readObject(join3(this.options.configDir, "sessions", file)),
1105
+ this.options.platform ?? process.platform
1057
1106
  );
1058
1107
  if (!session || file !== `${session.pid}.json` || !isAbsolute(session.cwd) || !isAbsolute(session.messagingSocketPath))
1059
1108
  return [];
1060
- if ((this.options.processStart ?? processStart)(session.pid) !== session.procStart)
1109
+ if (!this.processMatches(session))
1061
1110
  return [];
1062
1111
  const socket = lstatSync2(session.messagingSocketPath);
1063
1112
  if (!socket.isSocket() || socket.uid !== process.getuid?.()) return [];
@@ -1070,6 +1119,14 @@ var ClaudeInboxClient = class {
1070
1119
  return [];
1071
1120
  }
1072
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
+ }
1073
1130
  key(session) {
1074
1131
  const canonicalSocket = session.messagingSocketPath.replace(
1075
1132
  /^\/private(?=\/(?:tmp|var|etc)\/)/,
@@ -1134,7 +1191,7 @@ var ClaudeInboxClient = class {
1134
1191
  if (!key) return "wake_not_sent" /* notSent */;
1135
1192
  const socket = await connectInbox(session.messagingSocketPath);
1136
1193
  if (!socket) return "wake_not_sent" /* notSent */;
1137
- if (signal?.aborted || (this.options.processStart ?? processStart)(session.pid) !== session.procStart) {
1194
+ if (signal?.aborted || !this.processMatches(session)) {
1138
1195
  socket.destroy();
1139
1196
  return "wake_not_sent" /* notSent */;
1140
1197
  }