very-happy-cli 0.2.159 → 0.2.161

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.
Files changed (259) hide show
  1. package/dist/{AcpBackend-VsfkZiVF.mjs → AcpBackend-6U6pQgx1.mjs} +4 -2
  2. package/dist/{AcpBackend-DUYFlyfN.cjs → AcpBackend-Ba98QDif.cjs} +78 -76
  3. package/dist/{AcpSessionManager-Bdv8LWXh.cjs → AcpSessionManager-BAY1Pggx.cjs} +9 -9
  4. package/dist/{AcpSessionManager-rYtVb0kN.mjs → AcpSessionManager-CoMWFVw3.mjs} +1 -1
  5. package/dist/BasePermissionHandler-2R0uH2CI.cjs +157 -0
  6. package/dist/BasePermissionHandler-BvvhBTja.mjs +155 -0
  7. package/dist/BaseReasoningProcessor-DyhO1uoU.mjs +198 -0
  8. package/dist/BaseReasoningProcessor-fsVNmCEF.cjs +200 -0
  9. package/dist/RemoteModeDisplay-D-HewyXg.mjs +150 -0
  10. package/dist/RemoteModeDisplay-NC1gPHtj.cjs +153 -0
  11. package/dist/agentAttachments-Dbw8iMCZ.cjs +20 -0
  12. package/dist/agentAttachments-M_B5qEF2.mjs +18 -0
  13. package/dist/agentGuidance-B5NATuFa.cjs +28 -0
  14. package/dist/agentGuidance-CQuNlNx8.mjs +20 -0
  15. package/dist/{agentHome-CvsJyeQB.mjs → agentHome-Ck1i1TQB.mjs} +8 -22
  16. package/dist/{agentHome-CHh4lmjM.cjs → agentHome-DvNnGphb.cjs} +14 -28
  17. package/dist/api-B2vLMS-z.cjs +3346 -0
  18. package/dist/api-SffjRQ1b.mjs +3339 -0
  19. package/dist/{types-Dh-s4Lqs.mjs → apiMachine-BpW9t8MO.mjs} +9116 -16205
  20. package/dist/{types-BbvK1Tr_.cjs → apiMachine-gFA54X7y.cjs} +9104 -16247
  21. package/dist/assistantTools-BfA0R3_m.cjs +380 -0
  22. package/dist/assistantTools-CgiTbnWb.mjs +376 -0
  23. package/dist/attachmentContent-CSGxr71v.mjs +82 -0
  24. package/dist/attachmentContent-DMMZzevR.cjs +88 -0
  25. package/dist/attachmentLimits-CzVrqgLR.cjs +354 -0
  26. package/dist/attachmentLimits-yba1uHFO.mjs +348 -0
  27. package/dist/auth-Bt4ceBBy.cjs +227 -0
  28. package/dist/auth-CYHjQ8oQ.mjs +225 -0
  29. package/dist/auth-DdyVZSo6.mjs +218 -0
  30. package/dist/auth-x4CEoysH.cjs +220 -0
  31. package/dist/authRelay-BdYkC1Po.cjs +156 -0
  32. package/dist/authRelay-DSAvg1uv.mjs +143 -0
  33. package/dist/{auto-DKmEls8Z.cjs → auto-BDXDUnjB.cjs} +70 -79
  34. package/dist/{auto-nb8GhRRy.mjs → auto-CXLlRi3a.mjs} +27 -36
  35. package/dist/backgroundTaskActivity-8PdPxrvy.mjs +149 -0
  36. package/dist/backgroundTaskActivity-CBvUdj39.cjs +157 -0
  37. package/dist/bootstrap-BNQq05jR.mjs +112 -0
  38. package/dist/bootstrap-CkgIq8N3.cjs +116 -0
  39. package/dist/browser-9pyhQr1R.mjs +20 -0
  40. package/dist/browser-BDOlKWYe.cjs +22 -0
  41. package/dist/claudeCliPath-BqkaH2oR.mjs +8 -0
  42. package/dist/claudeCliPath-U4HHmV4r.cjs +10 -0
  43. package/dist/claudeLocal-BDuGFnjJ.cjs +343 -0
  44. package/dist/claudeLocal-CQa8qnwq.mjs +339 -0
  45. package/dist/claudeLocalLauncher-Bd5I2-j6.cjs +154 -0
  46. package/dist/claudeLocalLauncher-CDqQI9ak.mjs +152 -0
  47. package/dist/cliUpdate-DsKXPFYp.cjs +120 -0
  48. package/dist/cliUpdate-Y34VGe9Y.mjs +112 -0
  49. package/dist/client-Brn-UwVk.mjs +100 -0
  50. package/dist/client-CXb1VJui.mjs +112 -0
  51. package/dist/client-C_axwRry.cjs +104 -0
  52. package/dist/client-DOBWJL3u.cjs +119 -0
  53. package/dist/codex/happyMcpStdioBridge.cjs +33 -14
  54. package/dist/codex/happyMcpStdioBridge.mjs +26 -7
  55. package/dist/codexAppServerClient-ZzhUTWPo.cjs +1090 -0
  56. package/dist/codexAppServerClient-oeQKD6Qf.mjs +1088 -0
  57. package/dist/codexCommand-C7H0NpBe.cjs +2088 -0
  58. package/dist/codexCommand-CJ82bl3l.mjs +2086 -0
  59. package/dist/codexThreadFork-BCaEMBiM.mjs +338 -0
  60. package/dist/codexThreadFork-BZqF-9bX.cjs +350 -0
  61. package/dist/{config-ClLtM6F3.mjs → config-BglnktIo.mjs} +7 -40
  62. package/dist/{config-DLx-vW3I.cjs → config-CYpL1Ahd.cjs} +26 -59
  63. package/dist/configuration-DoWFJUPm.mjs +170 -0
  64. package/dist/configuration-v9f8LM9T.cjs +181 -0
  65. package/dist/connect-hgcNjyAB.mjs +682 -0
  66. package/dist/connect-yEvjdRvx.cjs +684 -0
  67. package/dist/constants-BC4St0xd.mjs +11 -0
  68. package/dist/constants-VJ0N6WuG.cjs +17 -0
  69. package/dist/contentLogMetadata-BlWI0egu.mjs +51 -0
  70. package/dist/contentLogMetadata-ZSFk_NjQ.cjs +54 -0
  71. package/dist/context-B45vMtSZ.cjs +69 -0
  72. package/dist/context-C9GHPLEm.mjs +65 -0
  73. package/dist/controlClient-DjoKTtgK.mjs +260 -0
  74. package/dist/controlClient-fEHE85bH.cjs +279 -0
  75. package/dist/createSessionMetadata-BRLB9CNO.cjs +58 -0
  76. package/dist/createSessionMetadata-mIeehclp.mjs +54 -0
  77. package/dist/defaultPermissionMode-BnxJPVHT.mjs +4 -0
  78. package/dist/defaultPermissionMode-CxmTXUQR.cjs +7 -0
  79. package/dist/detectCLI-CSGMlV51.mjs +58 -0
  80. package/dist/detectCLI-DR9ZaN6B.cjs +61 -0
  81. package/dist/deterministicJson-DKDP_mM-.cjs +507 -0
  82. package/dist/deterministicJson-p835AdAU.mjs +502 -0
  83. package/dist/doctor-BPkYWSuq.mjs +75 -0
  84. package/dist/doctor-BeUuQXFs.mjs +391 -0
  85. package/dist/doctor-hVNnSZJn.cjs +395 -0
  86. package/dist/doctor-u46qYYKX.cjs +79 -0
  87. package/dist/doctorReadiness-BCZGcN0a.cjs +151 -0
  88. package/dist/doctorReadiness-C208SMN9.mjs +142 -0
  89. package/dist/editPaths-BVfS_FFL.mjs +68 -0
  90. package/dist/editPaths-Bqp4OFPw.cjs +73 -0
  91. package/dist/ensureDaemonRunning-CO7d1gOC.mjs +61 -0
  92. package/dist/ensureDaemonRunning-Dg9aZfjs.cjs +64 -0
  93. package/dist/handleResumeCommand-BiTPK0qd.mjs +240 -0
  94. package/dist/handleResumeCommand-DnVmy7a3.cjs +245 -0
  95. package/dist/ids-B6ZC0HGt.cjs +13 -0
  96. package/dist/ids-DU6sLx4C.mjs +10 -0
  97. package/dist/index-B6UGRQ7h.mjs +102 -0
  98. package/dist/{index-2mCaeKyf.mjs → index-CAFwetLk.mjs} +68 -38
  99. package/dist/index-Cqx-Raq6.mjs +68 -0
  100. package/dist/index-D3kI0hDR.cjs +107 -0
  101. package/dist/index-DA7yINuk.cjs +994 -0
  102. package/dist/{index-BEOMECtE.cjs → index-LIn6nCcq.cjs} +121 -91
  103. package/dist/index-Pf2cV9cn.cjs +182 -0
  104. package/dist/index-SPGPenK5.mjs +158 -0
  105. package/dist/index-gNTWtSKN.cjs +71 -0
  106. package/dist/index-qdS1friN.mjs +949 -0
  107. package/dist/index.cjs +5 -46
  108. package/dist/index.mjs +5 -46
  109. package/dist/{install-BPhJppvd.mjs → install-BO_W7VhL.mjs} +37 -37
  110. package/dist/install-Bu85vlHD.cjs +88 -0
  111. package/dist/install-ClUUl3yp.mjs +86 -0
  112. package/dist/{install-BOHrUaFM.cjs → install-Cs5qAPrB.cjs} +38 -38
  113. package/dist/{installPiTools-DuZ6jZvX.cjs → installPiTools-BKnXjrVu.cjs} +2 -3
  114. package/dist/{installPiTools-Cj7yU9Fc.mjs → installPiTools-B_CdM5_2.mjs} +1 -2
  115. package/dist/{installTerminalHooks-Cou3WUf3.cjs → installTerminalHooks-BQZbvxsZ.cjs} +5 -40
  116. package/dist/{installTerminalHooks-WeznjkuC.mjs → installTerminalHooks-By7gBMEF.mjs} +3 -38
  117. package/dist/lib.cjs +28 -19
  118. package/dist/lib.d.cts +12 -2
  119. package/dist/lib.d.mts +12 -2
  120. package/dist/lib.mjs +23 -14
  121. package/dist/lidState-C2dI0FAN.mjs +297 -0
  122. package/dist/lidState-KHHu1015.cjs +305 -0
  123. package/dist/limits-C-a7gr04.cjs +43 -0
  124. package/dist/limits-DIo7rEBR.mjs +36 -0
  125. package/dist/localHappyAgentAuth-BXiHPXdC.cjs +86 -0
  126. package/dist/localHappyAgentAuth-DCsetiyG.mjs +82 -0
  127. package/dist/logger-Bc8-u1w0.cjs +275 -0
  128. package/dist/logger-fXoNzNuB.mjs +271 -0
  129. package/dist/loginShellEnv-BkuYtExZ.cjs +182 -0
  130. package/dist/loginShellEnv-Dw8M7tkI.mjs +167 -0
  131. package/dist/machineMetadata-BHjehxJY.mjs +38 -0
  132. package/dist/machineMetadata-BibDMFVx.cjs +41 -0
  133. package/dist/main-BktM4A1K.mjs +939 -0
  134. package/dist/main-CLaX-t-b.cjs +941 -0
  135. package/dist/manager-BQ4flvQZ.mjs +101 -0
  136. package/dist/manager-Cly8xVIR.cjs +105 -0
  137. package/dist/{mcp-Dy3f_K0h.mjs → mcp-CeUd9KDr.mjs} +27 -33
  138. package/dist/{mcp-CPYbtsYG.cjs → mcp-GBfE70nk.cjs} +42 -48
  139. package/dist/messageBuffer-BWlGgR3A.mjs +71 -0
  140. package/dist/messageBuffer-fJMH6uY8.cjs +73 -0
  141. package/dist/mirrorProtocol-BNLtoWjO.mjs +170 -0
  142. package/dist/mirrorProtocol-BUtmg1ws.cjs +186 -0
  143. package/dist/oneShotPrompts-CL0dip9C.cjs +16 -0
  144. package/dist/oneShotPrompts-DT4p6RNd.mjs +12 -0
  145. package/dist/package-Cl5BEP5x.cjs +173 -0
  146. package/dist/package-uOg9SCKi.mjs +171 -0
  147. package/dist/path-B7zW-WwE.cjs +18 -0
  148. package/dist/path-D2wdaNSk.mjs +15 -0
  149. package/dist/peerTools-CIeiy9wn.cjs +283 -0
  150. package/dist/peerTools-Dz3_7Bkk.mjs +272 -0
  151. package/dist/permissionMode-CH4FoZfU.mjs +80 -0
  152. package/dist/permissionMode-CrV-XuMs.cjs +87 -0
  153. package/dist/persistence-CBNMzSa8.cjs +414 -0
  154. package/dist/persistence-oET5n61f.mjs +372 -0
  155. package/dist/piExtension.mjs +2 -1
  156. package/dist/piRunnerArgs-Bf7RUF__.cjs +66 -0
  157. package/dist/piRunnerArgs-Dk1ncwHF.mjs +59 -0
  158. package/dist/{piRuntime-NtF0YqjH.cjs → piRuntime-B_6TE9Eb.cjs} +4 -4
  159. package/dist/{piRuntime-kLZNpAAl.mjs → piRuntime-BwRdhK_N.mjs} +2 -2
  160. package/dist/{piTerminal-B0fEOV_2.mjs → piTerminal-Bap3R8Re.mjs} +32 -35
  161. package/dist/{piTerminal-9J0GAKzb.cjs → piTerminal-CagmEoez.cjs} +32 -35
  162. package/dist/previewPath-B0rBdhy1.cjs +83 -0
  163. package/dist/previewPath-CXN4Vag0.mjs +81 -0
  164. package/dist/projectPath-BTBIMB57.mjs +10 -0
  165. package/dist/projectPath-ChLhdOyt.cjs +13 -0
  166. package/dist/registerCommonHandlers-BjSV2Skz.cjs +538 -0
  167. package/dist/registerCommonHandlers-CrgvJsOy.mjs +536 -0
  168. package/dist/registerKillSessionHandler-6TC2S3lf.cjs +366 -0
  169. package/dist/registerKillSessionHandler-Cbc8Rgtd.mjs +363 -0
  170. package/dist/remoteSessionClient-BNx78NLb.cjs +634 -0
  171. package/dist/remoteSessionClient-CO7qOjR0.mjs +612 -0
  172. package/dist/resources-BdFBQi8r.mjs +117 -0
  173. package/dist/resources-JDPugcDq.cjs +120 -0
  174. package/dist/run-2l5vSt2h.mjs +5743 -0
  175. package/dist/run-D5xAEWSB.cjs +5766 -0
  176. package/dist/runClaude-BX6ixjtW.cjs +894 -0
  177. package/dist/runClaude-BgN6xo05.mjs +892 -0
  178. package/dist/runClaudeDeps-Bp20MScE.cjs +4168 -0
  179. package/dist/runClaudeDeps-COBBhD9o.mjs +4129 -0
  180. package/dist/{runGemini-F-mqx3_K.cjs → runGemini-CSMPkt0p.cjs} +202 -175
  181. package/dist/{runGemini-DV6Ouadt.mjs → runGemini-Cc2jq-uh.mjs} +58 -31
  182. package/dist/{runOpenClaw-D7MlPS5n.mjs → runOpenClaw-CIlCwdW2.mjs} +31 -32
  183. package/dist/{runOpenClaw-Qqo9j63M.cjs → runOpenClaw-YBwua4Rf.cjs} +64 -65
  184. package/dist/sandbox-C4gXLP1p.cjs +187 -0
  185. package/dist/sandbox-CNkwOtHI.mjs +180 -0
  186. package/dist/selfCheck-CU8xSDsl.cjs +87 -0
  187. package/dist/selfCheck-hJ6PCh7v.mjs +84 -0
  188. package/dist/{send-CLhYXNgy.mjs → send-CGHcKZ-w.mjs} +12 -5
  189. package/dist/{send-4qJTCAYW.cjs → send-DY9Nr-x4.cjs} +16 -9
  190. package/dist/server-II51Mimf.cjs +407 -0
  191. package/dist/server-m2b5pamZ.mjs +404 -0
  192. package/dist/sessionLock-7ePAYDOg.cjs +205 -0
  193. package/dist/sessionLock-Cw6FmbMv.mjs +197 -0
  194. package/dist/sessionModeFile-BVCV5f7E.cjs +36 -0
  195. package/dist/sessionModeFile-CDmDyRkD.mjs +32 -0
  196. package/dist/sessionOps-C_f1wKOr.mjs +760 -0
  197. package/dist/sessionOps-DJdExmBy.cjs +783 -0
  198. package/dist/sessionScanner-CaAHLyNV.mjs +206 -0
  199. package/dist/sessionScanner-D1goKdd3.cjs +209 -0
  200. package/dist/{sessions-Bh1pyddi.cjs → sessions-DGs6ALNo.cjs} +37 -28
  201. package/dist/{sessions-CzIH2rGp.mjs → sessions-DnvmWUel.mjs} +17 -8
  202. package/dist/setupOfflineReconnection-CVViqZft.mjs +72 -0
  203. package/dist/setupOfflineReconnection-R7XuR_sj.cjs +74 -0
  204. package/dist/smallFastModel-BLNgMrwR.mjs +18 -0
  205. package/dist/smallFastModel-D_uxGMo3.cjs +21 -0
  206. package/dist/{spawn-CmFOSVdW.cjs → spawn-CXTH7qg1.cjs} +61 -65
  207. package/dist/{spawn-CPIWlPOM.mjs → spawn-DNYSvFtC.mjs} +35 -40
  208. package/dist/spawnAgents-BGQiEF-w.cjs +52 -0
  209. package/dist/spawnAgents-DZzZ9jMI.mjs +45 -0
  210. package/dist/spawnHappyCLI-BhYj84rv.cjs +66 -0
  211. package/dist/spawnHappyCLI-cqWQbwsb.mjs +64 -0
  212. package/dist/specialCommands-BSqhYg5X.mjs +52 -0
  213. package/dist/specialCommands-DSsTeRej.cjs +54 -0
  214. package/dist/startFileWatcher-CKKx-8ZO.cjs +71 -0
  215. package/dist/startFileWatcher-CdegMbJj.mjs +69 -0
  216. package/dist/startupPlan-BLMbfQIH.cjs +12 -0
  217. package/dist/startupPlan-DFMyNgAs.mjs +10 -0
  218. package/dist/streamRelay-BiKw59Cc.cjs +233 -0
  219. package/dist/streamRelay-FPVbHpbM.mjs +231 -0
  220. package/dist/sync-CVk4QERO.cjs +71 -0
  221. package/dist/sync-CxD-w_40.mjs +69 -0
  222. package/dist/systemPrompt-BygJcmbi.cjs +97 -0
  223. package/dist/systemPrompt-DmtypUc7.mjs +94 -0
  224. package/dist/{teams-CEahj4cm.mjs → teams-BOC6nIPL.mjs} +9 -40
  225. package/dist/{teams-CB1R9-Z9.cjs → teams-BsvpOBfn.cjs} +14 -45
  226. package/dist/template-BaHAmH2K.cjs +129 -0
  227. package/dist/template-CiOPa2rd.mjs +121 -0
  228. package/dist/{terminalTitleSuggest-DKgX3osW.mjs → terminalTitleSuggest-CeKsX_V6.mjs} +1 -9
  229. package/dist/{terminalTitleSuggest-Dji8I0Jy.cjs → terminalTitleSuggest-DhvRFX3H.cjs} +0 -10
  230. package/dist/terminals-B_bfC9c2.cjs +250 -0
  231. package/dist/terminals-Dlg0x3nY.mjs +235 -0
  232. package/dist/time-BZNdNiIV.mjs +38 -0
  233. package/dist/time-CNRE4ChD.cjs +42 -0
  234. package/dist/titleGenerator-CFRhU-xq.cjs +172 -0
  235. package/dist/titleGenerator-ox6ptCsp.mjs +166 -0
  236. package/dist/tmuxSocket-B8Yx20sT.mjs +19 -0
  237. package/dist/tmuxSocket-D-Xt6Vn-.cjs +24 -0
  238. package/dist/{todo-DqyRI4wP.cjs → todo-B-KB7oAB.cjs} +15 -12
  239. package/dist/{todo-Cknp5D4U.mjs → todo-C5KBVbUw.mjs} +11 -8
  240. package/dist/tools-BZabNIid.mjs +177 -0
  241. package/dist/tools-BmQQUATY.mjs +60 -0
  242. package/dist/tools-CsSovyNp.cjs +180 -0
  243. package/dist/tools-lMDra4Pv.cjs +63 -0
  244. package/dist/trimIdent-4gvk9Wk6.cjs +22 -0
  245. package/dist/trimIdent-BAjmv_TG.mjs +20 -0
  246. package/dist/types-CRS-srZK.cjs +66 -0
  247. package/dist/types-CkqAACXx.mjs +64 -0
  248. package/dist/uninstall-B1WLtC1d.mjs +47 -0
  249. package/dist/uninstall-fvA5aWpU.cjs +49 -0
  250. package/package.json +7 -7
  251. package/scripts/session_hook_forwarder.cjs +9 -2
  252. package/dist/agentGuidance-BRDN1NoZ.cjs +0 -2217
  253. package/dist/agentGuidance-KgvYuF3R.mjs +0 -2145
  254. package/dist/index-BF6WfgV5.mjs +0 -19624
  255. package/dist/index-C-JazrMB.mjs +0 -52
  256. package/dist/index-blDSadUR.cjs +0 -58
  257. package/dist/index-rH3DrQ5B.cjs +0 -19688
  258. package/dist/limits-BH5CV5vR.cjs +0 -2683
  259. package/dist/limits-CjRj8IX5.mjs +0 -2558
