very-happy-cli 0.2.182 → 0.2.183

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 (200) hide show
  1. package/dist/{AcpBackend-DLk3gMYH.mjs → AcpBackend-9c-Jeaxd.mjs} +3 -3
  2. package/dist/{AcpBackend-JA5eu8Y0.cjs → AcpBackend-B-aMuEzO.cjs} +3 -3
  3. package/dist/{AcpSessionManager-DjYidq4C.cjs → AcpSessionManager-BxXe24AV.cjs} +10 -3
  4. package/dist/{AcpSessionManager-OrCww-Qv.mjs → AcpSessionManager-CS0FOSQk.mjs} +10 -3
  5. package/dist/{BasePermissionHandler-u-neo-iN.mjs → BasePermissionHandler-BJ1ID_Br.mjs} +1 -1
  6. package/dist/{BasePermissionHandler-D3PMKLBS.cjs → BasePermissionHandler-BREjppjP.cjs} +1 -1
  7. package/dist/{acpSessionResume-u2TwX5Jd.mjs → acpSessionResume-BKtI9Jq_.mjs} +1 -1
  8. package/dist/{acpSessionResume-Dxo8222T.cjs → acpSessionResume-mVoJ75vI.cjs} +1 -1
  9. package/dist/{agentHome-D3hNrnoA.mjs → agentHome-B8Ctr_Nu.mjs} +4 -4
  10. package/dist/{agentHome-CP1tCBXz.cjs → agentHome-rzjm56o4.cjs} +4 -4
  11. package/dist/{api-C_YSQnsi.mjs → api-C29WLYkW.mjs} +79 -12
  12. package/dist/{api-CZWcG7uh.cjs → api-xZiqVynF.cjs} +81 -11
  13. package/dist/{apiMachine-DPGrED5C.cjs → apiMachine-B-FNBIYG.cjs} +14 -14
  14. package/dist/{apiMachine-C_GA5Bm-.mjs → apiMachine-Dz6Yfk0m.mjs} +14 -14
  15. package/dist/{attachmentContent-I_dJIevE.cjs → attachmentContent-COV4LF8k.cjs} +2 -2
  16. package/dist/{attachmentContent-Ckzyb1Uy.mjs → attachmentContent-DwY0uIg6.mjs} +2 -2
  17. package/dist/{auth-Lw_utSMV.cjs → auth-CYtk9_ga.cjs} +5 -5
  18. package/dist/{auth-BKnE7uv7.cjs → auth-D_qsnVr3.cjs} +8 -8
  19. package/dist/{auth-DOXMI-xp.mjs → auth-DvbSDalm.mjs} +8 -8
  20. package/dist/{auth-CGgpiJ5-.mjs → auth-xT70IYMx.mjs} +5 -5
  21. package/dist/{auto-CIgFHIyQ.cjs → auto-DT_PfpCx.cjs} +32 -25
  22. package/dist/{auto-Z56mMZnH.mjs → auto-IiPqvIsN.mjs} +32 -26
  23. package/dist/{bootstrap-DsXp74wv.cjs → bootstrap-C50NkfPx.cjs} +2 -2
  24. package/dist/{bootstrap-D3vlOROj.mjs → bootstrap-DS8Acdhm.mjs} +2 -2
  25. package/dist/{browser-CUxGoATV.mjs → browser-1j9gdZoD.mjs} +1 -1
  26. package/dist/{browser-CZlA9AkO.cjs → browser-CxKZLd2T.cjs} +1 -1
  27. package/dist/{claudeLocal-oELvwiZL.cjs → claudeLocal-CgNWpepB.cjs} +5 -5
  28. package/dist/{claudeLocal-FnTUgwCi.mjs → claudeLocal-U1Fa9sJo.mjs} +5 -5
  29. package/dist/{claudeLocalLauncher-CO5YHCzi.mjs → claudeLocalLauncher-BjCsfZUE.mjs} +10 -10
  30. package/dist/{claudeLocalLauncher-QsVXEVdE.cjs → claudeLocalLauncher-IyFm0D6a.cjs} +10 -10
  31. package/dist/{claudeSessionFork-Cspr6QW0.mjs → claudeSessionFork-6-1vKISn.mjs} +1 -1
  32. package/dist/{claudeSessionFork-BA4GE5AL.cjs → claudeSessionFork-BUO1XdSm.cjs} +1 -1
  33. package/dist/{client-xnWiHqdb.cjs → client--vZueZYF.cjs} +4 -4
  34. package/dist/{client-o-meK7-a.mjs → client-5_zDNdOh.mjs} +2 -2
  35. package/dist/{client-Ctbw05Xj.mjs → client-BgHvK7lo.mjs} +15 -7
  36. package/dist/{client-CDuW4MS9.cjs → client-DYGDBD0M.cjs} +15 -7
  37. package/dist/{client-DK8CzUry.cjs → client-DcKJ0ul_.cjs} +2 -2
  38. package/dist/{client-BGfmSbWc.mjs → client-DfDyE322.mjs} +4 -4
  39. package/dist/codex/happyMcpStdioBridge.cjs +16 -16
  40. package/dist/codex/happyMcpStdioBridge.mjs +16 -16
  41. package/dist/{codexAppServerClient-DhNDTU_i.cjs → codexAppServerClient-C3nrTfwY.cjs} +3 -3
  42. package/dist/{codexAppServerClient-BlsOZLul.mjs → codexAppServerClient-DvBg4hGc.mjs} +3 -3
  43. package/dist/{codexCommand-BGx5NMQR.mjs → codexCommand-Bqp2--g_.mjs} +94 -60
  44. package/dist/{codexCommand-DJDPfpIs.cjs → codexCommand-DSiU6MNt.cjs} +94 -60
  45. package/dist/{codexTermination-CqPMuokw.cjs → codexTermination-D9TRTglF.cjs} +1 -1
  46. package/dist/{codexTermination-CVhhwHZU.mjs → codexTermination-DsliWl_s.mjs} +1 -1
  47. package/dist/{config-CHpxzXBL.cjs → config-CRhWiOwi.cjs} +3 -3
  48. package/dist/{config-CWAe08-Q.mjs → config-DeaqRn3o.mjs} +3 -3
  49. package/dist/{configuration-B-CugKJ3.cjs → configuration-K3I6yOjZ.cjs} +1 -1
  50. package/dist/{configuration-YXw_Dcsb.mjs → configuration-elzht62L.mjs} +1 -1
  51. package/dist/{connect-BmHvMXH2.cjs → connect-B5UbfmO3.cjs} +13 -13
  52. package/dist/{connect-CPeJXHha.mjs → connect-CT5cOlnC.mjs} +13 -13
  53. package/dist/{context-Drzs_Z38.mjs → context-CLj1_RYF.mjs} +1 -1
  54. package/dist/{context-BtIVqHI5.cjs → context-DNKNF8Yh.cjs} +1 -1
  55. package/dist/{controlClient-D0kGwKYx.cjs → controlClient-ChqmxgbB.cjs} +3 -3
  56. package/dist/{controlClient-BL4hb4l3.mjs → controlClient-CuYQs2aZ.mjs} +3 -3
  57. package/dist/{createSessionMetadata-DvGDsnsn.mjs → createSessionMetadata-C1MbLQnh.mjs} +2 -2
  58. package/dist/{createSessionMetadata-L499emJn.cjs → createSessionMetadata-QfiRx4Tf.cjs} +2 -2
  59. package/dist/daemonSupervisor-57JYYzMf.cjs +268 -0
  60. package/dist/daemonSupervisor-DfzrtNhM.mjs +245 -0
  61. package/dist/{defaultPermissionMode-MXpZlXud.cjs → defaultPermissionMode-DQmdZZIg.cjs} +2 -2
  62. package/dist/{defaultPermissionMode-BLfxu-Yz.mjs → defaultPermissionMode-U9LuUeQh.mjs} +2 -2
  63. package/dist/{deterministicJson-CfLkBRvU.cjs → deterministicJson-BBRUcB8i.cjs} +569 -17
  64. package/dist/{deterministicJson-B_UAbmQ4.mjs → deterministicJson-BixlyPWV.mjs} +572 -21
  65. package/dist/{doctor-DMvlzmnE.cjs → doctor-CKgHUV4W.cjs} +7 -7
  66. package/dist/{doctor-bKScPtZu.mjs → doctor-Dban2oE2.mjs} +7 -7
  67. package/dist/{downloadTarget-D33BFvew.cjs → downloadTarget-CmC11Y7E.cjs} +6 -6
  68. package/dist/{downloadTarget-J9j37eFG.mjs → downloadTarget-VUTd9lEO.mjs} +6 -6
  69. package/dist/{ensureDaemonRunning-2IqWROJp.cjs → ensureDaemonRunning-L0fl0cLE.cjs} +5 -5
  70. package/dist/{ensureDaemonRunning-DLvwhpNg.mjs → ensureDaemonRunning-khb8Nr1n.mjs} +5 -5
  71. package/dist/{handleResumeCommand-CjtjQ_I7.mjs → handleResumeCommand-CLDGWpTJ.mjs} +5 -5
  72. package/dist/{handleResumeCommand-Dp2Y-p6V.cjs → handleResumeCommand-D9myBN2N.cjs} +5 -5
  73. package/dist/{index-BOT0Tg5E.mjs → index-BMZx-699.mjs} +4 -4
  74. package/dist/{index-CZC7egJA.cjs → index-BdJs0465.cjs} +3 -3
  75. package/dist/{index-BI0h2Zks.mjs → index-BptfFoXM.mjs} +268 -77
  76. package/dist/{index-DymOv3kK.cjs → index-COSjJPIv.cjs} +4 -4
  77. package/dist/{index-D_LvOWUN.mjs → index-CtwqBeH6.mjs} +3 -3
  78. package/dist/{index-DYVIbhAJ.cjs → index-DgA79dVw.cjs} +40 -40
  79. package/dist/{index-oh8XEozJ.cjs → index-Fq-jxjsB.cjs} +277 -76
  80. package/dist/{index-Cllzqoes.mjs → index-GkkbUZX-.mjs} +4 -4
  81. package/dist/{index-kA46KMxN.mjs → index-IRI8s8kz.mjs} +41 -41
  82. package/dist/{index-B_aNaW9w.cjs → index-y4JNyz9H.cjs} +4 -4
  83. package/dist/index.cjs +2 -2
  84. package/dist/index.mjs +2 -2
  85. package/dist/{install-D2NCbeJ-.cjs → install-BATFlr_l.cjs} +2 -2
  86. package/dist/{install-D0inLCv-.mjs → install-F3rP8tBU.mjs} +2 -2
  87. package/dist/{install-C46mkr9a.mjs → install-JvCk2PJV.mjs} +3 -3
  88. package/dist/{install-BAa_Xmof.cjs → install-cn98bTCs.cjs} +3 -3
  89. package/dist/lib.cjs +12 -12
  90. package/dist/lib.d.cts +1 -1
  91. package/dist/lib.d.mts +1 -1
  92. package/dist/lib.mjs +12 -12
  93. package/dist/{lidState-DcPvwniz.cjs → lidState-Bcs5kRHi.cjs} +1 -1
  94. package/dist/{lidState-D8Iuvjgl.mjs → lidState-DXeYTsrm.mjs} +1 -1
  95. package/dist/{localHappyAgentAuth-D3rQDRd9.mjs → localHappyAgentAuth-C1A4ChCR.mjs} +1 -1
  96. package/dist/{localHappyAgentAuth-SD6GM97y.cjs → localHappyAgentAuth-CypTSe42.cjs} +1 -1
  97. package/dist/{logger-DK1ytCz6.cjs → logger-Cgwz30rK.cjs} +2 -2
  98. package/dist/{logger-DpqihN1f.mjs → logger-RMPh5aqe.mjs} +2 -2
  99. package/dist/{machineMetadata-IJc6_iyx.cjs → machineMetadata-BSOGMNRi.cjs} +3 -3
  100. package/dist/{machineMetadata-D4E3qoIG.mjs → machineMetadata-BTUtPRth.mjs} +3 -3
  101. package/dist/{main-DUXh2rgW.cjs → main-4iiwYpCR.cjs} +61 -56
  102. package/dist/{main-CpUmw7hm.mjs → main-DNDL6t8z.mjs} +61 -56
  103. package/dist/{mcp-D5f3Vd-z.cjs → mcp-C7eEoGhz.cjs} +15 -15
  104. package/dist/{mcp-66g1TJ8P.mjs → mcp-DXYDPOpJ.mjs} +15 -15
  105. package/dist/{mirrorProtocol-bsCUcaCY.mjs → mirrorProtocol-DQRy5PaT.mjs} +3 -3
  106. package/dist/{mirrorProtocol-DkWOcZh9.cjs → mirrorProtocol-c5g5MgNc.cjs} +3 -3
  107. package/dist/{package-BfeqAzyJ.cjs → package-3aPiSpZj.cjs} +7 -7
  108. package/dist/{package-CKj8zndE.mjs → package-CTrz6U3C.mjs} +7 -7
  109. package/dist/{panels-r8LmaBs6.mjs → panels-B5sZ84vA.mjs} +5 -5
  110. package/dist/{panels-2PXsw9-d.cjs → panels-BmsmKHbw.cjs} +5 -5
  111. package/dist/{peerTools-D_id4d41.mjs → peerTools-DIPOX033.mjs} +5 -5
  112. package/dist/{peerTools-BVp1z0T_.cjs → peerTools-Dxe7iCi_.cjs} +5 -5
  113. package/dist/{persistence-BdpwWXKh.cjs → persistence-DZRMUZZS.cjs} +2 -2
  114. package/dist/{persistence-jOEuAFTS.mjs → persistence-zJo4r7YI.mjs} +2 -2
  115. package/dist/{piRunnerArgs-vxCHKnSA.cjs → piRunnerArgs-BSPiS6tZ.cjs} +1 -1
  116. package/dist/{piRunnerArgs-68I5F_M1.mjs → piRunnerArgs-IVdoHUB6.mjs} +1 -1
  117. package/dist/{piRuntime-C3Dg5uni.cjs → piRuntime-BJzjlMcN.cjs} +2 -2
  118. package/dist/{piRuntime-DgLIard1.mjs → piRuntime-BvHO3vgO.mjs} +2 -2
  119. package/dist/{piTerminal-C135BcLP.cjs → piTerminal-Cz4pW55d.cjs} +18 -18
  120. package/dist/{piTerminal-DJL0w-uA.mjs → piTerminal-D7vBOpkE.mjs} +18 -18
  121. package/dist/{pushNotifications-CMmRsbKv.mjs → pushNotifications-C4R9-1hU.mjs} +3 -3
  122. package/dist/{pushNotifications-CyQVDThC.cjs → pushNotifications-CgIrYml3.cjs} +3 -3
  123. package/dist/{query-CK--1fbL.cjs → query-CZQG1PdU.cjs} +1 -1
  124. package/dist/{query-CPXnDURZ.mjs → query-DKPmDsHS.mjs} +1 -1
  125. package/dist/{rateLimitWindows-DJxnNw-X.cjs → rateLimitWindows-CPV0nLeq.cjs} +1 -1
  126. package/dist/{rateLimitWindows-Cqa4AGaB.mjs → rateLimitWindows-HlHATOQ0.mjs} +1 -1
  127. package/dist/{registerCommonHandlers-DbNoM39q.cjs → registerCommonHandlers-D1pC83Op.cjs} +2 -2
  128. package/dist/{registerCommonHandlers-K8dICQO2.mjs → registerCommonHandlers-a9lHojSV.mjs} +2 -2
  129. package/dist/{registerKillSessionHandler-O1iriOMO.mjs → registerKillSessionHandler-Bp-fuH-w.mjs} +6 -6
  130. package/dist/{registerKillSessionHandler-DiS_go8d.cjs → registerKillSessionHandler-nTi2vVJy.cjs} +6 -6
  131. package/dist/{remoteSessionClient-BlURPulk.mjs → remoteSessionClient-Cwrddscy.mjs} +5 -5
  132. package/dist/{remoteSessionClient-CtV9mDko.cjs → remoteSessionClient-HQAKAvVd.cjs} +5 -5
  133. package/dist/{reportProgressTool-DlD_xjzU.cjs → reportProgressTool-Be-8ADI4.cjs} +4 -4
  134. package/dist/{reportProgressTool-nCExrHZH.mjs → reportProgressTool-CcZ32nrd.mjs} +4 -4
  135. package/dist/{resources-CH1iP6Cv.mjs → resources-CLdQfe3b.mjs} +1 -1
  136. package/dist/{resources-BPyN59Iv.cjs → resources-CqwHPhdK.cjs} +1 -1
  137. package/dist/{run-drtwHYkO.mjs → run-BBU8GyxE.mjs} +59 -243
  138. package/dist/{run-BBNrcCfI.cjs → run-CxRJk9qq.cjs} +69 -254
  139. package/dist/{runClaude-CFp27Tyi.mjs → runClaude-DR6pEQwd.mjs} +22 -22
  140. package/dist/{runClaude-B3KSeby4.cjs → runClaude-Dd5zJaUZ.cjs} +22 -22
  141. package/dist/{runClaudeDeps-DMcv93lA.mjs → runClaudeDeps-COgZaUZm.mjs} +50 -45
  142. package/dist/{runClaudeDeps-C_C9TCI0.cjs → runClaudeDeps-CTtZ_1mC.cjs} +45 -40
  143. package/dist/{runGemini-Bc6SY-hd.mjs → runGemini-DVoVUfPp.mjs} +37 -35
  144. package/dist/{runGemini-DzdSBAr9.cjs → runGemini-DX72qB92.cjs} +37 -35
  145. package/dist/{runOpenClaw-DI0qMlgF.mjs → runOpenClaw-BHjzmzeC.mjs} +18 -18
  146. package/dist/{runOpenClaw-DN6rEVqC.cjs → runOpenClaw-BSg4hFVt.cjs} +18 -18
  147. package/dist/{sandbox-v-ffe8LR.mjs → sandbox-CWR9EqoN.mjs} +4 -4
  148. package/dist/{sandbox-DtttPBMA.cjs → sandbox-D1T_hmgZ.cjs} +4 -4
  149. package/dist/{selfCheck-B-yy6bW3.cjs → selfCheck-CE7vlnNS.cjs} +36 -36
  150. package/dist/selfCheck-ZGgBtxFQ.mjs +85 -0
  151. package/dist/{send-DpBwSZuj.mjs → send-BDF0Zvxo.mjs} +8 -8
  152. package/dist/{send-ShzXYPRu.cjs → send-BxZqRCcG.cjs} +8 -8
  153. package/dist/{server-DScgJXxa.mjs → server-B4JtnDLF.mjs} +4 -4
  154. package/dist/{server-CEzKrfKj.cjs → server-DB7_70Mi.cjs} +6 -6
  155. package/dist/{sessionLock-Dc0fadGG.cjs → sessionLock-BXvFN6uw.cjs} +3 -3
  156. package/dist/{sessionLock-B6K4SBZD.mjs → sessionLock-CXOOX-VD.mjs} +3 -3
  157. package/dist/{sessionOps-Dx7wARjI.cjs → sessionOps-BWlDlFYP.cjs} +4 -4
  158. package/dist/{sessionOps-D0BPWPoh.mjs → sessionOps-ByVggB_q.mjs} +4 -4
  159. package/dist/{sessionScanner-BJ35TVG6.cjs → sessionScanner-DkxPB5VA.cjs} +3 -3
  160. package/dist/{sessionScanner-9Fpgaxtf.mjs → sessionScanner-r66RtF95.mjs} +3 -3
  161. package/dist/{sessions-TZGGAry1.cjs → sessions-BiJTxFy9.cjs} +10 -10
  162. package/dist/{sessions-CFtDlyZd.mjs → sessions-C1lLK_a9.mjs} +10 -10
  163. package/dist/{setupOfflineReconnection-Biaus-0T.mjs → setupOfflineReconnection-Bl3DuakT.mjs} +2 -2
  164. package/dist/{setupOfflineReconnection-B1GsVA8P.cjs → setupOfflineReconnection-CecTiFZ-.cjs} +2 -2
  165. package/dist/{spawn-CsoQ-Ecz.mjs → spawn-D-8MlEM6.mjs} +14 -14
  166. package/dist/{spawn-BRTuypQ2.cjs → spawn-D79mVa3h.cjs} +14 -14
  167. package/dist/{spawnAgents-Co-SLcx-.mjs → spawnAgents-DJHjq01u.mjs} +1 -1
  168. package/dist/{spawnAgents-CG211IW7.cjs → spawnAgents-Sfnf-4pN.cjs} +1 -1
  169. package/dist/{spawnHappyCLI-D47kX6jg.cjs → spawnHappyCLI-CQwQs9G5.cjs} +1 -1
  170. package/dist/{spawnHappyCLI-D1doCjkZ.mjs → spawnHappyCLI-v_bJwZ4Z.mjs} +1 -1
  171. package/dist/{specialCommands-Ch-Gvy-i.cjs → specialCommands-CWMVfT5s.cjs} +3 -3
  172. package/dist/{specialCommands-xSmqT_Fu.mjs → specialCommands-yMnFvS-W.mjs} +3 -3
  173. package/dist/{startFileWatcher-CCl2fFxT.mjs → startFileWatcher-BCDkT_tr.mjs} +1 -1
  174. package/dist/{startFileWatcher-gKQTstR6.cjs → startFileWatcher-GW4_E7dV.cjs} +1 -1
  175. package/dist/{startupSessionCreate-DlZc8yPl.mjs → startupSessionCreate-BcAGYo51.mjs} +1 -1
  176. package/dist/{startupSessionCreate-BXqoUX30.cjs → startupSessionCreate-tBRa_ze8.cjs} +1 -1
  177. package/dist/{streamRelay-DnJXsi36.mjs → streamRelay-BEDiy6_b.mjs} +1 -1
  178. package/dist/{streamRelay-B-J-4St1.cjs → streamRelay-BZ8drtof.cjs} +1 -1
  179. package/dist/{sync-BbjMC3sR.mjs → sync--QUIOuf8.mjs} +1 -1
  180. package/dist/{sync-BxMdnZzz.cjs → sync-BMDkyo75.cjs} +1 -1
  181. package/dist/{systemPrompt-C2KojRmK.cjs → systemPrompt-DoHSXrH0.cjs} +2 -2
  182. package/dist/{systemPrompt-CmSDAoIx.mjs → systemPrompt-O0Kd6vbA.mjs} +2 -2
  183. package/dist/{teams-DESdalox.cjs → teams-BkZop-sP.cjs} +9 -9
  184. package/dist/{teams-lRy1MS0Z.mjs → teams-CTF1gT48.mjs} +9 -9
  185. package/dist/{template-BaHAmH2K.cjs → template-CeC1dYe-.cjs} +32 -2
  186. package/dist/{template-CiOPa2rd.mjs → template-D1fm22em.mjs} +31 -3
  187. package/dist/{time-Cfknl7xG.mjs → time-B2KKdAym.mjs} +1 -1
  188. package/dist/{time-DNLeIRgR.cjs → time-CdCotzKU.cjs} +1 -1
  189. package/dist/{titleGenerator-ClnMSzwC.mjs → titleGenerator-BFDczskR.mjs} +1 -1
  190. package/dist/{titleGenerator-YNutaU88.cjs → titleGenerator-DZH1XqAf.cjs} +2 -2
  191. package/dist/{todo-DZbK5POc.mjs → todo-C2gyOUom.mjs} +6 -6
  192. package/dist/{todo-DS75Mboz.cjs → todo-DnTFTHmV.cjs} +6 -6
  193. package/dist/{tools-ClYcb1YQ.cjs → tools-C8rpwyIl.cjs} +1 -1
  194. package/dist/{tools-BgdU0dWp.mjs → tools-DUjkqSQL.mjs} +1 -1
  195. package/dist/{uninstall-bXenFevR.mjs → uninstall-B5Ew50mZ.mjs} +3 -3
  196. package/dist/{uninstall-Di1vPBLV.cjs → uninstall-CKMPWTMv.cjs} +3 -3
  197. package/package.json +7 -7
  198. package/dist/daemonSupervisor-B-SPSqhs.cjs +0 -13
  199. package/dist/daemonSupervisor-C6urv3_8.mjs +0 -10
  200. package/dist/selfCheck-BDfTwxqB.mjs +0 -85
