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
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ isCompact
4
+ } from "./chunk-5T5YMX6S.js";
5
+ import {
6
+ resolveMindName
7
+ } from "./chunk-BTY4WNFE.js";
8
+ import {
9
+ command
10
+ } from "./chunk-TXSA4Q3V.js";
11
+ import "./chunk-O7IGP7ZW.js";
12
+ import {
13
+ daemonFetch
14
+ } from "./chunk-ZX7EAV5J.js";
15
+ import "./chunk-7KJOFUNN.js";
16
+
17
+ // packages/cli/src/commands/chat/list.ts
18
+ var cmd = command({
19
+ name: "volute chat list",
20
+ description: "List conversations",
21
+ flags: {
22
+ mind: { type: "string", description: "Mind name" }
23
+ },
24
+ async run({ flags }) {
25
+ const mindName = resolveMindName(flags);
26
+ const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindName)}/conversations`);
27
+ if (!res.ok) {
28
+ console.error(`Failed to list conversations: ${res.status}`);
29
+ process.exit(1);
30
+ }
31
+ const convs = await res.json();
32
+ if (convs.length === 0) {
33
+ console.log("No conversations.");
34
+ return;
35
+ }
36
+ const compact = isCompact();
37
+ for (const conv of convs) {
38
+ const label = conv.type === "channel" ? `#${conv.name}` : conv.title ?? conv.id.slice(0, 8);
39
+ if (compact) {
40
+ console.log(`${label} (${conv.type})`);
41
+ } else {
42
+ const time = new Date(
43
+ conv.updated_at.endsWith("Z") ? conv.updated_at : `${conv.updated_at}Z`
44
+ ).toLocaleString();
45
+ console.log(` ${label} (${conv.type}) ${time}`);
46
+ }
47
+ }
48
+ }
49
+ });
50
+ var run = cmd.execute;
51
+ export {
52
+ run
53
+ };
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ promptLine,
4
+ promptPassword
5
+ } from "./chunk-VHWGEJ4V.js";
6
+ import {
7
+ command
8
+ } from "./chunk-TXSA4Q3V.js";
9
+ import "./chunk-O7IGP7ZW.js";
10
+ import {
11
+ daemonFetch
12
+ } from "./chunk-ZX7EAV5J.js";
13
+ import {
14
+ voluteUserHome
15
+ } from "./chunk-BDYXIWA5.js";
16
+ import "./chunk-5N7Y5WAM.js";
17
+ import "./chunk-7KJOFUNN.js";
18
+
19
+ // packages/cli/src/commands/login.ts
20
+ import { writeFileSync } from "fs";
21
+ import { resolve } from "path";
22
+ var cmd = command({
23
+ name: "volute login",
24
+ description: "Log in to the daemon",
25
+ flags: {},
26
+ run: async () => {
27
+ const username = await promptLine("Username: ");
28
+ const password = await promptPassword("Password: ");
29
+ const res = await daemonFetch("/api/auth/login", {
30
+ method: "POST",
31
+ headers: { "Content-Type": "application/json" },
32
+ body: JSON.stringify({ username, password })
33
+ });
34
+ if (!res.ok) {
35
+ const data = await res.json().catch(() => ({}));
36
+ console.error(data.error || "Login failed");
37
+ process.exit(1);
38
+ }
39
+ const {
40
+ username: name,
41
+ role,
42
+ sessionId
43
+ } = await res.json();
44
+ const sessionPath = resolve(voluteUserHome(), "cli-session.json");
45
+ try {
46
+ const sessionData = { sessionId, username: name };
47
+ const daemonUrl = process.env.VOLUTE_DAEMON_URL;
48
+ if (daemonUrl) sessionData.daemonUrl = daemonUrl;
49
+ writeFileSync(sessionPath, JSON.stringify(sessionData), { mode: 384 });
50
+ } catch (err) {
51
+ console.error(`Login succeeded but failed to save session: ${err.message}`);
52
+ process.exit(1);
53
+ }
54
+ console.log(`Logged in as ${name} (role: ${role})`);
55
+ }
56
+ });
57
+ var run = cmd.execute;
58
+ export {
59
+ run
60
+ };
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ promptLine
4
+ } from "./chunk-VHWGEJ4V.js";
5
+ import {
6
+ command
7
+ } from "./chunk-TXSA4Q3V.js";
8
+ import "./chunk-O7IGP7ZW.js";
9
+ import {
10
+ daemonFetch
11
+ } from "./chunk-ZX7EAV5J.js";
12
+ import "./chunk-7KJOFUNN.js";
13
+
14
+ // packages/cli/src/commands/systems/login.ts
15
+ var cmd = command({
16
+ name: "volute systems login",
17
+ description: "Log in with an existing API key",
18
+ flags: {
19
+ key: { type: "string", description: "API key" }
20
+ },
21
+ run: async ({ flags }) => {
22
+ let key = flags.key;
23
+ if (!key) {
24
+ if (!process.stdin.isTTY) {
25
+ console.error("Usage: volute systems login --key <api-key>");
26
+ process.exit(1);
27
+ }
28
+ key = await promptLine("API key: ");
29
+ if (!key) {
30
+ console.error("No key provided.");
31
+ process.exit(1);
32
+ }
33
+ }
34
+ const res = await daemonFetch("/api/system/login", {
35
+ method: "POST",
36
+ headers: { "Content-Type": "application/json" },
37
+ body: JSON.stringify({ key })
38
+ });
39
+ if (!res.ok) {
40
+ const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
41
+ console.error(`Login failed: ${body.error}`);
42
+ process.exit(1);
43
+ }
44
+ const { system } = await res.json();
45
+ console.log(`Logged in as "${system}". Credentials saved.`);
46
+ }
47
+ });
48
+ var run = cmd.execute;
49
+ export {
50
+ run
51
+ };
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ command
4
+ } from "./chunk-TXSA4Q3V.js";
5
+ import "./chunk-O7IGP7ZW.js";
6
+ import {
7
+ daemonFetch
8
+ } from "./chunk-ZX7EAV5J.js";
9
+ import "./chunk-7KJOFUNN.js";
10
+
11
+ // packages/cli/src/commands/systems/logout.ts
12
+ var cmd = command({
13
+ name: "volute systems logout",
14
+ description: "Remove stored volute.systems credentials",
15
+ flags: {},
16
+ run: async () => {
17
+ const res = await daemonFetch("/api/system/logout", { method: "POST" });
18
+ if (!res.ok) {
19
+ const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
20
+ console.error(`Logout failed: ${body.error}`);
21
+ process.exit(1);
22
+ }
23
+ console.log("Logged out. Credentials removed.");
24
+ }
25
+ });
26
+ var run = cmd.execute;
27
+ export {
28
+ run
29
+ };
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ command
4
+ } from "./chunk-TXSA4Q3V.js";
5
+ import "./chunk-O7IGP7ZW.js";
6
+ import {
7
+ daemonFetch
8
+ } from "./chunk-ZX7EAV5J.js";
9
+ import {
10
+ voluteUserHome
11
+ } from "./chunk-BDYXIWA5.js";
12
+ import "./chunk-5N7Y5WAM.js";
13
+ import "./chunk-7KJOFUNN.js";
14
+
15
+ // packages/cli/src/commands/logout.ts
16
+ import { existsSync, readFileSync, unlinkSync } from "fs";
17
+ import { resolve } from "path";
18
+ var cmd = command({
19
+ name: "volute logout",
20
+ description: "Log out of the daemon",
21
+ flags: {},
22
+ run: async () => {
23
+ const sessionPath = resolve(voluteUserHome(), "cli-session.json");
24
+ if (!existsSync(sessionPath)) {
25
+ console.log("Not logged in");
26
+ return;
27
+ }
28
+ let sessionId;
29
+ try {
30
+ const data = JSON.parse(readFileSync(sessionPath, "utf-8"));
31
+ sessionId = data.sessionId;
32
+ } catch {
33
+ }
34
+ if (sessionId) {
35
+ try {
36
+ await daemonFetch("/api/auth/logout", {
37
+ method: "POST",
38
+ headers: { Authorization: `Bearer ${sessionId}` }
39
+ });
40
+ } catch {
41
+ }
42
+ }
43
+ unlinkSync(sessionPath);
44
+ console.log("Logged out");
45
+ }
46
+ });
47
+ var run = cmd.execute;
48
+ export {
49
+ run
50
+ };
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ deliverMessage,
4
+ linkToolResultToTurn,
5
+ recordInbound,
6
+ recordOutbound,
7
+ resolveSleepAction,
8
+ tagRecentInbound,
9
+ tagUntaggedInbound,
10
+ tagUntaggedOutbound
11
+ } from "./chunk-WJPROOU5.js";
12
+ import "./chunk-5XJYUFZH.js";
13
+ import "./chunk-AOB6GVRM.js";
14
+ import "./chunk-IJHIXLVN.js";
15
+ import "./chunk-QWTR6AWZ.js";
16
+ import "./chunk-N446KRP7.js";
17
+ import "./chunk-QHG4OMZL.js";
18
+ import "./chunk-XRQSAMX2.js";
19
+ import "./chunk-WZRZFFCL.js";
20
+ import "./chunk-CORXD635.js";
21
+ import "./chunk-ZSR72JB3.js";
22
+ import "./chunk-PWQ2ITYG.js";
23
+ import "./chunk-A2ZLHBHG.js";
24
+ import "./chunk-FT5KETXZ.js";
25
+ import "./chunk-BKF4WQCY.js";
26
+ import "./chunk-AN2W47GW.js";
27
+ import "./chunk-VHJRZM2S.js";
28
+ import "./chunk-BMZQYACC.js";
29
+ import "./chunk-BDYXIWA5.js";
30
+ import "./chunk-5N7Y5WAM.js";
31
+ import "./chunk-7KJOFUNN.js";
32
+ export {
33
+ deliverMessage,
34
+ linkToolResultToTurn,
35
+ recordInbound,
36
+ recordOutbound,
37
+ resolveSleepAction,
38
+ tagRecentInbound,
39
+ tagUntaggedInbound,
40
+ tagUntaggedOutbound
41
+ };
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ subcommands
4
+ } from "./chunk-TXSA4Q3V.js";
5
+ import "./chunk-O7IGP7ZW.js";
6
+ import "./chunk-7KJOFUNN.js";
7
+
8
+ // packages/cli/src/commands/mind.ts
9
+ function transformMindFlag(args) {
10
+ if (args.length > 0 && args[0] && !args[0].startsWith("-")) {
11
+ return ["--mind", args[0], ...args.slice(1)];
12
+ }
13
+ return args;
14
+ }
15
+ var cmd = subcommands({
16
+ name: "volute mind",
17
+ description: "Manage minds",
18
+ commands: {
19
+ create: {
20
+ description: "Create a new mind",
21
+ run: (args) => import("./create-UVCK2CS6.js").then((m) => m.run(args))
22
+ },
23
+ start: {
24
+ description: "Start a mind",
25
+ run: (args) => import("./start-3UXOPXQG.js").then((m) => m.run(args))
26
+ },
27
+ stop: {
28
+ description: "Stop a mind",
29
+ run: (args) => import("./stop-3XYIBGFM.js").then((m) => m.run(args))
30
+ },
31
+ restart: {
32
+ description: "Restart a mind",
33
+ run: (args) => import("./restart-5EGG4JXU.js").then((m) => m.run(args))
34
+ },
35
+ delete: {
36
+ description: "Delete a mind",
37
+ run: (args) => import("./delete-L5PAVDGQ.js").then((m) => m.run(args))
38
+ },
39
+ list: {
40
+ description: "List all minds",
41
+ run: (args) => import("./mind-list-GEWHWAL4.js").then((m) => m.run(args))
42
+ },
43
+ status: {
44
+ description: "Check mind status",
45
+ run: (args) => import("./mind-status-X4SX3YUG.js").then((m) => m.run(args))
46
+ },
47
+ history: {
48
+ description: "View mind activity history",
49
+ run: (args) => import("./mind-history-IE2QH7U5.js").then((m) => m.run(transformMindFlag(args)))
50
+ },
51
+ profile: {
52
+ description: "Update mind profile",
53
+ run: (args) => import("./mind-profile-DCBDVF5B.js").then((m) => m.run(args))
54
+ },
55
+ upgrade: {
56
+ description: "Upgrade mind to latest template",
57
+ run: (args) => import("./upgrade-ZMDGC7M2.js").then((m) => m.run(args))
58
+ },
59
+ import: {
60
+ description: "Import an OpenClaw workspace",
61
+ run: (args) => import("./import-5A3T7QV4.js").then((m) => m.run(args))
62
+ },
63
+ export: {
64
+ description: "Export a mind",
65
+ run: (args) => import("./export-OAS6QVBN.js").then((m) => m.run(args))
66
+ },
67
+ split: {
68
+ description: "Create a variant",
69
+ run: (args) => import("./split-AWVOYOPZ.js").then((m) => m.run(args))
70
+ },
71
+ join: {
72
+ description: "Merge variant back",
73
+ run: (args) => import("./join-DF5XSJAC.js").then((m) => m.run(args))
74
+ },
75
+ sleep: {
76
+ description: "Put a mind to sleep",
77
+ run: (args) => import("./mind-sleep-ITCF6OQA.js").then((m) => m.run(args))
78
+ },
79
+ wake: {
80
+ description: "Wake a sleeping mind",
81
+ run: (args) => import("./mind-wake-KXMKMGWX.js").then((m) => m.run(args))
82
+ },
83
+ seed: {
84
+ description: "(legacy) Use 'volute seed create' instead",
85
+ run: (args) => import("./seed-EQORWX77.js").then((m) => m.run(args))
86
+ },
87
+ sprout: {
88
+ description: "(legacy) Use 'volute seed sprout' instead",
89
+ run: (args) => import("./sprout-HE4TITMK.js").then((m) => m.run(args))
90
+ }
91
+ },
92
+ footer: "Mind name can be omitted (where applicable) if VOLUTE_MIND is set."
93
+ });
94
+ var run = cmd.execute;
95
+ export {
96
+ run
97
+ };
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ getActiveMinds,
4
+ markIdle,
5
+ onMindEvent,
6
+ stopAll
7
+ } from "./chunk-N446KRP7.js";
8
+ import "./chunk-CORXD635.js";
9
+ import "./chunk-BKF4WQCY.js";
10
+ import "./chunk-BDYXIWA5.js";
11
+ import "./chunk-5N7Y5WAM.js";
12
+ import "./chunk-7KJOFUNN.js";
13
+ export {
14
+ getActiveMinds,
15
+ markIdle,
16
+ onMindEvent,
17
+ stopAll
18
+ };
@@ -0,0 +1,275 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ compactTime,
4
+ isCompact
5
+ } from "./chunk-5T5YMX6S.js";
6
+ import {
7
+ resolveMindName
8
+ } from "./chunk-BTY4WNFE.js";
9
+ import {
10
+ command
11
+ } from "./chunk-TXSA4Q3V.js";
12
+ import "./chunk-O7IGP7ZW.js";
13
+ import {
14
+ daemonFetch
15
+ } from "./chunk-ZX7EAV5J.js";
16
+ import {
17
+ getClient,
18
+ urlOf
19
+ } from "./chunk-LOPXTW6H.js";
20
+ import "./chunk-7KJOFUNN.js";
21
+
22
+ // packages/cli/src/commands/mind-history.ts
23
+ function normalizeTimestamp(dateStr) {
24
+ return dateStr.endsWith("Z") ? dateStr : `${dateStr}Z`;
25
+ }
26
+ function formatRow(row) {
27
+ const time = new Date(normalizeTimestamp(row.created_at)).toLocaleString();
28
+ const channel = row.channel ?? "";
29
+ switch (row.type) {
30
+ case "inbound":
31
+ case "outbound": {
32
+ const sender = row.sender ?? (row.type === "outbound" ? "mind" : "unknown");
33
+ return `[${time}] [${channel}] ${sender}: ${row.content ?? ""}`;
34
+ }
35
+ case "text":
36
+ return `[${time}] [text] ${row.content ?? ""}`;
37
+ case "thinking":
38
+ return `[${time}] [thinking] ${(row.content ?? "").slice(0, 200)}${(row.content?.length ?? 0) > 200 ? "..." : ""}`;
39
+ case "tool_use": {
40
+ let toolName = "unknown";
41
+ if (row.metadata) {
42
+ try {
43
+ const meta = JSON.parse(row.metadata);
44
+ toolName = meta.name ?? toolName;
45
+ } catch {
46
+ }
47
+ }
48
+ return `[${time}] [tool] ${toolName}${row.content ? `: ${row.content.slice(0, 100)}` : ""}`;
49
+ }
50
+ case "tool_result":
51
+ return `[${time}] [result] ${(row.content ?? "").slice(0, 200)}${(row.content?.length ?? 0) > 200 ? "..." : ""}`;
52
+ case "usage": {
53
+ if (row.metadata) {
54
+ try {
55
+ const meta = JSON.parse(row.metadata);
56
+ return `[${time}] [usage] in=${meta.input_tokens ?? 0} out=${meta.output_tokens ?? 0}`;
57
+ } catch {
58
+ }
59
+ }
60
+ return `[${time}] [usage]`;
61
+ }
62
+ case "done":
63
+ return `[${time}] [done]`;
64
+ case "log": {
65
+ let category = "";
66
+ if (row.metadata) {
67
+ try {
68
+ const meta = JSON.parse(row.metadata);
69
+ category = meta.category ? `${meta.category}: ` : "";
70
+ } catch {
71
+ }
72
+ }
73
+ return `[${time}] [log] ${category}${row.content ?? ""}`;
74
+ }
75
+ case "summary": {
76
+ let range = "";
77
+ if (row.metadata) {
78
+ try {
79
+ const meta = JSON.parse(row.metadata);
80
+ if (meta.from_time && meta.to_time) {
81
+ const from = new Date(normalizeTimestamp(meta.from_time)).toLocaleTimeString();
82
+ const to = new Date(normalizeTimestamp(meta.to_time)).toLocaleTimeString();
83
+ range = ` (${from}\u2013${to})`;
84
+ }
85
+ } catch {
86
+ }
87
+ }
88
+ return `[${time}] [summary${range}] ${row.content ?? ""}`;
89
+ }
90
+ case "session_start":
91
+ return `[${time}] [session_start] ${row.session ?? ""}`;
92
+ default:
93
+ return `[${time}] [${row.type}] ${row.content ?? ""}`;
94
+ }
95
+ }
96
+ function formatRowCompact(row) {
97
+ const time = compactTime(row.created_at);
98
+ const channel = row.channel ?? "";
99
+ switch (row.type) {
100
+ case "inbound":
101
+ case "outbound": {
102
+ const sender = row.sender ?? (row.type === "outbound" ? "mind" : "unknown");
103
+ return `[${time}] [${channel}] ${sender}: ${row.content ?? ""}`;
104
+ }
105
+ case "text":
106
+ return `[${time}] [text] ${row.content ?? ""}`;
107
+ case "thinking":
108
+ return `[${time}] [thinking] ${(row.content ?? "").slice(0, 200)}${(row.content?.length ?? 0) > 200 ? "..." : ""}`;
109
+ case "tool_use": {
110
+ let toolName = "unknown";
111
+ if (row.metadata) {
112
+ try {
113
+ const meta = JSON.parse(row.metadata);
114
+ toolName = meta.name ?? toolName;
115
+ } catch {
116
+ }
117
+ }
118
+ return `[${time}] [tool] ${toolName}${row.content ? `: ${row.content.slice(0, 100)}` : ""}`;
119
+ }
120
+ case "tool_result":
121
+ return `[${time}] [result] ${(row.content ?? "").slice(0, 200)}${(row.content?.length ?? 0) > 200 ? "..." : ""}`;
122
+ case "log": {
123
+ let category = "";
124
+ if (row.metadata) {
125
+ try {
126
+ const meta = JSON.parse(row.metadata);
127
+ category = meta.category ? `${meta.category}: ` : "";
128
+ } catch {
129
+ }
130
+ }
131
+ return `[${time}] [log] ${category}${row.content ?? ""}`;
132
+ }
133
+ case "summary": {
134
+ let range = "";
135
+ if (row.metadata) {
136
+ try {
137
+ const meta = JSON.parse(row.metadata);
138
+ if (meta.from_time && meta.to_time) {
139
+ range = ` (${compactTime(meta.from_time)}\u2013${compactTime(meta.to_time)})`;
140
+ }
141
+ } catch {
142
+ }
143
+ }
144
+ return `[${time}] [summary${range}] ${row.content ?? ""}`;
145
+ }
146
+ case "session_start":
147
+ return `[${time}] [session_start] ${row.session ?? ""}`;
148
+ default:
149
+ return `[${time}] [${row.type}] ${row.content ?? ""}`;
150
+ }
151
+ }
152
+ var PERIOD_LABELS = {
153
+ hour: "Hourly",
154
+ day: "Daily",
155
+ week: "Weekly",
156
+ month: "Monthly"
157
+ };
158
+ function formatMetaSummary(row) {
159
+ const label = PERIOD_LABELS[row.period] ?? row.period;
160
+ return `
161
+ === ${row.period_key} (${label}) ===
162
+ ${row.content ?? ""}
163
+ `;
164
+ }
165
+ function getDefaultRange(period) {
166
+ const now = /* @__PURE__ */ new Date();
167
+ switch (period) {
168
+ case "hour": {
169
+ const d = new Date(now);
170
+ d.setUTCDate(d.getUTCDate() - 1);
171
+ return d.toISOString().slice(0, 10);
172
+ }
173
+ case "day": {
174
+ const d = new Date(now);
175
+ d.setUTCDate(d.getUTCDate() - 7);
176
+ return d.toISOString().slice(0, 10);
177
+ }
178
+ case "week": {
179
+ const d = new Date(now);
180
+ d.setUTCDate(d.getUTCDate() - 28);
181
+ return d.toISOString().slice(0, 10);
182
+ }
183
+ case "month": {
184
+ const d = new Date(now);
185
+ d.setUTCMonth(d.getUTCMonth() - 6);
186
+ return d.toISOString().slice(0, 7);
187
+ }
188
+ default:
189
+ return "";
190
+ }
191
+ }
192
+ var cmd = command({
193
+ name: "volute mind history",
194
+ description: "View mind activity history",
195
+ flags: {
196
+ mind: { type: "string", description: "Mind name" },
197
+ channel: { type: "string", description: "Filter by channel" },
198
+ session: { type: "string", description: "Filter by session" },
199
+ preset: { type: "string", description: "Use a preset view" },
200
+ limit: { type: "string", description: "Number of entries to show" },
201
+ full: { type: "boolean", description: "Show full details" },
202
+ period: { type: "string", description: "Time period (hour, day, week, month)" },
203
+ from: { type: "string", description: "Start date" },
204
+ to: { type: "string", description: "End date" }
205
+ },
206
+ examples: [
207
+ "volute mind history --mind myname",
208
+ "volute mind history --mind myname --full",
209
+ "volute mind history --mind myname --period day"
210
+ ],
211
+ run: async ({ flags }) => {
212
+ if (flags.period) {
213
+ const validPeriods = ["hour", "day", "week", "month"];
214
+ if (!validPeriods.includes(flags.period)) {
215
+ console.error(
216
+ `Invalid period: ${flags.period}. Must be one of: ${validPeriods.join(", ")}`
217
+ );
218
+ process.exit(1);
219
+ }
220
+ const name2 = resolveMindName(flags);
221
+ const params = new URLSearchParams();
222
+ params.set("mind", name2);
223
+ params.set("period", flags.period);
224
+ if (flags.from) params.set("from", flags.from);
225
+ else params.set("from", getDefaultRange(flags.period));
226
+ if (flags.to) params.set("to", flags.to);
227
+ if (flags.limit) params.set("limit", flags.limit);
228
+ const res2 = await daemonFetch(`/api/v1/history/summaries?${params}`);
229
+ if (!res2.ok) {
230
+ let errorMsg = `Failed to get summaries: ${res2.status}`;
231
+ try {
232
+ const data = await res2.json();
233
+ if (data.error) errorMsg = data.error;
234
+ } catch {
235
+ }
236
+ console.error(errorMsg);
237
+ process.exit(1);
238
+ }
239
+ const rows2 = await res2.json();
240
+ for (const row of rows2.reverse()) {
241
+ console.log(formatMetaSummary(row));
242
+ }
243
+ return;
244
+ }
245
+ const name = resolveMindName(flags);
246
+ const client = getClient();
247
+ const url = client.api.minds[":name"].history.$url({ param: { name } });
248
+ if (flags.channel) url.searchParams.set("channel", flags.channel);
249
+ if (flags.session) url.searchParams.set("session", flags.session);
250
+ if (flags.preset) url.searchParams.set("preset", flags.preset);
251
+ if (flags.limit) url.searchParams.set("limit", flags.limit);
252
+ if (flags.full) url.searchParams.set("full", "true");
253
+ const res = await daemonFetch(urlOf(url));
254
+ if (!res.ok) {
255
+ let errorMsg = `Failed to get history: ${res.status}`;
256
+ try {
257
+ const data = await res.json();
258
+ if (data.error) errorMsg = data.error;
259
+ } catch {
260
+ }
261
+ console.error(errorMsg);
262
+ process.exit(1);
263
+ }
264
+ const rows = await res.json();
265
+ const compact = isCompact();
266
+ for (const row of rows.reverse()) {
267
+ if (compact && (row.type === "done" || row.type === "usage")) continue;
268
+ console.log(compact ? formatRowCompact(row) : formatRow(row));
269
+ }
270
+ }
271
+ });
272
+ var run = cmd.execute;
273
+ export {
274
+ run
275
+ };