package/dist/index.cjs CHANGED
@@ -1,51 +1,10 @@
1
1
  'use strict';
2
2
 
3
- require('chalk');
4
- require('./index-rH3DrQ5B.cjs');
5
- require('./limits-BH5CV5vR.cjs');
6
- require('zod');
7
- require('./types-BbvK1Tr_.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-Cl5BEP5x.cjs');
4
+ require('./index-gNTWtSKN.cjs');
5
+ require('node:module');
14
6
  require('node:fs');
15
- require('./terminalTitleSuggest-Dji8I0Jy.cjs');
16
- require('path');
17
- require('url');
18
- require('./agentGuidance-BRDN1NoZ.cjs');
19
7
  require('node:fs/promises');
20
- require('axios');
21
- require('socket.io-client');
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 'chalk';
2
- import './index-BF6WfgV5.mjs';
3
- import './limits-CjRj8IX5.mjs';
4
- import 'zod';
5
- import './types-Dh-s4Lqs.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-uOg9SCKi.mjs';
2
+ import './index-Cqx-Raq6.mjs';
3
+ import 'node:module';
12
4
  import 'node:fs';
13
- import './terminalTitleSuggest-DKgX3osW.mjs';
14
- import 'path';
15
- import 'url';
16
- import './agentGuidance-KgvYuF3R.mjs';
17
5
  import 'node:fs/promises';
