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
@@ -5,10 +5,10 @@ import {
5
5
  extractArchive,
6
6
  isHomeOnlyArchive,
7
7
  readManifest
8
- } from "./chunk-I5KY25PQ.js";
9
- import "./chunk-LRCG2JLP.js";
10
- import "./chunk-RPZZSXV3.js";
11
- import "./chunk-K3NQKI34.js";
8
+ } from "./chunk-N5LMGYXX.js";
9
+ import "./chunk-BDYXIWA5.js";
10
+ import "./chunk-5N7Y5WAM.js";
11
+ import "./chunk-7KJOFUNN.js";
12
12
  export {
13
13
  addHistoryToArchive,
14
14
  createExportArchive,
@@ -17,12 +17,12 @@ import {
17
17
  syncMindProfile,
18
18
  updateUserProfile,
19
19
  verifyUser
20
- } from "./chunk-JYVGHWEJ.js";
21
- import "./chunk-KVK2DLWI.js";
22
- import "./chunk-YUIHSKR6.js";
23
- import "./chunk-LRCG2JLP.js";
24
- import "./chunk-RPZZSXV3.js";
25
- import "./chunk-K3NQKI34.js";
20
+ } from "./chunk-XRQSAMX2.js";
21
+ import "./chunk-CORXD635.js";
22
+ import "./chunk-BKF4WQCY.js";
23
+ import "./chunk-BDYXIWA5.js";
24
+ import "./chunk-5N7Y5WAM.js";
25
+ import "./chunk-7KJOFUNN.js";
26
26
  export {
27
27
  approveUser,
28
28
  changePassword,
@@ -0,0 +1,206 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ command,
4
+ subcommands
5
+ } from "./chunk-TXSA4Q3V.js";
6
+ import "./chunk-O7IGP7ZW.js";
7
+ import {
8
+ daemonFetch
9
+ } from "./chunk-ZX7EAV5J.js";
10
+ import "./chunk-7KJOFUNN.js";
11
+
12
+ // packages/cli/src/commands/chat/bridge.ts
13
+ var bridgeAddCmd = command({
14
+ name: "volute chat bridge add",
15
+ description: "Enable a bridge with a default mind",
16
+ args: [
17
+ {
18
+ name: "platform",
19
+ required: true,
20
+ description: "Bridge platform (e.g. discord, slack, telegram)"
21
+ }
22
+ ],
23
+ flags: {
24
+ "default-mind": { type: "string", description: "Mind to route DMs to (required)" }
25
+ },
26
+ run: async ({ args, flags }) => {
27
+ const platform = args.platform;
28
+ const defaultMind = flags["default-mind"];
29
+ if (!defaultMind) {
30
+ console.error("--default-mind is required (mind to route DMs to)");
31
+ process.exit(1);
32
+ }
33
+ const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}`, {
34
+ method: "POST",
35
+ headers: { "Content-Type": "application/json" },
36
+ body: JSON.stringify({ defaultMind })
37
+ });
38
+ if (!res.ok) {
39
+ const data = await res.json().catch(() => ({}));
40
+ if (data.error === "missing_env" && data.missing) {
41
+ console.error(`Missing required environment variables:`);
42
+ for (const v of data.missing) {
43
+ console.error(` ${v.name} \u2014 ${v.description}`);
44
+ }
45
+ console.error(`
46
+ Set them with: volute env set <VAR> <value>`);
47
+ } else {
48
+ console.error(data.error ?? `Failed to add bridge: ${res.status}`);
49
+ }
50
+ process.exit(1);
51
+ }
52
+ console.log(`Bridge ${platform} enabled.`);
53
+ }
54
+ });
55
+ var bridgeRemoveCmd = command({
56
+ name: "volute chat bridge remove",
57
+ description: "Disable a bridge",
58
+ args: [{ name: "platform", required: true, description: "Bridge platform to remove" }],
59
+ flags: {},
60
+ run: async ({ args }) => {
61
+ const platform = args.platform;
62
+ const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}`, {
63
+ method: "DELETE"
64
+ });
65
+ if (!res.ok) {
66
+ console.error(`Failed to remove bridge: ${res.status}`);
67
+ process.exit(1);
68
+ }
69
+ console.log(`Bridge ${platform} removed.`);
70
+ }
71
+ });
72
+ var bridgeListCmd = command({
73
+ name: "volute chat bridge list",
74
+ description: "Show all bridges and their status",
75
+ args: [],
76
+ flags: {},
77
+ run: async () => {
78
+ const res = await daemonFetch("/api/bridges");
79
+ if (!res.ok) {
80
+ console.error(`Failed to list bridges: ${res.status}`);
81
+ process.exit(1);
82
+ }
83
+ const bridges = await res.json();
84
+ if (bridges.length === 0) {
85
+ console.log("No bridges configured. Use 'volute chat bridge add <platform>' to set one up.");
86
+ return;
87
+ }
88
+ for (const b of bridges) {
89
+ const status = b.running ? "running" : b.enabled ? "stopped" : "disabled";
90
+ console.log(` ${b.displayName} (${b.platform}) ${status} default: ${b.defaultMind}`);
91
+ }
92
+ }
93
+ });
94
+ var bridgeMapCmd = command({
95
+ name: "volute chat bridge map",
96
+ description: "Map an external channel to a Volute channel",
97
+ args: [
98
+ { name: "target", required: true, description: "External channel (platform:channel)" },
99
+ { name: "volute-channel", required: true, description: "Volute channel name" }
100
+ ],
101
+ flags: {},
102
+ run: async ({ args }) => {
103
+ const target = args.target;
104
+ const voluteChannel = args["volute-channel"];
105
+ const colonIdx = target.indexOf(":");
106
+ if (colonIdx < 1) {
107
+ console.error("Target must be in format platform:channel (e.g. discord:my-server/general)");
108
+ process.exit(1);
109
+ }
110
+ const platform = target.slice(0, colonIdx);
111
+ const externalChannel = target.slice(colonIdx + 1);
112
+ const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}/mappings`, {
113
+ method: "PUT",
114
+ headers: { "Content-Type": "application/json" },
115
+ body: JSON.stringify({ externalChannel, voluteChannel })
116
+ });
117
+ if (!res.ok) {
118
+ const data = await res.json().catch(() => ({}));
119
+ console.error(data.error ?? `Failed to set mapping: ${res.status}`);
120
+ process.exit(1);
121
+ }
122
+ console.log(`Mapped ${platform}:${externalChannel} \u2192 ${voluteChannel}`);
123
+ }
124
+ });
125
+ var bridgeUnmapCmd = command({
126
+ name: "volute chat bridge unmap",
127
+ description: "Remove a channel mapping",
128
+ args: [{ name: "target", required: true, description: "External channel (platform:channel)" }],
129
+ flags: {},
130
+ run: async ({ args }) => {
131
+ const target = args.target;
132
+ const colonIdx = target.indexOf(":");
133
+ if (colonIdx < 1) {
134
+ console.error("Target must be in format platform:channel");
135
+ process.exit(1);
136
+ }
137
+ const platform = target.slice(0, colonIdx);
138
+ const externalChannel = target.slice(colonIdx + 1);
139
+ const res = await daemonFetch(
140
+ `/api/bridges/${encodeURIComponent(platform)}/mappings/${encodeURIComponent(externalChannel)}`,
141
+ { method: "DELETE" }
142
+ );
143
+ if (!res.ok) {
144
+ console.error(`Failed to remove mapping: ${res.status}`);
145
+ process.exit(1);
146
+ }
147
+ console.log(`Removed mapping for ${platform}:${externalChannel}`);
148
+ }
149
+ });
150
+ var bridgeMappingsCmd = command({
151
+ name: "volute chat bridge mappings",
152
+ description: "List channel mappings",
153
+ args: [{ name: "platform", description: "Filter by platform" }],
154
+ flags: {},
155
+ run: async ({ args }) => {
156
+ const platform = args.platform;
157
+ if (platform) {
158
+ const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}/mappings`);
159
+ if (!res.ok) {
160
+ console.error(`Failed to get mappings: ${res.status}`);
161
+ process.exit(1);
162
+ }
163
+ const mappings = await res.json();
164
+ if (Object.keys(mappings).length === 0) {
165
+ console.log(`No mappings for ${platform}.`);
166
+ return;
167
+ }
168
+ for (const [external, volute] of Object.entries(mappings)) {
169
+ console.log(` ${platform}:${external} \u2192 ${volute}`);
170
+ }
171
+ } else {
172
+ const res = await daemonFetch("/api/bridges");
173
+ if (!res.ok) {
174
+ console.error(`Failed to list bridges: ${res.status}`);
175
+ process.exit(1);
176
+ }
177
+ const bridges = await res.json();
178
+ let found = false;
179
+ for (const b of bridges) {
180
+ for (const [external, volute] of Object.entries(b.channelMappings)) {
181
+ console.log(` ${b.platform}:${external} \u2192 ${volute}`);
182
+ found = true;
183
+ }
184
+ }
185
+ if (!found) {
186
+ console.log("No mappings configured.");
187
+ }
188
+ }
189
+ }
190
+ });
191
+ var cmd = subcommands({
192
+ name: "volute chat bridge",
193
+ description: "Manage platform bridges",
194
+ commands: {
195
+ add: { description: "Enable a bridge with a default mind", run: bridgeAddCmd.execute },
196
+ remove: { description: "Disable a bridge", run: bridgeRemoveCmd.execute },
197
+ list: { description: "Show all bridges and their status", run: bridgeListCmd.execute },
198
+ map: { description: "Map an external channel to a Volute channel", run: bridgeMapCmd.execute },
199
+ unmap: { description: "Remove a channel mapping", run: bridgeUnmapCmd.execute },
200
+ mappings: { description: "List channel mappings", run: bridgeMappingsCmd.execute }
201
+ }
202
+ });
203
+ var run = cmd.execute;
204
+ export {
205
+ run
206
+ };
@@ -0,0 +1,51 @@
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/chat.ts
9
+ var cmd = subcommands({
10
+ name: "volute chat",
11
+ description: "Manage conversations and messages",
12
+ commands: {
13
+ send: {
14
+ description: "Send a message",
15
+ run: (args) => import("./send-JBJJQ7CA.js").then((m) => m.run(args))
16
+ },
17
+ list: {
18
+ description: "List conversations",
19
+ run: (args) => import("./list-PDMQM7ZV.js").then((m) => m.run(args))
20
+ },
21
+ read: {
22
+ description: "Read conversation messages",
23
+ run: (args) => import("./read-67VRP2DO.js").then((m) => m.run(args))
24
+ },
25
+ create: {
26
+ description: "Create a conversation",
27
+ run: (args) => import("./create-5BPOOJAN.js").then((m) => m.run(args))
28
+ },
29
+ bridge: {
30
+ description: "Manage platform bridges",
31
+ run: (args) => import("./bridge-PXIO6PS2.js").then((m) => m.run(args))
32
+ },
33
+ files: {
34
+ description: "List pending incoming files",
35
+ run: (args) => import("./files-CWTK6V3H.js").then((m) => m.run(args))
36
+ },
37
+ accept: {
38
+ description: "Accept a pending file",
39
+ run: (args) => import("./accept-ZBDVVCEU.js").then((m) => m.run(args))
40
+ },
41
+ reject: {
42
+ description: "Reject a pending file",
43
+ run: (args) => import("./reject-MUR2KWJ4.js").then((m) => m.run(args))
44
+ }
45
+ },
46
+ footer: "Use --mind <name> or VOLUTE_MIND to identify the mind."
47
+ });
48
+ var run = cmd.execute;
49
+ export {
50
+ run
51
+ };
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  exec,
4
4
  execInherit
