volute 0.33.0 → 0.35.0

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 (255) hide show
  1. package/README.md +7 -6
  2. package/dist/accept-ZBDVVCEU.js +42 -0
  3. package/dist/activity-events-ZW4SDL2C.js +15 -0
  4. package/dist/{ai-service-SBY2WG7O.js → ai-service-LURBEDDB.js} +6 -6
  5. package/dist/{api-client-YPKOZP2O.js → api-client-3A77HMH7.js} +2 -2
  6. package/dist/api.d.ts +1 -5195
  7. package/dist/{archive-INXYFVCW.js → archive-ESU2FUN4.js} +4 -4
  8. package/dist/{auth-GKCDSO4T.js → auth-WX4TESEI.js} +6 -6
  9. package/dist/bridge-PXIO6PS2.js +206 -0
  10. package/dist/chat-QXAJF3FU.js +51 -0
  11. package/dist/{chunk-NNB4WIG7.js → chunk-2TGZJFAT.js} +3 -3
  12. package/dist/{chunk-6LXAAQ43.js → chunk-33ODGMFZ.js} +1 -1
  13. package/dist/{chunk-RPZZSXV3.js → chunk-5N7Y5WAM.js} +21 -2
  14. package/dist/chunk-5T5YMX6S.js +23 -0
  15. package/dist/{chunk-7J3HEVR7.js → chunk-5XJYUFZH.js} +28 -16
  16. package/dist/chunk-7KJOFUNN.js +22 -0
  17. package/dist/{chunk-2NGTS5UU.js → chunk-A2ZLHBHG.js} +2 -2
  18. package/dist/{chunk-KIEPMIM5.js → chunk-AN2W47GW.js} +2 -2
  19. package/dist/{chunk-G53F3JA4.js → chunk-AOB6GVRM.js} +1 -1
  20. package/dist/{chunk-LRCG2JLP.js → chunk-BDYXIWA5.js} +9 -5
  21. package/dist/{chunk-YUIHSKR6.js → chunk-BKF4WQCY.js} +2 -2
  22. package/dist/{chunk-N432I7QH.js → chunk-BMZQYACC.js} +2 -2
  23. package/dist/{chunk-NAOW2CLO.js → chunk-BTY4WNFE.js} +1 -1
  24. package/dist/{chunk-ALEF47VT.js → chunk-BV65KRHM.js} +2 -2
  25. package/dist/{chunk-KVK2DLWI.js → chunk-CORXD635.js} +4 -4
  26. package/dist/{chunk-PVY5W6QN.js → chunk-F7ZNLYKZ.js} +2 -2
  27. package/dist/{chunk-QTUVYI7W.js → chunk-FT5KETXZ.js} +3 -3
  28. package/dist/{chunk-C7I35G4R.js → chunk-IJHIXLVN.js} +44 -8
  29. package/dist/{chunk-JUKK7FPS.js → chunk-J6CJQDWI.js} +37 -28
  30. package/dist/{chunk-4RQBJWQX.js → chunk-LOPXTW6H.js} +1 -1
  31. package/dist/{chunk-RSX4OPZY.js → chunk-MDJGMOSD.js} +8 -137
  32. package/dist/{chunk-LOEJ4HPQ.js → chunk-N446KRP7.js} +3 -3
  33. package/dist/{chunk-I5KY25PQ.js → chunk-N5LMGYXX.js} +2 -2
  34. package/dist/{chunk-G6BSYHPK.js → chunk-NJK5SDGR.js} +1 -1
  35. package/dist/{chunk-D424ZQGI.js → chunk-O7IGP7ZW.js} +11 -3
  36. package/dist/{chunk-M7UL5S3Q.js → chunk-OTC67N2Z.js} +2 -2
  37. package/dist/{chunk-GY5HBI7A.js → chunk-PWQ2ITYG.js} +4 -4
  38. package/dist/{chunk-KTLFDYPT.js → chunk-QCH6K235.js} +1 -1
  39. package/dist/chunk-QHG4OMZL.js +145 -0
  40. package/dist/{chunk-SKLSMHXO.js → chunk-QWTR6AWZ.js} +3 -3
  41. package/dist/chunk-TXSA4Q3V.js +116 -0
  42. package/dist/{chunk-VH33ZWMW.js → chunk-VHJRZM2S.js} +2 -2
  43. package/dist/{chunk-SSI47XP2.js → chunk-VHWGEJ4V.js} +1 -1
  44. package/dist/chunk-VY3RB2V7.js +164 -0
  45. package/dist/chunk-WJPROOU5.js +8314 -0
  46. package/dist/{chunk-RVGLDGMI.js → chunk-WZRZFFCL.js} +25 -27
  47. package/dist/{chunk-JYVGHWEJ.js → chunk-XRQSAMX2.js} +4 -4
  48. package/dist/{chunk-OYAKCAVY.js → chunk-ZSR72JB3.js} +1 -1
  49. package/dist/{chunk-UKVWJRKN.js → chunk-ZX7EAV5J.js} +17 -7
  50. package/dist/cli.js +90 -29
  51. package/dist/clock-HSEKS5AR.js +289 -0
  52. package/dist/{cloud-sync-4NWLMFVH.js → cloud-sync-6JL4C24T.js} +22 -23
  53. package/dist/config-UTS7QULS.js +76 -0
  54. package/dist/connectors/discord-bridge.js +4 -4
  55. package/dist/connectors/slack-bridge.js +4 -4
  56. package/dist/connectors/telegram-bridge.js +4 -4
  57. package/dist/{conversations-AWI5SZW2.js → conversations-2PW57WO2.js} +6 -6
  58. package/dist/create-5BPOOJAN.js +75 -0
  59. package/dist/create-UVCK2CS6.js +50 -0
  60. package/dist/daemon-client-RVIKXGFQ.js +12 -0
  61. package/dist/daemon-restart-HSZ3BCX5.js +65 -0
  62. package/dist/daemon.js +1349 -1211
  63. package/dist/db-BDMH4SZ2.js +20 -0
  64. package/dist/db-BVBJ57TU.js +9 -0
  65. package/dist/delete-L5PAVDGQ.js +42 -0
  66. package/dist/delivery-manager-H5ZVBMCQ.js +31 -0
  67. package/dist/{delivery-router-FL45JL7N.js → delivery-router-HEJSJAHQ.js} +5 -5
  68. package/dist/down-74VXM45A.js +17 -0
  69. package/dist/env-E4XHO2BI.js +223 -0
  70. package/dist/exec-PY7THYH4.js +17 -0
  71. package/dist/export-OAS6QVBN.js +113 -0
  72. package/dist/extension-D74CNM7G.js +89 -0
  73. package/dist/extensions-XDDFY72A.js +49 -0
  74. package/dist/files-CWTK6V3H.js +53 -0
  75. package/dist/import-5A3T7QV4.js +143 -0
  76. package/dist/{isolation-LLAYQYDY.js → isolation-TK5RX2WM.js} +4 -4
  77. package/dist/join-DF5XSJAC.js +67 -0
  78. package/dist/lib-DYEZMGW7.js +6588 -0
  79. package/dist/list-PDMQM7ZV.js +53 -0
  80. package/dist/login-7TE6CIZF.js +60 -0
  81. package/dist/login-GOTAYLXP.js +51 -0
  82. package/dist/logout-6KIA74EV.js +29 -0
  83. package/dist/logout-T4XS6LRU.js +50 -0
  84. package/dist/message-delivery-GRC4W6P7.js +41 -0
  85. package/dist/mind-5IEYKV7I.js +97 -0
  86. package/dist/mind-activity-tracker-QBLIV7ZJ.js +18 -0
  87. package/dist/mind-history-IE2QH7U5.js +275 -0
  88. package/dist/mind-list-GEWHWAL4.js +38 -0
  89. package/dist/mind-manager-HFLB5653.js +31 -0
  90. package/dist/mind-profile-DCBDVF5B.js +53 -0
  91. package/dist/mind-service-X2CAA6W6.js +37 -0
  92. package/dist/mind-sleep-ITCF6OQA.js +47 -0
  93. package/dist/mind-status-X4SX3YUG.js +65 -0
  94. package/dist/mind-wake-KXMKMGWX.js +42 -0
  95. package/dist/{package-U3VFO273.js → package-D2FSVFAX.js} +11 -8
  96. package/dist/read-67VRP2DO.js +91 -0
  97. package/dist/{read-stdin-HQJ7774D.js → read-stdin-3X5VYKNS.js} +2 -2
  98. package/dist/register-SB7NXCOE.js +51 -0
  99. package/dist/{registry-PJ4S5PHQ.js → registry-GBSNW3HG.js} +3 -3
  100. package/dist/reject-MUR2KWJ4.js +40 -0
  101. package/dist/restart-5EGG4JXU.js +42 -0
  102. package/dist/{sandbox-GJOK4QLQ.js → sandbox-R37VIU36.js} +6 -6
  103. package/dist/scheduler-Y7O4CJXL.js +31 -0
  104. package/dist/{schema-PA3M5ZKH.js → schema-XVZ2CLKW.js} +4 -2
  105. package/dist/{seed-QDYVLG74.js → seed-EQORWX77.js} +3 -3
  106. package/dist/seed-check-KJNTL72M.js +35 -0
  107. package/dist/seed-cmd-ZM2XGVU2.js +30 -0
  108. package/dist/seed-create-DRWGGHEI.js +113 -0
  109. package/dist/seed-sprout-JYXGXOP3.js +148 -0
  110. package/dist/send-JBJJQ7CA.js +409 -0
  111. package/dist/service-WNPCNHOX.js +121 -0
  112. package/dist/{setup-XMCBE3LF.js → setup-BJ4YAY26.js} +155 -129
  113. package/dist/{setup-TISPCO22.js → setup-RHJRFURI.js} +4 -4
  114. package/dist/skill-TAAKEYBV.js +389 -0
  115. package/dist/skills/plan-coordinator/SKILL.md +60 -0
  116. package/dist/skills/volute-mind/SKILL.md +9 -227
  117. package/dist/skills/volute-mind/references/extensions.md +34 -0
  118. package/dist/skills/volute-mind/references/integrations.md +48 -0
  119. package/dist/skills/volute-mind/references/routing.md +86 -0
  120. package/dist/skills/volute-mind/references/sleep.md +33 -0
  121. package/dist/skills/volute-mind/references/variants.md +31 -0
  122. package/dist/{skills-7FV7EJTE.js → skills-EKMCQ46K.js} +12 -8
  123. package/dist/sleep-manager-7KFK3USC.js +35 -0
  124. package/dist/spirit-ZFRDXMG7.js +23 -0
  125. package/dist/split-AWVOYOPZ.js +64 -0
  126. package/dist/{sprout-WKLZXUIQ.js → sprout-HE4TITMK.js} +3 -3
  127. package/dist/start-3UXOPXQG.js +39 -0
  128. package/dist/status-ZK34WYIM.js +125 -0
  129. package/dist/stop-3XYIBGFM.js +41 -0
  130. package/dist/system-chat-IDPHYHY4.js +35 -0
  131. package/dist/systems-O43WGQY6.js +52 -0
  132. package/dist/{tailscale-XHQBZROW.js → tailscale-ZIZ2HWJ5.js} +5 -5
  133. package/dist/template-hash-A7FNHTB7.js +9 -0
  134. package/dist/up-77ICEDEW.js +19 -0
  135. package/dist/update-ANE5ZM7F.js +225 -0
  136. package/dist/{update-check-ZD6OOIYQ.js → update-check-UV55CBEP.js} +4 -4
  137. package/dist/upgrade-ZMDGC7M2.js +74 -0
  138. package/dist/variant-QWL2WSRI.js +62 -0
  139. package/dist/{version-notify-NBI2MTJO.js → version-notify-FXSEMXWW.js} +29 -28
  140. package/dist/{volute-config-HD7WWUQC.js → volute-config-D2XVS2YI.js} +2 -2
  141. package/dist/web-assets/assets/index-BhxWKvbB.css +1 -0
  142. package/dist/web-assets/assets/index-CHVKJ9II.js +75 -0
  143. package/dist/web-assets/ext-theme.css +48 -9
  144. package/dist/web-assets/index.html +2 -2
  145. package/dist/web-assets/sw.js +117 -0
  146. package/drizzle/0005_meta_summaries.sql +15 -0
  147. package/drizzle/meta/0005_snapshot.json +7 -0
  148. package/drizzle/meta/_journal.json +7 -0
  149. package/package.json +10 -7
  150. package/packages/extensions/pages/dist/ui/assets/index-DKZLNMED.js +2 -0
  151. package/packages/extensions/pages/dist/ui/index.html +1 -1
  152. package/packages/extensions/pages/skills/pages/SKILL.md +84 -9
  153. package/packages/extensions/plan/dist/ui/assets/index-CJj2gZnZ.css +1 -0
  154. package/packages/extensions/plan/dist/ui/assets/index-FMEJmvQz.js +61 -0
  155. package/packages/extensions/plan/dist/ui/index.html +14 -0
  156. package/packages/extensions/plan/skills/plan/SKILL.md +43 -0
  157. package/packages/extensions/plan/skills/plan/scripts/plan-hook.sh +37 -0
  158. package/templates/_base/home/VOLUTE.md +12 -19
  159. package/templates/_base/src/lib/auto-commit.ts +8 -8
  160. package/templates/_base/src/lib/context-breakdown.ts +450 -0
  161. package/templates/_base/src/lib/format-prefix.ts +17 -0
  162. package/templates/_base/src/lib/hook-loader.ts +8 -2
  163. package/templates/_base/src/lib/router.ts +75 -33
  164. package/templates/_base/src/lib/routing.ts +4 -1
  165. package/templates/_base/src/lib/startup.ts +16 -8
  166. package/templates/_base/src/lib/types.ts +2 -1
  167. package/templates/_base/src/lib/volute-server.ts +75 -8
  168. package/templates/claude/.init/CLAUDE.md +4 -10
  169. package/templates/claude/package.json.tmpl +1 -0
  170. package/templates/claude/src/agent.ts +108 -33
  171. package/templates/claude/src/lib/hooks/reply-instructions.ts +27 -7
  172. package/templates/claude/src/lib/stream-consumer.ts +2 -2
  173. package/templates/claude/src/server.ts +1 -0
  174. package/templates/codex/package.json.tmpl +1 -0
  175. package/templates/codex/src/agent.ts +80 -8
  176. package/templates/codex/src/server.ts +1 -4
  177. package/templates/pi/package.json.tmpl +1 -0
  178. package/templates/pi/src/agent.ts +115 -36
  179. package/templates/pi/src/lib/event-handler.ts +22 -7
  180. package/templates/pi/src/lib/reply-instructions-extension.ts +23 -4
  181. package/templates/pi/src/lib/subagents.ts +20 -17
  182. package/templates/pi/src/server.ts +2 -5
  183. package/dist/accept-D5VBM7JW.js +0 -42
  184. package/dist/activity-events-XJO3P4RR.js +0 -15
  185. package/dist/bridge-TXWWPPOJ.js +0 -207
  186. package/dist/chat-U5ZOME3O.js +0 -68
  187. package/dist/chunk-3Z2DPESO.js +0 -3634
  188. package/dist/chunk-A2A4KLFE.js +0 -1528
  189. package/dist/chunk-K3NQKI34.js +0 -10
  190. package/dist/chunk-NPKSDYA2.js +0 -156
  191. package/dist/chunk-PB65JZK2.js +0 -85
  192. package/dist/clock-BVH3V6E3.js +0 -266
  193. package/dist/config-H2H4UIF7.js +0 -72
  194. package/dist/create-2FK7Z46Y.js +0 -44
  195. package/dist/create-YWD2TIP4.js +0 -71
  196. package/dist/daemon-client-6QXHZ7US.js +0 -12
  197. package/dist/daemon-restart-GOBUKLX7.js +0 -52
  198. package/dist/db-F34YLV7D.js +0 -9
  199. package/dist/db-RA45JBFG.js +0 -16
  200. package/dist/delete-QTGWEDBI.js +0 -35
  201. package/dist/delivery-manager-PFAKEJTC.js +0 -32
  202. package/dist/down-FWWTEKXM.js +0 -15
  203. package/dist/env-JCOF2222.js +0 -191
  204. package/dist/export-SUYRLI5Q.js +0 -112
  205. package/dist/extension-OBTGKQQD.js +0 -175
  206. package/dist/extensions-KYNTVTMO.js +0 -30
  207. package/dist/files-65PMW5IK.js +0 -47
  208. package/dist/history-DKCDI3JO.js +0 -128
  209. package/dist/import-DDUFE7AY.js +0 -23
  210. package/dist/join-I5QEE3LG.js +0 -66
  211. package/dist/list-JQ463EDA.js +0 -41
  212. package/dist/login-D7ETSU4R.js +0 -47
  213. package/dist/login-RIJF2F4G.js +0 -47
  214. package/dist/logout-5MLHZALK.js +0 -40
  215. package/dist/logout-UZJRGY4Z.js +0 -21
  216. package/dist/message-delivery-DFF5SJRM.js +0 -42
  217. package/dist/mind-IOJFLEM5.js +0 -108
  218. package/dist/mind-activity-tracker-F6O4Q2SL.js +0 -18
  219. package/dist/mind-list-WUPMQDYQ.js +0 -30
  220. package/dist/mind-manager-NBJF5D26.js +0 -32
  221. package/dist/mind-profile-P67FEHOY.js +0 -47
  222. package/dist/mind-service-2MQ6UK5N.js +0 -38
  223. package/dist/mind-sleep-WW2IX7JT.js +0 -42
  224. package/dist/mind-status-L3EFFRPR.js +0 -56
  225. package/dist/mind-wake-VSSGW465.js +0 -37
  226. package/dist/read-EBY56C33.js +0 -75
  227. package/dist/register-HD74C4TT.js +0 -47
  228. package/dist/reject-UJKFBHRO.js +0 -40
  229. package/dist/restart-3UCMRUVC.js +0 -33
  230. package/dist/scheduler-ZZ7XGQG6.js +0 -32
  231. package/dist/seed-check-S2IX25RL.js +0 -32
  232. package/dist/seed-cmd-DKOUFEAU.js +0 -36
  233. package/dist/seed-create-4XBBOLRH.js +0 -112
  234. package/dist/seed-sprout-GQEIIQRT.js +0 -132
  235. package/dist/send-QIV2INHB.js +0 -373
  236. package/dist/skill-PSQGRRJX.js +0 -358
  237. package/dist/skills/shared-files/SKILL.md +0 -44
  238. package/dist/skills/shared-files/scripts/merge.ts +0 -72
  239. package/dist/skills/shared-files/scripts/pull.ts +0 -52
  240. package/dist/sleep-manager-JTXSN7NV.js +0 -36
  241. package/dist/spirit-VRONKFMF.js +0 -23
  242. package/dist/split-STOROBYJ.js +0 -63
  243. package/dist/start-K2NCUUCG.js +0 -33
  244. package/dist/status-3JBTFSMI.js +0 -115
  245. package/dist/stop-H26JZDXF.js +0 -32
  246. package/dist/system-chat-JAPOJ3KE.js +0 -36
  247. package/dist/systems-XRI52VCH.js +0 -61
  248. package/dist/template-hash-A6VVKOXJ.js +0 -9
  249. package/dist/up-M5AS6SBV.js +0 -18
  250. package/dist/update-UD543CXX.js +0 -215
  251. package/dist/upgrade-O4Q7WJM3.js +0 -67
  252. package/dist/variant-7TGZHOU3.js +0 -41
  253. package/dist/web-assets/assets/index-CWJrVveV.css +0 -1
  254. package/dist/web-assets/assets/index-DJt14FRI.js +0 -75
  255. package/packages/extensions/pages/dist/ui/assets/index-tLTROSk5.js +0 -2
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- var __defProp = Object.defineProperty;
3
- var __export = (target, all) => {
4
- for (var name in all)
5
- __defProp(target, name, { get: all[name], enumerable: true });
6
- };
7
-
8
- export {
9
- __export
10
- };
@@ -1,156 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- getServiceMode,
4
- modeLabel,
5
- pollHealth,
6
- startService
7
- } from "./chunk-NNB4WIG7.js";
8
- import {
9
- readGlobalConfig
10
- } from "./chunk-N432I7QH.js";
11
- import {
12
- parseArgs
13
- } from "./chunk-D424ZQGI.js";
14
- import {
15
- voluteHome,
16
- voluteSystemDir
17
- } from "./chunk-LRCG2JLP.js";
18
-
19
- // src/commands/up.ts
20
- import { spawn } from "child_process";
21
- import { existsSync, mkdirSync, openSync, readFileSync } from "fs";
22
- import { dirname, resolve } from "path";
23
- async function run(args) {
24
- const { flags } = parseArgs(args, {
25
- port: { type: "number" },
26
- host: { type: "string" },
27
- foreground: { type: "boolean" },
28
- tailscale: { type: "boolean" },
29
- "no-sandbox": { type: "boolean" }
30
- });
31
- const mode = getServiceMode();
32
- if (!flags.foreground && mode !== "manual") {
33
- console.log(`Starting volute (${modeLabel(mode)})...`);
34
- try {
35
- await startService(mode);
36
- } catch (err) {
37
- console.error(`Failed to start service: ${err instanceof Error ? err.message : err}`);
38
- process.exit(1);
39
- }
40
- const config2 = readGlobalConfig();
41
- const h = flags.host ?? config2.hostname ?? "127.0.0.1";
42
- const p = flags.port ?? config2.port ?? 1618;
43
- if (await pollHealth(h, p)) {
44
- console.log(`Volute daemon running on ${h}:${p}`);
45
- } else {
46
- console.error("Service started but daemon did not become healthy within 30s.");
47
- process.exit(1);
48
- }
49
- return;
50
- }
51
- const config = readGlobalConfig();
52
- const port = flags.port ?? config.port ?? 1618;
53
- const hostname = flags.host ?? config.hostname ?? "127.0.0.1";
54
- const home = voluteHome();
55
- const systemDir = voluteSystemDir();
56
- const pidPath = resolve(systemDir, "daemon.pid");
57
- if (existsSync(pidPath)) {
58
- try {
59
- const pid = parseInt(readFileSync(pidPath, "utf-8").trim(), 10);
60
- process.kill(pid, 0);
61
- console.error(`Daemon already running (pid ${pid}). Use 'volute down' first.`);
62
- process.exit(1);
63
- } catch {
64
- }
65
- }
66
- const pollHost = hostname === "0.0.0.0" || hostname === "::" ? "localhost" : hostname;
67
- let tailscaleHostname;
68
- if (flags.tailscale) {
69
- try {
70
- const { execFile } = await import("child_process");
71
- const { promisify } = await import("util");
72
- const execFileAsync = promisify(execFile);
73
- const { stdout } = await execFileAsync("tailscale", ["status", "--json"]);
74
- const status = JSON.parse(stdout);
75
- tailscaleHostname = status.Self?.DNSName?.replace(/\.$/, "");
76
- } catch (err) {
77
- console.error(`Tailscale setup failed: ${err instanceof Error ? err.message : err}`);
78
- process.exit(1);
79
- }
80
- }
81
- try {
82
- const res = await fetch(`http://${pollHost}:${port}/api/health`);
83
- if (res.ok) {
84
- const body = await res.json().catch(() => null);
85
- if (body && body.ok) {
86
- console.error(
87
- `Port ${port} is already in use by a Volute daemon. Use 'volute down' first, or kill the process on that port.`
88
- );
89
- process.exit(1);
90
- }
91
- }
92
- } catch {
93
- }
94
- if (flags["no-sandbox"]) {
95
- process.env.VOLUTE_SANDBOX = "0";
96
- }
97
- if (flags.foreground) {
98
- const { startDaemon } = await import("./daemon.js");
99
- await startDaemon({ port, hostname, foreground: true, tailscale: flags.tailscale });
100
- return;
101
- }
102
- const daemonModule = resolve(dirname(new URL(import.meta.url).pathname), "daemon.js");
103
- if (!existsSync(daemonModule)) {
104
- console.error("Could not find daemon module. Run `npm run build` first.");
105
- process.exit(1);
106
- }
107
- mkdirSync(home, { recursive: true });
108
- mkdirSync(systemDir, { recursive: true });
109
- const logFile = resolve(systemDir, "daemon.log");
110
- const logFd = openSync(logFile, "a");
111
- const daemonArgs = [daemonModule, "--port", String(port), "--host", hostname];
112
- if (flags.tailscale) daemonArgs.push("--tailscale");
113
- if (flags["no-sandbox"]) daemonArgs.push("--no-sandbox");
114
- const child = spawn(process.execPath, daemonArgs, {
115
- stdio: ["ignore", "ignore", logFd],
116
- detached: true
117
- });
118
- child.unref();
119
- const pollPort = flags.tailscale ? port + 1 : port;
120
- const url = `http://localhost:${pollPort}/api/health`;
121
- const maxWait = 3e4;
122
- const start = Date.now();
123
- while (Date.now() - start < maxWait) {
124
- try {
125
- const res = await fetch(url);
126
- if (res.ok) {
127
- const displayHost = tailscaleHostname ?? hostname;
128
- const displayProto = flags.tailscale ? "https" : "http";
129
- console.log(
130
- `Volute daemon running on ${displayProto}://${displayHost}:${port} (pid ${child.pid})`
131
- );
132
- console.log(`Logs: ${logFile}`);
133
- return;
134
- }
135
- } catch {
136
- }
137
- await new Promise((r) => setTimeout(r, 500));
138
- }
139
- if (child.pid) {
140
- try {
141
- process.kill(-child.pid, "SIGTERM");
142
- } catch {
143
- try {
144
- process.kill(child.pid, "SIGTERM");
145
- } catch {
146
- }
147
- }
148
- }
149
- console.error("Daemon started but did not become healthy within 30s.");
150
- console.error(`Check logs: ${logFile}`);
151
- process.exit(1);
152
- }
153
-
154
- export {
155
- run
156
- };
@@ -1,85 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // packages/extensions/pages/src/db.ts
4
- function initDb(db) {
5
- db.exec(`
6
- CREATE TABLE IF NOT EXISTS published_pages (
7
- id INTEGER PRIMARY KEY AUTOINCREMENT,
8
- mind TEXT NOT NULL,
9
- file TEXT NOT NULL,
10
- published_at TEXT NOT NULL DEFAULT (datetime('now')),
11
- updated_at TEXT NOT NULL DEFAULT (datetime('now'))
12
- );
13
- CREATE UNIQUE INDEX IF NOT EXISTS idx_pp_mind_file ON published_pages(mind, file);
14
- CREATE INDEX IF NOT EXISTS idx_pp_updated_at ON published_pages(updated_at);
15
- `);
16
- }
17
- function getPublishedPages(db, mind) {
18
- return db.prepare(
19
- "SELECT file, published_at, updated_at FROM published_pages WHERE mind = ? ORDER BY file"
20
- ).all(mind);
21
- }
22
- function getRecentPages(db, opts) {
23
- const limit = opts?.limit ?? 10;
24
- if (opts?.mind) {
25
- return db.prepare(
26
- "SELECT mind, file, updated_at FROM published_pages WHERE mind = ? ORDER BY updated_at DESC LIMIT ?"
27
- ).all(opts.mind, limit);
28
- }
29
- return db.prepare("SELECT mind, file, updated_at FROM published_pages ORDER BY updated_at DESC LIMIT ?").all(limit);
30
- }
31
- function getAllSites(db) {
32
- const rows = db.prepare("SELECT mind, file, updated_at FROM published_pages ORDER BY mind, file").all();
33
- const siteMap = /* @__PURE__ */ new Map();
34
- for (const row of rows) {
35
- let files = siteMap.get(row.mind);
36
- if (!files) {
37
- files = [];
38
- siteMap.set(row.mind, files);
39
- }
40
- files.push({ file: row.file, updated_at: row.updated_at });
41
- }
42
- return Array.from(siteMap.entries()).map(([mind, files]) => ({ mind, files }));
43
- }
44
- function syncPublishedPages(db, mind, htmlFiles) {
45
- const existing = new Map(
46
- db.prepare("SELECT file, updated_at FROM published_pages WHERE mind = ?").all(mind).map((r) => [r.file, r.updated_at])
47
- );
48
- const newSet = new Set(htmlFiles);
49
- const added = [];
50
- const updated = [];
51
- const removed = [];
52
- db.exec("BEGIN");
53
- try {
54
- for (const file of htmlFiles) {
55
- if (existing.has(file)) {
56
- db.prepare(
57
- "UPDATE published_pages SET updated_at = datetime('now') WHERE mind = ? AND file = ?"
58
- ).run(mind, file);
59
- updated.push(file);
60
- } else {
61
- db.prepare("INSERT INTO published_pages (mind, file) VALUES (?, ?)").run(mind, file);
62
- added.push(file);
63
- }
64
- }
65
- for (const [file] of existing) {
66
- if (!newSet.has(file)) {
67
- db.prepare("DELETE FROM published_pages WHERE mind = ? AND file = ?").run(mind, file);
68
- removed.push(file);
69
- }
70
- }
71
- db.exec("COMMIT");
72
- } catch (err) {
73
- db.exec("ROLLBACK");
74
- throw err;
75
- }
76
- return { added, removed, updated };
77
- }
78
-
79
- export {
80
- initDb,
81
- getPublishedPages,
82
- getRecentPages,
83
- getAllSites,
84
- syncPublishedPages
85
- };
@@ -1,266 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- resolveMindName
4
- } from "./chunk-NAOW2CLO.js";
5
- import {
6
- getClient,
7
- urlOf
8
- } from "./chunk-4RQBJWQX.js";
9
- import {
10
- daemonFetch
11
- } from "./chunk-UKVWJRKN.js";
12
- import {
13
- parseArgs
14
- } from "./chunk-D424ZQGI.js";
15
- import "./chunk-LRCG2JLP.js";
16
- import "./chunk-RPZZSXV3.js";
17
- import "./chunk-K3NQKI34.js";
18
-
19
- // src/commands/clock.ts
20
- import { CronExpressionParser } from "cron-parser";
21
- async function run(args) {
22
- const subcommand = args[0];
23
- switch (subcommand) {
24
- case "status":
25
- await clockStatus(args.slice(1));
26
- break;
27
- case "list":
28
- await listSchedules(args.slice(1));
29
- break;
30
- case "add":
31
- await addSchedule(args.slice(1));
32
- break;
33
- case "remove":
34
- await removeSchedule(args.slice(1));
35
- break;
36
- case "sleep":
37
- await import("./mind-sleep-WW2IX7JT.js").then((m) => m.run(args.slice(1)));
38
- break;
39
- case "wake":
40
- await import("./mind-wake-VSSGW465.js").then((m) => m.run(args.slice(1)));
41
- break;
42
- case "--help":
43
- case "-h":
44
- case void 0:
45
- printUsage();
46
- break;
47
- default:
48
- printUsage();
49
- process.exit(1);
50
- }
51
- }
52
- function printUsage() {
53
- console.log(`Usage:
54
- volute clock status [--mind <name>]
55
- volute clock list [--mind <name>]
56
- volute clock add [--mind <name>] --id <name> --cron "..." --message/--script "..." [--session name] [--while-sleeping skip|queue|trigger-wake]
57
- volute clock add [--mind <name>] --id <name> --in <duration> --message/--script "..." [--session name] [--while-sleeping skip|queue|trigger-wake]
58
- volute clock remove [--mind <name>] --id <id>
59
- volute clock sleep [name] [--wake-at <time>]
60
- volute clock wake [name]
61
-
62
- Duration format for --in: 30s, 10m, 1h, 2h30m`);
63
- }
64
- function parseDuration(input) {
65
- const parts = input.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);
66
- if (!parts || parts[0] !== input) return null;
67
- const hours = parseInt(parts[1] || "0", 10);
68
- const minutes = parseInt(parts[2] || "0", 10);
69
- const seconds = parseInt(parts[3] || "0", 10);
70
- const total = hours * 36e5 + minutes * 6e4 + seconds * 1e3;
71
- return total > 0 ? total : null;
72
- }
73
- async function clockStatus(args) {
74
- const { flags } = parseArgs(args, {
75
- mind: { type: "string" }
76
- });
77
- const mind = resolveMindName(flags);
78
- const client = getClient();
79
- const res = await daemonFetch(
80
- urlOf(client.api.minds[":name"].clock.status.$url({ param: { name: mind } }))
81
- );
82
- if (!res.ok) {
83
- const data = await res.json();
84
- console.error(data.error ?? `Failed to get clock status: ${res.status}`);
85
- process.exit(1);
86
- }
87
- const status = await res.json();
88
- if (status.sleep?.sleeping) {
89
- const since = status.sleep.sleepingSince ? new Date(status.sleep.sleepingSince).toLocaleString() : "unknown";
90
- console.log(`Sleep: sleeping since ${since}`);
91
- if (status.sleep.scheduledWakeAt) {
92
- console.log(` Wake at: ${new Date(status.sleep.scheduledWakeAt).toLocaleString()}`);
93
- }
94
- if (status.sleep.voluntaryWakeAt) {
95
- console.log(
96
- ` Voluntary wake at: ${new Date(status.sleep.voluntaryWakeAt).toLocaleString()}`
97
- );
98
- }
99
- if (status.sleep.queuedMessageCount > 0) {
100
- console.log(` Queued messages: ${status.sleep.queuedMessageCount}`);
101
- }
102
- } else {
103
- console.log("Sleep: awake");
104
- }
105
- if (status.sleepConfig?.enabled && status.sleepConfig.schedule) {
106
- console.log(
107
- ` Schedule: sleep ${status.sleepConfig.schedule.sleep}, wake ${status.sleepConfig.schedule.wake}`
108
- );
109
- }
110
- if (status.upcoming.length > 0) {
111
- console.log("\nUpcoming (next 24h):");
112
- for (const u of status.upcoming) {
113
- const time = new Date(u.at).toLocaleString();
114
- const label = u.type === "timer" ? "[timer]" : "[cron]";
115
- console.log(` ${u.id.padEnd(20)} ${label} ${time}`);
116
- }
117
- } else {
118
- console.log("\nNo upcoming events in next 24h.");
119
- }
120
- console.log(`
121
- ${status.schedules.length} schedule(s) configured.`);
122
- }
123
- async function listSchedules(args) {
124
- const { flags } = parseArgs(args, {
125
- mind: { type: "string" }
126
- });
127
- const mind = resolveMindName(flags);
128
- const client = getClient();
129
- const res = await daemonFetch(
130
- urlOf(client.api.minds[":name"].schedules.$url({ param: { name: mind } }))
131
- );
132
- if (!res.ok) {
133
- const data = await res.json();
134
- console.error(data.error ?? `Failed to list schedules: ${res.status}`);
135
- process.exit(1);
136
- }
137
- const schedules = await res.json();
138
- if (schedules.length === 0) {
139
- console.log("No schedules configured.");
140
- return;
141
- }
142
- const idW = Math.max(2, ...schedules.map((s) => s.id.length));
143
- const schedW = Math.max(8, ...schedules.map((s) => (s.cron ?? s.fireAt ?? "").length));
144
- const actionLabel = (s) => s.script ? `[script] ${s.script}` : s.message ?? "";
145
- console.log(`${"ID".padEnd(idW)} ${"SCHEDULE".padEnd(schedW)} ENABLED ACTION`);
146
- for (const s of schedules) {
147
- const sched = s.cron ?? (s.fireAt ? `at ${s.fireAt}` : "");
148
- console.log(
149
- `${s.id.padEnd(idW)} ${sched.padEnd(schedW)} ${String(s.enabled).padEnd(7)} ${actionLabel(s)}`
150
- );
151
- }
152
- }
153
- async function addSchedule(args) {
154
- const { flags } = parseArgs(args, {
155
- mind: { type: "string" },
156
- cron: { type: "string" },
157
- in: { type: "string" },
158
- message: { type: "string" },
159
- script: { type: "string" },
160
- id: { type: "string" },
161
- channel: { type: "string" },
162
- session: { type: "string" },
163
- "while-sleeping": { type: "string" }
164
- });
165
- const mind = resolveMindName(flags);
166
- if (!flags.id) {
167
- console.error("--id is required (a descriptive name for this schedule)");
168
- process.exit(1);
169
- }
170
- if (!flags.cron && !flags.in) {
171
- console.error("--cron or --in is required");
172
- process.exit(1);
173
- }
174
- if (flags.cron && flags.in) {
175
- console.error("--cron and --in are mutually exclusive");
176
- process.exit(1);
177
- }
178
- if (!flags.message && !flags.script) {
179
- console.error("--message or --script is required");
180
- process.exit(1);
181
- }
182
- if (flags.message && flags.script) {
183
- console.error("--message and --script are mutually exclusive");
184
- process.exit(1);
185
- }
186
- const body = {};
187
- if (flags.cron) {
188
- try {
189
- CronExpressionParser.parse(flags.cron);
190
- } catch {
191
- console.error(`Invalid cron expression: ${flags.cron}`);
192
- process.exit(1);
193
- }
194
- body.cron = flags.cron;
195
- }
196
- if (flags.in) {
197
- const durationMs = parseDuration(flags.in);
198
- if (!durationMs) {
199
- console.error(`Invalid duration: ${flags.in} (expected format: 30s, 10m, 1h, 2h30m)`);
200
- process.exit(1);
201
- }
202
- body.fireAt = new Date(Date.now() + durationMs).toISOString();
203
- }
204
- if (flags.message) body.message = flags.message;
205
- if (flags.script) body.script = flags.script;
206
- if (flags.id) body.id = flags.id;
207
- if (flags.channel) body.channel = flags.channel;
208
- if (flags.session) body.session = flags.session;
209
- if (flags["while-sleeping"]) {
210
- const ws = flags["while-sleeping"];
211
- if (!["skip", "queue", "trigger-wake"].includes(ws)) {
212
- console.error(`Invalid --while-sleeping value: ${ws} (must be skip, queue, or trigger-wake)`);
213
- process.exit(1);
214
- }
215
- body.whileSleeping = ws;
216
- }
217
- const client = getClient();
218
- const res = await daemonFetch(
219
- urlOf(client.api.minds[":name"].schedules.$url({ param: { name: mind } })),
220
- {
221
- method: "POST",
222
- headers: { "Content-Type": "application/json" },
223
- body: JSON.stringify(body)
224
- }
225
- );
226
- if (!res.ok) {
227
- const data2 = await res.json();
228
- console.error(data2.error ?? `Failed to add schedule: ${res.status}`);
229
- process.exit(1);
230
- }
231
- const data = await res.json();
232
- if (flags.in) {
233
- console.log(`Timer set: ${data.id} (fires in ${flags.in})`);
234
- } else {
235
- console.log(`Schedule added: ${data.id}`);
236
- }
237
- }
238
- async function removeSchedule(args) {
239
- const { flags } = parseArgs(args, {
240
- mind: { type: "string" },
241
- id: { type: "string" }
242
- });
243
- const mind = resolveMindName(flags);
244
- if (!flags.id) {
245
- console.error("--id is required");
246
- process.exit(1);
247
- }
248
- const client = getClient();
249
- const res = await daemonFetch(
250
- urlOf(
251
- client.api.minds[":name"].schedules[":id"].$url({
252
- param: { name: mind, id: flags.id }
253
- })
254
- ),
255
- { method: "DELETE" }
256
- );
257
- if (!res.ok) {
258
- const data = await res.json();
259
- console.error(data.error ?? `Failed to remove schedule: ${res.status}`);
260
- process.exit(1);
261
- }
262
- console.log(`Schedule removed: ${flags.id}`);
263
- }
264
- export {
265
- run
266
- };
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- parseArgs
4
- } from "./chunk-D424ZQGI.js";
5
- import "./chunk-K3NQKI34.js";
6
-
7
- // src/commands/config.ts
8
- async function run(args) {
9
- const { positional } = parseArgs(args, {});
10
- const subcommand = positional[0];
11
- switch (subcommand) {
12
- case "models": {
13
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
14
- const res = await daemonFetch("/api/config/models");
15
- if (!res.ok) {
16
- console.error(`Failed to fetch models (HTTP ${res.status})`);
17
- process.exit(1);
18
- }
19
- const models = await res.json();
20
- const enabled = models.filter((m) => m.enabled);
21
- if (enabled.length === 0) {
22
- console.log("No models enabled.");
23
- return;
24
- }
25
- for (const m of enabled) {
26
- console.log(`${m.provider}:${m.id} ${m.name}`);
27
- }
28
- break;
29
- }
30
- case "providers": {
31
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
32
- const res = await daemonFetch("/api/config/providers");
33
- if (!res.ok) {
34
- console.error(`Failed to fetch providers (HTTP ${res.status})`);
35
- process.exit(1);
36
- }
37
- const providers = await res.json();
38
- const configured = providers.filter((p) => p.configured);
39
- if (configured.length === 0) {
40
- console.log("No providers configured.");
41
- return;
42
- }
43
- for (const p of configured) {
44
- console.log(p.id);
45
- }
46
- break;
47
- }
48
- case "status": {
49
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
50
- const res = await daemonFetch("/api/config/status");
51
- if (!res.ok) {
52
- console.error(`Failed to fetch config (HTTP ${res.status})`);
53
- process.exit(1);
54
- }
55
- const data = await res.json();
56
- for (const [key, value] of Object.entries(data)) {
57
- console.log(`${key}: ${value}`);
58
- }
59
- break;
60
- }
61
- default:
62
- console.error("Usage: volute config <models|providers|status>");
63
- console.error("");
64
- console.error(" models List enabled AI models (provider:id format)");
65
- console.error(" providers List configured AI providers");
66
- console.error(" status Show system configuration");
67
- process.exit(1);
68
- }
69
- }
70
- export {
71
- run
72
- };
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- parseArgs
4
- } from "./chunk-D424ZQGI.js";
5
- import "./chunk-K3NQKI34.js";
6
-
7
- // src/commands/create.ts
8
- async function run(args) {
9
- const { positional, flags } = parseArgs(args, {
10
- template: { type: "string" },
11
- skills: { type: "string" }
12
- });
13
- const name = positional[0];
14
- let template = flags.template;
15
- if (!template) {
16
- const { resolveTemplate } = await import("./ai-service-SBY2WG7O.js");
17
- template = resolveTemplate();
18
- }
19
- if (!name) {
20
- console.error("Usage: volute mind create <name> [--template <name>] [--skills <list|none>]");
21
- process.exit(1);
22
- }
23
- const skills = flags.skills === "none" ? [] : flags.skills ? flags.skills.split(",") : void 0;
24
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
25
- const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
26
- const client = getClient();
27
- const res = await daemonFetch(urlOf(client.api.minds.$url()), {
28
- method: "POST",
29
- headers: { "Content-Type": "application/json" },
30
- body: JSON.stringify({ name, template, skills })
31
- });
32
- const data = await res.json();
33
- if (!res.ok) {
34
- console.error(data.error ?? "Failed to create mind");
35
- process.exit(1);
36
- }
37
- console.log(`
38
- ${data.message ?? `Created mind: ${data.name} (port ${data.port})`}`);
39
- console.log(`
40
- volute mind start ${data.name ?? name}`);
41
- }
42
- export {
43
- run
44
- };