very-happy-cli 0.2.189 → 0.2.191

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 (203) hide show
  1. package/dist/{AcpBackend-fj16v_cf.mjs → AcpBackend-CCy_9AfR.mjs} +3 -3
  2. package/dist/{AcpBackend-DRPJ2g9G.cjs → AcpBackend-DgrIc1vH.cjs} +3 -3
  3. package/dist/{AcpSessionManager-BZPmUDL5.mjs → AcpSessionManager-CQnxx7gD.mjs} +2 -2
  4. package/dist/{AcpSessionManager-DM-KKg6v.cjs → AcpSessionManager-DVOzCD3P.cjs} +2 -2
  5. package/dist/{BasePermissionHandler-DjM16uJz.cjs → BasePermissionHandler-C9Ag7yvs.cjs} +1 -1
  6. package/dist/{BasePermissionHandler-CVtH-snr.mjs → BasePermissionHandler-DYLN6Ec9.mjs} +1 -1
  7. package/dist/{acpSessionResume-Dxl1LRAT.mjs → acpSessionResume-Bi7pA1n_.mjs} +1 -1
  8. package/dist/{acpSessionResume-2BTMsB7_.cjs → acpSessionResume-TvP_4Zq2.cjs} +1 -1
  9. package/dist/{agentHome-CHctmMzZ.mjs → agentHome-DGv105SR.mjs} +4 -4
  10. package/dist/{agentHome-W17n1gnH.cjs → agentHome-DNUKJWOY.cjs} +4 -4
  11. package/dist/{api-BDuuyys8.cjs → api-BBxZ7y2z.cjs} +19 -10
  12. package/dist/{api-B0yN68XH.mjs → api-jfeMRg5R.mjs} +19 -10
  13. package/dist/{apiMachine-mc9CsKuS.mjs → apiMachine-DRJ7y-BB.mjs} +56 -15
  14. package/dist/{apiMachine-iddD-F19.cjs → apiMachine-DqyjKBZG.cjs} +56 -15
  15. package/dist/{attachmentContent-Cc5b7TPr.cjs → attachmentContent-BO2njyza.cjs} +2 -2
  16. package/dist/{attachmentContent-CcIdMfAx.mjs → attachmentContent-Dm_RIs5L.mjs} +2 -2
  17. package/dist/{auth-DNAgkUkB.mjs → auth-BYDtjVNb.mjs} +8 -8
  18. package/dist/{auth-CyrVvWHF.mjs → auth-DC6rg8lJ.mjs} +5 -5
  19. package/dist/{auth-B7tVmyfX.cjs → auth-DLR3ksCF.cjs} +8 -8
  20. package/dist/{auth-DQKSpaEf.cjs → auth-DnxoVkkf.cjs} +5 -5
  21. package/dist/{auto-CetlumDo.cjs → auto-CwO0u8hB.cjs} +18 -18
  22. package/dist/{auto-BklCipw1.mjs → auto-D5Jhukq1.mjs} +18 -18
  23. package/dist/{bootstrap-DfXwkUQb.mjs → bootstrap-rLaL3kTa.mjs} +2 -2
  24. package/dist/{bootstrap-CDY-Vz8q.cjs → bootstrap-sly4qPPY.cjs} +2 -2
  25. package/dist/{browser-D1yzC0Tu.cjs → browser-BTgZ9d4i.cjs} +1 -1
  26. package/dist/{browser-vb0k1zfI.mjs → browser-CHpVgyni.mjs} +1 -1
  27. package/dist/{claudeLocal-2dJIiTIq.cjs → claudeLocal-1vuTFcL8.cjs} +5 -5
  28. package/dist/{claudeLocal-Bid_rC_v.mjs → claudeLocal-Bgb5GGsq.mjs} +5 -5
  29. package/dist/{claudeLocalLauncher-Jm5oQX5Z.cjs → claudeLocalLauncher-DOsL6HFY.cjs} +10 -10
  30. package/dist/{claudeLocalLauncher-5pzpETxd.mjs → claudeLocalLauncher-T7EfT68h.mjs} +10 -10
  31. package/dist/{claudeSessionFork-DzecSBO4.mjs → claudeSessionFork-CPvi6yDX.mjs} +1 -1
  32. package/dist/{claudeSessionFork-DsbcuDEJ.cjs → claudeSessionFork-Cko4SaVi.cjs} +1 -1
  33. package/dist/{client-CvjjadIE.mjs → client-BXD66ZF5.mjs} +2 -2
  34. package/dist/{client-C9Ecbtko.mjs → client-Bh1aUPh-.mjs} +4 -4
  35. package/dist/{client-B161HwAk.mjs → client-Bi20Ka0h.mjs} +2 -2
  36. package/dist/{client-D0aYWt53.cjs → client-BscskEBk.cjs} +2 -2
  37. package/dist/{client-BNmFaRXZ.cjs → client-C-OdTbrU.cjs} +4 -4
  38. package/dist/{client-DIfxYk7B.cjs → client-C5-C0t2a.cjs} +2 -2
  39. package/dist/codex/happyMcpStdioBridge.cjs +16 -16
  40. package/dist/codex/happyMcpStdioBridge.mjs +16 -16
  41. package/dist/{codexAppServerClient-CO9f4Jr8.cjs → codexAppServerClient-DKXeikEe.cjs} +13 -6
  42. package/dist/{codexAppServerClient-BlVmpjR-.mjs → codexAppServerClient-DXhAf6i-.mjs} +13 -6
  43. package/dist/{codexCommand-CAMR4g5o.mjs → codexCommand-CIaOiiOj.mjs} +137 -55
  44. package/dist/{codexCommand-BfoRP6E9.cjs → codexCommand-DvbbpYBS.cjs} +141 -59
  45. package/dist/{codexTermination-BvGlN02_.mjs → codexTermination-BcQdEDaw.mjs} +1 -1
  46. package/dist/{codexTermination-IrLZQzKC.cjs → codexTermination-BszWfyk5.cjs} +1 -1
  47. package/dist/{codexThreadFork-DNekT4nQ.cjs → codexThreadFork-5kwoKjMu.cjs} +11 -17
  48. package/dist/{codexThreadFork-R76RU5H0.mjs → codexThreadFork-DobPd19R.mjs} +11 -17
  49. package/dist/{config-BGFqQGvh.cjs → config-Di3Cf6js.cjs} +3 -3
  50. package/dist/{config-CtMgGPvf.mjs → config-OCEcVVK1.mjs} +3 -3
  51. package/dist/{configuration-C0ctLGW2.cjs → configuration-DfPBa-9d.cjs} +1 -1
  52. package/dist/{configuration-1FabKklB.mjs → configuration-ECqXu34R.mjs} +1 -1
  53. package/dist/{connect-DSw-2f52.cjs → connect-BPQRuOw5.cjs} +13 -13
  54. package/dist/{connect-0lSugpjf.mjs → connect-BTfAUhk8.mjs} +13 -13
  55. package/dist/{context-BgxbXWKS.mjs → context-CfgTFpCB.mjs} +1 -1
  56. package/dist/{context-D-hEk5pC.cjs → context-Co7hUaW-.cjs} +1 -1
  57. package/dist/{controlClient-F7hAEEy2.cjs → controlClient-C13_pSKG.cjs} +3 -3
  58. package/dist/{controlClient-DwNnNAUx.mjs → controlClient-ClI7A0qE.mjs} +3 -3
  59. package/dist/{createSessionMetadata-CG6Klinp.mjs → createSessionMetadata-B0eT_Kfj.mjs} +2 -2
  60. package/dist/{createSessionMetadata-DezS33OM.cjs → createSessionMetadata-Cf78KHtt.cjs} +2 -2
  61. package/dist/defaultPermissionMode-m6z2QVyP.mjs +43 -0
  62. package/dist/defaultPermissionMode-oqTupStc.cjs +49 -0
  63. package/dist/{deterministicJson-BMwgK21e.mjs → deterministicJson-BtSwbsok.mjs} +13 -13
  64. package/dist/{deterministicJson-D0LU_XbO.cjs → deterministicJson-CpFFgUL_.cjs} +13 -13
  65. package/dist/{doctor-wVNvRarN.cjs → doctor-BEU0_1Xv.cjs} +7 -7
  66. package/dist/{doctor-D16hySse.mjs → doctor-lsxmAK4o.mjs} +7 -7
  67. package/dist/{downloadTarget-C6tqaXGm.mjs → downloadTarget-BXqXhNF7.mjs} +6 -6
  68. package/dist/{downloadTarget-aNcCxVRL.cjs → downloadTarget-CikzJv1h.cjs} +6 -6
  69. package/dist/{ensureDaemonRunning-CIghxgDR.cjs → ensureDaemonRunning-BUuH-pbE.cjs} +5 -5
  70. package/dist/{ensureDaemonRunning-DZq8bvsp.mjs → ensureDaemonRunning-B_9WAlbU.mjs} +5 -5
  71. package/dist/exitAfterFlush-AbKNZM0N.mjs +23 -0
  72. package/dist/exitAfterFlush-DIT_sIxR.cjs +25 -0
  73. package/dist/{handleResumeCommand-BNnD7EuD.mjs → handleResumeCommand-BK9XKH_l.mjs} +5 -5
  74. package/dist/{handleResumeCommand-CMUTygsm.cjs → handleResumeCommand-Dj7oi2KO.cjs} +5 -5
  75. package/dist/{agentAttachments-Dbw8iMCZ.cjs → heldInput-BOtqFO2r.cjs} +27 -0
  76. package/dist/heldInput-C69lA2dH.mjs +44 -0
  77. package/dist/{index-BCQr-5Ei.mjs → index-BdOJOZ6J.mjs} +4 -4
  78. package/dist/{index-CKd20r1W.mjs → index-BjZnpGWX.mjs} +3 -3
  79. package/dist/{index-WKyN-bNy.mjs → index-Bq8NKSCF.mjs} +65 -1
  80. package/dist/{index-BOe6dKnL.cjs → index-CLUHaPU8.cjs} +76 -0
  81. package/dist/{index-CnzsOD19.cjs → index-CauRYQKr.cjs} +133 -54
  82. package/dist/{index-4TpmBb2Q.cjs → index-CmZusg8Q.cjs} +3 -3
  83. package/dist/{index-BuiG8hmg.mjs → index-Cxso1rg4.mjs} +133 -54
  84. package/dist/{index-De02DNu5.cjs → index-D3c7CLot.cjs} +4 -4
  85. package/dist/{index-B81qV_F_.cjs → index-Dg2NAF_-.cjs} +4 -4
  86. package/dist/{index-Df0bc_et.mjs → index-DuK9XYbZ.mjs} +4 -4
  87. package/dist/index.cjs +2 -2
  88. package/dist/index.mjs +2 -2
  89. package/dist/{install-23ehAdTD.mjs → install-DTIveLOS.mjs} +3 -3
  90. package/dist/{install-DNbIEJUk.cjs → install-DXllkuy0.cjs} +3 -3
  91. package/dist/lib.cjs +12 -12
  92. package/dist/lib.d.cts +63 -1
  93. package/dist/lib.d.mts +63 -1
  94. package/dist/lib.mjs +12 -12
  95. package/dist/{lidState-B4dHJCeS.cjs → lidState-C9_DoF9i.cjs} +1 -1
  96. package/dist/{lidState-q5Its2Hm.mjs → lidState-CD81ryTy.mjs} +1 -1
  97. package/dist/{localHappyAgentAuth-CG2nPD_H.cjs → localHappyAgentAuth-CCjUvOfi.cjs} +1 -1
  98. package/dist/{localHappyAgentAuth-C_G5u5lY.mjs → localHappyAgentAuth-Cg-m1lwm.mjs} +1 -1
  99. package/dist/{logger-BP1SW7Cs.cjs → logger-Ct2zvaq0.cjs} +2 -2
  100. package/dist/{logger-DOKH3Zbh.mjs → logger-GcbI0eg2.mjs} +2 -2
  101. package/dist/{machineMetadata-D-5qeIqd.mjs → machineMetadata-CXRmFNOV.mjs} +3 -3
  102. package/dist/{machineMetadata-BKX3ov9g.cjs → machineMetadata-DDCVWb_x.cjs} +3 -3
  103. package/dist/{main-ndpVIaSG.cjs → main-BHC-WIcM.cjs} +49 -48
  104. package/dist/{main-DODz8DQE.mjs → main-omGr_ONk.mjs} +49 -48
  105. package/dist/{mcp-BBwbSODp.mjs → mcp-D5hxmRAq.mjs} +15 -15
  106. package/dist/{mcp-Bc4U4exu.cjs → mcp-xUzii0m8.cjs} +15 -15
  107. package/dist/{mirrorProtocol-CiA3hO2y.cjs → mirrorProtocol-Dfl8Ahyf.cjs} +3 -3
  108. package/dist/{mirrorProtocol-D2vTWteS.mjs → mirrorProtocol-Lcx20Oby.mjs} +3 -3
  109. package/dist/{package-CYDdLA6R.cjs → package-9n7wd2dT.cjs} +7 -7
  110. package/dist/{package-DTcaIhjW.mjs → package-BsUHyqWe.mjs} +7 -7
  111. package/dist/{panels-C2xZ8rqU.cjs → panels-BfknEmt7.cjs} +5 -5
  112. package/dist/{panels-DCaLxlSL.mjs → panels-CpEKWWbI.mjs} +5 -5
  113. package/dist/{peerTools-B4315xjX.cjs → peerTools-CElYh-5u.cjs} +5 -5
  114. package/dist/{peerTools-BtrUnSwz.mjs → peerTools-CwCe6tmJ.mjs} +5 -5
  115. package/dist/{persistence-CrzC7yr_.cjs → persistence-A2NeERZJ.cjs} +6 -2
  116. package/dist/{persistence-0INrP3aB.mjs → persistence-Cpw4yJs8.mjs} +6 -3
  117. package/dist/{piRunnerArgs-BtzW_kfh.cjs → piRunnerArgs-BnFU0K73.cjs} +1 -1
  118. package/dist/{piRunnerArgs-DRuxMlX1.mjs → piRunnerArgs-Bqmu16He.mjs} +1 -1
  119. package/dist/{piRuntime-BMAFpIBV.mjs → piRuntime-Cgn1b0OX.mjs} +1 -1
  120. package/dist/{piRuntime-DEbPE_kW.cjs → piRuntime-DpS9TAIs.cjs} +1 -1
  121. package/dist/{piTerminal-DQXV8_we.mjs → piTerminal-BGdps8f3.mjs} +17 -17
  122. package/dist/{piTerminal-MtxDtBE2.cjs → piTerminal-rmve-VlI.cjs} +17 -17
  123. package/dist/{pushNotifications-CalIS9sq.cjs → pushNotifications-23YSd-0l.cjs} +28 -3
  124. package/dist/{pushNotifications-Cq1s8YVK.mjs → pushNotifications-XAM8__Pg.mjs} +28 -3
  125. package/dist/{query-BYiPBHPC.mjs → query-SZcYnJoW.mjs} +1 -1
  126. package/dist/{query-CE2XDhhw.cjs → query-u2GX-I0C.cjs} +1 -1
  127. package/dist/{rateLimitReporter-DR5LXuiQ.mjs → rateLimitReporter-COUkf446.mjs} +3 -3
  128. package/dist/{rateLimitReporter-BKmoOZQi.cjs → rateLimitReporter-CaTzBe3x.cjs} +3 -3
  129. package/dist/{rateLimitWindows-Cs56YJCH.cjs → rateLimitWindows-B2Kx6L0S.cjs} +1 -1
  130. package/dist/{rateLimitWindows-5vIuNjko.mjs → rateLimitWindows-j_qQk0KY.mjs} +1 -1
  131. package/dist/{registerCommonHandlers-DZPozYxc.cjs → registerCommonHandlers-D1MiSfcB.cjs} +2 -2
  132. package/dist/{registerCommonHandlers-DWkTysjD.mjs → registerCommonHandlers-DRRfinzK.mjs} +2 -2
  133. package/dist/{registerKillSessionHandler-CSCTRIbI.mjs → registerKillSessionHandler-Cpug_r5C.mjs} +16 -6
  134. package/dist/{registerKillSessionHandler-DhCjrs44.cjs → registerKillSessionHandler-hvCsEn7b.cjs} +16 -6
  135. package/dist/{remoteSessionClient-Dq8XTLQP.cjs → remoteSessionClient-6ymeMVa4.cjs} +5 -5
  136. package/dist/{remoteSessionClient-Vfj_5g2-.mjs → remoteSessionClient-BdnJ_n8C.mjs} +5 -5
  137. package/dist/{reportProgressTool-B7zmX7NJ.mjs → reportProgressTool-XgQBzxoD.mjs} +3 -3
  138. package/dist/{reportProgressTool-DznxPKES.cjs → reportProgressTool-tzQLCLIw.cjs} +3 -3
  139. package/dist/{run-DSfNcR62.mjs → run-Bt0AklUU.mjs} +396 -43
  140. package/dist/{run-Ca8BiNCp.cjs → run-DYL_wuj7.cjs} +396 -43
  141. package/dist/{runClaude-hoepv-0X.mjs → runClaude-C3rii_S6.mjs} +47 -27
  142. package/dist/{runClaude-ClQQcgoO.cjs → runClaude-CBEpYO4S.cjs} +49 -29
  143. package/dist/{runClaudeDeps-ck5_GYlP.cjs → runClaudeDeps-CYuozSC6.cjs} +187 -61
  144. package/dist/{runClaudeDeps-D_v8t2SK.mjs → runClaudeDeps-DlVfMG4F.mjs} +192 -66
  145. package/dist/{runGemini-Cj0XsMiM.cjs → runGemini-CEI3b90u.cjs} +33 -33
  146. package/dist/{runGemini-CTr2-cYG.mjs → runGemini-DkYhRk9S.mjs} +33 -33
  147. package/dist/{runOpenClaw-BoN1e3lP.cjs → runOpenClaw-BgjD6E4d.cjs} +18 -18
  148. package/dist/{runOpenClaw-CdDMntiV.mjs → runOpenClaw-DpprWCoz.mjs} +18 -18
  149. package/dist/{sandbox-DcaWB-Ou.mjs → sandbox-DJ7A7lsy.mjs} +4 -4
  150. package/dist/{sandbox-BY2h19gc.cjs → sandbox-XCDUbH72.cjs} +4 -4
  151. package/dist/{selfCheck-DFS_GUaQ.cjs → selfCheck-BYUDB1Uq.cjs} +37 -37
  152. package/dist/selfCheck-C-rNljKV.mjs +86 -0
  153. package/dist/{send-UBTHHNvZ.mjs → send-Ba63huxv.mjs} +8 -8
  154. package/dist/{send-BMsUYU6g.cjs → send-CASDBCyJ.cjs} +8 -8
  155. package/dist/{server-YrHMHNz1.cjs → server-cZoV9XRt.cjs} +6 -6
  156. package/dist/{server-Dt3mCtfQ.mjs → server-w3W0toNd.mjs} +4 -4
  157. package/dist/{sessionLock-DSqiP2lH.cjs → sessionLock-BmLA2S8K.cjs} +134 -3
  158. package/dist/{sessionLock-tEFvFXLD.mjs → sessionLock-G2PMqvsh.mjs} +121 -4
  159. package/dist/{sessionOps-CljctDs5.mjs → sessionOps-DPw5k8vV.mjs} +15 -5
  160. package/dist/{sessionOps-BzeOKIEF.cjs → sessionOps-DXlTmS7J.cjs} +15 -4
  161. package/dist/{sessionProvider-BnUFSJXM.mjs → sessionProvider-DUn91LhJ.mjs} +5 -5
  162. package/dist/{sessionProvider-ORgzmkXy.cjs → sessionProvider-Dg691XQ4.cjs} +5 -5
  163. package/dist/{sessionScanner-Cr6PJ3PT.cjs → sessionScanner-AHjnicxi.cjs} +3 -3
  164. package/dist/{sessionScanner-DZUlkdF6.mjs → sessionScanner-BCXpdZJN.mjs} +3 -3
  165. package/dist/{sessions-aIo_HjmY.cjs → sessions-BiBXOBx0.cjs} +36 -25
  166. package/dist/{sessions-15cag-su.mjs → sessions-Clk8MR5Y.mjs} +35 -26
  167. package/dist/{setupOfflineReconnection-tV0Q1dgR.cjs → setupOfflineReconnection-BKLfOd-i.cjs} +2 -2
  168. package/dist/{setupOfflineReconnection-B7I8R2Ex.mjs → setupOfflineReconnection-DI-QZGYz.mjs} +2 -2
  169. package/dist/{spawn-ByrQgruJ.mjs → spawn-4tsp1uhh.mjs} +15 -15
  170. package/dist/{spawn-VG-HjJiR.cjs → spawn-D5omsx1Q.cjs} +15 -15
  171. package/dist/{spawnAgents-Bh1RPShN.mjs → spawnAgents-CjoU6ZOS.mjs} +8 -2
  172. package/dist/{spawnAgents-C1-4m7aN.cjs → spawnAgents-CtkkIFHd.cjs} +8 -2
  173. package/dist/{spawnHappyCLI-CxiR2Qoy.cjs → spawnHappyCLI-CF_gLi92.cjs} +1 -1
  174. package/dist/{spawnHappyCLI-CEsXwz5V.mjs → spawnHappyCLI-CIA9Sc_5.mjs} +1 -1
  175. package/dist/{startFileWatcher-C-XCZ5t2.cjs → startFileWatcher-9Stpxe7p.cjs} +1 -1
  176. package/dist/{startFileWatcher-DkEeeAtL.mjs → startFileWatcher-CDO6fb2m.mjs} +1 -1
  177. package/dist/{defaultPermissionMode-e2bIIJG4.mjs → startupSessionCreate-BtR4iYEC.mjs} +25 -6
  178. package/dist/{defaultPermissionMode-5EvgRq38.cjs → startupSessionCreate-CcF7rGGB.cjs} +25 -7
  179. package/dist/{streamRelay-D9a4cBEa.cjs → streamRelay-BhI6jqF-.cjs} +1 -1
  180. package/dist/{streamRelay-CqBynIon.mjs → streamRelay-DMwOMTKf.mjs} +1 -1
  181. package/dist/{sync-CoChLEIg.cjs → sync-Ba8N6xba.cjs} +1 -1
  182. package/dist/{sync-BvDMkKAN.mjs → sync-C0PRuTMj.mjs} +1 -1
  183. package/dist/{systemPrompt-CgDaPigN.mjs → systemPrompt-D0q8eyjy.mjs} +2 -2
  184. package/dist/{systemPrompt-Dy_Rf-0Z.cjs → systemPrompt-DV5IReD4.cjs} +2 -2
  185. package/dist/{teams-BC4_e5hR.mjs → teams-BO3_arwM.mjs} +7 -7
  186. package/dist/{teams-DPvfLAk8.cjs → teams-z3Gp-KlV.cjs} +7 -7
  187. package/dist/{template-17HATY_Y.cjs → template-B_5l6pkc.cjs} +1 -1
  188. package/dist/{template-CEK8MEjo.mjs → template-DLR_0hfj.mjs} +1 -1
  189. package/dist/{time-XwEZxKGc.cjs → time-Cy0a-7YX.cjs} +1 -1
  190. package/dist/{time-CUK37wiV.mjs → time-D0jvDRhn.mjs} +1 -1
  191. package/dist/{titleGenerator-DWRVdqMU.mjs → titleGenerator-AGQsXskb.mjs} +1 -1
  192. package/dist/{titleGenerator-DVX0NZUn.cjs → titleGenerator-RGHWP2YL.cjs} +2 -2
  193. package/dist/{todo-BNMGXneA.mjs → todo-BZ954vsz.mjs} +6 -6
  194. package/dist/{todo-CKGrSrRE.cjs → todo-CzIDPLFy.cjs} +6 -6
  195. package/dist/{tools-CjMafO_D.cjs → tools-B1x1j6tz.cjs} +1 -1
  196. package/dist/{tools-CCIEAVbB.mjs → tools-Bei5i03L.mjs} +1 -1
  197. package/dist/{uninstall-CJvJ7gjr.mjs → uninstall-B4T_e3Mr.mjs} +3 -3
  198. package/dist/{uninstall-BdFbTXnL.cjs → uninstall-C3cnIvz1.cjs} +3 -3
  199. package/package.json +7 -7
  200. package/dist/agentAttachments-M_B5qEF2.mjs +0 -18
  201. package/dist/selfCheck-BQ_H2Sns.mjs +0 -86
  202. package/dist/startupSessionCreate-CYc8mra-.cjs +0 -26
  203. package/dist/startupSessionCreate-npXe2TdN.mjs +0 -24
