pushary 1.9.139 → 1.9.140

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 (134) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/data/vscode-plugin/README.md +2 -0
  3. package/dist/{api-JY6EQT7A.js → api-ZV6JN5J3.js} +11 -11
  4. package/dist/bin/pushary-audit.js +3 -3
  5. package/dist/bin/pushary-bell-hook.js +28 -28
  6. package/dist/bin/pushary-bell.js +10 -10
  7. package/dist/bin/pushary-claude.js +27 -27
  8. package/dist/bin/pushary-clean.js +35 -35
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +35 -35
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +29 -29
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +106 -95
  16. package/dist/bin/pushary-disconnect.js +28 -28
  17. package/dist/bin/pushary-display-hook.js +88 -7
  18. package/dist/bin/pushary-doctor.js +43 -43
  19. package/dist/bin/pushary-elicitation-hook.js +28 -28
  20. package/dist/bin/pushary-gemini-bridge.js +19 -18
  21. package/dist/bin/pushary-gemini-hook.js +32 -32
  22. package/dist/bin/pushary-hook.js +35 -35
  23. package/dist/bin/pushary-login.js +21 -21
  24. package/dist/bin/pushary-logout.js +27 -27
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +15 -15
  27. package/dist/bin/pushary-notification-hook.js +27 -27
  28. package/dist/bin/pushary-opencode-hook.js +31 -31
  29. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  30. package/dist/bin/pushary-permission-hook.js +35 -35
  31. package/dist/bin/pushary-post-hook.js +28 -28
  32. package/dist/bin/pushary-prompt-hook.js +27 -27
  33. package/dist/bin/pushary-session-end-hook.js +27 -27
  34. package/dist/bin/pushary-session-start-hook.js +36 -36
  35. package/dist/bin/pushary-setup.js +50 -50
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +33 -33
  38. package/dist/bin/pushary-stop-hook.js +27 -27
  39. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  40. package/dist/bin/pushary-suggestions.js +15 -15
  41. package/dist/bin/pushary-transcript-register.js +17 -17
  42. package/dist/bin/pushary-transcripts.js +25 -25
  43. package/dist/bin/pushary-upgrade.js +41 -41
  44. package/dist/bin/pushary-wait.js +15 -15
  45. package/dist/bin/pushary.js +7 -7
  46. package/dist/{chunk-422KDIO5.js → chunk-2MELVDYD.js} +2 -2
  47. package/dist/{chunk-KYWH4XUR.js → chunk-3FJO3HIA.js} +3 -3
  48. package/dist/{chunk-LHYBHWCK.js → chunk-3HORJAQX.js} +2 -2
  49. package/dist/{chunk-7Q6YKZY2.js → chunk-3TQ4NPFC.js} +3 -3
  50. package/dist/{chunk-SVKZKLEP.js → chunk-4IAFTTNQ.js} +1 -1
  51. package/dist/{chunk-LHUA6ADC.js → chunk-4SMS5DND.js} +3 -3
  52. package/dist/{chunk-4RKB6X4S.js → chunk-4YIVV4PY.js} +2 -2
  53. package/dist/{chunk-QMKI5RGT.js → chunk-5TPC3M45.js} +4 -5
  54. package/dist/{chunk-IAWFSD4Q.js → chunk-6LK6I62M.js} +1 -1
  55. package/dist/{chunk-QTR6KQEU.js → chunk-6WBHYQ2P.js} +1 -1
  56. package/dist/{chunk-FIQ7ND7P.js → chunk-6Z7VJ65F.js} +5 -5
  57. package/dist/{chunk-3PQEUSPK.js → chunk-7AXEKUXY.js} +1 -1
  58. package/dist/{chunk-LGIB72D7.js → chunk-7DPPMWTR.js} +2 -2
  59. package/dist/{chunk-MNVBO6UO.js → chunk-7LBMCU3S.js} +4 -4
  60. package/dist/{chunk-INGRSQVC.js → chunk-7OBROSQL.js} +3 -3
  61. package/dist/{chunk-SKVPWXNK.js → chunk-7TXUHOQW.js} +10 -10
  62. package/dist/{chunk-IOWB43KY.js → chunk-7W4XA2WF.js} +1 -1
  63. package/dist/{chunk-QG5MJ6NW.js → chunk-7WLNPGEY.js} +6 -6
  64. package/dist/{chunk-GGTLV67J.js → chunk-AQVXXXFZ.js} +4 -4
  65. package/dist/{chunk-CQLQFN6B.js → chunk-AXAO3JF5.js} +3 -12
  66. package/dist/{chunk-GCOOOIBX.js → chunk-B4KAY45V.js} +30 -22
  67. package/dist/{chunk-M6TJWXST.js → chunk-BAT4TJOE.js} +8 -8
  68. package/dist/{chunk-FSTSLVZJ.js → chunk-BMBWFLIT.js} +1 -1
  69. package/dist/{chunk-LKSFQTGQ.js → chunk-D7AJ3ZCI.js} +1 -1
  70. package/dist/{chunk-2X2JHX77.js → chunk-E4MC6B6U.js} +4 -4
  71. package/dist/{chunk-LSABM2ES.js → chunk-E67Y7DSA.js} +2 -2
  72. package/dist/{chunk-DF2CUKN4.js → chunk-FSDTFT7J.js} +2 -2
  73. package/dist/{chunk-RBPAUX6C.js → chunk-GUVTHNCX.js} +5 -5
  74. package/dist/{chunk-T5FPA2JO.js → chunk-H2EXF6DB.js} +3 -3
  75. package/dist/{chunk-LYLADUYE.js → chunk-HJFTPNP6.js} +2 -2
  76. package/dist/{chunk-S63DCSH4.js → chunk-HNN46FYL.js} +4 -4
  77. package/dist/{chunk-2MJMKM6D.js → chunk-IEHY7DCR.js} +1 -1
  78. package/dist/{chunk-CZH3JDVB.js → chunk-IJMWFHZZ.js} +2 -2
  79. package/dist/{chunk-P6S4CALA.js → chunk-JHRJ3KKG.js} +5 -5
  80. package/dist/{chunk-MAPC5KKZ.js → chunk-JYOC6N7C.js} +2 -2
  81. package/dist/{chunk-J6CNQ5UK.js → chunk-L7BWJD25.js} +1 -1
  82. package/dist/{chunk-J5SMCRIT.js → chunk-LAAGGP7K.js} +5 -5
  83. package/dist/{chunk-C4F5RUJL.js → chunk-LURIPMCB.js} +6 -6
  84. package/dist/{chunk-M4G4VWW6.js → chunk-LW7TXMCP.js} +1 -1
  85. package/dist/{chunk-6A6OSNC2.js → chunk-MDRNNK3L.js} +1 -1
  86. package/dist/{chunk-BRXKVYTV.js → chunk-MEFTOIUI.js} +1 -1
  87. package/dist/{chunk-ZAZQHOBS.js → chunk-MFRNEOCN.js} +11 -11
  88. package/dist/{chunk-ZYLZCNOJ.js → chunk-MGBYRHT3.js} +1 -1
  89. package/dist/{chunk-IDXCVT6W.js → chunk-MTVAACOE.js} +3 -3
  90. package/dist/{chunk-Q5H5AFS7.js → chunk-N346VCKX.js} +3 -3
  91. package/dist/{chunk-LVL7XAXK.js → chunk-NBJ7N7KL.js} +5 -5
  92. package/dist/{chunk-BURSH6SW.js → chunk-O55PACNP.js} +4 -4
  93. package/dist/{chunk-OBPBT6RG.js → chunk-O66URN57.js} +3 -3
  94. package/dist/{chunk-7MPKMLE3.js → chunk-OZY4EU6V.js} +11 -11
  95. package/dist/{chunk-6RAHONLG.js → chunk-PHZYLAHL.js} +2 -2
  96. package/dist/{chunk-KDQSPNPH.js → chunk-QAT2PWRX.js} +16 -16
  97. package/dist/{chunk-KQVURVAP.js → chunk-QCIZDJSU.js} +204 -154
  98. package/dist/{chunk-KXHGEJVW.js → chunk-QDQHIQWH.js} +2 -2
  99. package/dist/{chunk-GVJWHTN2.js → chunk-RACM64B6.js} +2 -2
  100. package/dist/{chunk-XKXOT2ZU.js → chunk-RQPVEBKR.js} +3 -3
  101. package/dist/{chunk-AEC72YC3.js → chunk-RVKCG7DK.js} +6 -6
  102. package/dist/{chunk-2YMVIBFT.js → chunk-S6LB3SZE.js} +12 -12
  103. package/dist/{chunk-3FNBN4JQ.js → chunk-S7DTAH7Q.js} +1 -1
  104. package/dist/{chunk-IHUXZGHB.js → chunk-SANGITZF.js} +1 -1
  105. package/dist/{chunk-OBKHLKKB.js → chunk-SQB57AJR.js} +4 -4
  106. package/dist/{chunk-UTUR6WEA.js → chunk-SSAGWDBN.js} +3 -3
  107. package/dist/{chunk-UZZRSCFR.js → chunk-T5GZUMBP.js} +5 -5
  108. package/dist/{chunk-ISDMTGZ3.js → chunk-TA3YQY6I.js} +1 -1
  109. package/dist/{chunk-4NLZUCPG.js → chunk-TJX25WUQ.js} +2 -2
  110. package/dist/{chunk-FMQBG2TD.js → chunk-TRCJWAZD.js} +6 -6
  111. package/dist/{chunk-P3UCAWUP.js → chunk-UGU566AU.js} +6 -6
  112. package/dist/{chunk-WES6E62H.js → chunk-UH25VEQI.js} +4 -4
  113. package/dist/{chunk-AOAIYHAP.js → chunk-UHB7G2XC.js} +5 -5
  114. package/dist/{chunk-ZNMLL2WN.js → chunk-ULRZGJSL.js} +2 -2
  115. package/dist/{chunk-DTJZK3MN.js → chunk-V5VSSRV6.js} +6 -6
  116. package/dist/{chunk-U7Z53YWH.js → chunk-XJ6CRGD2.js} +4 -4
  117. package/dist/{chunk-IEHI64ZN.js → chunk-Y7LBB6YM.js} +1 -1
  118. package/dist/{chunk-XQYBTRVW.js → chunk-YB7V6V6O.js} +1 -1
  119. package/dist/{chunk-OLJTUTD2.js → chunk-YD3PTYOT.js} +37 -33
  120. package/dist/{chunk-H4O4IPWY.js → chunk-YIIGX653.js} +5 -5
  121. package/dist/{codex-app-cards-switch-TOHSGS5T.js → codex-app-cards-switch-YW4R5WTG.js} +11 -11
  122. package/dist/{codex-card-routing-BPCOKSBO.js → codex-card-routing-5EHXCS7Y.js} +2 -2
  123. package/dist/{codex-desktop-launch-6LD5GETH.js → codex-desktop-launch-VEPL7OFZ.js} +1 -1
  124. package/dist/{codex-session-launch-ZVFPD4ON.js → codex-session-launch-7UKI32XL.js} +20 -20
  125. package/dist/{config-3AFJSGM2.js → config-5YVCM3JL.js} +3 -3
  126. package/dist/{global-upgrade-6SWFRW5G.js → global-upgrade-YNLHN2LI.js} +9 -9
  127. package/dist/{identity-K2VBL5PB.js → identity-ZF5BYVAH.js} +4 -4
  128. package/dist/{live-capabilities-VQEG7TCE.js → live-capabilities-UDAEQC25.js} +14 -11
  129. package/dist/{paths-ZAVMBGAQ.js → paths-5CUJRNH3.js} +3 -3
  130. package/dist/{reapply-BXMMOQXK.js → reapply-EHYJUX67.js} +29 -29
  131. package/dist/src/index.js +34 -34
  132. package/dist/{upgrade-lock-UZN332AO.js → upgrade-lock-ONZN26ZJ.js} +4 -4
  133. package/dist/{usage-EDDIN5YZ.js → usage-GF3ZBAH4.js} +3 -3
  134. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  inspectConfiguredManagedProviders
