very-happy-cli 0.2.158 → 0.2.160
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-DIDRig5G.cjs → AcpBackend-Bm2rdke8.cjs} +78 -76
- package/dist/{AcpBackend-vDVLHuYJ.mjs → AcpBackend-mzv8Dhba.mjs} +4 -2
- package/dist/{AcpSessionManager-C44U99CC.cjs → AcpSessionManager-BAY1Pggx.cjs} +9 -9
- package/dist/{AcpSessionManager-CmRjfhn3.mjs → AcpSessionManager-CoMWFVw3.mjs} +1 -1
- package/dist/BasePermissionHandler-CFHAxumV.cjs +157 -0
- package/dist/BasePermissionHandler-m3WVholL.mjs +155 -0
- package/dist/BaseReasoningProcessor-BFa9_rZA.cjs +200 -0
- package/dist/BaseReasoningProcessor-CYrKBXGm.mjs +198 -0
- package/dist/RemoteModeDisplay-D-HewyXg.mjs +150 -0
- package/dist/RemoteModeDisplay-NC1gPHtj.cjs +153 -0
- package/dist/agentAttachments-Dbw8iMCZ.cjs +20 -0
- package/dist/agentAttachments-M_B5qEF2.mjs +18 -0
- package/dist/agentGuidance-B5NATuFa.cjs +28 -0
- package/dist/agentGuidance-CQuNlNx8.mjs +20 -0
- package/dist/{agentHome-Dw8Jx_CJ.cjs → agentHome-CboCeKWq.cjs} +14 -28
- package/dist/{agentHome-CyLmGH5L.mjs → agentHome-Dj1C43aJ.mjs} +8 -22
- package/dist/api-CLMUr-SX.mjs +3339 -0
- package/dist/api-CgundNNX.cjs +3346 -0
- package/dist/{types-DIBF4U0Y.mjs → apiMachine-B9dLW_p5.mjs} +9116 -16015
- package/dist/{types-DnrPeN80.cjs → apiMachine-Bn8482VM.cjs} +9104 -16057
- package/dist/assistantTools-BTqPnlFl.cjs +380 -0
- package/dist/assistantTools-D6tuc6o4.mjs +376 -0
- package/dist/attachmentContent-DpiTJZb4.cjs +88 -0
- package/dist/attachmentContent-_kxRznNf.mjs +82 -0
- package/dist/attachmentLimits-CzVrqgLR.cjs +354 -0
- package/dist/attachmentLimits-yba1uHFO.mjs +348 -0
- package/dist/auth-BDOVh5h5.cjs +220 -0
- package/dist/auth-Cwutmdsa.mjs +225 -0
- package/dist/auth-PYHZQNPp.mjs +218 -0
- package/dist/auth-ba4WMYrN.cjs +227 -0
- package/dist/authRelay-BdYkC1Po.cjs +156 -0
- package/dist/authRelay-DSAvg1uv.mjs +143 -0
- package/dist/{auto-DZbNcTXx.cjs → auto-BOX_fgmR.cjs} +70 -79
- package/dist/{auto-BlMZPwOk.mjs → auto-BXu14yP_.mjs} +27 -36
- package/dist/backgroundTaskActivity-8PdPxrvy.mjs +149 -0
- package/dist/backgroundTaskActivity-CBvUdj39.cjs +157 -0
- package/dist/bootstrap-B5G1TijC.cjs +116 -0
- package/dist/bootstrap-hxXPCFMx.mjs +112 -0
- package/dist/browser-Y6Bl8L_O.cjs +22 -0
- package/dist/browser-jh2P0UVZ.mjs +20 -0
- package/dist/claudeCliPath-BqkaH2oR.mjs +8 -0
- package/dist/claudeCliPath-U4HHmV4r.cjs +10 -0
- package/dist/claudeLocal-BaY4fZKi.mjs +339 -0
- package/dist/claudeLocal-CRGG4Pea.cjs +343 -0
- package/dist/claudeLocalLauncher-D4T7MTqd.mjs +152 -0
- package/dist/claudeLocalLauncher-DyEbVzUN.cjs +154 -0
- package/dist/cliUpdate-DsKXPFYp.cjs +120 -0
- package/dist/cliUpdate-Y34VGe9Y.mjs +112 -0
- package/dist/client-3Ac-O4pw.cjs +104 -0
- package/dist/client-BPNbmtvO.cjs +119 -0
- package/dist/client-CeGKqqcJ.mjs +100 -0
- package/dist/client-ClR0K8zX.mjs +112 -0
- package/dist/codex/happyMcpStdioBridge.cjs +33 -14
- package/dist/codex/happyMcpStdioBridge.mjs +26 -7
- package/dist/codexAppServerClient-I3teiV-N.mjs +1088 -0
- package/dist/codexAppServerClient-q2FjnRcK.cjs +1090 -0
- package/dist/codexCommand-4zcccIoq.cjs +2088 -0
- package/dist/codexCommand-Cc9gcbdX.mjs +2086 -0
- package/dist/codexThreadFork-BH9IZPqD.cjs +350 -0
- package/dist/codexThreadFork-slzAseLx.mjs +338 -0
- package/dist/{config-BtPArqRH.mjs → config-CTx_jb-C.mjs} +7 -40
- package/dist/{config-DG84bjwF.cjs → config-Ci9Kpgwa.cjs} +26 -59
- package/dist/configuration-BSYpcPwE.cjs +181 -0
- package/dist/configuration-RfeNjFmd.mjs +170 -0
- package/dist/connect-BpOdzNbE.mjs +682 -0
- package/dist/connect-C2CiOUFs.cjs +684 -0
- package/dist/constants-BC4St0xd.mjs +11 -0
- package/dist/constants-VJ0N6WuG.cjs +17 -0
- package/dist/contentLogMetadata-BlWI0egu.mjs +51 -0
- package/dist/contentLogMetadata-ZSFk_NjQ.cjs +54 -0
- package/dist/context-DsDr6E2t.cjs +69 -0
- package/dist/context-H0Bcb9S_.mjs +65 -0
- package/dist/controlClient-BGbDcgWS.mjs +260 -0
- package/dist/controlClient-Bcwv3D21.cjs +279 -0
- package/dist/createSessionMetadata-BJxEnM-o.cjs +58 -0
- package/dist/createSessionMetadata-CVVkGjxV.mjs +54 -0
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +4 -0
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +7 -0
- package/dist/detectCLI-CSGMlV51.mjs +58 -0
- package/dist/detectCLI-DR9ZaN6B.cjs +61 -0
- package/dist/deterministicJson-C5CYTVpm.cjs +507 -0
- package/dist/deterministicJson-CzkFJWw1.mjs +502 -0
- package/dist/doctor-BPkYWSuq.mjs +75 -0
- package/dist/doctor-D2YJ-Yn2.cjs +395 -0
- package/dist/doctor-DOvByjbk.mjs +391 -0
- package/dist/doctor-u46qYYKX.cjs +79 -0
- package/dist/doctorReadiness-BCZGcN0a.cjs +151 -0
- package/dist/doctorReadiness-C208SMN9.mjs +142 -0
- package/dist/editPaths-BVfS_FFL.mjs +68 -0
- package/dist/editPaths-Bqp4OFPw.cjs +73 -0
- package/dist/ensureDaemonRunning-BCwNrMyv.cjs +64 -0
- package/dist/ensureDaemonRunning-Dqa2pOjY.mjs +61 -0
- package/dist/handleResumeCommand-BvXYf5El.mjs +240 -0
- package/dist/handleResumeCommand-C2cKchpX.cjs +245 -0
- package/dist/ids-B6ZC0HGt.cjs +13 -0
- package/dist/ids-DU6sLx4C.mjs +10 -0
- package/dist/index-B6UGRQ7h.mjs +102 -0
- package/dist/{index-DPCsWlWK.cjs → index-B6pAdvJx.cjs} +131 -91
- package/dist/index-Bu5Zi_a9.cjs +182 -0
- package/dist/index-D3kI0hDR.cjs +107 -0
- package/dist/index-DA7yINuk.cjs +994 -0
- package/dist/index-DDeHXrIX.cjs +71 -0
- package/dist/index-DKLU_fD0.mjs +158 -0
- package/dist/{index-ZChGsuB7.mjs → index-DMZqWwsP.mjs} +79 -39
- package/dist/index-DVkMGPyS.mjs +68 -0
- package/dist/index-qdS1friN.mjs +949 -0
- package/dist/index.cjs +5 -46
- package/dist/index.mjs +5 -46
- package/dist/{install-DarS_Wco.mjs → install-BO_W7VhL.mjs} +37 -37
- package/dist/install-BgoC2e_2.cjs +88 -0
- package/dist/install-CFY3tYtJ.mjs +86 -0
- package/dist/{install-wKQGgXvN.cjs → install-Cs5qAPrB.cjs} +38 -38
- package/dist/{installPiTools-DuZ6jZvX.cjs → installPiTools-BKnXjrVu.cjs} +2 -3
- package/dist/{installPiTools-Cj7yU9Fc.mjs → installPiTools-B_CdM5_2.mjs} +1 -2
- package/dist/{installTerminalHooks-DcQfee_O.cjs → installTerminalHooks-BQZbvxsZ.cjs} +5 -40
- package/dist/{installTerminalHooks-CpNbRFPz.mjs → installTerminalHooks-By7gBMEF.mjs} +3 -38
- package/dist/lib.cjs +28 -19
- package/dist/lib.d.cts +126 -2
- package/dist/lib.d.mts +126 -2
- package/dist/lib.mjs +23 -14
- package/dist/lidState-BeDfxxEX.cjs +305 -0
- package/dist/lidState-CeEt442o.mjs +297 -0
- package/dist/limits-C-a7gr04.cjs +43 -0
- package/dist/limits-DIo7rEBR.mjs +36 -0
- package/dist/localHappyAgentAuth-C-HQyiv6.mjs +82 -0
- package/dist/localHappyAgentAuth-D6rFhaoc.cjs +86 -0
- package/dist/logger-6HYUEXNk.mjs +271 -0
- package/dist/logger-CS0mw3fa.cjs +275 -0
- package/dist/loginShellEnv-BkuYtExZ.cjs +182 -0
- package/dist/loginShellEnv-Dw8M7tkI.mjs +167 -0
- package/dist/machineMetadata-DyDbODYd.cjs +41 -0
- package/dist/machineMetadata-oOzBfDfs.mjs +38 -0
- package/dist/main-BkxJP6JQ.cjs +941 -0
- package/dist/main-BwNIAI1A.mjs +939 -0
- package/dist/manager-BQ4flvQZ.mjs +101 -0
- package/dist/manager-Cly8xVIR.cjs +105 -0
- package/dist/{mcp-BN6bKIGb.mjs → mcp-B1A4I3TK.mjs} +27 -33
- package/dist/{mcp-DGdeUUDJ.cjs → mcp-Hszd7qpS.cjs} +42 -48
- package/dist/messageBuffer-BWlGgR3A.mjs +71 -0
- package/dist/messageBuffer-fJMH6uY8.cjs +73 -0
- package/dist/mirrorProtocol-BNLtoWjO.mjs +170 -0
- package/dist/mirrorProtocol-BUtmg1ws.cjs +186 -0
- package/dist/oneShotPrompts-CL0dip9C.cjs +16 -0
- package/dist/oneShotPrompts-DT4p6RNd.mjs +12 -0
- package/dist/package-BhaKlnxz.mjs +171 -0
- package/dist/package-BwMrPwqH.cjs +173 -0
- package/dist/path-B7zW-WwE.cjs +18 -0
- package/dist/path-D2wdaNSk.mjs +15 -0
- package/dist/peerTools-BTqw97Gb.mjs +272 -0
- package/dist/peerTools-BvKtHXj8.cjs +283 -0
- package/dist/permissionMode-Cr5JCbB7.mjs +80 -0
- package/dist/permissionMode-CrV-XuMs.cjs +87 -0
- package/dist/persistence-HGW_ZVs9.mjs +372 -0
- package/dist/persistence-yKTH3-5X.cjs +414 -0
- package/dist/piExtension.mjs +2 -1
- package/dist/piRunnerArgs-BNloJCCg.cjs +66 -0
- package/dist/piRunnerArgs-BuX1UFWy.mjs +59 -0
- package/dist/{piRuntime-bkw2NAZU.mjs → piRuntime-CSGkwCKQ.mjs} +2 -2
- package/dist/{piRuntime-3qtbKujX.cjs → piRuntime-C_H7MJCM.cjs} +4 -4
- package/dist/{piTerminal-DilKwM7B.mjs → piTerminal-C8a1OrNQ.mjs} +32 -35
- package/dist/{piTerminal-BYxp3LMr.cjs → piTerminal-DNCZ6yTM.cjs} +32 -35
- package/dist/previewPath-B0rBdhy1.cjs +83 -0
- package/dist/previewPath-CXN4Vag0.mjs +81 -0
- package/dist/projectPath-BTBIMB57.mjs +10 -0
- package/dist/projectPath-ChLhdOyt.cjs +13 -0
- package/dist/registerCommonHandlers-Ccvsz7Ou.mjs +536 -0
- package/dist/registerCommonHandlers-DskirN-_.cjs +538 -0
- package/dist/registerKillSessionHandler-DZeLXWcB.cjs +361 -0
- package/dist/registerKillSessionHandler-GYvHdipX.mjs +358 -0
- package/dist/remoteSessionClient-B0LraSB9.cjs +634 -0
- package/dist/remoteSessionClient-CYnXRynE.mjs +612 -0
- package/dist/resources-BdFBQi8r.mjs +117 -0
- package/dist/resources-JDPugcDq.cjs +120 -0
- package/dist/run-CJzxoHVh.cjs +5762 -0
- package/dist/run-D3ifupU3.mjs +5739 -0
- package/dist/runClaude-Ba01qT-u.mjs +848 -0
- package/dist/runClaude-Da3RirzE.cjs +850 -0
- package/dist/runClaudeDeps-DOt79DjU.mjs +3624 -0
- package/dist/runClaudeDeps-DOzEBMls.cjs +3649 -0
- package/dist/{runGemini-Cjii069p.mjs → runGemini-BGeTz57m.mjs} +58 -31
- package/dist/{runGemini-28O2sqyI.cjs → runGemini-DSr9LIxL.cjs} +202 -175
- package/dist/{runOpenClaw-CiMZad-H.cjs → runOpenClaw-B1mTxN35.cjs} +64 -65
- package/dist/{runOpenClaw-jaLr7KF1.mjs → runOpenClaw-CogSedIc.mjs} +31 -32
- package/dist/sandbox-CG7IyDTU.cjs +187 -0
- package/dist/sandbox-DTe6d54R.mjs +180 -0
- package/dist/selfCheck-C9mVrQwf.mjs +84 -0
- package/dist/selfCheck-Dc-mNSLb.cjs +87 -0
- package/dist/{send-D5ejHPXG.cjs → send-B7J_eaG3.cjs} +16 -9
- package/dist/{send-C9mOtChi.mjs → send-CBXJKc6O.mjs} +12 -5
- package/dist/server-CZTP_iOn.cjs +407 -0
- package/dist/server-DcVBv04l.mjs +404 -0
- package/dist/sessionLock-Bys1PNSo.cjs +205 -0
- package/dist/sessionLock-D-EG2CfG.mjs +197 -0
- package/dist/sessionModeFile-DMl3dw3r.mjs +32 -0
- package/dist/sessionModeFile-RSm0NQkH.cjs +36 -0
- package/dist/sessionOps-Dn8z85h_.cjs +783 -0
- package/dist/sessionOps-SuHW8Dfe.mjs +760 -0
- package/dist/sessionScanner-BOrGjMXL.cjs +209 -0
- package/dist/sessionScanner-CX3onqXh.mjs +206 -0
- package/dist/{sessions-W6771g3X.mjs → sessions-BEG_HTSi.mjs} +17 -8
- package/dist/{sessions-BNMPQoLE.cjs → sessions-D74aJbhL.cjs} +37 -28
- package/dist/setupOfflineReconnection-ByElY60m.cjs +74 -0
- package/dist/setupOfflineReconnection-DpvWTt69.mjs +72 -0
- package/dist/smallFastModel-BLNgMrwR.mjs +18 -0
- package/dist/smallFastModel-D_uxGMo3.cjs +21 -0
- package/dist/{spawn-D0QVhzRb.mjs → spawn-B7yro0b2.mjs} +26 -38
- package/dist/{spawn-Ddtom1cb.cjs → spawn-DgR0RKRs.cjs} +52 -64
- package/dist/spawnAgents-BGQiEF-w.cjs +52 -0
- package/dist/spawnAgents-DZzZ9jMI.mjs +45 -0
- package/dist/spawnHappyCLI-B2H5s4B_.mjs +64 -0
- package/dist/spawnHappyCLI-DBhwZT7O.cjs +66 -0
- package/dist/specialCommands-BSqhYg5X.mjs +52 -0
- package/dist/specialCommands-DSsTeRej.cjs +54 -0
- package/dist/startFileWatcher-B4VsLgjD.cjs +71 -0
- package/dist/startFileWatcher-DErVWZE4.mjs +69 -0
- package/dist/startupPlan-BLMbfQIH.cjs +12 -0
- package/dist/startupPlan-DFMyNgAs.mjs +10 -0
- package/dist/streamRelay-BiKw59Cc.cjs +233 -0
- package/dist/streamRelay-FPVbHpbM.mjs +231 -0
- package/dist/sync-C8gyQFMc.mjs +69 -0
- package/dist/sync-DccIKZ5_.cjs +71 -0
- package/dist/systemPrompt-BwTPWfMu.cjs +97 -0
- package/dist/systemPrompt-DX521JJz.mjs +94 -0
- package/dist/{teams-CqSwtw2O.mjs → teams-C32F1hqd.mjs} +9 -40
- package/dist/{teams-BZ1tayg_.cjs → teams-Dl8g8kTI.cjs} +14 -45
- package/dist/template-BaHAmH2K.cjs +129 -0
- package/dist/template-CiOPa2rd.mjs +121 -0
- package/dist/{terminalTitleSuggest-DKgX3osW.mjs → terminalTitleSuggest-CeKsX_V6.mjs} +1 -9
- package/dist/{terminalTitleSuggest-Dji8I0Jy.cjs → terminalTitleSuggest-DhvRFX3H.cjs} +0 -10
- package/dist/terminals-B_bfC9c2.cjs +250 -0
- package/dist/terminals-Dlg0x3nY.mjs +235 -0
- package/dist/time-D0XyHOid.mjs +38 -0
- package/dist/time-DCuTyook.cjs +42 -0
- package/dist/titleGenerator-CQ8CoGhg.mjs +166 -0
- package/dist/titleGenerator-ChzMJsyg.cjs +172 -0
- package/dist/tmuxSocket-B8Yx20sT.mjs +19 -0
- package/dist/tmuxSocket-D-Xt6Vn-.cjs +24 -0
- package/dist/{todo-BYMg0fR0.cjs → todo-BvUOTa8G.cjs} +15 -12
- package/dist/{todo-BbusB1zM.mjs → todo-CZ6cFrrn.mjs} +11 -8
- package/dist/tools-BZtHF_qQ.mjs +177 -0
- package/dist/tools-Be3AoAwu.cjs +63 -0
- package/dist/tools-DQj0AeLk.cjs +180 -0
- package/dist/tools-DkluDcG4.mjs +60 -0
- package/dist/trimIdent-4gvk9Wk6.cjs +22 -0
- package/dist/trimIdent-BAjmv_TG.mjs +20 -0
- package/dist/types-CRS-srZK.cjs +66 -0
- package/dist/types-CkqAACXx.mjs +64 -0
- package/dist/uninstall-BkLzaJ6I.mjs +47 -0
- package/dist/uninstall-x-TUtf5H.cjs +49 -0
- package/package.json +7 -7
- package/dist/agentGuidance-CrR9l62U.mjs +0 -2145
- package/dist/agentGuidance-DwOWbX55.cjs +0 -2217
- package/dist/index-BG932eCh.cjs +0 -19655
- package/dist/index-CVCt3kSt.mjs +0 -19591
- package/dist/index-D5ScEErM.cjs +0 -58
- package/dist/index-DgO0FHOx.mjs +0 -52
- package/dist/limits-D2uN090G.mjs +0 -2528
- package/dist/limits-kqFqhfsh.cjs +0 -2652
package/dist/index.cjs
CHANGED
|
@@ -1,51 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('
|
|
4
|
-
require('./index-
|
|
5
|
-
require('
|
|
6
|
-
require('zod');
|
|
7
|
-
require('./types-DnrPeN80.cjs');
|
|
8
|
-
require('node:child_process');
|
|
9
|
-
require('node:os');
|
|
10
|
-
require('node:crypto');
|
|
11
|
-
require('cross-spawn');
|
|
12
|
-
require('node:path');
|
|
13
|
-
require('node:readline');
|
|
3
|
+
require('./package-BwMrPwqH.cjs');
|
|
4
|
+
require('./index-DDeHXrIX.cjs');
|
|
5
|
+
require('node:module');
|
|
14
6
|
require('node:fs');
|
|
15
|
-
require('./terminalTitleSuggest-Dji8I0Jy.cjs');
|
|
16
|
-
require('path');
|
|
17
|
-
require('url');
|
|
18
|
-
require('./agentGuidance-DwOWbX55.cjs');
|
|
19
7
|
require('node:fs/promises');
|
|
20
|
-
require('
|
|
21
|
-
require('
|
|
22
|
-
require('fs/promises');
|
|
23
|
-
require('ink');
|
|
24
|
-
require('react');
|
|
25
|
-
require('@anthropic-ai/claude-agent-sdk');
|
|
26
|
-
require('node:events');
|
|
27
|
-
require('tweetnacl');
|
|
28
|
-
require('os');
|
|
29
|
-
require('child_process');
|
|
30
|
-
require('@paralleldrive/cuid2');
|
|
31
|
-
require('fs');
|
|
32
|
-
require('@anthropic-ai/sandbox-runtime');
|
|
33
|
-
require('expo-server-sdk');
|
|
34
|
-
require('crypto');
|
|
35
|
-
require('ps-list');
|
|
36
|
-
require('tmp');
|
|
37
|
-
require('open');
|
|
38
|
-
require('fastify');
|
|
39
|
-
require('fastify-type-provider-zod');
|
|
40
|
-
require('node:module');
|
|
41
|
-
require('node:util');
|
|
42
|
-
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
43
|
-
require('node:http');
|
|
44
|
-
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
45
|
-
require('http');
|
|
46
|
-
require('util');
|
|
47
|
-
require('inquirer');
|
|
48
|
-
require('node:url');
|
|
49
|
-
require('node:readline/promises');
|
|
50
|
-
require('node-pty');
|
|
8
|
+
require('node:os');
|
|
9
|
+
require('node:path');
|
|
51
10
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,48 +1,7 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import './index-
|
|
3
|
-
import '
|
|
4
|
-
import 'zod';
|
|
5
|
-
import './types-DIBF4U0Y.mjs';
|
|
6
|
-
import 'node:child_process';
|
|
7
|
-
import 'node:os';
|
|
8
|
-
import 'node:crypto';
|
|
9
|
-
import 'cross-spawn';
|
|
10
|
-
import 'node:path';
|
|
11
|
-
import 'node:readline';
|
|
1
|
+
import './package-BhaKlnxz.mjs';
|
|
2
|
+
import './index-DVkMGPyS.mjs';
|
|
3
|
+
import 'node:module';
|
|
12
4
|
import 'node:fs';
|
|
13
|
-
import './terminalTitleSuggest-DKgX3osW.mjs';
|
|
14
|
-
import 'path';
|
|
15
|
-
import 'url';
|
|
16
|
-
import './agentGuidance-CrR9l62U.mjs';
|
|
17
5
|
import 'node:fs/promises';
|
|
18
|
-
import '
|
|
19
|
-
import '
|
|
20
|
-
import 'fs/promises';
|
|
21
|
-
import 'ink';
|
|
22
|
-
import 'react';
|
|
23
|
-
import '@anthropic-ai/claude-agent-sdk';
|
|
24
|
-
import 'node:events';
|
|
25
|
-
import 'tweetnacl';
|
|
26
|
-
import 'os';
|
|
27
|
-
import 'child_process';
|
|
28
|
-
import '@paralleldrive/cuid2';
|
|
29
|
-
import 'fs';
|
|
30
|
-
import '@anthropic-ai/sandbox-runtime';
|
|
31
|
-
import 'expo-server-sdk';
|
|
32
|
-
import 'crypto';
|
|
33
|
-
import 'ps-list';
|
|
34
|
-
import 'tmp';
|
|
35
|
-
import 'open';
|
|
36
|
-
import 'fastify';
|
|
37
|
-
import 'fastify-type-provider-zod';
|
|
38
|
-
import 'node:module';
|
|
39
|
-
import 'node:util';
|
|
40
|
-
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
41
|
-
import 'node:http';
|
|
42
|
-
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
43
|
-
import 'http';
|
|
44
|
-
import 'util';
|
|
45
|
-
import 'inquirer';
|
|
46
|
-
import 'node:url';
|
|
47
|
-
import 'node:readline/promises';
|
|
48
|
-
import 'node-pty';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
import 'node:path';
|
|
@@ -1,7 +1,43 @@
|
|
|
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 './
|
|
4
|
+
import { T as TEAM_SKILL } from './resources-BdFBQi8r.mjs';
|
|
5
|
+
|
|
6
|
+
const AUTOMATION_SKILL = `---
|
|
7
|
+
name: very-happy-automations
|
|
8
|
+
description: Create and operate Very Happy automations \u2014 cron / interval / one-shot / manual triggers that spawn an agent session, continue a sticky session, or run a script on a chosen machine, with tracked runs. Use when asked to schedule recurring work, react to external events with an agent session, or inspect why an automated run failed.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Very Happy Automations
|
|
12
|
+
|
|
13
|
+
An automation is account-level: a trigger (cron with time zone, fixed interval, one time, or manual only), an action (spawn a session, continue a sticky session, send into a fixed session, or run a script), and one machine that executes it. Every execution is a run with a status (queued \u2192 claimed \u2192 running \u2192 done | failed | skipped | expired | cancelled), an optional session link, a summary and an attention flag.
|
|
14
|
+
|
|
15
|
+
## Surfaces
|
|
16
|
+
|
|
17
|
+
- Managed sessions (Claude, Codex, pi): the \`automation_*\` MCP tools \u2014 \`automation_list\`, \`automation_get\`, \`automation_create\`, \`automation_update\`, \`automation_pause\`, \`automation_resume\`, \`automation_delete\`, \`automation_run\`, \`automation_fire\`, \`automation_runs\`, \`automation_report\`, \`automation_ack\`.
|
|
18
|
+
- Terminal: \`very-happy auto --help\` (same operations; \`--json\` for scripts). Fire from any local process with \`very-happy auto fire <name> [--payload-json \u2026] [--dedupe-key \u2026] [--wait]\`.
|
|
19
|
+
- The machine defaults to the one you are running on. If the tools answer that automations are not enabled, the server gate is off; do not work around it.
|
|
20
|
+
|
|
21
|
+
## Creating one
|
|
22
|
+
|
|
23
|
+
Pick the trigger, then the action. \`spawn\` takes an agent (claude / codex / pi / gemini / openclaw), an absolute directory and a prompt; defaults match the web launcher (yolo for claude / codex / pi). \`script\` takes an argv array (no shell): quote nothing, pass arguments as separate items. Prompts and argv may use \`{{payload}}\`, \`{{payload.field.path}}\` (JSON payload), \`{{run.id}}\`, \`{{automation.name}}\` and \`{{now}}\`.
|
|
24
|
+
|
|
25
|
+
Use \`sticky: { key }\` on a spawn action when repeated events about the same subject should continue one conversation: the key is a template (for example \`{{payload.conversationId}}\`). A run whose rendered key matches a live session sends the prompt into that session; otherwise it spawns a new one and remembers it. A dead or archived session is replaced on the next run.
|
|
26
|
+
|
|
27
|
+
\`concurrency: skip\` (default) records a run as skipped while the previous one is still running; \`queue\` waits. \`maxRuntimeMs\` bounds a run (default 6h; scripts 30m).
|
|
28
|
+
|
|
29
|
+
## Event triggers
|
|
30
|
+
|
|
31
|
+
There is no inbound webhook. A private adapter (an IM bot, a watcher, a systemd unit) calls \`very-happy auto fire <name>\` with a payload and a dedupe key; the same key within 24h returns the original run instead of starting another. Prefer \`manual\` triggers for automations that only ever fire this way.
|
|
32
|
+
|
|
33
|
+
## Finishing a run
|
|
34
|
+
|
|
35
|
+
When you are the session an automation started (\`VH_AUTOMATION_RUN_ID\` is set) or continued, finish by calling \`automation_report\` with \`status: done\` and a short summary, or \`status: failed\` with the error. Without an explicit report the daemon marks the run done when your turn ends and uses your last message as the summary \u2014 explicit reports are exact, so prefer them for long or multi-turn work. Set \`needsAttention\` with a reason when a human must look (blocked, ambiguous input, partial result).
|
|
36
|
+
|
|
37
|
+
## Operating
|
|
38
|
+
|
|
39
|
+
Inspect \`automation_runs\` (or \`very-happy auto runs --attention\`) before changing anything. Runs stuck in queued mean the machine's daemon is offline; expired means the lease or the runtime bound lapsed. Acknowledge attention with \`automation_ack\` after handling it. Updates need the current \`version\` from \`automation_get\`; read again on a conflict. Do not create automations that spawn other automations, and never put credentials into prompts, payloads or script arguments \u2014 scripts inherit the daemon's environment.
|
|
40
|
+
`;
|
|
5
41
|
|
|
6
42
|
async function assertPrivateDestination(directory) {
|
|
7
43
|
for (let path = directory; ; path = dirname(path)) {
|
|
@@ -70,42 +106,6 @@ async function installTeamSkill(options) {
|
|
|
70
106
|
return installManagedSkill({ name: "very-happy-teams", content: TEAM_SKILL, managedSessions: "Team tools are injected by Very Happy. Standalone agents require a managed session connection." }, options);
|
|
71
107
|
}
|
|
72
108
|
|
|
73
|
-
const AUTOMATION_SKILL = `---
|
|
74
|
-
name: very-happy-automations
|
|
75
|
-
description: Create and operate Very Happy automations \u2014 cron / interval / one-shot / manual triggers that spawn an agent session, continue a sticky session, or run a script on a chosen machine, with tracked runs. Use when asked to schedule recurring work, react to external events with an agent session, or inspect why an automated run failed.
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
# Very Happy Automations
|
|
79
|
-
|
|
80
|
-
An automation is account-level: a trigger (cron with time zone, fixed interval, one time, or manual only), an action (spawn a session, continue a sticky session, send into a fixed session, or run a script), and one machine that executes it. Every execution is a run with a status (queued \u2192 claimed \u2192 running \u2192 done | failed | skipped | expired | cancelled), an optional session link, a summary and an attention flag.
|
|
81
|
-
|
|
82
|
-
## Surfaces
|
|
83
|
-
|
|
84
|
-
- Managed sessions (Claude, Codex, pi): the \`automation_*\` MCP tools \u2014 \`automation_list\`, \`automation_get\`, \`automation_create\`, \`automation_update\`, \`automation_pause\`, \`automation_resume\`, \`automation_delete\`, \`automation_run\`, \`automation_fire\`, \`automation_runs\`, \`automation_report\`, \`automation_ack\`.
|
|
85
|
-
- Terminal: \`very-happy auto --help\` (same operations; \`--json\` for scripts). Fire from any local process with \`very-happy auto fire <name> [--payload-json \u2026] [--dedupe-key \u2026] [--wait]\`.
|
|
86
|
-
- The machine defaults to the one you are running on. If the tools answer that automations are not enabled, the server gate is off; do not work around it.
|
|
87
|
-
|
|
88
|
-
## Creating one
|
|
89
|
-
|
|
90
|
-
Pick the trigger, then the action. \`spawn\` takes an agent (claude / codex / pi / gemini / openclaw), an absolute directory and a prompt; defaults match the web launcher (yolo for claude / codex / pi). \`script\` takes an argv array (no shell): quote nothing, pass arguments as separate items. Prompts and argv may use \`{{payload}}\`, \`{{payload.field.path}}\` (JSON payload), \`{{run.id}}\`, \`{{automation.name}}\` and \`{{now}}\`.
|
|
91
|
-
|
|
92
|
-
Use \`sticky: { key }\` on a spawn action when repeated events about the same subject should continue one conversation: the key is a template (for example \`{{payload.conversationId}}\`). A run whose rendered key matches a live session sends the prompt into that session; otherwise it spawns a new one and remembers it. A dead or archived session is replaced on the next run.
|
|
93
|
-
|
|
94
|
-
\`concurrency: skip\` (default) records a run as skipped while the previous one is still running; \`queue\` waits. \`maxRuntimeMs\` bounds a run (default 6h; scripts 30m).
|
|
95
|
-
|
|
96
|
-
## Event triggers
|
|
97
|
-
|
|
98
|
-
There is no inbound webhook. A private adapter (an IM bot, a watcher, a systemd unit) calls \`very-happy auto fire <name>\` with a payload and a dedupe key; the same key within 24h returns the original run instead of starting another. Prefer \`manual\` triggers for automations that only ever fire this way.
|
|
99
|
-
|
|
100
|
-
## Finishing a run
|
|
101
|
-
|
|
102
|
-
When you are the session an automation started (\`VH_AUTOMATION_RUN_ID\` is set) or continued, finish by calling \`automation_report\` with \`status: done\` and a short summary, or \`status: failed\` with the error. Without an explicit report the daemon marks the run done when your turn ends and uses your last message as the summary \u2014 explicit reports are exact, so prefer them for long or multi-turn work. Set \`needsAttention\` with a reason when a human must look (blocked, ambiguous input, partial result).
|
|
103
|
-
|
|
104
|
-
## Operating
|
|
105
|
-
|
|
106
|
-
Inspect \`automation_runs\` (or \`very-happy auto runs --attention\`) before changing anything. Runs stuck in queued mean the machine's daemon is offline; expired means the lease or the runtime bound lapsed. Acknowledge attention with \`automation_ack\` after handling it. Updates need the current \`version\` from \`automation_get\`; read again on a conflict. Do not create automations that spawn other automations, and never put credentials into prompts, payloads or script arguments \u2014 scripts inherit the daemon's environment.
|
|
107
|
-
`;
|
|
108
|
-
|
|
109
109
|
const AUTOMATION_SKILL_NAME = "very-happy-automations";
|
|
110
110
|
async function installAutomationSkill(options) {
|
|
111
111
|
return installManagedSkill({ name: AUTOMATION_SKILL_NAME, content: AUTOMATION_SKILL, managedSessions: "automation_* tools are injected into managed Claude, Codex and pi sessions; `very-happy auto` works from any terminal on a logged-in machine." }, options);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var logger = require('./logger-CS0mw3fa.cjs');
|
|
4
|
+
var fs = require('fs');
|
|
5
|
+
var child_process = require('child_process');
|
|
6
|
+
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
7
|
+
var os = require('os');
|
|
8
|
+
require('chalk');
|
|
9
|
+
require('node:util');
|
|
10
|
+
require('./configuration-BSYpcPwE.cjs');
|
|
11
|
+
require('node:fs');
|
|
12
|
+
require('node:os');
|
|
13
|
+
require('node:path');
|
|
14
|
+
require('./package-BwMrPwqH.cjs');
|
|
15
|
+
require('node:fs/promises');
|
|
16
|
+
|
|
17
|
+
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
18
|
+
const PLIST_FILE = `/Library/LaunchDaemons/${PLIST_LABEL}.plist`;
|
|
19
|
+
async function install$1() {
|
|
20
|
+
try {
|
|
21
|
+
if (fs.existsSync(PLIST_FILE)) {
|
|
22
|
+
logger.logger.info("Daemon plist already exists. Uninstalling first...");
|
|
23
|
+
child_process.execSync(`launchctl unload ${PLIST_FILE}`, { stdio: "inherit" });
|
|
24
|
+
}
|
|
25
|
+
const happyPath = process.argv[0];
|
|
26
|
+
const scriptPath = process.argv[1];
|
|
27
|
+
const plistContent = trimIdent.trimIdent(`
|
|
28
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
29
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
30
|
+
<plist version="1.0">
|
|
31
|
+
<dict>
|
|
32
|
+
<key>Label</key>
|
|
33
|
+
<string>${PLIST_LABEL}</string>
|
|
34
|
+
|
|
35
|
+
<key>ProgramArguments</key>
|
|
36
|
+
<array>
|
|
37
|
+
<string>${happyPath}</string>
|
|
38
|
+
<string>${scriptPath}</string>
|
|
39
|
+
<string>happy-daemon</string>
|
|
40
|
+
</array>
|
|
41
|
+
|
|
42
|
+
<key>EnvironmentVariables</key>
|
|
43
|
+
<dict>
|
|
44
|
+
<key>HAPPY_DAEMON_MODE</key>
|
|
45
|
+
<string>true</string>
|
|
46
|
+
</dict>
|
|
47
|
+
|
|
48
|
+
<key>RunAtLoad</key>
|
|
49
|
+
<true/>
|
|
50
|
+
|
|
51
|
+
<key>KeepAlive</key>
|
|
52
|
+
<true/>
|
|
53
|
+
|
|
54
|
+
<key>StandardErrorPath</key>
|
|
55
|
+
<string>${os.homedir()}/.happy/daemon.err</string>
|
|
56
|
+
|
|
57
|
+
<key>StandardOutPath</key>
|
|
58
|
+
<string>${os.homedir()}/.happy/daemon.log</string>
|
|
59
|
+
|
|
60
|
+
<key>WorkingDirectory</key>
|
|
61
|
+
<string>/tmp</string>
|
|
62
|
+
</dict>
|
|
63
|
+
</plist>
|
|
64
|
+
`);
|
|
65
|
+
fs.writeFileSync(PLIST_FILE, plistContent);
|
|
66
|
+
fs.chmodSync(PLIST_FILE, 420);
|
|
67
|
+
logger.logger.info(`Created daemon plist at ${PLIST_FILE}`);
|
|
68
|
+
child_process.execSync(`launchctl load ${PLIST_FILE}`, { stdio: "inherit" });
|
|
69
|
+
logger.logger.info("Daemon installed and started successfully");
|
|
70
|
+
logger.logger.info("Check logs at ~/.happy/daemon.log");
|
|
71
|
+
} catch (error) {
|
|
72
|
+
logger.logger.debug("Failed to install daemon:", error);
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function install() {
|
|
78
|
+
if (process.platform !== "darwin") {
|
|
79
|
+
throw new Error("Daemon installation is currently only supported on macOS");
|
|
80
|
+
}
|
|
81
|
+
if (process.getuid && process.getuid() !== 0) {
|
|
82
|
+
throw new Error("Daemon installation requires sudo privileges. Please run with sudo.");
|
|
83
|
+
}
|
|
84
|
+
logger.logger.info("Installing Happy CLI daemon for macOS...");
|
|
85
|
+
await install$1();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
exports.install = install;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { l as logger } from './logger-6HYUEXNk.mjs';
|
|
2
|
+
import { existsSync, writeFileSync, chmodSync } from 'fs';
|
|
3
|
+
import { execSync } from 'child_process';
|
|
4
|
+
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
5
|
+
import os from 'os';
|
|
6
|
+
import 'chalk';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import './configuration-RfeNjFmd.mjs';
|
|
9
|
+
import 'node:fs';
|
|
10
|
+
import 'node:os';
|
|
11
|
+
import 'node:path';
|
|
12
|
+
import './package-BhaKlnxz.mjs';
|
|
13
|
+
import 'node:fs/promises';
|
|
14
|
+
|
|
15
|
+
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
16
|
+
const PLIST_FILE = `/Library/LaunchDaemons/${PLIST_LABEL}.plist`;
|
|
17
|
+
async function install$1() {
|
|
18
|
+
try {
|
|
19
|
+
if (existsSync(PLIST_FILE)) {
|
|
20
|
+
logger.info("Daemon plist already exists. Uninstalling first...");
|
|
21
|
+
execSync(`launchctl unload ${PLIST_FILE}`, { stdio: "inherit" });
|
|
22
|
+
}
|
|
23
|
+
const happyPath = process.argv[0];
|
|
24
|
+
const scriptPath = process.argv[1];
|
|
25
|
+
const plistContent = trimIdent(`
|
|
26
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
27
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
28
|
+
<plist version="1.0">
|
|
29
|
+
<dict>
|
|
30
|
+
<key>Label</key>
|
|
31
|
+
<string>${PLIST_LABEL}</string>
|
|
32
|
+
|
|
33
|
+
<key>ProgramArguments</key>
|
|
34
|
+
<array>
|
|
35
|
+
<string>${happyPath}</string>
|
|
36
|
+
<string>${scriptPath}</string>
|
|
37
|
+
<string>happy-daemon</string>
|
|
38
|
+
</array>
|
|
39
|
+
|
|
40
|
+
<key>EnvironmentVariables</key>
|
|
41
|
+
<dict>
|
|
42
|
+
<key>HAPPY_DAEMON_MODE</key>
|
|
43
|
+
<string>true</string>
|
|
44
|
+
</dict>
|
|
45
|
+
|
|
46
|
+
<key>RunAtLoad</key>
|
|
47
|
+
<true/>
|
|
48
|
+
|
|
49
|
+
<key>KeepAlive</key>
|
|
50
|
+
<true/>
|
|
51
|
+
|
|
52
|
+
<key>StandardErrorPath</key>
|
|
53
|
+
<string>${os.homedir()}/.happy/daemon.err</string>
|
|
54
|
+
|
|
55
|
+
<key>StandardOutPath</key>
|
|
56
|
+
<string>${os.homedir()}/.happy/daemon.log</string>
|
|
57
|
+
|
|
58
|
+
<key>WorkingDirectory</key>
|
|
59
|
+
<string>/tmp</string>
|
|
60
|
+
</dict>
|
|
61
|
+
</plist>
|
|
62
|
+
`);
|
|
63
|
+
writeFileSync(PLIST_FILE, plistContent);
|
|
64
|
+
chmodSync(PLIST_FILE, 420);
|
|
65
|
+
logger.info(`Created daemon plist at ${PLIST_FILE}`);
|
|
66
|
+
execSync(`launchctl load ${PLIST_FILE}`, { stdio: "inherit" });
|
|
67
|
+
logger.info("Daemon installed and started successfully");
|
|
68
|
+
logger.info("Check logs at ~/.happy/daemon.log");
|
|
69
|
+
} catch (error) {
|
|
70
|
+
logger.debug("Failed to install daemon:", error);
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function install() {
|
|
76
|
+
if (process.platform !== "darwin") {
|
|
77
|
+
throw new Error("Daemon installation is currently only supported on macOS");
|
|
78
|
+
}
|
|
79
|
+
if (process.getuid && process.getuid() !== 0) {
|
|
80
|
+
throw new Error("Daemon installation requires sudo privileges. Please run with sudo.");
|
|
81
|
+
}
|
|
82
|
+
logger.info("Installing Happy CLI daemon for macOS...");
|
|
83
|
+
await install$1();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { install };
|
|
@@ -3,7 +3,43 @@
|
|
|
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
|
|
6
|
+
var resources = require('./resources-JDPugcDq.cjs');
|
|
7
|
+
|
|
8
|
+
const AUTOMATION_SKILL = `---
|
|
9
|
+
name: very-happy-automations
|
|
10
|
+
description: Create and operate Very Happy automations \u2014 cron / interval / one-shot / manual triggers that spawn an agent session, continue a sticky session, or run a script on a chosen machine, with tracked runs. Use when asked to schedule recurring work, react to external events with an agent session, or inspect why an automated run failed.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Very Happy Automations
|
|
14
|
+
|
|
15
|
+
An automation is account-level: a trigger (cron with time zone, fixed interval, one time, or manual only), an action (spawn a session, continue a sticky session, send into a fixed session, or run a script), and one machine that executes it. Every execution is a run with a status (queued \u2192 claimed \u2192 running \u2192 done | failed | skipped | expired | cancelled), an optional session link, a summary and an attention flag.
|
|
16
|
+
|
|
17
|
+
## Surfaces
|
|
18
|
+
|
|
19
|
+
- Managed sessions (Claude, Codex, pi): the \`automation_*\` MCP tools \u2014 \`automation_list\`, \`automation_get\`, \`automation_create\`, \`automation_update\`, \`automation_pause\`, \`automation_resume\`, \`automation_delete\`, \`automation_run\`, \`automation_fire\`, \`automation_runs\`, \`automation_report\`, \`automation_ack\`.
|
|
20
|
+
- Terminal: \`very-happy auto --help\` (same operations; \`--json\` for scripts). Fire from any local process with \`very-happy auto fire <name> [--payload-json \u2026] [--dedupe-key \u2026] [--wait]\`.
|
|
21
|
+
- The machine defaults to the one you are running on. If the tools answer that automations are not enabled, the server gate is off; do not work around it.
|
|
22
|
+
|
|
23
|
+
## Creating one
|
|
24
|
+
|
|
25
|
+
Pick the trigger, then the action. \`spawn\` takes an agent (claude / codex / pi / gemini / openclaw), an absolute directory and a prompt; defaults match the web launcher (yolo for claude / codex / pi). \`script\` takes an argv array (no shell): quote nothing, pass arguments as separate items. Prompts and argv may use \`{{payload}}\`, \`{{payload.field.path}}\` (JSON payload), \`{{run.id}}\`, \`{{automation.name}}\` and \`{{now}}\`.
|
|
26
|
+
|
|
27
|
+
Use \`sticky: { key }\` on a spawn action when repeated events about the same subject should continue one conversation: the key is a template (for example \`{{payload.conversationId}}\`). A run whose rendered key matches a live session sends the prompt into that session; otherwise it spawns a new one and remembers it. A dead or archived session is replaced on the next run.
|
|
28
|
+
|
|
29
|
+
\`concurrency: skip\` (default) records a run as skipped while the previous one is still running; \`queue\` waits. \`maxRuntimeMs\` bounds a run (default 6h; scripts 30m).
|
|
30
|
+
|
|
31
|
+
## Event triggers
|
|
32
|
+
|
|
33
|
+
There is no inbound webhook. A private adapter (an IM bot, a watcher, a systemd unit) calls \`very-happy auto fire <name>\` with a payload and a dedupe key; the same key within 24h returns the original run instead of starting another. Prefer \`manual\` triggers for automations that only ever fire this way.
|
|
34
|
+
|
|
35
|
+
## Finishing a run
|
|
36
|
+
|
|
37
|
+
When you are the session an automation started (\`VH_AUTOMATION_RUN_ID\` is set) or continued, finish by calling \`automation_report\` with \`status: done\` and a short summary, or \`status: failed\` with the error. Without an explicit report the daemon marks the run done when your turn ends and uses your last message as the summary \u2014 explicit reports are exact, so prefer them for long or multi-turn work. Set \`needsAttention\` with a reason when a human must look (blocked, ambiguous input, partial result).
|
|
38
|
+
|
|
39
|
+
## Operating
|
|
40
|
+
|
|
41
|
+
Inspect \`automation_runs\` (or \`very-happy auto runs --attention\`) before changing anything. Runs stuck in queued mean the machine's daemon is offline; expired means the lease or the runtime bound lapsed. Acknowledge attention with \`automation_ack\` after handling it. Updates need the current \`version\` from \`automation_get\`; read again on a conflict. Do not create automations that spawn other automations, and never put credentials into prompts, payloads or script arguments \u2014 scripts inherit the daemon's environment.
|
|
42
|
+
`;
|
|
7
43
|
|
|
8
44
|
async function assertPrivateDestination(directory) {
|
|
9
45
|
for (let path$1 = directory; ; path$1 = path.dirname(path$1)) {
|
|
@@ -69,45 +105,9 @@ async function installManagedSkill(skill, options) {
|
|
|
69
105
|
return { host: options.host, skill: skill.name, path: file, action, applied: !!options.apply, discovery: "No host skill directories are modified. Read this absolute skill path in a managed session.", managedSessions: skill.managedSessions };
|
|
70
106
|
}
|
|
71
107
|
async function installTeamSkill(options) {
|
|
72
|
-
return installManagedSkill({ name: "very-happy-teams", content:
|
|
108
|
+
return installManagedSkill({ name: "very-happy-teams", content: resources.TEAM_SKILL, managedSessions: "Team tools are injected by Very Happy. Standalone agents require a managed session connection." }, options);
|
|
73
109
|
}
|
|
74
110
|
|
|
75
|
-
const AUTOMATION_SKILL = `---
|
|
76
|
-
name: very-happy-automations
|
|
77
|
-
description: Create and operate Very Happy automations \u2014 cron / interval / one-shot / manual triggers that spawn an agent session, continue a sticky session, or run a script on a chosen machine, with tracked runs. Use when asked to schedule recurring work, react to external events with an agent session, or inspect why an automated run failed.
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
# Very Happy Automations
|
|
81
|
-
|
|
82
|
-
An automation is account-level: a trigger (cron with time zone, fixed interval, one time, or manual only), an action (spawn a session, continue a sticky session, send into a fixed session, or run a script), and one machine that executes it. Every execution is a run with a status (queued \u2192 claimed \u2192 running \u2192 done | failed | skipped | expired | cancelled), an optional session link, a summary and an attention flag.
|
|
83
|
-
|
|
84
|
-
## Surfaces
|
|
85
|
-
|
|
86
|
-
- Managed sessions (Claude, Codex, pi): the \`automation_*\` MCP tools \u2014 \`automation_list\`, \`automation_get\`, \`automation_create\`, \`automation_update\`, \`automation_pause\`, \`automation_resume\`, \`automation_delete\`, \`automation_run\`, \`automation_fire\`, \`automation_runs\`, \`automation_report\`, \`automation_ack\`.
|
|
87
|
-
- Terminal: \`very-happy auto --help\` (same operations; \`--json\` for scripts). Fire from any local process with \`very-happy auto fire <name> [--payload-json \u2026] [--dedupe-key \u2026] [--wait]\`.
|
|
88
|
-
- The machine defaults to the one you are running on. If the tools answer that automations are not enabled, the server gate is off; do not work around it.
|
|
89
|
-
|
|
90
|
-
## Creating one
|
|
91
|
-
|
|
92
|
-
Pick the trigger, then the action. \`spawn\` takes an agent (claude / codex / pi / gemini / openclaw), an absolute directory and a prompt; defaults match the web launcher (yolo for claude / codex / pi). \`script\` takes an argv array (no shell): quote nothing, pass arguments as separate items. Prompts and argv may use \`{{payload}}\`, \`{{payload.field.path}}\` (JSON payload), \`{{run.id}}\`, \`{{automation.name}}\` and \`{{now}}\`.
|
|
93
|
-
|
|
94
|
-
Use \`sticky: { key }\` on a spawn action when repeated events about the same subject should continue one conversation: the key is a template (for example \`{{payload.conversationId}}\`). A run whose rendered key matches a live session sends the prompt into that session; otherwise it spawns a new one and remembers it. A dead or archived session is replaced on the next run.
|
|
95
|
-
|
|
96
|
-
\`concurrency: skip\` (default) records a run as skipped while the previous one is still running; \`queue\` waits. \`maxRuntimeMs\` bounds a run (default 6h; scripts 30m).
|
|
97
|
-
|
|
98
|
-
## Event triggers
|
|
99
|
-
|
|
100
|
-
There is no inbound webhook. A private adapter (an IM bot, a watcher, a systemd unit) calls \`very-happy auto fire <name>\` with a payload and a dedupe key; the same key within 24h returns the original run instead of starting another. Prefer \`manual\` triggers for automations that only ever fire this way.
|
|
101
|
-
|
|
102
|
-
## Finishing a run
|
|
103
|
-
|
|
104
|
-
When you are the session an automation started (\`VH_AUTOMATION_RUN_ID\` is set) or continued, finish by calling \`automation_report\` with \`status: done\` and a short summary, or \`status: failed\` with the error. Without an explicit report the daemon marks the run done when your turn ends and uses your last message as the summary \u2014 explicit reports are exact, so prefer them for long or multi-turn work. Set \`needsAttention\` with a reason when a human must look (blocked, ambiguous input, partial result).
|
|
105
|
-
|
|
106
|
-
## Operating
|
|
107
|
-
|
|
108
|
-
Inspect \`automation_runs\` (or \`very-happy auto runs --attention\`) before changing anything. Runs stuck in queued mean the machine's daemon is offline; expired means the lease or the runtime bound lapsed. Acknowledge attention with \`automation_ack\` after handling it. Updates need the current \`version\` from \`automation_get\`; read again on a conflict. Do not create automations that spawn other automations, and never put credentials into prompts, payloads or script arguments \u2014 scripts inherit the daemon's environment.
|
|
109
|
-
`;
|
|
110
|
-
|
|
111
111
|
const AUTOMATION_SKILL_NAME = "very-happy-automations";
|
|
112
112
|
async function installAutomationSkill(options) {
|
|
113
113
|
return installManagedSkill({ name: AUTOMATION_SKILL_NAME, content: AUTOMATION_SKILL, managedSessions: "automation_* tools are injected into managed Claude, Codex and pi sessions; `very-happy auto` works from any terminal on a logged-in machine." }, options);
|
|
@@ -5,10 +5,9 @@ var os = require('node:os');
|
|
|
5
5
|
var path = require('node:path');
|
|
6
6
|
var node_url = require('node:url');
|
|
7
7
|
var node_crypto = require('node:crypto');
|
|
8
|
-
var
|
|
8
|
+
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
9
9
|
require('path');
|
|
10
10
|
require('url');
|
|
11
|
-
require('zod');
|
|
12
11
|
|
|
13
12
|
const HEADER = "// Managed by Very Happy: native Pi terminal tools.\n";
|
|
14
13
|
const PI_TOOLS_HELP = `very-happy install-pi-tools - enable tools in native Pi
|
|
@@ -52,7 +51,7 @@ async function installPiTools(remove = false) {
|
|
|
52
51
|
await promises.unlink(target);
|
|
53
52
|
return target;
|
|
54
53
|
}
|
|
55
|
-
const content = piToolsLoader(path.resolve(
|
|
54
|
+
const content = piToolsLoader(path.resolve(projectPath.projectPath(), "dist/piExtension.mjs"));
|
|
56
55
|
await promises.mkdir(path.dirname(target), { recursive: true, mode: 448 });
|
|
57
56
|
const temporary = `${target}.${node_crypto.randomUUID()}.new`;
|
|
58
57
|
try {
|
|
@@ -3,10 +3,9 @@ import { homedir } from 'node:os';
|
|
|
3
3
|
import { join, resolve, dirname } from 'node:path';
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
|
-
import { p as projectPath } from './
|
|
6
|
+
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
7
7
|
import 'path';
|
|
8
8
|
import 'url';
|
|
9
|
-
import 'zod';
|
|
10
9
|
|
|
11
10
|
const HEADER = "// Managed by Very Happy: native Pi terminal tools.\n";
|
|
12
11
|
const PI_TOOLS_HELP = `very-happy install-pi-tools - enable tools in native Pi
|
|
@@ -5,49 +5,14 @@ var path = require('node:path');
|
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var node_child_process = require('node:child_process');
|
|
7
7
|
var chalk = require('chalk');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
9
|
+
var doctorReadiness = require('./doctorReadiness-BCZGcN0a.cjs');
|
|
10
10
|
require('path');
|
|
11
11
|
require('url');
|
|
12
|
-
require('
|
|
13
|
-
require('node:crypto');
|
|
14
|
-
require('./types-DnrPeN80.cjs');
|
|
15
|
-
require('axios');
|
|
16
|
-
require('./limits-kqFqhfsh.cjs');
|
|
17
|
-
require('@paralleldrive/cuid2');
|
|
18
|
-
require('node:fs/promises');
|
|
19
|
-
require('tweetnacl');
|
|
20
|
-
require('node:util');
|
|
21
|
-
require('node:events');
|
|
22
|
-
require('socket.io-client');
|
|
12
|
+
require('./detectCLI-DR9ZaN6B.cjs');
|
|
23
13
|
require('child_process');
|
|
24
|
-
require('util');
|
|
25
|
-
require('fs/promises');
|
|
26
|
-
require('crypto');
|
|
27
|
-
require('cross-spawn');
|
|
28
14
|
require('os');
|
|
29
|
-
require('node-pty');
|
|
30
15
|
require('fs');
|
|
31
|
-
require('node:readline');
|
|
32
|
-
require('@anthropic-ai/sandbox-runtime');
|
|
33
|
-
require('expo-server-sdk');
|
|
34
|
-
require('./agentGuidance-DwOWbX55.cjs');
|
|
35
|
-
require('ink');
|
|
36
|
-
require('react');
|
|
37
|
-
require('@anthropic-ai/claude-agent-sdk');
|
|
38
|
-
require('ps-list');
|
|
39
|
-
require('tmp');
|
|
40
|
-
require('open');
|
|
41
|
-
require('fastify');
|
|
42
|
-
require('fastify-type-provider-zod');
|
|
43
|
-
require('node:module');
|
|
44
|
-
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
45
|
-
require('node:http');
|
|
46
|
-
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
47
|
-
require('http');
|
|
48
|
-
require('inquirer');
|
|
49
|
-
require('node:url');
|
|
50
|
-
require('node:readline/promises');
|
|
51
16
|
|
|
52
17
|
const TERMINAL_MIRROR_FORWARDER_BASENAME = "terminal_mirror_forwarder.cjs";
|
|
53
18
|
const HOOK_EVENTS = ["SessionStart", "SessionEnd"];
|
|
@@ -133,7 +98,7 @@ The remove form deletes only Very Happy's entries; foreign hooks are preserved.`
|
|
|
133
98
|
function terminalHooksTmuxReadiness(status, stdout) {
|
|
134
99
|
const version = stdout?.trim() || void 0;
|
|
135
100
|
if (status !== 0) return { ready: false, reason: "missing" };
|
|
136
|
-
if (!
|
|
101
|
+
if (!doctorReadiness.tmuxSupportsSessionEnv(version)) return { ready: false, version, reason: "too-old" };
|
|
137
102
|
return { ready: true, version };
|
|
138
103
|
}
|
|
139
104
|
function probeTerminalHooksTmux() {
|
|
@@ -153,7 +118,7 @@ function claudeSettingsPath() {
|
|
|
153
118
|
return path.join(configDir, "settings.json");
|
|
154
119
|
}
|
|
155
120
|
function terminalMirrorHookCommand() {
|
|
156
|
-
const script = path.resolve(
|
|
121
|
+
const script = path.resolve(projectPath.projectPath(), "scripts", TERMINAL_MIRROR_FORWARDER_BASENAME);
|
|
157
122
|
return `[ -f "${script}" ] && node "${script}" || true`;
|
|
158
123
|
}
|
|
159
124
|
async function installTerminalHooks(opts = {}) {
|
|
@@ -3,49 +3,14 @@ import { join, resolve } from 'node:path';
|
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { spawnSync } from 'node:child_process';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
|
-
import { p as projectPath } from './
|
|
7
|
-
import {
|
|
6
|
+
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
7
|
+
import { t as tmuxSupportsSessionEnv } from './doctorReadiness-C208SMN9.mjs';
|
|
8
8
|
import 'path';
|
|
9
9
|
import 'url';
|
|
10
|
-
import '
|
|
11
|
-
import 'node:crypto';
|
|
12
|
-
import './types-DIBF4U0Y.mjs';
|
|
13
|
-
import 'axios';
|
|
14
|
-
import './limits-D2uN090G.mjs';
|
|
15
|
-
import '@paralleldrive/cuid2';
|
|
16
|
-
import 'node:fs/promises';
|
|
17
|
-
import 'tweetnacl';
|
|
18
|
-
import 'node:util';
|
|
19
|
-
import 'node:events';
|
|
20
|
-
import 'socket.io-client';
|
|
10
|
+
import './detectCLI-CSGMlV51.mjs';
|
|
21
11
|
import 'child_process';
|
|
22
|
-
import 'util';
|
|
23
|
-
import 'fs/promises';
|
|
24
|
-
import 'crypto';
|
|
25
|
-
import 'cross-spawn';
|
|
26
12
|
import 'os';
|
|
27
|
-
import 'node-pty';
|
|
28
13
|
import 'fs';
|
|
29
|
-
import 'node:readline';
|
|
30
|
-
import '@anthropic-ai/sandbox-runtime';
|
|
31
|
-
import 'expo-server-sdk';
|
|
32
|
-
import './agentGuidance-CrR9l62U.mjs';
|
|
33
|
-
import 'ink';
|
|
34
|
-
import 'react';
|
|
35
|
-
import '@anthropic-ai/claude-agent-sdk';
|
|
36
|
-
import 'ps-list';
|
|
37
|
-
import 'tmp';
|
|
38
|
-
import 'open';
|
|
39
|
-
import 'fastify';
|
|
40
|
-
import 'fastify-type-provider-zod';
|
|
41
|
-
import 'node:module';
|
|
42
|
-
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
43
|
-
import 'node:http';
|
|
44
|
-
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
45
|
-
import 'http';
|
|
46
|
-
import 'inquirer';
|
|
47
|
-
import 'node:url';
|
|
48
|
-
import 'node:readline/promises';
|
|
49
14
|
|
|
50
15
|
const TERMINAL_MIRROR_FORWARDER_BASENAME = "terminal_mirror_forwarder.cjs";
|
|
51
16
|
const HOOK_EVENTS = ["SessionStart", "SessionEnd"];
|