@@ -1,81 +1,81 @@
1
- import { l as logger } from './logger-DOKH3Zbh.mjs';
2
- import { q as notifyDaemonSessionEvent, t as notifyDaemonClaudeAuthFailed } from './controlClient-DwNnNAUx.mjs';
3
- export { k as reportSessionEditToDaemon } from './controlClient-DwNnNAUx.mjs';
1
+ import { l as logger } from './logger-GcbI0eg2.mjs';
2
+ import { q as notifyDaemonSessionEvent, t as notifyDaemonClaudeAuthFailed } from './controlClient-ClI7A0qE.mjs';
3
+ export { k as reportSessionEditToDaemon } from './controlClient-ClI7A0qE.mjs';
4
4
  import { s as sameBackgroundTasks, c as createBackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
5
- import { c as createProjectInjector, h as hashObject, l as leadBoardFor } from './deterministicJson-BMwgK21e.mjs';
6
- export { s as startHappyServer } from './deterministicJson-BMwgK21e.mjs';
7
- import { s as sharedProjectsClient } from './client-B161HwAk.mjs';
5
+ import { c as createProjectInjector, h as hashObject, l as leadBoardFor } from './deterministicJson-BtSwbsok.mjs';
6
+ export { s as startHappyServer } from './deterministicJson-BtSwbsok.mjs';
7
+ import { s as sharedProjectsClient } from './client-Bi20Ka0h.mjs';
8
8
  import { randomInt, randomUUID, createHash } from 'node:crypto';
9
9
  import { a as parseSpecialCommand } from './specialCommands-MXUN0wfI.mjs';
10
10
  import { M as MessageBuffer } from './sessionExitLifecycle-CzkLIgNZ.mjs';
11
11
  export { S as SessionExitGate, e as exitIntentFromArchiveFlag, s as settleSessionOnExit } from './sessionExitLifecycle-CzkLIgNZ.mjs';
12
- import { q as query } from './query-BYiPBHPC.mjs';
12
+ import { q as query } from './query-SZcYnJoW.mjs';
13
13
  import { AbortError } from '@anthropic-ai/claude-agent-sdk';
14
14
  import { m as mapToClaudeMode, p as parseClaudePermissionMode, c as resolveRemoteClaudePermissionMode } from './permissionMode-CH4FoZfU.mjs';
15
- import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-CgDaPigN.mjs';
15
+ import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-D0q8eyjy.mjs';
16
16
  import { join, resolve, dirname } from 'node:path';
17
17
  import 'axios';
18
18
  import 'node:events';
19
19
  import 'socket.io-client';
20
- import { A as AsyncLock } from './pushNotifications-Cq1s8YVK.mjs';
20
+ import { A as AsyncLock } from './pushNotifications-XAM8__Pg.mjs';
21
21
  import 'tweetnacl';
22
- import { c as configuration, e as ensurePrivateDirectory } from './configuration-1FabKklB.mjs';
23
- import './index-WKyN-bNy.mjs';
24
- import './registerCommonHandlers-DWkTysjD.mjs';
22
+ import { c as configuration, e as ensurePrivateDirectory } from './configuration-ECqXu34R.mjs';
23
+ import './index-Bq8NKSCF.mjs';
24
+ import './registerCommonHandlers-DRRfinzK.mjs';
25
25
  import 'os';
26
26
  import 'child_process';
27
27
  import '@paralleldrive/cuid2';
28
- import './persistence-0INrP3aB.mjs';
28
+ import './persistence-Cpw4yJs8.mjs';
29
29
  import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
30
30
  import 'chalk';
31
31
  import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
32
32
  import { g as getProjectPath } from './path-D2wdaNSk.mjs';
33
33
  import { access } from 'fs/promises';
34
- import { d as delay } from './time-CUK37wiV.mjs';
34
+ import { d as delay } from './time-D0jvDRhn.mjs';
35
35
  import { mkdirSync, writeFileSync, readFileSync, unlinkSync, renameSync, statSync, existsSync } from 'node:fs';
36
- import { F as Future, d as describeClaudeProcessExit } from './sessionScanner-DZUlkdF6.mjs';
37
- export { c as createSessionScanner } from './sessionScanner-DZUlkdF6.mjs';
36
+ import { F as Future, d as describeClaudeProcessExit } from './sessionScanner-BCXpdZJN.mjs';
37
+ export { c as createSessionScanner } from './sessionScanner-BCXpdZJN.mjs';
38
38
  import { execSync } from 'node:child_process';
39
- import { S as StreamRelay } from './streamRelay-CqBynIon.mjs';
40
- import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CcIdMfAx.mjs';
39
+ import { S as StreamRelay } from './streamRelay-DMwOMTKf.mjs';
40
+ import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-Dm_RIs5L.mjs';
41
41
  import { writeFile, rename, unlink, readFile } from 'node:fs/promises';
42
- import { F as ForkSourceMissingError } from './claudeSessionFork-DzecSBO4.mjs';
43
- import { w as wrapperRateLimitReporter } from './rateLimitReporter-DR5LXuiQ.mjs';
44
- export { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-CSCTRIbI.mjs';
45
- export { g as getEnvironmentInfo } from './doctor-D16hySse.mjs';
42
+ import { F as ForkSourceMissingError } from './claudeSessionFork-CPvi6yDX.mjs';
43
+ import { w as wrapperRateLimitReporter } from './rateLimitReporter-COUkf446.mjs';
44
+ export { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-Cpug_r5C.mjs';
45
+ export { g as getEnvironmentInfo } from './doctor-lsxmAK4o.mjs';
46
46
  import { createServer } from 'node:http';
47
47
  export { E as EditReportThrottle, b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
48
48
  import { p as projectPath } from './projectPath-BTBIMB57.mjs';
49
49
  export { s as snapshotTree, t as terminateSurvivors } from './processTreeSnapshot-CuLJDNC-.mjs';
50
- import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-DWRVdqMU.mjs';
51
- export { T as TitleGenerator } from './titleGenerator-DWRVdqMU.mjs';
50
+ import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-AGQsXskb.mjs';
51
+ export { T as TitleGenerator } from './titleGenerator-AGQsXskb.mjs';
52
52
  import { B as BOARD_ANALYZER_PROMPT_PREFIX } from './oneShotPrompts-DT4p6RNd.mjs';
53
- import { i as isSelfReportFresh } from './reportProgressTool-B7zmX7NJ.mjs';
54
- export { c as createSelfReportState } from './reportProgressTool-B7zmX7NJ.mjs';
53
+ import { i as isSelfReportFresh } from './reportProgressTool-XgQBzxoD.mjs';
54
+ export { c as createSelfReportState } from './reportProgressTool-XgQBzxoD.mjs';
55
55
  import 'node:util';
56
56
  import './prompt-QHuFx9j6.mjs';
57
57
  import 'node:os';
58
58
  import 'zod';
59
59
  import './pi-CqyoZMjI.mjs';
60
60
  import './fileStore-5qpetZS0.mjs';
61
- import './client-C9Ecbtko.mjs';
62
- import './context-BgxbXWKS.mjs';
63
- import './sessionOps-CljctDs5.mjs';
61
+ import './client-Bh1aUPh-.mjs';
62
+ import './context-CfgTFpCB.mjs';
63
+ import './sessionOps-DPw5k8vV.mjs';
64
64
  import './authRelay-DhQhkBvX.mjs';
65
65
  import './resources-CLP_MpK4.mjs';
66
- import './tools-CCIEAVbB.mjs';
67
- import './peerTools-BtrUnSwz.mjs';
66
+ import './tools-Bei5i03L.mjs';
67
+ import './peerTools-CwCe6tmJ.mjs';
68
68
  import './ids-DU6sLx4C.mjs';
69
- import './remoteSessionClient-Vfj_5g2-.mjs';
69
+ import './remoteSessionClient-BdnJ_n8C.mjs';
70
70
  import '@modelcontextprotocol/sdk/server/mcp.js';
71
71
  import '@modelcontextprotocol/sdk/server/streamableHttp.js';
72
72
  import './limits-DIo7rEBR.mjs';
73
- import './downloadTarget-C6tqaXGm.mjs';
73
+ import './downloadTarget-BXqXhNF7.mjs';
74
74
  import './terminals-Dlg0x3nY.mjs';
75
75
  import './terminalTitleSuggest-CeKsX_V6.mjs';
76
76
  import './tmuxSocket-B8Yx20sT.mjs';
77
- import './bootstrap-DfXwkUQb.mjs';
78
- import './package-DTcaIhjW.mjs';
77
+ import './bootstrap-rLaL3kTa.mjs';
78
+ import './package-BsUHyqWe.mjs';
79
79
  import './agentGuidance-BDYt2Qy2.mjs';
80
80
  import './trimIdent-BAjmv_TG.mjs';
81
81
  import './webPanels-B2_C2-3g.mjs';
@@ -85,22 +85,22 @@ import './promptCacheTtl-Ce0TVbrx.mjs';
85
85
  import 'util';
86
86
  import 'path';
87
87
  import 'cross-spawn';
88
- import './sync-BvDMkKAN.mjs';
88
+ import './sync-C0PRuTMj.mjs';
89
89
  import './transcriptCursor-B7T_gkQ0.mjs';
90
- import './startFileWatcher-DkEeeAtL.mjs';
90
+ import './startFileWatcher-CDO6fb2m.mjs';
91
91
  import 'node:readline';
92
- import './rateLimitWindows-5vIuNjko.mjs';
92
+ import './rateLimitWindows-j_qQk0KY.mjs';
93
93
  import './doctor-BPkYWSuq.mjs';
94
94
  import 'ps-list';
95
95
  import './doctorReadiness-C208SMN9.mjs';
96
96
  import './detectCLI-CSGMlV51.mjs';
97
97
  import 'fs';
98
98
  import './cliUpdate-Y34VGe9Y.mjs';
99
- import './piRunnerArgs-DRuxMlX1.mjs';
100
- import './acpSessionResume-Dxl1LRAT.mjs';
99
+ import './piRunnerArgs-Bqmu16He.mjs';
100
+ import './acpSessionResume-Bi7pA1n_.mjs';
101
101
  import 'url';
102
102
  import 'node:module';
103
- import './client-CvjjadIE.mjs';
103
+ import './client-BXD66ZF5.mjs';
104
104
  import './precheckCompat-DeEbilbr.mjs';
105
105
 
106
106
  const SCHEDULE_WAKEUP_GRACE_MS = 6e4;
@@ -772,6 +772,10 @@ function planUnconfirmedCommands(commands, context) {
772
772
  tombstone: commands.filter((_, i) => i !== index).map((c) => c.uuid)
773
773
  };
774
774
  }
775
+ function planUndeliveredMessage(message, context) {
776
+ if (context.exiting || !context.parkFree) return null;
777
+ return { ...message, finalized: true };
778
+ }
775
779
 
776
780
  const AUTH_FAILURE_RESULT_TEXT = /Failed to authenticate|OAuth session expired/i;
777
781
  const QUERY_RECYCLE_NOTICE = {
@@ -938,6 +942,56 @@ function compactOutcomeEvent(result, status) {
938
942
  return "Compaction completed";
939
943
  }
940
944
 
945
+ class TimeoutError extends Error {
946
+ constructor(message) {
947
+ super(message);
948
+ this.name = "TimeoutError";
949
+ }
950
+ }
951
+ function withTimeout(promise, ms, label) {
952
+ promise.catch(() => {
953
+ });
954
+ let timer;
955
+ const timeout = new Promise((_, reject) => {
956
+ timer = setTimeout(() => reject(new TimeoutError(`${label ? `${label} ` : ""}timed out after ${ms}ms`)), ms);
957
+ });
958
+ return Promise.race([promise, timeout]).finally(() => {
959
+ if (timer) clearTimeout(timer);
960
+ });
961
+ }
962
+
963
+ const GET_SETTINGS_TIMEOUT_MS = 3e3;
964
+ const EFFORTS = /* @__PURE__ */ new Set(["low", "medium", "high", "xhigh", "max"]);
965
+ function parseClaudeRunFacts(raw) {
966
+ const facts = {};
967
+ if (!raw || typeof raw !== "object") return facts;
968
+ const { applied, effective } = raw;
969
+ if (applied && typeof applied === "object" && "effort" in applied) {
970
+ const effort = applied.effort;
971
+ if (effort === null) facts.effort = null;
972
+ else if (typeof effort === "string" && EFFORTS.has(effort)) facts.effort = effort;
973
+ }
974
+ if (effective && typeof effective === "object") {
975
+ const model = effective.model;
976
+ facts.configuredModel = typeof model === "string" && model.trim() ? model.trim() : null;
977
+ }
978
+ return facts;
979
+ }
980
+ async function readClaudeRunFacts(query, timeoutMs = GET_SETTINGS_TIMEOUT_MS) {
981
+ const reader = query;
982
+ if (typeof reader?.getSettings !== "function") return null;
983
+ try {
984
+ return parseClaudeRunFacts(await withTimeout(reader.getSettings(), timeoutMs, "get_settings"));
985
+ } catch {
986
+ return null;
987
+ }
988
+ }
989
+ async function liveModelTarget(query, model, timeoutMs = GET_SETTINGS_TIMEOUT_MS) {
990
+ if (model) return model;
991
+ const facts = await readClaudeRunFacts(query, timeoutMs);
992
+ return facts?.configuredModel ?? void 0;
993
+ }
994
+
941
995
  const SDK_TIMING_FIELDS = ["ttft_ms", "time_to_request_ms", "time_to_request_from_spawn_ms"];
942
996
  function delta(from, to) {
943
997
  if (typeof from !== "number" || typeof to !== "number" || to < from) return "-";
@@ -1202,24 +1256,6 @@ function createClaudePrewarmLease(input) {
1202
1256
  return lease;
1203
1257
  }
1204
1258
 
1205
- class TimeoutError extends Error {
1206
- constructor(message) {
1207
- super(message);
1208
- this.name = "TimeoutError";
1209
- }
1210
- }
1211
- function withTimeout(promise, ms, label) {
1212
- promise.catch(() => {
1213
- });
1214
- let timer;
1215
- const timeout = new Promise((_, reject) => {
1216
- timer = setTimeout(() => reject(new TimeoutError(`${label ? `${label} ` : ""}timed out after ${ms}ms`)), ms);
1217
- });
1218
- return Promise.race([promise, timeout]).finally(() => {
1219
- if (timer) clearTimeout(timer);
1220
- });
1221
- }
1222
-
1223
1259
  function readClaudeSessionState(message) {
1224
1260
  const m = message;
1225
1261
  if (!m || m.type !== "system" || m.subtype !== "session_state_changed") return null;
@@ -1510,7 +1546,7 @@ async function claudeRemote(opts) {
1510
1546
  }
1511
1547
  if (!reason && decision.switchModel) {
1512
1548
  try {
1513
- await withTimeout(w.response.setModel(modelTarget(initial.mode.model)), w.lease.adoptTimeoutMs);
1549
+ await withTimeout(w.response.setModel(await liveModelTarget(w.response, modelTarget(initial.mode.model), w.lease.adoptTimeoutMs)), w.lease.adoptTimeoutMs);
1514
1550
  } catch {
1515
1551
  reason = "set-model-failed";
1516
1552
  }
@@ -1562,7 +1598,8 @@ async function claudeRemote(opts) {
1562
1598
  messages.push(initialUserMessage);
1563
1599
  } else {
1564
1600
  messages = new PushableAsyncIterable();
1565
- messages.push(initialUserMessage);
1601
+ const resumeOnConfigModel = !!startFrom && modelTarget(initial.mode.model) === void 0;
1602
+ if (!resumeOnConfigModel) messages.push(initialUserMessage);
1566
1603
  timingMarks.spawnAt = Date.now();
1567
1604
  opts.onStartArgsUsed?.();
1568
1605
  response = query({
@@ -1574,6 +1611,13 @@ async function claudeRemote(opts) {
1574
1611
  } catch (error) {
1575
1612
  logger.debug("[claudeRemote] Model capability discovery unavailable");
1576
1613
  }
1614
+ if (resumeOnConfigModel) {
1615
+ const target = await liveModelTarget(response, void 0);
1616
+ if (target) {
1617
+ await withTimeout(response.setModel(target), SET_MODEL_TIMEOUT_MS, "set_model").then(() => logger.debug(`[claudeRemote] Resumed on the settings model ${target}`)).catch((e) => logger.debug(`[claudeRemote] setModel(settings model) on resume failed: ${e instanceof Error ? e.message : String(e)}`));
1618
+ }
1619
+ messages.push(initialUserMessage);
1620
+ }
1577
1621
  timingMarks.handshakeAt = Date.now();
1578
1622
  }
1579
1623
  const prewarmTiming = adopted ? "adopted" : void 0;
@@ -1633,11 +1677,17 @@ async function claudeRemote(opts) {
1633
1677
  if (initialUserMessage.uuid) commandTracker.track(initialUserMessage.uuid, { message: initial.message, mode: initial.mode });
1634
1678
  let modelUnconfirmed = false;
1635
1679
  let pullingNext = false;
1680
+ let queryClosed = false;
1681
+ const inputClosed = () => queryClosed || messages.done;
1636
1682
  const pullNextMessage = () => {
1637
1683
  if (pullingNext) {
1638
1684
  logger.debug("[claudeRemote] Already waiting for the next message");
1639
1685
  return;
1640
1686
  }
1687
+ if (inputClosed()) {
1688
+ logger.debug("[claudeRemote] Input closed; the next message belongs to the next launch");
1689
+ return;
1690
+ }
1641
1691
  pullingNext = true;
1642
1692
  opts.nextMessage().then(async (pulled) => {
1643
1693
  let next = withoutRetiredModel(pulled);
@@ -1646,18 +1696,37 @@ async function claudeRemote(opts) {
1646
1696
  messages.end();
1647
1697
  return;
1648
1698
  }
1699
+ const handBack = (message) => {
1700
+ pullingNext = false;
1701
+ logger.debug("[claudeRemote] Query input closed before the pulled message was sent; handing it back to the launcher");
1702
+ if (opts.onUndeliveredMessage) opts.onUndeliveredMessage(message);
1703
+ else logger.warn("[claudeRemote] Pulled message could not be delivered and no owner took it back");
1704
+ };
1705
+ if (inputClosed()) {
1706
+ handBack(next);
1707
+ return;
1708
+ }
1649
1709
  if (modelUnconfirmed || needsModelSwitch(mode.model, next.mode.model)) {
1650
1710
  try {
1651
- await withTimeout(response.setModel(modelTarget(next.mode.model)), SET_MODEL_TIMEOUT_MS, "set_model");
1711
+ const target = await liveModelTarget(response, modelTarget(next.mode.model));
1712
+ await withTimeout(response.setModel(target), SET_MODEL_TIMEOUT_MS, "set_model");
1652
1713
  modelUnconfirmed = false;
1653
- logger.debug(`[claudeRemote] Model switched to ${modelTarget(next.mode.model) ?? "default"}`);
1714
+ logger.debug(`[claudeRemote] Model switched to ${target ?? "default"}`);
1654
1715
  } catch (e) {
1655
1716
  logger.debug(`[claudeRemote] setModel failed: ${e instanceof Error ? e.message : String(e)}`);
1717
+ if (inputClosed()) {
1718
+ handBack(next);
1719
+ return;
1720
+ }
1656
1721
  opts.onCompletionEvent?.(modelSwitchFailureNotice(next.mode.model, e));
1657
1722
  if (e instanceof TimeoutError) modelUnconfirmed = true;
1658
1723
  next = { ...next, mode: { ...next.mode, model: mode.model } };
1659
1724
  }
1660
1725
  }
1726
+ if (inputClosed()) {
1727
+ handBack(next);
1728
+ return;
1729
+ }
1661
1730
  mode = next.mode;
1662
1731
  updateThinking(true);
1663
1732
  turn.pushed();
@@ -1777,6 +1846,12 @@ async function claudeRemote(opts) {
1777
1846
  permissionMode: systemInit.permissionMode
1778
1847
  });
1779
1848
  }
1849
+ if (opts.onRunFacts) {
1850
+ const onRunFacts = opts.onRunFacts;
1851
+ void readClaudeRunFacts(response).then((facts) => {
1852
+ if (facts) onRunFacts(facts);
1853
+ });
1854
+ }
1780
1855
  if (systemInit.session_id) {
1781
1856
  logger.debug(`[claudeRemote] Waiting for session file to be written to disk: ${systemInit.session_id}`);
1782
1857
  const projectDir = getProjectPath(opts.path);
@@ -1837,6 +1912,7 @@ async function claudeRemote(opts) {
1837
1912
  }
1838
1913
  } finally {
1839
1914
  updateThinking(false);
1915
+ queryClosed = true;
1840
1916
  if (cliCapabilities.has(MSG_LIFECYCLE_CAPABILITY)) {
1841
1917
  const unconfirmed = commandTracker.takeUnconfirmed();
1842
1918
  if (unconfirmed.length > 0) {
@@ -3049,6 +3125,23 @@ function applyClaudeSdkMetadata(current, update) {
3049
3125
  ...update.modelIsDefault && update.model ? { defaultModelCode: update.model } : {}
3050
3126
  };
3051
3127
  }
3128
+ function applyClaudeRunFacts(current, facts) {
3129
+ let next = current;
3130
+ if (facts.configuredModel !== void 0 && current.configuredModel !== facts.configuredModel) {
3131
+ next = { ...next, configuredModel: facts.configuredModel };
3132
+ }
3133
+ if (facts.effort !== void 0) {
3134
+ if (facts.effort === null) {
3135
+ if (next.currentThoughtLevelCode !== void 0) {
3136
+ const { currentThoughtLevelCode: _dropped, ...rest } = next;
3137
+ next = rest;
3138
+ }
3139
+ } else if (next.currentThoughtLevelCode !== facts.effort) {
3140
+ next = { ...next, currentThoughtLevelCode: facts.effort };
3141
+ }
3142
+ }
3143
+ return next;
3144
+ }
3052
3145
 
3053
3146
  const INTERRUPT_TIMEOUT_MS = 8e3;
3054
3147
  function createTurnSteeringController(opts = {}) {
@@ -4145,6 +4238,10 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
4145
4238
  const parked = modeGate.takeParked();
4146
4239
  if (parked) {
4147
4240
  permissionHandler.handleModeChange(parked.mode.permissionMode);
4241
+ if (parked.finalized) {
4242
+ if (typeof parked.message === "string") onPromptFinalized?.(parked.message);
4243
+ return parked;
4244
+ }
4148
4245
  if (typeof parked.message === "string") return { ...parked, message: await finalize(parked.message) };
4149
4246
  return parked;
4150
4247
  }
@@ -4207,6 +4304,11 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
4207
4304
  session.client.updateMetadata((currentMetadata) => applyClaudeSdkMetadata(currentMetadata, metadata));
4208
4305
  if (metadata.permissionMode) onEffectivePermissionMode?.(metadata.permissionMode);
4209
4306
  },
4307
+ onRunFacts: (facts) => {
4308
+ const current = session.client.getMetadata();
4309
+ if (current && applyClaudeRunFacts(current, facts) === current) return;
4310
+ session.client.updateMetadata((currentMetadata) => applyClaudeRunFacts(currentMetadata, facts));
4311
+ },
4210
4312
  onQueryReady: (q) => {
4211
4313
  runtimeControls.setQuery(q);
4212
4314
  backgroundTasks.reset();
@@ -4271,13 +4373,32 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
4271
4373
  if (plan.redeliver) {
4272
4374
  redeliveredCommands.add(plan.redeliver.uuid);
4273
4375
  logger.debug(`[remote]: re-sending unconfirmed user message ${plan.redeliver.uuid} into the next launch`);
4274
- modeGate.park({ message: plan.redeliver.payload.message, mode: plan.redeliver.payload.mode, uuid: plan.redeliver.uuid });
4376
+ modeGate.park({ message: plan.redeliver.payload.message, mode: plan.redeliver.payload.mode, uuid: plan.redeliver.uuid, finalized: true });
4275
4377
  }
4276
4378
  if (plan.tombstone.length > 0) {
4277
4379
  logger.debug(`[remote]: ${plan.tombstone.length} user message(s) never started before the query ended`);
4278
4380
  session.client.sendQueueCancelReason(plan.tombstone, "aborted");
4279
4381
  }
4280
4382
  },
4383
+ // B-853: the Query's input closed while this message was in
4384
+ // hand — it never reached Claude Code. Run it first in the
4385
+ // next launch (it was pulled before anything still queued);
4386
+ // only when that slot is taken does the web get a tombstone
4387
+ // it can put back and resend, never silence. Leaving remote
4388
+ // mode is the user's stop (`aborted`); otherwise the Query
4389
+ // was replaced before it took the message (`restarted`).
4390
+ onUndeliveredMessage: (message) => {
4391
+ const parked = planUndeliveredMessage(message, { parkFree: !modeGate.hasParked, exiting: exitReason !== null });
4392
+ if (parked) {
4393
+ logger.debug("[remote]: pulled message missed its Query; replaying it in the next launch");
4394
+ modeGate.park(parked);
4395
+ } else if (message.uuid) {
4396
+ logger.debug(`[remote]: pulled message ${message.uuid} missed its Query and cannot be replayed`);
4397
+ session.client.sendQueueCancelReason([message.uuid], exitReason !== null ? "aborted" : "restarted");
4398
+ } else {
4399
+ logger.warn("[remote]: pulled message missed its Query and carries no uuid to tombstone");
4400
+ }
4401
+ },
4281
4402
  onCommandsDropped: (uuids) => {
4282
4403
  logger.debug(`[remote]: ${uuids.length} user message(s) never read before the turn ended`);
4283
4404
  session.client.sendQueueCancelReason(uuids, "aborted");
@@ -4371,6 +4492,11 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
4371
4492
  modeGate.reset();
4372
4493
  }
4373
4494
  }
4495
+ const stranded = modeGate.takeParked();
4496
+ if (stranded?.uuid) {
4497
+ logger.debug(`[remote]: leaving remote mode with parked message ${stranded.uuid}; tombstoning it`);
4498
+ session.client.sendQueueCancelReason([stranded.uuid], "aborted");
4499
+ }
4374
4500
  } finally {
4375
4501
  session.client.off("message", observeSessionRecord);
4376
4502
  rewindReconciler.dispose();
@@ -4423,7 +4549,7 @@ async function loop(opts) {
4423
4549
  logger.debug(`[loop] Iteration with mode: ${mode}`);
4424
4550
  switch (mode) {
4425
4551
  case "local": {
4426
- const { claudeLocalLauncher } = await import('./claudeLocalLauncher-5pzpETxd.mjs');
4552
+ const { claudeLocalLauncher } = await import('./claudeLocalLauncher-T7EfT68h.mjs');
4427
4553
  const result = await claudeLocalLauncher(session);
4428
4554
  switch (result.type) {
4429
4555
  case "switch":
@@ -4764,7 +4890,7 @@ function registerSideQuestionHandler(rpc, deps) {
4764
4890
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
4765
4891
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
4766
4892
  const fork = deps.run ?? (async (input) => {
4767
- const { query } = await import('./index-BCQr-5Ei.mjs');
4893
+ const { query } = await import('./index-BdOJOZ6J.mjs');
4768
4894
  return runSideQuestion(query, input);
4769
4895
  });
4770
4896
  const run = async (input, live) => {
@@ -4,83 +4,83 @@ var specialCommands = require('./specialCommands-J3JFOq0J.cjs');
4
4
  var ink = require('ink');
5
5
  var React = require('react');
6
6
  var node_crypto = require('node:crypto');
7
- var index = require('./index-BOe6dKnL.cjs');
8
- var deterministicJson = require('./deterministicJson-D0LU_XbO.cjs');
9
- var client = require('./client-DIfxYk7B.cjs');
7
+ var index = require('./index-CLUHaPU8.cjs');
8
+ var deterministicJson = require('./deterministicJson-CpFFgUL_.cjs');
9
+ var client = require('./client-C5-C0t2a.cjs');
10
10
  var path = require('node:path');
11
- var api = require('./api-BDuuyys8.cjs');
12
- var logger = require('./logger-BP1SW7Cs.cjs');
13
- var persistence = require('./persistence-CrzC7yr_.cjs');
14
- var createSessionMetadata = require('./createSessionMetadata-DezS33OM.cjs');
11
+ var api = require('./api-BBxZ7y2z.cjs');
12
+ var logger = require('./logger-Ct2zvaq0.cjs');
13
+ var persistence = require('./persistence-A2NeERZJ.cjs');
14
+ var createSessionMetadata = require('./createSessionMetadata-Cf78KHtt.cjs');
15
15
  var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
16
- var machineMetadata = require('./machineMetadata-BKX3ov9g.cjs');
17
- var registerKillSessionHandler = require('./registerKillSessionHandler-DhCjrs44.cjs');
16
+ var machineMetadata = require('./machineMetadata-DDCVWb_x.cjs');
17
+ var registerKillSessionHandler = require('./registerKillSessionHandler-hvCsEn7b.cjs');
18
18
  var projectPath = require('./projectPath-C3ioB4Bu.cjs');
19
19
  var sessionExitLifecycle = require('./sessionExitLifecycle-DFltxXU8.cjs');
20
- var controlClient = require('./controlClient-F7hAEEy2.cjs');
20
+ var controlClient = require('./controlClient-C13_pSKG.cjs');
21
21
  var authRelay = require('./authRelay-Dy1qU9td.cjs');
22
- var setupOfflineReconnection = require('./setupOfflineReconnection-tV0Q1dgR.cjs');
23
- var AcpBackend = require('./AcpBackend-DRPJ2g9G.cjs');
22
+ var setupOfflineReconnection = require('./setupOfflineReconnection-BKLfOd-i.cjs');
23
+ var AcpBackend = require('./AcpBackend-DgrIc1vH.cjs');
24
24
  var constants = require('./constants-VJ0N6WuG.cjs');
25
- var config = require('./config-BGFqQGvh.cjs');
26
- var BasePermissionHandler = require('./BasePermissionHandler-DjM16uJz.cjs');
27
- var codexTermination = require('./codexTermination-IrLZQzKC.cjs');
25
+ var config = require('./config-Di3Cf6js.cjs');
26
+ var BasePermissionHandler = require('./BasePermissionHandler-C9Ag7yvs.cjs');
27
+ var codexTermination = require('./codexTermination-BszWfyk5.cjs');
28
28
  require('zod');
29
29
  require('@paralleldrive/cuid2');
30
30
  require('./prompt-Bof2aQkI.cjs');
31
- require('./reportProgressTool-DznxPKES.cjs');
32
- require('./client-D0aYWt53.cjs');
33
- require('./configuration-C0ctLGW2.cjs');
31
+ require('./reportProgressTool-tzQLCLIw.cjs');
32
+ require('./client-BscskEBk.cjs');
33
+ require('./configuration-DfPBa-9d.cjs');
34
34
  require('node:fs');
35
35
  require('node:os');
36
- require('./package-CYDdLA6R.cjs');
36
+ require('./package-9n7wd2dT.cjs');
37
37
  require('node:fs/promises');
38
38
  require('./precheckCompat-CWOi5c9L.cjs');
39
39
  require('./agentGuidance-BtBx2xxE.cjs');
40
40
  require('./trimIdent-4gvk9Wk6.cjs');
41
41
  require('./pi-DlsrPCTa.cjs');
42
42
  require('./fileStore-7qhnbs6N.cjs');
43
- require('./client-BNmFaRXZ.cjs');
43
+ require('./client-C-OdTbrU.cjs');
44
44
  require('node:child_process');
45
45
  require('node:util');
46
- require('./context-D-hEk5pC.cjs');
47
- require('./sessionOps-BzeOKIEF.cjs');
46
+ require('./context-Co7hUaW-.cjs');
47
+ require('./sessionOps-DXlTmS7J.cjs');
48
48
  require('axios');
49
- require('./time-XwEZxKGc.cjs');
49
+ require('./time-Cy0a-7YX.cjs');
50
50
  require('socket.io-client');
51
51
  require('./backgroundTaskActivity-CBvUdj39.cjs');
52
52
  require('./resources-BZ_Be0qM.cjs');
53
- require('./tools-CjMafO_D.cjs');
54
- require('./peerTools-B4315xjX.cjs');
53
+ require('./tools-B1x1j6tz.cjs');
54
+ require('./peerTools-CElYh-5u.cjs');
55
55
  require('./ids-B6ZC0HGt.cjs');
56
- require('./remoteSessionClient-Dq8XTLQP.cjs');
56
+ require('./remoteSessionClient-6ymeMVa4.cjs');
57
57
  require('@modelcontextprotocol/sdk/server/mcp.js');
58
58
  require('node:http');
59
59
  require('@modelcontextprotocol/sdk/server/streamableHttp.js');
60
60
  require('./limits-C-a7gr04.cjs');
61
- require('./downloadTarget-aNcCxVRL.cjs');
61
+ require('./downloadTarget-CikzJv1h.cjs');
62
62
  require('./terminals-B_bfC9c2.cjs');
63
63
  require('./terminalTitleSuggest-DhvRFX3H.cjs');
64
64
  require('./tmuxSocket-D-Xt6Vn-.cjs');
65
- require('./bootstrap-CDY-Vz8q.cjs');
65
+ require('./bootstrap-sly4qPPY.cjs');
66
66
  require('./webPanels-FCgFKvVe.cjs');
67
- require('./pushNotifications-CalIS9sq.cjs');
67
+ require('./pushNotifications-23YSd-0l.cjs');
68
68
  require('./previewPath-B0rBdhy1.cjs');
69
69
  require('crypto');
70
- require('./lidState-B4dHJCeS.cjs');
70
+ require('./lidState-C9_DoF9i.cjs');
71
71
  require('os');
72
72
  require('child_process');
73
73
  require('node:events');
74
- require('./registerCommonHandlers-DZPozYxc.cjs');
74
+ require('./registerCommonHandlers-D1MiSfcB.cjs');
75
75
  require('util');
76
76
  require('fs/promises');
77
77
  require('path');
78
78
  require('cross-spawn');
79
- require('./sync-CoChLEIg.cjs');
79
+ require('./sync-Ba8N6xba.cjs');
80
80
  require('chalk');
81
81
  require('./detectCLI-BuYR_Qxe.cjs');
82
82
  require('fs');
83
- require('./localHappyAgentAuth-CG2nPD_H.cjs');
83
+ require('./localHappyAgentAuth-CCjUvOfi.cjs');
84
84
  require('tweetnacl');
85
85
  require('./fsMkdir-0K3yENml.cjs');
86
86
  require('./types-CRS-srZK.cjs');