5
- } from "./chunk-KIEPMIM5.js";
5
+ } from "./chunk-AN2W47GW.js";
6
6
  import {
7
7
  voluteSystemDir
8
- } from "./chunk-LRCG2JLP.js";
8
+ } from "./chunk-BDYXIWA5.js";
9
9
 
10
- // src/lib/service-mode.ts
10
+ // packages/daemon/src/lib/service-mode.ts
11
11
  import { execFileSync } from "child_process";
12
12
  import { existsSync, readFileSync } from "fs";
13
13
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // src/lib/read-stdin.ts
3
+ // packages/cli/src/lib/read-stdin.ts
4
4
  import { isatty } from "tty";
5
5
  async function readStdin() {
6
6
  if (isatty(0)) return void 0;
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  __export
4
- } from "./chunk-K3NQKI34.js";
4
+ } from "./chunk-7KJOFUNN.js";
5
5
 
6
- // src/lib/schema.ts
6
+ // packages/daemon/src/lib/schema.ts
7
7
  var schema_exports = {};
8
8
  __export(schema_exports, {
9
9
  activity: () => activity,
@@ -16,6 +16,7 @@ __export(schema_exports, {
16
16
  minds: () => minds,
17
17
  sessions: () => sessions,
18
18
  sharedSkills: () => sharedSkills,
19
+ summaries: () => summaries,
19
20
  systemPrompts: () => systemPrompts,
20
21
  turns: () => turns,
21
22
  users: () => users
@@ -83,6 +84,7 @@ var turns = sqliteTable(
83
84
  session: text("session"),
84
85
  trigger_event_id: integer("trigger_event_id"),
85
86
  summary_event_id: integer("summary_event_id"),
87
+ summary_id: integer("summary_id"),
86
88
  status: text("status").notNull().default("active"),
87
89
  created_at: text("created_at").notNull().default(sql`(datetime('now'))`)
88
90
  },
@@ -180,6 +182,22 @@ var activity = sqliteTable(
180
182
  index("idx_activity_turn_id").on(table.turn_id)
181
183
  ]
182
184
  );
185
+ var summaries = sqliteTable(
186
+ "summaries",
187
+ {
188
+ id: integer("id").primaryKey({ autoIncrement: true }),
189
+ mind: text("mind").notNull(),
190
+ period: text("period").notNull(),
191
+ period_key: text("period_key").notNull(),
192
+ content: text("content").notNull(),
193
+ metadata: text("metadata"),
194
+ created_at: text("created_at").notNull().default(sql`(datetime('now'))`)
195
+ },
196
+ (table) => [
197
+ uniqueIndex("idx_summaries_unique").on(table.mind, table.period, table.period_key),
198
+ index("idx_summaries_mind_period").on(table.mind, table.period)
199
+ ]
200
+ );
183
201
  var conversationReads = sqliteTable(
184
202
  "conversation_reads",
185
203
  {
@@ -221,6 +239,7 @@ export {
221
239
  sharedSkills,
222
240
  deliveryQueue,
223
241
  activity,
242
+ summaries,
224
243
  conversationReads,
225
244
  messages,
226
245
  schema_exports
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ // packages/cli/src/lib/format-cli.ts
4
+ var isCompact = () => !!process.env.VOLUTE_MIND;
5
+ function compactTime(dateStr) {
6
+ const d = new Date(dateStr.endsWith("Z") ? dateStr : `${dateStr}Z`);
7
+ return `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
8
+ }
9
+ function compactDateTime(dateStr) {
10
+ const d = new Date(dateStr.endsWith("Z") ? dateStr : `${dateStr}Z`);
11
+ const y = d.getFullYear();
12
+ const m = String(d.getMonth() + 1).padStart(2, "0");
13
+ const day = String(d.getDate()).padStart(2, "0");
14
+ const h = String(d.getHours()).padStart(2, "0");
15
+ const min = String(d.getMinutes()).padStart(2, "0");
16
+ return `${y}-${m}-${day} ${h}:${min}`;
17
+ }
18
+
19
+ export {
20
+ isCompact,
21
+ compactTime,
22
+ compactDateTime
23
+ };
@@ -4,35 +4,41 @@ import {
4
4
  composeTemplate,
5
5
  copyTemplateToDir,
6
6
  findTemplatesRoot
7
- } from "./chunk-G53F3JA4.js";
7
+ } from "./chunk-AOB6GVRM.js";
8
8
  import {
9
9
  getSharedSkill,
10
10
  installSkill
11
- } from "./chunk-C7I35G4R.js";
11
+ } from "./chunk-IJHIXLVN.js";
12
12
  import {
13
13
  qualifyModelId,
14
14
  resolveTemplate
15
- } from "./chunk-QTUVYI7W.js";
15
+ } from "./chunk-FT5KETXZ.js";
16
16
  import {
17
17
  logger_default
18
- } from "./chunk-YUIHSKR6.js";
18
+ } from "./chunk-BKF4WQCY.js";
19
19
  import {
20
20
  exec
21
- } from "./chunk-KIEPMIM5.js";
21
+ } from "./chunk-AN2W47GW.js";
22
22
  import {
23
23
  readGlobalConfig
24
- } from "./chunk-N432I7QH.js";
24
+ } from "./chunk-BMZQYACC.js";
25
25
  import {
26
26
  addSpirit,
27
27
  findMind,
28
28
  nextPort,
29
29
  voluteSystemDir
30
- } from "./chunk-LRCG2JLP.js";
30
+ } from "./chunk-BDYXIWA5.js";
31
31
 
32
- // src/lib/spirit.ts
32
+ // packages/daemon/src/lib/spirit.ts
33
33
  import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
34
+ import { homedir } from "os";
34
35
  import { resolve } from "path";
35
36
  var slog = logger_default.child("spirit");
37
+ function npmEnv() {
38
+ const cacheDir = resolve(homedir(), ".npm");
39
+ mkdirSync(cacheDir, { recursive: true });
40
+ return { ...process.env, npm_config_cache: cacheDir };
41
+ }
36
42
  function spiritDir() {
37
43
  return resolve(voluteSystemDir(), "spirit");
38
44
  }
@@ -71,7 +77,7 @@ async function ensureSpiritProject() {
71
77
  writeFileSync(configPath, `${JSON.stringify(mindConfig, null, 2)}
72
78
  `);
73
79
  }
74
- await exec("npm", ["install", "--ignore-scripts"], { cwd: dir });
80
+ await exec("npm", ["install", "--ignore-scripts"], { cwd: dir, env: npmEnv() });
75
81
  try {
76
82
  await exec("git", ["init"], { cwd: dir });
77
83
  await exec("git", ["add", "-A"], { cwd: dir });
@@ -79,7 +85,13 @@ async function ensureSpiritProject() {
79
85
  } catch (err) {
80
86
  slog.warn("git init failed for spirit \u2014 not critical", logger_default.errorData(err));
81
87
  }
82
- const spiritSkills = ["volute-admin", "orientation", "memory", "seed-nurture"];
88
+ const spiritSkills = [
89
+ "volute-admin",
90
+ "orientation",
91
+ "memory",
92
+ "seed-nurture",
93
+ "plan-coordinator"
94
+ ];
83
95
  for (const skillId of spiritSkills) {
84
96
  try {
85
97
  const shared = await getSharedSkill(skillId);
@@ -90,7 +102,7 @@ async function ensureSpiritProject() {
90
102
  slog.warn(`failed to install skill ${skillId} for spirit`, logger_default.errorData(err));
91
103
  }
92
104
  }
93
- const { createMindUser, chownMindDir, ensureVoluteGroup } = await import("./isolation-LLAYQYDY.js");
105
+ const { createMindUser, chownMindDir, ensureVoluteGroup } = await import("./isolation-TK5RX2WM.js");
94
106
  ensureVoluteGroup();
95
107
  createMindUser("volute", resolve(dir, "home"));
96
108
  chownMindDir(dir, "volute");
@@ -122,10 +134,10 @@ async function syncSpiritTemplate() {
122
134
  const newPkg = resolve(newComposed.composedDir, "package.json");
123
135
  if (existsSync(newPkg)) {
124
136
  cpSync(newPkg, resolve(dir, "package.json"));
125
- await exec("npm", ["install", "--ignore-scripts"], { cwd: dir });
137
+ await exec("npm", ["install", "--ignore-scripts"], { cwd: dir, env: npmEnv() });
126
138
  }
127
- const db = await (await import("./db-F34YLV7D.js")).getDb();
128
- const { minds } = await import("./schema-PA3M5ZKH.js");
139
+ const db = await (await import("./db-BVBJ57TU.js")).getDb();
140
+ const { minds } = await import("./schema-XVZ2CLKW.js");
129
141
  const { eq } = await import("drizzle-orm");
130
142
  await db.update(minds).set({ template: expectedTemplate }).where(eq(minds.name, "volute"));
131
143
  }
@@ -170,10 +182,10 @@ async function syncSpiritTemplate() {
170
182
  if (composedContent !== currentContent) {
171
183
  cpSync(composedPkg, currentPkg);
172
184
  }
173
- await exec("npm", ["install", "--ignore-scripts"], { cwd: dir });
185
+ await exec("npm", ["install", "--ignore-scripts"], { cwd: dir, env: npmEnv() });
174
186
  }
175
187
  } else if (nodeModulesMissing) {
176
- await exec("npm", ["install", "--ignore-scripts"], { cwd: dir });
188
+ await exec("npm", ["install", "--ignore-scripts"], { cwd: dir, env: npmEnv() });
177
189
  }
178
190
  for (const [p, content] of preserved) {
179
191
  const full = resolve(dir, p);
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
+ }) : x)(function(x) {
7
+ if (typeof require !== "undefined") return require.apply(this, arguments);
8
+ throw Error('Dynamic require of "' + x + '" is not supported');
9
+ });
10
+ var __commonJS = (cb, mod) => function __require2() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __export = (target, all) => {
14
+ for (var name in all)
15
+ __defProp(target, name, { get: all[name], enumerable: true });
16
+ };
17
+
18
+ export {
19
+ __require,
20
+ __commonJS,
21
+ __export
22
+ };
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  stateDir,
4
4
  voluteSystemDir
5
- } from "./chunk-LRCG2JLP.js";
5
+ } from "./chunk-BDYXIWA5.js";
6
6
 
7
- // src/lib/env.ts
7
+ // packages/daemon/src/lib/env.ts
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
9
9
  import { dirname, resolve } from "path";
10
10
  function sharedEnvPath() {
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  wrapForIsolation
4
- } from "./chunk-VH33ZWMW.js";
4
+ } from "./chunk-VHJRZM2S.js";
5
5
 
6
- // src/lib/exec.ts
6
+ // packages/daemon/src/lib/exec.ts
7
7
  import { execFile as execFileCb, execFileSync, spawn } from "child_process";
8
8
  async function exec(cmd, args, options) {
9
9
  const [wrappedCmd, wrappedArgs] = options?.mindName ? await wrapForIsolation(cmd, args, options.mindName) : [cmd, args];
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // src/lib/template.ts
3
+ // packages/daemon/src/lib/template.ts
4
4
  import {
5
5
  cpSync,
6
6
  existsSync,
@@ -2,16 +2,17 @@
2
2
  import {
3
3
  minds,
4
4
  schema_exports
5
- } from "./chunk-RPZZSXV3.js";
5
+ } from "./chunk-5N7Y5WAM.js";
6
6
 
7
- // src/lib/db.ts
7
+ // packages/daemon/src/lib/db.ts
8
8
  import { chmodSync, existsSync } from "fs";
9
9
  import { dirname as dirname2, resolve as resolve2 } from "path";
10
10
  import { fileURLToPath as fileURLToPath2 } from "url";
11
+ import { sql } from "drizzle-orm";
11
12
  import { drizzle } from "drizzle-orm/libsql";
12
13
  import { migrate } from "drizzle-orm/libsql/migrator";
13
14
 
14
- // src/lib/registry.ts
15
+ // packages/daemon/src/lib/registry.ts
15
16
  import { mkdirSync } from "fs";
16
17
  import { homedir } from "os";
17
18
  import { dirname, resolve } from "path";
@@ -191,9 +192,9 @@ function daemonLoopback() {
191
192
  return host;
192
193
  }
193
194
 
194
- // src/lib/db.ts
195
+ // packages/daemon/src/lib/db.ts
195
196
  var __dirname = dirname2(fileURLToPath2(import.meta.url));
196
- var migrationsFolder = existsSync(resolve2(__dirname, "../drizzle")) ? resolve2(__dirname, "../drizzle") : resolve2(__dirname, "../../drizzle");
197
+ var migrationsFolder = existsSync(resolve2(__dirname, "../drizzle")) ? resolve2(__dirname, "../drizzle") : existsSync(resolve2(__dirname, "../../drizzle")) ? resolve2(__dirname, "../../drizzle") : resolve2(__dirname, "../../../../drizzle");
197
198
  var db = null;
198
199
  var dbPromise = null;
199
200
  async function getDb() {
@@ -203,6 +204,9 @@ async function getDb() {
203
204
  try {
204
205
  const dbPath = process.env.VOLUTE_DB_PATH || resolve2(voluteSystemDir(), "volute.db");
205
206
  const instance = drizzle({ connection: { url: `file:${dbPath}` }, schema: schema_exports });
207
+ await instance.run(sql.raw("PRAGMA journal_mode=WAL"));
208
+ await instance.run(sql.raw("PRAGMA busy_timeout=5000"));
209
+ await instance.run(sql.raw("PRAGMA foreign_keys=ON"));
206
210
  await migrate(instance, { migrationsFolder });
207
211
  try {
208
212
  chmodSync(dbPath, 384);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // src/lib/log-buffer.ts
3
+ // packages/daemon/src/lib/log-buffer.ts
4
4
  var LogBuffer = class {
5
5
  entries = [];
6
6
  maxSize = 1e3;
@@ -24,7 +24,7 @@ var LogBuffer = class {
24
24
  };
25
25
  var logBuffer = new LogBuffer();
26
26
 
27
- // src/lib/logger.ts
27
+ // packages/daemon/src/lib/logger.ts
28
28
  var LEVELS = { debug: 0, info: 1, warn: 2, error: 3 };
29
29
  var minLevel = LEVELS[process.env.VOLUTE_LOG_LEVEL || "info"] ?? LEVELS.info;
30
30
  var output = (line) => process.stderr.write(`${line}
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  voluteSystemDir
4
- } from "./chunk-LRCG2JLP.js";
4
+ } from "./chunk-BDYXIWA5.js";
5
5
 
6
- // src/lib/setup.ts
6
+ // packages/daemon/src/lib/setup.ts
7
7
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
8
8
  import { resolve } from "path";
9
9
  function configPath() {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // src/lib/resolve-mind-name.ts
3
+ // packages/cli/src/lib/resolve-mind-name.ts
4
4
  function resolveMindName(flags) {
5
5
  const name = flags.mind || process.env.VOLUTE_MIND;
6
6
  if (!name) {
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  stateDir
4
- } from "./chunk-LRCG2JLP.js";
4
+ } from "./chunk-BDYXIWA5.js";
5
5
 
6
- // src/lib/file-sharing.ts
6
+ // packages/daemon/src/lib/file-sharing.ts
7
7
  import { randomBytes } from "crypto";
8
8
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
9
9
  import { basename, join, normalize, resolve } from "path";