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,175 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- exec
4
- } from "./chunk-KIEPMIM5.js";
5
- import "./chunk-VH33ZWMW.js";
6
- import {
7
- daemonFetch
8
- } from "./chunk-UKVWJRKN.js";
9
- import "./chunk-LRCG2JLP.js";
10
- import "./chunk-RPZZSXV3.js";
11
- import "./chunk-K3NQKI34.js";
12
-
13
- // src/commands/extension.ts
14
- import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "fs";
15
- import { resolve } from "path";
16
- function extensionsNpmDir() {
17
- const home = process.env.VOLUTE_HOME ?? resolve(process.env.HOME ?? "", ".volute");
18
- return resolve(home, "extensions", "_npm");
19
- }
20
- function ensureExtensionsNpmDir() {
21
- const dir = extensionsNpmDir();
22
- mkdirSync(dir, { recursive: true });
23
- const pkgPath = resolve(dir, "package.json");
24
- if (!existsSync(pkgPath)) {
25
- writeFileSync(pkgPath, '{"private":true,"dependencies":{}}\n');
26
- }
27
- return dir;
28
- }
29
- async function run(args) {
30
- const subcommand = args[0];
31
- switch (subcommand) {
32
- case "list":
33
- await listExtensions();
34
- break;
35
- case "install":
36
- await installExtension(args.slice(1));
37
- break;
38
- case "uninstall":
39
- await uninstallExtension(args.slice(1));
40
- break;
41
- case "--help":
42
- case "-h":
43
- case void 0:
44
- printUsage();
45
- break;
46
- default:
47
- console.error(`Unknown subcommand: ${subcommand}`);
48
- printUsage();
49
- process.exit(1);
50
- }
51
- }
52
- function printUsage() {
53
- console.log(`Usage:
54
- volute extension list List installed extensions
55
- volute extension install <package> Install a third-party extension
56
- volute extension uninstall <package> Uninstall a third-party extension`);
57
- }
58
- async function listExtensions() {
59
- const res = await daemonFetch("/api/extensions");
60
- if (!res.ok) {
61
- const body = await res.json().catch(() => ({ error: "Unknown error" }));
62
- console.error(`Error: ${body.error}`);
63
- process.exit(1);
64
- }
65
- const extensions = await res.json();
66
- if (extensions.length === 0) {
67
- console.log("No extensions installed.");
68
- return;
69
- }
70
- console.log("Extensions:\n");
71
- for (const ext of extensions) {
72
- console.log(` ${ext.id} \u2014 ${ext.name} v${ext.version}`);
73
- if (ext.description) console.log(` ${ext.description}`);
74
- }
75
- }
76
- function extensionsConfigPath() {
77
- const home = process.env.VOLUTE_HOME ?? resolve(process.env.HOME ?? "", ".volute");
78
- return resolve(home, "system", "extensions.json");
79
- }
80
- function readConfig() {
81
- const configPath = extensionsConfigPath();
82
- if (!existsSync(configPath)) return [];
83
- try {
84
- const data = JSON.parse(readFileSync(configPath, "utf-8"));
85
- return Array.isArray(data) ? data : [];
86
- } catch (err) {
87
- console.error(
88
- `Warning: failed to read extensions config at ${configPath}: ${err.message}`
89
- );
90
- return [];
91
- }
92
- }
93
- function writeConfig(packages) {
94
- const configPath = extensionsConfigPath();
95
- mkdirSync(resolve(configPath, ".."), { recursive: true });
96
- writeFileSync(configPath, `${JSON.stringify(packages, null, 2)}
97
- `);
98
- }
99
- async function installExtension(args) {
100
- const pkg = args[0];
101
- if (!pkg) {
102
- console.error("Usage: volute extension install <package>");
103
- process.exit(1);
104
- }
105
- const packages = readConfig();
106
- if (packages.includes(pkg)) {
107
- console.log(`Extension "${pkg}" is already installed.`);
108
- return;
109
- }
110
- const dir = ensureExtensionsNpmDir();
111
- console.log(`Installing "${pkg}"...`);
112
- try {
113
- await exec("npm", ["install", pkg], { cwd: dir });
114
- } catch (err) {
115
- console.error(`Failed to install "${pkg}": ${err.message}`);
116
- process.exit(1);
117
- }
118
- packages.push(pkg);
119
- writeConfig(packages);
120
- console.log(`Installed "${pkg}".`);
121
- console.log("Restart the daemon (`volute restart`) to load the extension.");
122
- }
123
- async function uninstallExtension(args) {
124
- const pkg = args[0];
125
- if (!pkg) {
126
- console.error("Usage: volute extension uninstall <package>");
127
- process.exit(1);
128
- }
129
- const packages = readConfig();
130
- const idx = packages.indexOf(pkg);
131
- if (idx === -1) {
132
- console.error(`Extension "${pkg}" is not installed.`);
133
- process.exit(1);
134
- }
135
- await cleanupExtensionSkills(pkg);
136
- packages.splice(idx, 1);
137
- writeConfig(packages);
138
- try {
139
- await exec("npm", ["uninstall", pkg], { cwd: extensionsNpmDir() });
140
- } catch (err) {
141
- console.warn(
142
- ` Warning: npm uninstall failed (package may have been manually removed): ${err.message}`
143
- );
144
- }
145
- console.log(`Removed "${pkg}".`);
146
- console.log("Restart the daemon (`volute restart`) to unload the extension.");
147
- }
148
- async function cleanupExtensionSkills(pkg) {
149
- try {
150
- const pkgDir = resolve(extensionsNpmDir(), "node_modules", pkg);
151
- if (!existsSync(pkgDir)) return;
152
- const { createRequire } = await import("module");
153
- const require2 = createRequire(resolve(extensionsNpmDir(), "noop.js"));
154
- const mod = require2(pkg);
155
- const manifest = mod.default ?? mod.extension ?? mod;
156
- if (!manifest?.skillsDir || !existsSync(manifest.skillsDir)) return;
157
- const skillDirs = readdirSync(manifest.skillsDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
158
- for (const skillId of skillDirs) {
159
- await daemonFetch(`/api/skills/defaults/list/${encodeURIComponent(skillId)}`, {
160
- method: "DELETE"
161
- }).catch(() => {
162
- });
163
- await daemonFetch(`/api/skills/${encodeURIComponent(skillId)}`, {
164
- method: "DELETE"
165
- }).catch(() => {
166
- });
167
- console.log(` Removed skill: ${skillId}`);
168
- }
169
- } catch (err) {
170
- console.warn(` Warning: could not clean up skills for "${pkg}": ${err.message}`);
171
- }
172
- }
173
- export {
174
- run
175
- };
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- getExtensionStandardSkills,
4
- getLoadedExtensions,
5
- loadAllExtensions,
6
- notifyExtensionsDaemonStart,
7
- notifyExtensionsDaemonStop,
8
- notifyExtensionsMindStart,
9
- notifyExtensionsMindStop
10
- } from "./chunk-A2A4KLFE.js";
11
- import "./chunk-PB65JZK2.js";
12
- import "./chunk-JYVGHWEJ.js";
13
- import "./chunk-KVK2DLWI.js";
14
- import "./chunk-C7I35G4R.js";
15
- import "./chunk-YUIHSKR6.js";
16
- import "./chunk-KIEPMIM5.js";
17
- import "./chunk-VH33ZWMW.js";
18
- import "./chunk-N432I7QH.js";
19
- import "./chunk-LRCG2JLP.js";
20
- import "./chunk-RPZZSXV3.js";
21
- import "./chunk-K3NQKI34.js";
22
- export {
23
- getExtensionStandardSkills,
24
- getLoadedExtensions,
25
- loadAllExtensions,
26
- notifyExtensionsDaemonStart,
27
- notifyExtensionsDaemonStop,
28
- notifyExtensionsMindStart,
29
- notifyExtensionsMindStop
30
- };
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- resolveMindName
4
- } from "./chunk-NAOW2CLO.js";
5
- import {
6
- formatFileSize
7
- } from "./chunk-ALEF47VT.js";
8
- import {
9
- daemonFetch
10
- } from "./chunk-UKVWJRKN.js";
11
- import {
12
- parseArgs
13
- } from "./chunk-D424ZQGI.js";
14
- import "./chunk-LRCG2JLP.js";
15
- import "./chunk-RPZZSXV3.js";
16
- import "./chunk-K3NQKI34.js";
17
-
18
- // src/commands/chat/files.ts
19
- async function run(args) {
20
- const { flags } = parseArgs(args, {
21
- mind: { type: "string" }
22
- });
23
- const mind = resolveMindName(flags);
24
- const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/pending`);
25
- if (!res.ok) {
26
- const data = await res.json();
27
- console.error(data.error ?? `Failed to list pending files: ${res.status}`);
28
- process.exit(1);
29
- }
30
- const pending = await res.json();
31
- if (pending.length === 0) {
32
- console.log("No pending files.");
33
- return;
34
- }
35
- const idW = Math.max(2, ...pending.map((p) => p.id.length));
36
- const senderW = Math.max(6, ...pending.map((p) => p.sender.length));
37
- const fileW = Math.max(4, ...pending.map((p) => p.filename.length));
38
- console.log(`${"ID".padEnd(idW)} ${"SENDER".padEnd(senderW)} ${"FILE".padEnd(fileW)} SIZE`);
39
- for (const p of pending) {
40
- console.log(
41
- `${p.id.padEnd(idW)} ${p.sender.padEnd(senderW)} ${p.filename.padEnd(fileW)} ${formatFileSize(p.size)}`
42
- );
43
- }
44
- }
45
- export {
46
- run
47
- };
@@ -1,128 +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/history.ts
20
- function normalizeTimestamp(dateStr) {
21
- return dateStr.endsWith("Z") ? dateStr : `${dateStr}Z`;
22
- }
23
- function formatRow(row) {
24
- const time = new Date(normalizeTimestamp(row.created_at)).toLocaleString();
25
- const channel = row.channel ?? "";
26
- switch (row.type) {
27
- case "inbound":
28
- case "outbound": {
29
- const sender = row.sender ?? (row.type === "outbound" ? "mind" : "unknown");
30
- return `[${time}] [${channel}] ${sender}: ${row.content ?? ""}`;
31
- }
32
- case "text":
33
- return `[${time}] [text] ${row.content ?? ""}`;
34
- case "thinking":
35
- return `[${time}] [thinking] ${(row.content ?? "").slice(0, 200)}${(row.content?.length ?? 0) > 200 ? "..." : ""}`;
36
- case "tool_use": {
37
- let toolName = "unknown";
38
- if (row.metadata) {
39
- try {
40
- const meta = JSON.parse(row.metadata);
41
- toolName = meta.name ?? toolName;
42
- } catch {
43
- }
44
- }
45
- return `[${time}] [tool] ${toolName}${row.content ? `: ${row.content.slice(0, 100)}` : ""}`;
46
- }
47
- case "tool_result":
48
- return `[${time}] [result] ${(row.content ?? "").slice(0, 200)}${(row.content?.length ?? 0) > 200 ? "..." : ""}`;
49
- case "usage": {
50
- if (row.metadata) {
51
- try {
52
- const meta = JSON.parse(row.metadata);
53
- return `[${time}] [usage] in=${meta.input_tokens ?? 0} out=${meta.output_tokens ?? 0}`;
54
- } catch {
55
- }
56
- }
57
- return `[${time}] [usage]`;
58
- }
59
- case "done":
60
- return `[${time}] [done]`;
61
- case "log": {
62
- let category = "";
63
- if (row.metadata) {
64
- try {
65
- const meta = JSON.parse(row.metadata);
66
- category = meta.category ? `${meta.category}: ` : "";
67
- } catch {
68
- }
69
- }
70
- return `[${time}] [log] ${category}${row.content ?? ""}`;
71
- }
72
- case "summary": {
73
- let range = "";
74
- if (row.metadata) {
75
- try {
76
- const meta = JSON.parse(row.metadata);
77
- if (meta.from_time && meta.to_time) {
78
- const from = new Date(normalizeTimestamp(meta.from_time)).toLocaleTimeString();
79
- const to = new Date(normalizeTimestamp(meta.to_time)).toLocaleTimeString();
80
- range = ` (${from}\u2013${to})`;
81
- }
82
- } catch {
83
- }
84
- }
85
- return `[${time}] [summary${range}] ${row.content ?? ""}`;
86
- }
87
- case "session_start":
88
- return `[${time}] [session_start] ${row.session ?? ""}`;
89
- default:
90
- return `[${time}] [${row.type}] ${row.content ?? ""}`;
91
- }
92
- }
93
- async function run(args) {
94
- const { flags } = parseArgs(args, {
95
- mind: { type: "string" },
96
- channel: { type: "string" },
97
- session: { type: "string" },
98
- preset: { type: "string" },
99
- limit: { type: "string" },
100
- full: { type: "boolean" }
101
- });
102
- const name = resolveMindName(flags);
103
- const client = getClient();
104
- const url = client.api.minds[":name"].history.$url({ param: { name } });
105
- if (flags.channel) url.searchParams.set("channel", flags.channel);
106
- if (flags.session) url.searchParams.set("session", flags.session);
107
- if (flags.preset) url.searchParams.set("preset", flags.preset);
108
- if (flags.limit) url.searchParams.set("limit", flags.limit);
109
- if (flags.full) url.searchParams.set("full", "true");
110
- const res = await daemonFetch(urlOf(url));
111
- if (!res.ok) {
112
- let errorMsg = `Failed to get history: ${res.status}`;
113
- try {
114
- const data = await res.json();
115
- if (data.error) errorMsg = data.error;
116
- } catch {
117
- }
118
- console.error(errorMsg);
119
- process.exit(1);
120
- }
121
- const rows = await res.json();
122
- for (const row of rows.reverse()) {
123
- console.log(formatRow(row));
124
- }
125
- }
126
- export {
127
- run
128
- };
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- findOpenClawSession,
4
- importOpenClawConnectors,
5
- importPiSession,
6
- parseNameFromIdentity,
7
- run,
8
- sessionMatchesWorkspace
9
- } from "./chunk-RSX4OPZY.js";
10
- import "./chunk-2NGTS5UU.js";
11
- import "./chunk-YUIHSKR6.js";
12
- import "./chunk-D424ZQGI.js";
13
- import "./chunk-LRCG2JLP.js";
14
- import "./chunk-RPZZSXV3.js";
15
- import "./chunk-K3NQKI34.js";
16
- export {
17
- findOpenClawSession,
18
- importOpenClawConnectors,
19
- importPiSession,
20
- parseNameFromIdentity,
21
- run,
22
- sessionMatchesWorkspace
23
- };
@@ -1,66 +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/join.ts
8
- async function run(args) {
9
- const { positional, flags } = parseArgs(args, {
10
- summary: { type: "string" },
11
- justification: { type: "string" },
12
- memory: { type: "string" },
13
- "skip-verify": { type: "boolean" }
14
- });
15
- const variantName = positional[0];
16
- if (!variantName) {
17
- console.error(
18
- "Usage: volute mind join <variant-name> [--summary '...'] [--justification '...'] [--memory '...'] [--skip-verify]"
19
- );
20
- process.exit(1);
21
- }
22
- console.log(`Joining variant ${variantName}...`);
23
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
24
- const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
25
- const client = getClient();
26
- const statusRes = await daemonFetch(
27
- urlOf(client.api.minds[":name"].$url({ param: { name: variantName } }))
28
- );
29
- if (!statusRes.ok) {
30
- const data2 = await statusRes.json().catch(() => ({}));
31
- console.error(data2.error ?? `Variant '${variantName}' not found (HTTP ${statusRes.status})`);
32
- process.exit(1);
33
- }
34
- const statusData = await statusRes.json();
35
- const parentName = statusData.parent;
36
- if (!parentName) {
37
- console.error(`'${variantName}' is not a variant \u2014 it has no parent mind`);
38
- process.exit(1);
39
- }
40
- const res = await daemonFetch(
41
- urlOf(
42
- client.api.minds[":name"].variants[":variant"].merge.$url({
43
- param: { name: parentName, variant: variantName }
44
- })
45
- ),
46
- {
47
- method: "POST",
48
- headers: { "Content-Type": "application/json" },
49
- body: JSON.stringify({
50
- ...flags.summary && { summary: flags.summary },
51
- ...flags.justification && { justification: flags.justification },
52
- ...flags.memory && { memory: flags.memory },
53
- ...flags["skip-verify"] && { skipVerify: true }
54
- })
55
- }
56
- );
57
- const data = await res.json();
58
- if (!res.ok) {
59
- console.error(data.error ?? "Failed to join variant");
60
- process.exit(1);
61
- }
62
- console.log(`Variant ${variantName} joined and cleaned up.`);
63
- }
64
- export {
65
- run
66
- };
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- resolveMindName
4
- } from "./chunk-NAOW2CLO.js";
5
- import {
6
- daemonFetch
7
- } from "./chunk-UKVWJRKN.js";
8
- import {
9
- parseArgs
10
- } from "./chunk-D424ZQGI.js";
11
- import "./chunk-LRCG2JLP.js";
12
- import "./chunk-RPZZSXV3.js";
13
- import "./chunk-K3NQKI34.js";
14
-
15
- // src/commands/chat/list.ts
16
- async function run(args) {
17
- const { flags } = parseArgs(args, {
18
- mind: { type: "string" }
19
- });
20
- const mindName = resolveMindName(flags);
21
- const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindName)}/conversations`);
22
- if (!res.ok) {
23
- console.error(`Failed to list conversations: ${res.status}`);
24
- process.exit(1);
25
- }
26
- const convs = await res.json();
27
- if (convs.length === 0) {
28
- console.log("No conversations.");
29
- return;
30
- }
31
- for (const conv of convs) {
32
- const label = conv.type === "channel" ? `#${conv.name}` : conv.title ?? conv.id.slice(0, 8);
33
- const time = new Date(
34
- conv.updated_at.endsWith("Z") ? conv.updated_at : `${conv.updated_at}Z`
35
- ).toLocaleString();
36
- console.log(` ${label} (${conv.type}) ${time}`);
37
- }
38
- }
39
- export {
40
- run
41
- };
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- promptLine
4
- } from "./chunk-SSI47XP2.js";
5
- import {
6
- daemonFetch
7
- } from "./chunk-UKVWJRKN.js";
8
- import {
9
- parseArgs
10
- } from "./chunk-D424ZQGI.js";
11
- import "./chunk-LRCG2JLP.js";
12
- import "./chunk-RPZZSXV3.js";
13
- import "./chunk-K3NQKI34.js";
14
-
15
- // src/commands/systems/login.ts
16
- async function run(args) {
17
- const { flags } = parseArgs(args, {
18
- key: { type: "string" }
19
- });
20
- let key = flags.key;
21
- if (!key) {
22
- if (!process.stdin.isTTY) {
23
- console.error("Usage: volute systems login --key <api-key>");
24
- process.exit(1);
25
- }
26
- key = await promptLine("API key: ");
27
- if (!key) {
28
- console.error("No key provided.");
29
- process.exit(1);
30
- }
31
- }
32
- const res = await daemonFetch("/api/system/login", {
33
- method: "POST",
34
- headers: { "Content-Type": "application/json" },
35
- body: JSON.stringify({ key })
36
- });
37
- if (!res.ok) {
38
- const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
39
- console.error(`Login failed: ${body.error}`);
40
- process.exit(1);
41
- }
42
- const { system } = await res.json();
43
- console.log(`Logged in as "${system}". Credentials saved.`);
44
- }
45
- export {
46
- run
47
- };
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- promptLine,
4
- promptPassword
5
- } from "./chunk-SSI47XP2.js";
6
- import {
7
- daemonFetch
8
- } from "./chunk-UKVWJRKN.js";
9
- import {
10
- voluteUserHome
11
- } from "./chunk-LRCG2JLP.js";
12
- import "./chunk-RPZZSXV3.js";
13
- import "./chunk-K3NQKI34.js";
14
-
15
- // src/commands/login.ts
16
- import { writeFileSync } from "fs";
17
- import { resolve } from "path";
18
- async function run(_args) {
19
- const username = await promptLine("Username: ");
20
- const password = await promptPassword("Password: ");
21
- const res = await daemonFetch("/api/auth/login", {
22
- method: "POST",
23
- headers: { "Content-Type": "application/json" },
24
- body: JSON.stringify({ username, password })
25
- });
26
- if (!res.ok) {
27
- const data = await res.json().catch(() => ({}));
28
- console.error(data.error || "Login failed");
29
- process.exit(1);
30
- }
31
- const {
32
- username: name,
33
- role,
34
- sessionId
35
- } = await res.json();
36
- const sessionPath = resolve(voluteUserHome(), "cli-session.json");
37
- try {
38
- writeFileSync(sessionPath, JSON.stringify({ sessionId, username: name }), { mode: 384 });
39
- } catch (err) {
40
- console.error(`Login succeeded but failed to save session: ${err.message}`);
41
- process.exit(1);
42
- }
43
- console.log(`Logged in as ${name} (role: ${role})`);
44
- }
45
- export {
46
- run
47
- };
@@ -1,40 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- daemonFetch
4
- } from "./chunk-UKVWJRKN.js";
5
- import {
6
- voluteUserHome
7
- } from "./chunk-LRCG2JLP.js";
8
- import "./chunk-RPZZSXV3.js";
9
- import "./chunk-K3NQKI34.js";
10
-
11
- // src/commands/logout.ts
12
- import { existsSync, readFileSync, unlinkSync } from "fs";
13
- import { resolve } from "path";
14
- async function run(_args) {
15
- const sessionPath = resolve(voluteUserHome(), "cli-session.json");
16
- if (!existsSync(sessionPath)) {
17
- console.log("Not logged in");
18
- return;
19
- }
20
- let sessionId;
21
- try {
22
- const data = JSON.parse(readFileSync(sessionPath, "utf-8"));
23
- sessionId = data.sessionId;
24
- } catch {
25
- }
26
- if (sessionId) {
27
- try {
28
- await daemonFetch("/api/auth/logout", {
29
- method: "POST",
30
- headers: { Authorization: `Bearer ${sessionId}` }
31
- });
32
- } catch {
33
- }
34
- }
35
- unlinkSync(sessionPath);
36
- console.log("Logged out");
37
- }
38
- export {
39
- run
40
- };
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- daemonFetch
4
- } from "./chunk-UKVWJRKN.js";
5
- import "./chunk-LRCG2JLP.js";
6
- import "./chunk-RPZZSXV3.js";
7
- import "./chunk-K3NQKI34.js";
8
-
9
- // src/commands/systems/logout.ts
10
- async function run() {
11
- const res = await daemonFetch("/api/system/logout", { method: "POST" });
12
- if (!res.ok) {
13
- const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
14
- console.error(`Logout failed: ${body.error}`);
15
- process.exit(1);
16
- }
17
- console.log("Logged out. Credentials removed.");
18
- }
19
- export {
20
- run
21
- };