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,32 +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/seed-check.ts
8
- async function run(args) {
9
- const { positional } = parseArgs(args, {});
10
- const name = positional[0];
11
- if (!name) {
12
- console.error("Usage: volute seed check <name>");
13
- process.exit(1);
14
- }
15
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
16
- const res = await daemonFetch(`/api/minds/${encodeURIComponent(name)}/seed-check`);
17
- if (!res.ok) {
18
- if (res.status === 404) {
19
- console.log(`Seed "${name}" not found \u2014 it may have been deleted or already sprouted.`);
20
- } else {
21
- console.error(`seed check failed for ${name}: HTTP ${res.status}`);
22
- }
23
- return;
24
- }
25
- const data = await res.json();
26
- if (data.output) {
27
- console.log(data.output);
28
- }
29
- }
30
- export {
31
- run
32
- };
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./chunk-K3NQKI34.js";
3
-
4
- // src/commands/seed-cmd.ts
5
- async function run(args) {
6
- const subcommand = args[0];
7
- switch (subcommand) {
8
- case "create":
9
- await import("./seed-create-4XBBOLRH.js").then((m) => m.run(args.slice(1)));
10
- break;
11
- case "sprout":
12
- await import("./seed-sprout-GQEIIQRT.js").then((m) => m.run(args.slice(1)));
13
- break;
14
- case "check":
15
- await import("./seed-check-S2IX25RL.js").then((m) => m.run(args.slice(1)));
16
- break;
17
- case "--help":
18
- case "-h":
19
- case void 0:
20
- printUsage();
21
- break;
22
- default:
23
- printUsage();
24
- process.exit(1);
25
- }
26
- }
27
- function printUsage() {
28
- console.log(`volute seed \u2014 seed lifecycle
29
-
30
- volute seed create <name> Plant a new seed
31
- volute seed sprout Complete orientation and become a full mind
32
- volute seed check <name> Check seed readiness (used by spirit scheduler)`);
33
- }
34
- export {
35
- run
36
- };
@@ -1,112 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- promptLine
4
- } from "./chunk-SSI47XP2.js";
5
- import {
6
- parseArgs
7
- } from "./chunk-D424ZQGI.js";
8
- import "./chunk-K3NQKI34.js";
9
-
10
- // src/commands/seed-create.ts
11
- async function chooseModel(daemonFetch) {
12
- const res = await daemonFetch("/api/system/ai/models");
13
- if (!res.ok) {
14
- console.error(`Failed to fetch AI models (HTTP ${res.status}). Is the daemon running?`);
15
- process.exit(1);
16
- }
17
- const models = await res.json();
18
- const enabled = models.filter((m) => m.enabled);
19
- if (enabled.length === 0) return void 0;
20
- console.log("\nAvailable models:");
21
- for (let i = 0; i < enabled.length; i++) {
22
- console.log(` ${i + 1}) ${enabled[i].name} (${enabled[i].provider})`);
23
- }
24
- const answer = await promptLine(`
25
- Choose a model [1-${enabled.length}]: `);
26
- const idx = parseInt(answer, 10) - 1;
27
- if (Number.isNaN(idx) || idx < 0 || idx >= enabled.length) {
28
- console.error("Invalid selection");
29
- process.exit(1);
30
- }
31
- const chosen = enabled[idx];
32
- return `${chosen.provider}:${chosen.id}`;
33
- }
34
- async function run(args) {
35
- const { positional, flags } = parseArgs(args, {
36
- template: { type: "string" },
37
- model: { type: "string" },
38
- description: { type: "string" },
39
- skills: { type: "string" },
40
- "created-by": { type: "string" }
41
- });
42
- const name = positional[0];
43
- if (!name) {
44
- console.error(
45
- "Usage: volute seed create <name> [--template <name>] [--model <model>] [--description <text>] [--skills <list|none>] [--created-by <username>]"
46
- );
47
- process.exit(1);
48
- }
49
- const skills = flags.skills === "none" ? [] : flags.skills ? flags.skills.split(",") : void 0;
50
- const createdBy = flags["created-by"];
51
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
52
- const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
53
- const client = getClient();
54
- let model = flags.model;
55
- let template = flags.template;
56
- if (!template) {
57
- const { resolveTemplate } = await import("./ai-service-SBY2WG7O.js");
58
- template = resolveTemplate(model);
59
- }
60
- if (template !== "claude" && !model) {
61
- if (process.env.VOLUTE_MIND || !process.stdin.isTTY) {
62
- const { getSpiritModel } = await import("./spirit-VRONKFMF.js");
63
- const { qualifyModelId } = await import("./ai-service-SBY2WG7O.js");
64
- const spiritModel = getSpiritModel();
65
- if (spiritModel) {
66
- model = template === "pi" ? qualifyModelId(spiritModel) : spiritModel;
67
- }
68
- }
69
- if (!model) {
70
- model = await chooseModel(daemonFetch);
71
- if (!model) {
72
- console.error("No AI models configured. Set up providers in the web dashboard first.");
73
- process.exit(1);
74
- }
75
- }
76
- }
77
- const createRes = await daemonFetch(urlOf(client.api.minds.$url()), {
78
- method: "POST",
79
- headers: { "Content-Type": "application/json" },
80
- body: JSON.stringify({
81
- name,
82
- template,
83
- stage: "seed",
84
- description: flags.description,
85
- model,
86
- skills,
87
- createdBy
88
- })
89
- });
90
- const createData = await createRes.json();
91
- if (!createRes.ok) {
92
- console.error(createData.error ?? "Failed to create mind");
93
- process.exit(1);
94
- }
95
- const startRes = await daemonFetch(
96
- urlOf(client.api.minds[":name"].start.$url({ param: { name } })),
97
- { method: "POST" }
98
- );
99
- if (!startRes.ok) {
100
- const startData = await startRes.json();
101
- console.error(startData.error ?? "Failed to start mind");
102
- process.exit(1);
103
- }
104
- console.log(`
105
- Seeded mind: ${name} (port ${createData.port})`);
106
- console.log(`
107
- Talk to your new mind:`);
108
- console.log(` volute chat send @${name} "hello"`);
109
- }
110
- export {
111
- run
112
- };
@@ -1,132 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- getStandardSkillsWithExtensions
4
- } from "./chunk-C7I35G4R.js";
5
- import "./chunk-YUIHSKR6.js";
6
- import "./chunk-KIEPMIM5.js";
7
- import "./chunk-VH33ZWMW.js";
8
- import "./chunk-N432I7QH.js";
9
- import {
10
- findMind,
11
- mindDir
12
- } from "./chunk-LRCG2JLP.js";
13
- import "./chunk-RPZZSXV3.js";
14
- import "./chunk-K3NQKI34.js";
15
-
16
- // src/commands/seed-sprout.ts
17
- import { existsSync, readFileSync } from "fs";
18
- import { resolve } from "path";
19
- var ORIENTATION_MARKER = "You don't have a soul yet";
20
- async function run(_args) {
21
- const mindName = process.env.VOLUTE_MIND;
22
- if (!mindName) {
23
- console.error("volute seed sprout must be run by a mind (VOLUTE_MIND not set)");
24
- process.exit(1);
25
- }
26
- const entry = await findMind(mindName);
27
- if (!entry) {
28
- console.error(`Unknown mind: ${mindName}`);
29
- process.exit(1);
30
- }
31
- if (entry.stage !== "seed") {
32
- console.error(`${mindName} is not a seed \u2014 already at stage "${entry.stage}"`);
33
- process.exit(1);
34
- }
35
- const dir = mindDir(mindName);
36
- const soulPath = resolve(dir, "home/SOUL.md");
37
- const memoryPath = resolve(dir, "home/MEMORY.md");
38
- if (!existsSync(soulPath)) {
39
- console.error("Write your SOUL.md before sprouting.");
40
- process.exit(1);
41
- }
42
- const soul = readFileSync(soulPath, "utf-8");
43
- if (soul.includes(ORIENTATION_MARKER)) {
44
- console.error(
45
- "Your SOUL.md still contains the orientation template. Write your own identity first."
46
- );
47
- process.exit(1);
48
- }
49
- if (!existsSync(memoryPath)) {
50
- console.error("Write your MEMORY.md before sprouting.");
51
- process.exit(1);
52
- }
53
- const { isImagegenEnabled } = await import("./setup-TISPCO22.js");
54
- if (isImagegenEnabled()) {
55
- const { readVoluteConfig } = await import("./volute-config-HD7WWUQC.js");
56
- const config = readVoluteConfig(dir);
57
- const avatarPath = config?.profile?.avatar;
58
- if (!avatarPath || !existsSync(resolve(dir, "home", avatarPath))) {
59
- console.error(
60
- "Generate an avatar before sprouting. Use `imagegen generate` to create one, then `volute mind profile --avatar <path>` to set it."
61
- );
62
- process.exit(1);
63
- }
64
- }
65
- const { daemonFetch } = await import("./daemon-client-6QXHZ7US.js");
66
- const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
67
- const { mindSkillsDir } = await import("./skills-7FV7EJTE.js");
68
- const client = getClient();
69
- const failedSkills = [];
70
- for (const skillId of getStandardSkillsWithExtensions()) {
71
- const skillDir = resolve(mindSkillsDir(dir), skillId);
72
- if (!existsSync(skillDir)) {
73
- const installRes = await daemonFetch(
74
- urlOf(client.api.minds[":name"].skills.install.$url({ param: { name: mindName } })),
75
- {
76
- method: "POST",
77
- headers: { "Content-Type": "application/json" },
78
- body: JSON.stringify({ skillId })
79
- }
80
- );
81
- if (!installRes.ok) {
82
- const data = await installRes.json().catch(() => ({ error: `HTTP ${installRes.status}` }));
83
- console.error(`Failed to install skill ${skillId}: ${data.error}`);
84
- failedSkills.push(skillId);
85
- }
86
- }
87
- }
88
- const orientationDir = resolve(mindSkillsDir(dir), "orientation");
89
- if (existsSync(orientationDir)) {
90
- const delRes = await daemonFetch(
91
- urlOf(
92
- client.api.minds[":name"].skills[":skill"].$url({
93
- param: { name: mindName, skill: "orientation" }
94
- })
95
- ),
96
- { method: "DELETE" }
97
- );
98
- if (!delRes.ok) {
99
- const data = await delRes.json().catch(() => ({ error: `HTTP ${delRes.status}` }));
100
- console.error(`Failed to uninstall orientation skill: ${data.error}`);
101
- }
102
- }
103
- if (failedSkills.length > 0) {
104
- console.error(`Warning: failed to install skills: ${failedSkills.join(", ")}`);
105
- }
106
- const sproutRes = await daemonFetch(
107
- urlOf(client.api.minds[":name"].sprout.$url({ param: { name: mindName } })),
108
- { method: "POST" }
109
- );
110
- if (!sproutRes.ok) {
111
- const data = await sproutRes.json().catch(() => ({ error: `HTTP ${sproutRes.status}` }));
112
- console.error(data.error ?? "Failed to update stage");
113
- process.exit(1);
114
- }
115
- const res = await daemonFetch(
116
- urlOf(client.api.minds[":name"].restart.$url({ param: { name: mindName } })),
117
- {
118
- method: "POST",
119
- headers: { "Content-Type": "application/json" },
120
- body: JSON.stringify({ context: { type: "sprouted" } })
121
- }
122
- );
123
- if (!res.ok) {
124
- const data = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
125
- console.error(data.error ?? "Failed to restart after sprouting");
126
- process.exit(1);
127
- }
128
- console.log("Sprouted! You now have full mind capabilities.");
129
- }
130
- export {
131
- run
132
- };
@@ -1,373 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- readStdin
4
- } from "./chunk-6LXAAQ43.js";
5
- import {
6
- getClient,
7
- urlOf
8
- } from "./chunk-4RQBJWQX.js";
9
- import {
10
- formatFileSize
11
- } from "./chunk-ALEF47VT.js";
12
- import {
13
- daemonFetch
14
- } from "./chunk-UKVWJRKN.js";
15
- import {
16
- parseArgs
17
- } from "./chunk-D424ZQGI.js";
18
- import "./chunk-LRCG2JLP.js";
19
- import "./chunk-RPZZSXV3.js";
20
- import "./chunk-K3NQKI34.js";
21
-
22
- // src/commands/send.ts
23
- import { existsSync, readFileSync, statSync } from "fs";
24
- import { userInfo } from "os";
25
- import { basename, extname } from "path";
26
-
27
- // src/lib/parse-target.ts
28
- function parseTarget(target) {
29
- const colonIdx = target.indexOf(":");
30
- if (colonIdx !== -1) {
31
- const platform = target.slice(0, colonIdx);
32
- const identifier = target.slice(colonIdx + 1);
33
- return {
34
- platform,
35
- identifier,
36
- uri: target,
37
- isDM: identifier.startsWith("@")
38
- };
39
- }
40
- if (target.startsWith("@")) {
41
- return {
42
- platform: "volute",
43
- identifier: target,
44
- uri: target,
45
- isDM: true
46
- };
47
- }
48
- return {
49
- platform: "volute",
50
- identifier: target,
51
- uri: target,
52
- isDM: false
53
- };
54
- }
55
-
56
- // src/commands/send.ts
57
- async function isMind(name) {
58
- try {
59
- const res = await daemonFetch(`/api/minds/${encodeURIComponent(name)}`);
60
- return res.ok;
61
- } catch {
62
- return false;
63
- }
64
- }
65
- var IMAGE_MEDIA_TYPES = {
66
- ".png": "image/png",
67
- ".jpg": "image/jpeg",
68
- ".jpeg": "image/jpeg",
69
- ".gif": "image/gif",
70
- ".webp": "image/webp"
71
- };
72
- function loadImage(imagePath) {
73
- if (!existsSync(imagePath)) {
74
- console.error(`Image file not found: ${imagePath}`);
75
- process.exit(1);
76
- }
77
- const ext = extname(imagePath).toLowerCase();
78
- const mediaType = IMAGE_MEDIA_TYPES[ext];
79
- if (!mediaType) {
80
- console.error(`Unsupported image format: ${ext} (supported: png, jpg, jpeg, gif, webp)`);
81
- process.exit(1);
82
- }
83
- const data = readFileSync(imagePath).toString("base64");
84
- return { media_type: mediaType, data };
85
- }
86
- async function waitForResponse(mindName, conversationId, timeoutMs) {
87
- const client = getClient();
88
- const eventPath = urlOf(
89
- client.api.minds[":name"].conversations[":id"].events.$url({
90
- param: { name: mindName, id: conversationId }
91
- })
92
- );
93
- const controller = new AbortController();
94
- const timeout = setTimeout(() => controller.abort(), timeoutMs);
95
- let response;
96
- try {
97
- response = await daemonFetch(eventPath, {
98
- signal: controller.signal
99
- });
100
- } catch {
101
- clearTimeout(timeout);
102
- console.error("Could not connect to event stream. Is the mind running?");
103
- process.exit(1);
104
- }
105
- if (!response.body) {
106
- clearTimeout(timeout);
107
- return;
108
- }
109
- const reader = response.body.getReader();
110
- const decoder = new TextDecoder();
111
- let buffer = "";
112
- try {
113
- while (true) {
114
- const { done, value } = await reader.read();
115
- if (done) break;
116
- buffer += decoder.decode(value, { stream: true });
117
- const chunks = buffer.split("\n\n");
118
- buffer = chunks.pop();
119
- for (const chunk of chunks) {
120
- for (const line of chunk.split("\n")) {
121
- if (!line.startsWith("data: ")) continue;
122
- const data = line.slice(6).trim();
123
- if (!data) continue;
124
- let event;
125
- try {
126
- event = JSON.parse(data);
127
- } catch {
128
- continue;
129
- }
130
- if (event.type === "message" && event.senderName === mindName && event.content) {
131
- const text = event.content.filter((b) => b.type === "text" && !!b.text).map((b) => b.text).join("");
132
- if (text) {
133
- process.stdout.write(`${text}
134
- `);
135
- }
136
- return;
137
- }
138
- }
139
- }
140
- }
141
- } catch (err) {
142
- if (err.name === "AbortError") {
143
- console.error(`(timed out after ${timeoutMs / 1e3}s)`);
144
- } else {
145
- throw err;
146
- }
147
- } finally {
148
- clearTimeout(timeout);
149
- reader.cancel().catch(() => {
150
- });
151
- }
152
- }
153
- async function run(args) {
154
- const { positional, flags } = parseArgs(args, {
155
- image: { type: "string" },
156
- file: { type: "string" },
157
- wait: { type: "boolean" },
158
- timeout: { type: "number" },
159
- sender: { type: "string" }
160
- });
161
- const target = positional[0];
162
- const message = positional[1] ?? await readStdin();
163
- const images = flags.image ? [loadImage(flags.image)] : void 0;
164
- if (!target || !message && !images && !flags.file) {
165
- console.error(
166
- 'Usage: volute chat send <target> "<message>" [--image <path>] [--file <path>] [--wait]'
167
- );
168
- console.error(' echo "message" | volute chat send <target>');
169
- console.error("");
170
- console.error("Examples:");
171
- console.error(' volute chat send @other-mind "hello"');
172
- console.error(' volute chat send #animal-chat "hello everyone"');
173
- console.error(' volute chat send @mind "check this out" --image photo.png');
174
- console.error(" volute chat send @mind --image photo.png");
175
- console.error(' volute chat send @mind "check this out" --file notes.txt');
176
- console.error(' volute chat send @mind "hello" --wait');
177
- process.exit(1);
178
- }
179
- if (target === "system" || target === "@system") {
180
- console.error(
181
- `Can't send to system \u2014 system messages are automated.
182
- To reply to a person, use their username from the message prefix (e.g. volute chat send @username "msg").`
183
- );
184
- process.exit(1);
185
- }
186
- if (flags.file) {
187
- const filePath = flags.file;
188
- const parsed2 = parseTarget(target);
189
- const targetName = parsed2.isDM && parsed2.platform === "volute" ? parsed2.identifier.slice(1) : parsed2.identifier;
190
- const mindSelf = process.env.VOLUTE_MIND;
191
- if (mindSelf) {
192
- const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindSelf)}/files/send`, {
193
- method: "POST",
194
- headers: { "Content-Type": "application/json" },
195
- body: JSON.stringify({ targetMind: targetName, filePath })
196
- });
197
- if (!res.ok) {
198
- const data2 = await res.json();
199
- console.error(data2.error ?? `Failed to send file: ${res.status}`);
200
- process.exit(1);
201
- }
202
- const data = await res.json();
203
- console.log(`File staged for ${targetName} (id: ${data.id})`);
204
- } else {
205
- if (!existsSync(filePath)) {
206
- console.error(`File not found: ${filePath}`);
207
- process.exit(1);
208
- }
209
- const stat = statSync(filePath);
210
- const MAX_FILE_SIZE = 50 * 1024 * 1024;
211
- if (stat.size > MAX_FILE_SIZE) {
212
- console.error(
213
- `File too large (${formatFileSize(stat.size)}, max ${formatFileSize(MAX_FILE_SIZE)})`
214
- );
215
- process.exit(1);
216
- }
217
- const content = readFileSync(filePath);
218
- const filename = basename(filePath);
219
- const senderName = flags.sender || userInfo().username;
220
- const res = await daemonFetch(`/api/minds/${encodeURIComponent(targetName)}/files/stage`, {
221
- method: "POST",
222
- headers: { "Content-Type": "application/json" },
223
- body: JSON.stringify({
224
- sender: senderName,
225
- filename,
226
- data: content.toString("base64")
227
- })
228
- });
229
- if (!res.ok) {
230
- const data2 = await res.json();
231
- console.error(data2.error ?? `Failed to stage file: ${res.status}`);
232
- process.exit(1);
233
- }
234
- const data = await res.json();
235
- console.log(`File staged for ${targetName} (id: ${data.id})`);
236
- }
237
- if (!message) return;
238
- }
239
- let parsed = parseTarget(target);
240
- if (!parsed.isDM && parsed.platform === "volute" && await isMind(parsed.identifier)) {
241
- parsed = {
242
- platform: "volute",
243
- identifier: `@${parsed.identifier}`,
244
- uri: `@${parsed.identifier}`,
245
- isDM: true
246
- };
247
- }
248
- const client = getClient();
249
- let waitMindName;
250
- let waitConversationId;
251
- if (parsed.isDM && parsed.platform === "volute") {
252
- const targetName = parsed.identifier.slice(1);
253
- const mindSelf = process.env.VOLUTE_MIND;
254
- const sender = flags.sender || mindSelf || userInfo().username;
255
- const targetIsMind = await isMind(targetName);
256
- waitMindName = targetIsMind ? targetName : void 0;
257
- const contextMind = mindSelf ?? targetName;
258
- const participants = mindSelf ? [targetName] : [sender];
259
- const createRes = await daemonFetch(
260
- urlOf(client.api.minds[":name"].channels.create.$url({ param: { name: contextMind } })),
261
- {
262
- method: "POST",
263
- headers: { "Content-Type": "application/json" },
264
- body: JSON.stringify({ platform: "volute", participants, sender })
265
- }
266
- );
267
- if (!createRes.ok) {
268
- const data = await createRes.json().catch(() => ({ error: "Unknown error" }));
269
- console.error(data.error);
270
- process.exit(1);
271
- }
272
- const { conversationId: convId } = await createRes.json();
273
- if (convId) waitConversationId = convId;
274
- const sendRes = await daemonFetch("/api/v1/chat", {
275
- method: "POST",
276
- headers: { "Content-Type": "application/json" },
277
- body: JSON.stringify({
278
- message: message ?? "",
279
- conversationId: convId,
280
- images,
281
- sender,
282
- targetMind: contextMind
283
- })
284
- });
285
- if (!sendRes.ok) {
286
- const data = await sendRes.json().catch(() => ({ error: "Unknown error" }));
287
- console.error(data.error);
288
- process.exit(1);
289
- }
290
- if (!flags.wait) {
291
- let outboundId;
292
- try {
293
- const resData = await sendRes.json();
294
- outboundId = resData.outboundId;
295
- } catch (err) {
296
- console.error(
297
- `Warning: could not read outboundId from response: ${err.message}`
298
- );
299
- }
300
- console.log(`Message sent.${outboundId != null ? `
301
- [volute:outbound:${outboundId}]` : ""}`);
302
- }
303
- } else if (!parsed.isDM && parsed.platform === "volute") {
304
- if (!parsed.identifier.startsWith("#")) {
305
- console.error(
306
- `Mind "${parsed.identifier}" not found.
307
- To send a DM: volute chat send @${parsed.identifier} "..."
308
- To send to channel: volute chat send #${parsed.identifier} "..."`
309
- );
310
- process.exit(1);
311
- }
312
- const channelName = parsed.identifier.slice(1);
313
- const mindSelf = process.env.VOLUTE_MIND;
314
- const sender = flags.sender || mindSelf || userInfo().username;
315
- const channelRes = await daemonFetch(`/api/v1/channels/${encodeURIComponent(channelName)}`);
316
- if (!channelRes.ok) {
317
- console.error(`Channel "${channelName}" not found. Create it first or check the name.`);
318
- process.exit(1);
319
- }
320
- const channelData = await channelRes.json();
321
- const mindParticipant = channelData.participants?.find((p) => p.userType === "mind");
322
- const contextMind = mindSelf ?? mindParticipant?.username;
323
- if (!contextMind) {
324
- console.error("No mind is a member of this channel. A mind must join the channel first.");
325
- process.exit(1);
326
- }
327
- const sendRes = await daemonFetch("/api/v1/chat", {
328
- method: "POST",
329
- headers: { "Content-Type": "application/json" },
330
- body: JSON.stringify({
331
- message: message ?? "",
332
- conversationId: channelData.id,
333
- images,
334
- sender,
335
- targetMind: contextMind
336
- })
337
- });
338
- if (!sendRes.ok) {
339
- const data = await sendRes.json().catch(() => ({ error: "Unknown error" }));
340
- console.error(data.error);
341
- process.exit(1);
342
- }
343
- let outboundId;
344
- try {
345
- const resData = await sendRes.json();
346
- outboundId = resData.outboundId;
347
- } catch (err) {
348
- console.error(`Warning: could not read outboundId from response: ${err.message}`);
349
- }
350
- console.log(`Message sent.${outboundId != null ? `
351
- [volute:outbound:${outboundId}]` : ""}`);
352
- } else {
353
- console.error(
354
- `Direct sends to ${parsed.platform} channels are no longer supported.
355
- Use bridge channel names instead (e.g. volute chat send @mind-name or #channel-name).
356
- See: volute chat bridge --help`
357
- );
358
- process.exit(1);
359
- }
360
- if (flags.wait && waitMindName) {
361
- if (!waitConversationId) {
362
- console.error("--wait requires a volute conversation (DM to a mind)");
363
- process.exit(1);
364
- }
365
- await waitForResponse(waitMindName, waitConversationId, flags.timeout ?? 12e4);
366
- } else if (flags.wait && !waitMindName) {
367
- console.error("--wait is only supported when sending to a mind");
368
- process.exit(1);
369
- }
370
- }
371
- export {
372
- run
373
- };