4
- } from "../chunk-ZAZQHOBS.js";
4
+ } from "../chunk-MFRNEOCN.js";
5
5
  import {
6
6
  readHookWiring,
7
7
  readHookWiringSafely
8
- } from "../chunk-M6TJWXST.js";
9
- import "../chunk-LYLADUYE.js";
10
- import "../chunk-4NLZUCPG.js";
8
+ } from "../chunk-BAT4TJOE.js";
9
+ import "../chunk-HJFTPNP6.js";
10
+ import "../chunk-TJX25WUQ.js";
11
11
  import {
12
12
  keepLinuxDaemonAfterLogout,
13
13
  lingerReportOf
@@ -15,26 +15,26 @@ import {
15
15
  import {
16
16
  HEARTBEAT_INTERVAL_MS,
17
17
  sendHeartbeat
18
- } from "../chunk-LVL7XAXK.js";
19
- import "../chunk-KXHGEJVW.js";
18
+ } from "../chunk-NBJ7N7KL.js";
19
+ import "../chunk-QDQHIQWH.js";
20
20
  import {
21
21
  readSignedOutDiagnosis
22
- } from "../chunk-ZNMLL2WN.js";
22
+ } from "../chunk-ULRZGJSL.js";
23
23
  import {
24
24
  HERMES_INSTALL_MARKER_FILE,
25
25
  defaultHermesHome,
26
26
  parseHermesInstallMarker
27
- } from "../chunk-Q5H5AFS7.js";
27
+ } from "../chunk-N346VCKX.js";
28
28
  import {
29
29
  writeHuman
30
30
  } from "../chunk-QCGNGEGE.js";