@@ -1,25 +1,25 @@
1
- import { i as isClaudeSessionId, g as extractCompleteLines, h as decideBackfill, j as parseTerminalHookPayload, k as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, m as mirrorLineKey, n as mirrorLocalId, o as initializeOwnedWorktree, e as summarizeSpawnSessionForLog, q as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, t as currentWorktreeService } from './mirrorProtocol-bsCUcaCY.mjs';
1
+ import { i as isClaudeSessionId, g as extractCompleteLines, h as decideBackfill, j as parseTerminalHookPayload, k as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, m as mirrorLineKey, n as mirrorLocalId, o as initializeOwnedWorktree, e as summarizeSpawnSessionForLog, q as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, t as currentWorktreeService } from './mirrorProtocol-DQRy5PaT.mjs';
2
2
  import { F as FS_MKDIR_CAPABILITY_VERSION } from './fsMkdir-DumgLTzR.mjs';
3
- import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-68I5F_M1.mjs';
3
+ import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-IVdoHUB6.mjs';
4
4
  import fs from 'fs/promises';
5
5
  import os from 'os';
6
6
  import * as tmp from 'tmp';
7
7
  import axios from 'axios';
8
8
  import { readFileSync, openSync, fsyncSync, closeSync, renameSync, existsSync, readdirSync, statSync, unlinkSync, realpathSync, promises, writeFileSync, mkdirSync, accessSync, constants as constants$1, readSync, rmdirSync } from 'node:fs';
