very-happy-cli 0.2.189 → 0.2.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpBackend-fj16v_cf.mjs → AcpBackend-CCy_9AfR.mjs} +3 -3
- package/dist/{AcpBackend-DRPJ2g9G.cjs → AcpBackend-DgrIc1vH.cjs} +3 -3
- package/dist/{AcpSessionManager-BZPmUDL5.mjs → AcpSessionManager-CQnxx7gD.mjs} +2 -2
- package/dist/{AcpSessionManager-DM-KKg6v.cjs → AcpSessionManager-DVOzCD3P.cjs} +2 -2
- package/dist/{BasePermissionHandler-DjM16uJz.cjs → BasePermissionHandler-C9Ag7yvs.cjs} +1 -1
- package/dist/{BasePermissionHandler-CVtH-snr.mjs → BasePermissionHandler-DYLN6Ec9.mjs} +1 -1
- package/dist/{acpSessionResume-Dxl1LRAT.mjs → acpSessionResume-Bi7pA1n_.mjs} +1 -1
- package/dist/{acpSessionResume-2BTMsB7_.cjs → acpSessionResume-TvP_4Zq2.cjs} +1 -1
- package/dist/{agentHome-CHctmMzZ.mjs → agentHome-DGv105SR.mjs} +4 -4
- package/dist/{agentHome-W17n1gnH.cjs → agentHome-DNUKJWOY.cjs} +4 -4
- package/dist/{api-BDuuyys8.cjs → api-BBxZ7y2z.cjs} +19 -10
- package/dist/{api-B0yN68XH.mjs → api-jfeMRg5R.mjs} +19 -10
- package/dist/{apiMachine-mc9CsKuS.mjs → apiMachine-DRJ7y-BB.mjs} +56 -15
- package/dist/{apiMachine-iddD-F19.cjs → apiMachine-DqyjKBZG.cjs} +56 -15
- package/dist/{attachmentContent-Cc5b7TPr.cjs → attachmentContent-BO2njyza.cjs} +2 -2
- package/dist/{attachmentContent-CcIdMfAx.mjs → attachmentContent-Dm_RIs5L.mjs} +2 -2
- package/dist/{auth-DNAgkUkB.mjs → auth-BYDtjVNb.mjs} +8 -8
- package/dist/{auth-CyrVvWHF.mjs → auth-DC6rg8lJ.mjs} +5 -5
- package/dist/{auth-B7tVmyfX.cjs → auth-DLR3ksCF.cjs} +8 -8
- package/dist/{auth-DQKSpaEf.cjs → auth-DnxoVkkf.cjs} +5 -5
- package/dist/{auto-CetlumDo.cjs → auto-CwO0u8hB.cjs} +18 -18
- package/dist/{auto-BklCipw1.mjs → auto-D5Jhukq1.mjs} +18 -18
- package/dist/{bootstrap-DfXwkUQb.mjs → bootstrap-rLaL3kTa.mjs} +2 -2
- package/dist/{bootstrap-CDY-Vz8q.cjs → bootstrap-sly4qPPY.cjs} +2 -2
- package/dist/{browser-D1yzC0Tu.cjs → browser-BTgZ9d4i.cjs} +1 -1
- package/dist/{browser-vb0k1zfI.mjs → browser-CHpVgyni.mjs} +1 -1
- package/dist/{claudeLocal-2dJIiTIq.cjs → claudeLocal-1vuTFcL8.cjs} +5 -5
- package/dist/{claudeLocal-Bid_rC_v.mjs → claudeLocal-Bgb5GGsq.mjs} +5 -5
- package/dist/{claudeLocalLauncher-Jm5oQX5Z.cjs → claudeLocalLauncher-DOsL6HFY.cjs} +10 -10
- package/dist/{claudeLocalLauncher-5pzpETxd.mjs → claudeLocalLauncher-T7EfT68h.mjs} +10 -10
- package/dist/{claudeSessionFork-DzecSBO4.mjs → claudeSessionFork-CPvi6yDX.mjs} +1 -1
- package/dist/{claudeSessionFork-DsbcuDEJ.cjs → claudeSessionFork-Cko4SaVi.cjs} +1 -1
- package/dist/{client-CvjjadIE.mjs → client-BXD66ZF5.mjs} +2 -2
- package/dist/{client-C9Ecbtko.mjs → client-Bh1aUPh-.mjs} +4 -4
- package/dist/{client-B161HwAk.mjs → client-Bi20Ka0h.mjs} +2 -2
- package/dist/{client-D0aYWt53.cjs → client-BscskEBk.cjs} +2 -2
- package/dist/{client-BNmFaRXZ.cjs → client-C-OdTbrU.cjs} +4 -4
- package/dist/{client-DIfxYk7B.cjs → client-C5-C0t2a.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAppServerClient-CO9f4Jr8.cjs → codexAppServerClient-DKXeikEe.cjs} +13 -6
- package/dist/{codexAppServerClient-BlVmpjR-.mjs → codexAppServerClient-DXhAf6i-.mjs} +13 -6
- package/dist/{codexCommand-CAMR4g5o.mjs → codexCommand-CIaOiiOj.mjs} +137 -55
- package/dist/{codexCommand-BfoRP6E9.cjs → codexCommand-DvbbpYBS.cjs} +141 -59
- package/dist/{codexTermination-BvGlN02_.mjs → codexTermination-BcQdEDaw.mjs} +1 -1
- package/dist/{codexTermination-IrLZQzKC.cjs → codexTermination-BszWfyk5.cjs} +1 -1
- package/dist/{codexThreadFork-DNekT4nQ.cjs → codexThreadFork-5kwoKjMu.cjs} +11 -17
- package/dist/{codexThreadFork-R76RU5H0.mjs → codexThreadFork-DobPd19R.mjs} +11 -17
- package/dist/{config-BGFqQGvh.cjs → config-Di3Cf6js.cjs} +3 -3
- package/dist/{config-CtMgGPvf.mjs → config-OCEcVVK1.mjs} +3 -3
- package/dist/{configuration-C0ctLGW2.cjs → configuration-DfPBa-9d.cjs} +1 -1
- package/dist/{configuration-1FabKklB.mjs → configuration-ECqXu34R.mjs} +1 -1
- package/dist/{connect-DSw-2f52.cjs → connect-BPQRuOw5.cjs} +13 -13
- package/dist/{connect-0lSugpjf.mjs → connect-BTfAUhk8.mjs} +13 -13
- package/dist/{context-BgxbXWKS.mjs → context-CfgTFpCB.mjs} +1 -1
- package/dist/{context-D-hEk5pC.cjs → context-Co7hUaW-.cjs} +1 -1
- package/dist/{controlClient-F7hAEEy2.cjs → controlClient-C13_pSKG.cjs} +3 -3
- package/dist/{controlClient-DwNnNAUx.mjs → controlClient-ClI7A0qE.mjs} +3 -3
- package/dist/{createSessionMetadata-CG6Klinp.mjs → createSessionMetadata-B0eT_Kfj.mjs} +2 -2
- package/dist/{createSessionMetadata-DezS33OM.cjs → createSessionMetadata-Cf78KHtt.cjs} +2 -2
- package/dist/defaultPermissionMode-m6z2QVyP.mjs +43 -0
- package/dist/defaultPermissionMode-oqTupStc.cjs +49 -0
- package/dist/{deterministicJson-BMwgK21e.mjs → deterministicJson-BtSwbsok.mjs} +13 -13
- package/dist/{deterministicJson-D0LU_XbO.cjs → deterministicJson-CpFFgUL_.cjs} +13 -13
- package/dist/{doctor-wVNvRarN.cjs → doctor-BEU0_1Xv.cjs} +7 -7
- package/dist/{doctor-D16hySse.mjs → doctor-lsxmAK4o.mjs} +7 -7
- package/dist/{downloadTarget-C6tqaXGm.mjs → downloadTarget-BXqXhNF7.mjs} +6 -6
- package/dist/{downloadTarget-aNcCxVRL.cjs → downloadTarget-CikzJv1h.cjs} +6 -6
- package/dist/{ensureDaemonRunning-CIghxgDR.cjs → ensureDaemonRunning-BUuH-pbE.cjs} +5 -5
- package/dist/{ensureDaemonRunning-DZq8bvsp.mjs → ensureDaemonRunning-B_9WAlbU.mjs} +5 -5
- package/dist/exitAfterFlush-AbKNZM0N.mjs +23 -0
- package/dist/exitAfterFlush-DIT_sIxR.cjs +25 -0
- package/dist/{handleResumeCommand-BNnD7EuD.mjs → handleResumeCommand-BK9XKH_l.mjs} +5 -5
- package/dist/{handleResumeCommand-CMUTygsm.cjs → handleResumeCommand-Dj7oi2KO.cjs} +5 -5
- package/dist/{agentAttachments-Dbw8iMCZ.cjs → heldInput-BOtqFO2r.cjs} +27 -0
- package/dist/heldInput-C69lA2dH.mjs +44 -0
- package/dist/{index-BCQr-5Ei.mjs → index-BdOJOZ6J.mjs} +4 -4
- package/dist/{index-CKd20r1W.mjs → index-BjZnpGWX.mjs} +3 -3
- package/dist/{index-WKyN-bNy.mjs → index-Bq8NKSCF.mjs} +65 -1
- package/dist/{index-BOe6dKnL.cjs → index-CLUHaPU8.cjs} +76 -0
- package/dist/{index-CnzsOD19.cjs → index-CauRYQKr.cjs} +133 -54
- package/dist/{index-4TpmBb2Q.cjs → index-CmZusg8Q.cjs} +3 -3
- package/dist/{index-BuiG8hmg.mjs → index-Cxso1rg4.mjs} +133 -54
- package/dist/{index-De02DNu5.cjs → index-D3c7CLot.cjs} +4 -4
- package/dist/{index-B81qV_F_.cjs → index-Dg2NAF_-.cjs} +4 -4
- package/dist/{index-Df0bc_et.mjs → index-DuK9XYbZ.mjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-23ehAdTD.mjs → install-DTIveLOS.mjs} +3 -3
- package/dist/{install-DNbIEJUk.cjs → install-DXllkuy0.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +63 -1
- package/dist/lib.d.mts +63 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-B4dHJCeS.cjs → lidState-C9_DoF9i.cjs} +1 -1
- package/dist/{lidState-q5Its2Hm.mjs → lidState-CD81ryTy.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CG2nPD_H.cjs → localHappyAgentAuth-CCjUvOfi.cjs} +1 -1
- package/dist/{localHappyAgentAuth-C_G5u5lY.mjs → localHappyAgentAuth-Cg-m1lwm.mjs} +1 -1
- package/dist/{logger-BP1SW7Cs.cjs → logger-Ct2zvaq0.cjs} +2 -2
- package/dist/{logger-DOKH3Zbh.mjs → logger-GcbI0eg2.mjs} +2 -2
- package/dist/{machineMetadata-D-5qeIqd.mjs → machineMetadata-CXRmFNOV.mjs} +3 -3
- package/dist/{machineMetadata-BKX3ov9g.cjs → machineMetadata-DDCVWb_x.cjs} +3 -3
- package/dist/{main-ndpVIaSG.cjs → main-BHC-WIcM.cjs} +49 -48
- package/dist/{main-DODz8DQE.mjs → main-omGr_ONk.mjs} +49 -48
- package/dist/{mcp-BBwbSODp.mjs → mcp-D5hxmRAq.mjs} +15 -15
- package/dist/{mcp-Bc4U4exu.cjs → mcp-xUzii0m8.cjs} +15 -15
- package/dist/{mirrorProtocol-CiA3hO2y.cjs → mirrorProtocol-Dfl8Ahyf.cjs} +3 -3
- package/dist/{mirrorProtocol-D2vTWteS.mjs → mirrorProtocol-Lcx20Oby.mjs} +3 -3
- package/dist/{package-CYDdLA6R.cjs → package-9n7wd2dT.cjs} +7 -7
- package/dist/{package-DTcaIhjW.mjs → package-BsUHyqWe.mjs} +7 -7
- package/dist/{panels-C2xZ8rqU.cjs → panels-BfknEmt7.cjs} +5 -5
- package/dist/{panels-DCaLxlSL.mjs → panels-CpEKWWbI.mjs} +5 -5
- package/dist/{peerTools-B4315xjX.cjs → peerTools-CElYh-5u.cjs} +5 -5
- package/dist/{peerTools-BtrUnSwz.mjs → peerTools-CwCe6tmJ.mjs} +5 -5
- package/dist/{persistence-CrzC7yr_.cjs → persistence-A2NeERZJ.cjs} +6 -2
- package/dist/{persistence-0INrP3aB.mjs → persistence-Cpw4yJs8.mjs} +6 -3
- package/dist/{piRunnerArgs-BtzW_kfh.cjs → piRunnerArgs-BnFU0K73.cjs} +1 -1
- package/dist/{piRunnerArgs-DRuxMlX1.mjs → piRunnerArgs-Bqmu16He.mjs} +1 -1
- package/dist/{piRuntime-BMAFpIBV.mjs → piRuntime-Cgn1b0OX.mjs} +1 -1
- package/dist/{piRuntime-DEbPE_kW.cjs → piRuntime-DpS9TAIs.cjs} +1 -1
- package/dist/{piTerminal-DQXV8_we.mjs → piTerminal-BGdps8f3.mjs} +17 -17
- package/dist/{piTerminal-MtxDtBE2.cjs → piTerminal-rmve-VlI.cjs} +17 -17
- package/dist/{pushNotifications-CalIS9sq.cjs → pushNotifications-23YSd-0l.cjs} +28 -3
- package/dist/{pushNotifications-Cq1s8YVK.mjs → pushNotifications-XAM8__Pg.mjs} +28 -3
- package/dist/{query-BYiPBHPC.mjs → query-SZcYnJoW.mjs} +1 -1
- package/dist/{query-CE2XDhhw.cjs → query-u2GX-I0C.cjs} +1 -1
- package/dist/{rateLimitReporter-DR5LXuiQ.mjs → rateLimitReporter-COUkf446.mjs} +3 -3
- package/dist/{rateLimitReporter-BKmoOZQi.cjs → rateLimitReporter-CaTzBe3x.cjs} +3 -3
- package/dist/{rateLimitWindows-Cs56YJCH.cjs → rateLimitWindows-B2Kx6L0S.cjs} +1 -1
- package/dist/{rateLimitWindows-5vIuNjko.mjs → rateLimitWindows-j_qQk0KY.mjs} +1 -1
- package/dist/{registerCommonHandlers-DZPozYxc.cjs → registerCommonHandlers-D1MiSfcB.cjs} +2 -2
- package/dist/{registerCommonHandlers-DWkTysjD.mjs → registerCommonHandlers-DRRfinzK.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CSCTRIbI.mjs → registerKillSessionHandler-Cpug_r5C.mjs} +16 -6
- package/dist/{registerKillSessionHandler-DhCjrs44.cjs → registerKillSessionHandler-hvCsEn7b.cjs} +16 -6
- package/dist/{remoteSessionClient-Dq8XTLQP.cjs → remoteSessionClient-6ymeMVa4.cjs} +5 -5
- package/dist/{remoteSessionClient-Vfj_5g2-.mjs → remoteSessionClient-BdnJ_n8C.mjs} +5 -5
- package/dist/{reportProgressTool-B7zmX7NJ.mjs → reportProgressTool-XgQBzxoD.mjs} +3 -3
- package/dist/{reportProgressTool-DznxPKES.cjs → reportProgressTool-tzQLCLIw.cjs} +3 -3
- package/dist/{run-DSfNcR62.mjs → run-Bt0AklUU.mjs} +396 -43
- package/dist/{run-Ca8BiNCp.cjs → run-DYL_wuj7.cjs} +396 -43
- package/dist/{runClaude-hoepv-0X.mjs → runClaude-C3rii_S6.mjs} +47 -27
- package/dist/{runClaude-ClQQcgoO.cjs → runClaude-CBEpYO4S.cjs} +49 -29
- package/dist/{runClaudeDeps-ck5_GYlP.cjs → runClaudeDeps-CYuozSC6.cjs} +187 -61
- package/dist/{runClaudeDeps-D_v8t2SK.mjs → runClaudeDeps-DlVfMG4F.mjs} +192 -66
- package/dist/{runGemini-Cj0XsMiM.cjs → runGemini-CEI3b90u.cjs} +33 -33
- package/dist/{runGemini-CTr2-cYG.mjs → runGemini-DkYhRk9S.mjs} +33 -33
- package/dist/{runOpenClaw-BoN1e3lP.cjs → runOpenClaw-BgjD6E4d.cjs} +18 -18
- package/dist/{runOpenClaw-CdDMntiV.mjs → runOpenClaw-DpprWCoz.mjs} +18 -18
- package/dist/{sandbox-DcaWB-Ou.mjs → sandbox-DJ7A7lsy.mjs} +4 -4
- package/dist/{sandbox-BY2h19gc.cjs → sandbox-XCDUbH72.cjs} +4 -4
- package/dist/{selfCheck-DFS_GUaQ.cjs → selfCheck-BYUDB1Uq.cjs} +37 -37
- package/dist/selfCheck-C-rNljKV.mjs +86 -0
- package/dist/{send-UBTHHNvZ.mjs → send-Ba63huxv.mjs} +8 -8
- package/dist/{send-BMsUYU6g.cjs → send-CASDBCyJ.cjs} +8 -8
- package/dist/{server-YrHMHNz1.cjs → server-cZoV9XRt.cjs} +6 -6
- package/dist/{server-Dt3mCtfQ.mjs → server-w3W0toNd.mjs} +4 -4
- package/dist/{sessionLock-DSqiP2lH.cjs → sessionLock-BmLA2S8K.cjs} +134 -3
- package/dist/{sessionLock-tEFvFXLD.mjs → sessionLock-G2PMqvsh.mjs} +121 -4
- package/dist/{sessionOps-CljctDs5.mjs → sessionOps-DPw5k8vV.mjs} +15 -5
- package/dist/{sessionOps-BzeOKIEF.cjs → sessionOps-DXlTmS7J.cjs} +15 -4
- package/dist/{sessionProvider-BnUFSJXM.mjs → sessionProvider-DUn91LhJ.mjs} +5 -5
- package/dist/{sessionProvider-ORgzmkXy.cjs → sessionProvider-Dg691XQ4.cjs} +5 -5
- package/dist/{sessionScanner-Cr6PJ3PT.cjs → sessionScanner-AHjnicxi.cjs} +3 -3
- package/dist/{sessionScanner-DZUlkdF6.mjs → sessionScanner-BCXpdZJN.mjs} +3 -3
- package/dist/{sessions-aIo_HjmY.cjs → sessions-BiBXOBx0.cjs} +36 -25
- package/dist/{sessions-15cag-su.mjs → sessions-Clk8MR5Y.mjs} +35 -26
- package/dist/{setupOfflineReconnection-tV0Q1dgR.cjs → setupOfflineReconnection-BKLfOd-i.cjs} +2 -2
- package/dist/{setupOfflineReconnection-B7I8R2Ex.mjs → setupOfflineReconnection-DI-QZGYz.mjs} +2 -2
- package/dist/{spawn-ByrQgruJ.mjs → spawn-4tsp1uhh.mjs} +15 -15
- package/dist/{spawn-VG-HjJiR.cjs → spawn-D5omsx1Q.cjs} +15 -15
- package/dist/{spawnAgents-Bh1RPShN.mjs → spawnAgents-CjoU6ZOS.mjs} +8 -2
- package/dist/{spawnAgents-C1-4m7aN.cjs → spawnAgents-CtkkIFHd.cjs} +8 -2
- package/dist/{spawnHappyCLI-CxiR2Qoy.cjs → spawnHappyCLI-CF_gLi92.cjs} +1 -1
- package/dist/{spawnHappyCLI-CEsXwz5V.mjs → spawnHappyCLI-CIA9Sc_5.mjs} +1 -1
- package/dist/{startFileWatcher-C-XCZ5t2.cjs → startFileWatcher-9Stpxe7p.cjs} +1 -1
- package/dist/{startFileWatcher-DkEeeAtL.mjs → startFileWatcher-CDO6fb2m.mjs} +1 -1
- package/dist/{defaultPermissionMode-e2bIIJG4.mjs → startupSessionCreate-BtR4iYEC.mjs} +25 -6
- package/dist/{defaultPermissionMode-5EvgRq38.cjs → startupSessionCreate-CcF7rGGB.cjs} +25 -7
- package/dist/{streamRelay-D9a4cBEa.cjs → streamRelay-BhI6jqF-.cjs} +1 -1
- package/dist/{streamRelay-CqBynIon.mjs → streamRelay-DMwOMTKf.mjs} +1 -1
- package/dist/{sync-CoChLEIg.cjs → sync-Ba8N6xba.cjs} +1 -1
- package/dist/{sync-BvDMkKAN.mjs → sync-C0PRuTMj.mjs} +1 -1
- package/dist/{systemPrompt-CgDaPigN.mjs → systemPrompt-D0q8eyjy.mjs} +2 -2
- package/dist/{systemPrompt-Dy_Rf-0Z.cjs → systemPrompt-DV5IReD4.cjs} +2 -2
- package/dist/{teams-BC4_e5hR.mjs → teams-BO3_arwM.mjs} +7 -7
- package/dist/{teams-DPvfLAk8.cjs → teams-z3Gp-KlV.cjs} +7 -7
- package/dist/{template-17HATY_Y.cjs → template-B_5l6pkc.cjs} +1 -1
- package/dist/{template-CEK8MEjo.mjs → template-DLR_0hfj.mjs} +1 -1
- package/dist/{time-XwEZxKGc.cjs → time-Cy0a-7YX.cjs} +1 -1
- package/dist/{time-CUK37wiV.mjs → time-D0jvDRhn.mjs} +1 -1
- package/dist/{titleGenerator-DWRVdqMU.mjs → titleGenerator-AGQsXskb.mjs} +1 -1
- package/dist/{titleGenerator-DVX0NZUn.cjs → titleGenerator-RGHWP2YL.cjs} +2 -2
- package/dist/{todo-BNMGXneA.mjs → todo-BZ954vsz.mjs} +6 -6
- package/dist/{todo-CKGrSrRE.cjs → todo-CzIDPLFy.cjs} +6 -6
- package/dist/{tools-CjMafO_D.cjs → tools-B1x1j6tz.cjs} +1 -1
- package/dist/{tools-CCIEAVbB.mjs → tools-Bei5i03L.mjs} +1 -1
- package/dist/{uninstall-CJvJ7gjr.mjs → uninstall-B4T_e3Mr.mjs} +3 -3
- package/dist/{uninstall-BdFbTXnL.cjs → uninstall-C3cnIvz1.cjs} +3 -3
- package/package.json +7 -7
- package/dist/agentAttachments-M_B5qEF2.mjs +0 -18
- package/dist/selfCheck-BQ_H2Sns.mjs +0 -86
- package/dist/startupSessionCreate-CYc8mra-.cjs +0 -26
- package/dist/startupSessionCreate-npXe2TdN.mjs +0 -24
|
@@ -1,94 +1,95 @@
|
|
|
1
|
-
import { D as DefaultTransport, A as AcpBackend, i as isAgentExitError, a as acpNoticeMessage } from './AcpBackend-
|
|
2
|
-
export { b as DEFAULT_IDLE_TIMEOUT_MS, c as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, d as formatDurationMinutes, h as handleAgentMessageChunk, g as handleAgentThoughtChunk, j as handleLegacyMessageChunk, k as handlePlanUpdate, l as handleThinkingUpdate, m as handleToolCall, n as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-
|
|
3
|
-
import { l as logger } from './logger-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
5
|
-
import {
|
|
6
|
-
import { h as hashObject, s as startHappyServer, r as readPiModelsJson, a as resolvePiContextUsage, c as createProjectInjector } from './deterministicJson-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend, i as isAgentExitError, a as acpNoticeMessage } from './AcpBackend-CCy_9AfR.mjs';
|
|
2
|
+
export { b as DEFAULT_IDLE_TIMEOUT_MS, c as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, d as formatDurationMinutes, h as handleAgentMessageChunk, g as handleAgentThoughtChunk, j as handleLegacyMessageChunk, k as handlePlanUpdate, l as handleThinkingUpdate, m as handleToolCall, n as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-CCy_9AfR.mjs';
|
|
3
|
+
import { l as logger } from './logger-GcbI0eg2.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-CQnxx7gD.mjs';
|
|
5
|
+
import { P as PROMPT_QUEUE_CAPABILITY, a as PROJECT_SESSION_CAPABILITY, V as PI_STEER_CAPABILITY, t as BUILTIN_TODO_DISCOVERY } from './index-Bq8NKSCF.mjs';
|
|
6
|
+
import { h as hashObject, s as startHappyServer, r as readPiModelsJson, a as resolvePiContextUsage, c as createProjectInjector } from './deterministicJson-BtSwbsok.mjs';
|
|
7
7
|
import { c as compactCommandText, C as COMPACT_UNSUPPORTED_NOTICE } from './specialCommands-MXUN0wfI.mjs';
|
|
8
|
-
import { r as registerAgentAttachmentDownloads } from './
|
|
9
|
-
import { c as configuration } from './configuration-
|
|
10
|
-
import { a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt, C as CLAUDE_ATTACHMENT_KINDS } from './attachmentContent-
|
|
11
|
-
import { p as preparePiTeamsRuntime } from './piRuntime-
|
|
8
|
+
import { r as registerAgentAttachmentDownloads, H as HeldInput } from './heldInput-C69lA2dH.mjs';
|
|
9
|
+
import { c as configuration } from './configuration-ECqXu34R.mjs';
|
|
10
|
+
import { a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt, C as CLAUDE_ATTACHMENT_KINDS } from './attachmentContent-Dm_RIs5L.mjs';
|
|
11
|
+
import { p as preparePiTeamsRuntime } from './piRuntime-Cgn1b0OX.mjs';
|
|
12
12
|
import { randomUUID } from 'node:crypto';
|
|
13
13
|
import { join } from 'node:path';
|
|
14
|
-
import { c as connectionState, A as ApiClient } from './api-
|
|
15
|
-
import { s as sharedProjectsClient } from './client-
|
|
16
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
17
|
-
import { r as readSettings } from './persistence-
|
|
18
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
19
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
20
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
21
|
-
import { c as createSessionForStartup } from './startupSessionCreate-
|
|
22
|
-
import { n as notifyDaemonSessionStarted, k as reportSessionEditToDaemon } from './controlClient-
|
|
14
|
+
import { c as connectionState, A as ApiClient } from './api-jfeMRg5R.mjs';
|
|
15
|
+
import { s as sharedProjectsClient } from './client-Bi20Ka0h.mjs';
|
|
16
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-Cpug_r5C.mjs';
|
|
17
|
+
import { r as readSettings, a as resolveCheckMs } from './persistence-Cpw4yJs8.mjs';
|
|
18
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-CXRmFNOV.mjs';
|
|
19
|
+
import { c as createSessionMetadata } from './createSessionMetadata-B0eT_Kfj.mjs';
|
|
20
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-DI-QZGYz.mjs';
|
|
21
|
+
import { c as createSessionForStartup, H as HibernationProbe } from './startupSessionCreate-BtR4iYEC.mjs';
|
|
22
|
+
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation, k as reportSessionEditToDaemon } from './controlClient-ClI7A0qE.mjs';
|
|
23
23
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
24
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-
|
|
25
|
-
import { r as readAcpReconnectEnv, n as normalizeAcpPermissionMode, p as piRestartNotice, w as writeSessionModeFile, a as removeSessionModeFile } from './acpSessionResume-
|
|
26
|
-
import { S as StreamRelay } from './streamRelay-
|
|
24
|
+
import { A as AUTO_RESTART_CAPABILITY, c as claimSessionOrExit, a as applyServerSnapshot, w as withoutServerSnapshot, m as mergeReconnectMetadata, t as takeAutoRestartedEvent } from './sessionLock-G2PMqvsh.mjs';
|
|
25
|
+
import { r as readAcpReconnectEnv, n as normalizeAcpPermissionMode, p as piRestartNotice, w as writeSessionModeFile, a as removeSessionModeFile } from './acpSessionResume-Bi7pA1n_.mjs';
|
|
26
|
+
import { S as StreamRelay } from './streamRelay-DMwOMTKf.mjs';
|
|
27
27
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
28
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
29
|
-
import { T as TitleGenerator } from './titleGenerator-
|
|
28
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-DYLN6Ec9.mjs';
|
|
29
|
+
import { T as TitleGenerator } from './titleGenerator-AGQsXskb.mjs';
|
|
30
30
|
import { E as EditReportThrottle, e as extractAcpEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
31
31
|
import { readFileSync } from 'node:fs';
|
|
32
32
|
import { homedir } from 'node:os';
|
|
33
33
|
import 'node:child_process';
|
|
34
34
|
import '@agentclientprotocol/sdk';
|
|
35
|
-
import './time-
|
|
35
|
+
import './time-D0jvDRhn.mjs';
|
|
36
36
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
37
37
|
import './processTree-CP5IvQ2Z.mjs';
|
|
38
|
-
import './package-
|
|
38
|
+
import './package-BsUHyqWe.mjs';
|
|
39
39
|
import 'chalk';
|
|
40
40
|
import 'node:util';
|
|
41
41
|
import '@paralleldrive/cuid2';
|
|
42
42
|
import 'zod';
|
|
43
43
|
import './prompt-QHuFx9j6.mjs';
|
|
44
|
-
import './reportProgressTool-
|
|
45
|
-
import './client-
|
|
44
|
+
import './reportProgressTool-XgQBzxoD.mjs';
|
|
45
|
+
import './client-BXD66ZF5.mjs';
|
|
46
46
|
import './precheckCompat-DeEbilbr.mjs';
|
|
47
47
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
48
48
|
import './trimIdent-BAjmv_TG.mjs';
|
|
49
49
|
import './pi-CqyoZMjI.mjs';
|
|
50
50
|
import './fileStore-5qpetZS0.mjs';
|
|
51
51
|
import 'node:fs/promises';
|
|
52
|
-
import './client-
|
|
53
|
-
import './context-
|
|
54
|
-
import './sessionOps-
|
|
52
|
+
import './client-Bh1aUPh-.mjs';
|
|
53
|
+
import './context-CfgTFpCB.mjs';
|
|
54
|
+
import './sessionOps-DPw5k8vV.mjs';
|
|
55
55
|
import 'axios';
|
|
56
56
|
import 'socket.io-client';
|
|
57
57
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
58
58
|
import './resources-CLP_MpK4.mjs';
|
|
59
|
-
import './tools-
|
|
60
|
-
import './peerTools-
|
|
59
|
+
import './tools-Bei5i03L.mjs';
|
|
60
|
+
import './peerTools-CwCe6tmJ.mjs';
|
|
61
61
|
import './ids-DU6sLx4C.mjs';
|
|
62
|
-
import './remoteSessionClient-
|
|
62
|
+
import './remoteSessionClient-BdnJ_n8C.mjs';
|
|
63
63
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
64
64
|
import 'node:http';
|
|
65
65
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
66
66
|
import './limits-DIo7rEBR.mjs';
|
|
67
|
-
import './downloadTarget-
|
|
67
|
+
import './downloadTarget-BXqXhNF7.mjs';
|
|
68
68
|
import './terminals-Dlg0x3nY.mjs';
|
|
69
69
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
70
70
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
71
|
-
import './bootstrap-
|
|
71
|
+
import './bootstrap-rLaL3kTa.mjs';
|
|
72
72
|
import './webPanels-B2_C2-3g.mjs';
|
|
73
|
-
import './pushNotifications-
|
|
73
|
+
import './pushNotifications-XAM8__Pg.mjs';
|
|
74
74
|
import './previewPath-CXN4Vag0.mjs';
|
|
75
75
|
import 'crypto';
|
|
76
|
-
import './lidState-
|
|
76
|
+
import './lidState-CD81ryTy.mjs';
|
|
77
77
|
import 'os';
|
|
78
78
|
import 'child_process';
|
|
79
79
|
import 'node:events';
|
|
80
|
-
import './registerCommonHandlers-
|
|
80
|
+
import './registerCommonHandlers-DRRfinzK.mjs';
|
|
81
81
|
import 'util';
|
|
82
82
|
import 'fs/promises';
|
|
83
83
|
import 'path';
|
|
84
84
|
import 'cross-spawn';
|
|
85
|
-
import './sync-
|
|
85
|
+
import './sync-C0PRuTMj.mjs';
|
|
86
86
|
import 'tweetnacl';
|
|
87
87
|
import './types-CkqAACXx.mjs';
|
|
88
88
|
import './detectCLI-CSGMlV51.mjs';
|
|
89
89
|
import 'fs';
|
|
90
|
-
import './localHappyAgentAuth-
|
|
90
|
+
import './localHappyAgentAuth-Cg-m1lwm.mjs';
|
|
91
91
|
import './fsMkdir-DumgLTzR.mjs';
|
|
92
|
+
import './cliUpdate-Y34VGe9Y.mjs';
|
|
92
93
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
93
94
|
import 'url';
|
|
94
95
|
import 'node:module';
|
|
@@ -161,6 +162,10 @@ function describeAcpTurnFailure(agentName, error) {
|
|
|
161
162
|
return { message: `${agentName} error: ${detail}`, error: detail, exited: false };
|
|
162
163
|
}
|
|
163
164
|
|
|
165
|
+
function acpExitIntent(exit) {
|
|
166
|
+
return exit?.intent ?? "offline";
|
|
167
|
+
}
|
|
168
|
+
|
|
164
169
|
const OUT_OF_TURN_QUIET_MS = 6e4;
|
|
165
170
|
function isAcpTurnContent(msg) {
|
|
166
171
|
if (msg.type === "model-output") return typeof msg.textDelta === "string" && msg.textDelta.length > 0;
|
|
@@ -826,7 +831,9 @@ async function runAcp(opts) {
|
|
|
826
831
|
machineId: settings.machineId,
|
|
827
832
|
startedBy: opts.startedBy,
|
|
828
833
|
sandbox: settings.sandboxConfig,
|
|
829
|
-
|
|
834
|
+
// B-852: a daemon-spawned pi session reports when it is quiescent, so the
|
|
835
|
+
// daemon can restart it onto new code after an upgrade.
|
|
836
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY, PROJECT_SESSION_CAPABILITY, ...opts.agentName === "pi" && opts.startedBy === "daemon" ? [AUTO_RESTART_CAPABILITY] : []]
|
|
830
837
|
});
|
|
831
838
|
metadata.attachmentKinds = [];
|
|
832
839
|
if (opts.agentName === "gemini") metadata.configuredModel = readGeminiConfiguredModel();
|
|
@@ -919,6 +926,11 @@ async function runAcp(opts) {
|
|
|
919
926
|
messageQueue.setOnWait(() => drain.onIdle());
|
|
920
927
|
}
|
|
921
928
|
attachPromptQueueDrain(session);
|
|
929
|
+
messageQueue.setOnDiscard((entries) => {
|
|
930
|
+
const keys = entries.map((entry) => entry.sourceId).filter((key) => typeof key === "string");
|
|
931
|
+
if (keys.length > 0) session.sendQueueCancelReason(keys, entries[0].reason);
|
|
932
|
+
});
|
|
933
|
+
const heldInput = new HeldInput((keys, reason) => session.sendQueueCancelReason(keys, reason));
|
|
922
934
|
let currentPermissionMode;
|
|
923
935
|
let currentModel;
|
|
924
936
|
let modeSelector = null;
|
|
@@ -1013,7 +1025,16 @@ async function runAcp(opts) {
|
|
|
1013
1025
|
session.keepAlive(thinking, "remote");
|
|
1014
1026
|
};
|
|
1015
1027
|
let acpSessionId = null;
|
|
1028
|
+
let piProbe = null;
|
|
1016
1029
|
let shouldExit = false;
|
|
1030
|
+
let exit = null;
|
|
1031
|
+
const beginExit = (intent, reason) => {
|
|
1032
|
+
if (!exit) exit = { intent, reason };
|
|
1033
|
+
shouldExit = true;
|
|
1034
|
+
heldInput.drop(exit.reason);
|
|
1035
|
+
messageQueue.discardAll(exit.reason);
|
|
1036
|
+
messageQueue.close();
|
|
1037
|
+
};
|
|
1017
1038
|
let abortController = new AbortController();
|
|
1018
1039
|
let turnCancelled = false;
|
|
1019
1040
|
let backendStarted = false;
|
|
@@ -1023,8 +1044,8 @@ async function runAcp(opts) {
|
|
|
1023
1044
|
const stopRunnerFromBackendStatus = (status, detail) => {
|
|
1024
1045
|
const reason = detail ? `${opts.agentName} backend ${status}: ${detail}` : `${opts.agentName} backend ${status}`;
|
|
1025
1046
|
logger.debug(`[${opts.agentName}] ${reason}; stopping ACP runner`);
|
|
1026
|
-
|
|
1027
|
-
|
|
1047
|
+
session.sendSessionEvent({ type: "message", message: reason });
|
|
1048
|
+
beginExit("offline", "failed");
|
|
1028
1049
|
};
|
|
1029
1050
|
const sendEnvelopes = (envelopes) => {
|
|
1030
1051
|
for (const envelope of envelopes) {
|
|
@@ -1382,6 +1403,7 @@ async function runAcp(opts) {
|
|
|
1382
1403
|
}).catch(() => {
|
|
1383
1404
|
logger.warn("[ACP] Failed to prepare user attachments");
|
|
1384
1405
|
session.sendSessionEvent({ type: "message", message: "Could not prepare this message. Please send it again." });
|
|
1406
|
+
if (message.localKey) session.sendQueueCancelReason([message.localKey], exit?.reason ?? "failed");
|
|
1385
1407
|
});
|
|
1386
1408
|
});
|
|
1387
1409
|
session.keepAlive(thinking, "remote");
|
|
@@ -1421,10 +1443,15 @@ async function runAcp(opts) {
|
|
|
1421
1443
|
}
|
|
1422
1444
|
);
|
|
1423
1445
|
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, async () => {
|
|
1424
|
-
|
|
1425
|
-
messageQueue.close();
|
|
1446
|
+
beginExit("archive", "aborted");
|
|
1426
1447
|
await handleAbort();
|
|
1427
|
-
}, session, {
|
|
1448
|
+
}, session, {
|
|
1449
|
+
processSignals: true,
|
|
1450
|
+
onSignal: async () => {
|
|
1451
|
+
beginExit("offline", "restarted");
|
|
1452
|
+
await handleAbort();
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1428
1455
|
const afterSessionStarted = async (requestedModel) => {
|
|
1429
1456
|
if (requestedModel) {
|
|
1430
1457
|
await switchModelIfRequested(requestedModel);
|
|
@@ -1478,6 +1505,36 @@ async function runAcp(opts) {
|
|
|
1478
1505
|
logger.debug(`[${opts.agentName}] Resume of agent session ${resumeId}: ${started.resumed ?? "new"}${started.loadFailure ? ` (${started.loadFailure})` : ""}`);
|
|
1479
1506
|
if (started.resumed !== "loaded") session.sendSessionEvent({ type: "message", message: piRestartNotice(opts.agentName, "resume", started) });
|
|
1480
1507
|
}
|
|
1508
|
+
if (opts.agentName === "pi" && opts.startedBy === "daemon") {
|
|
1509
|
+
const piSnapshot = () => {
|
|
1510
|
+
const meta = session.getMetadata();
|
|
1511
|
+
return {
|
|
1512
|
+
flavor: "acp",
|
|
1513
|
+
resumable: typeof meta?.piSessionId === "string" && meta.piSessionId.length > 0,
|
|
1514
|
+
uiSession: true,
|
|
1515
|
+
...isAssistantVariant ? { variant: "assistant" } : {},
|
|
1516
|
+
...process.env.HAPPY_SPAWNED_BY ? { spawnedBy: process.env.HAPPY_SPAWNED_BY } : {},
|
|
1517
|
+
...meta?.tags ? { tags: meta.tags } : {},
|
|
1518
|
+
keepAwake: false,
|
|
1519
|
+
thinking,
|
|
1520
|
+
queuedInputs: messageQueue.size() + (session.promptQueueHasPending() ? 1 : 0),
|
|
1521
|
+
waitingForInput: messageQueue.isWaiting(),
|
|
1522
|
+
pendingRequests: Object.keys(session.getAgentState()?.requests ?? {}).length,
|
|
1523
|
+
backgroundTasks: 0,
|
|
1524
|
+
lastActivityAt: session.lastActivityAt,
|
|
1525
|
+
...shouldExit ? { exiting: true } : {}
|
|
1526
|
+
};
|
|
1527
|
+
};
|
|
1528
|
+
piProbe = new HibernationProbe({
|
|
1529
|
+
checkMs: resolveCheckMs(),
|
|
1530
|
+
snapshot: piSnapshot,
|
|
1531
|
+
ask: (report) => checkDaemonHibernation({ sessionId: session.sessionId, pid: process.pid, report }),
|
|
1532
|
+
commit: async () => false
|
|
1533
|
+
});
|
|
1534
|
+
piProbe.start();
|
|
1535
|
+
}
|
|
1536
|
+
const autoUpdated = takeAutoRestartedEvent(process.env);
|
|
1537
|
+
if (autoUpdated) session.sendSessionEvent(autoUpdated);
|
|
1481
1538
|
if (verbose) {
|
|
1482
1539
|
if (!sawSlashCommands) {
|
|
1483
1540
|
logAcp("muted", `Outgoing slash commands from ${opts.agentName}: not reported yet`);
|
|
@@ -1501,6 +1558,7 @@ async function runAcp(opts) {
|
|
|
1501
1558
|
}
|
|
1502
1559
|
break;
|
|
1503
1560
|
}
|
|
1561
|
+
heldInput.hold(batch.sourceIds);
|
|
1504
1562
|
logAcp("incoming", `Incoming prompt: ${formatUnknownForConsole(batch.message, ACP_EVENT_PREVIEW_CHARS)}`);
|
|
1505
1563
|
endOutOfTurn("prompt");
|
|
1506
1564
|
sendEnvelopes(sessionManager.startTurn());
|
|
@@ -1530,6 +1588,13 @@ async function runAcp(opts) {
|
|
|
1530
1588
|
happyHomeDir: configuration.happyHomeDir,
|
|
1531
1589
|
sessionId: session.sessionId
|
|
1532
1590
|
}) : [];
|
|
1591
|
+
if (shouldExit) {
|
|
1592
|
+
sendEnvelopes(sessionManager.endTurn("cancelled"));
|
|
1593
|
+
streamRelay.endTurn();
|
|
1594
|
+
setThinking(false);
|
|
1595
|
+
break;
|
|
1596
|
+
}
|
|
1597
|
+
heldInput.delivered();
|
|
1533
1598
|
promptInFlight = true;
|
|
1534
1599
|
let outcome;
|
|
1535
1600
|
try {
|
|
@@ -1556,6 +1621,7 @@ async function runAcp(opts) {
|
|
|
1556
1621
|
} catch (error) {
|
|
1557
1622
|
const failure = describeAcpTurnFailure(opts.agentName, error);
|
|
1558
1623
|
session.sendSessionEvent({ type: "message", message: failure.message });
|
|
1624
|
+
heldInput.drop("failed");
|
|
1559
1625
|
sendEnvelopes(sessionManager.endTurn("failed", failure.error));
|
|
1560
1626
|
streamRelay.endTurn();
|
|
1561
1627
|
setThinking(false);
|
|
@@ -1568,6 +1634,7 @@ async function runAcp(opts) {
|
|
|
1568
1634
|
}
|
|
1569
1635
|
} finally {
|
|
1570
1636
|
disposeTermination?.();
|
|
1637
|
+
piProbe?.stop();
|
|
1571
1638
|
setThinking(false);
|
|
1572
1639
|
clearInterval(keepAliveInterval);
|
|
1573
1640
|
streamRelay.endTurn();
|
|
@@ -1594,15 +1661,27 @@ async function runAcp(opts) {
|
|
|
1594
1661
|
}
|
|
1595
1662
|
try {
|
|
1596
1663
|
session.closePromptQueueDrain();
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1664
|
+
heldInput.drop(exit?.reason ?? "failed");
|
|
1665
|
+
messageQueue.discardAll(exit?.reason ?? "failed");
|
|
1666
|
+
const intent = acpExitIntent(exit);
|
|
1667
|
+
if (intent === "archive") {
|
|
1668
|
+
session.updateMetadata((currentMetadata) => ({
|
|
1669
|
+
...currentMetadata,
|
|
1670
|
+
lifecycleState: "archived",
|
|
1671
|
+
lifecycleStateSince: Date.now(),
|
|
1672
|
+
archivedBy: "cli",
|
|
1673
|
+
archiveReason: "Session ended"
|
|
1674
|
+
}));
|
|
1675
|
+
}
|
|
1604
1676
|
session.sendSessionDeath();
|
|
1605
1677
|
await session.flush();
|
|
1678
|
+
if (intent === "offline") {
|
|
1679
|
+
try {
|
|
1680
|
+
await api.deactivateSession(session.sessionId);
|
|
1681
|
+
} catch (error) {
|
|
1682
|
+
logger.debug(`[${opts.agentName}] deactivate on exit failed:`, error);
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1606
1685
|
await session.close();
|
|
1607
1686
|
} catch (error) {
|
|
1608
1687
|
logger.debug(`[${opts.agentName}] Session close failed:`, error);
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var node_fs = require('node:fs');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var logger = require('./logger-
|
|
6
|
-
var persistence = require('./persistence-
|
|
5
|
+
var logger = require('./logger-Ct2zvaq0.cjs');
|
|
6
|
+
var persistence = require('./persistence-A2NeERZJ.cjs');
|
|
7
7
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
8
8
|
require('chalk');
|
|
9
9
|
require('node:util');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-DfPBa-9d.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-9n7wd2dT.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
14
14
|
require('zod');
|
|
15
15
|
require('./authRelay-Dy1qU9td.cjs');
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var query = require('./query-
|
|
3
|
+
var query = require('./query-u2GX-I0C.cjs');
|
|
4
4
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
5
5
|
require('./promptCacheTtl-B8PCzE6k.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
7
|
require('node:os');
|
|
8
8
|
require('node:path');
|
|
9
|
-
require('./logger-
|
|
9
|
+
require('./logger-Ct2zvaq0.cjs');
|
|
10
10
|
require('chalk');
|
|
11
11
|
require('node:util');
|
|
12
|
-
require('./configuration-
|
|
13
|
-
require('./package-
|
|
12
|
+
require('./configuration-DfPBa-9d.cjs');
|
|
13
|
+
require('./package-9n7wd2dT.cjs');
|
|
14
14
|
require('node:fs/promises');
|
|
15
15
|
require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
16
16
|
require('node:child_process');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { statSync, readdirSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { l as logger } from './logger-
|
|
4
|
-
import { r as readSettings } from './persistence-
|
|
3
|
+
import { l as logger } from './logger-GcbI0eg2.mjs';
|
|
4
|
+
import { r as readSettings } from './persistence-Cpw4yJs8.mjs';
|
|
5
5
|
import { d as describeAgentHome, C as CLAUDE_CONFIG_DIR_ENV, a as CODEX_HOME_ENV, f as findClaudeConversation, b as agentHomeCandidates, c as findCodexThread, r as resolveAgentHomes, A as AGENT_HOME_ENV_NAMES, g as agentHomeEnv, p as probeLoginShellEnv } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
6
6
|
export { h as claudeConversationPath, i as claudeProjectDirName, j as codexRolloutFileMatches, e as expandHomePath } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
7
7
|
import 'chalk';
|
|
8
8
|
import 'node:util';
|
|
9
|
-
import './configuration-
|
|
9
|
+
import './configuration-ECqXu34R.mjs';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './package-
|
|
11
|
+
import './package-BsUHyqWe.mjs';
|
|
12
12
|
import 'node:fs/promises';
|
|
13
13
|
import 'zod';
|
|
14
14
|
import './authRelay-DhQhkBvX.mjs';
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-GcbI0eg2.mjs';
|
|
2
2
|
import { existsSync, writeFileSync, chmodSync } from 'fs';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import 'chalk';
|
|
7
7
|
import 'node:util';
|
|
8
|
-
import './configuration-
|
|
8
|
+
import './configuration-ECqXu34R.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'node:path';
|
|
12
|
-
import './package-
|
|
12
|
+
import './package-BsUHyqWe.mjs';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
|
|
15
15
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-Ct2zvaq0.cjs');
|
|
4
4
|
var require$$0 = require('fs');
|
|
5
5
|
var child_process = require('child_process');
|
|
6
6
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
7
7
|
var os = require('os');
|
|
8
8
|
require('chalk');
|
|
9
9
|
require('node:util');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-DfPBa-9d.cjs');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('node:path');
|
|
14
|
-
require('./package-
|
|
14
|
+
require('./package-9n7wd2dT.cjs');
|
|
15
15
|
require('node:fs/promises');
|
|
16
16
|
|
|
17
17
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
package/dist/lib.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var api = require('./api-
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var configuration = require('./configuration-
|
|
3
|
+
var api = require('./api-BBxZ7y2z.cjs');
|
|
4
|
+
var logger = require('./logger-Ct2zvaq0.cjs');
|
|
5
|
+
var configuration = require('./configuration-DfPBa-9d.cjs');
|
|
6
6
|
var types = require('./types-CRS-srZK.cjs');
|
|
7
7
|
require('axios');
|
|
8
|
-
require('./lidState-
|
|
8
|
+
require('./lidState-C9_DoF9i.cjs');
|
|
9
9
|
require('./authRelay-Dy1qU9td.cjs');
|
|
10
10
|
require('node:crypto');
|
|
11
11
|
require('tweetnacl');
|
|
@@ -13,14 +13,14 @@ require('os');
|
|
|
13
13
|
require('child_process');
|
|
14
14
|
require('node:events');
|
|
15
15
|
require('socket.io-client');
|
|
16
|
-
require('./pushNotifications-
|
|
16
|
+
require('./pushNotifications-23YSd-0l.cjs');
|
|
17
17
|
require('zod');
|
|
18
|
-
require('./index-
|
|
18
|
+
require('./index-CLUHaPU8.cjs');
|
|
19
19
|
require('@paralleldrive/cuid2');
|
|
20
20
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
21
21
|
require('./limits-C-a7gr04.cjs');
|
|
22
|
-
require('./time-
|
|
23
|
-
require('./registerCommonHandlers-
|
|
22
|
+
require('./time-Cy0a-7YX.cjs');
|
|
23
|
+
require('./registerCommonHandlers-D1MiSfcB.cjs');
|
|
24
24
|
require('util');
|
|
25
25
|
require('fs/promises');
|
|
26
26
|
require('crypto');
|
|
@@ -28,17 +28,17 @@ require('path');
|
|
|
28
28
|
require('cross-spawn');
|
|
29
29
|
require('./projectPath-C3ioB4Bu.cjs');
|
|
30
30
|
require('url');
|
|
31
|
-
require('./sync-
|
|
31
|
+
require('./sync-Ba8N6xba.cjs');
|
|
32
32
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
33
|
-
require('./controlClient-
|
|
34
|
-
require('./persistence-
|
|
33
|
+
require('./controlClient-C13_pSKG.cjs');
|
|
34
|
+
require('./persistence-A2NeERZJ.cjs');
|
|
35
35
|
require('node:fs/promises');
|
|
36
36
|
require('node:fs');
|
|
37
37
|
require('chalk');
|
|
38
38
|
require('node:util');
|
|
39
39
|
require('node:path');
|
|
40
40
|
require('node:os');
|
|
41
|
-
require('./package-
|
|
41
|
+
require('./package-9n7wd2dT.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
package/dist/lib.d.cts
CHANGED
|
@@ -616,6 +616,19 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
616
616
|
rpcAvailable: z$1.ZodBoolean;
|
|
617
617
|
detectedAt: z$1.ZodNumber;
|
|
618
618
|
}, z$1.core.$loose>>;
|
|
619
|
+
autoRestart: z$1.ZodOptional<z$1.ZodObject<{
|
|
620
|
+
enabled: z$1.ZodBoolean;
|
|
621
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
622
|
+
detectedAt: z$1.ZodNumber;
|
|
623
|
+
sessions: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
624
|
+
state: z$1.ZodString;
|
|
625
|
+
reason: z$1.ZodOptional<z$1.ZodString>;
|
|
626
|
+
since: z$1.ZodNumber;
|
|
627
|
+
target: z$1.ZodString;
|
|
628
|
+
offline: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
629
|
+
retryAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
630
|
+
}, z$1.core.$strip>>;
|
|
631
|
+
}, z$1.core.$loose>>;
|
|
619
632
|
webPanels: z$1.ZodOptional<z$1.ZodObject<{
|
|
620
633
|
panels: z$1.ZodArray<z$1.ZodObject<{
|
|
621
634
|
id: z$1.ZodString;
|
|
@@ -662,6 +675,8 @@ declare const UserMessageSchema: z$1.ZodObject<{
|
|
|
662
675
|
allowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
663
676
|
disallowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
664
677
|
effort: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
678
|
+
modelIntent: z$1.ZodOptional<z$1.ZodString>;
|
|
679
|
+
effortIntent: z$1.ZodOptional<z$1.ZodString>;
|
|
665
680
|
delivery: z$1.ZodOptional<z$1.ZodEnum<{
|
|
666
681
|
queue: "queue";
|
|
667
682
|
steer: "steer";
|
|
@@ -728,6 +743,14 @@ type Metadata = {
|
|
|
728
743
|
* machine config.
|
|
729
744
|
*/
|
|
730
745
|
stickyModel?: string | null;
|
|
746
|
+
/**
|
|
747
|
+
* B-849b: this session's model / thinking choice, recorded by the wrapper
|
|
748
|
+
* (sole writer) from message meta and the `session-run-intent` RPC; every
|
|
749
|
+
* device reads it. 'latest' | 'default' | model id; 'default' | level.
|
|
750
|
+
* null = nothing chosen yet; absent = older wrapper. See happy-wire runIntent.ts.
|
|
751
|
+
*/
|
|
752
|
+
modelIntent?: string | null;
|
|
753
|
+
effortIntent?: string | null;
|
|
731
754
|
operatingModes?: Array<{
|
|
732
755
|
code: string;
|
|
733
756
|
value: string;
|
|
@@ -1032,6 +1055,13 @@ declare class RpcHandlerManager {
|
|
|
1032
1055
|
private getPrefixedMethod;
|
|
1033
1056
|
}
|
|
1034
1057
|
|
|
1058
|
+
/**
|
|
1059
|
+
* Why the CLI dropped a user message it never ran — the `queue-cancel` reason
|
|
1060
|
+
* (B-332). `failed` (B-854): taken off the queue, but the runner could not hand
|
|
1061
|
+
* it to the agent (a pre-flight check or the agent's start failed).
|
|
1062
|
+
*/
|
|
1063
|
+
type QueueDiscardReason = 'cleared' | 'aborted' | 'restarted' | 'failed';
|
|
1064
|
+
|
|
1035
1065
|
/**
|
|
1036
1066
|
* B-509 —— server-side prompt queue drain (pure state machine, no I/O).
|
|
1037
1067
|
*
|
|
@@ -1334,7 +1364,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1334
1364
|
private pushCommittedMessagesToRelay;
|
|
1335
1365
|
private enqueueMessage;
|
|
1336
1366
|
/** B-332: emit a queue-cancel tombstone, mirroring the web's own signal. */
|
|
1337
|
-
sendQueueCancelReason(localKeys: string[], reason:
|
|
1367
|
+
sendQueueCancelReason(localKeys: string[], reason: QueueDiscardReason): void;
|
|
1338
1368
|
/**
|
|
1339
1369
|
* B-332 site ③: find queued user input this wrapper destroyed (it was still
|
|
1340
1370
|
* in the previous wrapper's in-memory queue when it died) and tell the web.
|
|
@@ -1532,9 +1562,29 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1532
1562
|
*/
|
|
1533
1563
|
flush(): Promise<void>;
|
|
1534
1564
|
close(): Promise<void>;
|
|
1565
|
+
/**
|
|
1566
|
+
* B-854: set by close(). The socket's own `disconnect` ("io client
|
|
1567
|
+
* disconnect") must not reconnect a client its owner closed: a runner that
|
|
1568
|
+
* ends without `process.exit` (ACP) stayed alive on that socket — still
|
|
1569
|
+
* "active" for the daemon and the web, with no loop to run anything.
|
|
1570
|
+
*/
|
|
1571
|
+
private closedByClient;
|
|
1535
1572
|
private startSmartReconnect;
|
|
1536
1573
|
}
|
|
1537
1574
|
|
|
1575
|
+
/** What the daemon publishes per behind session (spec §4). */
|
|
1576
|
+
type AutoRestartSessionState = 'waiting' | 'restarting' | 'failed' | 'manual';
|
|
1577
|
+
interface AutoRestartSessionStatus {
|
|
1578
|
+
state: AutoRestartSessionState;
|
|
1579
|
+
reason?: string;
|
|
1580
|
+
since: number;
|
|
1581
|
+
target: string;
|
|
1582
|
+
/** `failed` only: the old wrapper is stopped and no new one came up, so the session is offline (spec §3). */
|
|
1583
|
+
offline?: boolean;
|
|
1584
|
+
/** `failed` + `offline` only: the daemon retries once by itself at this time; absent = left to Restore. */
|
|
1585
|
+
retryAt?: number;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1538
1588
|
/**
|
|
1539
1589
|
* B-510: machine web panels — local web pages a person may need to look at
|
|
1540
1590
|
* (noVNC, an agent-browser dashboard, Grafana, a dev server), declared ONLY in
|
|
@@ -1953,6 +2003,8 @@ declare class ApiMachineClient {
|
|
|
1953
2003
|
private claudeAuthState;
|
|
1954
2004
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1955
2005
|
private agentHibernationIdleMs;
|
|
2006
|
+
/** B-852: auto-restart setting + per-session status (null until the daemon installs it). */
|
|
2007
|
+
private autoRestart;
|
|
1956
2008
|
/** B-510: last normalized `webPanels` (null = never set → field not written). */
|
|
1957
2009
|
private webPanels;
|
|
1958
2010
|
private webPanelsSignatureSent;
|
|
@@ -2044,6 +2096,16 @@ declare class ApiMachineClient {
|
|
|
2044
2096
|
*/
|
|
2045
2097
|
setWebPanels(panels: WebPanel[]): Promise<void>;
|
|
2046
2098
|
private publishAgentHibernation;
|
|
2099
|
+
/**
|
|
2100
|
+
* B-852: the machine page's「会话自动更新」switch (`auto-restart-set`) and
|
|
2101
|
+
* the `daemonState.autoRestart` capability + per-session status. Call
|
|
2102
|
+
* before connect().
|
|
2103
|
+
*/
|
|
2104
|
+
setAutoRestartHandlers(initialEnabled: boolean, set: (enabled: boolean) => Promise<boolean>): void;
|
|
2105
|
+
/** B-852: the scheduler's per-session status changed (already signature-deduped). */
|
|
2106
|
+
setAutoRestartSessions(sessions: Record<string, AutoRestartSessionStatus>): Promise<void>;
|
|
2107
|
+
private autoRestartState;
|
|
2108
|
+
private publishAutoRestart;
|
|
2047
2109
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
2048
2110
|
setClaudeAuthHandlers(handlers: {
|
|
2049
2111
|
probe: () => Promise<ClaudeAuthState>;
|