31
- import "../chunk-H4O4IPWY.js";
32
- import "../chunk-7Q6YKZY2.js";
33
- import "../chunk-UTUR6WEA.js";
34
- import "../chunk-RBPAUX6C.js";
31
+ import "../chunk-YIIGX653.js";
32
+ import "../chunk-3TQ4NPFC.js";
33
+ import "../chunk-SSAGWDBN.js";
34
+ import "../chunk-GUVTHNCX.js";
35
35
  import {
36
36
  exitOnHelpFlag
37
- } from "../chunk-3FNBN4JQ.js";
37
+ } from "../chunk-S7DTAH7Q.js";
38
38
  import {
39
39
  codexBinaryIsBroken,
40
40
  detectProviderLiveCapabilities,
@@ -43,8 +43,8 @@ import {
43
43
  launchableProviders,
44
44
  resolveControlPolicy,
45
45
  trackProviderInventory
46
- } from "../chunk-OLJTUTD2.js";
47
- import "../chunk-MAPC5KKZ.js";
46
+ } from "../chunk-YD3PTYOT.js";
47
+ import "../chunk-JYOC6N7C.js";
48
48
  import {
49
49
  SESSION_REAP_SILENCE_MS,
50
50
  describeIdleWindow,
@@ -52,18 +52,18 @@ import {
52
52
  listProcessProofs,
53
53
  ownsLiveProcess,
54
54
  silentSpawnedProofs
55
- } from "../chunk-LSABM2ES.js";
55
+ } from "../chunk-E67Y7DSA.js";
56
56
  import "../chunk-CYTPQDQY.js";
57
57
  import {
58
58
  readLocalAutoUpdateReport
59
- } from "../chunk-LHYBHWCK.js";
60
- import "../chunk-GGTLV67J.js";
59
+ } from "../chunk-3HORJAQX.js";
60
+ import "../chunk-AQVXXXFZ.js";
61
61
  import {
62
62
  startRegisteredTranscripts
63
- } from "../chunk-SKVPWXNK.js";
63
+ } from "../chunk-7TXUHOQW.js";
64
64
  import "../chunk-VAE5JBR5.js";
65
65
  import "../chunk-G66WIAST.js";
66
- import "../chunk-FIQ7ND7P.js";
66
+ import "../chunk-6Z7VJ65F.js";
67
67
  import {
68
68
  DAEMON_LEASE_RENEW_INTERVAL_MS,
69
69
  DAEMON_YIELD_CHECK_INTERVAL_MS,
@@ -81,62 +81,62 @@ import {
81
81
  requestDaemonHandoff,
82
82
  stopDaemonRunning,
83
83
  writeDaemonNeedsLogin
84
- } from "../chunk-AEC72YC3.js";
84
+ } from "../chunk-RVKCG7DK.js";
85
85
  import {
86
86
  hookOwnerOf
87
- } from "../chunk-OBKHLKKB.js";
87
+ } from "../chunk-SQB57AJR.js";
88
88
  import {
89
89
  markPendingCommandRefused,
90
90
  pendingCommandReceipts,
91
91
  removePendingCommand
92
- } from "../chunk-2YMVIBFT.js";
93
- import "../chunk-QTR6KQEU.js";
94
- import "../chunk-IOWB43KY.js";
95
- import "../chunk-BRXKVYTV.js";
92
+ } from "../chunk-S6LB3SZE.js";
93
+ import "../chunk-6WBHYQ2P.js";
94
+ import "../chunk-7W4XA2WF.js";
95
+ import "../chunk-MEFTOIUI.js";
96
96
  import "../chunk-YPY4YCIZ.js";
