very-happy-cli 0.2.178 → 0.2.180
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-DCQXHRzT.mjs → AcpBackend-B8Zi30Zh.mjs} +135 -16
- package/dist/{AcpBackend-CDkAQXYf.cjs → AcpBackend-DfRDtMcG.cjs} +135 -16
- package/dist/{AcpSessionManager-DckmUZza.cjs → AcpSessionManager-CASKOnOj.cjs} +38 -4
- package/dist/{AcpSessionManager-BXrQcqwC.mjs → AcpSessionManager-i8Rab0xT.mjs} +38 -4
- package/dist/{BasePermissionHandler-BVlrEhIi.mjs → BasePermissionHandler-26fKbRCm.mjs} +5 -2
- package/dist/{BasePermissionHandler-DyLmKKtO.cjs → BasePermissionHandler-BlM_tfej.cjs} +5 -2
- package/dist/acpSessionResume-B9l54P-X.mjs +67 -0
- package/dist/acpSessionResume-CR5pmgVo.cjs +74 -0
- package/dist/{agentHome-CEp9RMyK.cjs → agentHome-C7Sb7-Tz.cjs} +4 -4
- package/dist/{agentHome-C1xi37as.mjs → agentHome-CmGy0NWv.mjs} +4 -4
- package/dist/{api-JANhFdZV.cjs → api-DM7b1OKj.cjs} +38 -262
- package/dist/{api-Dib0dmqC.mjs → api-Hov8p7CA.mjs} +32 -256
- package/dist/{apiMachine-DNTJidYH.mjs → apiMachine-CwGEhQDT.mjs} +62 -15
- package/dist/{apiMachine-QhK-sKcr.cjs → apiMachine-DkGRj-Ai.cjs} +64 -17
- package/dist/{attachmentContent-bpQTBJ0y.cjs → attachmentContent-CEm13_gF.cjs} +4 -4
- package/dist/{attachmentContent-DkkdpSSJ.mjs → attachmentContent-CIn4iPEk.mjs} +2 -2
- package/dist/{auth-BRjd2esb.mjs → auth-BG1DY0gj.mjs} +5 -5
- package/dist/{auth-DgIV0Cvt.cjs → auth-CBXnm-Mj.cjs} +5 -5
- package/dist/{auth-omWDtgR8.cjs → auth-Dawj7pP5.cjs} +8 -8
- package/dist/{auth-DNct7VUi.mjs → auth-rggxMpEE.mjs} +8 -8
- package/dist/{auto-DKGFOJBo.mjs → auto-CXXLXGeL.mjs} +19 -18
- package/dist/{auto-CI16FZmX.cjs → auto-CbYOfoPS.cjs} +19 -18
- package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
- package/dist/{bootstrap-DCQ87Aan.cjs → bootstrap-DoA7okld.cjs} +2 -2
- package/dist/{bootstrap-BUagGC_-.mjs → bootstrap-Dt5I1SOl.mjs} +2 -2
- package/dist/{browser-Dj_DYQEh.mjs → browser-DUNetFT4.mjs} +1 -1
- package/dist/{browser-CSKhc0Bl.cjs → browser-DZ6qRtfH.cjs} +1 -1
- package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
- package/dist/{claudeLocal-CdIVnOZp.cjs → claudeLocal--DNyMOSv.cjs} +8 -7
- package/dist/{claudeLocal-CCCvAeMd.mjs → claudeLocal-OHWQigCl.mjs} +6 -5
- package/dist/{claudeLocalLauncher-BmrpaRYJ.mjs → claudeLocalLauncher-BStvfa7M.mjs} +11 -10
- package/dist/{claudeLocalLauncher-21-xh5gc.cjs → claudeLocalLauncher-BhvPbcyH.cjs} +13 -12
- package/dist/{claudeSessionFork-kYCP1IJB.cjs → claudeSessionFork-Be16vzGc.cjs} +1 -1
- package/dist/{claudeSessionFork-DvxMKAmY.mjs → claudeSessionFork-GAVWhiKG.mjs} +1 -1
- package/dist/{client-C4zKGjiJ.cjs → client-BWjaHKtj.cjs} +2 -2
- package/dist/client-Ca5Pcgy_.mjs +71 -0
- package/dist/{client-CnlkkrZO.mjs → client-CnB7kRCT.mjs} +2 -2
- package/dist/{client-BTX9hsbr.mjs → client-D4uPb1uu.mjs} +3 -3
- package/dist/client-DJplzPjD.cjs +76 -0
- package/dist/{client-Dnza1hgN.cjs → client-D_loZ9IK.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +24 -15
- package/dist/codex/happyMcpStdioBridge.mjs +25 -16
- package/dist/{codexAppServerClient-DvkpQgyv.mjs → codexAppServerClient-CO4G6OS4.mjs} +3 -3
- package/dist/{codexAppServerClient-CRlBWGn3.cjs → codexAppServerClient-PE-12AsW.cjs} +3 -3
- package/dist/{codexCommand-DzxIWXIT.cjs → codexCommand-BNoD1t1C.cjs} +127 -116
- package/dist/{codexCommand-BxjogBzU.mjs → codexCommand-B_xUH79E.mjs} +77 -66
- package/dist/{codexTermination-C28FzlLb.cjs → codexTermination-BmBbizFK.cjs} +7 -2
- package/dist/{codexTermination-ySDNMEhd.mjs → codexTermination-Dx48ma6e.mjs} +7 -2
- package/dist/{config-BFB5uJ4t.cjs → config-CtwEUxUP.cjs} +26 -26
- package/dist/{config-DwfEpFr3.mjs → config-DSu0Blos.mjs} +3 -3
- package/dist/{configuration-4TGMrjul.cjs → configuration-CYO-kPOS.cjs} +1 -1
- package/dist/{configuration-DVrb61aY.mjs → configuration-PxzEJumr.mjs} +1 -1
- package/dist/{connect-C7FPY0PI.mjs → connect-BQrg3TB6.mjs} +15 -15
- package/dist/{connect-QH2VJGBG.cjs → connect-Dq7wndzR.cjs} +28 -28
- package/dist/{context-JoKu0V54.cjs → context-6TP-iz_c.cjs} +1 -1
- package/dist/{context-B3XPVJlj.mjs → context-CJGRRGWW.mjs} +1 -1
- package/dist/{controlClient-BTaZlbC6.cjs → controlClient-Bqv5v5OM.cjs} +3 -3
- package/dist/{controlClient-BYKyGyxj.mjs → controlClient-DoeYovwP.mjs} +4 -4
- package/dist/{createSessionMetadata-8Fuj2-IV.mjs → createSessionMetadata-DDIChCx8.mjs} +2 -2
- package/dist/{createSessionMetadata-B2NynaWZ.cjs → createSessionMetadata-xz767pcG.cjs} +3 -3
- package/dist/{defaultPermissionMode-BEWCqJU-.cjs → defaultPermissionMode-PkZGsQDk.cjs} +2 -2
- package/dist/{defaultPermissionMode-B8kJG9uI.mjs → defaultPermissionMode-i5KzdK09.mjs} +2 -2
- package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
- package/dist/{deterministicJson-C5ZwZ7hu.mjs → deterministicJson-CTEJDqtS.mjs} +217 -12
- package/dist/{deterministicJson-BjNQsAjO.cjs → deterministicJson-xqA6DaOm.cjs} +222 -16
- package/dist/{doctor-BshRnjLi.cjs → doctor-BrgSlfXn.cjs} +9 -9
- package/dist/{doctor-0BiGwJXk.mjs → doctor-IctjVh9T.mjs} +8 -8
- package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
- package/dist/{downloadTarget-BN5vZt3K.cjs → downloadTarget-CEb9che-.cjs} +6 -6
- package/dist/{downloadTarget-DJPwAZlu.mjs → downloadTarget-jbOz1egC.mjs} +6 -6
- package/dist/{ensureDaemonRunning-C5QfToCe.cjs → ensureDaemonRunning-D-HyjGIX.cjs} +6 -6
- package/dist/{ensureDaemonRunning-CSmb_mqt.mjs → ensureDaemonRunning-b1e8LCSM.mjs} +5 -5
- package/dist/{handleResumeCommand-BwnUZmbo.cjs → handleResumeCommand-BvWVuRwH.cjs} +23 -7
- package/dist/{handleResumeCommand-CgjpsdDe.mjs → handleResumeCommand-DpaZvm2c.mjs} +22 -6
- package/dist/{index-piJPsTsm.cjs → index-B2p2Mut7.cjs} +259 -53
- package/dist/{index-BehVbAsA.mjs → index-BUNnpGFF.mjs} +256 -50
- package/dist/{index-Bvldtdny.mjs → index-Bsvbgh9e.mjs} +4 -4
- package/dist/{index-BYOZ_8WZ.cjs → index-C64Ufj4D.cjs} +4 -4
- package/dist/{index-Clqlu17M.mjs → index-C6Vn5Eac.mjs} +155 -34
- package/dist/index-CMf5VbzG.mjs +18 -0
- package/dist/index-DmTlDRSL.cjs +24 -0
- package/dist/{index-_l1Sdmbi.cjs → index-Dv0Q48P3.cjs} +156 -33
- package/dist/{index-BRClDe07.cjs → index-F2UejqYs.cjs} +3 -3
- package/dist/{index-BYgfern_.mjs → index-wCbtF4BK.mjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BdvKiOQw.mjs → install-BX3lv3NO.mjs} +1 -1
- package/dist/{install-Cf6AFSWC.cjs → install-BXvf2E3o.cjs} +1 -1
- package/dist/{install-TO4taKW7.cjs → install-C0ANcEAW.cjs} +7 -7
- package/dist/{install-fYWHrPcC.mjs → install-CdzSV7qO.mjs} +3 -3
- package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
- package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
- package/dist/lib.cjs +14 -14
- package/dist/lib.d.cts +239 -2
- package/dist/lib.d.mts +239 -2
- package/dist/lib.mjs +14 -14
- package/dist/{lidState-BeOwj6eW.cjs → lidState-DWGnm2H4.cjs} +1 -1
- package/dist/{lidState-DNMlIhX0.mjs → lidState-bBrmaQd2.mjs} +1 -1
- package/dist/{localHappyAgentAuth-Br-mgogg.cjs → localHappyAgentAuth-DZHQnIW9.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BezKSFDi.mjs → localHappyAgentAuth-Dn1jYDpt.mjs} +1 -1
- package/dist/{logger--vAVtXB_.mjs → logger-BUngm5Xg.mjs} +2 -2
- package/dist/{logger-DXTWlPzP.cjs → logger-CphW5nUE.cjs} +2 -2
- package/dist/machineMetadata-BQm9YTcI.cjs +79 -0
- package/dist/machineMetadata-BXN_bKU3.mjs +68 -0
- package/dist/{main-DoMFJ2Cl.cjs → main-B2UV51nK.cjs} +112 -132
- package/dist/{main-CshDb5-1.mjs → main-DGkdYfEq.mjs} +106 -126
- package/dist/{mcp-pNc1EbQf.cjs → mcp-BFvAEIRz.cjs} +15 -15
- package/dist/{mcp-DKT_lrvQ.mjs → mcp-CbTtbs0f.mjs} +15 -15
- package/dist/{mirrorProtocol-6IFGPpjJ.mjs → mirrorProtocol-BR4luBC0.mjs} +148 -7
- package/dist/{mirrorProtocol-qKflWTX_.cjs → mirrorProtocol-HKPivs5o.cjs} +150 -4
- package/dist/{package-B7B03ejW.mjs → package-7Ld1YMhh.mjs} +8 -7
- package/dist/{package-DY4zTbKS.cjs → package-KhLqBDX9.cjs} +8 -7
- package/dist/panels-C7IVqpJk.mjs +137 -0
- package/dist/panels-Njf6GelF.cjs +142 -0
- package/dist/{peerTools-3R9RUARX.mjs → peerTools-BOlDRyhi.mjs} +60 -10
- package/dist/{peerTools-iy3_6Yc5.cjs → peerTools-DQNlrcqM.cjs} +60 -9
- package/dist/{persistence-BfX72dne.cjs → persistence-9BMYspxG.cjs} +2 -2
- package/dist/{persistence-DTk4sNpd.mjs → persistence-BFUOHW5h.mjs} +3 -3
- package/dist/{piRunnerArgs-CRQVR9o-.cjs → piRunnerArgs-DGaq6VYM.cjs} +8 -2
- package/dist/{piRunnerArgs-AT8QJY7x.mjs → piRunnerArgs-H2pgpA5z.mjs} +7 -1
- package/dist/{piRuntime-BHRT5MKO.cjs → piRuntime-CT5xv_3h.cjs} +2 -2
- package/dist/{piRuntime-E44qTVQ4.mjs → piRuntime-CdN0JAsa.mjs} +2 -2
- package/dist/{piTerminal-hI4WFdWm.cjs → piTerminal-0FBtXTHK.cjs} +18 -18
- package/dist/{piTerminal-De8nbciM.mjs → piTerminal-C4m9YXAV.mjs} +18 -18
- package/dist/processTreeSnapshot-CuLJDNC-.mjs +101 -0
- package/dist/processTreeSnapshot-mDbnuojn.cjs +105 -0
- package/dist/projectPath-C3ioB4Bu.cjs +13 -0
- package/dist/prompt-BOouDaTM.mjs +99 -0
- package/dist/prompt-lgF9IE82.cjs +105 -0
- package/dist/{attachmentLimits-UyFn8fkQ.mjs → pushNotifications-DCiBEVeC.mjs} +307 -3
- package/dist/{attachmentLimits-SqeAHrVC.cjs → pushNotifications-DI92havG.cjs} +308 -2
- package/dist/{index-DFPT4HOO.cjs → query-BETKBrnz.cjs} +25 -5
- package/dist/{index-CEjJnq05.mjs → query-ywZbQUzR.mjs} +26 -3
- package/dist/{rateLimitWindows-XrJiiBpU.mjs → rateLimitWindows-BkfuUB1a.mjs} +1 -1
- package/dist/{rateLimitWindows-Czb7_7cK.cjs → rateLimitWindows-YRIYVdo4.cjs} +1 -1
- package/dist/{registerCommonHandlers-C0_fyBQ0.cjs → registerCommonHandlers-C7a_dUWs.cjs} +30 -30
- package/dist/{registerCommonHandlers-CvIedVRf.mjs → registerCommonHandlers-CTkCvjxt.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DYl7l4Ts.cjs → registerKillSessionHandler-CIsvBrVe.cjs} +6 -6
- package/dist/{registerKillSessionHandler-gwJ5lTf0.mjs → registerKillSessionHandler-CaqqRYq6.mjs} +6 -6
- package/dist/{remoteSessionClient-BRTIOX5b.cjs → remoteSessionClient-D843fkzL.cjs} +5 -5
- package/dist/{remoteSessionClient-DRb2Jr5s.mjs → remoteSessionClient-PP-mOKmw.mjs} +5 -5
- package/dist/{reportProgressTool-B9nCzbkL.cjs → reportProgressTool-14AXr959.cjs} +84 -2
- package/dist/{reportProgressTool-D5tEoXMW.mjs → reportProgressTool-ZOCNjWHr.mjs} +82 -3
- package/dist/{resources-JDPugcDq.cjs → resources-CvIlkzpP.cjs} +30 -0
- package/dist/{resources-BdFBQi8r.mjs → resources-y9jfyO-_.mjs} +30 -0
- package/dist/{run-CKe_WeLW.cjs → run-CAOCYYfT.cjs} +2806 -110
- package/dist/{run-BQ_FGaOL.mjs → run-Dajw2E5j.mjs} +2787 -91
- package/dist/{runClaude-zrrNcQC_.mjs → runClaude-C6oxWYbp.mjs} +49 -47
- package/dist/{runClaude-MHI5IKM-.cjs → runClaude-CRRKt-tm.cjs} +50 -48
- package/dist/{runClaudeDeps-RRw-Nusc.cjs → runClaudeDeps-B1ysqTvx.cjs} +310 -237
- package/dist/{runClaudeDeps-CVBCokOS.mjs → runClaudeDeps-BcZ68cX3.mjs} +297 -226
- package/dist/{runGemini-kipag2ag.mjs → runGemini-D7yKc4wD.mjs} +61 -55
- package/dist/{runGemini-D7Lg9yCr.cjs → runGemini-DtKFXqf-.cjs} +89 -83
- package/dist/{runOpenClaw-C_lRY3Do.mjs → runOpenClaw-C8ilyLP9.mjs} +19 -19
- package/dist/{runOpenClaw-DCcQ0L2N.cjs → runOpenClaw-Cq29mryb.cjs} +20 -20
- package/dist/{sandbox-BSyXFVFp.mjs → sandbox-CbCutma4.mjs} +4 -4
- package/dist/{sandbox-dMwPTmjm.cjs → sandbox-gIj-EuF4.cjs} +4 -4
- package/dist/{selfCheck-DkzDDUsE.cjs → selfCheck-BTGBVthv.cjs} +39 -38
- package/dist/selfCheck-Smt-5Xiq.mjs +85 -0
- package/dist/{send-dxC0miIA.cjs → send-CZf5lLw_.cjs} +8 -8
- package/dist/{send-C-k9nsd3.mjs → send-YZRMQvMJ.mjs} +9 -9
- package/dist/{server-DxoTYNlw.mjs → server-BqwXRzFZ.mjs} +4 -4
- package/dist/{server-B-W6P7Qr.cjs → server-CknFq6xG.cjs} +6 -6
- package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
- package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
- package/dist/{sessionLock-DWX6BbiU.cjs → sessionLock-DRZUcKHT.cjs} +38 -5
- package/dist/{sessionLock-DBdtZGOL.mjs → sessionLock-nBXdJxJm.mjs} +36 -5
- package/dist/{sessionOps-BAnr7n8t.cjs → sessionOps-BrGiU9-s.cjs} +10 -5
- package/dist/{sessionOps-BVoXe12O.mjs → sessionOps-C58iDeD5.mjs} +11 -6
- package/dist/{sessionScanner-BtxoeluY.mjs → sessionScanner-Bm57LEXe.mjs} +3 -3
- package/dist/{sessionScanner-CDOYsEUD.cjs → sessionScanner-CaO8bLaG.cjs} +3 -3
- package/dist/{sessions-C3sZJkzI.mjs → sessions-BXyBHo8n.mjs} +40 -18
- package/dist/{sessions-hAitoN-m.cjs → sessions-uzqPCc37.cjs} +39 -16
- package/dist/{setupOfflineReconnection-_eD4cuUT.mjs → setupOfflineReconnection-1Qlek3wl.mjs} +2 -2
- package/dist/{setupOfflineReconnection-C2EeYTFH.cjs → setupOfflineReconnection-DvvVX3TB.cjs} +2 -2
- package/dist/{spawn-Bc9v7pIf.cjs → spawn-DBkodJEO.cjs} +49 -18
- package/dist/{spawn-qNrB2CD_.mjs → spawn-vn93PhYL.mjs} +49 -18
- package/dist/spawnAgents-CgPMWexP.mjs +79 -0
- package/dist/{spawnAgents-BVEaz35W.cjs → spawnAgents-DLNMlhWJ.cjs} +37 -1
- package/dist/{spawnHappyCLI-C2stUioM.mjs → spawnHappyCLI-BjFZc_7V.mjs} +1 -1
- package/dist/{spawnHappyCLI-fzUagkKV.cjs → spawnHappyCLI-DnUZv0X2.cjs} +2 -2
- package/dist/{specialCommands-BJ-nqY4s.cjs → specialCommands-BRufxlqe.cjs} +3 -3
- package/dist/{specialCommands-C6W-rVyh.mjs → specialCommands-D3ND9bdg.mjs} +3 -3
- package/dist/{startFileWatcher-Bqlqjt93.cjs → startFileWatcher-D9cYzZOq.cjs} +1 -1
- package/dist/{startFileWatcher-CR09Snmz.mjs → startFileWatcher-DXJ7yB5v.mjs} +1 -1
- package/dist/startupSessionCreate-kdr3m1uX.cjs +26 -0
- package/dist/startupSessionCreate-uZ6BM0ty.mjs +24 -0
- package/dist/{streamRelay-CJoMk_d2.mjs → streamRelay-DnMCMMfV.mjs} +1 -1
- package/dist/{streamRelay-9kBPpbvU.cjs → streamRelay-Dy6amlzx.cjs} +1 -1
- package/dist/{sync-Dhmtk66S.cjs → sync-Bn-idAoy.cjs} +1 -1
- package/dist/{sync-DbW07iQS.mjs → sync-BvVhDO40.mjs} +1 -1
- package/dist/{systemPrompt-CQcuUmVp.mjs → systemPrompt-CIZcJuJF.mjs} +4 -3
- package/dist/{systemPrompt-3PYi3EUY.cjs → systemPrompt-DlyEk35T.cjs} +4 -3
- package/dist/{teams-DpxLcUU_.cjs → teams-BLeRpDxv.cjs} +8 -8
- package/dist/{teams-CwF4Z2fA.mjs → teams-DLY3B5yi.mjs} +8 -8
- package/dist/{time-A6zR3Iy6.cjs → time-Cjv0zxQO.cjs} +1 -1
- package/dist/{time-BuGWTVP6.mjs → time-D3ETL7Jb.mjs} +1 -1
- package/dist/{titleGenerator-D26gvNaS.cjs → titleGenerator-Cgp5ihFb.cjs} +10 -9
- package/dist/{titleGenerator-BGEzNWC9.mjs → titleGenerator-Uzbd4utr.mjs} +9 -8
- package/dist/{todo-DrZc76H5.mjs → todo-C9Ga-oEM.mjs} +6 -6
- package/dist/{todo-73g3NCIO.cjs → todo-pOMcEECE.cjs} +6 -6
- package/dist/{tools-CxJp4T1T.cjs → tools-BL7Byl_x.cjs} +1 -1
- package/dist/{tools-BtsrQnNS.mjs → tools-Cho7iIWf.mjs} +1 -1
- package/dist/{uninstall-DWNYvewQ.cjs → uninstall-CbayEVoV.cjs} +6 -6
- package/dist/{uninstall-DOb2mTwV.mjs → uninstall-CvZHVY9C.mjs} +3 -3
- package/dist/webPanels-B2_C2-3g.mjs +49 -0
- package/dist/webPanels-FCgFKvVe.cjs +53 -0
- package/package.json +8 -7
- package/dist/machineMetadata-B1H9gNbN.mjs +0 -39
- package/dist/machineMetadata-DcUupMje.cjs +0 -42
- package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
- package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
- package/dist/projectPath-ChLhdOyt.cjs +0 -13
- package/dist/selfCheck-CF7XGJPb.mjs +0 -84
- package/dist/sessionModeFile-ByLbXTbg.mjs +0 -32
- package/dist/sessionModeFile-CLLdidiJ.cjs +0 -36
- package/dist/spawnAgents-Bw6j4tqz.mjs +0 -45
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf,
|
|
2
|
+
import { s as streamKeyOf, d as createEnvelope } from './index-C6Vn5Eac.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -22,6 +22,26 @@ function toolCallEndResult(result) {
|
|
|
22
22
|
...record.truncated === true ? { truncated: true } : {}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
function piSubagentLabel(args) {
|
|
26
|
+
if (args.piTool !== "subagent") return null;
|
|
27
|
+
const raw = args.rawInput && typeof args.rawInput === "object" ? args.rawInput : {};
|
|
28
|
+
const clip = (text) => {
|
|
29
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
30
|
+
return flat.length > 120 ? `${flat.slice(0, 119)}\u2026` : flat;
|
|
31
|
+
};
|
|
32
|
+
const agent = typeof raw.agent === "string" ? raw.agent : void 0;
|
|
33
|
+
if (typeof raw.task === "string" && raw.task.trim()) return { description: clip(raw.task), ...agent ? { subagentType: agent } : {} };
|
|
34
|
+
if (Array.isArray(raw.tasks)) return { description: `${raw.tasks.length} parallel task${raw.tasks.length === 1 ? "" : "s"}`, ...agent ? { subagentType: agent } : {} };
|
|
35
|
+
if (Array.isArray(raw.chain)) return { description: `chain of ${raw.chain.length} step${raw.chain.length === 1 ? "" : "s"}` };
|
|
36
|
+
return { description: agent ? `${agent} sub-agent` : "sub-agent", ...agent ? { subagentType: agent } : {} };
|
|
37
|
+
}
|
|
38
|
+
function subagentStopStatus(result) {
|
|
39
|
+
if (!result || typeof result !== "object" || Array.isArray(result)) return "completed";
|
|
40
|
+
const record = result;
|
|
41
|
+
if (record.status === "cancelled" || record.status === "canceled") return "stopped";
|
|
42
|
+
if (record.error !== void 0 || record.status === "failed" || typeof record.exitCode === "number" && record.exitCode !== 0) return "failed";
|
|
43
|
+
return "completed";
|
|
44
|
+
}
|
|
25
45
|
function parseThinkingPayload(payload) {
|
|
26
46
|
if (typeof payload === "string") {
|
|
27
47
|
return { text: payload, streaming: false };
|
|
@@ -35,6 +55,8 @@ function parseThinkingPayload(payload) {
|
|
|
35
55
|
}
|
|
36
56
|
class AcpSessionManager {
|
|
37
57
|
currentTurnId = null;
|
|
58
|
+
/** B-632 ③: ACP call id → sub-agent id of a running pi `subagent` call. */
|
|
59
|
+
subagentByCall = /* @__PURE__ */ new Map();
|
|
38
60
|
acpCallToSessionCall = /* @__PURE__ */ new Map();
|
|
39
61
|
stream;
|
|
40
62
|
/** Monotonic clock: max(lastTime + 1, Date.now()) */
|
|
@@ -132,10 +154,13 @@ class AcpSessionManager {
|
|
|
132
154
|
return flushed;
|
|
133
155
|
}
|
|
134
156
|
const turnId = this.currentTurnId;
|
|
157
|
+
const stops = [...this.subagentByCall.values()].map((subagent) => createEnvelope("agent", { t: "stop", status: status === "completed" ? "completed" : "stopped" }, { turn: turnId, time: this.nextTime(), subagent }));
|
|
158
|
+
this.subagentByCall.clear();
|
|
135
159
|
this.currentTurnId = null;
|
|
136
160
|
this.acpCallToSessionCall.clear();
|
|
137
161
|
return [
|
|
138
162
|
...flushed,
|
|
163
|
+
...stops,
|
|
139
164
|
createEnvelope("agent", { t: "turn-end", status }, { turn: turnId, time: this.nextTime() })
|
|
140
165
|
];
|
|
141
166
|
}
|
|
@@ -170,6 +195,10 @@ class AcpSessionManager {
|
|
|
170
195
|
if (msg.type === "tool-call") {
|
|
171
196
|
const flushed = this.flush();
|
|
172
197
|
const call = this.ensureSessionCallId(msg.callId);
|
|
198
|
+
const label = piSubagentLabel(msg.args ?? {});
|
|
199
|
+
const subagent = label ? this.subagentByCall.get(msg.callId) ?? createId() : void 0;
|
|
200
|
+
const started = subagent !== void 0 && !this.subagentByCall.has(msg.callId);
|
|
201
|
+
if (subagent) this.subagentByCall.set(msg.callId, subagent);
|
|
173
202
|
return [
|
|
174
203
|
...flushed,
|
|
175
204
|
createEnvelope("agent", {
|
|
@@ -178,17 +207,22 @@ class AcpSessionManager {
|
|
|
178
207
|
name: msg.toolName,
|
|
179
208
|
title: buildToolTitle(msg.toolName),
|
|
180
209
|
description: buildToolDescription(msg.toolName),
|
|
181
|
-
|
|
182
|
-
|
|
210
|
+
// The web links the call row to the sub-agent card by this id (as for Claude's Agent).
|
|
211
|
+
args: subagent ? { ...msg.args, sessionSubagent: subagent } : msg.args
|
|
212
|
+
}, turnOptions(this.currentTurnId, this.nextTime())),
|
|
213
|
+
...started && label ? [createEnvelope("agent", { t: "start", ...label }, { ...turnOptions(this.currentTurnId, this.nextTime()), subagent })] : []
|
|
183
214
|
];
|
|
184
215
|
}
|
|
185
216
|
if (msg.type === "tool-result") {
|
|
186
217
|
const flushed = this.flush();
|
|
187
218
|
const call = this.ensureSessionCallId(msg.callId);
|
|
188
219
|
const result = toolCallEndResult(msg.result);
|
|
220
|
+
const subagent = this.subagentByCall.get(msg.callId);
|
|
221
|
+
if (subagent) this.subagentByCall.delete(msg.callId);
|
|
189
222
|
return [
|
|
190
223
|
...flushed,
|
|
191
|
-
createEnvelope("agent", { t: "tool-call-end", call, ...result ? { result } : {} }, turnOptions(this.currentTurnId, this.nextTime()))
|
|
224
|
+
createEnvelope("agent", { t: "tool-call-end", call, ...result ? { result } : {} }, turnOptions(this.currentTurnId, this.nextTime())),
|
|
225
|
+
...subagent ? [createEnvelope("agent", { t: "stop", status: subagentStopStatus(msg.result) }, { ...turnOptions(this.currentTurnId, this.nextTime()), subagent })] : []
|
|
192
226
|
];
|
|
193
227
|
}
|
|
194
228
|
return [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as logger } from './logger
|
|
1
|
+
import { l as logger } from './logger-BUngm5Xg.mjs';
|
|
2
2
|
|
|
3
3
|
class BasePermissionHandler {
|
|
4
4
|
pendingRequests = /* @__PURE__ */ new Map();
|
|
@@ -30,7 +30,10 @@ class BasePermissionHandler {
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
this.pendingRequests.delete(response.id);
|
|
33
|
-
const result = response.approved ? {
|
|
33
|
+
const result = response.approved ? {
|
|
34
|
+
decision: response.decision === "approved_for_session" ? "approved_for_session" : "approved",
|
|
35
|
+
...response.updatedInput && typeof response.updatedInput === "object" ? { updatedInput: response.updatedInput } : {}
|
|
36
|
+
} : { decision: response.decision === "denied" ? "denied" : "abort" };
|
|
34
37
|
pending.resolve(result);
|
|
35
38
|
this.session.updateAgentState((currentState) => {
|
|
36
39
|
const request = currentState.requests?.[response.id];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-CphW5nUE.cjs');
|
|
4
4
|
|
|
5
5
|
class BasePermissionHandler {
|
|
6
6
|
pendingRequests = /* @__PURE__ */ new Map();
|
|
@@ -32,7 +32,10 @@ class BasePermissionHandler {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
this.pendingRequests.delete(response.id);
|
|
35
|
-
const result = response.approved ? {
|
|
35
|
+
const result = response.approved ? {
|
|
36
|
+
decision: response.decision === "approved_for_session" ? "approved_for_session" : "approved",
|
|
37
|
+
...response.updatedInput && typeof response.updatedInput === "object" ? { updatedInput: response.updatedInput } : {}
|
|
38
|
+
} : { decision: response.decision === "denied" ? "denied" : "abort" };
|
|
36
39
|
pending.resolve(result);
|
|
37
40
|
this.session.updateAgentState((currentState) => {
|
|
38
41
|
const request = currentState.requests?.[response.id];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { mkdirSync, renameSync, existsSync, unlinkSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { w as writePrivateFileSync, c as configuration } from './configuration-PxzEJumr.mjs';
|
|
4
|
+
|
|
5
|
+
const SESSION_MODE_DIR = "session-modes";
|
|
6
|
+
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
7
|
+
function normalizeAcpPermissionMode(value) {
|
|
8
|
+
if (typeof value !== "string") return null;
|
|
9
|
+
if (value === "yolo") return "bypassPermissions";
|
|
10
|
+
return ACP_PERMISSION_MODES.includes(value) ? value : null;
|
|
11
|
+
}
|
|
12
|
+
function sessionModeFilePath(happySessionId, dir = join(configuration.happyHomeDir, SESSION_MODE_DIR)) {
|
|
13
|
+
return join(dir, `${happySessionId}.json`);
|
|
14
|
+
}
|
|
15
|
+
function sessionModeFilePayload(permissionMode, now = Date.now()) {
|
|
16
|
+
return { permissionMode, updatedAt: now };
|
|
17
|
+
}
|
|
18
|
+
function writeSessionModeFile(happySessionId, permissionMode, opts = {}) {
|
|
19
|
+
const path = sessionModeFilePath(happySessionId, opts.dir);
|
|
20
|
+
mkdirSync(join(path, ".."), { recursive: true, mode: 448 });
|
|
21
|
+
const payload = sessionModeFilePayload(permissionMode, opts.now);
|
|
22
|
+
const tmp = `${path}.${process.pid}.tmp`;
|
|
23
|
+
writePrivateFileSync(tmp, JSON.stringify(payload));
|
|
24
|
+
renameSync(tmp, path);
|
|
25
|
+
return payload;
|
|
26
|
+
}
|
|
27
|
+
function removeSessionModeFile(happySessionId, dir) {
|
|
28
|
+
const path = sessionModeFilePath(happySessionId, dir);
|
|
29
|
+
if (existsSync(path)) unlinkSync(path);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function readAcpReconnectEnv(env) {
|
|
33
|
+
const sessionId = env.HAPPY_RECONNECT_SESSION_ID;
|
|
34
|
+
const encryptionKey = env.HAPPY_RECONNECT_ENCRYPTION_KEY;
|
|
35
|
+
const variant = env.HAPPY_RECONNECT_ENCRYPTION_VARIANT;
|
|
36
|
+
if (!sessionId || !encryptionKey || variant !== "legacy" && variant !== "dataKey") return null;
|
|
37
|
+
const int = (value) => {
|
|
38
|
+
const n = parseInt(value || "0", 10);
|
|
39
|
+
return Number.isFinite(n) && n >= 0 ? n : 0;
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
sessionId,
|
|
43
|
+
encryptionKey,
|
|
44
|
+
encryptionVariant: variant,
|
|
45
|
+
seq: int(env.HAPPY_RECONNECT_SEQ),
|
|
46
|
+
metadataVersion: int(env.HAPPY_RECONNECT_METADATA_VERSION),
|
|
47
|
+
agentStateVersion: int(env.HAPPY_RECONNECT_AGENT_STATE_VERSION)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function piRestartNotice(agentName, cause, started) {
|
|
51
|
+
const head = cause === "agent-exit" ? `${agentName} was restarted after its process exited` : `${agentName} was started again`;
|
|
52
|
+
if (started.resumed === "loaded") return `${head} and reopened the earlier conversation.`;
|
|
53
|
+
if (started.resumed === "fresh") {
|
|
54
|
+
const why = started.loadFailure ? ` (${oneLine(started.loadFailure)})` : "";
|
|
55
|
+
return `${head} but could not reopen the earlier conversation${why}; it does not remember it (the transcript here is kept).`;
|
|
56
|
+
}
|
|
57
|
+
return `${head}; it does not remember the earlier conversation (the transcript here is kept).`;
|
|
58
|
+
}
|
|
59
|
+
function oneLine(text) {
|
|
60
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
61
|
+
return flat.length > 160 ? `${flat.slice(0, 157)}\u2026` : flat;
|
|
62
|
+
}
|
|
63
|
+
function sanitizeAgentSessionId(value) {
|
|
64
|
+
return typeof value === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(value) ? value : null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { removeSessionModeFile as a, normalizeAcpPermissionMode as n, piRestartNotice as p, readAcpReconnectEnv as r, sanitizeAgentSessionId as s, writeSessionModeFile as w };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_fs = require('node:fs');
|
|
4
|
+
var path = require('node:path');
|
|
5
|
+
var configuration = require('./configuration-CYO-kPOS.cjs');
|
|
6
|
+
|
|
7
|
+
const SESSION_MODE_DIR = "session-modes";
|
|
8
|
+
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
9
|
+
function normalizeAcpPermissionMode(value) {
|
|
10
|
+
if (typeof value !== "string") return null;
|
|
11
|
+
if (value === "yolo") return "bypassPermissions";
|
|
12
|
+
return ACP_PERMISSION_MODES.includes(value) ? value : null;
|
|
13
|
+
}
|
|
14
|
+
function sessionModeFilePath(happySessionId, dir = path.join(configuration.configuration.happyHomeDir, SESSION_MODE_DIR)) {
|
|
15
|
+
return path.join(dir, `${happySessionId}.json`);
|
|
16
|
+
}
|
|
17
|
+
function sessionModeFilePayload(permissionMode, now = Date.now()) {
|
|
18
|
+
return { permissionMode, updatedAt: now };
|
|
19
|
+
}
|
|
20
|
+
function writeSessionModeFile(happySessionId, permissionMode, opts = {}) {
|
|
21
|
+
const path$1 = sessionModeFilePath(happySessionId, opts.dir);
|
|
22
|
+
node_fs.mkdirSync(path.join(path$1, ".."), { recursive: true, mode: 448 });
|
|
23
|
+
const payload = sessionModeFilePayload(permissionMode, opts.now);
|
|
24
|
+
const tmp = `${path$1}.${process.pid}.tmp`;
|
|
25
|
+
configuration.writePrivateFileSync(tmp, JSON.stringify(payload));
|
|
26
|
+
node_fs.renameSync(tmp, path$1);
|
|
27
|
+
return payload;
|
|
28
|
+
}
|
|
29
|
+
function removeSessionModeFile(happySessionId, dir) {
|
|
30
|
+
const path = sessionModeFilePath(happySessionId, dir);
|
|
31
|
+
if (node_fs.existsSync(path)) node_fs.unlinkSync(path);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function readAcpReconnectEnv(env) {
|
|
35
|
+
const sessionId = env.HAPPY_RECONNECT_SESSION_ID;
|
|
36
|
+
const encryptionKey = env.HAPPY_RECONNECT_ENCRYPTION_KEY;
|
|
37
|
+
const variant = env.HAPPY_RECONNECT_ENCRYPTION_VARIANT;
|
|
38
|
+
if (!sessionId || !encryptionKey || variant !== "legacy" && variant !== "dataKey") return null;
|
|
39
|
+
const int = (value) => {
|
|
40
|
+
const n = parseInt(value || "0", 10);
|
|
41
|
+
return Number.isFinite(n) && n >= 0 ? n : 0;
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
sessionId,
|
|
45
|
+
encryptionKey,
|
|
46
|
+
encryptionVariant: variant,
|
|
47
|
+
seq: int(env.HAPPY_RECONNECT_SEQ),
|
|
48
|
+
metadataVersion: int(env.HAPPY_RECONNECT_METADATA_VERSION),
|
|
49
|
+
agentStateVersion: int(env.HAPPY_RECONNECT_AGENT_STATE_VERSION)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function piRestartNotice(agentName, cause, started) {
|
|
53
|
+
const head = cause === "agent-exit" ? `${agentName} was restarted after its process exited` : `${agentName} was started again`;
|
|
54
|
+
if (started.resumed === "loaded") return `${head} and reopened the earlier conversation.`;
|
|
55
|
+
if (started.resumed === "fresh") {
|
|
56
|
+
const why = started.loadFailure ? ` (${oneLine(started.loadFailure)})` : "";
|
|
57
|
+
return `${head} but could not reopen the earlier conversation${why}; it does not remember it (the transcript here is kept).`;
|
|
58
|
+
}
|
|
59
|
+
return `${head}; it does not remember the earlier conversation (the transcript here is kept).`;
|
|
60
|
+
}
|
|
61
|
+
function oneLine(text) {
|
|
62
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
63
|
+
return flat.length > 160 ? `${flat.slice(0, 157)}\u2026` : flat;
|
|
64
|
+
}
|
|
65
|
+
function sanitizeAgentSessionId(value) {
|
|
66
|
+
return typeof value === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(value) ? value : null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.normalizeAcpPermissionMode = normalizeAcpPermissionMode;
|
|
70
|
+
exports.piRestartNotice = piRestartNotice;
|
|
71
|
+
exports.readAcpReconnectEnv = readAcpReconnectEnv;
|
|
72
|
+
exports.removeSessionModeFile = removeSessionModeFile;
|
|
73
|
+
exports.sanitizeAgentSessionId = sanitizeAgentSessionId;
|
|
74
|
+
exports.writeSessionModeFile = writeSessionModeFile;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var persistence = require('./persistence-
|
|
5
|
+
var persistence = require('./persistence-9BMYspxG.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-CphW5nUE.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-CYO-kPOS.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-KhLqBDX9.cjs');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('node:crypto');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { r as readSettings, u as updateSettings } from './persistence-
|
|
3
|
+
import { r as readSettings, u as updateSettings } from './persistence-BFUOHW5h.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger
|
|
5
|
+
import './logger-BUngm5Xg.mjs';
|
|
6
6
|
import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, A as AGENT_HOME_ENV_NAMES } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
|
-
import './configuration-
|
|
8
|
+
import './configuration-PxzEJumr.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-7Ld1YMhh.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|