9
- import { join, isAbsolute, resolve, dirname, sep, basename, delimiter } from 'node:path';
10
- import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-YXw_Dcsb.mjs';
11
- import { T as TurnActivityTracker, A as ApiClient } from './api-C_YSQnsi.mjs';
12
- import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-Co-SLcx-.mjs';
13
- import { l as logger } from './logger-DpqihN1f.mjs';
14
- import { p as pruneStaleCompileCaches } from './index-D_LvOWUN.mjs';
15
- import { a as authAndSetupMachineIfNeeded } from './auth-CGgpiJ5-.mjs';
9
+ import { join, isAbsolute, resolve, dirname, sep, basename } from 'node:path';
10
+ import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-elzht62L.mjs';
11
+ import { T as TurnActivityTracker, A as ApiClient } from './api-C29WLYkW.mjs';
12
+ import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-DJHjq01u.mjs';
13
+ import { l as logger } from './logger-RMPh5aqe.mjs';
14
+ import { p as pruneStaleCompileCaches } from './index-CtwqBeH6.mjs';
15
+ import { a as authAndSetupMachineIfNeeded } from './auth-xT70IYMx.mjs';
16
16
  import { spawn, execSync } from 'child_process';
17
- import { p as packageJson } from './package-CKj8zndE.mjs';
18
- import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-bKScPtZu.mjs';
19
- import { s as spawnHappyCLI } from './spawnHappyCLI-D1doCjkZ.mjs';
20
- import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, q as reportSignature, s as decideDaemonHibernation, t as nextCheckDelay, v as persistSession, d as readDaemonState, x as acquireDaemonLock, a as resolveCheckMs, y as resolveIdleMs, z as deletePersistedSessions, A as writeDaemonState, B as writeSettings, C as settingIdleMs, u as updateSettings, D as rewriteCredentialsForRelay, g as readCredentials, E as releaseDaemonLock } from './persistence-jOEuAFTS.mjs';
21
- import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, t as cleanupDaemonState } from './controlClient-BL4hb4l3.mjs';
22
- import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, g as waitForSessionKey, d as archiveSession, j as analyzeLatestTurn, k as readSessionLog, m as TURN_WINDOW, n as userPromptText } from './sessionOps-D0BPWPoh.mjs';
17
+ import { p as packageJson } from './package-CTrz6U3C.mjs';
18
+ import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-Dban2oE2.mjs';
19
+ import { s as spawnHappyCLI } from './spawnHappyCLI-v_bJwZ4Z.mjs';
20
+ import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, q as reportSignature, s as decideDaemonHibernation, t as nextCheckDelay, v as persistSession, d as readDaemonState, x as acquireDaemonLock, a as resolveCheckMs, y as resolveIdleMs, z as deletePersistedSessions, A as writeDaemonState, B as writeSettings, C as settingIdleMs, u as updateSettings, D as rewriteCredentialsForRelay, g as readCredentials, E as releaseDaemonLock } from './persistence-zJo4r7YI.mjs';
21
+ import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, t as cleanupDaemonState } from './controlClient-CuYQs2aZ.mjs';
22
+ import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, g as waitForSessionKey, d as archiveSession, j as analyzeLatestTurn, k as readSessionLog, m as TURN_WINDOW, n as userPromptText } from './sessionOps-ByVggB_q.mjs';
23
23
  import fastify from 'fastify';