97
- import "../chunk-INGRSQVC.js";
97
+ import "../chunk-7OBROSQL.js";
98
98
  import "../chunk-XMSDA5WA.js";
99
- import "../chunk-XQYBTRVW.js";
100
- import "../chunk-6A6OSNC2.js";
101
- import "../chunk-P3UCAWUP.js";
99
+ import "../chunk-YB7V6V6O.js";
100
+ import "../chunk-MDRNNK3L.js";
101
+ import "../chunk-UGU566AU.js";
102
102
  import "../chunk-POFBE6ZY.js";
103
- import "../chunk-UZZRSCFR.js";
104
- import "../chunk-LHUA6ADC.js";
105
- import "../chunk-KYWH4XUR.js";
103
+ import "../chunk-T5GZUMBP.js";
104
+ import "../chunk-4SMS5DND.js";
105
+ import "../chunk-3FJO3HIA.js";
106
106
  import {
107
107
  spawnClaude
108
108
  } from "../chunk-H6CL3T2S.js";
109
109
  import {
110
110
  readCommandAck,
111
111
  refusedReceiptMessage
112
- } from "../chunk-3PQEUSPK.js";
113
- import "../chunk-IAWFSD4Q.js";
112
+ } from "../chunk-7AXEKUXY.js";
113
+ import "../chunk-6LK6I62M.js";
114
114
  import {
115
115
  getMachineId
116
- } from "../chunk-J6CNQ5UK.js";
116
+ } from "../chunk-L7BWJD25.js";
117
117
  import "../chunk-YU2EUD7O.js";
118
118
  import {
119
119
  readControlMode
120
- } from "../chunk-XKXOT2ZU.js";
121
- import "../chunk-GVJWHTN2.js";
120
+ } from "../chunk-RQPVEBKR.js";
121
+ import "../chunk-RACM64B6.js";
122
122
  import {
123
123
  claudeConfigDir,
124
124
  codexHome
125
- } from "../chunk-CZH3JDVB.js";
125
+ } from "../chunk-IJMWFHZZ.js";
126
126
  import {
127
127
  resolveBinary
128
- } from "../chunk-CQLQFN6B.js";
128
+ } from "../chunk-AXAO3JF5.js";
129
129
  import {
130
130
  getApiKey,
131
131
  getBaseUrl
132
- } from "../chunk-IEHI64ZN.js";
132
+ } from "../chunk-Y7LBB6YM.js";
133
133
  import {
134
134
  EXIT
135
135
  } from "../chunk-BG4HHB7E.js";
136
136
  import {
137
137
  writeJsonAtomicDurable
138
138
  } from "../chunk-TODDEIYG.js";
139
- import "../chunk-ZYLZCNOJ.js";
139
+ import "../chunk-MGBYRHT3.js";
140
140
  import "../chunk-WIIMW5YO.js";
141
141
  import {
142
142
  CLAUDE_INBOX,
@@ -157,6 +157,7 @@ import {
157
157
  isCodexInputReceipt,
158
158
  isCodexQueuedReceipt,
159
159
  isCommandAcknowledgementReceipt,
160
+ isRecord,
160
161
  nativeIdentifier,
161
162
  nativeInputAction,
162
163
  nativeRecord,
@@ -166,9 +167,71 @@ import {
166
167
  parseHermesAdmission,
167
168
  parseHermesReplayCursor,
168
169
  qualifyHermesReceiptMode
169
- } from "../chunk-KQVURVAP.js";
170
+ } from "../chunk-QCIZDJSU.js";
170
171
  import "../chunk-MLKGABMK.js";
171
172
 
173
+ // src/spawn-claim.ts
174
+ var parseSpawnClaim = (value) => {
175
+ if (!isRecord(value)) return null;
176
+ const request = value;
177
+ if (request.attemptCount !== void 0 && (typeof request.attemptCount !== "number" || !Number.isSafeInteger(request.attemptCount) || request.attemptCount < 1)) return null;
178
+ if (typeof request.id !== "string" || typeof request.prompt !== "string") return null;
179
+ return {
180
+ id: request.id,
181
+ prompt: request.prompt,
182
+ ...typeof request.claimId === "string" ? { claimId: request.claimId } : {},
183
+ ...typeof request.attemptCount === "number" ? { attemptCount: request.attemptCount } : {},
184
+ ...typeof request.cwd === "string" ? { cwd: request.cwd } : {},
185
+ ...typeof request.agent === "string" ? { agent: request.agent } : {},
186
+ ...typeof request.model === "string" ? { model: request.model } : {},
187
+ ...typeof request.resumeSessionId === "string" ? { resumeSessionId: request.resumeSessionId } : {}
188
+ };
189
+ };
190
+ var spawnAcknowledgement = (request, machineId, outcome) => {
191
+ if (!request.claimId) return null;
192
+ return outcome.state === "started" ? {
193
+ spawnId: request.id,
194
+ claimId: request.claimId,
195
+ machineId,
196
+ state: "started",
197
+ pid: outcome.pid ?? null
198
+ } : {
199
+ spawnId: request.id,
200
+ claimId: request.claimId,
201
+ machineId,
202
+ state: "failed",
203
+ failure: {
204
+ code: "launch_failed",
205
+ message: outcome.message.slice(0, 240),
206
+ retryable: false
207
+ }
208
+ };
209
+ };
210
+ var launchSpawnClaim = async (request, runtime) => {
211
+ const existingPid = await runtime.findExistingPid(request.id);
212
+ if (existingPid !== null) {
213
+ await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, { state: "started", pid: existingPid }));
214
+ return;
215
+ }
216
+ if ((request.attemptCount ?? 1) > 1) {
217
+ await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, {
218
+ state: "failed",
219
+ message: "The previous launch could not be confirmed. Check your sessions before starting another."
220
+ }));
221
+ return;
222
+ }
223
+ let pid;
224
+ try {
225
+ pid = await runtime.launch(request);
226
+ } catch (err) {
227
+ const message = err instanceof Error ? err.message : String(err);
228
+ runtime.reportLaunchError(message);
229
+ await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, { state: "failed", message }));
230
+ return;
231
+ }
232
+ await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, { state: "started", pid }));
233
+ };
234
+
172
235
  // src/native-host-receiver.ts
