very-happy-cli 0.2.178 → 0.2.179
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-CHp3y7cb.mjs} +135 -16
- package/dist/{AcpBackend-CDkAQXYf.cjs → AcpBackend-DFipFF7-.cjs} +135 -16
- package/dist/{AcpSessionManager-DckmUZza.cjs → AcpSessionManager-0zpvRJXc.cjs} +38 -4
- package/dist/{AcpSessionManager-BXrQcqwC.mjs → AcpSessionManager-d2-rKWWa.mjs} +38 -4
- package/dist/{BasePermissionHandler-DyLmKKtO.cjs → BasePermissionHandler-CH3zuEkA.cjs} +5 -2
- package/dist/{BasePermissionHandler-BVlrEhIi.mjs → BasePermissionHandler-DdZBYIR4.mjs} +5 -2
- package/dist/acpSessionResume-DTGmAPLt.mjs +67 -0
- package/dist/acpSessionResume-oiCBnAVA.cjs +74 -0
- package/dist/{agentHome-CEp9RMyK.cjs → agentHome-BWcz8mz0.cjs} +4 -4
- package/dist/{agentHome-C1xi37as.mjs → agentHome-CghLvL_1.mjs} +4 -4
- package/dist/{api-JANhFdZV.cjs → api-Cmjfr8Z7.cjs} +28 -260
- package/dist/{api-Dib0dmqC.mjs → api-CzwFpJQc.mjs} +21 -253
- package/dist/{apiMachine-DNTJidYH.mjs → apiMachine-DJkTEiqy.mjs} +43 -15
- package/dist/{apiMachine-QhK-sKcr.cjs → apiMachine-G6OogT08.cjs} +43 -15
- package/dist/{attachmentContent-DkkdpSSJ.mjs → attachmentContent-B2os4HbA.mjs} +2 -2
- package/dist/{attachmentContent-bpQTBJ0y.cjs → attachmentContent-Bo0UAsSu.cjs} +4 -4
- package/dist/{auth-BRjd2esb.mjs → auth-BS6PaOOG.mjs} +5 -5
- package/dist/{auth-DgIV0Cvt.cjs → auth-D6bBUwZa.cjs} +5 -5
- package/dist/{auth-DNct7VUi.mjs → auth-DMX0xPNK.mjs} +8 -8
- package/dist/{auth-omWDtgR8.cjs → auth-HEhRaNgL.cjs} +8 -8
- package/dist/{auto-CI16FZmX.cjs → auto-C6I55iOh.cjs} +18 -17
- package/dist/{auto-DKGFOJBo.mjs → auto-Cl1SEDcD.mjs} +18 -17
- package/dist/{bootstrap-DCQ87Aan.cjs → bootstrap-exVucYav.cjs} +2 -2
- package/dist/{bootstrap-BUagGC_-.mjs → bootstrap-iuyufnp3.mjs} +2 -2
- package/dist/{browser-CSKhc0Bl.cjs → browser-BohJK12g.cjs} +1 -1
- package/dist/{browser-Dj_DYQEh.mjs → browser-CSYum7xH.mjs} +1 -1
- package/dist/{claudeLocal-CCCvAeMd.mjs → claudeLocal-Dq_R3Ax_.mjs} +6 -5
- package/dist/{claudeLocal-CdIVnOZp.cjs → claudeLocal-re4yjSTx.cjs} +6 -5
- package/dist/{claudeLocalLauncher-21-xh5gc.cjs → claudeLocalLauncher-B4hJHpCA.cjs} +11 -10
- package/dist/{claudeLocalLauncher-BmrpaRYJ.mjs → claudeLocalLauncher-CN67lN7-.mjs} +11 -10
- package/dist/{claudeSessionFork-DvxMKAmY.mjs → claudeSessionFork-BihfD0Ik.mjs} +1 -1
- package/dist/{claudeSessionFork-kYCP1IJB.cjs → claudeSessionFork-DiSMYerV.cjs} +1 -1
- package/dist/{client-Dnza1hgN.cjs → client-BKcK1Bi-.cjs} +3 -3
- package/dist/client-BhoEBnuN.mjs +71 -0
- package/dist/{client-C4zKGjiJ.cjs → client-CuVdN6PP.cjs} +2 -2
- package/dist/{client-BTX9hsbr.mjs → client-DuTDwWSQ.mjs} +3 -3
- package/dist/client-ZjOsn6nZ.cjs +76 -0
- package/dist/{client-CnlkkrZO.mjs → client-wo9nbxuf.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +24 -15
- package/dist/codex/happyMcpStdioBridge.mjs +24 -15
- package/dist/{codexAppServerClient-DvkpQgyv.mjs → codexAppServerClient-BK3zra_1.mjs} +3 -3
- package/dist/{codexAppServerClient-CRlBWGn3.cjs → codexAppServerClient-Dt5zxrun.cjs} +3 -3
- package/dist/{codexCommand-BxjogBzU.mjs → codexCommand-B6pY7CMh.mjs} +65 -60
- package/dist/{codexCommand-DzxIWXIT.cjs → codexCommand-CAZ1SLjg.cjs} +88 -83
- package/dist/{codexTermination-ySDNMEhd.mjs → codexTermination-Cd1Eon_4.mjs} +1 -1
- package/dist/{codexTermination-C28FzlLb.cjs → codexTermination-DmGbHxcD.cjs} +1 -1
- package/dist/{config-DwfEpFr3.mjs → config-2oMG_fEI.mjs} +3 -3
- package/dist/{config-BFB5uJ4t.cjs → config-B0uK6K7n.cjs} +3 -3
- package/dist/{configuration-4TGMrjul.cjs → configuration-CMHZnp6G.cjs} +1 -1
- package/dist/{configuration-DVrb61aY.mjs → configuration-WMi4idBB.mjs} +1 -1
- package/dist/{connect-C7FPY0PI.mjs → connect-BLVHhHzA.mjs} +14 -14
- package/dist/{connect-QH2VJGBG.cjs → connect-uaglGrde.cjs} +14 -14
- package/dist/{context-JoKu0V54.cjs → context-DXzU5bFM.cjs} +1 -1
- package/dist/{context-B3XPVJlj.mjs → context-DploEcoN.mjs} +1 -1
- package/dist/{controlClient-BYKyGyxj.mjs → controlClient-BWUJrj3t.mjs} +3 -3
- package/dist/{controlClient-BTaZlbC6.cjs → controlClient-C-5qCt8W.cjs} +3 -3
- package/dist/{createSessionMetadata-8Fuj2-IV.mjs → createSessionMetadata-3uXrJgOW.mjs} +2 -2
- package/dist/{createSessionMetadata-B2NynaWZ.cjs → createSessionMetadata-BkIzHALd.cjs} +2 -2
- package/dist/{defaultPermissionMode-B8kJG9uI.mjs → defaultPermissionMode-BzxLh20a.mjs} +2 -2
- package/dist/{defaultPermissionMode-BEWCqJU-.cjs → defaultPermissionMode-pS3vmiSg.cjs} +2 -2
- package/dist/{deterministicJson-BjNQsAjO.cjs → deterministicJson-B8z2GPi9.cjs} +220 -14
- package/dist/{deterministicJson-C5ZwZ7hu.mjs → deterministicJson-D_whDMFd.mjs} +217 -12
- package/dist/{doctor-BshRnjLi.cjs → doctor-Br1Kcy2J.cjs} +7 -7
- package/dist/{doctor-0BiGwJXk.mjs → doctor-CmtSsR2-.mjs} +7 -7
- package/dist/{downloadTarget-BN5vZt3K.cjs → downloadTarget-BQJK_6oH.cjs} +6 -6
- package/dist/{downloadTarget-DJPwAZlu.mjs → downloadTarget-BoNwTIH_.mjs} +6 -6
- package/dist/{ensureDaemonRunning-C5QfToCe.cjs → ensureDaemonRunning-BRUmsq6J.cjs} +5 -5
- package/dist/{ensureDaemonRunning-CSmb_mqt.mjs → ensureDaemonRunning-Czo9IHJQ.mjs} +5 -5
- package/dist/{handleResumeCommand-CgjpsdDe.mjs → handleResumeCommand-C8thKjqf.mjs} +21 -5
- package/dist/{handleResumeCommand-BwnUZmbo.cjs → handleResumeCommand-tKD_Hpxc.cjs} +21 -5
- package/dist/{index-BYOZ_8WZ.cjs → index-B0UjHlAe.cjs} +4 -4
- package/dist/{index-BehVbAsA.mjs → index-BTxHphpV.mjs} +254 -49
- package/dist/index-BiyC7cZ3.mjs +18 -0
- package/dist/{index-_l1Sdmbi.cjs → index-C6O2vVjm.cjs} +154 -33
- package/dist/index-CUuc6iCn.cjs +24 -0
- package/dist/{index-Bvldtdny.mjs → index-CdQI0C9p.mjs} +4 -4
- package/dist/{index-BRClDe07.cjs → index-D09T1m8Y.cjs} +3 -3
- package/dist/{index-BYgfern_.mjs → index-D3bidoG8.mjs} +3 -3
- package/dist/{index-piJPsTsm.cjs → index-DMqDMT1Q.cjs} +256 -51
- package/dist/{index-Clqlu17M.mjs → index-DPOa4NhL.mjs} +153 -34
- 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-CYRZxS87.cjs} +3 -3
- package/dist/{install-fYWHrPcC.mjs → install-hnve_9vq.mjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +62 -1
- package/dist/lib.d.mts +62 -1
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-DNMlIhX0.mjs → lidState-Bb8fgXg3.mjs} +1 -1
- package/dist/{lidState-BeOwj6eW.cjs → lidState-Dv2wwFTj.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Br-mgogg.cjs → localHappyAgentAuth-DjYvkXvV.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BezKSFDi.mjs → localHappyAgentAuth-NEU7fax7.mjs} +1 -1
- package/dist/{logger--vAVtXB_.mjs → logger-BtVhHnD8.mjs} +2 -2
- package/dist/{logger-DXTWlPzP.cjs → logger-C1GWx3gi.cjs} +2 -2
- package/dist/{machineMetadata-DcUupMje.cjs → machineMetadata-CLHS9sv_.cjs} +3 -3
- package/dist/{machineMetadata-B1H9gNbN.mjs → machineMetadata-D-g--oU_.mjs} +3 -3
- package/dist/{main-CshDb5-1.mjs → main-B2LWV8DI.mjs} +58 -45
- package/dist/{main-DoMFJ2Cl.cjs → main-CWhSsbtU.cjs} +58 -45
- package/dist/{mcp-pNc1EbQf.cjs → mcp-CARUsXHV.cjs} +14 -14
- package/dist/{mcp-DKT_lrvQ.mjs → mcp-ext92q3Y.mjs} +14 -14
- package/dist/{mirrorProtocol-6IFGPpjJ.mjs → mirrorProtocol-BwYibqry.mjs} +3 -3
- package/dist/{mirrorProtocol-qKflWTX_.cjs → mirrorProtocol-DEy2g1CB.cjs} +3 -3
- package/dist/{package-B7B03ejW.mjs → package-BPPebGQF.mjs} +7 -7
- package/dist/{package-DY4zTbKS.cjs → package-SgqTYsjn.cjs} +7 -7
- package/dist/panels-BZ0_Tt7B.mjs +137 -0
- package/dist/panels-D1c7q2dD.cjs +142 -0
- package/dist/{peerTools-3R9RUARX.mjs → peerTools-CWKzcQ7u.mjs} +60 -10
- package/dist/{peerTools-iy3_6Yc5.cjs → peerTools-DRQETXaz.cjs} +60 -9
- package/dist/{persistence-BfX72dne.cjs → persistence-BegE7NPa.cjs} +2 -2
- package/dist/{persistence-DTk4sNpd.mjs → persistence-Cr-wutZ4.mjs} +3 -3
- package/dist/{piRunnerArgs-CRQVR9o-.cjs → piRunnerArgs-Cs-378Vz.cjs} +8 -2
- package/dist/{piRunnerArgs-AT8QJY7x.mjs → piRunnerArgs-DwvM_yWA.mjs} +7 -1
- package/dist/{piRuntime-BHRT5MKO.cjs → piRuntime-BG-1td_n.cjs} +2 -2
- package/dist/{piRuntime-E44qTVQ4.mjs → piRuntime-Bue5mnlc.mjs} +2 -2
- package/dist/{piTerminal-De8nbciM.mjs → piTerminal-B5x9X5yV.mjs} +17 -17
- package/dist/{piTerminal-hI4WFdWm.cjs → piTerminal-G4z-xVyy.cjs} +17 -17
- package/dist/processTreeSnapshot-CuLJDNC-.mjs +101 -0
- package/dist/processTreeSnapshot-mDbnuojn.cjs +105 -0
- package/dist/prompt-BOouDaTM.mjs +99 -0
- package/dist/prompt-lgF9IE82.cjs +105 -0
- package/dist/{attachmentLimits-UyFn8fkQ.mjs → pushNotifications-BdFjDjQe.mjs} +303 -3
- package/dist/{attachmentLimits-SqeAHrVC.cjs → pushNotifications-DaLQUyi0.cjs} +304 -2
- package/dist/{index-DFPT4HOO.cjs → query-Ctfg-5gy.cjs} +25 -5
- package/dist/{index-CEjJnq05.mjs → query-DYP_W1wp.mjs} +26 -3
- package/dist/{rateLimitWindows-XrJiiBpU.mjs → rateLimitWindows-CuEqk_0g.mjs} +1 -1
- package/dist/{rateLimitWindows-Czb7_7cK.cjs → rateLimitWindows-Dj_8voBK.cjs} +1 -1
- package/dist/{registerCommonHandlers-CvIedVRf.mjs → registerCommonHandlers-BAlP7SGc.mjs} +2 -2
- package/dist/{registerCommonHandlers-C0_fyBQ0.cjs → registerCommonHandlers-Cj084Sg7.cjs} +2 -2
- package/dist/{registerKillSessionHandler-gwJ5lTf0.mjs → registerKillSessionHandler-PD0jWtQo.mjs} +6 -6
- package/dist/{registerKillSessionHandler-DYl7l4Ts.cjs → registerKillSessionHandler-qMju0ZfF.cjs} +6 -6
- package/dist/{remoteSessionClient-BRTIOX5b.cjs → remoteSessionClient-B7i7MkYV.cjs} +5 -5
- package/dist/{remoteSessionClient-DRb2Jr5s.mjs → remoteSessionClient-Bn2qu5C5.mjs} +5 -5
- package/dist/{reportProgressTool-B9nCzbkL.cjs → reportProgressTool-CM1JFAHg.cjs} +84 -2
- package/dist/{reportProgressTool-D5tEoXMW.mjs → reportProgressTool-gHItlSzz.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-BQ_FGaOL.mjs → run-BM4TxiyN.mjs} +177 -41
- package/dist/{run-CKe_WeLW.cjs → run-CNXwIe0A.cjs} +191 -55
- package/dist/{runClaude-MHI5IKM-.cjs → runClaude-CWhj2V4Q.cjs} +36 -40
- package/dist/{runClaude-zrrNcQC_.mjs → runClaude-C_3I8hvR.mjs} +36 -40
- package/dist/{runClaudeDeps-RRw-Nusc.cjs → runClaudeDeps-B81cOKnH.cjs} +294 -156
- package/dist/{runClaudeDeps-CVBCokOS.mjs → runClaudeDeps-QGrOeDe2.mjs} +294 -159
- package/dist/{runGemini-kipag2ag.mjs → runGemini-BEdWEZLR.mjs} +60 -54
- package/dist/{runGemini-D7Lg9yCr.cjs → runGemini-CgRLYbt5.cjs} +60 -54
- package/dist/{runOpenClaw-DCcQ0L2N.cjs → runOpenClaw-C1NVmzOL.cjs} +18 -18
- package/dist/{runOpenClaw-C_lRY3Do.mjs → runOpenClaw-DdQZAYj1.mjs} +18 -18
- package/dist/{sandbox-BSyXFVFp.mjs → sandbox-DjQUdCMG.mjs} +4 -4
- package/dist/{sandbox-dMwPTmjm.cjs → sandbox-nocIjliq.cjs} +4 -4
- package/dist/selfCheck-CjCF4C3v.mjs +85 -0
- package/dist/{selfCheck-DkzDDUsE.cjs → selfCheck-DCt4Uzbq.cjs} +36 -35
- package/dist/{send-C-k9nsd3.mjs → send-Ct7X4pPU.mjs} +8 -8
- package/dist/{send-dxC0miIA.cjs → send-Dydf_hwZ.cjs} +8 -8
- package/dist/{server-B-W6P7Qr.cjs → server-CosABFbd.cjs} +6 -6
- package/dist/{server-DxoTYNlw.mjs → server-DTQGZMxh.mjs} +4 -4
- package/dist/{sessionLock-DWX6BbiU.cjs → sessionLock-DokGab2R.cjs} +16 -3
- package/dist/{sessionLock-DBdtZGOL.mjs → sessionLock-WYIyaVO4.mjs} +16 -4
- package/dist/{sessionOps-BVoXe12O.mjs → sessionOps-BIGgRube.mjs} +10 -5
- package/dist/{sessionOps-BAnr7n8t.cjs → sessionOps-S-qPBLFf.cjs} +10 -5
- package/dist/{sessionScanner-CDOYsEUD.cjs → sessionScanner-CIMM2hvZ.cjs} +3 -3
- package/dist/{sessionScanner-BtxoeluY.mjs → sessionScanner-o5hnMi5e.mjs} +3 -3
- package/dist/{sessions-C3sZJkzI.mjs → sessions-BJHEZpi2.mjs} +39 -17
- package/dist/{sessions-hAitoN-m.cjs → sessions-JchI1w3z.cjs} +39 -16
- package/dist/{setupOfflineReconnection-C2EeYTFH.cjs → setupOfflineReconnection-CNiAt5ZP.cjs} +2 -2
- package/dist/{setupOfflineReconnection-_eD4cuUT.mjs → setupOfflineReconnection-DMiBO2y9.mjs} +2 -2
- package/dist/{spawn-Bc9v7pIf.cjs → spawn-6PD7nnoC.cjs} +48 -17
- package/dist/{spawn-qNrB2CD_.mjs → spawn-DgvUNYEo.mjs} +48 -17
- package/dist/{spawnAgents-BVEaz35W.cjs → spawnAgents-DsXgegHM.cjs} +37 -1
- package/dist/spawnAgents-P006Hqio.mjs +79 -0
- package/dist/{spawnHappyCLI-C2stUioM.mjs → spawnHappyCLI-CCOrEtf9.mjs} +1 -1
- package/dist/{spawnHappyCLI-fzUagkKV.cjs → spawnHappyCLI-Dywezwk6.cjs} +1 -1
- package/dist/{specialCommands-C6W-rVyh.mjs → specialCommands-DPcd9edP.mjs} +3 -3
- package/dist/{specialCommands-BJ-nqY4s.cjs → specialCommands-QxPpkGKf.cjs} +3 -3
- package/dist/{startFileWatcher-CR09Snmz.mjs → startFileWatcher-DghDOCO4.mjs} +1 -1
- package/dist/{startFileWatcher-Bqlqjt93.cjs → startFileWatcher-RECH5qY8.cjs} +1 -1
- package/dist/{streamRelay-CJoMk_d2.mjs → streamRelay-DMV_TXfS.mjs} +1 -1
- package/dist/{streamRelay-9kBPpbvU.cjs → streamRelay-DlUWKUpo.cjs} +1 -1
- package/dist/{sync-DbW07iQS.mjs → sync-CSe0Rf45.mjs} +1 -1
- package/dist/{sync-Dhmtk66S.cjs → sync-D23jbqVa.cjs} +1 -1
- package/dist/{systemPrompt-3PYi3EUY.cjs → systemPrompt-BOy4kU4P.cjs} +4 -3
- package/dist/{systemPrompt-CQcuUmVp.mjs → systemPrompt-CFNKnh65.mjs} +4 -3
- package/dist/{teams-CwF4Z2fA.mjs → teams-DyY669f0.mjs} +8 -8
- package/dist/{teams-DpxLcUU_.cjs → teams-Ov2BDT-A.cjs} +8 -8
- package/dist/{time-BuGWTVP6.mjs → time-65DcU6Jx.mjs} +1 -1
- package/dist/{time-A6zR3Iy6.cjs → time-CrwIMHta.cjs} +1 -1
- package/dist/{titleGenerator-D26gvNaS.cjs → titleGenerator-CS_rh2_J.cjs} +9 -8
- package/dist/{titleGenerator-BGEzNWC9.mjs → titleGenerator-CiAMxf7s.mjs} +9 -8
- package/dist/{todo-DrZc76H5.mjs → todo-BDONw0sK.mjs} +6 -6
- package/dist/{todo-73g3NCIO.cjs → todo-KY-okGii.cjs} +6 -6
- package/dist/{tools-BtsrQnNS.mjs → tools-D8-PnZEG.mjs} +1 -1
- package/dist/{tools-CxJp4T1T.cjs → tools-_w52DZG6.cjs} +1 -1
- package/dist/{uninstall-DWNYvewQ.cjs → uninstall-8vnLN-IE.cjs} +3 -3
- package/dist/{uninstall-DOb2mTwV.mjs → uninstall-_fjGRP9b.mjs} +3 -3
- package/dist/webPanels-B2_C2-3g.mjs +49 -0
- package/dist/webPanels-FCgFKvVe.cjs +53 -0
- package/package.json +7 -7
- 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
|
@@ -3,6 +3,7 @@ import { z as z$1 } from 'zod';
|
|
|
3
3
|
import { isCuid, createId } from '@paralleldrive/cuid2';
|
|
4
4
|
|
|
5
5
|
const CODEX_STEER_CAPABILITY = "codex-steer-v1";
|
|
6
|
+
const PI_STEER_CAPABILITY = "pi-steer-v1";
|
|
6
7
|
const sessionRoleSchema = z.enum(["user", "agent"]);
|
|
7
8
|
const sessionTextEventSchema = z.object({
|
|
8
9
|
t: z.literal("text"),
|
|
@@ -426,7 +427,7 @@ z$1.object({
|
|
|
426
427
|
events: z$1.array(ConnectionDiagnosticEventSchema).min(1).max(32)
|
|
427
428
|
}).strict();
|
|
428
429
|
const TeamPermissionModeSchema = z$1.enum(["default", "bypassPermissions"]);
|
|
429
|
-
const id$
|
|
430
|
+
const id$2 = z$1.string().min(1).max(128);
|
|
430
431
|
const text$1 = z$1.string().min(1).max(32e3);
|
|
431
432
|
const TeamAssistantSchema = z$1.enum(["claude", "codex", "pi-acp"]);
|
|
432
433
|
const TeamModelSchema = z$1.string().trim().min(1).max(256);
|
|
@@ -437,28 +438,28 @@ const TeamActionSchema = z$1.discriminatedUnion("type", [
|
|
|
437
438
|
z$1.object({ type: z$1.literal("start"), launch: TeamLaunchSchema }),
|
|
438
439
|
z$1.object({ type: z$1.literal("set-defaults"), defaults: TeamDefaultsSchema }),
|
|
439
440
|
z$1.object({ type: z$1.literal("set-permission-mode"), permissionMode: TeamPermissionModeSchema }),
|
|
440
|
-
z$1.object({ type: z$1.literal("schedule-create"), name: id$
|
|
441
|
-
z$1.object({ type: z$1.literal("schedule-pause"), scheduleId: id$
|
|
442
|
-
z$1.object({ type: z$1.literal("schedule-resume"), scheduleId: id$
|
|
443
|
-
z$1.object({ type: z$1.literal("schedule-cancel"), scheduleId: id$
|
|
444
|
-
z$1.object({ type: z$1.literal("reconcile-operation"), operationId: id$
|
|
445
|
-
z$1.object({ type: z$1.literal("join"), name: id$
|
|
446
|
-
z$1.object({ type: z$1.literal("delegate"), goal: text$1, acceptance: z$1.array(text$1).min(1).max(32), parentTaskId: id$
|
|
447
|
-
z$1.object({ type: z$1.literal("message"), taskId: id$
|
|
448
|
-
z$1.object({ type: z$1.literal("submit"), taskId: id$
|
|
449
|
-
z$1.object({ type: z$1.literal("accept"), taskId: id$
|
|
450
|
-
z$1.object({ type: z$1.literal("return"), taskId: id$
|
|
451
|
-
z$1.object({ type: z$1.literal("cancel"), taskId: id$
|
|
452
|
-
z$1.object({ type: z$1.literal("handoff"), taskId: id$
|
|
453
|
-
z$1.object({ type: z$1.literal("claim-operation"), operationId: id$
|
|
454
|
-
z$1.object({ type: z$1.literal("complete-operation"), operationId: id$
|
|
455
|
-
z$1.object({ type: z$1.literal("fail-operation"), operationId: id$
|
|
456
|
-
z$1.object({ type: z$1.literal("session-event"), sessionId: id$
|
|
457
|
-
z$1.object({ type: z$1.literal("message-delivered"), messageId: id$
|
|
441
|
+
z$1.object({ type: z$1.literal("schedule-create"), name: id$2, botId: id$2, body: text$1, runAt: z$1.number().int().positive().max(864e13), intervalMs: z$1.number().int().min(6e4).max(366 * 864e5).optional() }),
|
|
442
|
+
z$1.object({ type: z$1.literal("schedule-pause"), scheduleId: id$2, version: z$1.number().int().positive() }),
|
|
443
|
+
z$1.object({ type: z$1.literal("schedule-resume"), scheduleId: id$2, version: z$1.number().int().positive() }),
|
|
444
|
+
z$1.object({ type: z$1.literal("schedule-cancel"), scheduleId: id$2, version: z$1.number().int().positive() }),
|
|
445
|
+
z$1.object({ type: z$1.literal("reconcile-operation"), operationId: id$2, claimId: id$2, note: z$1.string().trim().min(1).max(4e3) }),
|
|
446
|
+
z$1.object({ type: z$1.literal("join"), name: id$2, sessionId: id$2, botId: id$2.optional() }),
|
|
447
|
+
z$1.object({ type: z$1.literal("delegate"), goal: text$1, acceptance: z$1.array(text$1).min(1).max(32), parentTaskId: id$2.optional(), assigneeBotId: id$2.optional(), botName: id$2.optional(), directory: z$1.string().min(1).max(4096).optional(), assistant: TeamAssistantSchema.optional(), model: TeamModelSchema.optional() }),
|
|
448
|
+
z$1.object({ type: z$1.literal("message"), taskId: id$2, body: text$1, recipientBotId: id$2.optional() }),
|
|
449
|
+
z$1.object({ type: z$1.literal("submit"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), result: text$1 }),
|
|
450
|
+
z$1.object({ type: z$1.literal("accept"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive() }),
|
|
451
|
+
z$1.object({ type: z$1.literal("return"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), reason: text$1 }),
|
|
452
|
+
z$1.object({ type: z$1.literal("cancel"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), reason: text$1 }),
|
|
453
|
+
z$1.object({ type: z$1.literal("handoff"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), assigneeBotId: id$2 }),
|
|
454
|
+
z$1.object({ type: z$1.literal("claim-operation"), operationId: id$2, machineId: id$2, teamLaunchVersion: z$1.literal(1).optional() }),
|
|
455
|
+
z$1.object({ type: z$1.literal("complete-operation"), operationId: id$2, machineId: id$2, claimId: id$2, sessionId: id$2.optional(), workingDirectory: z$1.string().min(1).max(4096).optional() }),
|
|
456
|
+
z$1.object({ type: z$1.literal("fail-operation"), operationId: id$2, machineId: id$2, claimId: id$2, error: text$1, unknown: z$1.boolean().optional() }),
|
|
457
|
+
z$1.object({ type: z$1.literal("session-event"), sessionId: id$2, event: z$1.enum(["idle", "blocked", "exited"]) }),
|
|
458
|
+
z$1.object({ type: z$1.literal("message-delivered"), messageId: id$2, recipientBotId: id$2, generation: z$1.number().int().positive(), sessionId: id$2 })
|
|
458
459
|
]);
|
|
459
|
-
z$1.object({ requestId: id$
|
|
460
|
-
z$1.object({ name: id$
|
|
461
|
-
const id = z$1.string().min(1).max(128);
|
|
460
|
+
z$1.object({ requestId: id$2, action: TeamActionSchema });
|
|
461
|
+
z$1.object({ name: id$2, machineId: id$2, requestId: id$2.optional(), launch: TeamLaunchSchema.optional() });
|
|
462
|
+
const id$1 = z$1.string().min(1).max(128);
|
|
462
463
|
const text = z$1.string().min(1).max(32e3);
|
|
463
464
|
const AUTOMATION_NAME_PATTERN = /^[a-z0-9][a-z0-9-_.]{0,63}$/;
|
|
464
465
|
const AutomationNameSchema = z$1.string().regex(AUTOMATION_NAME_PATTERN, "automation name must match [a-z0-9][a-z0-9-_.]{0,63}");
|
|
@@ -497,7 +498,7 @@ const AutomationActionSchema = z$1.discriminatedUnion("kind", [
|
|
|
497
498
|
worktree: z$1.boolean().optional(),
|
|
498
499
|
sticky: AutomationStickySchema.optional()
|
|
499
500
|
}),
|
|
500
|
-
z$1.object({ kind: z$1.literal("send"), sessionId: id, prompt: text }),
|
|
501
|
+
z$1.object({ kind: z$1.literal("send"), sessionId: id$1, prompt: text }),
|
|
501
502
|
z$1.object({
|
|
502
503
|
kind: z$1.literal("script"),
|
|
503
504
|
command: z$1.array(z$1.string().min(1).max(4096)).min(1).max(256),
|
|
@@ -523,41 +524,45 @@ const maxRuntimeMs = z$1.number().int().min(6e4).max(7 * 864e5);
|
|
|
523
524
|
z$1.object({
|
|
524
525
|
name: AutomationNameSchema,
|
|
525
526
|
description: z$1.string().max(4e3).nullable().optional(),
|
|
526
|
-
machineId: id,
|
|
527
|
+
machineId: id$1,
|
|
527
528
|
trigger: AutomationTriggerSchema,
|
|
528
529
|
action: AutomationActionSchema,
|
|
529
530
|
concurrency: AutomationConcurrencySchema.optional(),
|
|
530
531
|
maxRuntimeMs: maxRuntimeMs.optional(),
|
|
531
532
|
status: z$1.enum(AUTOMATION_STATUSES).optional(),
|
|
532
533
|
/** B-548. Older servers strip it silently — clients must check the response echoes `precheck`. */
|
|
533
|
-
precheck: AutomationPrecheckSchema.nullable().optional()
|
|
534
|
+
precheck: AutomationPrecheckSchema.nullable().optional(),
|
|
535
|
+
/** B-644: sessions this automation spawns join this project (quiet variant). Older servers strip it — check the echo. */
|
|
536
|
+
projectId: id$1.nullable().optional()
|
|
534
537
|
});
|
|
535
538
|
z$1.object({
|
|
536
539
|
version: z$1.number().int().positive(),
|
|
537
540
|
name: AutomationNameSchema.optional(),
|
|
538
541
|
description: z$1.string().max(4e3).nullable().optional(),
|
|
539
|
-
machineId: id.optional(),
|
|
542
|
+
machineId: id$1.optional(),
|
|
540
543
|
trigger: AutomationTriggerSchema.optional(),
|
|
541
544
|
action: AutomationActionSchema.optional(),
|
|
542
545
|
concurrency: AutomationConcurrencySchema.optional(),
|
|
543
546
|
maxRuntimeMs: maxRuntimeMs.optional(),
|
|
544
547
|
/** B-548: omitted keeps the current precheck, `null` removes it. Changing `action` alone keeps it too. */
|
|
545
|
-
precheck: AutomationPrecheckSchema.nullable().optional()
|
|
548
|
+
precheck: AutomationPrecheckSchema.nullable().optional(),
|
|
549
|
+
/** B-644: omitted keeps the current project, `null` detaches. */
|
|
550
|
+
projectId: id$1.nullable().optional()
|
|
546
551
|
});
|
|
547
552
|
const payload = z$1.string().max(AUTOMATION_PAYLOAD_MAX_BYTES).refine((v) => new TextEncoder().encode(v).length <= AUTOMATION_PAYLOAD_MAX_BYTES, "payload exceeds 64KB");
|
|
548
553
|
z$1.object({ payload: payload.optional(), dedupeKey: z$1.string().min(1).max(256).optional() });
|
|
549
554
|
z$1.object({ payload: payload.optional() });
|
|
550
555
|
z$1.object({
|
|
551
|
-
machineId: id,
|
|
556
|
+
machineId: id$1,
|
|
552
557
|
limit: z$1.number().int().min(1).max(AUTOMATION_CLAIM_MAX_RUNS).optional(),
|
|
553
558
|
leaseMs: z$1.number().int().min(5e3).max(36e5).optional(),
|
|
554
559
|
/** B-548: what this daemon can execute (e.g. `precheck`). Older daemons send nothing; older servers strip it. */
|
|
555
560
|
capabilities: z$1.array(z$1.string().min(1).max(64)).max(32).optional()
|
|
556
561
|
});
|
|
557
562
|
z$1.object({
|
|
558
|
-
claimId: id.optional(),
|
|
563
|
+
claimId: id$1.optional(),
|
|
559
564
|
status: z$1.enum(["running", "done", "failed", "skipped"]).optional(),
|
|
560
|
-
sessionId: id.nullable().optional(),
|
|
565
|
+
sessionId: id$1.nullable().optional(),
|
|
561
566
|
stickyKey: z$1.string().min(1).max(512).optional(),
|
|
562
567
|
summary: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
|
|
563
568
|
error: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
|
|
@@ -567,16 +572,130 @@ z$1.object({
|
|
|
567
572
|
leaseMs: z$1.number().int().min(5e3).max(36e5).optional()
|
|
568
573
|
});
|
|
569
574
|
z$1.object({ by: z$1.string().min(1).max(64).optional() });
|
|
570
|
-
z$1.object({ key: z$1.string().min(1).max(512), sessionId: id });
|
|
575
|
+
z$1.object({ key: z$1.string().min(1).max(512), sessionId: id$1 });
|
|
571
576
|
z$1.object({ key: z$1.string().min(1).max(512) });
|
|
572
577
|
z$1.object({
|
|
573
|
-
automationId: id.optional(),
|
|
578
|
+
automationId: id$1.optional(),
|
|
574
579
|
name: AutomationNameSchema.optional(),
|
|
575
580
|
status: z$1.string().min(1).max(64).optional(),
|
|
576
581
|
attention: z$1.enum(["1", "true", "0", "false"]).optional(),
|
|
577
582
|
limit: z$1.coerce.number().int().min(1).max(200).optional()
|
|
578
583
|
});
|
|
579
|
-
z$1.object({ machineId: id.optional() });
|
|
584
|
+
z$1.object({ machineId: id$1.optional() });
|
|
585
|
+
const PROJECT_SESSION_CAPABILITY = "project-v1";
|
|
586
|
+
const PROJECT_LIMITS = {
|
|
587
|
+
nameChars: 120,
|
|
588
|
+
goalChars: 2e3,
|
|
589
|
+
instructionsBytes: 8 * 1024,
|
|
590
|
+
folders: 20,
|
|
591
|
+
logTitleChars: 200,
|
|
592
|
+
logBodyBytes: 4 * 1024,
|
|
593
|
+
messageBytes: 64 * 1024,
|
|
594
|
+
presenceBatch: 200,
|
|
595
|
+
memberBatch: 200};
|
|
596
|
+
const id = z$1.string().min(1).max(128);
|
|
597
|
+
const utf8Bytes = (value) => new TextEncoder().encode(value).length;
|
|
598
|
+
const boundedText = (maxBytes) => z$1.string().max(maxBytes).refine((v) => utf8Bytes(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
|
|
599
|
+
const ProjectFolderSchema = z$1.object({
|
|
600
|
+
machineId: id,
|
|
601
|
+
path: z$1.string().min(1).max(4096),
|
|
602
|
+
primary: z$1.boolean().optional()
|
|
603
|
+
});
|
|
604
|
+
const ProjectDefaultsSchema = z$1.object({
|
|
605
|
+
agent: z$1.string().max(64).nullable().optional(),
|
|
606
|
+
model: z$1.string().max(256).nullable().optional(),
|
|
607
|
+
permissionMode: z$1.string().max(64).nullable().optional(),
|
|
608
|
+
worktree: z$1.boolean().nullable().optional()
|
|
609
|
+
});
|
|
610
|
+
const PROJECT_LOG_KINDS = ["decision", "finding", "handoff"];
|
|
611
|
+
const ProjectLogKindSchema = z$1.enum(PROJECT_LOG_KINDS);
|
|
612
|
+
const ProjectMemberViaInputSchema = z$1.enum(["explicit", "lineage", "suggested-accepted", "automation"]);
|
|
613
|
+
z$1.object({
|
|
614
|
+
name: z$1.string().trim().min(1).max(PROJECT_LIMITS.nameChars),
|
|
615
|
+
goal: z$1.string().max(PROJECT_LIMITS.goalChars).nullable().optional(),
|
|
616
|
+
instructions: boundedText(PROJECT_LIMITS.instructionsBytes).optional(),
|
|
617
|
+
folders: z$1.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
|
|
618
|
+
defaults: ProjectDefaultsSchema.optional(),
|
|
619
|
+
/** Idempotency: the same requestId returns the project it created. */
|
|
620
|
+
requestId: id.optional(),
|
|
621
|
+
/** Optional initial members (e.g. "设为项目" moves a folder's sessions in one step). */
|
|
622
|
+
sessionIds: z$1.array(id).max(PROJECT_LIMITS.memberBatch).optional()
|
|
623
|
+
});
|
|
624
|
+
z$1.object({
|
|
625
|
+
name: z$1.string().trim().min(1).max(PROJECT_LIMITS.nameChars).optional(),
|
|
626
|
+
goal: z$1.string().max(PROJECT_LIMITS.goalChars).nullable().optional(),
|
|
627
|
+
folders: z$1.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
|
|
628
|
+
defaults: ProjectDefaultsSchema.optional(),
|
|
629
|
+
archived: z$1.boolean().optional()
|
|
630
|
+
});
|
|
631
|
+
z$1.object({
|
|
632
|
+
instructions: boundedText(PROJECT_LIMITS.instructionsBytes),
|
|
633
|
+
ifVersion: z$1.number().int().min(0),
|
|
634
|
+
/** One-line summary shown in the next-turn digest ("instructions now v8 — …"). */
|
|
635
|
+
summary: z$1.string().max(200).optional()
|
|
636
|
+
});
|
|
637
|
+
z$1.object({
|
|
638
|
+
sessionIds: z$1.array(id).min(1).max(PROJECT_LIMITS.memberBatch),
|
|
639
|
+
via: ProjectMemberViaInputSchema.optional()
|
|
640
|
+
});
|
|
641
|
+
z$1.object({
|
|
642
|
+
kind: ProjectLogKindSchema,
|
|
643
|
+
title: z$1.string().trim().min(1).max(PROJECT_LIMITS.logTitleChars),
|
|
644
|
+
body: boundedText(PROJECT_LIMITS.logBodyBytes).optional(),
|
|
645
|
+
/** Entry id (or `#seq`) this entry replaces. */
|
|
646
|
+
supersedes: z$1.string().min(1).max(128).optional(),
|
|
647
|
+
/** Stamped by the wrapper (the agent cannot fill it). Absent = written by the user. */
|
|
648
|
+
authorSessionId: id.optional()
|
|
649
|
+
});
|
|
650
|
+
z$1.object({
|
|
651
|
+
/** When set, only entries this session authored may be revoked. Absent = the owner. */
|
|
652
|
+
bySessionId: id.optional()
|
|
653
|
+
});
|
|
654
|
+
z$1.object({ teamId: id });
|
|
655
|
+
const ProjectPresenceEntrySchema = z$1.object({
|
|
656
|
+
sessionId: id,
|
|
657
|
+
title: z$1.string().max(200).nullable().optional(),
|
|
658
|
+
agent: z$1.string().max(64).nullable().optional(),
|
|
659
|
+
machine: z$1.string().max(200).nullable().optional(),
|
|
660
|
+
branch: z$1.string().max(200).nullable().optional(),
|
|
661
|
+
state: z$1.string().max(32).nullable().optional(),
|
|
662
|
+
doing: z$1.string().max(200).nullable().optional(),
|
|
663
|
+
injectedInstructionsVersion: z$1.number().int().min(0).nullable().optional(),
|
|
664
|
+
/** Session capabilities the wrapper advertised (e.g. `project-v1`); drives the "未注入" badge. */
|
|
665
|
+
capabilities: z$1.array(z$1.string().max(64)).max(32).optional()
|
|
666
|
+
});
|
|
667
|
+
z$1.object({
|
|
668
|
+
machineId: id,
|
|
669
|
+
sessions: z$1.array(ProjectPresenceEntrySchema).max(PROJECT_LIMITS.presenceBatch),
|
|
670
|
+
/** Sessions of this machine that stopped; their presence rows are marked `offline`. */
|
|
671
|
+
gone: z$1.array(id).max(PROJECT_LIMITS.presenceBatch).optional()
|
|
672
|
+
});
|
|
673
|
+
z$1.object({
|
|
674
|
+
fromSessionId: id,
|
|
675
|
+
toSessionId: id,
|
|
676
|
+
body: boundedText(PROJECT_LIMITS.messageBytes).pipe(z$1.string().min(1))
|
|
677
|
+
});
|
|
678
|
+
z$1.object({
|
|
679
|
+
sessionId: id,
|
|
680
|
+
messageIds: z$1.array(id).min(1).max(100)
|
|
681
|
+
});
|
|
682
|
+
z$1.object({
|
|
683
|
+
full: z$1.enum(["0", "1", "true", "false"]).optional(),
|
|
684
|
+
section: z$1.enum(["instructions", "log", "sessions", "messages"]).optional(),
|
|
685
|
+
/** Read without moving the "since last read" cursor (used by the first-turn prefix). */
|
|
686
|
+
peek: z$1.enum(["0", "1", "true", "false"]).optional()
|
|
687
|
+
});
|
|
688
|
+
z$1.object({
|
|
689
|
+
since: z$1.coerce.number().int().min(0)
|
|
690
|
+
});
|
|
691
|
+
const PROJECT_UX_DISPATCH_ENTRIES = ["quick", "dialog", "project", "sidebar_group", "move", "other"];
|
|
692
|
+
const ProjectUxEventSchema = z$1.discriminatedUnion("kind", [
|
|
693
|
+
/** A session was created (or moved) — where from, and whether it landed in a project. */
|
|
694
|
+
z$1.object({ kind: z$1.literal("dispatch"), entry: z$1.enum(PROJECT_UX_DISPATCH_ENTRIES), inProject: z$1.boolean() }),
|
|
695
|
+
/** The owner opened a session that was waiting for them: how long it had been waiting. */
|
|
696
|
+
z$1.object({ kind: z$1.literal("attention_open"), latencyMs: z$1.number().int().min(0).max(7 * 864e5), inProject: z$1.boolean() })
|
|
697
|
+
]);
|
|
698
|
+
z$1.object({ events: z$1.array(ProjectUxEventSchema).min(1).max(20) });
|
|
580
699
|
const BUILTIN_TODO_PREFIX = "vh.todo.v1.";
|
|
581
700
|
const TITLE_MAX_LENGTH = 500;
|
|
582
701
|
const NOTE_MAX_LENGTH = 8e3;
|
|
@@ -984,4 +1103,4 @@ const ServerMigrateNoticeSchema = z$1.object({
|
|
|
984
1103
|
issuedAt: z$1.number().int().positive()
|
|
985
1104
|
});
|
|
986
1105
|
|
|
987
|
-
export { AUTOMATION_NAME_PATTERN as A, BUILTIN_TODO_SKILL as B, ContextUsageSchema as C,
|
|
1106
|
+
export { AUTOMATION_NAME_PATTERN as A, BUILTIN_TODO_SKILL as B, ContextUsageSchema as C, AUTOMATION_CLAIM_MAX_RUNS as D, AUTOMATION_DAEMON_CAPABILITY_PRECHECK as E, AUTOMATION_DEFAULT_LEASE_MS as F, PROMPT_QUEUE_CAPABILITY as P, ReleaseDrainNoticeSchema as R, STREAM_DELTA_MAX_CHARS as S, PROJECT_SESSION_CAPABILITY as a, AUTOMATION_PRECHECK_MAX_TIMEOUT_MS as b, AutomationPrecheckSchema as c, createEnvelope as d, createBuiltinTodoClient as e, BUILTIN_TODO_DISCOVERY as f, getAgentCodeDefaults as g, isClaudeOpus55Model as h, isAutomationRunTerminal as i, supportsClaudeOpus55 as j, AutomationNameSchema as k, AutomationConcurrencySchema as l, AutomationActionSchema as m, normalizeAgentKey as n, AutomationTriggerSchema as o, AgentVersionsSchema as p, PI_STEER_CAPABILITY as q, AGENT_VERSION_SOURCES as r, streamKeyOf as s, RelayAssignmentResponseSchema as t, CODEX_STEER_CAPABILITY as u, RelayCandidatesResponseSchema as v, ServerMigrateNoticeSchema as w, AUTOMATION_SUMMARY_MAX_CHARS as x, AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS as y, AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS as z };
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
2
|
import { unlink, rmdir, mkdir, lstat, readFile, writeFile, rename } from 'node:fs/promises';
|
|
3
3
|
import { join, resolve, dirname } from 'node:path';
|
|
4
|
-
import { T as TEAM_SKILL } from './resources-
|
|
4
|
+
import { T as TEAM_SKILL } from './resources-y9jfyO-_.mjs';
|
|
5
5
|
|
|
6
6
|
const AUTOMATION_SKILL = `---
|
|
7
7
|
name: very-happy-automations
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var resources = require('./resources-
|
|
6
|
+
var resources = require('./resources-CvIlkzpP.cjs');
|
|
7
7
|
|
|
8
8
|
const AUTOMATION_SKILL = `---
|
|
9
9
|
name: very-happy-automations
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
4
4
|
var fs = 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-CMHZnp6G.cjs');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('node:path');
|
|
14
|
-
require('./package-
|
|
14
|
+
require('./package-SgqTYsjn.cjs');
|
|
15
15
|
require('node:fs/promises');
|
|
16
16
|
|
|
17
17
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { l as logger } from './logger
|
|
1
|
+
import { l as logger } from './logger-BtVhHnD8.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-WMi4idBB.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'node:path';
|
|
12
|
-
import './package-
|
|
12
|
+
import './package-BPPebGQF.mjs';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
|
|
15
15
|
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-Cmjfr8Z7.cjs');
|
|
4
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
5
|
+
var configuration = require('./configuration-CMHZnp6G.cjs');
|
|
6
6
|
var types = require('./types-CRS-srZK.cjs');
|
|
7
7
|
require('axios');
|
|
8
|
-
require('./lidState-
|
|
8
|
+
require('./lidState-Dv2wwFTj.cjs');
|
|
9
9
|
require('./authRelay-Dy1qU9td.cjs');
|
|
10
10
|
require('node:crypto');
|
|
11
11
|
require('tweetnacl');
|
|
@@ -13,13 +13,14 @@ require('os');
|
|
|
13
13
|
require('child_process');
|
|
14
14
|
require('node:events');
|
|
15
15
|
require('socket.io-client');
|
|
16
|
-
require('./
|
|
16
|
+
require('./pushNotifications-DaLQUyi0.cjs');
|
|
17
17
|
require('zod');
|
|
18
|
-
require('./index-
|
|
18
|
+
require('./index-C6O2vVjm.cjs');
|
|
19
19
|
require('@paralleldrive/cuid2');
|
|
20
|
+
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
20
21
|
require('./limits-C-a7gr04.cjs');
|
|
21
|
-
require('./time-
|
|
22
|
-
require('./registerCommonHandlers-
|
|
22
|
+
require('./time-CrwIMHta.cjs');
|
|
23
|
+
require('./registerCommonHandlers-Cj084Sg7.cjs');
|
|
23
24
|
require('util');
|
|
24
25
|
require('fs/promises');
|
|
25
26
|
require('crypto');
|
|
@@ -27,18 +28,17 @@ require('path');
|
|
|
27
28
|
require('cross-spawn');
|
|
28
29
|
require('./projectPath-ChLhdOyt.cjs');
|
|
29
30
|
require('url');
|
|
30
|
-
require('./sync-
|
|
31
|
+
require('./sync-D23jbqVa.cjs');
|
|
31
32
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
32
|
-
require('./controlClient-
|
|
33
|
-
require('./persistence-
|
|
33
|
+
require('./controlClient-C-5qCt8W.cjs');
|
|
34
|
+
require('./persistence-BegE7NPa.cjs');
|
|
34
35
|
require('node:fs/promises');
|
|
35
36
|
require('node:fs');
|
|
36
|
-
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
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-SgqTYsjn.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
package/dist/lib.d.cts
CHANGED
|
@@ -588,6 +588,15 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
588
588
|
rpcAvailable: z$1.ZodBoolean;
|
|
589
589
|
detectedAt: z$1.ZodNumber;
|
|
590
590
|
}, z$1.core.$loose>>;
|
|
591
|
+
webPanels: z$1.ZodOptional<z$1.ZodObject<{
|
|
592
|
+
panels: z$1.ZodArray<z$1.ZodObject<{
|
|
593
|
+
id: z$1.ZodString;
|
|
594
|
+
title: z$1.ZodString;
|
|
595
|
+
url: z$1.ZodString;
|
|
596
|
+
embed: z$1.ZodBoolean;
|
|
597
|
+
}, z$1.core.$strip>>;
|
|
598
|
+
updatedAt: z$1.ZodNumber;
|
|
599
|
+
}, z$1.core.$strip>>;
|
|
591
600
|
}, z$1.core.$strip>;
|
|
592
601
|
type DaemonState = z$1.infer<typeof DaemonStateSchema>;
|
|
593
602
|
type ClaudeAuthState = ClaudeAuthState$1;
|
|
@@ -707,6 +716,7 @@ type Metadata = {
|
|
|
707
716
|
*/
|
|
708
717
|
terminalId?: string;
|
|
709
718
|
codexThreadId?: string;
|
|
719
|
+
piSessionId?: string;
|
|
710
720
|
tools?: string[];
|
|
711
721
|
slashCommands?: string[];
|
|
712
722
|
mcpServers?: Array<{
|
|
@@ -1291,6 +1301,11 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1291
1301
|
* own line, so a launcher sends the matching session event only when this
|
|
1292
1302
|
* says the turn-end did not carry it).
|
|
1293
1303
|
*/
|
|
1304
|
+
/**
|
|
1305
|
+
* B-495: close the turn a fork backfill left open. History, not a live
|
|
1306
|
+
* turn end — so no `turn-ended` tap (board analyzer, completion hooks).
|
|
1307
|
+
*/
|
|
1308
|
+
closeReplayedClaudeTurn(): void;
|
|
1294
1309
|
closeClaudeSessionTurn(status?: SessionTurnEndStatus, meta?: {
|
|
1295
1310
|
error?: string;
|
|
1296
1311
|
}): boolean;
|
|
@@ -1453,6 +1468,26 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1453
1468
|
private startSmartReconnect;
|
|
1454
1469
|
}
|
|
1455
1470
|
|
|
1471
|
+
/**
|
|
1472
|
+
* B-510: machine web panels — local web pages a person may need to look at
|
|
1473
|
+
* (noVNC, an agent-browser dashboard, Grafana, a dev server), declared ONLY in
|
|
1474
|
+
* this machine's `~/.happy/settings.json` (`webPanels`) and mirrored to the web
|
|
1475
|
+
* through `daemonState.webPanels`. Spec: specs/2026-09-machine-web-panels.md.
|
|
1476
|
+
*
|
|
1477
|
+
* The web, RPC and server have no write path (same rule as `todoProvider`):
|
|
1478
|
+
* the URL is opened by the viewer's browser, so whoever can write it chooses
|
|
1479
|
+
* what the user's browser loads. Only the machine owner can.
|
|
1480
|
+
*
|
|
1481
|
+
* Nothing is proxied: the viewer's browser connects to the URL directly.
|
|
1482
|
+
*/
|
|
1483
|
+
interface WebPanel {
|
|
1484
|
+
id: string;
|
|
1485
|
+
title: string;
|
|
1486
|
+
url: string;
|
|
1487
|
+
/** false = the web only offers "open in new window" (site forbids framing). */
|
|
1488
|
+
embed: boolean;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1456
1491
|
/**
|
|
1457
1492
|
* The backends the daemon can spawn as a remote session.
|
|
1458
1493
|
*
|
|
@@ -1691,6 +1726,9 @@ declare class ApiMachineClient {
|
|
|
1691
1726
|
private claudeAuthState;
|
|
1692
1727
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1693
1728
|
private agentHibernationIdleMs;
|
|
1729
|
+
/** B-510: last normalized `webPanels` (null = never set → field not written). */
|
|
1730
|
+
private webPanels;
|
|
1731
|
+
private webPanelsSignatureSent;
|
|
1694
1732
|
private rateLimitPushChain;
|
|
1695
1733
|
private readonly rateLimitPublisher;
|
|
1696
1734
|
private rpcHandlerManager;
|
|
@@ -1770,6 +1808,12 @@ declare class ApiMachineClient {
|
|
|
1770
1808
|
* `daemonState.agentHibernation` capability. Call before connect().
|
|
1771
1809
|
*/
|
|
1772
1810
|
setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
|
|
1811
|
+
/**
|
|
1812
|
+
* B-510: mirror the local `webPanels` declaration into daemonState. Every
|
|
1813
|
+
* daemonState write is a CAS + DB write + broadcast, so an unchanged list
|
|
1814
|
+
* (same signature as the last one sent) writes nothing.
|
|
1815
|
+
*/
|
|
1816
|
+
setWebPanels(panels: WebPanel[]): Promise<void>;
|
|
1773
1817
|
private publishAgentHibernation;
|
|
1774
1818
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
1775
1819
|
setClaudeAuthHandlers(handlers: {
|
|
@@ -1862,7 +1906,7 @@ interface PushToken {
|
|
|
1862
1906
|
createdAt: number;
|
|
1863
1907
|
updatedAt: number;
|
|
1864
1908
|
}
|
|
1865
|
-
type SessionNotificationKind = 'done' | 'permission' | 'question';
|
|
1909
|
+
type SessionNotificationKind = 'done' | 'permission' | 'question' | 'attention';
|
|
1866
1910
|
declare class PushNotificationClient {
|
|
1867
1911
|
private readonly token;
|
|
1868
1912
|
private readonly baseUrl;
|
|
@@ -1897,6 +1941,23 @@ declare class PushNotificationClient {
|
|
|
1897
1941
|
metadata: Metadata | null | undefined;
|
|
1898
1942
|
data?: Record<string, any>;
|
|
1899
1943
|
}): void;
|
|
1944
|
+
/**
|
|
1945
|
+
* B-510 `request_human` / `very-happy attention --session`: an awaited
|
|
1946
|
+
* push-event `attention` (title "Needs you", body = the reason, data.url =
|
|
1947
|
+
* panel deep link or the session). A server that predates the kind answers
|
|
1948
|
+
* 400; then the same push goes out as `question`, so the person is still
|
|
1949
|
+
* reached (compat matrix in specs/2026-09-machine-web-panels.md).
|
|
1950
|
+
*/
|
|
1951
|
+
sendAttention(params: {
|
|
1952
|
+
sessionId: string;
|
|
1953
|
+
reason: string;
|
|
1954
|
+
url: string;
|
|
1955
|
+
sessionTitle?: string;
|
|
1956
|
+
}): Promise<{
|
|
1957
|
+
sent: boolean;
|
|
1958
|
+
kind?: SessionNotificationKind;
|
|
1959
|
+
error?: string;
|
|
1960
|
+
}>;
|
|
1900
1961
|
}
|
|
1901
1962
|
|
|
1902
1963
|
/**
|
package/dist/lib.d.mts
CHANGED
|
@@ -588,6 +588,15 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
588
588
|
rpcAvailable: z$1.ZodBoolean;
|
|
589
589
|
detectedAt: z$1.ZodNumber;
|
|
590
590
|
}, z$1.core.$loose>>;
|
|
591
|
+
webPanels: z$1.ZodOptional<z$1.ZodObject<{
|
|
592
|
+
panels: z$1.ZodArray<z$1.ZodObject<{
|
|
593
|
+
id: z$1.ZodString;
|
|
594
|
+
title: z$1.ZodString;
|
|
595
|
+
url: z$1.ZodString;
|
|
596
|
+
embed: z$1.ZodBoolean;
|
|
597
|
+
}, z$1.core.$strip>>;
|
|
598
|
+
updatedAt: z$1.ZodNumber;
|
|
599
|
+
}, z$1.core.$strip>>;
|
|
591
600
|
}, z$1.core.$strip>;
|
|
592
601
|
type DaemonState = z$1.infer<typeof DaemonStateSchema>;
|
|
593
602
|
type ClaudeAuthState = ClaudeAuthState$1;
|
|
@@ -707,6 +716,7 @@ type Metadata = {
|
|
|
707
716
|
*/
|
|
708
717
|
terminalId?: string;
|
|
709
718
|
codexThreadId?: string;
|
|
719
|
+
piSessionId?: string;
|
|
710
720
|
tools?: string[];
|
|
711
721
|
slashCommands?: string[];
|
|
712
722
|
mcpServers?: Array<{
|
|
@@ -1291,6 +1301,11 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1291
1301
|
* own line, so a launcher sends the matching session event only when this
|
|
1292
1302
|
* says the turn-end did not carry it).
|
|
1293
1303
|
*/
|
|
1304
|
+
/**
|
|
1305
|
+
* B-495: close the turn a fork backfill left open. History, not a live
|
|
1306
|
+
* turn end — so no `turn-ended` tap (board analyzer, completion hooks).
|
|
1307
|
+
*/
|
|
1308
|
+
closeReplayedClaudeTurn(): void;
|
|
1294
1309
|
closeClaudeSessionTurn(status?: SessionTurnEndStatus, meta?: {
|
|
1295
1310
|
error?: string;
|
|
1296
1311
|
}): boolean;
|
|
@@ -1453,6 +1468,26 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1453
1468
|
private startSmartReconnect;
|
|
1454
1469
|
}
|
|
1455
1470
|
|
|
1471
|
+
/**
|
|
1472
|
+
* B-510: machine web panels — local web pages a person may need to look at
|
|
1473
|
+
* (noVNC, an agent-browser dashboard, Grafana, a dev server), declared ONLY in
|
|
1474
|
+
* this machine's `~/.happy/settings.json` (`webPanels`) and mirrored to the web
|
|
1475
|
+
* through `daemonState.webPanels`. Spec: specs/2026-09-machine-web-panels.md.
|
|
1476
|
+
*
|
|
1477
|
+
* The web, RPC and server have no write path (same rule as `todoProvider`):
|
|
1478
|
+
* the URL is opened by the viewer's browser, so whoever can write it chooses
|
|
1479
|
+
* what the user's browser loads. Only the machine owner can.
|
|
1480
|
+
*
|
|
1481
|
+
* Nothing is proxied: the viewer's browser connects to the URL directly.
|
|
1482
|
+
*/
|
|
1483
|
+
interface WebPanel {
|
|
1484
|
+
id: string;
|
|
1485
|
+
title: string;
|
|
1486
|
+
url: string;
|
|
1487
|
+
/** false = the web only offers "open in new window" (site forbids framing). */
|
|
1488
|
+
embed: boolean;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1456
1491
|
/**
|
|
1457
1492
|
* The backends the daemon can spawn as a remote session.
|
|
1458
1493
|
*
|
|
@@ -1691,6 +1726,9 @@ declare class ApiMachineClient {
|
|
|
1691
1726
|
private claudeAuthState;
|
|
1692
1727
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1693
1728
|
private agentHibernationIdleMs;
|
|
1729
|
+
/** B-510: last normalized `webPanels` (null = never set → field not written). */
|
|
1730
|
+
private webPanels;
|
|
1731
|
+
private webPanelsSignatureSent;
|
|
1694
1732
|
private rateLimitPushChain;
|
|
1695
1733
|
private readonly rateLimitPublisher;
|
|
1696
1734
|
private rpcHandlerManager;
|
|
@@ -1770,6 +1808,12 @@ declare class ApiMachineClient {
|
|
|
1770
1808
|
* `daemonState.agentHibernation` capability. Call before connect().
|
|
1771
1809
|
*/
|
|
1772
1810
|
setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
|
|
1811
|
+
/**
|
|
1812
|
+
* B-510: mirror the local `webPanels` declaration into daemonState. Every
|
|
1813
|
+
* daemonState write is a CAS + DB write + broadcast, so an unchanged list
|
|
1814
|
+
* (same signature as the last one sent) writes nothing.
|
|
1815
|
+
*/
|
|
1816
|
+
setWebPanels(panels: WebPanel[]): Promise<void>;
|
|
1773
1817
|
private publishAgentHibernation;
|
|
1774
1818
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
1775
1819
|
setClaudeAuthHandlers(handlers: {
|
|
@@ -1862,7 +1906,7 @@ interface PushToken {
|
|
|
1862
1906
|
createdAt: number;
|
|
1863
1907
|
updatedAt: number;
|
|
1864
1908
|
}
|
|
1865
|
-
type SessionNotificationKind = 'done' | 'permission' | 'question';
|
|
1909
|
+
type SessionNotificationKind = 'done' | 'permission' | 'question' | 'attention';
|
|
1866
1910
|
declare class PushNotificationClient {
|
|
1867
1911
|
private readonly token;
|
|
1868
1912
|
private readonly baseUrl;
|
|
@@ -1897,6 +1941,23 @@ declare class PushNotificationClient {
|
|
|
1897
1941
|
metadata: Metadata | null | undefined;
|
|
1898
1942
|
data?: Record<string, any>;
|
|
1899
1943
|
}): void;
|
|
1944
|
+
/**
|
|
1945
|
+
* B-510 `request_human` / `very-happy attention --session`: an awaited
|
|
1946
|
+
* push-event `attention` (title "Needs you", body = the reason, data.url =
|
|
1947
|
+
* panel deep link or the session). A server that predates the kind answers
|
|
1948
|
+
* 400; then the same push goes out as `question`, so the person is still
|
|
1949
|
+
* reached (compat matrix in specs/2026-09-machine-web-panels.md).
|
|
1950
|
+
*/
|
|
1951
|
+
sendAttention(params: {
|
|
1952
|
+
sessionId: string;
|
|
1953
|
+
reason: string;
|
|
1954
|
+
url: string;
|
|
1955
|
+
sessionTitle?: string;
|
|
1956
|
+
}): Promise<{
|
|
1957
|
+
sent: boolean;
|
|
1958
|
+
kind?: SessionNotificationKind;
|
|
1959
|
+
error?: string;
|
|
1960
|
+
}>;
|
|
1900
1961
|
}
|
|
1901
1962
|
|
|
1902
1963
|
/**
|