24
24
  import { z } from 'zod';
25
25
  import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
@@ -27,62 +27,62 @@ import { d as decodeBase64, s as sameRelay, e as encodeBase64, h as decrypt } fr
27
27
  import { randomBytes, createHash, timingSafeEqual, randomUUID } from 'node:crypto';
28
28
  import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
29
29
  import { a as BACKGROUND_TASKS_MAX, d as BACKGROUND_TASK_DESCRIPTION_MAX, e as BackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
30
- import { b as sanitizeRateLimitReport } from './rateLimitWindows-Cqa4AGaB.mjs';
31
- import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-D_id4d41.mjs';
32
- import os$1, { hostname, homedir, userInfo, tmpdir } from 'node:os';
33
- import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-BlURPulk.mjs';
34
- import { assistantHome, bootstrapAssistantHome } from './bootstrap-D3vlOROj.mjs';
35
- import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-Cllzqoes.mjs';
30
+ import { b as sanitizeRateLimitReport } from './rateLimitWindows-HlHATOQ0.mjs';
31
+ import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-DIPOX033.mjs';
32
+ import os$1, { hostname, homedir, tmpdir } from 'node:os';
33
+ import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-Cwrddscy.mjs';
34
+ import { assistantHome, bootstrapAssistantHome } from './bootstrap-DS8Acdhm.mjs';
35
+ import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-GkkbUZX-.mjs';
36
36
  import require$$0, { existsSync as existsSync$1, statSync as statSync$1, mkdtempSync, rmSync } from 'fs';
37
37
  import require$$1, { join as join$1 } from 'path';
38
38
  import { spawn as spawn$1, execFile, spawnSync } from 'node:child_process';
39
39
  import { p as projectPath } from './projectPath-BTBIMB57.mjs';
40
40
  import { d as daemonEndpointsMatch, r as resolveClaudeCredentialReadiness } from './doctorReadiness-C208SMN9.mjs';
41
- import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-D4E3qoIG.mjs';
41
+ import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-BTUtPRth.mjs';
42
42
  import { M as ModelConfigError, B as BackupStore, r as readConfigFile, s as sha256, a as atomicWriteFile } from './fileStore-5qpetZS0.mjs';
43
- import { c as collectSecretValues, a as parseJsonObject$1, b as childObject, s as setOrDelete, d as changedPaths, e as stringifyLike, f as fail, n as normalizeModelList, g as normalizeModelId, h as normalizeSecret, i as normalizeBaseUrl, u as uniq, j as baseUrlWarnings, m as maskSecret, k as getPath$1, l as normalizeProviderId, o as piAdapter, r as redactText } from './pi-CqyoZMjI.mjs';
43
+ import { c as collectSecretValues, a as parseJsonObject, b as childObject, s as setOrDelete, d as changedPaths, e as stringifyLike, f as fail, n as normalizeModelList, g as normalizeModelId, h as normalizeSecret, i as normalizeBaseUrl, u as uniq, j as baseUrlWarnings, m as maskSecret, k as getPath$1, l as normalizeProviderId, o as piAdapter, r as redactText } from './pi-CqyoZMjI.mjs';
44
44
  import require$$3 from 'crypto';
45
45
  import { c as commandOnPath } from './detectCLI-CSGMlV51.mjs';
46
- import { buildResumeLaunch } from './handleResumeCommand-CjtjQ_I7.mjs';
46
+ import { buildResumeLaunch } from './handleResumeCommand-CLDGWpTJ.mjs';
47
47
  import { n as normalizeWebPanels } from './webPanels-B2_C2-3g.mjs';
48
- import { x as ServerMigrateNoticeSchema, y as isHarnessInstallId, z as AUTOMATION_SUMMARY_MAX_CHARS, D as AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS, E as AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS, b as AUTOMATION_PRECHECK_MAX_TIMEOUT_MS, F as AUTOMATION_CLAIM_MAX_RUNS, G as AUTOMATION_DAEMON_CAPABILITY_PRECHECK, H as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, I as HARNESS_INSTALL_CAPABILITY_VERSION } from './index-BI0h2Zks.mjs';
48
+ import { K as ServerMigrateNoticeSchema, L as isHarnessInstallId, e as AUTOMATION_SUMMARY_MAX_CHARS, M as AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS, N as AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS, b as AUTOMATION_PRECHECK_MAX_TIMEOUT_MS, Q as AUTOMATION_CLAIM_MAX_RUNS, T as AUTOMATION_DAEMON_CAPABILITY_PRECHECK, U as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, V as HARNESS_INSTALL_CAPABILITY_VERSION } from './index-BptfFoXM.mjs';
49
49
  import { access, symlink, readFile, rm, unlink, readlink, lstat, constants, stat, open } from 'node:fs/promises';
50
50
  import { p as parseExactVersion, c as compareExactVersions, f as fetchCliUpdateState, r as resolveCliUpdateCheckInterval, D as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS } from './cliUpdate-Y34VGe9Y.mjs';
51
- import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-o-meK7-a.mjs';
52
- import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-Ctbw05Xj.mjs';
53
- import { createRequire } from 'node:module';
51
+ import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-5_zDNdOh.mjs';
52
+ import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-BgHvK7lo.mjs';
53
+ import { w as withKeychainOffPath, a as keychainIdentityFor, i as interpretSecurityRead, s as securityReadArgs, b as securityDeleteArgs, c as keychainOffShimDir, d as interpretCredentialsFile, C as CREDENTIALS_REJECTED_DETAIL, e as buildClaudeAuthState, f as claudeAuthStateChanged, r as resolveSdkClaudeBinary, g as classifyAuthStatus, h as diagnoseStores, p as parseLaunchctlPid, H as HAPPY_DAEMON_LAUNCHD_LABEL, j as classifyLineage, l as probeLaunchdJob, m as detectDaemonSupervisor, n as daemonLineage } from './daemonSupervisor-DfzrtNhM.mjs';
54
54
  import { g as getProjectPath } from './path-D2wdaNSk.mjs';
55
55
  import { b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
56
- import { s as startFileWatcher } from './startFileWatcher-CCl2fFxT.mjs';
57
- import { I as InvalidateSync } from './sync-BbjMC3sR.mjs';
56
+ import { s as startFileWatcher } from './startFileWatcher-BCDkT_tr.mjs';
57
+ import { I as InvalidateSync } from './sync--QUIOuf8.mjs';
58
58
  import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
59
59
  import { t as tmuxArgs, a as scrubTmuxClientEnv, s as shellescape } from './tmuxSocket-B8Yx20sT.mjs';
60
- import { p as processIdentityFields, r as readSessionLock, t as terminateProcess, d as terminateProcessTree } from './sessionLock-B6K4SBZD.mjs';
60
+ import { p as processIdentityFields, r as readSessionLock, t as terminateProcess, d as terminateProcessTree } from './sessionLock-CXOOX-VD.mjs';
61
61
  import { findAllHappyProcesses } from './doctor-BPkYWSuq.mjs';
62
- import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CH1iP6Cv.mjs';
62
+ import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CLdQfe3b.mjs';
63
63
  import { promisify } from 'node:util';
64
- import { c as clipText, r as renderAction, b as renderTemplate } from './template-CiOPa2rd.mjs';
65
- import { d as detectDaemonSupervisor } from './daemonSupervisor-C6urv3_8.mjs';
64
+ import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-D1fm22em.mjs';
66
65
  import { d as describeAgentHome } from './loginShellEnv-Dw8M7tkI.mjs';
67
- import './acpSessionResume-u2TwX5Jd.mjs';
68
- import './lidState-D8Iuvjgl.mjs';
66
+ import './acpSessionResume-BKtI9Jq_.mjs';
67
+ import './lidState-DXeYTsrm.mjs';
69
68
  import 'node:events';
70
69
  import 'socket.io-client';
71
- import './pushNotifications-CMmRsbKv.mjs';
70
+ import './pushNotifications-C4R9-1hU.mjs';
72
71
  import './contentLogMetadata-BlWI0egu.mjs';
73
72
  import './limits-DIo7rEBR.mjs';
74
- import './time-Cfknl7xG.mjs';
75
- import './registerCommonHandlers-K8dICQO2.mjs';
73
+ import './time-B2KKdAym.mjs';
74
+ import './registerCommonHandlers-a9lHojSV.mjs';
76
75
  import 'util';
77
76
  import 'cross-spawn';
78
77
  import '@paralleldrive/cuid2';
79
78
  import 'chalk';
79
+ import 'node:module';
80
80
  import 'tweetnacl';
81
- import './browser-CUxGoATV.mjs';
81
+ import './browser-1j9gdZoD.mjs';
82
82
  import 'open';
83
83
  import './ids-DU6sLx4C.mjs';
84
84
  import 'url';
85
- import './localHappyAgentAuth-D3rQDRd9.mjs';
85
+ import './localHappyAgentAuth-C1A4ChCR.mjs';
86
86
  import './processTreeSnapshot-CuLJDNC-.mjs';
87
87
  import 'ps-list';
88
88
 
@@ -2361,14 +2361,14 @@ const claudeAdapter = {
2361
2361
  binary: "claude",
2362
2362
  files: (ctx) => [{ role: ROLE$1, path: claudeSettingsPath(ctx) }],
2363
2363
  view(files, ctx) {
2364
- const settings = parseJsonObject$1(files[ROLE$1].content, "settings.json");
2364
+ const settings = parseJsonObject(files[ROLE$1].content, "settings.json");
2365
2365
  const current = currentOf$2(settings, ctx);
2366
2366
  return { current, pickerModels: pickerModelsOf(current), warnings: warningsOf$2(settings, current, ctx) };
2367
2367
  },
2368
2368
  plan(files, raw, ctx) {
2369
2369
  const patch = parsePatch$1(raw);
2370
2370
  const original = files[ROLE$1].content;
2371
- const before = parseJsonObject$1(original, "settings.json");
2371
+ const before = parseJsonObject(original, "settings.json");
2372
2372
  const settings = structuredClone(before);
2373
2373
  const hadEnv = settings.env !== void 0;
2374
2374
  const env = childObject(settings, "env", "settings");
@@ -2429,7 +2429,7 @@ const claudeAdapter = {
2429
2429
  },
2430
2430
  secretsIn(_role, content) {
2431
2431
  try {
2432
- return collectSecretValues(parseJsonObject$1(content, "settings.json"));
2432
+ return collectSecretValues(parseJsonObject(content, "settings.json"));
2433
2433
  } catch {
2434
2434
  return /* @__PURE__ */ new Set();
2435
2435
  }
@@ -3979,7 +3979,7 @@ const geminiAdapter = {
3979
3979
  binary: "gemini",
3980
3980
  files: (ctx) => [{ role: SETTINGS, path: join(geminiDir(ctx), "settings.json") }, { role: ENV, path: join(geminiDir(ctx), ".env") }],
3981
3981
  view(files, ctx) {
3982
- const settings = parseJsonObject$1(files[SETTINGS].content, "settings.json");
3982
+ const settings = parseJsonObject(files[SETTINGS].content, "settings.json");
3983
3983
  const current = currentOf(settings, parseDotenv(files[ENV].content), ctx);
3984
3984
  return { current, pickerModels: uniq([current.model]), warnings: warningsOf(settings, current) };
3985
3985
  },
@@ -3989,7 +3989,7 @@ const geminiAdapter = {
3989
3989
  const apiKey = normalizeSecret(p.apiKey, ["keep", "clear", "literal"]);
3990
3990
  const model = normalizeModelId(p.model);
3991
3991
  const settingsText = files[SETTINGS].content;
3992
- const before = parseJsonObject$1(settingsText, "settings.json");
3992
+ const before = parseJsonObject(settingsText, "settings.json");
3993
3993
  const settings = structuredClone(before);
3994
3994
  const changedKeys = [];
3995
3995
  let settingsOut;
@@ -4020,7 +4020,7 @@ const geminiAdapter = {
4020
4020
  },
4021
4021
  secretsIn(role, content) {
4022
4022
  try {
4023
- return role === ENV ? collectSecretValues(parseDotenv(content)) : collectSecretValues(parseJsonObject$1(content, "settings.json"));
4023
+ return role === ENV ? collectSecretValues(parseDotenv(content)) : collectSecretValues(parseJsonObject(content, "settings.json"));
4024
4024
  } catch {
4025
4025
  return /* @__PURE__ */ new Set();
4026
4026
  }
@@ -5093,196 +5093,6 @@ async function waitForSessionLive(sessionId, live, timeoutMs = AUTOMATION_WAKE_T
5093
5093
  return true;
5094
5094
  }
5095
5095
 
5096
- const CLAUDE_KEYCHAIN_SERVICE_PREFIX = "Claude Code";
5097
- function keychainIdentity(env = process.env, deps = {}) {
5098
- const home = deps.home ?? homedir();
5099
- const secureDir = env.CLAUDE_SECURESTORAGE_CONFIG_DIR?.trim();
5100
- const configDirEnv = env.CLAUDE_CONFIG_DIR?.trim();
5101
- const configDir = secureDir || configDirEnv || join(home, ".claude");
5102
- const hasCustomDir = Boolean(secureDir || configDirEnv);
5103
- const dirSuffix = hasCustomDir ? "-" + createHash("sha256").update(configDir.normalize("NFC")).digest("hex").slice(0, 8) : "";
5104
- const oauthSuffix = env.CLAUDE_CODE_OAUTH_CLIENT_ID?.trim() ? "-custom-oauth" : "";
5105
- const rawAccount = env.USER || safeUsername(deps.username);
5106
- const account = /^[a-zA-Z0-9._-]+$/.test(rawAccount) ? rawAccount : "claude-code-user";
5107
- return {
5108
- service: `${CLAUDE_KEYCHAIN_SERVICE_PREFIX}${oauthSuffix}-credentials${dirSuffix}`,
5109
- account,
5110
- configDir,
5111
- credentialsPath: join(configDir, ".credentials.json")
5112
- };
5113
- }
5114
- function safeUsername(provider) {
5115
- try {
5116
- return provider ? provider() : userInfo().username;
5117
- } catch {
5118
- return "";
5119
- }
5120
- }
5121
-
5122
- const CLAUDE_AUTH_PROBE_VERSION = 1;
5123
- const LOCAL_CREDENTIAL_SOURCE = "Claude local credentials";
5124
- function classifyAuthStatus(run, credentialSource) {
5125
- const localSource = credentialSource === void 0 || credentialSource === LOCAL_CREDENTIAL_SOURCE;
5126
- if (run.spawnError) {
5127
- return { status: "error", diagnosis: "probe-crash", detail: `could not run claude auth status: ${run.spawnError}` };
5128
- }
5129
- if (run.timedOut) {
5130
- return { status: "error", diagnosis: "probe-timeout", detail: "claude auth status did not answer within the timeout" };
5131
- }
5132
- const parsed = parseJsonObject(run.stdout);
5133
- if (!parsed) {
5134
- if (!localSource) return { status: "unknown", authMethod: credentialSource, detail: `auth status unparseable under ${credentialSource}` };
5135
- return { status: "error", diagnosis: "probe-crash", detail: `claude auth status returned no JSON (exit ${run.exitCode ?? "null"})` };
5136
- }
5137
- const authMethod = typeof parsed.authMethod === "string" ? parsed.authMethod : void 0;
5138
- const subscriptionType = typeof parsed.subscriptionType === "string" ? parsed.subscriptionType : void 0;
5139
- if (parsed.loggedIn === true) {
5140
- return { status: "ok", authMethod: localSource ? authMethod : credentialSource, subscriptionType };
5141
- }
5142
- if (!localSource) {
5143
- return { status: "unknown", authMethod: credentialSource, detail: `Claude Code reports loggedIn=false under ${credentialSource}; not a local-credential failure` };
5144
- }
5145
- return { status: "not-logged-in", authMethod, subscriptionType, detail: "Claude Code in the daemon context reports it is not logged in" };
5146
- }
5147
- function parseJsonObject(text) {
5148
- const trimmed = text.trim();
5149
- if (!trimmed) return null;
5150
- const start = trimmed.indexOf("{");
5151
- if (start < 0) return null;
5152
- try {
5153
- const value = JSON.parse(trimmed.slice(start));
5154
- return value && typeof value === "object" && !Array.isArray(value) ? value : null;
5155
- } catch {
5156
- return null;
5157
- }
5158
- }
5159
- function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => createRequire(import.meta.url).resolve(s)) {
5160
- const platformArch = `${platform}-${arch}`;
5161
- const candidates = [
5162
- `@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
5163
- `@anthropic-ai/claude-agent-sdk-${platformArch}/claude.exe`
5164
- ];
5165
- for (const candidate of candidates) {
5166
- try {
5167
- return resolver(candidate);
5168
- } catch {
5169
- }
5170
- }
5171
- return null;
5172
- }
5173
- function interpretSecurityRead(result) {
5174
- if (result.error === "ENOENT") return { kind: "unsupported" };
5175
- if (result.error === "timeout") return { kind: "error", detail: "security timed out" };
5176
- if (result.exitCode === 44) return { kind: "absent" };
5177
- if (result.exitCode === 36) return { kind: "unreadable" };
5178
- if (result.exitCode !== 0) return { kind: "error", detail: `security exited ${result.exitCode ?? "null"}` };
5179
- const raw = result.stdout.trim();
5180
- if (!raw) return { kind: "absent" };
5181
- const parsed = parseJsonObject(raw);
5182
- const oauth = parsed && typeof parsed.claudeAiOauth === "object" && parsed.claudeAiOauth ? parsed.claudeAiOauth : null;
5183
- if (!oauth) return { kind: "present", accessToken: "", refreshToken: "", raw };
5184
- return {
5185
- kind: "present",
5186
- accessToken: typeof oauth.accessToken === "string" ? oauth.accessToken : "",
5187
- refreshToken: typeof oauth.refreshToken === "string" ? oauth.refreshToken : "",
5188
- raw
5189
- };
5190
- }
5191
- function interpretCredentialsFile(text) {
5192
- if (text === null) return { exists: false, hasTokens: false, refreshToken: "" };
5193
- const parsed = parseJsonObject(text);
5194
- const oauth = parsed && typeof parsed.claudeAiOauth === "object" && parsed.claudeAiOauth ? parsed.claudeAiOauth : null;
5195
- const access = oauth && typeof oauth.accessToken === "string" ? oauth.accessToken : "";
5196
- const refresh = oauth && typeof oauth.refreshToken === "string" ? oauth.refreshToken : "";
5197
- return { exists: true, hasTokens: access.length > 0 && refresh.length > 0, refreshToken: refresh };
5198
- }
5199
- function tokenTail(token) {
5200
- return token ? createHash("sha256").update(token).digest("hex").slice(-6) : "";
5201
- }
5202
- const CREDENTIALS_REJECTED_DETAIL = "Credentials exist but Claude Code rejects them in the daemon context \u2014 the refresh token has most likely been rotated away by another store or another machine using the same credentials. Log in again with `claude` on this machine.";
5203
- function diagnoseStores(input) {
5204
- const { status, keychain, file } = input;
5205
- if (keychain.kind === "present") {
5206
- const empty = keychain.accessToken.length === 0 && keychain.refreshToken.length === 0;
5207
- if (empty && file.hasTokens && status === "not-logged-in") {
5208
- return {
5209
- diagnosis: "keychain-empty-item",
5210
- repairable: "delete-empty-keychain-item",
5211
- keychainRaw: keychain.raw,
5212
- detail: "The login keychain holds a Claude Code credentials item with empty tokens; Claude Code prefers it over the valid ~/.claude/.credentials.json and reports not logged in."
5213
- };
5214
- }
5215
- if (!empty && file.hasTokens && tokenTail(keychain.refreshToken) !== tokenTail(file.refreshToken)) {
5216
- return {
5217
- diagnosis: "store-divergence",
5218
- detail: "Keychain and ~/.claude/.credentials.json hold different refresh tokens; one of them will stop working at its next refresh. Treat the daemon-context login as canonical, or pin credentialStore=file."
5219
- };
5220
- }
5221
- return {};
5222
- }
5223
- if ((keychain.kind === "absent" || keychain.kind === "unreadable" || keychain.kind === "unsupported") && !file.hasTokens) {
5224
- return { diagnosis: "no-credentials", detail: "No Claude Code credentials found for this daemon context; log in with `claude` on this machine." };
5225
- }
5226
- if (keychain.kind === "unreadable" && file.hasTokens && status === "not-logged-in") {
5227
- return { diagnosis: "credentials-rejected", detail: CREDENTIALS_REJECTED_DETAIL };
5228
- }
5229
- if (keychain.kind === "error") {
5230
- return { detail: `keychain check failed: ${keychain.detail}` };
5231
- }
5232
- return {};
5233
- }
5234
- function securityReadArgs(identity) {
5235
- return ["find-generic-password", "-s", identity.service, "-a", identity.account, "-w"];
5236
- }
5237
- function securityDeleteArgs(identity) {
5238
- return ["delete-generic-password", "-s", identity.service, "-a", identity.account];
5239
- }
5240
- const HAPPY_DAEMON_LAUNCHD_LABEL = "com.mereith.happy-daemon";
5241
- function classifyLineage(input) {
5242
- if (input.platform !== "darwin") return "other";
5243
- const label = input.label ?? HAPPY_DAEMON_LAUNCHD_LABEL;
5244
- if (input.env.XPC_SERVICE_NAME !== label) return "other";
5245
- if (input.launchdJobPid !== null && input.ancestorPids.includes(input.launchdJobPid)) return "launchd";
5246
- return "inherited-env";
5247
- }
5248
- function parseLaunchctlPid(printOutput) {
5249
- const match = /^\s*pid\s*=\s*(\d+)/m.exec(printOutput);
5250
- return match ? Number(match[1]) : null;
5251
- }
5252
- function keychainOffShimDir(happyLibDir) {
5253
- return join(happyLibDir, "scripts", "shims", "keychain-off");
5254
- }
5255
- function withKeychainOffPath(path, shimDir) {
5256
- const parts = (path ?? "").split(delimiter).filter((p) => p && p !== shimDir);
5257
- return [shimDir, ...parts].join(delimiter);
5258
- }
5259
- function buildClaudeAuthState(input) {
5260
- const { classification, diagnosis } = input;
5261
- const detail = (diagnosis?.detail ?? classification.detail)?.slice(0, 200);
5262
- const state = {
5263
- probeVersion: CLAUDE_AUTH_PROBE_VERSION,
5264
- daemonPid: input.daemonPid,
5265
- status: classification.status,
5266
- context: { platform: input.platform, lineage: input.lineage, credentialStore: input.credentialStore },
5267
- checkedAt: input.now ?? Date.now()
5268
- };
5269
- if (classification.authMethod) state.authMethod = classification.authMethod;
5270
- if (classification.subscriptionType) state.subscriptionType = classification.subscriptionType;
5271
- const diag = diagnosis?.diagnosis ?? classification.diagnosis;
5272
- if (diag) state.diagnosis = diag;
5273
- if (detail) state.detail = detail;
5274
- if (diagnosis?.repairable) state.repairable = diagnosis.repairable;
5275
- return state;
5276
- }
5277
- function claudeAuthStateChanged(prev, next) {
5278
- if (!prev) return true;
5279
- const strip = ({ checkedAt: _c, ...rest }) => JSON.stringify(rest);
5280
- return strip(prev) !== strip(next);
5281
- }
5282
- function keychainIdentityFor(env) {
5283
- return keychainIdentity(env);
5284
- }
5285
-
5286
5096
  const CLAUDE_AUTH_PROBE_INTERVAL_MS = 10 * 60 * 1e3;
5287
5097
  const CLAUDE_AUTH_REFRESH_INTERVAL_MS = 30 * 60 * 1e3;
5288
5098
  const PROBE_TIMEOUT_MS = 8e3;
@@ -5293,6 +5103,7 @@ class ClaudeAuthService {
5293
5103
  this.opts = opts;
5294
5104
  this.env = opts.env ?? process.env;
5295
5105
  this.platform = opts.platform ?? process.platform;
5106
+ this.lineage = opts.lineage ?? null;
5296
5107
  }
5297
5108
  timer = null;
5298
5109
  signalTimer = null;
@@ -6931,7 +6742,9 @@ function createAutomationRunner(deps) {
6931
6742
  function persist(receipt) {
6932
6743
  writeReceipt(home, receipt, now());
6933
6744
  }
6934
- async function finish(item, report2) {
6745
+ async function finish(item, input) {
6746
+ const { report: report2, clipped } = clipAutomationReport(input);
6747
+ if (clipped.length) deps.log(`Automation run ${item.runId} report clipped: ${clipped.map((c) => `${c.field} ${c.from}\u2192${c.to}`).join(", ")}`);
6935
6748
  try {
6936
6749
  await client.report(item.runId, report2);
6937
6750
  } catch (error) {
@@ -8571,8 +8384,10 @@ async function startDaemon() {
8571
8384
  }
8572
8385
  });
8573
8386
  const daemonClaudeCredentials = resolveClaudeCredentialReadiness();
8574
- const daemonSupervisor = detectDaemonSupervisor(process.env);
8575
- logger.debug(`[DAEMON RUN] Supervisor: ${daemonSupervisor}`);
8387
+ const launchdJob = process.platform === "darwin" ? await probeLaunchdJob() : null;
8388
+ const daemonSupervisor = detectDaemonSupervisor(process.env, process.platform, launchdJob);
8389
+ const lineage = daemonLineage(daemonSupervisor, process.env, process.platform, launchdJob);
8390
+ logger.debug(`[DAEMON RUN] Supervisor: ${daemonSupervisor} (lineage ${lineage}${launchdJob ? `, launchd job pid ${launchdJob.jobPid ?? "-"}` : ""})`);
8576
8391
  let fileState = {
8577
8392
  pid: process.pid,
8578
8393
  httpPort: controlPort,
@@ -8655,7 +8470,8 @@ async function startDaemon() {
8655
8470
  await writeSettings({ ...settings, claudeCredentialStore: store });
8656
8471
  claudeCredentialStoreSetting = store;
8657
8472
  },
8658
- publish: (state) => apiMachine.setClaudeAuthState(state)
8473
+ publish: (state) => apiMachine.setClaudeAuthState(state),
8474
+ lineage
8659
8475
  });
8660
8476
  claudeAuthServiceRef = claudeAuthService;
8661
8477
  apiMachine.setClaudeAuthHandlers({
@@ -8832,8 +8648,8 @@ async function startDaemon() {
8832
8648
  await cleanupDaemonState();
8833
8649
  await releaseDaemonLock(daemonLockHandle);
8834
8650
  await stopCaffeinate();
8835
- if (daemonSupervisor === "systemd") {
8836
- logger.debug(`[DAEMON RUN] systemd-supervised: exiting ${HANDOVER_EXIT_CODE} for the unit to restart on the new bundle`);
8651
+ if (daemonSupervisor !== "none") {
8652
+ logger.debug(`[DAEMON RUN] ${daemonSupervisor}-supervised: exiting ${HANDOVER_EXIT_CODE} for the supervisor to restart on the new bundle`);
8837
8653
  process.exit(HANDOVER_EXIT_CODE);
8838
8654
  }
8839
8655
  try {