very-happy-cli 0.2.158 → 0.2.160

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 (258) hide show
  1. package/dist/{AcpBackend-DIDRig5G.cjs → AcpBackend-Bm2rdke8.cjs} +78 -76
  2. package/dist/{AcpBackend-vDVLHuYJ.mjs → AcpBackend-mzv8Dhba.mjs} +4 -2
  3. package/dist/{AcpSessionManager-C44U99CC.cjs → AcpSessionManager-BAY1Pggx.cjs} +9 -9
  4. package/dist/{AcpSessionManager-CmRjfhn3.mjs → AcpSessionManager-CoMWFVw3.mjs} +1 -1
  5. package/dist/BasePermissionHandler-CFHAxumV.cjs +157 -0
  6. package/dist/BasePermissionHandler-m3WVholL.mjs +155 -0
  7. package/dist/BaseReasoningProcessor-BFa9_rZA.cjs +200 -0
  8. package/dist/BaseReasoningProcessor-CYrKBXGm.mjs +198 -0
  9. package/dist/RemoteModeDisplay-D-HewyXg.mjs +150 -0
  10. package/dist/RemoteModeDisplay-NC1gPHtj.cjs +153 -0
  11. package/dist/agentAttachments-Dbw8iMCZ.cjs +20 -0
  12. package/dist/agentAttachments-M_B5qEF2.mjs +18 -0
  13. package/dist/agentGuidance-B5NATuFa.cjs +28 -0
  14. package/dist/agentGuidance-CQuNlNx8.mjs +20 -0
  15. package/dist/{agentHome-Dw8Jx_CJ.cjs → agentHome-CboCeKWq.cjs} +14 -28
  16. package/dist/{agentHome-CyLmGH5L.mjs → agentHome-Dj1C43aJ.mjs} +8 -22
  17. package/dist/api-CLMUr-SX.mjs +3339 -0
  18. package/dist/api-CgundNNX.cjs +3346 -0
  19. package/dist/{types-DIBF4U0Y.mjs → apiMachine-B9dLW_p5.mjs} +9116 -16015
  20. package/dist/{types-DnrPeN80.cjs → apiMachine-Bn8482VM.cjs} +9104 -16057
  21. package/dist/assistantTools-BTqPnlFl.cjs +380 -0
  22. package/dist/assistantTools-D6tuc6o4.mjs +376 -0
  23. package/dist/attachmentContent-DpiTJZb4.cjs +88 -0
  24. package/dist/attachmentContent-_kxRznNf.mjs +82 -0
  25. package/dist/attachmentLimits-CzVrqgLR.cjs +354 -0
  26. package/dist/attachmentLimits-yba1uHFO.mjs +348 -0
  27. package/dist/auth-BDOVh5h5.cjs +220 -0
  28. package/dist/auth-Cwutmdsa.mjs +225 -0
  29. package/dist/auth-PYHZQNPp.mjs +218 -0
  30. package/dist/auth-ba4WMYrN.cjs +227 -0
  31. package/dist/authRelay-BdYkC1Po.cjs +156 -0
  32. package/dist/authRelay-DSAvg1uv.mjs +143 -0
  33. package/dist/{auto-DZbNcTXx.cjs → auto-BOX_fgmR.cjs} +70 -79
  34. package/dist/{auto-BlMZPwOk.mjs → auto-BXu14yP_.mjs} +27 -36
  35. package/dist/backgroundTaskActivity-8PdPxrvy.mjs +149 -0
  36. package/dist/backgroundTaskActivity-CBvUdj39.cjs +157 -0
  37. package/dist/bootstrap-B5G1TijC.cjs +116 -0
  38. package/dist/bootstrap-hxXPCFMx.mjs +112 -0
  39. package/dist/browser-Y6Bl8L_O.cjs +22 -0
  40. package/dist/browser-jh2P0UVZ.mjs +20 -0
  41. package/dist/claudeCliPath-BqkaH2oR.mjs +8 -0
  42. package/dist/claudeCliPath-U4HHmV4r.cjs +10 -0
  43. package/dist/claudeLocal-BaY4fZKi.mjs +339 -0
  44. package/dist/claudeLocal-CRGG4Pea.cjs +343 -0
  45. package/dist/claudeLocalLauncher-D4T7MTqd.mjs +152 -0
  46. package/dist/claudeLocalLauncher-DyEbVzUN.cjs +154 -0
  47. package/dist/cliUpdate-DsKXPFYp.cjs +120 -0
  48. package/dist/cliUpdate-Y34VGe9Y.mjs +112 -0
  49. package/dist/client-3Ac-O4pw.cjs +104 -0
  50. package/dist/client-BPNbmtvO.cjs +119 -0
  51. package/dist/client-CeGKqqcJ.mjs +100 -0
  52. package/dist/client-ClR0K8zX.mjs +112 -0
  53. package/dist/codex/happyMcpStdioBridge.cjs +33 -14
  54. package/dist/codex/happyMcpStdioBridge.mjs +26 -7
  55. package/dist/codexAppServerClient-I3teiV-N.mjs +1088 -0
  56. package/dist/codexAppServerClient-q2FjnRcK.cjs +1090 -0
  57. package/dist/codexCommand-4zcccIoq.cjs +2088 -0
  58. package/dist/codexCommand-Cc9gcbdX.mjs +2086 -0
  59. package/dist/codexThreadFork-BH9IZPqD.cjs +350 -0
  60. package/dist/codexThreadFork-slzAseLx.mjs +338 -0
  61. package/dist/{config-BtPArqRH.mjs → config-CTx_jb-C.mjs} +7 -40
  62. package/dist/{config-DG84bjwF.cjs → config-Ci9Kpgwa.cjs} +26 -59
  63. package/dist/configuration-BSYpcPwE.cjs +181 -0
  64. package/dist/configuration-RfeNjFmd.mjs +170 -0
  65. package/dist/connect-BpOdzNbE.mjs +682 -0
  66. package/dist/connect-C2CiOUFs.cjs +684 -0
  67. package/dist/constants-BC4St0xd.mjs +11 -0
  68. package/dist/constants-VJ0N6WuG.cjs +17 -0
  69. package/dist/contentLogMetadata-BlWI0egu.mjs +51 -0
  70. package/dist/contentLogMetadata-ZSFk_NjQ.cjs +54 -0
  71. package/dist/context-DsDr6E2t.cjs +69 -0
  72. package/dist/context-H0Bcb9S_.mjs +65 -0
  73. package/dist/controlClient-BGbDcgWS.mjs +260 -0
  74. package/dist/controlClient-Bcwv3D21.cjs +279 -0
  75. package/dist/createSessionMetadata-BJxEnM-o.cjs +58 -0
  76. package/dist/createSessionMetadata-CVVkGjxV.mjs +54 -0
  77. package/dist/defaultPermissionMode-BnxJPVHT.mjs +4 -0
  78. package/dist/defaultPermissionMode-CxmTXUQR.cjs +7 -0
  79. package/dist/detectCLI-CSGMlV51.mjs +58 -0
  80. package/dist/detectCLI-DR9ZaN6B.cjs +61 -0
  81. package/dist/deterministicJson-C5CYTVpm.cjs +507 -0
  82. package/dist/deterministicJson-CzkFJWw1.mjs +502 -0
  83. package/dist/doctor-BPkYWSuq.mjs +75 -0
  84. package/dist/doctor-D2YJ-Yn2.cjs +395 -0
  85. package/dist/doctor-DOvByjbk.mjs +391 -0
  86. package/dist/doctor-u46qYYKX.cjs +79 -0
  87. package/dist/doctorReadiness-BCZGcN0a.cjs +151 -0
  88. package/dist/doctorReadiness-C208SMN9.mjs +142 -0
  89. package/dist/editPaths-BVfS_FFL.mjs +68 -0
  90. package/dist/editPaths-Bqp4OFPw.cjs +73 -0
  91. package/dist/ensureDaemonRunning-BCwNrMyv.cjs +64 -0
  92. package/dist/ensureDaemonRunning-Dqa2pOjY.mjs +61 -0
  93. package/dist/handleResumeCommand-BvXYf5El.mjs +240 -0
  94. package/dist/handleResumeCommand-C2cKchpX.cjs +245 -0
  95. package/dist/ids-B6ZC0HGt.cjs +13 -0
  96. package/dist/ids-DU6sLx4C.mjs +10 -0
  97. package/dist/index-B6UGRQ7h.mjs +102 -0
  98. package/dist/{index-DPCsWlWK.cjs → index-B6pAdvJx.cjs} +131 -91
  99. package/dist/index-Bu5Zi_a9.cjs +182 -0
  100. package/dist/index-D3kI0hDR.cjs +107 -0
  101. package/dist/index-DA7yINuk.cjs +994 -0
  102. package/dist/index-DDeHXrIX.cjs +71 -0
  103. package/dist/index-DKLU_fD0.mjs +158 -0
  104. package/dist/{index-ZChGsuB7.mjs → index-DMZqWwsP.mjs} +79 -39
  105. package/dist/index-DVkMGPyS.mjs +68 -0
  106. package/dist/index-qdS1friN.mjs +949 -0
  107. package/dist/index.cjs +5 -46
  108. package/dist/index.mjs +5 -46
  109. package/dist/{install-DarS_Wco.mjs → install-BO_W7VhL.mjs} +37 -37
  110. package/dist/install-BgoC2e_2.cjs +88 -0
  111. package/dist/install-CFY3tYtJ.mjs +86 -0
  112. package/dist/{install-wKQGgXvN.cjs → install-Cs5qAPrB.cjs} +38 -38
  113. package/dist/{installPiTools-DuZ6jZvX.cjs → installPiTools-BKnXjrVu.cjs} +2 -3
  114. package/dist/{installPiTools-Cj7yU9Fc.mjs → installPiTools-B_CdM5_2.mjs} +1 -2
  115. package/dist/{installTerminalHooks-DcQfee_O.cjs → installTerminalHooks-BQZbvxsZ.cjs} +5 -40
  116. package/dist/{installTerminalHooks-CpNbRFPz.mjs → installTerminalHooks-By7gBMEF.mjs} +3 -38
  117. package/dist/lib.cjs +28 -19
  118. package/dist/lib.d.cts +126 -2
  119. package/dist/lib.d.mts +126 -2
  120. package/dist/lib.mjs +23 -14
  121. package/dist/lidState-BeDfxxEX.cjs +305 -0
  122. package/dist/lidState-CeEt442o.mjs +297 -0
  123. package/dist/limits-C-a7gr04.cjs +43 -0
  124. package/dist/limits-DIo7rEBR.mjs +36 -0
  125. package/dist/localHappyAgentAuth-C-HQyiv6.mjs +82 -0
  126. package/dist/localHappyAgentAuth-D6rFhaoc.cjs +86 -0
  127. package/dist/logger-6HYUEXNk.mjs +271 -0
  128. package/dist/logger-CS0mw3fa.cjs +275 -0
  129. package/dist/loginShellEnv-BkuYtExZ.cjs +182 -0
  130. package/dist/loginShellEnv-Dw8M7tkI.mjs +167 -0
  131. package/dist/machineMetadata-DyDbODYd.cjs +41 -0
  132. package/dist/machineMetadata-oOzBfDfs.mjs +38 -0
  133. package/dist/main-BkxJP6JQ.cjs +941 -0
  134. package/dist/main-BwNIAI1A.mjs +939 -0
  135. package/dist/manager-BQ4flvQZ.mjs +101 -0
  136. package/dist/manager-Cly8xVIR.cjs +105 -0
  137. package/dist/{mcp-BN6bKIGb.mjs → mcp-B1A4I3TK.mjs} +27 -33
  138. package/dist/{mcp-DGdeUUDJ.cjs → mcp-Hszd7qpS.cjs} +42 -48
  139. package/dist/messageBuffer-BWlGgR3A.mjs +71 -0
  140. package/dist/messageBuffer-fJMH6uY8.cjs +73 -0
  141. package/dist/mirrorProtocol-BNLtoWjO.mjs +170 -0
  142. package/dist/mirrorProtocol-BUtmg1ws.cjs +186 -0
  143. package/dist/oneShotPrompts-CL0dip9C.cjs +16 -0
  144. package/dist/oneShotPrompts-DT4p6RNd.mjs +12 -0
  145. package/dist/package-BhaKlnxz.mjs +171 -0
  146. package/dist/package-BwMrPwqH.cjs +173 -0
  147. package/dist/path-B7zW-WwE.cjs +18 -0
  148. package/dist/path-D2wdaNSk.mjs +15 -0
  149. package/dist/peerTools-BTqw97Gb.mjs +272 -0
  150. package/dist/peerTools-BvKtHXj8.cjs +283 -0
  151. package/dist/permissionMode-Cr5JCbB7.mjs +80 -0
  152. package/dist/permissionMode-CrV-XuMs.cjs +87 -0
  153. package/dist/persistence-HGW_ZVs9.mjs +372 -0
  154. package/dist/persistence-yKTH3-5X.cjs +414 -0
  155. package/dist/piExtension.mjs +2 -1
  156. package/dist/piRunnerArgs-BNloJCCg.cjs +66 -0
  157. package/dist/piRunnerArgs-BuX1UFWy.mjs +59 -0
  158. package/dist/{piRuntime-bkw2NAZU.mjs → piRuntime-CSGkwCKQ.mjs} +2 -2
  159. package/dist/{piRuntime-3qtbKujX.cjs → piRuntime-C_H7MJCM.cjs} +4 -4
  160. package/dist/{piTerminal-DilKwM7B.mjs → piTerminal-C8a1OrNQ.mjs} +32 -35
  161. package/dist/{piTerminal-BYxp3LMr.cjs → piTerminal-DNCZ6yTM.cjs} +32 -35
  162. package/dist/previewPath-B0rBdhy1.cjs +83 -0
  163. package/dist/previewPath-CXN4Vag0.mjs +81 -0
  164. package/dist/projectPath-BTBIMB57.mjs +10 -0
  165. package/dist/projectPath-ChLhdOyt.cjs +13 -0
  166. package/dist/registerCommonHandlers-Ccvsz7Ou.mjs +536 -0
  167. package/dist/registerCommonHandlers-DskirN-_.cjs +538 -0
  168. package/dist/registerKillSessionHandler-DZeLXWcB.cjs +361 -0
  169. package/dist/registerKillSessionHandler-GYvHdipX.mjs +358 -0
  170. package/dist/remoteSessionClient-B0LraSB9.cjs +634 -0
  171. package/dist/remoteSessionClient-CYnXRynE.mjs +612 -0
  172. package/dist/resources-BdFBQi8r.mjs +117 -0
  173. package/dist/resources-JDPugcDq.cjs +120 -0
  174. package/dist/run-CJzxoHVh.cjs +5762 -0
  175. package/dist/run-D3ifupU3.mjs +5739 -0
  176. package/dist/runClaude-Ba01qT-u.mjs +848 -0
  177. package/dist/runClaude-Da3RirzE.cjs +850 -0
  178. package/dist/runClaudeDeps-DOt79DjU.mjs +3624 -0
  179. package/dist/runClaudeDeps-DOzEBMls.cjs +3649 -0
  180. package/dist/{runGemini-Cjii069p.mjs → runGemini-BGeTz57m.mjs} +58 -31
  181. package/dist/{runGemini-28O2sqyI.cjs → runGemini-DSr9LIxL.cjs} +202 -175
  182. package/dist/{runOpenClaw-CiMZad-H.cjs → runOpenClaw-B1mTxN35.cjs} +64 -65
  183. package/dist/{runOpenClaw-jaLr7KF1.mjs → runOpenClaw-CogSedIc.mjs} +31 -32
  184. package/dist/sandbox-CG7IyDTU.cjs +187 -0
  185. package/dist/sandbox-DTe6d54R.mjs +180 -0
  186. package/dist/selfCheck-C9mVrQwf.mjs +84 -0
  187. package/dist/selfCheck-Dc-mNSLb.cjs +87 -0
  188. package/dist/{send-D5ejHPXG.cjs → send-B7J_eaG3.cjs} +16 -9
  189. package/dist/{send-C9mOtChi.mjs → send-CBXJKc6O.mjs} +12 -5
  190. package/dist/server-CZTP_iOn.cjs +407 -0
  191. package/dist/server-DcVBv04l.mjs +404 -0
  192. package/dist/sessionLock-Bys1PNSo.cjs +205 -0
  193. package/dist/sessionLock-D-EG2CfG.mjs +197 -0
  194. package/dist/sessionModeFile-DMl3dw3r.mjs +32 -0
  195. package/dist/sessionModeFile-RSm0NQkH.cjs +36 -0
  196. package/dist/sessionOps-Dn8z85h_.cjs +783 -0
  197. package/dist/sessionOps-SuHW8Dfe.mjs +760 -0
  198. package/dist/sessionScanner-BOrGjMXL.cjs +209 -0
  199. package/dist/sessionScanner-CX3onqXh.mjs +206 -0
  200. package/dist/{sessions-W6771g3X.mjs → sessions-BEG_HTSi.mjs} +17 -8
  201. package/dist/{sessions-BNMPQoLE.cjs → sessions-D74aJbhL.cjs} +37 -28
  202. package/dist/setupOfflineReconnection-ByElY60m.cjs +74 -0
  203. package/dist/setupOfflineReconnection-DpvWTt69.mjs +72 -0
  204. package/dist/smallFastModel-BLNgMrwR.mjs +18 -0
  205. package/dist/smallFastModel-D_uxGMo3.cjs +21 -0
  206. package/dist/{spawn-D0QVhzRb.mjs → spawn-B7yro0b2.mjs} +26 -38
  207. package/dist/{spawn-Ddtom1cb.cjs → spawn-DgR0RKRs.cjs} +52 -64
  208. package/dist/spawnAgents-BGQiEF-w.cjs +52 -0
  209. package/dist/spawnAgents-DZzZ9jMI.mjs +45 -0
  210. package/dist/spawnHappyCLI-B2H5s4B_.mjs +64 -0
  211. package/dist/spawnHappyCLI-DBhwZT7O.cjs +66 -0
  212. package/dist/specialCommands-BSqhYg5X.mjs +52 -0
  213. package/dist/specialCommands-DSsTeRej.cjs +54 -0
  214. package/dist/startFileWatcher-B4VsLgjD.cjs +71 -0
  215. package/dist/startFileWatcher-DErVWZE4.mjs +69 -0
  216. package/dist/startupPlan-BLMbfQIH.cjs +12 -0
  217. package/dist/startupPlan-DFMyNgAs.mjs +10 -0
  218. package/dist/streamRelay-BiKw59Cc.cjs +233 -0
  219. package/dist/streamRelay-FPVbHpbM.mjs +231 -0
  220. package/dist/sync-C8gyQFMc.mjs +69 -0
  221. package/dist/sync-DccIKZ5_.cjs +71 -0
  222. package/dist/systemPrompt-BwTPWfMu.cjs +97 -0
  223. package/dist/systemPrompt-DX521JJz.mjs +94 -0
  224. package/dist/{teams-CqSwtw2O.mjs → teams-C32F1hqd.mjs} +9 -40
  225. package/dist/{teams-BZ1tayg_.cjs → teams-Dl8g8kTI.cjs} +14 -45
  226. package/dist/template-BaHAmH2K.cjs +129 -0
  227. package/dist/template-CiOPa2rd.mjs +121 -0
  228. package/dist/{terminalTitleSuggest-DKgX3osW.mjs → terminalTitleSuggest-CeKsX_V6.mjs} +1 -9
  229. package/dist/{terminalTitleSuggest-Dji8I0Jy.cjs → terminalTitleSuggest-DhvRFX3H.cjs} +0 -10
  230. package/dist/terminals-B_bfC9c2.cjs +250 -0
  231. package/dist/terminals-Dlg0x3nY.mjs +235 -0
  232. package/dist/time-D0XyHOid.mjs +38 -0
  233. package/dist/time-DCuTyook.cjs +42 -0
  234. package/dist/titleGenerator-CQ8CoGhg.mjs +166 -0
  235. package/dist/titleGenerator-ChzMJsyg.cjs +172 -0
  236. package/dist/tmuxSocket-B8Yx20sT.mjs +19 -0
  237. package/dist/tmuxSocket-D-Xt6Vn-.cjs +24 -0
  238. package/dist/{todo-BYMg0fR0.cjs → todo-BvUOTa8G.cjs} +15 -12
  239. package/dist/{todo-BbusB1zM.mjs → todo-CZ6cFrrn.mjs} +11 -8
  240. package/dist/tools-BZtHF_qQ.mjs +177 -0
  241. package/dist/tools-Be3AoAwu.cjs +63 -0
  242. package/dist/tools-DQj0AeLk.cjs +180 -0
  243. package/dist/tools-DkluDcG4.mjs +60 -0
  244. package/dist/trimIdent-4gvk9Wk6.cjs +22 -0
  245. package/dist/trimIdent-BAjmv_TG.mjs +20 -0
  246. package/dist/types-CRS-srZK.cjs +66 -0
  247. package/dist/types-CkqAACXx.mjs +64 -0
  248. package/dist/uninstall-BkLzaJ6I.mjs +47 -0
  249. package/dist/uninstall-x-TUtf5H.cjs +49 -0
  250. package/package.json +7 -7
  251. package/dist/agentGuidance-CrR9l62U.mjs +0 -2145
  252. package/dist/agentGuidance-DwOWbX55.cjs +0 -2217
  253. package/dist/index-BG932eCh.cjs +0 -19655
  254. package/dist/index-CVCt3kSt.mjs +0 -19591
  255. package/dist/index-D5ScEErM.cjs +0 -58
  256. package/dist/index-DgO0FHOx.mjs +0 -52
  257. package/dist/limits-D2uN090G.mjs +0 -2528
  258. package/dist/limits-kqFqhfsh.cjs +0 -2652