173
236
  import { join as join2 } from "path";
174
237
  import { homedir } from "os";
@@ -1585,59 +1648,7 @@ var parseControlProbe = (value) => {
1585
1648
  return typeof id === "string" && id.length > 0 && id.length <= 128 ? id : null;
1586
1649
  };
1587
1650
  var daemonSignals = (platform = process.platform) => platform === "win32" ? ["SIGINT", "SIGTERM"] : ["SIGINT", "SIGTERM", "SIGHUP"];
1588
- var parseSpawnClaim = (value) => {
1589
- if (typeof value !== "object" || value === null) return null;
1590
- const request = value;
1591
- if (typeof request.id !== "string" || typeof request.prompt !== "string") return null;
1592
- return {
1593
- id: request.id,
1594
- prompt: request.prompt,
1595
- ...typeof request.claimId === "string" ? { claimId: request.claimId } : {},
1596
- ...Number.isInteger(request.attemptCount) ? { attemptCount: request.attemptCount } : {},
1597
- ...typeof request.cwd === "string" ? { cwd: request.cwd } : {},
1598
- ...typeof request.agent === "string" ? { agent: request.agent } : {},
1599
- ...typeof request.model === "string" ? { model: request.model } : {},
1600
- ...typeof request.resumeSessionId === "string" ? { resumeSessionId: request.resumeSessionId } : {}
1601
- };
1602
- };
1603
1651
  var stopAcknowledgement = (request, machineId, state) => request.id ? { stopId: request.id, machineId, state } : null;
1604
- var spawnAcknowledgement = (request, machineId, outcome) => {
1605
- if (!request.claimId) return null;
1606
- return outcome.state === "started" ? {
1607
- spawnId: request.id,
1608
- claimId: request.claimId,
1609
- machineId,
1610
- state: "started",
1611
- pid: outcome.pid ?? null
1612
- } : {
1613
- spawnId: request.id,
1614
- claimId: request.claimId,
1615
- machineId,
1616
- state: "failed",
1617
- failure: {
1618
- code: "launch_failed",
1619
- message: outcome.message.slice(0, 240),
1620
- retryable: false
1621
- }
1622
- };
1623
- };
1624
- var launchSpawnClaim = async (request, runtime) => {
1625
- const existingPid = await runtime.findExistingPid(request.id);
1626
- if (existingPid !== null) {
1627
- await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, { state: "started", pid: existingPid }));
1628
- return;
1629
- }
1630
- let pid;
1631
- try {
1632
- pid = await runtime.launch(request);
1633
- } catch (err) {
1634
- const message = err instanceof Error ? err.message : String(err);
1635
- runtime.reportLaunchError(message);
1636
- await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, { state: "failed", message }));
1637
- return;
1638
- }
1639
- await runtime.acknowledge(spawnAcknowledgement(request, runtime.machineId, { state: "started", pid }));
1640
- };
1641
1652
  var DrainError = class extends Error {
1642
1653
  constructor(status) {
1643
1654
  super(`drain ${status}`);
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  declinedAgentsFile,
4
4
  recordDeclinedAgent
5
- } from "../chunk-4NLZUCPG.js";
5
+ } from "../chunk-TJX25WUQ.js";
6
6
  import {
7
7
  isCursorPluginLeftover,
8
8
  isPusharyCursorPluginManifest,
9
9
  releaseSoleGate
10
- } from "../chunk-2X2JHX77.js";
10
+ } from "../chunk-E4MC6B6U.js";
11
11
  import {
12
12
  planFxRemoval,
13
13
  removeClineServer
14
- } from "../chunk-H4O4IPWY.js";
15
- import "../chunk-7Q6YKZY2.js";
16
- import "../chunk-UTUR6WEA.js";
14
+ } from "../chunk-YIIGX653.js";
15
+ import "../chunk-3TQ4NPFC.js";
16
+ import "../chunk-SSAGWDBN.js";
17
17
  import {
18
18
  OPENCODE_PLUGIN_SIBLING,
19
19
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -25,10 +25,10 @@ import {
25
25
  openCodePluginDir,
26
26
  openCodePluginFile,
27
27
  removeOpenCodeMcpServer
28
- } from "../chunk-RBPAUX6C.js";
28
+ } from "../chunk-GUVTHNCX.js";
29
29
  import {
30
30
  exitOnHelpFlag
31
- } from "../chunk-3FNBN4JQ.js";
31
+ } from "../chunk-S7DTAH7Q.js";
32
32
  import {
33
33
  compatibleConfigFile,
34
34
  compatibleDocuments,
@@ -38,31 +38,31 @@ import {
38
38
  isEmptiedPusharyOwnedDocument,
39
39
  removeCompatibleHooks,
40
40
  removeCompatibleMcpServer
41
- } from "../chunk-FIQ7ND7P.js";
41
+ } from "../chunk-6Z7VJ65F.js";
42
42
  import {
43
43
  removeGeminiSettings
44
- } from "../chunk-OBKHLKKB.js";
45
- import "../chunk-2YMVIBFT.js";
46
- import "../chunk-QTR6KQEU.js";
47
- import "../chunk-IOWB43KY.js";
48
- import "../chunk-BRXKVYTV.js";
44
+ } from "../chunk-SQB57AJR.js";
45
+ import "../chunk-S6LB3SZE.js";
46
+ import "../chunk-6WBHYQ2P.js";
47
+ import "../chunk-7W4XA2WF.js";
48
+ import "../chunk-MEFTOIUI.js";
49
49
  import {
50
50
  parseFlags
51
51
  } from "../chunk-YPY4YCIZ.js";
