very-happy-cli 0.2.166 → 0.2.167
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-20VHOXwb.cjs → AcpBackend-D1IKJGz_.cjs} +3 -3
- package/dist/{AcpBackend-tRWk7yi7.mjs → AcpBackend-kFZlee5E.mjs} +3 -3
- package/dist/{BasePermissionHandler-COKc4pmt.cjs → BasePermissionHandler-DHxYAK5L.cjs} +1 -1
- package/dist/{BasePermissionHandler-CDCLIrZJ.mjs → BasePermissionHandler-DS0kRTNI.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-BDVKvooR.mjs → BaseReasoningProcessor-BRtCCt7q.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-DAGQdkNp.cjs → BaseReasoningProcessor-CsjVdt_H.cjs} +1 -1
- package/dist/{agentHome-2IbIjKCa.mjs → agentHome-Ct-VXFeG.mjs} +4 -4
- package/dist/{agentHome-KVWj6nCl.cjs → agentHome-DeAWzhSe.cjs} +4 -4
- package/dist/{api-DnNL5fLw.cjs → api-BZYLRDM9.cjs} +88 -10
- package/dist/{api-Cmz3XS4P.mjs → api-CReZazeT.mjs} +88 -10
- package/dist/{apiMachine-DeoQ8QbZ.cjs → apiMachine-BgMxGPsR.cjs} +50 -15
- package/dist/{apiMachine-B6ySCFe0.mjs → apiMachine-CWndf1Vn.mjs} +50 -15
- package/dist/{attachmentContent-DPWxHgX4.cjs → attachmentContent-HcJqFQW8.cjs} +2 -2
- package/dist/{attachmentContent-CTXapi-_.mjs → attachmentContent-j875mwU7.mjs} +2 -2
- package/dist/{attachmentLimits-BfgKV5iE.cjs → attachmentLimits-BEYEEBm8.cjs} +13 -1
- package/dist/{attachmentLimits-C1PCCM79.mjs → attachmentLimits-CxG3T18E.mjs} +13 -1
- package/dist/{auth-BMaBjRAj.mjs → auth-BIHuc7vY.mjs} +10 -10
- package/dist/{auth-pzWIFdOD.mjs → auth-CFS9Lfgv.mjs} +5 -5
- package/dist/{auth-D4-eQz85.cjs → auth-Myr2Q42x.cjs} +10 -10
- package/dist/{auth-ietHtvwu.cjs → auth-VzWpbo5P.cjs} +5 -5
- package/dist/{auto-DOWTQDPa.cjs → auto-Bf6Dr7_o.cjs} +14 -14
- package/dist/{auto-DL75Dx3I.mjs → auto-Df9-zmuN.mjs} +14 -14
- package/dist/{bootstrap-XE8A7Ut2.mjs → bootstrap-BSOxYpaP.mjs} +2 -2
- package/dist/{bootstrap-BpXIc2wn.cjs → bootstrap-Dj8WBiR2.cjs} +2 -2
- package/dist/{browser-DDFi1T8C.mjs → browser-BCFIHOvo.mjs} +1 -1
- package/dist/{browser-CcG8GLRV.cjs → browser-BoCV40yC.cjs} +1 -1
- package/dist/{claudeLocal-DXBXwIOG.cjs → claudeLocal-CGsq7Kul.cjs} +5 -5
- package/dist/{claudeLocal-DmM5Oyhv.mjs → claudeLocal-D5-eA9SC.mjs} +5 -5
- package/dist/{claudeLocalLauncher-Cs4eUC3P.mjs → claudeLocalLauncher-C9Cc438l.mjs} +10 -10
- package/dist/{claudeLocalLauncher-C41Y6Kp4.cjs → claudeLocalLauncher-Cf9QeYDT.cjs} +10 -10
- package/dist/{claudeSessionFork-Cs0I3eGI.cjs → claudeSessionFork-Byd8zD1U.cjs} +1 -1
- package/dist/{claudeSessionFork-BdLnc2Hv.mjs → claudeSessionFork-CMzAva8G.mjs} +1 -1
- package/dist/{client-JISJx2f-.cjs → client-BKnKRLSt.cjs} +3 -3
- package/dist/{client-GjTnsq6F.mjs → client-C7FYMer0.mjs} +2 -2
- package/dist/{client-DJ0kX_8M.cjs → client-D0T5-6Ds.cjs} +2 -2
- package/dist/{client-CbK33y_s.mjs → client-Dsfy_SAb.mjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +14 -14
- package/dist/codex/happyMcpStdioBridge.mjs +14 -14
- package/dist/{codexAppServerClient-CldXEojt.mjs → codexAppServerClient-Dd_4TxHv.mjs} +4 -4
- package/dist/{codexAppServerClient-BTjn2ZCZ.cjs → codexAppServerClient-TiW9OBk4.cjs} +4 -4
- package/dist/{codexCommand-DjMU-Ijf.mjs → codexCommand-BZSr4MKI.mjs} +137 -56
- package/dist/{codexCommand-BpD0N1F7.cjs → codexCommand-Bxryqh90.cjs} +137 -56
- package/dist/{config-DjSJKatx.mjs → config-C_Pj7yxV.mjs} +3 -3
- package/dist/{config-DuLL0Ppe.cjs → config-DXPash-r.cjs} +3 -3
- package/dist/{configuration-B0cb3xA3.cjs → configuration-C3piBtxY.cjs} +1 -1
- package/dist/{configuration-D2v3puap.mjs → configuration-WspKd2C2.mjs} +2 -2
- package/dist/{connect-B7JWEzyg.cjs → connect-BN-IBElA.cjs} +13 -13
- package/dist/{connect-CnNNyM9I.mjs → connect-DGPZs5px.mjs} +13 -13
- package/dist/{context-DjfqLWzE.mjs → context-Cr6a3NTg.mjs} +1 -1
- package/dist/{context-BFUpYT39.cjs → context-Jrq4-eCZ.cjs} +1 -1
- package/dist/{controlClient-CmnHGcyl.cjs → controlClient-BI6Fw3fQ.cjs} +18 -3
- package/dist/{controlClient-BMUJfUeF.mjs → controlClient-DTheOlvC.mjs} +18 -4
- package/dist/{createSessionMetadata-DU0bCg2m.mjs → createSessionMetadata-BEZ4DIDA.mjs} +57 -5
- package/dist/{createSessionMetadata-DbfRBhRu.cjs → createSessionMetadata-zQSz3hgk.cjs} +56 -3
- package/dist/defaultPermissionMode-Cif_RHGb.mjs +191 -0
- package/dist/defaultPermissionMode-DNKNzk7l.cjs +197 -0
- package/dist/{deterministicJson-D-WPUrZb.mjs → deterministicJson-BMMifViN.mjs} +8 -8
- package/dist/{deterministicJson-Dp3TVyap.cjs → deterministicJson-C7O2ulKY.cjs} +8 -8
- package/dist/{doctor-CkJmdPbi.cjs → doctor-BykBaMTr.cjs} +6 -6
- package/dist/{doctor-BlXXyQ1L.mjs → doctor-D1KKyPzB.mjs} +6 -6
- package/dist/{downloadTarget-CiQqRIc-.cjs → downloadTarget-CWTb2-EM.cjs} +6 -6
- package/dist/{downloadTarget-DjSwMHun.mjs → downloadTarget-Cp48jrIP.mjs} +6 -6
- package/dist/{ensureDaemonRunning-CAQag1zE.mjs → ensureDaemonRunning-Ba5fYoxb.mjs} +5 -5
- package/dist/{ensureDaemonRunning-C_aIOhgG.cjs → ensureDaemonRunning-CCxX7MoP.cjs} +5 -5
- package/dist/{handleResumeCommand-Ci7wacT-.mjs → handleResumeCommand-BTUGlNjB.mjs} +5 -5
- package/dist/{handleResumeCommand-6KzBGDnl.cjs → handleResumeCommand-yPdDQHqz.cjs} +5 -5
- package/dist/{index-CaFCAlX8.cjs → index-BjhKqDa0.cjs} +3 -3
- package/dist/{index-HQsigW_J.mjs → index-C3_83bqS.mjs} +3 -3
- package/dist/{index-WGCT6SSV.mjs → index-CE2GgPbr.mjs} +34 -34
- package/dist/{index-DQplgo0W.mjs → index-D8m8Ripb.mjs} +4 -4
- package/dist/{index-DBmNwMX9.cjs → index-DifM62wX.cjs} +33 -33
- package/dist/{index-DEKIgZUo.cjs → index-PNMQPKhz.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-oJUvsFu9.mjs → install-C0-QFn9s.mjs} +3 -3
- package/dist/{install-CejEiRGW.cjs → install-CqZVeze8.cjs} +3 -3
- package/dist/lib.cjs +11 -11
- package/dist/lib.d.cts +61 -0
- package/dist/lib.d.mts +61 -0
- package/dist/lib.mjs +11 -11
- package/dist/{lidState-BfximpjX.mjs → lidState-B2ZxdREe.mjs} +1 -1
- package/dist/{lidState-D8BmnJV1.cjs → lidState-Bc2K9H9l.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Ct1aXwqd.mjs → localHappyAgentAuth-B5XPEMwk.mjs} +1 -1
- package/dist/{localHappyAgentAuth-d7B6S_o7.cjs → localHappyAgentAuth-T5GOvRha.cjs} +1 -1
- package/dist/{logger-JTcJU-uL.cjs → logger-B_MWPbZz.cjs} +2 -2
- package/dist/{logger-BpQcwNnt.mjs → logger-CbBv3q_b.mjs} +2 -2
- package/dist/{machineMetadata-BBg_Njw3.cjs → machineMetadata-BafS4JY8.cjs} +4 -3
- package/dist/{machineMetadata-CBdxABeI.mjs → machineMetadata-DHg238U4.mjs} +4 -3
- package/dist/{main-C16fOGgn.cjs → main-DNrA0qBy.cjs} +45 -45
- package/dist/{main-B5b1gA3K.mjs → main-DXAK0n7x.mjs} +45 -45
- package/dist/{manager-BQ4flvQZ.mjs → manager-BEsI4qt3.mjs} +9 -3
- package/dist/{manager-Cly8xVIR.cjs → manager-HrEj442o.cjs} +8 -2
- package/dist/{mcp-BnNiBBax.cjs → mcp-AvPOhDXy.cjs} +14 -14
- package/dist/{mcp-DGNWgVdv.mjs → mcp-BotAjCdD.mjs} +14 -14
- package/dist/mirrorProtocol-BdcN6QlN.cjs +1270 -0
- package/dist/mirrorProtocol-BwHm8odn.mjs +1247 -0
- package/dist/{package-C1XvUQFy.cjs → package-C9ZP9bpX.cjs} +7 -7
- package/dist/{package-BqwrPxL0.mjs → package-DU1DxhH9.mjs} +7 -7
- package/dist/{peerTools-DPvbcs8V.cjs → peerTools-Dkbu7gag.cjs} +4 -4
- package/dist/{peerTools-CeCe-3lk.mjs → peerTools-os2DVjA0.mjs} +4 -4
- package/dist/{persistence-2Xp_o6x6.cjs → persistence-BYGl0QYw.cjs} +147 -25
- package/dist/{persistence-B9LmhAE2.mjs → persistence-ON0zpHfb.mjs} +123 -12
- package/dist/{piRunnerArgs-7FaTyNOq.mjs → piRunnerArgs-CYsnT9sV.mjs} +1 -1
- package/dist/{piRunnerArgs-DI29dDNo.cjs → piRunnerArgs-DpbvstUX.cjs} +1 -1
- package/dist/{piRuntime-R8XVChxK.cjs → piRuntime-CDnILlCd.cjs} +1 -1
- package/dist/{piRuntime-0qEK5AqE.mjs → piRuntime-CmEid-wu.mjs} +1 -1
- package/dist/{piTerminal-zcQKc8Sp.mjs → piTerminal-0eNlXSlL.mjs} +16 -16
- package/dist/{piTerminal-Ccj0KNPr.cjs → piTerminal-B57TgMON.cjs} +16 -16
- package/dist/{rateLimitWindows-C2Jk3Ih7.cjs → rateLimitWindows-CusGIqlq.cjs} +1 -1
- package/dist/{rateLimitWindows-Dhfhbtqu.mjs → rateLimitWindows-vZ9Bo7aT.mjs} +1 -1
- package/dist/{registerCommonHandlers-DdfGsFbM.mjs → registerCommonHandlers-B0PVff2U.mjs} +2 -2
- package/dist/{registerCommonHandlers-Aha_KfM3.cjs → registerCommonHandlers-DVYB3iVn.cjs} +2 -2
- package/dist/{registerKillSessionHandler-DboQlGcH.mjs → registerKillSessionHandler-BJMHJHXe.mjs} +14 -9
- package/dist/{registerKillSessionHandler-CjitOpUA.cjs → registerKillSessionHandler-BwXGKtg_.cjs} +14 -9
- package/dist/{remoteSessionClient-B2DtWuNP.mjs → remoteSessionClient-BzPXSC21.mjs} +5 -5
- package/dist/{remoteSessionClient-BwI8rpQw.cjs → remoteSessionClient-PyUAIhwK.cjs} +5 -5
- package/dist/{reportProgressTool-DnAD8wOa.mjs → reportProgressTool-BvB13EwC.mjs} +1 -1
- package/dist/{reportProgressTool-B-Rcy0s3.cjs → reportProgressTool-D4KB_4cP.cjs} +1 -1
- package/dist/{run-Bh66Xs40.cjs → run-BC8jzq_h.cjs} +323 -37
- package/dist/{run-DPEwJpQR.mjs → run-O2M8LsWf.mjs} +322 -36
- package/dist/{runClaude-C-lJdAKD.cjs → runClaude-C7jPa8VP.cjs} +87 -25
- package/dist/{runClaude-DLr_nBzw.mjs → runClaude-DGkr5E7s.mjs} +87 -25
- package/dist/{runClaudeDeps-vWWLod7J.cjs → runClaudeDeps-5kzncqME.cjs} +100 -31
- package/dist/{runClaudeDeps-C7JV7nXG.mjs → runClaudeDeps-CX_TxS78.mjs} +105 -36
- package/dist/{runGemini-o-CUSayc.cjs → runGemini-BfYA4Uqc.cjs} +32 -32
- package/dist/{runGemini-tH6sLw-G.mjs → runGemini-CwmGBH3L.mjs} +32 -32
- package/dist/{runOpenClaw-C5DZvVhn.mjs → runOpenClaw-BYAPYFyL.mjs} +16 -16
- package/dist/{runOpenClaw-D24f35l0.cjs → runOpenClaw-C72jut7v.cjs} +16 -16
- package/dist/{sandbox-TJZJ6ngw.cjs → sandbox-Bqkp8IT7.cjs} +4 -4
- package/dist/{sandbox-BaL1aslA.mjs → sandbox-DlVnK1Vi.mjs} +4 -4
- package/dist/{selfCheck-Dugi0Nk_.cjs → selfCheck-B4lLZplk.cjs} +34 -34
- package/dist/selfCheck-DYTGBdIO.mjs +84 -0
- package/dist/{send-DDcJ3ayi.mjs → send-B5bWW9Tl.mjs} +8 -8
- package/dist/{send-CkWOSYmU.cjs → send-BCwS6n_s.cjs} +8 -8
- package/dist/{server-CUjRvQSd.mjs → server-CEJfRQfj.mjs} +4 -4
- package/dist/{server-7qFQ8J2u.cjs → server-CFWZehnC.cjs} +6 -6
- package/dist/{sessionLock-DqVyHFAQ.mjs → sessionLock-AwOYsKT7.mjs} +12 -4
- package/dist/{sessionLock-DfhNICyS.cjs → sessionLock-LBWNjpHf.cjs} +12 -3
- package/dist/{sessionModeFile-CIznKD7O.cjs → sessionModeFile-CyPuZRIU.cjs} +1 -1
- package/dist/{sessionModeFile-M4OpiyrF.mjs → sessionModeFile-fvFn1JVG.mjs} +1 -1
- package/dist/{sessionOps-BnaEaOKs.mjs → sessionOps-DZRH4-hV.mjs} +4 -4
- package/dist/{sessionOps-DOyy4gkY.cjs → sessionOps-DzbZI3Eq.cjs} +4 -4
- package/dist/{sessionScanner-CcuOn9uU.mjs → sessionScanner-Q_Ei2flB.mjs} +3 -3
- package/dist/{sessionScanner-Cu1yKlj4.cjs → sessionScanner-i-cgwFVw.cjs} +3 -3
- package/dist/{sessions-C9O91rL1.mjs → sessions-DAmjMAZN.mjs} +9 -9
- package/dist/{sessions-BQgk5Kw8.cjs → sessions-DYK5hD4T.cjs} +9 -9
- package/dist/{setupOfflineReconnection-Byy8aeKT.mjs → setupOfflineReconnection-BfDBxNdo.mjs} +2 -2
- package/dist/{setupOfflineReconnection-DFmQ8s6I.cjs → setupOfflineReconnection-C2LO3hSP.cjs} +2 -2
- package/dist/{spawn-EZ2yrtWd.mjs → spawn-BmjG5j5Y.mjs} +13 -13
- package/dist/{spawn-BS7LPmSm.cjs → spawn-GK_sXE8h.cjs} +13 -13
- package/dist/{spawnHappyCLI-BAa49m0q.mjs → spawnHappyCLI-B2h0P4b5.mjs} +1 -1
- package/dist/{spawnHappyCLI-DyaldIe5.cjs → spawnHappyCLI-J4iEhfyZ.cjs} +1 -1
- package/dist/{specialCommands-CCWtwIGZ.mjs → specialCommands-DisVxagO.mjs} +3 -3
- package/dist/{specialCommands-DouFaJ_0.cjs → specialCommands-DmJMKspE.cjs} +3 -3
- package/dist/{startFileWatcher-Dfs4whzr.mjs → startFileWatcher-CeK1k5gt.mjs} +1 -1
- package/dist/{startFileWatcher-DQbbypJv.cjs → startFileWatcher-xKo8AoYl.cjs} +1 -1
- package/dist/{sync-x_lI_3j_.cjs → sync-Bvc-vh6C.cjs} +1 -1
- package/dist/{sync-BLpH13Kb.mjs → sync-CCwYpJMS.mjs} +1 -1
- package/dist/{systemPrompt-BanyDihy.mjs → systemPrompt-BNIkP3tR.mjs} +1 -1
- package/dist/{systemPrompt-4erwILTB.cjs → systemPrompt-DwOddbuG.cjs} +1 -1
- package/dist/{teams-D6BOT3lR.mjs → teams-DRrLBcys.mjs} +6 -6
- package/dist/{teams-DzetlGWC.cjs → teams-GHMCRZOw.cjs} +6 -6
- package/dist/{time-T0YmeOhS.cjs → time-BXvtjhe9.cjs} +1 -1
- package/dist/{time-CfDKj6Bx.mjs → time-PG5Dfwdv.mjs} +1 -1
- package/dist/{titleGenerator-CoMxqKfP.cjs → titleGenerator-B07bZA0V.cjs} +2 -2
- package/dist/{titleGenerator-ChImQ4q-.mjs → titleGenerator-CIzfpfZW.mjs} +1 -1
- package/dist/{todo-CZZebKZg.cjs → todo-B0aeoNu3.cjs} +5 -5
- package/dist/{todo-SVtYxGON.mjs → todo-CfL7SBFc.mjs} +5 -5
- package/dist/{tools-3X2z3YDe.mjs → tools-D91mq5Ib.mjs} +1 -1
- package/dist/{tools-IJ0TAcJs.cjs → tools-DJIANHSh.cjs} +1 -1
- package/dist/{uninstall-CypD-kr1.mjs → uninstall-5xz3Xvhf.mjs} +3 -3
- package/dist/{uninstall-CqqCWj7w.cjs → uninstall-AtzOfdrj.cjs} +3 -3
- package/package.json +7 -7
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +0 -4
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +0 -7
- package/dist/mirrorProtocol-BEGk2--0.cjs +0 -266
- package/dist/mirrorProtocol-h5WHpdhh.mjs +0 -248
- package/dist/selfCheck-DPi4lqme.mjs +0 -84
package/dist/lib.d.cts
CHANGED
|
@@ -367,6 +367,7 @@ type Session = {
|
|
|
367
367
|
declare const MachineMetadataSchema: z$1.ZodObject<{
|
|
368
368
|
teamsVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
369
369
|
teamLaunchVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
|
+
worktreeVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
371
|
host: z$1.ZodString;
|
|
371
372
|
platform: z$1.ZodString;
|
|
372
373
|
happyCliVersion: z$1.ZodString;
|
|
@@ -582,6 +583,11 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
582
583
|
}, z$1.core.$strip>>;
|
|
583
584
|
}, z$1.core.$strip>>;
|
|
584
585
|
}, z$1.core.$strip>>;
|
|
586
|
+
agentHibernation: z$1.ZodOptional<z$1.ZodObject<{
|
|
587
|
+
idleMs: z$1.ZodNumber;
|
|
588
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
589
|
+
detectedAt: z$1.ZodNumber;
|
|
590
|
+
}, z$1.core.$loose>>;
|
|
585
591
|
}, z$1.core.$strip>;
|
|
586
592
|
type DaemonState = z$1.infer<typeof DaemonStateSchema>;
|
|
587
593
|
type ClaudeAuthState = ClaudeAuthState$1;
|
|
@@ -714,6 +720,11 @@ type Metadata = {
|
|
|
714
720
|
queueCancellation?: boolean;
|
|
715
721
|
/** Explicit feature negotiation; old CLIs omit this field. */
|
|
716
722
|
capabilities?: string[];
|
|
723
|
+
/** B-586: session started inside a linked git worktree (snapshot at start). Old clients ignore it. */
|
|
724
|
+
worktree?: {
|
|
725
|
+
branch: string | null;
|
|
726
|
+
root: string;
|
|
727
|
+
} | null;
|
|
717
728
|
homeDir: string;
|
|
718
729
|
happyHomeDir: string;
|
|
719
730
|
happyLibDir: string;
|
|
@@ -725,6 +736,19 @@ type Metadata = {
|
|
|
725
736
|
lifecycleStateSince?: number;
|
|
726
737
|
archivedBy?: string;
|
|
727
738
|
archiveReason?: string;
|
|
739
|
+
/**
|
|
740
|
+
* B-587: written by a wrapper that exited by idle hibernation (offline, not
|
|
741
|
+
* archived); cleared by the next wrapper on reconnect. `seq` = its message
|
|
742
|
+
* cursor — records above it are replayed on wake. Old clients ignore it.
|
|
743
|
+
*/
|
|
744
|
+
hibernation?: {
|
|
745
|
+
at: number;
|
|
746
|
+
seq: number;
|
|
747
|
+
idleMs: number;
|
|
748
|
+
v: 1;
|
|
749
|
+
};
|
|
750
|
+
/** B-587: user opted this session out of idle hibernation (web ⋯ menu). */
|
|
751
|
+
keepAwake?: boolean;
|
|
728
752
|
flavor?: string;
|
|
729
753
|
sandbox?: SandboxConfig | null;
|
|
730
754
|
dangerouslySkipPermissions?: boolean | null;
|
|
@@ -1286,6 +1310,28 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1286
1310
|
} | {
|
|
1287
1311
|
type: 'ready';
|
|
1288
1312
|
}, id?: string): void;
|
|
1313
|
+
/** Last user/agent activity this wrapper saw (spec §2.1). */
|
|
1314
|
+
private lastActivity;
|
|
1315
|
+
private inboundFrozen;
|
|
1316
|
+
private frozenInbound;
|
|
1317
|
+
private heartbeatsMuted;
|
|
1318
|
+
private lastHeartbeat;
|
|
1319
|
+
get lastHeartbeatAt(): number;
|
|
1320
|
+
muteHeartbeats(): void;
|
|
1321
|
+
unmuteHeartbeats(): void;
|
|
1322
|
+
private inboundRoutedDuringCommit;
|
|
1323
|
+
noteActivity(now?: number): void;
|
|
1324
|
+
get lastActivityAt(): number;
|
|
1325
|
+
/** The message cursor (highest seq this wrapper has seen). */
|
|
1326
|
+
get messageCursor(): number;
|
|
1327
|
+
/** Start watching for inbound routed during the hibernation commit window. */
|
|
1328
|
+
beginHibernationCommit(): void;
|
|
1329
|
+
/** Was any inbound message routed since beginHibernationCommit()? */
|
|
1330
|
+
inboundRoutedSinceCommit(): boolean;
|
|
1331
|
+
/** Stop routing inbound messages; the next wrapper replays them (spec §3/§4). */
|
|
1332
|
+
freezeInbound(): void;
|
|
1333
|
+
/** An aborted hibernation: route whatever arrived while frozen, in order. */
|
|
1334
|
+
unfreezeInbound(): void;
|
|
1289
1335
|
/**
|
|
1290
1336
|
* Send a ping message to keep the connection alive
|
|
1291
1337
|
*/
|
|
@@ -1379,6 +1425,13 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1379
1425
|
body: unknown;
|
|
1380
1426
|
}>>;
|
|
1381
1427
|
updateMetadata(handler: (metadata: Metadata) => Metadata): void;
|
|
1428
|
+
/**
|
|
1429
|
+
* B-587: the same write, awaitable with a ceiling — the hibernation stamp
|
|
1430
|
+
* must land before `session-end`. Resolves false on timeout (the write
|
|
1431
|
+
* itself keeps retrying in the background, exactly like updateMetadata).
|
|
1432
|
+
*/
|
|
1433
|
+
updateMetadataAndWait(handler: (metadata: Metadata) => Metadata, timeoutMs?: number): Promise<boolean>;
|
|
1434
|
+
private writeMetadata;
|
|
1382
1435
|
/**
|
|
1383
1436
|
* Update session agent state
|
|
1384
1437
|
* @param handler - Handler function that returns the updated agent state
|
|
@@ -1628,6 +1681,8 @@ declare class ApiMachineClient {
|
|
|
1628
1681
|
private cliUpdateState;
|
|
1629
1682
|
private cliUpdatePushChain;
|
|
1630
1683
|
private claudeAuthState;
|
|
1684
|
+
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1685
|
+
private agentHibernationIdleMs;
|
|
1631
1686
|
private rateLimitPushChain;
|
|
1632
1687
|
private readonly rateLimitPublisher;
|
|
1633
1688
|
private rpcHandlerManager;
|
|
@@ -1702,6 +1757,12 @@ declare class ApiMachineClient {
|
|
|
1702
1757
|
* caller checks the echoed state and re-sends on the next probe).
|
|
1703
1758
|
*/
|
|
1704
1759
|
setClaudeAuthState(state: ClaudeAuthState): Promise<boolean>;
|
|
1760
|
+
/**
|
|
1761
|
+
* B-587: `agent-hibernation-set {idleMs}` (0 = off) and the
|
|
1762
|
+
* `daemonState.agentHibernation` capability. Call before connect().
|
|
1763
|
+
*/
|
|
1764
|
+
setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
|
|
1765
|
+
private publishAgentHibernation;
|
|
1705
1766
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
1706
1767
|
setClaudeAuthHandlers(handlers: {
|
|
1707
1768
|
probe: () => Promise<ClaudeAuthState>;
|
package/dist/lib.d.mts
CHANGED
|
@@ -367,6 +367,7 @@ type Session = {
|
|
|
367
367
|
declare const MachineMetadataSchema: z$1.ZodObject<{
|
|
368
368
|
teamsVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
369
369
|
teamLaunchVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
|
+
worktreeVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
371
|
host: z$1.ZodString;
|
|
371
372
|
platform: z$1.ZodString;
|
|
372
373
|
happyCliVersion: z$1.ZodString;
|
|
@@ -582,6 +583,11 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
582
583
|
}, z$1.core.$strip>>;
|
|
583
584
|
}, z$1.core.$strip>>;
|
|
584
585
|
}, z$1.core.$strip>>;
|
|
586
|
+
agentHibernation: z$1.ZodOptional<z$1.ZodObject<{
|
|
587
|
+
idleMs: z$1.ZodNumber;
|
|
588
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
589
|
+
detectedAt: z$1.ZodNumber;
|
|
590
|
+
}, z$1.core.$loose>>;
|
|
585
591
|
}, z$1.core.$strip>;
|
|
586
592
|
type DaemonState = z$1.infer<typeof DaemonStateSchema>;
|
|
587
593
|
type ClaudeAuthState = ClaudeAuthState$1;
|
|
@@ -714,6 +720,11 @@ type Metadata = {
|
|
|
714
720
|
queueCancellation?: boolean;
|
|
715
721
|
/** Explicit feature negotiation; old CLIs omit this field. */
|
|
716
722
|
capabilities?: string[];
|
|
723
|
+
/** B-586: session started inside a linked git worktree (snapshot at start). Old clients ignore it. */
|
|
724
|
+
worktree?: {
|
|
725
|
+
branch: string | null;
|
|
726
|
+
root: string;
|
|
727
|
+
} | null;
|
|
717
728
|
homeDir: string;
|
|
718
729
|
happyHomeDir: string;
|
|
719
730
|
happyLibDir: string;
|
|
@@ -725,6 +736,19 @@ type Metadata = {
|
|
|
725
736
|
lifecycleStateSince?: number;
|
|
726
737
|
archivedBy?: string;
|
|
727
738
|
archiveReason?: string;
|
|
739
|
+
/**
|
|
740
|
+
* B-587: written by a wrapper that exited by idle hibernation (offline, not
|
|
741
|
+
* archived); cleared by the next wrapper on reconnect. `seq` = its message
|
|
742
|
+
* cursor — records above it are replayed on wake. Old clients ignore it.
|
|
743
|
+
*/
|
|
744
|
+
hibernation?: {
|
|
745
|
+
at: number;
|
|
746
|
+
seq: number;
|
|
747
|
+
idleMs: number;
|
|
748
|
+
v: 1;
|
|
749
|
+
};
|
|
750
|
+
/** B-587: user opted this session out of idle hibernation (web ⋯ menu). */
|
|
751
|
+
keepAwake?: boolean;
|
|
728
752
|
flavor?: string;
|
|
729
753
|
sandbox?: SandboxConfig | null;
|
|
730
754
|
dangerouslySkipPermissions?: boolean | null;
|
|
@@ -1286,6 +1310,28 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1286
1310
|
} | {
|
|
1287
1311
|
type: 'ready';
|
|
1288
1312
|
}, id?: string): void;
|
|
1313
|
+
/** Last user/agent activity this wrapper saw (spec §2.1). */
|
|
1314
|
+
private lastActivity;
|
|
1315
|
+
private inboundFrozen;
|
|
1316
|
+
private frozenInbound;
|
|
1317
|
+
private heartbeatsMuted;
|
|
1318
|
+
private lastHeartbeat;
|
|
1319
|
+
get lastHeartbeatAt(): number;
|
|
1320
|
+
muteHeartbeats(): void;
|
|
1321
|
+
unmuteHeartbeats(): void;
|
|
1322
|
+
private inboundRoutedDuringCommit;
|
|
1323
|
+
noteActivity(now?: number): void;
|
|
1324
|
+
get lastActivityAt(): number;
|
|
1325
|
+
/** The message cursor (highest seq this wrapper has seen). */
|
|
1326
|
+
get messageCursor(): number;
|
|
1327
|
+
/** Start watching for inbound routed during the hibernation commit window. */
|
|
1328
|
+
beginHibernationCommit(): void;
|
|
1329
|
+
/** Was any inbound message routed since beginHibernationCommit()? */
|
|
1330
|
+
inboundRoutedSinceCommit(): boolean;
|
|
1331
|
+
/** Stop routing inbound messages; the next wrapper replays them (spec §3/§4). */
|
|
1332
|
+
freezeInbound(): void;
|
|
1333
|
+
/** An aborted hibernation: route whatever arrived while frozen, in order. */
|
|
1334
|
+
unfreezeInbound(): void;
|
|
1289
1335
|
/**
|
|
1290
1336
|
* Send a ping message to keep the connection alive
|
|
1291
1337
|
*/
|
|
@@ -1379,6 +1425,13 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1379
1425
|
body: unknown;
|
|
1380
1426
|
}>>;
|
|
1381
1427
|
updateMetadata(handler: (metadata: Metadata) => Metadata): void;
|
|
1428
|
+
/**
|
|
1429
|
+
* B-587: the same write, awaitable with a ceiling — the hibernation stamp
|
|
1430
|
+
* must land before `session-end`. Resolves false on timeout (the write
|
|
1431
|
+
* itself keeps retrying in the background, exactly like updateMetadata).
|
|
1432
|
+
*/
|
|
1433
|
+
updateMetadataAndWait(handler: (metadata: Metadata) => Metadata, timeoutMs?: number): Promise<boolean>;
|
|
1434
|
+
private writeMetadata;
|
|
1382
1435
|
/**
|
|
1383
1436
|
* Update session agent state
|
|
1384
1437
|
* @param handler - Handler function that returns the updated agent state
|
|
@@ -1628,6 +1681,8 @@ declare class ApiMachineClient {
|
|
|
1628
1681
|
private cliUpdateState;
|
|
1629
1682
|
private cliUpdatePushChain;
|
|
1630
1683
|
private claudeAuthState;
|
|
1684
|
+
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1685
|
+
private agentHibernationIdleMs;
|
|
1631
1686
|
private rateLimitPushChain;
|
|
1632
1687
|
private readonly rateLimitPublisher;
|
|
1633
1688
|
private rpcHandlerManager;
|
|
@@ -1702,6 +1757,12 @@ declare class ApiMachineClient {
|
|
|
1702
1757
|
* caller checks the echoed state and re-sends on the next probe).
|
|
1703
1758
|
*/
|
|
1704
1759
|
setClaudeAuthState(state: ClaudeAuthState): Promise<boolean>;
|
|
1760
|
+
/**
|
|
1761
|
+
* B-587: `agent-hibernation-set {idleMs}` (0 = off) and the
|
|
1762
|
+
* `daemonState.agentHibernation` capability. Call before connect().
|
|
1763
|
+
*/
|
|
1764
|
+
setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
|
|
1765
|
+
private publishAgentHibernation;
|
|
1705
1766
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
1706
1767
|
setClaudeAuthHandlers(handlers: {
|
|
1707
1768
|
probe: () => Promise<ClaudeAuthState>;
|
package/dist/lib.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient } from './api-
|
|
2
|
-
export { l as logger } from './logger-
|
|
3
|
-
export { c as configuration } from './configuration-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient } from './api-CReZazeT.mjs';
|
|
2
|
+
export { l as logger } from './logger-CbBv3q_b.mjs';
|
|
3
|
+
export { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
4
4
|
export { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
5
5
|
import 'axios';
|
|
6
|
-
import './lidState-
|
|
6
|
+
import './lidState-B2ZxdREe.mjs';
|
|
7
7
|
import './authRelay-DSAvg1uv.mjs';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import 'tweetnacl';
|
|
@@ -11,13 +11,13 @@ import 'os';
|
|
|
11
11
|
import 'child_process';
|
|
12
12
|
import 'node:events';
|
|
13
13
|
import 'socket.io-client';
|
|
14
|
-
import './attachmentLimits-
|
|
14
|
+
import './attachmentLimits-CxG3T18E.mjs';
|
|
15
15
|
import 'zod';
|
|
16
16
|
import './index-B0HEEYGh.mjs';
|
|
17
17
|
import '@paralleldrive/cuid2';
|
|
18
18
|
import './limits-DIo7rEBR.mjs';
|
|
19
|
-
import './time-
|
|
20
|
-
import './registerCommonHandlers-
|
|
19
|
+
import './time-PG5Dfwdv.mjs';
|
|
20
|
+
import './registerCommonHandlers-B0PVff2U.mjs';
|
|
21
21
|
import 'util';
|
|
22
22
|
import 'fs/promises';
|
|
23
23
|
import 'crypto';
|
|
@@ -25,10 +25,10 @@ import 'path';
|
|
|
25
25
|
import 'cross-spawn';
|
|
26
26
|
import './projectPath-BTBIMB57.mjs';
|
|
27
27
|
import 'url';
|
|
28
|
-
import './sync-
|
|
28
|
+
import './sync-CCwYpJMS.mjs';
|
|
29
29
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
30
|
-
import './controlClient-
|
|
31
|
-
import './persistence-
|
|
30
|
+
import './controlClient-DTheOlvC.mjs';
|
|
31
|
+
import './persistence-ON0zpHfb.mjs';
|
|
32
32
|
import 'node:fs/promises';
|
|
33
33
|
import 'node:fs';
|
|
34
34
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
@@ -36,4 +36,4 @@ import 'chalk';
|
|
|
36
36
|
import 'node:util';
|
|
37
37
|
import 'node:path';
|
|
38
38
|
import 'node:os';
|
|
39
|
-
import './package-
|
|
39
|
+
import './package-DU1DxhH9.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-CbBv3q_b.mjs';
|
|
2
2
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
3
3
|
import os from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
@@ -4,7 +4,7 @@ import { join } from 'node:path';
|
|
|
4
4
|
import tweetnacl from 'tweetnacl';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { c as credentialRelayProblem, d as decodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
7
|
-
import { c as configuration } from './configuration-
|
|
7
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
8
8
|
|
|
9
9
|
const AgentCredentialsSchema = z.object({
|
|
10
10
|
token: z.string().min(1),
|
|
@@ -6,7 +6,7 @@ var path = require('node:path');
|
|
|
6
6
|
var tweetnacl = require('tweetnacl');
|
|
7
7
|
var z = require('zod');
|
|
8
8
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
9
|
-
var configuration = require('./configuration-
|
|
9
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
10
10
|
|
|
11
11
|
const AgentCredentialsSchema = z.z.object({
|
|
12
12
|
token: z.z.string().min(1),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_util = require('node:util');
|
|
5
|
-
var configuration = require('./configuration-
|
|
5
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var path = require('node:path');
|
|
8
8
|
|
|
@@ -238,7 +238,7 @@ async function listDaemonLogFiles(limit = 50) {
|
|
|
238
238
|
return { file, path: fullPath, modified: stats.mtime };
|
|
239
239
|
}).sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
240
240
|
try {
|
|
241
|
-
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-
|
|
241
|
+
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-BYGl0QYw.cjs'); }).then(function (n) { return n.persistence; });
|
|
242
242
|
const state = await readDaemonState();
|
|
243
243
|
if (!state) {
|
|
244
244
|
return logs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { inspect } from 'node:util';
|
|
3
|
-
import { d as appendPrivateFileSync, c as configuration } from './configuration-
|
|
3
|
+
import { d as appendPrivateFileSync, c as configuration } from './configuration-WspKd2C2.mjs';
|
|
4
4
|
import { existsSync, readdirSync, statSync } from 'node:fs';
|
|
5
5
|
import { join, basename } from 'node:path';
|
|
6
6
|
|
|
@@ -236,7 +236,7 @@ async function listDaemonLogFiles(limit = 50) {
|
|
|
236
236
|
return { file, path: fullPath, modified: stats.mtime };
|
|
237
237
|
}).sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
238
238
|
try {
|
|
239
|
-
const { readDaemonState } = await import('./persistence-
|
|
239
|
+
const { readDaemonState } = await import('./persistence-ON0zpHfb.mjs').then(function (n) { return n.E; });
|
|
240
240
|
const state = await readDaemonState();
|
|
241
241
|
if (!state) {
|
|
242
242
|
return logs;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var os = require('node:os');
|
|
4
|
-
var _package = require('./package-
|
|
5
|
-
var configuration = require('./configuration-
|
|
4
|
+
var _package = require('./package-C9ZP9bpX.cjs');
|
|
5
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
6
6
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
7
7
|
var detectCLI = require('./detectCLI-DR9ZaN6B.cjs');
|
|
8
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
8
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-T5GOvRha.cjs');
|
|
9
9
|
|
|
10
10
|
function buildInitialMachineMetadata(cliAvailability) {
|
|
11
11
|
const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
|
|
12
12
|
return {
|
|
13
13
|
teamsVersion: 1,
|
|
14
14
|
teamLaunchVersion: 1,
|
|
15
|
+
worktreeVersion: 1,
|
|
15
16
|
host: os.hostname() + hostSuffix,
|
|
16
17
|
platform: os.platform(),
|
|
17
18
|
happyCliVersion: _package.packageJson.version,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
-
import { p as packageJson } from './package-
|
|
3
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { p as packageJson } from './package-DU1DxhH9.mjs';
|
|
3
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
4
4
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
5
5
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
6
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
6
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-B5XPEMwk.mjs';
|
|
7
7
|
|
|
8
8
|
function buildInitialMachineMetadata(cliAvailability) {
|
|
9
9
|
const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
|
|
10
10
|
return {
|
|
11
11
|
teamsVersion: 1,
|
|
12
12
|
teamLaunchVersion: 1,
|
|
13
|
+
worktreeVersion: 1,
|
|
13
14
|
host: os.hostname() + hostSuffix,
|
|
14
15
|
platform: os.platform(),
|
|
15
16
|
happyCliVersion: packageJson.version,
|