package/dist/lib.cjs CHANGED
@@ -1,40 +1,49 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./types-DnrPeN80.cjs');
4
- var persistence = require('./limits-kqFqhfsh.cjs');
3
+ var api = require('./api-CgundNNX.cjs');
4
+ var logger = require('./logger-CS0mw3fa.cjs');
5
+ var configuration = require('./configuration-BSYpcPwE.cjs');
6
+ var types = require('./types-CRS-srZK.cjs');
5
7
  require('axios');
6
8
  require('node:events');
7
9
  require('socket.io-client');
10
+ require('./attachmentLimits-CzVrqgLR.cjs');
8
11
  require('zod');
12
+ require('./index-DA7yINuk.cjs');
13
+ require('@paralleldrive/cuid2');
14
+ require('./authRelay-BdYkC1Po.cjs');
9
15
  require('node:crypto');
16
+ require('tweetnacl');
17
+ require('./limits-C-a7gr04.cjs');
18
+ require('./time-DCuTyook.cjs');
19
+ require('./lidState-BeDfxxEX.cjs');
20
+ require('os');
10
21
  require('child_process');
22
+ require('./registerCommonHandlers-DskirN-_.cjs');
11
23
  require('util');
12
24
  require('fs/promises');
13
25
  require('crypto');
14
26
  require('path');