18
- import 'axios';
19
- import 'socket.io-client';
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 './index-BF6WfgV5.mjs';
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-Bc8-u1w0.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-v9f8LM9T.cjs');
11
+ require('node:fs');
12
+ require('node:os');
13
+ require('node:path');
14
+ require('./package-Cl5BEP5x.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-fXoNzNuB.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-DoWFJUPm.mjs';
9
+ import 'node:fs';
10
+ import 'node:os';
11
+ import 'node:path';
12
+ import './package-uOg9SCKi.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 index = require('./index-rH3DrQ5B.cjs');
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: index.TEAM_SKILL, managedSessions: "Team tools are injected by Very Happy. Standalone agents require a managed session connection." }, options);
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 terminalTitleSuggest = require('./terminalTitleSuggest-Dji8I0Jy.cjs');
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(terminalTitleSuggest.projectPath(), "dist/piExtension.mjs"));
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 './terminalTitleSuggest-DKgX3osW.mjs';
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 terminalTitleSuggest = require('./terminalTitleSuggest-Dji8I0Jy.cjs');
9
- var index = require('./index-rH3DrQ5B.cjs');
8
+ var projectPath = require('./projectPath-ChLhdOyt.cjs');
9
+ var doctorReadiness = require('./doctorReadiness-BCZGcN0a.cjs');
10
10
  require('path');
11
11
  require('url');
12
- require('zod');
13
- require('node:crypto');
14
- require('./types-BbvK1Tr_.cjs');
15
- require('axios');
16
- require('./limits-BH5CV5vR.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-BRDN1NoZ.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 (!index.tmuxSupportsSessionEnv(version)) return { ready: false, version, reason: "too-old" };
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(terminalTitleSuggest.projectPath(), "scripts", TERMINAL_MIRROR_FORWARDER_BASENAME);
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 './terminalTitleSuggest-DKgX3osW.mjs';
7
- import { b as tmuxSupportsSessionEnv } from './index-BF6WfgV5.mjs';
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 'zod';
11
- import 'node:crypto';
12
- import './types-Dh-s4Lqs.mjs';
13
- import 'axios';
14
- import './limits-CjRj8IX5.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-KgvYuF3R.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"];