52
- import "../chunk-6A6OSNC2.js";
53
- import "../chunk-P3UCAWUP.js";
52
+ import "../chunk-MDRNNK3L.js";
53
+ import "../chunk-UGU566AU.js";
54
54
  import "../chunk-POFBE6ZY.js";
55
- import "../chunk-UZZRSCFR.js";
56
- import "../chunk-LHUA6ADC.js";
57
- import "../chunk-KYWH4XUR.js";
58
- import "../chunk-3PQEUSPK.js";
59
- import "../chunk-IAWFSD4Q.js";
60
- import "../chunk-J6CNQ5UK.js";
55
+ import "../chunk-T5GZUMBP.js";
56
+ import "../chunk-4SMS5DND.js";
57
+ import "../chunk-3FJO3HIA.js";
58
+ import "../chunk-7AXEKUXY.js";
59
+ import "../chunk-6LK6I62M.js";
60
+ import "../chunk-L7BWJD25.js";
61
61
  import {
62
62
  UsageError
63
63
  } from "../chunk-YU2EUD7O.js";
64
- import "../chunk-XKXOT2ZU.js";
65
- import "../chunk-GVJWHTN2.js";
64
+ import "../chunk-RQPVEBKR.js";
65
+ import "../chunk-RACM64B6.js";
66
66
  import {
67
67
  claudeJson,
68
68
  claudeMcpReceipt,
@@ -92,9 +92,9 @@ import {
92
92
  removePusharySettings,
93
93
  removePusharyToolPermissions,
94
94
  restoreClaudeMcpServer
95
- } from "../chunk-CZH3JDVB.js";
96
- import "../chunk-CQLQFN6B.js";
97
- import "../chunk-IEHI64ZN.js";
95
+ } from "../chunk-IJMWFHZZ.js";
96
+ import "../chunk-AXAO3JF5.js";
97
+ import "../chunk-Y7LBB6YM.js";
98
98
  import {
99
99
  EXIT
100
100
  } from "../chunk-BG4HHB7E.js";
@@ -103,14 +103,14 @@ import {
103
103
  } from "../chunk-TODDEIYG.js";
104
104
  import {
105
105
  isInvocationOf
106
- } from "../chunk-ZYLZCNOJ.js";
106
+ } from "../chunk-MGBYRHT3.js";
107
107
  import "../chunk-WIIMW5YO.js";
108
108
  import {
109
109
  DISCONNECTABLE_AGENTS,
110
110
  DISCONNECT_AGENT_IDS,
111
111
  hookCompatibleProfileBySource,
112
112
  normalizeAgentId
113
- } from "../chunk-KQVURVAP.js";
113
+ } from "../chunk-QCIZDJSU.js";
114
114
  import "../chunk-MLKGABMK.js";
115
115
 
116
116
  // bin/pushary-disconnect.ts
@@ -9,6 +9,13 @@ var __export = (target, all) => {
9
9
  __defProp(target, name, { get: all[name], enumerable: true });
10
10
  };
11
11
 
12
+ // ../contracts/src/settlement-render.ts
13
+ var init_settlement_render = __esm({
14
+ "../contracts/src/settlement-render.ts"() {
15
+ "use strict";
16
+ }
17
+ });
18
+
12
19
  // ../contracts/src/audit-chain.ts
13
20
  var AUDIT_CHAIN_GENESIS_HASH, AUDIT_CHECKPOINT_INTERVAL_MS, AUDIT_CHECKPOINT_SWEEP_MS, AUDIT_CHAIN_PASS_INTERVAL_MS, AUDIT_CHECKPOINT_MAX_AGE_MS, ASKED_TEXT_FIELDS, ASKED_NULLABLE_FIELDS, DECISION_NULLABLE_FIELDS, ASKED_PAYLOAD_KEYS, DECISION_PAYLOAD_KEYS;