15
27
  require('cross-spawn');
16
- require('./terminalTitleSuggest-Dji8I0Jy.cjs');
28
+ require('./projectPath-ChLhdOyt.cjs');
17
29
  require('url');
18
- require('os');
19
- require('@paralleldrive/cuid2');
30
+ require('./sync-DccIKZ5_.cjs');
31
+ require('./backgroundTaskActivity-CBvUdj39.cjs');
32
+ require('./controlClient-Bcwv3D21.cjs');
33
+ require('./persistence-yKTH3-5X.cjs');
20
34
  require('node:fs/promises');
21
- require('node:path');
22
- require('node:os');
23
- require('node:child_process');
24
- require('node-pty');
25
35
  require('node:fs');
26
- require('fs');
27
- require('tweetnacl');
28
- require('node:readline');
29
- require('@anthropic-ai/sandbox-runtime');
30
- require('expo-server-sdk');
36
+ require('./contentLogMetadata-ZSFk_NjQ.cjs');
31
37
  require('chalk');
32
38
  require('node:util');
39
+ require('node:path');
40
+ require('node:os');
41
+ require('./package-BwMrPwqH.cjs');
33
42
 
34
43
 
35
44
 
36
- exports.ApiClient = index.ApiClient;
37
- exports.ApiSessionClient = index.ApiSessionClient;
38
- exports.RawJSONLinesSchema = index.RawJSONLinesSchema;
39
- exports.configuration = persistence.configuration;
40
- exports.logger = persistence.logger;
45
+ exports.ApiClient = api.ApiClient;
46
+ exports.ApiSessionClient = api.ApiSessionClient;
47
+ exports.logger = logger.logger;
48
+ exports.configuration = configuration.configuration;
49
+ exports.RawJSONLinesSchema = types.RawJSONLinesSchema;
package/dist/lib.d.cts CHANGED
@@ -888,6 +888,104 @@ declare class RpcHandlerManager {
888
888
  private getPrefixedMethod;
889
889
  }
