very-happy-cli 0.2.165 → 0.2.166
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/README.md +1 -1
- package/dist/{AcpBackend-DCfNt9bD.cjs → AcpBackend-20VHOXwb.cjs} +3 -3
- package/dist/{AcpBackend-C11FnVw5.mjs → AcpBackend-tRWk7yi7.mjs} +3 -3
- package/dist/{AcpSessionManager-BQnDJvct.mjs → AcpSessionManager-B7FIrsys.mjs} +1 -1
- package/dist/{AcpSessionManager-9yN2iH4b.cjs → AcpSessionManager-Zf00QnlL.cjs} +1 -1
- package/dist/{BasePermissionHandler-CwJ48yiB.mjs → BasePermissionHandler-CDCLIrZJ.mjs} +1 -1
- package/dist/{BasePermissionHandler-BwQHxl6M.cjs → BasePermissionHandler-COKc4pmt.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-ClF2g1qz.mjs → BaseReasoningProcessor-BDVKvooR.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-81lf_M8G.cjs → BaseReasoningProcessor-DAGQdkNp.cjs} +1 -1
- package/dist/{agentGuidance-CQuNlNx8.mjs → agentGuidance-BDYt2Qy2.mjs} +4 -2
- package/dist/{agentGuidance-B5NATuFa.cjs → agentGuidance-BtBx2xxE.cjs} +4 -1
- package/dist/{agentHome-DvR176E5.mjs → agentHome-2IbIjKCa.mjs} +4 -4
- package/dist/{agentHome-D3Nn82kI.cjs → agentHome-KVWj6nCl.cjs} +4 -4
- package/dist/{api-DTVPUE7g.mjs → api-Cmz3XS4P.mjs} +14 -12
- package/dist/{api-AzdzTKFs.cjs → api-DnNL5fLw.cjs} +14 -12
- package/dist/{apiMachine-BQ-b4Lu3.mjs → apiMachine-B6ySCFe0.mjs} +2137 -65
- package/dist/{apiMachine-B_cJldfa.cjs → apiMachine-DeoQ8QbZ.cjs} +2134 -62
- package/dist/{attachmentContent-dzIs-wis.mjs → attachmentContent-CTXapi-_.mjs} +2 -2
- package/dist/{attachmentContent-muDCe4Gy.cjs → attachmentContent-DPWxHgX4.cjs} +2 -2
- package/dist/{attachmentLimits-eJZ4ZBjF.cjs → attachmentLimits-BfgKV5iE.cjs} +28 -2
- package/dist/{attachmentLimits-B8nzhw-i.mjs → attachmentLimits-C1PCCM79.mjs} +28 -2
- package/dist/{auth-Jtmvh1w4.mjs → auth-BMaBjRAj.mjs} +8 -8
- package/dist/{auth-DtP-B4gf.cjs → auth-D4-eQz85.cjs} +8 -8
- package/dist/{auth-CfLd3phE.cjs → auth-ietHtvwu.cjs} +5 -5
- package/dist/{auth-BY5ujhGn.mjs → auth-pzWIFdOD.mjs} +5 -5
- package/dist/{auto-DjWfR1UB.mjs → auto-DL75Dx3I.mjs} +83 -21
- package/dist/{auto-ClNnbSoF.cjs → auto-DOWTQDPa.cjs} +84 -20
- package/dist/{bootstrap-B1dMZA-u.cjs → bootstrap-BpXIc2wn.cjs} +2 -2
- package/dist/{bootstrap-D_ExGrY2.mjs → bootstrap-XE8A7Ut2.mjs} +2 -2
- package/dist/{browser-_gV7tcPs.cjs → browser-CcG8GLRV.cjs} +1 -1
- package/dist/{browser-mwzpOmcw.mjs → browser-DDFi1T8C.mjs} +1 -1
- package/dist/{claudeLocal-G5UmJ81F.cjs → claudeLocal-DXBXwIOG.cjs} +6 -6
- package/dist/{claudeLocal-BeHToEK5.mjs → claudeLocal-DmM5Oyhv.mjs} +6 -6
- package/dist/{claudeLocalLauncher-B4y2BsmO.cjs → claudeLocalLauncher-C41Y6Kp4.cjs} +14 -11
- package/dist/{claudeLocalLauncher-Cq6bqAT4.mjs → claudeLocalLauncher-Cs4eUC3P.mjs} +14 -11
- package/dist/{claudeSessionFork-CokUhS4r.mjs → claudeSessionFork-BdLnc2Hv.mjs} +1 -1
- package/dist/{claudeSessionFork-CDJq_b9r.cjs → claudeSessionFork-Cs0I3eGI.cjs} +1 -1
- package/dist/{client-BwaWdlCm.mjs → client-CbK33y_s.mjs} +3 -3
- package/dist/{client-uN9d6Git.cjs → client-DJ0kX_8M.cjs} +2 -2
- package/dist/{client-CJZKBZCE.mjs → client-GjTnsq6F.mjs} +2 -2
- package/dist/{client-Do7cGPEq.cjs → client-JISJx2f-.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +23 -18
- package/dist/codex/happyMcpStdioBridge.mjs +22 -17
- package/dist/{codexAppServerClient-BuSdeUxT.cjs → codexAppServerClient-BTjn2ZCZ.cjs} +46 -2
- package/dist/{codexAppServerClient-B0QaMQsC.mjs → codexAppServerClient-CldXEojt.mjs} +47 -3
- package/dist/{codexCommand-YdYmykAR.cjs → codexCommand-BpD0N1F7.cjs} +71 -51
- package/dist/{codexCommand-C3gdjMAw.mjs → codexCommand-DjMU-Ijf.mjs} +71 -51
- package/dist/{config-CGCIFRCN.mjs → config-DjSJKatx.mjs} +3 -3
- package/dist/{config-ChoHFnfO.cjs → config-DuLL0Ppe.cjs} +3 -3
- package/dist/{configuration-BE61XNsg.cjs → configuration-B0cb3xA3.cjs} +1 -1
- package/dist/{configuration-L1qcGTFM.mjs → configuration-D2v3puap.mjs} +1 -1
- package/dist/{connect-D5IKfcfd.cjs → connect-B7JWEzyg.cjs} +13 -13
- package/dist/{connect-CFD0Em6a.mjs → connect-CnNNyM9I.mjs} +13 -13
- package/dist/{context-3WVw8qPz.cjs → context-BFUpYT39.cjs} +1 -1
- package/dist/{context-DaCCB4cm.mjs → context-DjfqLWzE.mjs} +1 -1
- package/dist/{controlClient-Ci7HTMII.mjs → controlClient-BMUJfUeF.mjs} +13 -6
- package/dist/{controlClient-RWTlQA4_.cjs → controlClient-CmnHGcyl.cjs} +13 -5
- package/dist/{createSessionMetadata-CWR-AB2A.mjs → createSessionMetadata-DU0bCg2m.mjs} +2 -2
- package/dist/{createSessionMetadata-CPGTztXP.cjs → createSessionMetadata-DbfRBhRu.cjs} +2 -2
- package/dist/{deterministicJson-BBwG-Ase.mjs → deterministicJson-D-WPUrZb.mjs} +36 -52
- package/dist/{deterministicJson-C4Jo2RWy.cjs → deterministicJson-Dp3TVyap.cjs} +41 -59
- package/dist/{doctor-CAC6qY9Z.mjs → doctor-BlXXyQ1L.mjs} +6 -6
- package/dist/{doctor-ZOQLE5AH.cjs → doctor-CkJmdPbi.cjs} +6 -6
- package/dist/{assistantTools-BsrG3PD-.cjs → downloadTarget-CiQqRIc-.cjs} +44 -6
- package/dist/{assistantTools-DPGga5lM.mjs → downloadTarget-DjSwMHun.mjs} +45 -8
- package/dist/{ensureDaemonRunning-b1pvEFcS.mjs → ensureDaemonRunning-CAQag1zE.mjs} +5 -5
- package/dist/{ensureDaemonRunning-mIgX2vnc.cjs → ensureDaemonRunning-C_aIOhgG.cjs} +5 -5
- package/dist/{handleResumeCommand-DGNhbv-3.cjs → handleResumeCommand-6KzBGDnl.cjs} +5 -5
- package/dist/{handleResumeCommand-CTGbZkCL.mjs → handleResumeCommand-Ci7wacT-.mjs} +5 -5
- package/dist/{index-vVWpCoTr.mjs → index-B0HEEYGh.mjs} +22 -5
- package/dist/{index-DqlyNgt4.cjs → index-C9hI8a10.cjs} +26 -4
- package/dist/{index-BzIxE0Eu.cjs → index-CaFCAlX8.cjs} +3 -3
- package/dist/{index-DrSPR59N.cjs → index-DBmNwMX9.cjs} +39 -38
- package/dist/{index-DIodyAqF.cjs → index-DEKIgZUo.cjs} +4 -4
- package/dist/{index-Diu6HdWH.mjs → index-DQplgo0W.mjs} +4 -4
- package/dist/{index-BgzjPv07.mjs → index-HQsigW_J.mjs} +3 -3
- package/dist/{index-DjtBengz.mjs → index-WGCT6SSV.mjs} +40 -39
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BO_W7VhL.mjs → install-BdvKiOQw.mjs} +2 -0
- package/dist/{install-DrUQk2DJ.cjs → install-CejEiRGW.cjs} +3 -3
- package/dist/{install-Cs5qAPrB.cjs → install-Cf6AFSWC.cjs} +2 -0
- package/dist/{install-Cp_aB-NQ.mjs → install-oJUvsFu9.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +55 -2
- package/dist/lib.d.mts +55 -2
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-BLHLmhwd.mjs → lidState-BfximpjX.mjs} +1 -1
- package/dist/{lidState-z9ekRpZu.cjs → lidState-D8BmnJV1.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BWvmc_Hg.mjs → localHappyAgentAuth-Ct1aXwqd.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BCx0y1qW.cjs → localHappyAgentAuth-d7B6S_o7.cjs} +1 -1
- package/dist/{logger-CknSVkIe.mjs → logger-BpQcwNnt.mjs} +2 -2
- package/dist/{logger-D0hkk7Vo.cjs → logger-JTcJU-uL.cjs} +2 -2
- package/dist/{machineMetadata-BDCYOXQg.cjs → machineMetadata-BBg_Njw3.cjs} +3 -3
- package/dist/{machineMetadata-Cj1DoFot.mjs → machineMetadata-CBdxABeI.mjs} +3 -3
- package/dist/{main-CKUfkVG_.mjs → main-B5b1gA3K.mjs} +44 -44
- package/dist/{main-COAPGIso.cjs → main-C16fOGgn.cjs} +44 -44
- package/dist/{mcp-BILnw4si.cjs → mcp-BnNiBBax.cjs} +24 -19
- package/dist/{mcp-DeYUfpo8.mjs → mcp-DGNWgVdv.mjs} +23 -18
- package/dist/{mirrorProtocol-BUtmg1ws.cjs → mirrorProtocol-BEGk2--0.cjs} +80 -0
- package/dist/{mirrorProtocol-BNLtoWjO.mjs → mirrorProtocol-h5WHpdhh.mjs} +79 -1
- package/dist/{package-VIUXrYZ1.mjs → package-BqwrPxL0.mjs} +7 -7
- package/dist/{package-UkmvSFsg.cjs → package-C1XvUQFy.cjs} +7 -7
- package/dist/{peerTools-SWITnkqz.mjs → peerTools-CeCe-3lk.mjs} +4 -4
- package/dist/{peerTools-CttfOxti.cjs → peerTools-DPvbcs8V.cjs} +4 -4
- package/dist/{persistence-C6ztVW1W.cjs → persistence-2Xp_o6x6.cjs} +3 -3
- package/dist/{persistence-DujtUH94.mjs → persistence-B9LmhAE2.mjs} +3 -3
- package/dist/{piRunnerArgs-BVJHIjlk.mjs → piRunnerArgs-7FaTyNOq.mjs} +1 -1
- package/dist/{piRunnerArgs-tBQg6xDw.cjs → piRunnerArgs-DI29dDNo.cjs} +1 -1
- package/dist/{piRuntime-DKFA8u8t.mjs → piRuntime-0qEK5AqE.mjs} +1 -1
- package/dist/{piRuntime-DZzjF9It.cjs → piRuntime-R8XVChxK.cjs} +1 -1
- package/dist/{piTerminal-t5pQHCPT.cjs → piTerminal-Ccj0KNPr.cjs} +17 -17
- package/dist/{piTerminal-BTSaFlpV.mjs → piTerminal-zcQKc8Sp.mjs} +17 -17
- package/dist/precheckCompat-CWOi5c9L.cjs +29 -0
- package/dist/precheckCompat-DeEbilbr.mjs +26 -0
- package/dist/rateLimitWindows-C2Jk3Ih7.cjs +258 -0
- package/dist/rateLimitWindows-Dhfhbtqu.mjs +248 -0
- package/dist/{registerCommonHandlers--8ds2auE.cjs → registerCommonHandlers-Aha_KfM3.cjs} +2 -2
- package/dist/{registerCommonHandlers-BR0J4g64.mjs → registerCommonHandlers-DdfGsFbM.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CI23l8aJ.cjs → registerKillSessionHandler-CjitOpUA.cjs} +6 -6
- package/dist/{registerKillSessionHandler-Czz0tdki.mjs → registerKillSessionHandler-DboQlGcH.mjs} +6 -6
- package/dist/{remoteSessionClient-DCAUHgPz.mjs → remoteSessionClient-B2DtWuNP.mjs} +5 -5
- package/dist/{remoteSessionClient-BAkIwM2S.cjs → remoteSessionClient-BwI8rpQw.cjs} +5 -5
- package/dist/{tools-mWqsE6ji.cjs → reportProgressTool-B-Rcy0s3.cjs} +73 -9
- package/dist/{tools-BVRoGcQH.mjs → reportProgressTool-DnAD8wOa.mjs} +67 -10
- package/dist/{run-CkKujjn8.cjs → run-Bh66Xs40.cjs} +268 -118
- package/dist/{run-B75qm2I6.mjs → run-DPEwJpQR.mjs} +266 -116
- package/dist/{runClaude-B1T9DLLi.cjs → runClaude-C-lJdAKD.cjs} +25 -20
- package/dist/{runClaude-aBfBweec.mjs → runClaude-DLr_nBzw.mjs} +25 -20
- package/dist/{runClaudeDeps-BOrPP4J1.mjs → runClaudeDeps-C7JV7nXG.mjs} +47 -37
- package/dist/{runClaudeDeps-BGjNGfuZ.cjs → runClaudeDeps-vWWLod7J.cjs} +44 -35
- package/dist/{runGemini-BuAA_OQb.cjs → runGemini-o-CUSayc.cjs} +42 -35
- package/dist/{runGemini-a-V7JE-J.mjs → runGemini-tH6sLw-G.mjs} +42 -35
- package/dist/{runOpenClaw-DUSwXg1A.mjs → runOpenClaw-C5DZvVhn.mjs} +18 -18
- package/dist/{runOpenClaw-BBVffIh9.cjs → runOpenClaw-D24f35l0.cjs} +18 -18
- package/dist/{sandbox-Brb_5wzc.mjs → sandbox-BaL1aslA.mjs} +4 -4
- package/dist/{sandbox-Fd2G5yaq.cjs → sandbox-TJZJ6ngw.cjs} +4 -4
- package/dist/selfCheck-DPi4lqme.mjs +84 -0
- package/dist/{selfCheck-NuJKMInJ.cjs → selfCheck-Dugi0Nk_.cjs} +34 -34
- package/dist/{send-4dgHKC3u.cjs → send-CkWOSYmU.cjs} +8 -8
- package/dist/{send-DEQJiq_x.mjs → send-DDcJ3ayi.mjs} +8 -8
- package/dist/{server-DWGcDmHG.cjs → server-7qFQ8J2u.cjs} +6 -6
- package/dist/{server-C6AlUFkw.mjs → server-CUjRvQSd.mjs} +4 -4
- package/dist/{sessionLock-B1GgaO1q.cjs → sessionLock-DfhNICyS.cjs} +2 -2
- package/dist/{sessionLock-Dm8QyGo4.mjs → sessionLock-DqVyHFAQ.mjs} +2 -2
- package/dist/{sessionModeFile-BvOEJ4Fl.cjs → sessionModeFile-CIznKD7O.cjs} +1 -1
- package/dist/{sessionModeFile-CuNAWCKL.mjs → sessionModeFile-M4OpiyrF.mjs} +1 -1
- package/dist/{sessionOps-DG5MMEp_.mjs → sessionOps-BnaEaOKs.mjs} +4 -4
- package/dist/{sessionOps-JP64uJmc.cjs → sessionOps-DOyy4gkY.cjs} +4 -4
- package/dist/{sessionScanner-DqSk5Ol_.mjs → sessionScanner-CcuOn9uU.mjs} +75 -19
- package/dist/{sessionScanner-BBPEgJ5S.cjs → sessionScanner-Cu1yKlj4.cjs} +75 -19
- package/dist/{sessions-DgJuw_i0.cjs → sessions-BQgk5Kw8.cjs} +9 -9
- package/dist/{sessions-4isbBAWi.mjs → sessions-C9O91rL1.mjs} +9 -9
- package/dist/{setupOfflineReconnection-_MoZtsro.mjs → setupOfflineReconnection-Byy8aeKT.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CKJKVIUS.cjs → setupOfflineReconnection-DFmQ8s6I.cjs} +2 -2
- package/dist/{spawn-CshERWbY.cjs → spawn-BS7LPmSm.cjs} +13 -12
- package/dist/{spawn-BTOG4tTm.mjs → spawn-EZ2yrtWd.mjs} +13 -12
- package/dist/{spawnAgents-Czi2VDzj.mjs → spawnAgents-HDaE3C0-.mjs} +1 -1
- package/dist/{spawnAgents-McixdtV1.cjs → spawnAgents-vglexX9N.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dc4xYm8P.mjs → spawnHappyCLI-BAa49m0q.mjs} +1 -1
- package/dist/{spawnHappyCLI-Dd5_8Vex.cjs → spawnHappyCLI-DyaldIe5.cjs} +1 -1
- package/dist/specialCommands-CCWtwIGZ.mjs +93 -0
- package/dist/specialCommands-DouFaJ_0.cjs +96 -0
- package/dist/{startFileWatcher-1LedLBY-.cjs → startFileWatcher-DQbbypJv.cjs} +1 -1
- package/dist/{startFileWatcher-B0VlG-Fn.mjs → startFileWatcher-Dfs4whzr.mjs} +1 -1
- package/dist/{streamRelay-C0AffuX6.cjs → streamRelay-Ce9sgcOV.cjs} +1 -1
- package/dist/{streamRelay-BzMEEvJU.mjs → streamRelay-Iogsh51a.mjs} +1 -1
- package/dist/{sync-Dfm6K2te.mjs → sync-BLpH13Kb.mjs} +1 -1
- package/dist/{sync-DwUUGGFz.cjs → sync-x_lI_3j_.cjs} +1 -1
- package/dist/{systemPrompt-CB1Ls0AE.cjs → systemPrompt-4erwILTB.cjs} +3 -3
- package/dist/{systemPrompt-D41Zw1a3.mjs → systemPrompt-BanyDihy.mjs} +3 -3
- package/dist/{teams-D8Ly3i6u.mjs → teams-D6BOT3lR.mjs} +7 -7
- package/dist/{teams-NWv2ji16.cjs → teams-DzetlGWC.cjs} +7 -7
- package/dist/{time-v1Y_qEJp.mjs → time-CfDKj6Bx.mjs} +1 -1
- package/dist/{time-BbzJ7PJQ.cjs → time-T0YmeOhS.cjs} +1 -1
- package/dist/{titleGenerator-BhoblAQY.mjs → titleGenerator-ChImQ4q-.mjs} +1 -1
- package/dist/{titleGenerator-cH6IkPRi.cjs → titleGenerator-CoMxqKfP.cjs} +2 -2
- package/dist/{todo-D1hgWV6d.cjs → todo-CZZebKZg.cjs} +6 -6
- package/dist/{todo-CuNct-fw.mjs → todo-SVtYxGON.mjs} +6 -6
- package/dist/{tools-jof0Bu54.mjs → tools-3X2z3YDe.mjs} +1 -1
- package/dist/{tools-c2fb0CF5.cjs → tools-IJ0TAcJs.cjs} +1 -1
- package/dist/transcriptCursor-B7T_gkQ0.mjs +102 -0
- package/dist/transcriptCursor-DcXGLeSc.cjs +106 -0
- package/dist/{uninstall-VPH5GfrA.cjs → uninstall-CqqCWj7w.cjs} +3 -3
- package/dist/{uninstall-BB7WYYAk.mjs → uninstall-CypD-kr1.mjs} +3 -3
- package/package.json +7 -7
- package/scripts/terminal_status_forwarder.cjs +89 -0
- package/dist/selfCheck-BgwJ3NGS.mjs +0 -84
- package/dist/specialCommands-BSqhYg5X.mjs +0 -52
- package/dist/specialCommands-DSsTeRej.cjs +0 -54
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { writeFile, rename, unlink } from 'node:fs/promises';
|
|
3
3
|
import { join, basename } from 'node:path';
|
|
4
|
-
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './attachmentLimits-
|
|
5
|
-
import { e as ensurePrivateDirectory, b as hardenPrivateFile } from './configuration-
|
|
4
|
+
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './attachmentLimits-C1PCCM79.mjs';
|
|
5
|
+
import { e as ensurePrivateDirectory, b as hardenPrivateFile } from './configuration-D2v3puap.mjs';
|
|
6
6
|
|
|
7
7
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
8
8
|
"image/jpeg",
|
|
@@ -3,8 +3,8 @@
|
|
|
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 attachmentLimits = require('./attachmentLimits-
|
|
7
|
-
var configuration = require('./configuration-
|
|
6
|
+
var attachmentLimits = require('./attachmentLimits-BfgKV5iE.cjs');
|
|
7
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
8
8
|
|
|
9
9
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
10
10
|
"image/jpeg",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var z = require('zod');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-C9hI8a10.cjs');
|
|
5
5
|
|
|
6
6
|
z.z.object({
|
|
7
7
|
teamsVersion: z.z.number().int().positive().optional(),
|
|
@@ -115,6 +115,21 @@ const ClosedTerminalRecordSchema = z.z.object({
|
|
|
115
115
|
attachTmux: z.z.string().optional(),
|
|
116
116
|
closedAt: z.z.number()
|
|
117
117
|
});
|
|
118
|
+
const RateLimitsStateSchema = z.z.object({
|
|
119
|
+
v: z.z.literal(1),
|
|
120
|
+
updatedAt: z.z.number(),
|
|
121
|
+
providers: z.z.record(z.z.string(), z.z.object({
|
|
122
|
+
observedAt: z.z.number(),
|
|
123
|
+
status: z.z.string().optional(),
|
|
124
|
+
windows: z.z.array(z.z.object({
|
|
125
|
+
kind: z.z.string(),
|
|
126
|
+
usedPercent: z.z.number(),
|
|
127
|
+
resetsAt: z.z.number().nullable(),
|
|
128
|
+
windowMinutes: z.z.number().optional(),
|
|
129
|
+
observedAt: z.z.number()
|
|
130
|
+
}))
|
|
131
|
+
}))
|
|
132
|
+
});
|
|
118
133
|
z.z.object({
|
|
119
134
|
agentVersions: index.AgentVersionsSchema.optional(),
|
|
120
135
|
agentVersionEpoch: z.z.number().optional(),
|
|
@@ -198,6 +213,15 @@ z.z.object({
|
|
|
198
213
|
rpcAvailable: z.z.boolean(),
|
|
199
214
|
detectedAt: z.z.number()
|
|
200
215
|
}).optional(),
|
|
216
|
+
/**
|
|
217
|
+
* B-549 capability flag: this daemon answers `history-search` (full-text
|
|
218
|
+
* search over the machine's Claude Code / Codex history, indexed locally).
|
|
219
|
+
* Same trust rule (`detectedAt >= startedAt`); old webs ignore it.
|
|
220
|
+
*/
|
|
221
|
+
historySearch: z.z.object({
|
|
222
|
+
rpcAvailable: z.z.boolean(),
|
|
223
|
+
detectedAt: z.z.number()
|
|
224
|
+
}).optional(),
|
|
201
225
|
/**
|
|
202
226
|
* B-486: can web terminals on this machine be durable? `tmuxAvailable:
|
|
203
227
|
* false` ⇒ every new terminal is a direct shell that dies with the daemon,
|
|
@@ -218,7 +242,9 @@ z.z.object({
|
|
|
218
242
|
* restarts (the server returns the existing row and connect spreads it
|
|
219
243
|
* forward), so a downgraded daemon carries this field along unchanged.
|
|
220
244
|
*/
|
|
221
|
-
claudeAuth: ClaudeAuthStateSchema.optional()
|
|
245
|
+
claudeAuth: ClaudeAuthStateSchema.optional(),
|
|
246
|
+
/** B-555: see RateLimitsStateSchema. Old webs ignore it; old daemons carry it forward unchanged. */
|
|
247
|
+
rateLimits: RateLimitsStateSchema.optional()
|
|
222
248
|
});
|
|
223
249
|
const MessageMetaSchema = z.z.object({
|
|
224
250
|
sentFrom: z.z.string().optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { m as AgentVersionsSchema } from './index-B0HEEYGh.mjs';
|
|
3
3
|
|
|
4
4
|
z.object({
|
|
5
5
|
teamsVersion: z.number().int().positive().optional(),
|
|
@@ -113,6 +113,21 @@ const ClosedTerminalRecordSchema = z.object({
|
|
|
113
113
|
attachTmux: z.string().optional(),
|
|
114
114
|
closedAt: z.number()
|
|
115
115
|
});
|
|
116
|
+
const RateLimitsStateSchema = z.object({
|
|
117
|
+
v: z.literal(1),
|
|
118
|
+
updatedAt: z.number(),
|
|
119
|
+
providers: z.record(z.string(), z.object({
|
|
120
|
+
observedAt: z.number(),
|
|
121
|
+
status: z.string().optional(),
|
|
122
|
+
windows: z.array(z.object({
|
|
123
|
+
kind: z.string(),
|
|
124
|
+
usedPercent: z.number(),
|
|
125
|
+
resetsAt: z.number().nullable(),
|
|
126
|
+
windowMinutes: z.number().optional(),
|
|
127
|
+
observedAt: z.number()
|
|
128
|
+
}))
|
|
129
|
+
}))
|
|
130
|
+
});
|
|
116
131
|
z.object({
|
|
117
132
|
agentVersions: AgentVersionsSchema.optional(),
|
|
118
133
|
agentVersionEpoch: z.number().optional(),
|
|
@@ -196,6 +211,15 @@ z.object({
|
|
|
196
211
|
rpcAvailable: z.boolean(),
|
|
197
212
|
detectedAt: z.number()
|
|
198
213
|
}).optional(),
|
|
214
|
+
/**
|
|
215
|
+
* B-549 capability flag: this daemon answers `history-search` (full-text
|
|
216
|
+
* search over the machine's Claude Code / Codex history, indexed locally).
|
|
217
|
+
* Same trust rule (`detectedAt >= startedAt`); old webs ignore it.
|
|
218
|
+
*/
|
|
219
|
+
historySearch: z.object({
|
|
220
|
+
rpcAvailable: z.boolean(),
|
|
221
|
+
detectedAt: z.number()
|
|
222
|
+
}).optional(),
|
|
199
223
|
/**
|
|
200
224
|
* B-486: can web terminals on this machine be durable? `tmuxAvailable:
|
|
201
225
|
* false` ⇒ every new terminal is a direct shell that dies with the daemon,
|
|
@@ -216,7 +240,9 @@ z.object({
|
|
|
216
240
|
* restarts (the server returns the existing row and connect spreads it
|
|
217
241
|
* forward), so a downgraded daemon carries this field along unchanged.
|
|
218
242
|
*/
|
|
219
|
-
claudeAuth: ClaudeAuthStateSchema.optional()
|
|
243
|
+
claudeAuth: ClaudeAuthStateSchema.optional(),
|
|
244
|
+
/** B-555: see RateLimitsStateSchema. Old webs ignore it; old daemons carry it forward unchanged. */
|
|
245
|
+
rateLimits: RateLimitsStateSchema.optional()
|
|
220
246
|
});
|
|
221
247
|
const MessageMetaSchema = z.object({
|
|
222
248
|
sentFrom: z.string().optional(),
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { readCredentials, readSettings, clearCredentials, clearMachineId } from './persistence-
|
|
3
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
4
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { readCredentials, readSettings, clearCredentials, clearMachineId } from './persistence-B9LmhAE2.mjs';
|
|
3
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-pzWIFdOD.mjs';
|
|
4
|
+
import { c as configuration } from './configuration-D2v3puap.mjs';
|
|
5
5
|
import { existsSync, rmSync } from 'node:fs';
|
|
6
6
|
import { createInterface } from 'node:readline';
|
|
7
|
-
import { c as checkIfDaemonRunningAndCleanupStaleState, a as stopDaemon } from './controlClient-
|
|
8
|
-
import { l as logger } from './logger-
|
|
7
|
+
import { c as checkIfDaemonRunningAndCleanupStaleState, a as stopDaemon } from './controlClient-BMUJfUeF.mjs';
|
|
8
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
9
9
|
import os from 'node:os';
|
|
10
10
|
import { c as credentialRelayProblem } from './authRelay-DSAvg1uv.mjs';
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
import 'zod';
|
|
13
13
|
import 'node:path';
|
|
14
|
-
import './package-
|
|
14
|
+
import './package-BqwrPxL0.mjs';
|
|
15
15
|
import 'node:crypto';
|
|
16
16
|
import 'tweetnacl';
|
|
17
17
|
import 'node:util';
|
|
18
18
|
import 'axios';
|
|
19
|
-
import './time-
|
|
20
|
-
import './browser-
|
|
19
|
+
import './time-CfDKj6Bx.mjs';
|
|
20
|
+
import './browser-DDFi1T8C.mjs';
|
|
21
21
|
import 'open';
|
|
22
22
|
|
|
23
23
|
function localMachineIdentityStatus(machineId) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var persistence = require('./persistence-
|
|
5
|
-
var auth = require('./auth-
|
|
6
|
-
var configuration = require('./configuration-
|
|
4
|
+
var persistence = require('./persistence-2Xp_o6x6.cjs');
|
|
5
|
+
var auth = require('./auth-ietHtvwu.cjs');
|
|
6
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
var node_readline = require('node:readline');
|
|
9
|
-
var controlClient = require('./controlClient-
|
|
10
|
-
var logger = require('./logger-
|
|
9
|
+
var controlClient = require('./controlClient-CmnHGcyl.cjs');
|
|
10
|
+
var logger = require('./logger-JTcJU-uL.cjs');
|
|
11
11
|
var os = require('node:os');
|
|
12
12
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
14
14
|
require('zod');
|
|
15
15
|
require('node:path');
|
|
16
|
-
require('./package-
|
|
16
|
+
require('./package-C1XvUQFy.cjs');
|
|
17
17
|
require('node:crypto');
|
|
18
18
|
require('tweetnacl');
|
|
19
19
|
require('node:util');
|
|
20
20
|
require('axios');
|
|
21
|
-
require('./time-
|
|
22
|
-
require('./browser-
|
|
21
|
+
require('./time-T0YmeOhS.cjs');
|
|
22
|
+
require('./browser-CcG8GLRV.cjs');
|
|
23
23
|
require('open');
|
|
24
24
|
|
|
25
25
|
function localMachineIdentityStatus(machineId) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
4
|
-
var configuration = require('./configuration-
|
|
4
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var tweetnacl = require('tweetnacl');
|
|
7
7
|
var axios = require('axios');
|
|
8
|
-
var time = require('./time-
|
|
9
|
-
var persistence = require('./persistence-
|
|
10
|
-
var browser = require('./browser-
|
|
11
|
-
var logger = require('./logger-
|
|
8
|
+
var time = require('./time-T0YmeOhS.cjs');
|
|
9
|
+
var persistence = require('./persistence-2Xp_o6x6.cjs');
|
|
10
|
+
var browser = require('./browser-CcG8GLRV.cjs');
|
|
11
|
+
var logger = require('./logger-JTcJU-uL.cjs');
|
|
12
12
|
|
|
13
13
|
function generateWebAuthUrl(publicKey) {
|
|
14
14
|
const publicKeyBase64 = authRelay.encodeBase64(publicKey, "base64url");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { e as encodeBase64, c as credentialRelayProblem, f as encodeBase64Url, d as decodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { c as configuration } from './configuration-D2v3puap.mjs';
|
|
3
3
|
import { randomUUID, randomBytes } from 'node:crypto';
|
|
4
4
|
import tweetnacl from 'tweetnacl';
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { d as delay } from './time-
|
|
7
|
-
import { readCredentials, readSettingsOutcome, updateSettings, writeCredentialsLegacy, writeCredentialsDataKey } from './persistence-
|
|
8
|
-
import { o as openBrowser } from './browser-
|
|
9
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { d as delay } from './time-CfDKj6Bx.mjs';
|
|
7
|
+
import { readCredentials, readSettingsOutcome, updateSettings, writeCredentialsLegacy, writeCredentialsDataKey } from './persistence-B9LmhAE2.mjs';
|
|
8
|
+
import { o as openBrowser } from './browser-DDFi1T8C.mjs';
|
|
9
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
10
10
|
|
|
11
11
|
function generateWebAuthUrl(publicKey) {
|
|
12
12
|
const publicKeyBase64 = encodeBase64(publicKey, "base64url");
|
|
@@ -2,49 +2,51 @@ import chalk from 'chalk';
|
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { A as AUTOMATION_NAME_PATTERN, i as isAutomationRunTerminal } from './index-
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
7
|
-
import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv, i as isAutomationsUnavailable, A as AUTOMATIONS_UNAVAILABLE_MESSAGE } from './client-
|
|
5
|
+
import { A as AUTOMATION_NAME_PATTERN, i as isAutomationRunTerminal, a as AUTOMATION_PRECHECK_MAX_TIMEOUT_MS, b as AutomationPrecheckSchema } from './index-B0HEEYGh.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-D2v3puap.mjs';
|
|
7
|
+
import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv, i as isAutomationsUnavailable, A as AUTOMATIONS_UNAVAILABLE_MESSAGE } from './client-GjTnsq6F.mjs';
|
|
8
8
|
import { p as parseDuration, t as triggerFromFlags, d as describeTrigger, a as describeAction } from './template-CiOPa2rd.mjs';
|
|
9
|
-
import { A as AUTOMATION_SKILL, i as installAutomationSkill } from './install-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { A as AUTOMATION_SKILL, i as installAutomationSkill } from './install-BdvKiOQw.mjs';
|
|
10
|
+
import { u as updateAutomationChecked, c as createAutomationChecked } from './precheckCompat-DeEbilbr.mjs';
|
|
11
|
+
import { s as sessionWebUrl } from './sessionOps-BnaEaOKs.mjs';
|
|
12
|
+
import { parseEnvAssignment } from './spawn-EZ2yrtWd.mjs';
|
|
13
|
+
import { S as SPAWN_AGENTS, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES } from './spawnAgents-HDaE3C0-.mjs';
|
|
14
|
+
import { d as delay } from './time-CfDKj6Bx.mjs';
|
|
14
15
|
import 'zod';
|
|
15
16
|
import '@paralleldrive/cuid2';
|
|
16
|
-
import './package-
|
|
17
|
+
import './package-BqwrPxL0.mjs';
|
|
17
18
|
import 'node:fs/promises';
|
|
18
|
-
import './persistence-
|
|
19
|
+
import './persistence-B9LmhAE2.mjs';
|
|
19
20
|
import './authRelay-DSAvg1uv.mjs';
|
|
20
21
|
import 'node:crypto';
|
|
21
22
|
import 'tweetnacl';
|
|
22
|
-
import './logger-
|
|
23
|
+
import './logger-BpQcwNnt.mjs';
|
|
23
24
|
import 'node:util';
|
|
24
25
|
import './resources-BdFBQi8r.mjs';
|
|
25
26
|
import 'axios';
|
|
26
|
-
import './controlClient-
|
|
27
|
+
import './controlClient-BMUJfUeF.mjs';
|
|
27
28
|
import 'socket.io-client';
|
|
28
29
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
29
30
|
import './path-D2wdaNSk.mjs';
|
|
30
|
-
import './claudeSessionFork-
|
|
31
|
+
import './claudeSessionFork-BdLnc2Hv.mjs';
|
|
31
32
|
import 'node:readline';
|
|
32
|
-
import './codexAppServerClient-
|
|
33
|
+
import './codexAppServerClient-CldXEojt.mjs';
|
|
33
34
|
import 'node:child_process';
|
|
34
35
|
import 'cross-spawn';
|
|
35
36
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
36
37
|
import './manager-BQ4flvQZ.mjs';
|
|
37
38
|
import '@anthropic-ai/sandbox-runtime';
|
|
39
|
+
import './rateLimitWindows-Dhfhbtqu.mjs';
|
|
38
40
|
import './codexThreadFork-R76RU5H0.mjs';
|
|
39
|
-
import './createSessionMetadata-
|
|
41
|
+
import './createSessionMetadata-DU0bCg2m.mjs';
|
|
40
42
|
import './projectPath-BTBIMB57.mjs';
|
|
41
43
|
import 'path';
|
|
42
44
|
import 'url';
|
|
43
45
|
import './forkBackfill-DYIjlN1Z.mjs';
|
|
44
46
|
|
|
45
47
|
const AUTO_ACTIONS = ["list", "show", "create", "edit", "pause", "resume", "rm", "run", "fire", "runs", "cancel", "ack", "report", "skill", "install", "uninstall", "help"];
|
|
46
|
-
const VALUE_FLAGS = ["--name", "--rename", "--description", "--machine", "--cron", "--tz", "--every", "--at", "--spawn-dir", "--prompt", "--prompt-file", "--agent", "--model", "--permission-mode", "--sticky-key", "--send-session", "--cwd", "--env", "--timeout", "--concurrency", "--max-runtime", "--payload", "--payload-json", "--payload-file", "--dedupe-key", "--status", "--limit", "--run", "--summary", "--error", "--attention", "--host", "--home"];
|
|
47
|
-
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--all", "--attention", "--help", "-h"];
|
|
48
|
+
const VALUE_FLAGS = ["--name", "--rename", "--description", "--machine", "--cron", "--tz", "--every", "--at", "--spawn-dir", "--prompt", "--prompt-file", "--agent", "--model", "--permission-mode", "--sticky-key", "--send-session", "--cwd", "--env", "--timeout", "--concurrency", "--max-runtime", "--payload", "--payload-json", "--payload-file", "--dedupe-key", "--status", "--limit", "--run", "--summary", "--error", "--attention", "--host", "--home", "--precheck-shell", "--precheck-argv", "--precheck-cwd", "--precheck-timeout"];
|
|
49
|
+
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--all", "--attention", "--precheck-output", "--no-precheck", "--help", "-h"];
|
|
48
50
|
function parseAutoArgs(args) {
|
|
49
51
|
const command = { action: "help", flags: {}, env: [], bools: /* @__PURE__ */ new Set(), argv: [] };
|
|
50
52
|
if (args.length === 0) return command;
|
|
@@ -139,6 +141,52 @@ function actionFromCommand(command, current) {
|
|
|
139
141
|
}
|
|
140
142
|
return { kind: "spawn", agent: flags["--agent"] ?? "claude", directory: resolve(flags["--spawn-dir"]), prompt, ...spawnDetails(command) };
|
|
141
143
|
}
|
|
144
|
+
function precheckFromCommand(command, current) {
|
|
145
|
+
const { flags, bools } = command;
|
|
146
|
+
const shell = flags["--precheck-shell"];
|
|
147
|
+
const argvJson = flags["--precheck-argv"];
|
|
148
|
+
const modifiers = ["--precheck-cwd", "--precheck-timeout"].filter((flag) => flags[flag] !== void 0).concat(bools.has("--precheck-output") ? ["--precheck-output"] : []);
|
|
149
|
+
if (bools.has("--no-precheck")) {
|
|
150
|
+
if (shell !== void 0 || argvJson !== void 0 || modifiers.length) throw new Error("--no-precheck cannot be combined with other --precheck-* options");
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
if (shell === void 0 && argvJson === void 0 && modifiers.length === 0) return void 0;
|
|
154
|
+
if (shell !== void 0 && argvJson !== void 0) throw new Error("Use only one of --precheck-shell and --precheck-argv");
|
|
155
|
+
let base;
|
|
156
|
+
if (shell !== void 0) base = { shell };
|
|
157
|
+
else if (argvJson !== void 0) {
|
|
158
|
+
let argv;
|
|
159
|
+
try {
|
|
160
|
+
argv = JSON.parse(argvJson);
|
|
161
|
+
} catch {
|
|
162
|
+
throw new Error(`--precheck-argv must be a JSON array of strings, e.g. '["./has-new.sh","--since","5m"]'`);
|
|
163
|
+
}
|
|
164
|
+
if (!Array.isArray(argv) || argv.length === 0 || !argv.every((part) => typeof part === "string" && part.length > 0)) throw new Error("--precheck-argv must be a non-empty JSON array of non-empty strings");
|
|
165
|
+
base = { command: argv };
|
|
166
|
+
} else {
|
|
167
|
+
if (!current) throw new Error(`${modifiers.join(", ")} need a precheck: give --precheck-shell <line> or --precheck-argv <json>`);
|
|
168
|
+
base = current;
|
|
169
|
+
}
|
|
170
|
+
let timeoutMs;
|
|
171
|
+
if (flags["--precheck-timeout"] !== void 0) {
|
|
172
|
+
timeoutMs = parseDuration(flags["--precheck-timeout"]);
|
|
173
|
+
if (timeoutMs < 1e3 || timeoutMs > AUTOMATION_PRECHECK_MAX_TIMEOUT_MS) throw new Error(`--precheck-timeout must be between 1s and ${AUTOMATION_PRECHECK_MAX_TIMEOUT_MS / 6e4}m`);
|
|
174
|
+
}
|
|
175
|
+
const precheck = {
|
|
176
|
+
...base,
|
|
177
|
+
...flags["--precheck-cwd"] !== void 0 ? { cwd: flags["--precheck-cwd"] } : {},
|
|
178
|
+
...timeoutMs !== void 0 ? { timeoutMs } : {},
|
|
179
|
+
...bools.has("--precheck-output") ? { includeOutput: true } : {}
|
|
180
|
+
};
|
|
181
|
+
const parsed = AutomationPrecheckSchema.safeParse(precheck);
|
|
182
|
+
if (!parsed.success) throw new Error(`Invalid precheck: ${parsed.error.issues[0]?.message ?? "check the --precheck-* options"}`);
|
|
183
|
+
return parsed.data;
|
|
184
|
+
}
|
|
185
|
+
function describePrecheck(precheck) {
|
|
186
|
+
const what = precheck.shell !== void 0 ? `sh: ${precheck.shell}` : `argv: ${JSON.stringify(precheck.command)}`;
|
|
187
|
+
const extras = [precheck.cwd ? `cwd ${precheck.cwd}` : null, precheck.timeoutMs ? `timeout ${Math.round(precheck.timeoutMs / 1e3)}s` : null, precheck.includeOutput ? "output \u2192 prompt" : null].filter(Boolean);
|
|
188
|
+
return extras.length ? `${what} (${extras.join(", ")})` : what;
|
|
189
|
+
}
|
|
142
190
|
function spawnDetails(command) {
|
|
143
191
|
const { flags, bools } = command;
|
|
144
192
|
if (flags["--agent"] !== void 0 && !SPAWN_AGENTS.includes(flags["--agent"])) throw new Error(`--agent must be one of: ${SPAWN_AGENTS.join(", ")}`);
|
|
@@ -180,6 +228,14 @@ ${chalk.bold("Action (one):")}
|
|
|
180
228
|
--send-session <id> --prompt <text>|--prompt-file <file>
|
|
181
229
|
--script -- <argv\u2026> [--cwd <dir>] [--env K=V]... [--timeout <dur>]
|
|
182
230
|
|
|
231
|
+
${chalk.bold("Precheck (optional, runs before the action; exit 0 runs it, anything else records a skip):")}
|
|
232
|
+
--precheck-shell '<command line>' | --precheck-argv '<json array>'
|
|
233
|
+
[--precheck-cwd <dir>] [--precheck-timeout <dur>] (default 60s, max 10m)
|
|
234
|
+
[--precheck-output] append the precheck's stdout to the spawn/send prompt
|
|
235
|
+
--no-precheck edit: remove the precheck
|
|
236
|
+
A shell line is not template-rendered; read the payload from $VH_AUTOMATION_PAYLOAD.
|
|
237
|
+
Consecutive scheduled skips for the same reason fold into one run shown as \xD7N.
|
|
238
|
+
|
|
183
239
|
${chalk.bold("Options:")}
|
|
184
240
|
--machine <id>|this Executing machine (default: this machine)
|
|
185
241
|
--description <text>
|
|
@@ -204,12 +260,14 @@ function printAutomation(a) {
|
|
|
204
260
|
if (a.description) console.log(` ${a.description}`);
|
|
205
261
|
console.log(` trigger: ${describeTrigger(a.trigger)} next: ${fmtTime(a.nextRunAt)}`);
|
|
206
262
|
console.log(` action: ${describeAction(a.action)}`);
|
|
263
|
+
if (a.precheck) console.log(` precheck: ${describePrecheck(a.precheck)}`);
|
|
207
264
|
console.log(` machine: ${a.machineId} concurrency: ${a.concurrency} max runtime: ${Math.round(a.maxRuntimeMs / 6e4)}m`);
|
|
208
265
|
console.log(` last run: ${fmtTime(a.lastRunAt)} ${a.lastRunStatus ?? ""}`);
|
|
209
266
|
}
|
|
210
267
|
function runLine(run) {
|
|
211
268
|
const status = run.status === "done" ? chalk.green(run.status) : ["failed", "expired"].includes(run.status) ? chalk.red(run.status) : run.status === "running" ? chalk.cyan(run.status) : run.status;
|
|
212
|
-
|
|
269
|
+
const folded = (run.occurrenceCount ?? 1) > 1 ? ` \xD7${run.occurrenceCount}` : "";
|
|
270
|
+
return `${fmtTime(run.createdAt)} ${status.padEnd(9)} ${run.automationName.padEnd(20)} ${run.source.padEnd(8)} ${run.id}${folded}${run.status === "skipped" && run.error ? chalk.dim(` ${run.error}`) : ""}${run.needsAttention ? chalk.yellow(` ! ${run.attentionReason ?? "attention"}`) : ""}`;
|
|
213
271
|
}
|
|
214
272
|
function printRun(run) {
|
|
215
273
|
console.log(runLine(run));
|
|
@@ -311,7 +369,9 @@ async function handleAutoCommand(args) {
|
|
|
311
369
|
...command.flags["--max-runtime"] !== void 0 ? { maxRuntimeMs: parseDuration(command.flags["--max-runtime"]) } : {},
|
|
312
370
|
...command.bools.has("--paused") ? { status: "paused" } : {}
|
|
313
371
|
};
|
|
314
|
-
const
|
|
372
|
+
const precheck = precheckFromCommand(command);
|
|
373
|
+
if (precheck) input.precheck = precheck;
|
|
374
|
+
const automation = await createAutomationChecked(client, input);
|
|
315
375
|
if (json) {
|
|
316
376
|
console.log(JSON.stringify({ automation }));
|
|
317
377
|
return;
|
|
@@ -334,8 +394,10 @@ async function handleAutoCommand(args) {
|
|
|
334
394
|
...command.flags["--concurrency"] !== void 0 ? { concurrency: concurrency(command.flags["--concurrency"]) } : {},
|
|
335
395
|
...command.flags["--max-runtime"] !== void 0 ? { maxRuntimeMs: parseDuration(command.flags["--max-runtime"]) } : {}
|
|
336
396
|
};
|
|
397
|
+
const precheck = precheckFromCommand(command, current.precheck);
|
|
398
|
+
if (precheck !== void 0) input.precheck = precheck;
|
|
337
399
|
if (Object.keys(input).length === 1) throw new Error("Nothing to change");
|
|
338
|
-
const automation = await client
|
|
400
|
+
const automation = await updateAutomationChecked(client, current.id, input);
|
|
339
401
|
if (json) {
|
|
340
402
|
console.log(JSON.stringify({ automation }));
|
|
341
403
|
return;
|
|
@@ -465,4 +527,4 @@ function concurrency(value) {
|
|
|
465
527
|
return value;
|
|
466
528
|
}
|
|
467
529
|
|
|
468
|
-
export { AUTO_ACTIONS, AUTO_HELP, actionFromCommand, handleAutoCommand, parseAutoArgs };
|
|
530
|
+
export { AUTO_ACTIONS, AUTO_HELP, actionFromCommand, describePrecheck, handleAutoCommand, parseAutoArgs, precheckFromCommand };
|
|
@@ -4,49 +4,51 @@ var chalk = require('chalk');
|
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var index = require('./index-
|
|
8
|
-
var configuration = require('./configuration-
|
|
9
|
-
var client = require('./client-
|
|
7
|
+
var index = require('./index-C9hI8a10.cjs');
|
|
8
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
9
|
+
var client = require('./client-DJ0kX_8M.cjs');
|
|
10
10
|
var template = require('./template-BaHAmH2K.cjs');
|
|
11
|
-
var install = require('./install-
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
11
|
+
var install = require('./install-Cf6AFSWC.cjs');
|
|
12
|
+
var precheckCompat = require('./precheckCompat-CWOi5c9L.cjs');
|
|
13
|
+
var sessionOps = require('./sessionOps-DOyy4gkY.cjs');
|
|
14
|
+
var spawn = require('./spawn-BS7LPmSm.cjs');
|
|
15
|
+
var spawnAgents = require('./spawnAgents-vglexX9N.cjs');
|
|
16
|
+
var time = require('./time-T0YmeOhS.cjs');
|
|
16
17
|
require('zod');
|
|
17
18
|
require('@paralleldrive/cuid2');
|
|
18
|
-
require('./package-
|
|
19
|
+
require('./package-C1XvUQFy.cjs');
|
|
19
20
|
require('node:fs/promises');
|
|
20
|
-
require('./persistence-
|
|
21
|
+
require('./persistence-2Xp_o6x6.cjs');
|
|
21
22
|
require('./authRelay-BdYkC1Po.cjs');
|
|
22
23
|
require('node:crypto');
|
|
23
24
|
require('tweetnacl');
|
|
24
|
-
require('./logger-
|
|
25
|
+
require('./logger-JTcJU-uL.cjs');
|
|
25
26
|
require('node:util');
|
|
26
27
|
require('./resources-JDPugcDq.cjs');
|
|
27
28
|
require('axios');
|
|
28
|
-
require('./controlClient-
|
|
29
|
+
require('./controlClient-CmnHGcyl.cjs');
|
|
29
30
|
require('socket.io-client');
|
|
30
31
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
31
32
|
require('./path-B7zW-WwE.cjs');
|
|
32
|
-
require('./claudeSessionFork-
|
|
33
|
+
require('./claudeSessionFork-Cs0I3eGI.cjs');
|
|
33
34
|
require('node:readline');
|
|
34
|
-
require('./codexAppServerClient-
|
|
35
|
+
require('./codexAppServerClient-BTjn2ZCZ.cjs');
|
|
35
36
|
require('node:child_process');
|
|
36
37
|
require('cross-spawn');
|
|
37
38
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
38
39
|
require('./manager-Cly8xVIR.cjs');
|
|
39
40
|
require('@anthropic-ai/sandbox-runtime');
|
|
41
|
+
require('./rateLimitWindows-C2Jk3Ih7.cjs');
|
|
40
42
|
require('./codexThreadFork-DNekT4nQ.cjs');
|
|
41
|
-
require('./createSessionMetadata-
|
|
43
|
+
require('./createSessionMetadata-DbfRBhRu.cjs');
|
|
42
44
|
require('./projectPath-ChLhdOyt.cjs');
|
|
43
45
|
require('path');
|
|
44
46
|
require('url');
|
|
45
47
|
require('./forkBackfill-8eLDeS73.cjs');
|
|
46
48
|
|
|
47
49
|
const AUTO_ACTIONS = ["list", "show", "create", "edit", "pause", "resume", "rm", "run", "fire", "runs", "cancel", "ack", "report", "skill", "install", "uninstall", "help"];
|
|
48
|
-
const VALUE_FLAGS = ["--name", "--rename", "--description", "--machine", "--cron", "--tz", "--every", "--at", "--spawn-dir", "--prompt", "--prompt-file", "--agent", "--model", "--permission-mode", "--sticky-key", "--send-session", "--cwd", "--env", "--timeout", "--concurrency", "--max-runtime", "--payload", "--payload-json", "--payload-file", "--dedupe-key", "--status", "--limit", "--run", "--summary", "--error", "--attention", "--host", "--home"];
|
|
49
|
-
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--all", "--attention", "--help", "-h"];
|
|
50
|
+
const VALUE_FLAGS = ["--name", "--rename", "--description", "--machine", "--cron", "--tz", "--every", "--at", "--spawn-dir", "--prompt", "--prompt-file", "--agent", "--model", "--permission-mode", "--sticky-key", "--send-session", "--cwd", "--env", "--timeout", "--concurrency", "--max-runtime", "--payload", "--payload-json", "--payload-file", "--dedupe-key", "--status", "--limit", "--run", "--summary", "--error", "--attention", "--host", "--home", "--precheck-shell", "--precheck-argv", "--precheck-cwd", "--precheck-timeout"];
|
|
51
|
+
const BOOL_FLAGS = ["--manual", "--script", "--worktree", "--paused", "--wait", "--json", "--apply", "--all-machines", "--all", "--attention", "--precheck-output", "--no-precheck", "--help", "-h"];
|
|
50
52
|
function parseAutoArgs(args) {
|
|
51
53
|
const command = { action: "help", flags: {}, env: [], bools: /* @__PURE__ */ new Set(), argv: [] };
|
|
52
54
|
if (args.length === 0) return command;
|
|
@@ -141,6 +143,52 @@ function actionFromCommand(command, current) {
|
|
|
141
143
|
}
|
|
142
144
|
return { kind: "spawn", agent: flags["--agent"] ?? "claude", directory: path.resolve(flags["--spawn-dir"]), prompt, ...spawnDetails(command) };
|
|
143
145
|
}
|
|
146
|
+
function precheckFromCommand(command, current) {
|
|
147
|
+
const { flags, bools } = command;
|
|
148
|
+
const shell = flags["--precheck-shell"];
|
|
149
|
+
const argvJson = flags["--precheck-argv"];
|
|
150
|
+
const modifiers = ["--precheck-cwd", "--precheck-timeout"].filter((flag) => flags[flag] !== void 0).concat(bools.has("--precheck-output") ? ["--precheck-output"] : []);
|
|
151
|
+
if (bools.has("--no-precheck")) {
|
|
152
|
+
if (shell !== void 0 || argvJson !== void 0 || modifiers.length) throw new Error("--no-precheck cannot be combined with other --precheck-* options");
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
if (shell === void 0 && argvJson === void 0 && modifiers.length === 0) return void 0;
|
|
156
|
+
if (shell !== void 0 && argvJson !== void 0) throw new Error("Use only one of --precheck-shell and --precheck-argv");
|
|
157
|
+
let base;
|
|
158
|
+
if (shell !== void 0) base = { shell };
|
|
159
|
+
else if (argvJson !== void 0) {
|
|
160
|
+
let argv;
|
|
161
|
+
try {
|
|
162
|
+
argv = JSON.parse(argvJson);
|
|
163
|
+
} catch {
|
|
164
|
+
throw new Error(`--precheck-argv must be a JSON array of strings, e.g. '["./has-new.sh","--since","5m"]'`);
|
|
165
|
+
}
|
|
166
|
+
if (!Array.isArray(argv) || argv.length === 0 || !argv.every((part) => typeof part === "string" && part.length > 0)) throw new Error("--precheck-argv must be a non-empty JSON array of non-empty strings");
|
|
167
|
+
base = { command: argv };
|
|
168
|
+
} else {
|
|
169
|
+
if (!current) throw new Error(`${modifiers.join(", ")} need a precheck: give --precheck-shell <line> or --precheck-argv <json>`);
|
|
170
|
+
base = current;
|
|
171
|
+
}
|
|
172
|
+
let timeoutMs;
|
|
173
|
+
if (flags["--precheck-timeout"] !== void 0) {
|
|
174
|
+
timeoutMs = template.parseDuration(flags["--precheck-timeout"]);
|
|
175
|
+
if (timeoutMs < 1e3 || timeoutMs > index.AUTOMATION_PRECHECK_MAX_TIMEOUT_MS) throw new Error(`--precheck-timeout must be between 1s and ${index.AUTOMATION_PRECHECK_MAX_TIMEOUT_MS / 6e4}m`);
|
|
176
|
+
}
|
|
177
|
+
const precheck = {
|
|
178
|
+
...base,
|
|
179
|
+
...flags["--precheck-cwd"] !== void 0 ? { cwd: flags["--precheck-cwd"] } : {},
|
|
180
|
+
...timeoutMs !== void 0 ? { timeoutMs } : {},
|
|
181
|
+
...bools.has("--precheck-output") ? { includeOutput: true } : {}
|
|
182
|
+
};
|
|
183
|
+
const parsed = index.AutomationPrecheckSchema.safeParse(precheck);
|
|
184
|
+
if (!parsed.success) throw new Error(`Invalid precheck: ${parsed.error.issues[0]?.message ?? "check the --precheck-* options"}`);
|
|
185
|
+
return parsed.data;
|
|
186
|
+
}
|
|
187
|
+
function describePrecheck(precheck) {
|
|
188
|
+
const what = precheck.shell !== void 0 ? `sh: ${precheck.shell}` : `argv: ${JSON.stringify(precheck.command)}`;
|
|
189
|
+
const extras = [precheck.cwd ? `cwd ${precheck.cwd}` : null, precheck.timeoutMs ? `timeout ${Math.round(precheck.timeoutMs / 1e3)}s` : null, precheck.includeOutput ? "output \u2192 prompt" : null].filter(Boolean);
|
|
190
|
+
return extras.length ? `${what} (${extras.join(", ")})` : what;
|
|
191
|
+
}
|
|
144
192
|
function spawnDetails(command) {
|
|
145
193
|
const { flags, bools } = command;
|
|
146
194
|
if (flags["--agent"] !== void 0 && !spawnAgents.SPAWN_AGENTS.includes(flags["--agent"])) throw new Error(`--agent must be one of: ${spawnAgents.SPAWN_AGENTS.join(", ")}`);
|
|
@@ -182,6 +230,14 @@ ${chalk.bold("Action (one):")}
|
|
|
182
230
|
--send-session <id> --prompt <text>|--prompt-file <file>
|
|
183
231
|
--script -- <argv\u2026> [--cwd <dir>] [--env K=V]... [--timeout <dur>]
|
|
184
232
|
|
|
233
|
+
${chalk.bold("Precheck (optional, runs before the action; exit 0 runs it, anything else records a skip):")}
|
|
234
|
+
--precheck-shell '<command line>' | --precheck-argv '<json array>'
|
|
235
|
+
[--precheck-cwd <dir>] [--precheck-timeout <dur>] (default 60s, max 10m)
|
|
236
|
+
[--precheck-output] append the precheck's stdout to the spawn/send prompt
|
|
237
|
+
--no-precheck edit: remove the precheck
|
|
238
|
+
A shell line is not template-rendered; read the payload from $VH_AUTOMATION_PAYLOAD.
|
|
239
|
+
Consecutive scheduled skips for the same reason fold into one run shown as \xD7N.
|
|
240
|
+
|
|
185
241
|
${chalk.bold("Options:")}
|
|
186
242
|
--machine <id>|this Executing machine (default: this machine)
|
|
187
243
|
--description <text>
|
|
@@ -206,12 +262,14 @@ function printAutomation(a) {
|
|
|
206
262
|
if (a.description) console.log(` ${a.description}`);
|
|
207
263
|
console.log(` trigger: ${template.describeTrigger(a.trigger)} next: ${fmtTime(a.nextRunAt)}`);
|
|
208
264
|
console.log(` action: ${template.describeAction(a.action)}`);
|
|
265
|
+
if (a.precheck) console.log(` precheck: ${describePrecheck(a.precheck)}`);
|
|
209
266
|
console.log(` machine: ${a.machineId} concurrency: ${a.concurrency} max runtime: ${Math.round(a.maxRuntimeMs / 6e4)}m`);
|
|
210
267
|
console.log(` last run: ${fmtTime(a.lastRunAt)} ${a.lastRunStatus ?? ""}`);
|
|
211
268
|
}
|
|
212
269
|
function runLine(run) {
|
|
213
270
|
const status = run.status === "done" ? chalk.green(run.status) : ["failed", "expired"].includes(run.status) ? chalk.red(run.status) : run.status === "running" ? chalk.cyan(run.status) : run.status;
|
|
214
|
-
|
|
271
|
+
const folded = (run.occurrenceCount ?? 1) > 1 ? ` \xD7${run.occurrenceCount}` : "";
|
|
272
|
+
return `${fmtTime(run.createdAt)} ${status.padEnd(9)} ${run.automationName.padEnd(20)} ${run.source.padEnd(8)} ${run.id}${folded}${run.status === "skipped" && run.error ? chalk.dim(` ${run.error}`) : ""}${run.needsAttention ? chalk.yellow(` ! ${run.attentionReason ?? "attention"}`) : ""}`;
|
|
215
273
|
}
|
|
216
274
|
function printRun(run) {
|
|
217
275
|
console.log(runLine(run));
|
|
@@ -313,7 +371,9 @@ async function handleAutoCommand(args) {
|
|
|
313
371
|
...command.flags["--max-runtime"] !== void 0 ? { maxRuntimeMs: template.parseDuration(command.flags["--max-runtime"]) } : {},
|
|
314
372
|
...command.bools.has("--paused") ? { status: "paused" } : {}
|
|
315
373
|
};
|
|
316
|
-
const
|
|
374
|
+
const precheck = precheckFromCommand(command);
|
|
375
|
+
if (precheck) input.precheck = precheck;
|
|
376
|
+
const automation = await precheckCompat.createAutomationChecked(client$1, input);
|
|
317
377
|
if (json) {
|
|
318
378
|
console.log(JSON.stringify({ automation }));
|
|
319
379
|
return;
|
|
@@ -336,8 +396,10 @@ async function handleAutoCommand(args) {
|
|
|
336
396
|
...command.flags["--concurrency"] !== void 0 ? { concurrency: concurrency(command.flags["--concurrency"]) } : {},
|
|
337
397
|
...command.flags["--max-runtime"] !== void 0 ? { maxRuntimeMs: template.parseDuration(command.flags["--max-runtime"]) } : {}
|
|
338
398
|
};
|
|
399
|
+
const precheck = precheckFromCommand(command, current.precheck);
|
|
400
|
+
if (precheck !== void 0) input.precheck = precheck;
|
|
339
401
|
if (Object.keys(input).length === 1) throw new Error("Nothing to change");
|
|
340
|
-
const automation = await client$1
|
|
402
|
+
const automation = await precheckCompat.updateAutomationChecked(client$1, current.id, input);
|
|
341
403
|
if (json) {
|
|
342
404
|
console.log(JSON.stringify({ automation }));
|
|
343
405
|
return;
|
|
@@ -470,5 +532,7 @@ function concurrency(value) {
|
|
|
470
532
|
exports.AUTO_ACTIONS = AUTO_ACTIONS;
|
|
471
533
|
exports.AUTO_HELP = AUTO_HELP;
|
|
472
534
|
exports.actionFromCommand = actionFromCommand;
|
|
535
|
+
exports.describePrecheck = describePrecheck;
|
|
473
536
|
exports.handleAutoCommand = handleAutoCommand;
|
|
474
537
|
exports.parseAutoArgs = parseAutoArgs;
|
|
538
|
+
exports.precheckFromCommand = precheckFromCommand;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var node_fs = require('node:fs');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var configuration = require('./configuration-
|
|
6
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
7
7
|
require('node:os');
|
|
8
|
-
require('./package-
|
|
8
|
+
require('./package-C1XvUQFy.cjs');
|
|
9
9
|
|
|
10
10
|
const ASSISTANT_CLAUDE_MD = `# very-happy \u8C03\u5EA6\u4E2D\u5FC3\uFF08\u8BED\u97F3\u52A9\u624B\uFF09
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { c as configuration } from './configuration-
|
|
4
|
+
import { c as configuration } from './configuration-D2v3puap.mjs';
|
|
5
5
|
import 'node:os';
|
|
6
|
-
import './package-
|
|
6
|
+
import './package-BqwrPxL0.mjs';
|
|
7
7
|
|
|
8
8
|
const ASSISTANT_CLAUDE_MD = `# very-happy \u8C03\u5EA6\u4E2D\u5FC3\uFF08\u8BED\u97F3\u52A9\u624B\uFF09
|
|
9
9
|
|