14
21
  var init_audit_chain = __esm({
@@ -27,6 +34,14 @@ var init_audit_chain = __esm({
27
34
  }
28
35
  });
29
36
 
37
+ // ../contracts/src/permission-grant-routing.ts
38
+ var init_permission_grant_routing = __esm({
39
+ "../contracts/src/permission-grant-routing.ts"() {
40
+ "use strict";
41
+ init_src();
42
+ }
43
+ });
44
+
30
45
  // ../contracts/src/redaction.ts
31
46
  var CREDENTIAL_NAME, CREDENTIAL_KEY, DISPLAYED_CREDENTIAL_KEY, SHELL_INERT_UNIT, SHELL_INERT_SINGLE_QUOTED_UNIT, SHELL_INERT_URL_PASSWORD_UNIT, PEM_LINE_BREAK, credentialAssignmentRule, DISPLAYED_SECRET_SHAPES, CUT_OFF_SECRET_SHAPES, secretRedactionRules, SECRET_REDACTION_RULES, CUT_OFF_TEXT_REDACTION_RULES;
32
47
  var init_redaction = __esm({
@@ -226,7 +241,7 @@ var init_codex_question = __esm({
226
241
  });
227
242
 
228
243
  // ../contracts/src/shell-analysis.ts
229
- var COMMAND_POSITION, COMMAND_PREFIXES, A_SHELL_RUNNING_A_SUBSTITUTION, AN_EVAL_THAT_RUNS;
244
+ var COMMAND_POSITION, COMMAND_PREFIXES, A_SHELL_RUNNING_A_SUBSTITUTION;
230
245
  var init_shell_analysis = __esm({
231
246
  "../contracts/src/shell-analysis.ts"() {
232
247
  "use strict";
@@ -236,7 +251,6 @@ var init_shell_analysis = __esm({
236
251
  String.raw`${COMMAND_POSITION}${COMMAND_PREFIXES}(?:[^\s;&|()<>` + "`" + String.raw`]*/)?(?:sh|bash|zsh|dash|ksh|source|\.)(?:[ \t]+-[^\s<]*){0,8}[ \t]+(?:<[ \t]*)?[<=](?=\()`,
237
252
  "g"
238
253
  );
239
- AN_EVAL_THAT_RUNS = new RegExp(String.raw`${COMMAND_POSITION}${COMMAND_PREFIXES}eval[ \t]+`, "g");
240
254
  }
241
255
  });
242
256
 
@@ -274,6 +288,46 @@ var init_shell_tools = __esm({
274
288
  }
275
289
  });
276
290
 
291
+ // ../contracts/src/session-runtime.ts
292
+ var CLAUDE_BRIDGE_CAPABILITY, CLAUDE_RESUME_CAPABILITY, CODEX_BRIDGE_CAPABILITY, CODEX_RESUME_CAPABILITY, GEMINI_BRIDGE_CAPABILITY, GEMINI_RESUME_CAPABILITY, SESSION_RUNTIMES;
293
+ var init_session_runtime = __esm({
294
+ "../contracts/src/session-runtime.ts"() {
295
+ "use strict";
296
+ CLAUDE_BRIDGE_CAPABILITY = "claude-bridge";
297
+ CLAUDE_RESUME_CAPABILITY = "claude-resume";
298
+ CODEX_BRIDGE_CAPABILITY = "codex-bridge";
299
+ CODEX_RESUME_CAPABILITY = "codex-resume";
300
+ GEMINI_BRIDGE_CAPABILITY = "gemini-bridge";
301
+ GEMINI_RESUME_CAPABILITY = "gemini-resume";
302
+ SESSION_RUNTIMES = {
303
+ claude: {
304
+ provider: "claude",
305
+ label: "Claude",
306
+ protocol: "claude-stream-json",
307
+ bridgeCapability: CLAUDE_BRIDGE_CAPABILITY,
308
+ resumeCapability: CLAUDE_RESUME_CAPABILITY,
309
+ phoneResume: false
310
+ },
311
+ codex: {
312
+ provider: "codex",
313
+ label: "Codex",
314
+ protocol: "codex-app-server",
315
+ bridgeCapability: CODEX_BRIDGE_CAPABILITY,
316
+ resumeCapability: CODEX_RESUME_CAPABILITY,
317
+ phoneResume: true
318
+ },
319
+ gemini: {
320
+ provider: "gemini",
321
+ label: "Gemini",
322
+ protocol: "gemini-stream-json",
323
+ bridgeCapability: GEMINI_BRIDGE_CAPABILITY,
324
+ resumeCapability: GEMINI_RESUME_CAPABILITY,
325
+ phoneResume: true
326
+ }
327
+ };
328
+ }
329
+ });
330
+
277
331
  // ../contracts/src/claude-connector.ts
278
332
  var CLAUDE_DIRECTORY_URL, COWORK_CONNECTOR_LIMIT, CLAUDE_CONNECTOR_STEPS, CONNECTOR_SETUP_QUESTION, CLAUDE_CONNECTOR_TEST, connectorStarterPrompt, CLAUDE_CONNECTOR_STARTER;
279
333
  var init_claude_connector = __esm({
@@ -310,6 +364,7 @@ var PUSHARY_SETUP_COMMAND, defaults, AGENTS, HOOK_SOURCES, POLICY_AGENTS, AGENT_
310
364
  var init_agent_manifest = __esm({
311
365
  "../contracts/src/agent-manifest.ts"() {
312
366
  "use strict";
367
+ init_session_runtime();
313
368
  init_claude_connector();
314
369
  PUSHARY_SETUP_COMMAND = "npx pushary@latest setup";
315
370
  defaults = {
@@ -318,7 +373,7 @@ var init_agent_manifest = __esm({
318
373
  policyAgent: null,
319
374
  repoAware: false,
320
375
  disconnectable: false,
321
- managedProvider: false,
376
+ sessionRuntime: null,
322
377
  bridged: false,
323
378
  enforcement: "cooperative",
324
379
  connectVia: "Plain MCP",
@@ -341,7 +396,7 @@ var init_agent_manifest = __esm({
341
396
  policyAgent: "claude_code",
342
397
  repoAware: true,
343
398
  disconnectable: true,
344
- managedProvider: true,
399
+ sessionRuntime: SESSION_RUNTIMES.claude,
345
400
  enforcement: "enforced",
346
401
  connectVia: "Native hooks + MCP",
347
402
  setupCommand: PUSHARY_SETUP_COMMAND,
@@ -369,7 +424,7 @@ var init_agent_manifest = __esm({
369
424
  policyAgent: "codex",
370
425
  repoAware: true,
371
426
  disconnectable: true,
372
- managedProvider: true,
427
+ sessionRuntime: SESSION_RUNTIMES.codex,
373
428
  enforcement: "enforced",
374
429
  connectVia: "Native hooks + MCP",
375
430
  setupCommand: PUSHARY_SETUP_COMMAND,
@@ -390,7 +445,7 @@ var init_agent_manifest = __esm({
390
445
  policyAgent: "gemini_cli",
391
446
  repoAware: true,
392
447
  disconnectable: true,
393
- managedProvider: true,
448
+ sessionRuntime: SESSION_RUNTIMES.gemini,
394
449
  enforcement: "enforced",
395
450
  connectVia: "Native hooks + MCP",
396
451
  setupCommand: PUSHARY_SETUP_COMMAND,
@@ -606,7 +661,7 @@ var init_agent_manifest = __esm({
606
661
  );
607
662
  DISCONNECTABLE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.disconnectable && agent.hookSource !== null ? [agent.hookSource] : []));
608
663
  REPO_AWARE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.repoAware ? [agent.policyAgent] : []));
609
- MANAGED_PROVIDERS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.managedProvider ? [agent.hookSource] : []));
664
+ MANAGED_PROVIDERS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.sessionRuntime ? [agent.sessionRuntime.provider] : []));
610
665
  BRIDGE_HOOK_SOURCES = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.bridged ? [agent.hookSource] : []));
611
666
  isAgentId = (value) => Object.keys(AGENTS).includes(value);
612
667
  isHooklessDisconnectableAgent = (value) => isAgentId(value) && AGENTS[value].disconnectable && AGENTS[value].hookSource === null;
@@ -1228,6 +1283,13 @@ var init_codex_shell_script = __esm({
1228
1283
  }
1229
1284
  });
1230
1285
 
1286
+ // ../contracts/src/codex-permission-profile.ts
1287
+ var init_codex_permission_profile = __esm({
1288
+ "../contracts/src/codex-permission-profile.ts"() {
1289
+ "use strict";
1290
+ }
1291
+ });
1292
+
1231
1293
  // ../contracts/src/codex-native-approval.ts
1232
1294
  var MCP_META_KEYS, COMPUTER_USE_META_KEYS;
1233
1295
  var init_codex_native_approval = __esm({
@@ -1235,6 +1297,7 @@ var init_codex_native_approval = __esm({
1235
1297
  "use strict";
1236
1298
  init_codex_shell_script();
1237
1299
  init_redaction();
1300
+ init_codex_permission_profile();
1238
1301
  MCP_META_KEYS = ["codex_approval_kind", "codex_requires_user_input", "codex_request_type", "codex_strict_auto_review", "codex_sensitive_action", "approvals_reviewer", "persist", "source", "connector_id", "connector_name", "connector_description", "tool_name", "tool_title", "tool_description", "tool_params", "tool_params_display"];
1239
1302
  COMPUTER_USE_META_KEYS = [...MCP_META_KEYS, "riskLevel", "subtitle", "tool_call_id"];
1240
1303
  }
@@ -1263,6 +1326,18 @@ var init_encryption_account = __esm({
1263
1326
  }
1264
1327
  });
1265
1328
 
1329
+ // ../contracts/src/spawn-delivery.ts
1330
+ var SPAWN_RECOVERY;
1331
+ var init_spawn_delivery = __esm({
1332
+ "../contracts/src/spawn-delivery.ts"() {
1333
+ "use strict";
1334
+ SPAWN_RECOVERY = {
1335
+ receiptRetentionMs: 7 * 24 * 60 * 60 * 1e3,
1336
+ retrySendWindowMs: 60 * 60 * 1e3
1337
+ };
1338
+ }
1339
+ });
1340
+
1266
1341
  // ../contracts/src/claude-inbox.ts
1267
1342
  var CLAUDE_INBOX_SETTLEMENTS;
1268
1343
  var init_claude_inbox = __esm({
@@ -1289,7 +1364,10 @@ var SETUP_VERIFICATION_SENDER, DOCTOR_VERIFICATION_SENDER, SETUP_VERIFICATION_SE
1289
1364
  var init_src = __esm({
1290
1365
  "../contracts/src/index.ts"() {
1291
1366
  "use strict";
1367
+ init_settlement_render();
1368
+ init_settlement_render();
1292
1369
  init_audit_chain();
1370
+ init_permission_grant_routing();
1293
1371
  init_receipt_evidence();
1294
1372
  init_team_context();
1295
1373
  init_team_phone_link();
@@ -1316,6 +1394,7 @@ var init_src = __esm({
1316
1394
  init_env_invocation();
1317
1395
  init_shell_command_string();
1318
1396
  init_agent_manifest();
1397
+ init_session_runtime();
1319
1398
  init_claude_connector();
1320
1399
  init_chatgpt_plugin();
1321
1400
  init_partner_developer_guide();
@@ -1346,8 +1425,10 @@ var init_src = __esm({
1346
1425
  init_decision_lifetime();
1347
1426
  init_question_continuation();
1348
1427
  init_codex_native_approval();
1428
+ init_codex_permission_profile();
1349
1429
  init_transcript_record();
1350
1430
  init_encryption_account();
1431
+ init_spawn_delivery();
1351
1432
  init_codex_shell_script();
1352
1433
  init_claude_inbox();
1353
1434
  init_command_delivery();