890
890
 
891
+ /**
892
+ * B-509 —— server-side prompt queue drain (pure state machine, no I/O).
893
+ *
894
+ * The web no longer releases queued prompts itself; it stores them on the
895
+ * server (`/v1/sessions/:id/prompt-queue`). This process asks the server to
896
+ * pop the head item into an ordinary user message (`POST …/dispatch`) exactly
897
+ * when the runner is idle: its `MessageQueue2` is empty AND a consumer is
898
+ * blocked waiting for the next message (the turn is over). The dispatched
899
+ * message then arrives through the normal socket / catch-up path and is
900
+ * routed like anything the user typed — so it starts a turn of its own,
901
+ * never merged with a sibling (one item per turn).
902
+ *
903
+ * Guards, in order:
904
+ * - `closed` / `disabled` (404 from an old server → never retried);
905
+ * - a dispatch already in progress;
906
+ * - an `inflight` item whose message has not been routed yet (cleared by
907
+ * `onInbound(localId)`; released by timeout so a lost socket cannot wedge
908
+ * the queue — the catch-up fetch still delivers it in seq order);
909
+ * - an error backoff window;
910
+ * - `isIdle()` false.
911
+ */
912
+ type PromptQueueDispatchOutcome =
913
+ /** `remaining` = items still queued after this pop; `created:false` = the message row pre-existed (replayed localId) — nothing new will be routed. */
914
+ {
915
+ kind: 'dispatched';
916
+ localId: string;
917
+ remaining?: number;
918
+ created?: boolean;
919
+ } | {
920
+ kind: 'empty';
921
+ } | {
922
+ kind: 'unsupported';
923
+ } | {
924
+ kind: 'error';
925
+ message: string;
926
+ };
927
+ type PromptQueueDrainDeps = {
928
+ isIdle: () => boolean;
929
+ dispatch: () => Promise<PromptQueueDispatchOutcome>;
930
+ now?: () => number;
931
+ log?: (message: string) => void;
932
+ /** Schedules a retry after an error; default `setTimeout` (unref'd). */
933
+ schedule?: (fn: () => void, delayMs: number) => void;
934
+ inflightTimeoutMs?: number;
935
+ };
936
+ declare class PromptQueueDrain {
937
+ private readonly deps;
938
+ private inflight;
939
+ /**
940
+ * localIds routed while a dispatch call was still in flight. The server's
941
+ * `new-message` echo regularly beats the HTTP response (both come off the
942
+ * same transaction), so `onInbound` can precede the `dispatched` outcome;
943
+ * without this the guard armed AFTER the message had arrived and sat
944
+ * until the timeout — observed in the first isolated e2e run.
945
+ */
946
+ private arrivedDuringDispatch;
947
+ /** Items the server still holds, from the last snapshot / dispatch response. */
948
+ private pending;
949
+ private disabled;
950
+ private closed;
951
+ private busy;
952
+ private failures;
953
+ private retryAt;
954
+ private retryScheduled;
955
+ private readonly now;
956
+ private readonly log;
957
+ private readonly schedule;
958
+ private readonly inflightTimeoutMs;
959
+ constructor(deps: PromptQueueDrainDeps);
960
+ /** The runner is blocked on an empty input queue. */
961
+ onIdle(): void;
962
+ /** A `prompt-queue` snapshot arrived; only a non-empty queue is worth a call. */
963
+ onQueueChanged(count: number): void;
964
+ /**
965
+ * True while the server still holds queued prompts for this session. The
966
+ * runners fold it into their "idle, waiting for the user" judgement so a
967
+ * turn that ends with more queue behind it raises no reply_done /
968
+ * input_needed notification and no daemon `completed` report per item.
969
+ */
970
+ hasPending(): boolean;
971
+ /** A user message with this localId was routed into the runner's queue. */
972
+ onInbound(localId: string): void;
973
+ close(): void;
974
+ state(): {
975
+ inflight: {
976
+ localId: string;
977
+ since: number;
978
+ } | null;
979
+ disabled: boolean;
980
+ busy: boolean;
981
+ failures: number;
982
+ retryAt: number;
983
+ pending: number;
984
+ };
985
+ maybeDispatch(reason: string): Promise<boolean>;
986
+ private scheduleRetry;
987
+ }
988
+
891
989
  /**
892
990
  * ACP (Agent Communication Protocol) message data types.
893
991
  * This is the unified format for all agent messages - CLI adapts each provider's format to ACP.
@@ -945,6 +1043,15 @@ type ACPMessageData = {
945
1043
  [key: string]: unknown;
946
1044
  };
947
1045
  declare class ApiSessionClient extends EventEmitter {
1046
+ /**
1047
+ * B-512: the session socket now connects before the runner has attached its
1048
+ * `archived` listener (registerKillSessionHandler). An archive signal that
1049
+ * fires in that window must not be lost: remember it and replay it to any
1050
+ * listener attached later.
1051
+ */
1052
+ private archiveSignalled;
1053
+ emit(event: string | symbol, ...args: any[]): boolean;
1054
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
948
1055
  private readonly token;
