very-happy-cli 0.2.181 → 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.
- package/dist/{AcpBackend-DZGCSuXF.mjs → AcpBackend-9c-Jeaxd.mjs} +3 -3
- package/dist/{AcpBackend-CgHb_ya5.cjs → AcpBackend-B-aMuEzO.cjs} +3 -3
- package/dist/{AcpSessionManager-CacC2EVn.cjs → AcpSessionManager-BxXe24AV.cjs} +10 -3
- package/dist/{AcpSessionManager-DwuPzWBh.mjs → AcpSessionManager-CS0FOSQk.mjs} +10 -3
- package/dist/{BasePermissionHandler-Uo-GUjbb.mjs → BasePermissionHandler-BJ1ID_Br.mjs} +1 -1
- package/dist/{BasePermissionHandler-DCP8ZEB4.cjs → BasePermissionHandler-BREjppjP.cjs} +1 -1
- package/dist/{acpSessionResume-9OLTD6kT.mjs → acpSessionResume-BKtI9Jq_.mjs} +1 -1
- package/dist/{acpSessionResume-BaVMD80f.cjs → acpSessionResume-mVoJ75vI.cjs} +1 -1
- package/dist/{agentHome-B1BsKeqD.mjs → agentHome-B8Ctr_Nu.mjs} +4 -4
- package/dist/{agentHome-BtUmGcPX.cjs → agentHome-rzjm56o4.cjs} +4 -4
- package/dist/{api-Dr3wXL_7.mjs → api-C29WLYkW.mjs} +79 -12
- package/dist/{api-COHFAkb_.cjs → api-xZiqVynF.cjs} +81 -11
- package/dist/{apiMachine-D8H7CXaz.cjs → apiMachine-B-FNBIYG.cjs} +19 -14
- package/dist/{apiMachine-CHEzPQdS.mjs → apiMachine-Dz6Yfk0m.mjs} +19 -14
- package/dist/{attachmentContent-mIhbtRKl.cjs → attachmentContent-COV4LF8k.cjs} +2 -2
- package/dist/{attachmentContent-1YwtKgWl.mjs → attachmentContent-DwY0uIg6.mjs} +2 -2
- package/dist/{auth-CgQP7d0q.cjs → auth-CYtk9_ga.cjs} +5 -5
- package/dist/{auth-Fg8fLadK.cjs → auth-D_qsnVr3.cjs} +8 -8
- package/dist/{auth-CbZkcMAb.mjs → auth-DvbSDalm.mjs} +8 -8
- package/dist/{auth-DZsthtSk.mjs → auth-xT70IYMx.mjs} +5 -5
- package/dist/{auto-BB7kqSh5.cjs → auto-DT_PfpCx.cjs} +32 -25
- package/dist/{auto-_T-Ud-z5.mjs → auto-IiPqvIsN.mjs} +32 -26
- package/dist/{bootstrap-CYtOtbi7.cjs → bootstrap-C50NkfPx.cjs} +2 -2
- package/dist/{bootstrap-B6EkZh4u.mjs → bootstrap-DS8Acdhm.mjs} +2 -2
- package/dist/{browser-C2qhUHSE.mjs → browser-1j9gdZoD.mjs} +1 -1
- package/dist/{browser-DjNNQQk2.cjs → browser-CxKZLd2T.cjs} +1 -1
- package/dist/{claudeLocal-O_w7-fBh.cjs → claudeLocal-CgNWpepB.cjs} +5 -5
- package/dist/{claudeLocal-BAFjWhZ8.mjs → claudeLocal-U1Fa9sJo.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CWn30LZR.mjs → claudeLocalLauncher-BjCsfZUE.mjs} +10 -10
- package/dist/{claudeLocalLauncher-Df3zg1q0.cjs → claudeLocalLauncher-IyFm0D6a.cjs} +10 -10
- package/dist/{claudeSessionFork-2ZkSTOGn.mjs → claudeSessionFork-6-1vKISn.mjs} +1 -1
- package/dist/{claudeSessionFork-pwcKqB-e.cjs → claudeSessionFork-BUO1XdSm.cjs} +1 -1
- package/dist/{client-CUO3ItoB.cjs → client--vZueZYF.cjs} +14 -4
- package/dist/{client-BKyU66lg.mjs → client-5_zDNdOh.mjs} +2 -2
- package/dist/{client-CXOnzuOy.mjs → client-BgHvK7lo.mjs} +15 -7
- package/dist/{client-D_U2VjO3.cjs → client-DYGDBD0M.cjs} +15 -7
- package/dist/{client-DWs6k041.cjs → client-DcKJ0ul_.cjs} +2 -2
- package/dist/{client-DsQcxVUV.mjs → client-DfDyE322.mjs} +14 -4
- package/dist/codex/happyMcpStdioBridge.cjs +20 -19
- package/dist/codex/happyMcpStdioBridge.mjs +20 -19
- package/dist/{codexAppServerClient-BRX3JZ_5.cjs → codexAppServerClient-C3nrTfwY.cjs} +3 -3
- package/dist/{codexAppServerClient-C3JO3pwM.mjs → codexAppServerClient-DvBg4hGc.mjs} +3 -3
- package/dist/{codexCommand-BZIAAqKS.mjs → codexCommand-Bqp2--g_.mjs} +96 -61
- package/dist/{codexCommand-dKOc5iQl.cjs → codexCommand-DSiU6MNt.cjs} +96 -61
- package/dist/{codexTermination-BVR9HeVI.cjs → codexTermination-D9TRTglF.cjs} +1 -1
- package/dist/{codexTermination-ztFkwHrG.mjs → codexTermination-DsliWl_s.mjs} +1 -1
- package/dist/{config-cftYxLC7.cjs → config-CRhWiOwi.cjs} +3 -3
- package/dist/{config-NbHjx8ge.mjs → config-DeaqRn3o.mjs} +3 -3
- package/dist/{configuration-C8JgseHy.cjs → configuration-K3I6yOjZ.cjs} +1 -1
- package/dist/{configuration-BPrfb17M.mjs → configuration-elzht62L.mjs} +1 -1
- package/dist/{connect-Br8VMrK1.cjs → connect-B5UbfmO3.cjs} +13 -13
- package/dist/{connect-CLD1ai0k.mjs → connect-CT5cOlnC.mjs} +13 -13
- package/dist/{context-_YGq8xdH.mjs → context-CLj1_RYF.mjs} +1 -1
- package/dist/{context-D1lgQTJC.cjs → context-DNKNF8Yh.cjs} +1 -1
- package/dist/{controlClient-D68Zj7Q-.cjs → controlClient-ChqmxgbB.cjs} +3 -3
- package/dist/{controlClient-CkNpT5zS.mjs → controlClient-CuYQs2aZ.mjs} +3 -3
- package/dist/{createSessionMetadata-3WAj3_xl.mjs → createSessionMetadata-C1MbLQnh.mjs} +2 -2
- package/dist/{createSessionMetadata-DNIbKLHg.cjs → createSessionMetadata-QfiRx4Tf.cjs} +2 -2
- package/dist/daemonSupervisor-57JYYzMf.cjs +268 -0
- package/dist/daemonSupervisor-DfzrtNhM.mjs +245 -0
- package/dist/{defaultPermissionMode-BmvjP32v.cjs → defaultPermissionMode-DQmdZZIg.cjs} +2 -2
- package/dist/{defaultPermissionMode-DXMznl8v.mjs → defaultPermissionMode-U9LuUeQh.mjs} +2 -2
- package/dist/{deterministicJson-BS7D7URE.cjs → deterministicJson-BBRUcB8i.cjs} +569 -17
- package/dist/{deterministicJson-BcBIKKf1.mjs → deterministicJson-BixlyPWV.mjs} +572 -21
- package/dist/{doctor-Be7zC0AF.cjs → doctor-CKgHUV4W.cjs} +7 -7
- package/dist/{doctor-CoOaPq6w.mjs → doctor-Dban2oE2.mjs} +7 -7
- package/dist/{downloadTarget-LyOiucn_.cjs → downloadTarget-CmC11Y7E.cjs} +6 -6
- package/dist/{downloadTarget-CeaAXdJj.mjs → downloadTarget-VUTd9lEO.mjs} +6 -6
- package/dist/{ensureDaemonRunning-B8z37VKD.cjs → ensureDaemonRunning-L0fl0cLE.cjs} +5 -5
- package/dist/{ensureDaemonRunning--98j7-17.mjs → ensureDaemonRunning-khb8Nr1n.mjs} +5 -5
- package/dist/fsMkdir-0K3yENml.cjs +56 -0
- package/dist/fsMkdir-DumgLTzR.mjs +53 -0
- package/dist/{handleResumeCommand-gO8I4keP.mjs → handleResumeCommand-CLDGWpTJ.mjs} +5 -5
- package/dist/{handleResumeCommand-BFZlrFVH.cjs → handleResumeCommand-D9myBN2N.cjs} +5 -5
- package/dist/{index-WUj3954m.mjs → index-BMZx-699.mjs} +4 -4
- package/dist/{index-BRMq9gOe.cjs → index-BdJs0465.cjs} +3 -3
- package/dist/{index-CeRXrGnH.mjs → index-BptfFoXM.mjs} +283 -77
- package/dist/{index-jF2t3ACW.cjs → index-COSjJPIv.cjs} +4 -4
- package/dist/{index-hQ8LP1C2.mjs → index-CtwqBeH6.mjs} +3 -3
- package/dist/{index-B5PXbZjW.cjs → index-DgA79dVw.cjs} +41 -40
- package/dist/{index-Df2eHm3O.cjs → index-Fq-jxjsB.cjs} +294 -76
- package/dist/{index-CO0n9ue6.mjs → index-GkkbUZX-.mjs} +4 -4
- package/dist/{index-DneHoQXf.mjs → index-IRI8s8kz.mjs} +42 -41
- package/dist/{index-BkluinoS.cjs → index-y4JNyz9H.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-D2NCbeJ-.cjs → install-BATFlr_l.cjs} +2 -2
- package/dist/{install-D0inLCv-.mjs → install-F3rP8tBU.mjs} +2 -2
- package/dist/{install-DkYFiVK4.mjs → install-JvCk2PJV.mjs} +3 -3
- package/dist/{install-FqkSUjPC.cjs → install-cn98bTCs.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +2 -1
- package/dist/lib.d.mts +2 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-x8cJ8J_9.cjs → lidState-Bcs5kRHi.cjs} +1 -1
- package/dist/{lidState-DghbfRbr.mjs → lidState-DXeYTsrm.mjs} +1 -1
- package/dist/{localHappyAgentAuth-IKmeRpuQ.mjs → localHappyAgentAuth-C1A4ChCR.mjs} +1 -1
- package/dist/{localHappyAgentAuth-DZ2kb9uq.cjs → localHappyAgentAuth-CypTSe42.cjs} +1 -1
- package/dist/{logger-DgBwUSgS.cjs → logger-Cgwz30rK.cjs} +2 -2
- package/dist/{logger-LFr8iPgl.mjs → logger-RMPh5aqe.mjs} +2 -2
- package/dist/{machineMetadata-DB03ez4K.cjs → machineMetadata-BSOGMNRi.cjs} +5 -3
- package/dist/{machineMetadata-BglCsfvf.mjs → machineMetadata-BTUtPRth.mjs} +5 -3
- package/dist/{main-YQ-Vkakw.cjs → main-4iiwYpCR.cjs} +61 -56
- package/dist/{main-_1LSzlLv.mjs → main-DNDL6t8z.mjs} +61 -56
- package/dist/{mcp-BIY80jSc.cjs → mcp-C7eEoGhz.cjs} +17 -15
- package/dist/{mcp-Csj-mT5Y.mjs → mcp-DXYDPOpJ.mjs} +17 -15
- package/dist/{mirrorProtocol-CAxOMBkb.mjs → mirrorProtocol-DQRy5PaT.mjs} +3 -3
- package/dist/{mirrorProtocol-BphKIAK9.cjs → mirrorProtocol-c5g5MgNc.cjs} +3 -3
- package/dist/{package-NoD8QOOM.cjs → package-3aPiSpZj.cjs} +7 -7
- package/dist/{package-DYGwlmXl.mjs → package-CTrz6U3C.mjs} +7 -7
- package/dist/{panels-B8zRm7_d.mjs → panels-B5sZ84vA.mjs} +5 -5
- package/dist/{panels-DYEc1NyQ.cjs → panels-BmsmKHbw.cjs} +5 -5
- package/dist/{peerTools-CK3JYu1k.mjs → peerTools-DIPOX033.mjs} +5 -5
- package/dist/{peerTools-CP-x-Peu.cjs → peerTools-Dxe7iCi_.cjs} +5 -5
- package/dist/{persistence-BY-D00wT.cjs → persistence-DZRMUZZS.cjs} +2 -2
- package/dist/{persistence-D2Djrf7t.mjs → persistence-zJo4r7YI.mjs} +2 -2
- package/dist/{piRunnerArgs-gxLYIZH4.cjs → piRunnerArgs-BSPiS6tZ.cjs} +1 -1
- package/dist/{piRunnerArgs-IZLoL7TG.mjs → piRunnerArgs-IVdoHUB6.mjs} +1 -1
- package/dist/{piRuntime-o5L8uX-W.cjs → piRuntime-BJzjlMcN.cjs} +2 -2
- package/dist/{piRuntime-D7Y4oHVL.mjs → piRuntime-BvHO3vgO.mjs} +2 -2
- package/dist/{piTerminal-C_-JDkLN.cjs → piTerminal-Cz4pW55d.cjs} +20 -18
- package/dist/{piTerminal-Kphx8Uhw.mjs → piTerminal-D7vBOpkE.mjs} +20 -18
- package/dist/{pushNotifications-DXGIhE-A.mjs → pushNotifications-C4R9-1hU.mjs} +5 -3
- package/dist/{pushNotifications-BXoOSq_G.cjs → pushNotifications-CgIrYml3.cjs} +5 -3
- package/dist/{query-CdCxzuaB.cjs → query-CZQG1PdU.cjs} +1 -1
- package/dist/{query-CcA6DVZK.mjs → query-DKPmDsHS.mjs} +1 -1
- package/dist/{rateLimitWindows-OpAmdOtC.cjs → rateLimitWindows-CPV0nLeq.cjs} +1 -1
- package/dist/{rateLimitWindows-ZtHZHe-l.mjs → rateLimitWindows-HlHATOQ0.mjs} +1 -1
- package/dist/{registerCommonHandlers-CRjBoJLK.cjs → registerCommonHandlers-D1pC83Op.cjs} +2 -2
- package/dist/{registerCommonHandlers-DF6bdDtd.mjs → registerCommonHandlers-a9lHojSV.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DDCKL3wf.mjs → registerKillSessionHandler-Bp-fuH-w.mjs} +6 -6
- package/dist/{registerKillSessionHandler-7fOm6ooh.cjs → registerKillSessionHandler-nTi2vVJy.cjs} +6 -6
- package/dist/{remoteSessionClient-B2POSKFT.mjs → remoteSessionClient-Cwrddscy.mjs} +5 -5
- package/dist/{remoteSessionClient-CFCn42bs.cjs → remoteSessionClient-HQAKAvVd.cjs} +5 -5
- package/dist/{reportProgressTool-th4trcET.cjs → reportProgressTool-Be-8ADI4.cjs} +4 -4
- package/dist/{reportProgressTool-tPxEvh6x.mjs → reportProgressTool-CcZ32nrd.mjs} +4 -4
- package/dist/{resources-CH1iP6Cv.mjs → resources-CLdQfe3b.mjs} +1 -1
- package/dist/{resources-BPyN59Iv.cjs → resources-CqwHPhdK.cjs} +1 -1
- package/dist/{run-cKQBbVi4.mjs → run-BBU8GyxE.mjs} +63 -244
- package/dist/{run-C_FumCQk.cjs → run-CxRJk9qq.cjs} +73 -255
- package/dist/{runClaude-CYnM6krL.mjs → runClaude-DR6pEQwd.mjs} +23 -22
- package/dist/{runClaude-z_2YC_aa.cjs → runClaude-Dd5zJaUZ.cjs} +23 -22
- package/dist/{runClaudeDeps-duS06Pb4.mjs → runClaudeDeps-COgZaUZm.mjs} +50 -45
- package/dist/{runClaudeDeps-CLubzWnA.cjs → runClaudeDeps-CTtZ_1mC.cjs} +45 -40
- package/dist/{runGemini-C_Pc2EhH.mjs → runGemini-DVoVUfPp.mjs} +40 -37
- package/dist/{runGemini-vEoXV6qT.cjs → runGemini-DX72qB92.cjs} +40 -37
- package/dist/{runOpenClaw-Cxun1qLC.mjs → runOpenClaw-BHjzmzeC.mjs} +19 -18
- package/dist/{runOpenClaw-CXJCtMgB.cjs → runOpenClaw-BSg4hFVt.cjs} +19 -18
- package/dist/{sandbox-CsvPnTmz.mjs → sandbox-CWR9EqoN.mjs} +4 -4
- package/dist/{sandbox-CO46H2tK.cjs → sandbox-D1T_hmgZ.cjs} +4 -4
- package/dist/{selfCheck-DIr7Gc0i.cjs → selfCheck-CE7vlnNS.cjs} +36 -36
- package/dist/selfCheck-ZGgBtxFQ.mjs +85 -0
- package/dist/{send-DMoFg6F1.mjs → send-BDF0Zvxo.mjs} +8 -8
- package/dist/{send-X2mfVEyr.cjs → send-BxZqRCcG.cjs} +8 -8
- package/dist/{server-CkqQ0sRH.mjs → server-B4JtnDLF.mjs} +4 -4
- package/dist/{server-BwTEdbkr.cjs → server-DB7_70Mi.cjs} +6 -6
- package/dist/{sessionLock-CdIRJlHH.cjs → sessionLock-BXvFN6uw.cjs} +3 -3
- package/dist/{sessionLock-JIfwCqMk.mjs → sessionLock-CXOOX-VD.mjs} +3 -3
- package/dist/{sessionOps-DVA-00nR.cjs → sessionOps-BWlDlFYP.cjs} +4 -4
- package/dist/{sessionOps-DqlftXxe.mjs → sessionOps-ByVggB_q.mjs} +4 -4
- package/dist/{sessionScanner-BMwgGAhY.cjs → sessionScanner-DkxPB5VA.cjs} +3 -3
- package/dist/{sessionScanner-BI0Vo1xT.mjs → sessionScanner-r66RtF95.mjs} +3 -3
- package/dist/{sessions-DjgEcHaT.cjs → sessions-BiJTxFy9.cjs} +10 -10
- package/dist/{sessions-D6IimX7b.mjs → sessions-C1lLK_a9.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DgJK_4m1.mjs → setupOfflineReconnection-Bl3DuakT.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CjuCiKY3.cjs → setupOfflineReconnection-CecTiFZ-.cjs} +2 -2
- package/dist/{spawn-Dvzy-tzc.mjs → spawn-D-8MlEM6.mjs} +14 -14
- package/dist/{spawn-rhF28shY.cjs → spawn-D79mVa3h.cjs} +14 -14
- package/dist/{spawnAgents-CCnlq-FI.mjs → spawnAgents-DJHjq01u.mjs} +1 -1
- package/dist/{spawnAgents-iwuqrgR9.cjs → spawnAgents-Sfnf-4pN.cjs} +1 -1
- package/dist/{spawnHappyCLI-DnKmIsEt.cjs → spawnHappyCLI-CQwQs9G5.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dq3LLXLb.mjs → spawnHappyCLI-v_bJwZ4Z.mjs} +1 -1
- package/dist/{specialCommands-Zwr2C6A2.cjs → specialCommands-CWMVfT5s.cjs} +3 -3
- package/dist/{specialCommands-CcyZ1hGA.mjs → specialCommands-yMnFvS-W.mjs} +3 -3
- package/dist/{startFileWatcher-4thXDK9d.mjs → startFileWatcher-BCDkT_tr.mjs} +1 -1
- package/dist/{startFileWatcher-K6hJSyiR.cjs → startFileWatcher-GW4_E7dV.cjs} +1 -1
- package/dist/{startupSessionCreate-BfByJ16A.mjs → startupSessionCreate-BcAGYo51.mjs} +1 -1
- package/dist/{startupSessionCreate-CKEbq0tL.cjs → startupSessionCreate-tBRa_ze8.cjs} +1 -1
- package/dist/{streamRelay-LcDvyEjK.mjs → streamRelay-BEDiy6_b.mjs} +1 -1
- package/dist/{streamRelay-Gy8Xfnon.cjs → streamRelay-BZ8drtof.cjs} +1 -1
- package/dist/{sync-DO-2PU45.mjs → sync--QUIOuf8.mjs} +1 -1
- package/dist/{sync-1hQ5KHpL.cjs → sync-BMDkyo75.cjs} +1 -1
- package/dist/{systemPrompt-Dj7pgkMK.cjs → systemPrompt-DoHSXrH0.cjs} +2 -2
- package/dist/{systemPrompt-BctLfMZs.mjs → systemPrompt-O0Kd6vbA.mjs} +2 -2
- package/dist/{teams-uQxUlyyz.cjs → teams-BkZop-sP.cjs} +13 -10
- package/dist/{teams-Bu8YeOoF.mjs → teams-CTF1gT48.mjs} +13 -10
- package/dist/{template-BaHAmH2K.cjs → template-CeC1dYe-.cjs} +32 -2
- package/dist/{template-CiOPa2rd.mjs → template-D1fm22em.mjs} +31 -3
- package/dist/{time-BcoJaG8E.mjs → time-B2KKdAym.mjs} +1 -1
- package/dist/{time-nqa9shu8.cjs → time-CdCotzKU.cjs} +1 -1
- package/dist/{titleGenerator-D5r06bhf.mjs → titleGenerator-BFDczskR.mjs} +1 -1
- package/dist/{titleGenerator-D09XyYYG.cjs → titleGenerator-DZH1XqAf.cjs} +2 -2
- package/dist/{todo-D1q8146q.mjs → todo-C2gyOUom.mjs} +6 -6
- package/dist/{todo-CCOnL7pT.cjs → todo-DnTFTHmV.cjs} +6 -6
- package/dist/{tools-DiCXnAC5.cjs → tools-C8rpwyIl.cjs} +1 -1
- package/dist/{tools-D2E--n1x.mjs → tools-DUjkqSQL.mjs} +1 -1
- package/dist/{uninstall-CtwXi1Rt.mjs → uninstall-B5Ew50mZ.mjs} +3 -3
- package/dist/{uninstall-BrNwwwSD.cjs → uninstall-CKMPWTMv.cjs} +3 -3
- package/package.json +7 -7
- package/dist/daemonSupervisor-B-SPSqhs.cjs +0 -13
- package/dist/daemonSupervisor-C6urv3_8.mjs +0 -10
- package/dist/selfCheck-NamtBHVB.mjs +0 -85
|
@@ -1,24 +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-
|
|
2
|
-
import {
|
|
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
|
+
import { F as FS_MKDIR_CAPABILITY_VERSION } from './fsMkdir-DumgLTzR.mjs';
|
|
3
|
+
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-IVdoHUB6.mjs';
|
|
3
4
|
import fs from 'fs/promises';
|
|
4
5
|
import os from 'os';
|
|
5
6
|
import * as tmp from 'tmp';
|
|
6
7
|
import axios from 'axios';
|
|
7
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';
|
|
8
|
-
import { join, isAbsolute, resolve, dirname, sep, basename
|
|
9
|
-
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-
|
|
10
|
-
import { T as TurnActivityTracker, A as ApiClient } from './api-
|
|
11
|
-
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-
|
|
12
|
-
import { l as logger } from './logger-
|
|
13
|
-
import { p as pruneStaleCompileCaches } from './index-
|
|
14
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
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';
|
|
15
16
|
import { spawn, execSync } from 'child_process';
|
|
16
|
-
import { p as packageJson } from './package-
|
|
17
|
-
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-
|
|
18
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
19
|
-
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-
|
|
20
|
-
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, t as cleanupDaemonState } from './controlClient-
|
|
21
|
-
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-
|
|
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';
|
|
22
23
|
import fastify from 'fastify';
|
|
23
24
|
import { z } from 'zod';
|
|
24
25
|
import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
|
|
@@ -26,62 +27,62 @@ import { d as decodeBase64, s as sameRelay, e as encodeBase64, h as decrypt } fr
|
|
|
26
27
|
import { randomBytes, createHash, timingSafeEqual, randomUUID } from 'node:crypto';
|
|
27
28
|
import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
|
|
28
29
|
import { a as BACKGROUND_TASKS_MAX, d as BACKGROUND_TASK_DESCRIPTION_MAX, e as BackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
29
|
-
import { b as sanitizeRateLimitReport } from './rateLimitWindows-
|
|
30
|
-
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-
|
|
31
|
-
import os$1, { hostname, homedir,
|
|
32
|
-
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-
|
|
33
|
-
import { assistantHome, bootstrapAssistantHome } from './bootstrap-
|
|
34
|
-
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-
|
|
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';
|
|
35
36
|
import require$$0, { existsSync as existsSync$1, statSync as statSync$1, mkdtempSync, rmSync } from 'fs';
|
|
36
37
|
import require$$1, { join as join$1 } from 'path';
|
|
37
38
|
import { spawn as spawn$1, execFile, spawnSync } from 'node:child_process';
|
|
38
39
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
39
40
|
import { d as daemonEndpointsMatch, r as resolveClaudeCredentialReadiness } from './doctorReadiness-C208SMN9.mjs';
|
|
40
|
-
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-
|
|
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';
|
|
41
42
|
import { M as ModelConfigError, B as BackupStore, r as readConfigFile, s as sha256, a as atomicWriteFile } from './fileStore-5qpetZS0.mjs';
|
|
42
|
-
import { c as collectSecretValues, a as parseJsonObject
|
|
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';
|
|
43
44
|
import require$$3 from 'crypto';
|
|
44
45
|
import { c as commandOnPath } from './detectCLI-CSGMlV51.mjs';
|
|
45
|
-
import { buildResumeLaunch } from './handleResumeCommand-
|
|
46
|
+
import { buildResumeLaunch } from './handleResumeCommand-CLDGWpTJ.mjs';
|
|
46
47
|
import { n as normalizeWebPanels } from './webPanels-B2_C2-3g.mjs';
|
|
47
|
-
import {
|
|
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';
|
|
48
49
|
import { access, symlink, readFile, rm, unlink, readlink, lstat, constants, stat, open } from 'node:fs/promises';
|
|
49
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';
|
|
50
|
-
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-
|
|
51
|
-
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-
|
|
52
|
-
import {
|
|
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';
|
|
53
54
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
54
55
|
import { b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
55
|
-
import { s as startFileWatcher } from './startFileWatcher-
|
|
56
|
-
import { I as InvalidateSync } from './sync
|
|
56
|
+
import { s as startFileWatcher } from './startFileWatcher-BCDkT_tr.mjs';
|
|
57
|
+
import { I as InvalidateSync } from './sync--QUIOuf8.mjs';
|
|
57
58
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
58
59
|
import { t as tmuxArgs, a as scrubTmuxClientEnv, s as shellescape } from './tmuxSocket-B8Yx20sT.mjs';
|
|
59
|
-
import { p as processIdentityFields, r as readSessionLock, t as terminateProcess, d as terminateProcessTree } from './sessionLock-
|
|
60
|
+
import { p as processIdentityFields, r as readSessionLock, t as terminateProcess, d as terminateProcessTree } from './sessionLock-CXOOX-VD.mjs';
|
|
60
61
|
import { findAllHappyProcesses } from './doctor-BPkYWSuq.mjs';
|
|
61
|
-
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-
|
|
62
|
+
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CLdQfe3b.mjs';
|
|
62
63
|
import { promisify } from 'node:util';
|
|
63
|
-
import {
|
|
64
|
-
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';
|
|
65
65
|
import { d as describeAgentHome } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
66
|
-
import './acpSessionResume-
|
|
67
|
-
import './lidState-
|
|
66
|
+
import './acpSessionResume-BKtI9Jq_.mjs';
|
|
67
|
+
import './lidState-DXeYTsrm.mjs';
|
|
68
68
|
import 'node:events';
|
|
69
69
|
import 'socket.io-client';
|
|
70
|
-
import './pushNotifications-
|
|
70
|
+
import './pushNotifications-C4R9-1hU.mjs';
|
|
71
71
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
72
72
|
import './limits-DIo7rEBR.mjs';
|
|
73
|
-
import './time-
|
|
74
|
-
import './registerCommonHandlers-
|
|
73
|
+
import './time-B2KKdAym.mjs';
|
|
74
|
+
import './registerCommonHandlers-a9lHojSV.mjs';
|
|
75
75
|
import 'util';
|
|
76
76
|
import 'cross-spawn';
|
|
77
77
|
import '@paralleldrive/cuid2';
|
|
78
78
|
import 'chalk';
|
|
79
|
+
import 'node:module';
|
|
79
80
|
import 'tweetnacl';
|
|
80
|
-
import './browser-
|
|
81
|
+
import './browser-1j9gdZoD.mjs';
|
|
81
82
|
import 'open';
|
|
82
83
|
import './ids-DU6sLx4C.mjs';
|
|
83
84
|
import 'url';
|
|
84
|
-
import './localHappyAgentAuth-
|
|
85
|
+
import './localHappyAgentAuth-C1A4ChCR.mjs';
|
|
85
86
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
86
87
|
import 'ps-list';
|
|
87
88
|
|
|
@@ -2360,14 +2361,14 @@ const claudeAdapter = {
|
|
|
2360
2361
|
binary: "claude",
|
|
2361
2362
|
files: (ctx) => [{ role: ROLE$1, path: claudeSettingsPath(ctx) }],
|
|
2362
2363
|
view(files, ctx) {
|
|
2363
|
-
const settings = parseJsonObject
|
|
2364
|
+
const settings = parseJsonObject(files[ROLE$1].content, "settings.json");
|
|
2364
2365
|
const current = currentOf$2(settings, ctx);
|
|
2365
2366
|
return { current, pickerModels: pickerModelsOf(current), warnings: warningsOf$2(settings, current, ctx) };
|
|
2366
2367
|
},
|
|
2367
2368
|
plan(files, raw, ctx) {
|
|
2368
2369
|
const patch = parsePatch$1(raw);
|
|
2369
2370
|
const original = files[ROLE$1].content;
|
|
2370
|
-
const before = parseJsonObject
|
|
2371
|
+
const before = parseJsonObject(original, "settings.json");
|
|
2371
2372
|
const settings = structuredClone(before);
|
|
2372
2373
|
const hadEnv = settings.env !== void 0;
|
|
2373
2374
|
const env = childObject(settings, "env", "settings");
|
|
@@ -2428,7 +2429,7 @@ const claudeAdapter = {
|
|
|
2428
2429
|
},
|
|
2429
2430
|
secretsIn(_role, content) {
|
|
2430
2431
|
try {
|
|
2431
|
-
return collectSecretValues(parseJsonObject
|
|
2432
|
+
return collectSecretValues(parseJsonObject(content, "settings.json"));
|
|
2432
2433
|
} catch {
|
|
2433
2434
|
return /* @__PURE__ */ new Set();
|
|
2434
2435
|
}
|
|
@@ -3978,7 +3979,7 @@ const geminiAdapter = {
|
|
|
3978
3979
|
binary: "gemini",
|
|
3979
3980
|
files: (ctx) => [{ role: SETTINGS, path: join(geminiDir(ctx), "settings.json") }, { role: ENV, path: join(geminiDir(ctx), ".env") }],
|
|
3980
3981
|
view(files, ctx) {
|
|
3981
|
-
const settings = parseJsonObject
|
|
3982
|
+
const settings = parseJsonObject(files[SETTINGS].content, "settings.json");
|
|
3982
3983
|
const current = currentOf(settings, parseDotenv(files[ENV].content), ctx);
|
|
3983
3984
|
return { current, pickerModels: uniq([current.model]), warnings: warningsOf(settings, current) };
|
|
3984
3985
|
},
|
|
@@ -3988,7 +3989,7 @@ const geminiAdapter = {
|
|
|
3988
3989
|
const apiKey = normalizeSecret(p.apiKey, ["keep", "clear", "literal"]);
|
|
3989
3990
|
const model = normalizeModelId(p.model);
|
|
3990
3991
|
const settingsText = files[SETTINGS].content;
|
|
3991
|
-
const before = parseJsonObject
|
|
3992
|
+
const before = parseJsonObject(settingsText, "settings.json");
|
|
3992
3993
|
const settings = structuredClone(before);
|
|
3993
3994
|
const changedKeys = [];
|
|
3994
3995
|
let settingsOut;
|
|
@@ -4019,7 +4020,7 @@ const geminiAdapter = {
|
|
|
4019
4020
|
},
|
|
4020
4021
|
secretsIn(role, content) {
|
|
4021
4022
|
try {
|
|
4022
|
-
return role === ENV ? collectSecretValues(parseDotenv(content)) : collectSecretValues(parseJsonObject
|
|
4023
|
+
return role === ENV ? collectSecretValues(parseDotenv(content)) : collectSecretValues(parseJsonObject(content, "settings.json"));
|
|
4023
4024
|
} catch {
|
|
4024
4025
|
return /* @__PURE__ */ new Set();
|
|
4025
4026
|
}
|
|
@@ -5092,196 +5093,6 @@ async function waitForSessionLive(sessionId, live, timeoutMs = AUTOMATION_WAKE_T
|
|
|
5092
5093
|
return true;
|
|
5093
5094
|
}
|
|
5094
5095
|
|
|
5095
|
-
const CLAUDE_KEYCHAIN_SERVICE_PREFIX = "Claude Code";
|
|
5096
|
-
function keychainIdentity(env = process.env, deps = {}) {
|
|
5097
|
-
const home = deps.home ?? homedir();
|
|
5098
|
-
const secureDir = env.CLAUDE_SECURESTORAGE_CONFIG_DIR?.trim();
|
|
5099
|
-
const configDirEnv = env.CLAUDE_CONFIG_DIR?.trim();
|
|
5100
|
-
const configDir = secureDir || configDirEnv || join(home, ".claude");
|
|
5101
|
-
const hasCustomDir = Boolean(secureDir || configDirEnv);
|
|
5102
|
-
const dirSuffix = hasCustomDir ? "-" + createHash("sha256").update(configDir.normalize("NFC")).digest("hex").slice(0, 8) : "";
|
|
5103
|
-
const oauthSuffix = env.CLAUDE_CODE_OAUTH_CLIENT_ID?.trim() ? "-custom-oauth" : "";
|
|
5104
|
-
const rawAccount = env.USER || safeUsername(deps.username);
|
|
5105
|
-
const account = /^[a-zA-Z0-9._-]+$/.test(rawAccount) ? rawAccount : "claude-code-user";
|
|
5106
|
-
return {
|
|
5107
|
-
service: `${CLAUDE_KEYCHAIN_SERVICE_PREFIX}${oauthSuffix}-credentials${dirSuffix}`,
|
|
5108
|
-
account,
|
|
5109
|
-
configDir,
|
|
5110
|
-
credentialsPath: join(configDir, ".credentials.json")
|
|
5111
|
-
};
|
|
5112
|
-
}
|
|
5113
|
-
function safeUsername(provider) {
|
|
5114
|
-
try {
|
|
5115
|
-
return provider ? provider() : userInfo().username;
|
|
5116
|
-
} catch {
|
|
5117
|
-
return "";
|
|
5118
|
-
}
|
|
5119
|
-
}
|
|
5120
|
-
|
|
5121
|
-
const CLAUDE_AUTH_PROBE_VERSION = 1;
|
|
5122
|
-
const LOCAL_CREDENTIAL_SOURCE = "Claude local credentials";
|
|
5123
|
-
function classifyAuthStatus(run, credentialSource) {
|
|
5124
|
-
const localSource = credentialSource === void 0 || credentialSource === LOCAL_CREDENTIAL_SOURCE;
|
|
5125
|
-
if (run.spawnError) {
|
|
5126
|
-
return { status: "error", diagnosis: "probe-crash", detail: `could not run claude auth status: ${run.spawnError}` };
|
|
5127
|
-
}
|
|
5128
|
-
if (run.timedOut) {
|
|
5129
|
-
return { status: "error", diagnosis: "probe-timeout", detail: "claude auth status did not answer within the timeout" };
|
|
5130
|
-
}
|
|
5131
|
-
const parsed = parseJsonObject(run.stdout);
|
|
5132
|
-
if (!parsed) {
|
|
5133
|
-
if (!localSource) return { status: "unknown", authMethod: credentialSource, detail: `auth status unparseable under ${credentialSource}` };
|
|
5134
|
-
return { status: "error", diagnosis: "probe-crash", detail: `claude auth status returned no JSON (exit ${run.exitCode ?? "null"})` };
|
|
5135
|
-
}
|
|
5136
|
-
const authMethod = typeof parsed.authMethod === "string" ? parsed.authMethod : void 0;
|
|
5137
|
-
const subscriptionType = typeof parsed.subscriptionType === "string" ? parsed.subscriptionType : void 0;
|
|
5138
|
-
if (parsed.loggedIn === true) {
|
|
5139
|
-
return { status: "ok", authMethod: localSource ? authMethod : credentialSource, subscriptionType };
|
|
5140
|
-
}
|
|
5141
|
-
if (!localSource) {
|
|
5142
|
-
return { status: "unknown", authMethod: credentialSource, detail: `Claude Code reports loggedIn=false under ${credentialSource}; not a local-credential failure` };
|
|
5143
|
-
}
|
|
5144
|
-
return { status: "not-logged-in", authMethod, subscriptionType, detail: "Claude Code in the daemon context reports it is not logged in" };
|
|
5145
|
-
}
|
|
5146
|
-
function parseJsonObject(text) {
|
|
5147
|
-
const trimmed = text.trim();
|
|
5148
|
-
if (!trimmed) return null;
|
|
5149
|
-
const start = trimmed.indexOf("{");
|
|
5150
|
-
if (start < 0) return null;
|
|
5151
|
-
try {
|
|
5152
|
-
const value = JSON.parse(trimmed.slice(start));
|
|
5153
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
5154
|
-
} catch {
|
|
5155
|
-
return null;
|
|
5156
|
-
}
|
|
5157
|
-
}
|
|
5158
|
-
function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => createRequire(import.meta.url).resolve(s)) {
|
|
5159
|
-
const platformArch = `${platform}-${arch}`;
|
|
5160
|
-
const candidates = [
|
|
5161
|
-
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
5162
|
-
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude.exe`
|
|
5163
|
-
];
|
|
5164
|
-
for (const candidate of candidates) {
|
|
5165
|
-
try {
|
|
5166
|
-
return resolver(candidate);
|
|
5167
|
-
} catch {
|
|
5168
|
-
}
|
|
5169
|
-
}
|
|
5170
|
-
return null;
|
|
5171
|
-
}
|
|
5172
|
-
function interpretSecurityRead(result) {
|
|
5173
|
-
if (result.error === "ENOENT") return { kind: "unsupported" };
|
|
5174
|
-
if (result.error === "timeout") return { kind: "error", detail: "security timed out" };
|
|
5175
|
-
if (result.exitCode === 44) return { kind: "absent" };
|
|
5176
|
-
if (result.exitCode === 36) return { kind: "unreadable" };
|
|
5177
|
-
if (result.exitCode !== 0) return { kind: "error", detail: `security exited ${result.exitCode ?? "null"}` };
|
|
5178
|
-
const raw = result.stdout.trim();
|
|
5179
|
-
if (!raw) return { kind: "absent" };
|
|
5180
|
-
const parsed = parseJsonObject(raw);
|
|
5181
|
-
const oauth = parsed && typeof parsed.claudeAiOauth === "object" && parsed.claudeAiOauth ? parsed.claudeAiOauth : null;
|
|
5182
|
-
if (!oauth) return { kind: "present", accessToken: "", refreshToken: "", raw };
|
|
5183
|
-
return {
|
|
5184
|
-
kind: "present",
|
|
5185
|
-
accessToken: typeof oauth.accessToken === "string" ? oauth.accessToken : "",
|
|
5186
|
-
refreshToken: typeof oauth.refreshToken === "string" ? oauth.refreshToken : "",
|
|
5187
|
-
raw
|
|
5188
|
-
};
|
|
5189
|
-
}
|
|
5190
|
-
function interpretCredentialsFile(text) {
|
|
5191
|
-
if (text === null) return { exists: false, hasTokens: false, refreshToken: "" };
|
|
5192
|
-
const parsed = parseJsonObject(text);
|
|
5193
|
-
const oauth = parsed && typeof parsed.claudeAiOauth === "object" && parsed.claudeAiOauth ? parsed.claudeAiOauth : null;
|
|
5194
|
-
const access = oauth && typeof oauth.accessToken === "string" ? oauth.accessToken : "";
|
|
5195
|
-
const refresh = oauth && typeof oauth.refreshToken === "string" ? oauth.refreshToken : "";
|
|
5196
|
-
return { exists: true, hasTokens: access.length > 0 && refresh.length > 0, refreshToken: refresh };
|
|
5197
|
-
}
|
|
5198
|
-
function tokenTail(token) {
|
|
5199
|
-
return token ? createHash("sha256").update(token).digest("hex").slice(-6) : "";
|
|
5200
|
-
}
|
|
5201
|
-
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.";
|
|
5202
|
-
function diagnoseStores(input) {
|
|
5203
|
-
const { status, keychain, file } = input;
|
|
5204
|
-
if (keychain.kind === "present") {
|
|
5205
|
-
const empty = keychain.accessToken.length === 0 && keychain.refreshToken.length === 0;
|
|
5206
|
-
if (empty && file.hasTokens && status === "not-logged-in") {
|
|
5207
|
-
return {
|
|
5208
|
-
diagnosis: "keychain-empty-item",
|
|
5209
|
-
repairable: "delete-empty-keychain-item",
|
|
5210
|
-
keychainRaw: keychain.raw,
|
|
5211
|
-
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."
|
|
5212
|
-
};
|
|
5213
|
-
}
|
|
5214
|
-
if (!empty && file.hasTokens && tokenTail(keychain.refreshToken) !== tokenTail(file.refreshToken)) {
|
|
5215
|
-
return {
|
|
5216
|
-
diagnosis: "store-divergence",
|
|
5217
|
-
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."
|
|
5218
|
-
};
|
|
5219
|
-
}
|
|
5220
|
-
return {};
|
|
5221
|
-
}
|
|
5222
|
-
if ((keychain.kind === "absent" || keychain.kind === "unreadable" || keychain.kind === "unsupported") && !file.hasTokens) {
|
|
5223
|
-
return { diagnosis: "no-credentials", detail: "No Claude Code credentials found for this daemon context; log in with `claude` on this machine." };
|
|
5224
|
-
}
|
|
5225
|
-
if (keychain.kind === "unreadable" && file.hasTokens && status === "not-logged-in") {
|
|
5226
|
-
return { diagnosis: "credentials-rejected", detail: CREDENTIALS_REJECTED_DETAIL };
|
|
5227
|
-
}
|
|
5228
|
-
if (keychain.kind === "error") {
|
|
5229
|
-
return { detail: `keychain check failed: ${keychain.detail}` };
|
|
5230
|
-
}
|
|
5231
|
-
return {};
|
|
5232
|
-
}
|
|
5233
|
-
function securityReadArgs(identity) {
|
|
5234
|
-
return ["find-generic-password", "-s", identity.service, "-a", identity.account, "-w"];
|
|
5235
|
-
}
|
|
5236
|
-
function securityDeleteArgs(identity) {
|
|
5237
|
-
return ["delete-generic-password", "-s", identity.service, "-a", identity.account];
|
|
5238
|
-
}
|
|
5239
|
-
const HAPPY_DAEMON_LAUNCHD_LABEL = "com.mereith.happy-daemon";
|
|
5240
|
-
function classifyLineage(input) {
|
|
5241
|
-
if (input.platform !== "darwin") return "other";
|
|
5242
|
-
const label = input.label ?? HAPPY_DAEMON_LAUNCHD_LABEL;
|
|
5243
|
-
if (input.env.XPC_SERVICE_NAME !== label) return "other";
|
|
5244
|
-
if (input.launchdJobPid !== null && input.ancestorPids.includes(input.launchdJobPid)) return "launchd";
|
|
5245
|
-
return "inherited-env";
|
|
5246
|
-
}
|
|
5247
|
-
function parseLaunchctlPid(printOutput) {
|
|
5248
|
-
const match = /^\s*pid\s*=\s*(\d+)/m.exec(printOutput);
|
|
5249
|
-
return match ? Number(match[1]) : null;
|
|
5250
|
-
}
|
|
5251
|
-
function keychainOffShimDir(happyLibDir) {
|
|
5252
|
-
return join(happyLibDir, "scripts", "shims", "keychain-off");
|
|
5253
|
-
}
|
|
5254
|
-
function withKeychainOffPath(path, shimDir) {
|
|
5255
|
-
const parts = (path ?? "").split(delimiter).filter((p) => p && p !== shimDir);
|
|
5256
|
-
return [shimDir, ...parts].join(delimiter);
|
|
5257
|
-
}
|
|
5258
|
-
function buildClaudeAuthState(input) {
|
|
5259
|
-
const { classification, diagnosis } = input;
|
|
5260
|
-
const detail = (diagnosis?.detail ?? classification.detail)?.slice(0, 200);
|
|
5261
|
-
const state = {
|
|
5262
|
-
probeVersion: CLAUDE_AUTH_PROBE_VERSION,
|
|
5263
|
-
daemonPid: input.daemonPid,
|
|
5264
|
-
status: classification.status,
|
|
5265
|
-
context: { platform: input.platform, lineage: input.lineage, credentialStore: input.credentialStore },
|
|
5266
|
-
checkedAt: input.now ?? Date.now()
|
|
5267
|
-
};
|
|
5268
|
-
if (classification.authMethod) state.authMethod = classification.authMethod;
|
|
5269
|
-
if (classification.subscriptionType) state.subscriptionType = classification.subscriptionType;
|
|
5270
|
-
const diag = diagnosis?.diagnosis ?? classification.diagnosis;
|
|
5271
|
-
if (diag) state.diagnosis = diag;
|
|
5272
|
-
if (detail) state.detail = detail;
|
|
5273
|
-
if (diagnosis?.repairable) state.repairable = diagnosis.repairable;
|
|
5274
|
-
return state;
|
|
5275
|
-
}
|
|
5276
|
-
function claudeAuthStateChanged(prev, next) {
|
|
5277
|
-
if (!prev) return true;
|
|
5278
|
-
const strip = ({ checkedAt: _c, ...rest }) => JSON.stringify(rest);
|
|
5279
|
-
return strip(prev) !== strip(next);
|
|
5280
|
-
}
|
|
5281
|
-
function keychainIdentityFor(env) {
|
|
5282
|
-
return keychainIdentity(env);
|
|
5283
|
-
}
|
|
5284
|
-
|
|
5285
5096
|
const CLAUDE_AUTH_PROBE_INTERVAL_MS = 10 * 60 * 1e3;
|
|
5286
5097
|
const CLAUDE_AUTH_REFRESH_INTERVAL_MS = 30 * 60 * 1e3;
|
|
5287
5098
|
const PROBE_TIMEOUT_MS = 8e3;
|
|
@@ -5292,6 +5103,7 @@ class ClaudeAuthService {
|
|
|
5292
5103
|
this.opts = opts;
|
|
5293
5104
|
this.env = opts.env ?? process.env;
|
|
5294
5105
|
this.platform = opts.platform ?? process.platform;
|
|
5106
|
+
this.lineage = opts.lineage ?? null;
|
|
5295
5107
|
}
|
|
5296
5108
|
timer = null;
|
|
5297
5109
|
signalTimer = null;
|
|
@@ -6930,7 +6742,9 @@ function createAutomationRunner(deps) {
|
|
|
6930
6742
|
function persist(receipt) {
|
|
6931
6743
|
writeReceipt(home, receipt, now());
|
|
6932
6744
|
}
|
|
6933
|
-
async function finish(item,
|
|
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(", ")}`);
|
|
6934
6748
|
try {
|
|
6935
6749
|
await client.report(item.runId, report2);
|
|
6936
6750
|
} catch (error) {
|
|
@@ -8570,8 +8384,10 @@ async function startDaemon() {
|
|
|
8570
8384
|
}
|
|
8571
8385
|
});
|
|
8572
8386
|
const daemonClaudeCredentials = resolveClaudeCredentialReadiness();
|
|
8573
|
-
const
|
|
8574
|
-
|
|
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 ?? "-"}` : ""})`);
|
|
8575
8391
|
let fileState = {
|
|
8576
8392
|
pid: process.pid,
|
|
8577
8393
|
httpPort: controlPort,
|
|
@@ -8654,7 +8470,8 @@ async function startDaemon() {
|
|
|
8654
8470
|
await writeSettings({ ...settings, claudeCredentialStore: store });
|
|
8655
8471
|
claudeCredentialStoreSetting = store;
|
|
8656
8472
|
},
|
|
8657
|
-
publish: (state) => apiMachine.setClaudeAuthState(state)
|
|
8473
|
+
publish: (state) => apiMachine.setClaudeAuthState(state),
|
|
8474
|
+
lineage
|
|
8658
8475
|
});
|
|
8659
8476
|
claudeAuthServiceRef = claudeAuthService;
|
|
8660
8477
|
apiMachine.setClaudeAuthHandlers({
|
|
@@ -8831,8 +8648,8 @@ async function startDaemon() {
|
|
|
8831
8648
|
await cleanupDaemonState();
|
|
8832
8649
|
await releaseDaemonLock(daemonLockHandle);
|
|
8833
8650
|
await stopCaffeinate();
|
|
8834
|
-
if (daemonSupervisor
|
|
8835
|
-
logger.debug(`[DAEMON RUN]
|
|
8651
|
+
if (daemonSupervisor !== "none") {
|
|
8652
|
+
logger.debug(`[DAEMON RUN] ${daemonSupervisor}-supervised: exiting ${HANDOVER_EXIT_CODE} for the supervisor to restart on the new bundle`);
|
|
8836
8653
|
process.exit(HANDOVER_EXIT_CODE);
|
|
8837
8654
|
}
|
|
8838
8655
|
try {
|
|
@@ -8924,7 +8741,9 @@ async function startDaemon() {
|
|
|
8924
8741
|
// B-688: this daemon serves the model-config-* RPCs (web gates 「模型与 Provider」 on it).
|
|
8925
8742
|
modelConfigVersion: MODEL_CONFIG_CAPABILITY_VERSION,
|
|
8926
8743
|
// B-719: this daemon serves `harness-install` (web gates the Install / Update buttons on it).
|
|
8927
|
-
harnessInstallVersion: HARNESS_INSTALL_CAPABILITY_VERSION
|
|
8744
|
+
harnessInstallVersion: HARNESS_INSTALL_CAPABILITY_VERSION,
|
|
8745
|
+
// B-755: this daemon serves `fs-mkdir` (web gates 「新建工作目录」 on it).
|
|
8746
|
+
fsMkdirVersion: FS_MKDIR_CAPABILITY_VERSION
|
|
8928
8747
|
})).catch(() => logger.debug("[DAEMON RUN] Teams capability publication will retry on reconnect"));
|
|
8929
8748
|
const cleanupAndShutdown = async (source, errorMessage) => {
|
|
8930
8749
|
webPanelsSync.stop();
|