949
1056
  readonly sessionId: string;
950
1057
  private metadata;
@@ -988,6 +1095,8 @@ declare class ApiSessionClient extends EventEmitter {
988
1095
  * must wait for the first fetch, otherwise a message that lands between
989
1096
  * the seed and the first fetch is routed twice (socket + fetch). */
990
1097
  private awaitingInitialFetch;
1098
+ /** B-509: server-side prompt queue drain, attached by the runner. */
1099
+ private promptQueueDrain;
991
1100
  constructor(token: string, session: Session, opts?: {
992
1101
  initialSeq?: number;
993
1102
  });
@@ -1037,6 +1146,20 @@ declare class ApiSessionClient extends EventEmitter {
1037
1146
  name: string;
1038
1147
  }>>;
1039
1148
  private authHeaders;
1149
+ /**
1150
+ * B-509: attach the server-side prompt queue drain. `isIdle` is the
1151
+ * runner's own notion (input queue empty + blocked waiting); dispatching is
1152
+ * `POST /v1/sessions/:id/prompt-queue/dispatch`, whose message then comes
1153
+ * back through the ordinary socket / catch-up path and is routed below.
1154
+ */
1155
+ attachPromptQueueDrain(opts: {
1156
+ isIdle: () => boolean;
1157
+ }): PromptQueueDrain;
1158
+ /** B-509: the server still holds queued prompts for this session (see PromptQueueDrain.hasPending). */
1159
+ promptQueueHasPending(): boolean;
1160
+ /** B-509: stop draining before the process winds down (cleanup's first line). */
1161
+ closePromptQueueDrain(): void;
1162
+ private dispatchPromptQueueHead;
1040
1163
  private routeIncomingMessage;
1041
1164
  private fetchMessages;
1042
1165
  private static readonly MAX_OUTBOX_BATCH_SIZE;
@@ -1566,8 +1689,9 @@ type SessionNotificationKind = 'done' | 'permission' | 'question';
1566
1689
  declare class PushNotificationClient {
1567
1690
  private readonly token;
1568
1691
  private readonly baseUrl;
1569
- private readonly expo;
1692
+ private expoLoad;
1570
1693
  constructor(token: string, baseUrl?: string);
1694
+ private loadExpo;
1571
1695
  /**
1572
1696
  * Fetch all push tokens for the authenticated user.
1573
1697
  * Retries up to 3 times with exponential backoff on transient errors.
@@ -1693,7 +1817,7 @@ declare class ApiClient {
1693
1817
  sessionSyncClient(session: Session, opts?: {
1694
1818
  initialSeq?: number;
1695
1819
  }): ApiSessionClient;
1696
- machineSyncClient(machine: Machine): ApiMachineClient;
1820
+ machineSyncClient(machine: Machine): Promise<ApiMachineClient>;
1697
1821
  push(): PushNotificationClient;
1698
1822
  /**
1699
1823
  * Create an account-encrypted notification producer bound to a session.
package/dist/lib.d.mts CHANGED
@@ -888,6 +888,104 @@ declare class RpcHandlerManager {
888
888
  private getPrefixedMethod;
889
889
  }
890
890
 
891
+ /**
892
+ * B-509 —— server-side prompt queue drain (pure state machine, no I/O).
893
+ *
894
+ * The web no longer releases queued prompts itself; it stores them on the
895
+ * server (`/v1/sessions/:id/prompt-queue`). This process asks the server to
896
+ * pop the head item into an ordinary user message (`POST …/dispatch`) exactly
897
+ * when the runner is idle: its `MessageQueue2` is empty AND a consumer is
898
+ * blocked waiting for the next message (the turn is over). The dispatched
899
+ * message then arrives through the normal socket / catch-up path and is
900
+ * routed like anything the user typed — so it starts a turn of its own,
901
+ * never merged with a sibling (one item per turn).
902
+ *
903
+ * Guards, in order:
904
+ * - `closed` / `disabled` (404 from an old server → never retried);
905
+ * - a dispatch already in progress;
906
+ * - an `inflight` item whose message has not been routed yet (cleared by
907
+ * `onInbound(localId)`; released by timeout so a lost socket cannot wedge
908
+ * the queue — the catch-up fetch still delivers it in seq order);
909
+ * - an error backoff window;
910
+ * - `isIdle()` false.
911
+ */
912
+ type PromptQueueDispatchOutcome =
913
+ /** `remaining` = items still queued after this pop; `created:false` = the message row pre-existed (replayed localId) — nothing new will be routed. */
914
+ {
915
+ kind: 'dispatched';
916
+ localId: string;
917
+ remaining?: number;
918
+ created?: boolean;
919
+ } | {
920
+ kind: 'empty';
921
+ } | {
922
+ kind: 'unsupported';
923
+ } | {
924
+ kind: 'error';
925
+ message: string;
926
+ };
927
+ type PromptQueueDrainDeps = {
928
+ isIdle: () => boolean;
929
+ dispatch: () => Promise<PromptQueueDispatchOutcome>;
930
+ now?: () => number;
931
+ log?: (message: string) => void;
932
+ /** Schedules a retry after an error; default `setTimeout` (unref'd). */
933
+ schedule?: (fn: () => void, delayMs: number) => void;
934
+ inflightTimeoutMs?: number;
935
+ };
936
+ declare class PromptQueueDrain {
937
+ private readonly deps;
938
+ private inflight;
939
+ /**
940
+ * localIds routed while a dispatch call was still in flight. The server's
941
+ * `new-message` echo regularly beats the HTTP response (both come off the
942
+ * same transaction), so `onInbound` can precede the `dispatched` outcome;
943
+ * without this the guard armed AFTER the message had arrived and sat
944
+ * until the timeout — observed in the first isolated e2e run.
945
+ */
946
+ private arrivedDuringDispatch;
947
+ /** Items the server still holds, from the last snapshot / dispatch response. */
948
+ private pending;
949
+ private disabled;
950
+ private closed;
951
+ private busy;
952
+ private failures;
953
+ private retryAt;
954
+ private retryScheduled;
955
+ private readonly now;
956
+ private readonly log;
957
+ private readonly schedule;
958
+ private readonly inflightTimeoutMs;
959
+ constructor(deps: PromptQueueDrainDeps);
960
+ /** The runner is blocked on an empty input queue. */
961
+ onIdle(): void;
962
+ /** A `prompt-queue` snapshot arrived; only a non-empty queue is worth a call. */
963
+ onQueueChanged(count: number): void;
964
+ /**
965
+ * True while the server still holds queued prompts for this session. The
966
+ * runners fold it into their "idle, waiting for the user" judgement so a
967
+ * turn that ends with more queue behind it raises no reply_done /
968
+ * input_needed notification and no daemon `completed` report per item.
969
+ */
970
+ hasPending(): boolean;
971
+ /** A user message with this localId was routed into the runner's queue. */
972
+ onInbound(localId: string): void;
973
+ close(): void;
974
+ state(): {
975
+ inflight: {
976
+ localId: string;
977
+ since: number;
978
+ } | null;
979
+ disabled: boolean;
980
+ busy: boolean;
981
+ failures: number;
982
+ retryAt: number;
983
+ pending: number;
984
+ };
985
+ maybeDispatch(reason: string): Promise<boolean>;
986
+ private scheduleRetry;
987
+ }
988
+
891
989
  /**
892
990
  * ACP (Agent Communication Protocol) message data types.
893
991
  * This is the unified format for all agent messages - CLI adapts each provider's format to ACP.
@@ -945,6 +1043,15 @@ type ACPMessageData = {
945
1043
  [key: string]: unknown;
946
1044
  };
947
1045
  declare class ApiSessionClient extends EventEmitter {
1046
+ /**
1047
+ * B-512: the session socket now connects before the runner has attached its
1048
+ * `archived` listener (registerKillSessionHandler). An archive signal that
1049
+ * fires in that window must not be lost: remember it and replay it to any
1050
+ * listener attached later.
1051
+ */
1052
+ private archiveSignalled;
1053
+ emit(event: string | symbol, ...args: any[]): boolean;
1054
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
948
1055
  private readonly token;
949
1056
  readonly sessionId: string;
950
1057
  private metadata;
@@ -988,6 +1095,8 @@ declare class ApiSessionClient extends EventEmitter {
988
1095
  * must wait for the first fetch, otherwise a message that lands between
989
1096
  * the seed and the first fetch is routed twice (socket + fetch). */
990
1097
  private awaitingInitialFetch;
1098
+ /** B-509: server-side prompt queue drain, attached by the runner. */
1099
+ private promptQueueDrain;
991
1100
  constructor(token: string, session: Session, opts?: {
992
1101
  initialSeq?: number;
993
1102
  });
@@ -1037,6 +1146,20 @@ declare class ApiSessionClient extends EventEmitter {
1037
1146
  name: string;
1038
1147
  }>>;
1039
1148
  private authHeaders;
1149
+ /**
1150
+ * B-509: attach the server-side prompt queue drain. `isIdle` is the
1151
+ * runner's own notion (input queue empty + blocked waiting); dispatching is
1152
+ * `POST /v1/sessions/:id/prompt-queue/dispatch`, whose message then comes
1153
+ * back through the ordinary socket / catch-up path and is routed below.
1154
+ */
1155
+ attachPromptQueueDrain(opts: {
1156
+ isIdle: () => boolean;
1157
+ }): PromptQueueDrain;
1158
+ /** B-509: the server still holds queued prompts for this session (see PromptQueueDrain.hasPending). */
1159
+ promptQueueHasPending(): boolean;
1160
+ /** B-509: stop draining before the process winds down (cleanup's first line). */
1161
+ closePromptQueueDrain(): void;
1162
+ private dispatchPromptQueueHead;
1040
1163
  private routeIncomingMessage;
1041
1164
  private fetchMessages;
1042
1165
  private static readonly MAX_OUTBOX_BATCH_SIZE;
@@ -1566,8 +1689,9 @@ type SessionNotificationKind = 'done' | 'permission' | 'question';
1566
1689
  declare class PushNotificationClient {
1567
1690
  private readonly token;
1568
1691
  private readonly baseUrl;
1569
- private readonly expo;
1692
+ private expoLoad;
1570
1693
  constructor(token: string, baseUrl?: string);
1694
+ private loadExpo;
1571
1695
  /**
1572
1696
  * Fetch all push tokens for the authenticated user.
1573
1697
  * Retries up to 3 times with exponential backoff on transient errors.
@@ -1693,7 +1817,7 @@ declare class ApiClient {
1693
1817
  sessionSyncClient(session: Session, opts?: {
1694
1818
  initialSeq?: number;
1695
1819
  }): ApiSessionClient;
1696
- machineSyncClient(machine: Machine): ApiMachineClient;
1820
+ machineSyncClient(machine: Machine): Promise<ApiMachineClient>;
1697
1821
  push(): PushNotificationClient;
1698
1822
  /**
1699
1823
  * Create an account-encrypted notification producer bound to a session.
package/dist/lib.mjs CHANGED
@@ -1,30 +1,39 @@
1
- export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema } from './types-DIBF4U0Y.mjs';
2
- export { c as configuration, l as logger } from './limits-D2uN090G.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient } from './api-CLMUr-SX.mjs';
2
+ export { l as logger } from './logger-6HYUEXNk.mjs';
3
+ export { c as configuration } from './configuration-RfeNjFmd.mjs';
4
+ export { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
3
5
  import 'axios';
4
6
  import 'node:events';
5
7
  import 'socket.io-client';
8
+ import './attachmentLimits-yba1uHFO.mjs';
6
9
  import 'zod';
10
+ import './index-qdS1friN.mjs';
11
+ import '@paralleldrive/cuid2';
12
+ import './authRelay-DSAvg1uv.mjs';
7
13
  import 'node:crypto';
14
+ import 'tweetnacl';
15
+ import './limits-DIo7rEBR.mjs';
16
+ import './time-D0XyHOid.mjs';
17
+ import './lidState-CeEt442o.mjs';
18
+ import 'os';
8
19
  import 'child_process';
20
+ import './registerCommonHandlers-Ccvsz7Ou.mjs';
9
21
  import 'util';
10
22
  import 'fs/promises';
11
23
  import 'crypto';
12
24
  import 'path';
13
25
  import 'cross-spawn';
14
- import './terminalTitleSuggest-DKgX3osW.mjs';
26
+ import './projectPath-BTBIMB57.mjs';
15
27
  import 'url';
16
- import 'os';
17
- import '@paralleldrive/cuid2';
28
+ import './sync-C8gyQFMc.mjs';
29
+ import './backgroundTaskActivity-8PdPxrvy.mjs';
30
+ import './controlClient-BGbDcgWS.mjs';
31
+ import './persistence-HGW_ZVs9.mjs';
18
32
  import 'node:fs/promises';
19
- import 'node:path';
20
- import 'node:os';
21
- import 'node:child_process';
22
- import 'node-pty';
23
33
  import 'node:fs';
24
- import 'fs';
25
- import 'tweetnacl';
26
- import 'node:readline';
27
- import '@anthropic-ai/sandbox-runtime';
28
- import 'expo-server-sdk';
34
+ import './contentLogMetadata-BlWI0egu.mjs';
29
35
  import 'chalk';
30
36
  import 'node:util';
37
+ import 'node:path';
38
+ import 'node:os';
39
+ import './package-BhaKlnxz.mjs';