volute 0.55.0 → 0.56.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 (160) hide show
  1. package/dist/{activity-events-TFAJBNBW.js → activity-events-YASF46HS.js} +2 -2
  2. package/dist/{ai-service-KEK2V3AP.js → ai-service-3UFNG6GI.js} +2 -4
  3. package/dist/{archive-FOHGXHPT.js → archive-L2OFBGDQ.js} +2 -2
  4. package/dist/{auth-Y27LTNZK.js → auth-N2F5ASAB.js} +3 -3
  5. package/dist/auto-upgrade-O4MQPYQF.js +46 -0
  6. package/dist/{avatar-image-SN576P45.js → avatar-image-QEKKUFDF.js} +2 -2
  7. package/dist/{backup-GDCWH6MC.js → backup-TPM7QQBQ.js} +12 -12
  8. package/dist/{channels-AFJWGX7W.js → channels-JP3GYTPX.js} +16 -16
  9. package/dist/{chat-HVPOZK3O.js → chat-7YCF4ZU5.js} +3 -3
  10. package/dist/{chunk-CKOA4LWV.js → chunk-2B4E6SL7.js} +7 -7
  11. package/dist/{chunk-NM5FDH4T.js → chunk-2LFTJNVH.js} +2 -2
  12. package/dist/{chunk-G3XAB4DK.js → chunk-2QLWAYIU.js} +1 -1
  13. package/dist/{chunk-KS62IHE2.js → chunk-45MCH4G4.js} +1 -1
  14. package/dist/{chunk-QVS3C4DK.js → chunk-4RZS7XCV.js} +4 -4
  15. package/dist/{chunk-DUV4EMNW.js → chunk-6LICEQGP.js} +2 -2
  16. package/dist/{chunk-LAUCO2HC.js → chunk-APDEUAIE.js} +1 -1
  17. package/dist/{chunk-XAG53RWY.js → chunk-CLH357FI.js} +1 -1
  18. package/dist/{chunk-HTSWDOJE.js → chunk-CVPCRWWC.js} +1 -1
  19. package/dist/{chunk-Z7TNIIHW.js → chunk-E2SN3ZOJ.js} +2 -39
  20. package/dist/{chunk-NCRG4SBR.js → chunk-ELQU2GBT.js} +23 -33
  21. package/dist/{chunk-OUGD5L5U.js → chunk-EPRLTYJR.js} +8 -8
  22. package/dist/{chunk-VTFXZPC3.js → chunk-EYFBT2KP.js} +8 -8
  23. package/dist/{chunk-PRZUBJ4K.js → chunk-FYMIGUJ5.js} +1 -1
  24. package/dist/{chunk-7XKPG66D.js → chunk-G7A5LEVI.js} +5 -5
  25. package/dist/{chunk-UEZC5MNB.js → chunk-GAAATVTM.js} +11 -11
  26. package/dist/{chunk-OFU6WJJZ.js → chunk-I3OJ342S.js} +2 -2
  27. package/dist/{chunk-FZUPIS3T.js → chunk-IABDYN4N.js} +3 -3
  28. package/dist/{chunk-TMTAHKYP.js → chunk-IOMBP2T5.js} +12 -12
  29. package/dist/{chunk-W3OIPJPB.js → chunk-IQROTVBG.js} +1 -1
  30. package/dist/{chunk-4VAQKLMU.js → chunk-IRNM4LSF.js} +3 -3
  31. package/dist/{chunk-OKM67ZWH.js → chunk-KN3UHV7O.js} +8 -3
  32. package/dist/{chunk-FSXPPOPM.js → chunk-KXM4K46T.js} +1 -1
  33. package/dist/{chunk-Z4Q6TQWL.js → chunk-LRRPKZBD.js} +2 -2
  34. package/dist/{chunk-OIOW3FPT.js → chunk-NA2NJXY4.js} +1 -1
  35. package/dist/{chunk-GLM7TVWP.js → chunk-OHHS5PSI.js} +1 -1
  36. package/dist/{chunk-CKPAVQNK.js → chunk-OPTA3BJ4.js} +36 -24
  37. package/dist/{chunk-HLWQ3P3R.js → chunk-PAO7JZNW.js} +16 -16
  38. package/dist/{chunk-6HBGUPBA.js → chunk-Q5M5QFKY.js} +2 -2
  39. package/dist/{chunk-IR2FW4W7.js → chunk-T7UMSTH2.js} +2 -2
  40. package/dist/{chunk-H6X6CKDN.js → chunk-TAVIVN2I.js} +2 -32
  41. package/dist/{chunk-BP2X5AIK.js → chunk-TGYKFUCF.js} +6 -6
  42. package/dist/{chunk-5U5GLZSD.js → chunk-TZ7OHGNL.js} +2 -2
  43. package/dist/{chunk-7AA4T2RT.js → chunk-UMQP5TC5.js} +1 -1
  44. package/dist/{chunk-3SFKY4GI.js → chunk-UNTDRIV2.js} +4 -4
  45. package/dist/{chunk-45QTYKQQ.js → chunk-V2M6PNLE.js} +2 -2
  46. package/dist/{chunk-IT4GEFDH.js → chunk-WTZD6LFW.js} +1 -1
  47. package/dist/{chunk-FLIEXG2T.js → chunk-XZP3FJ7Q.js} +1 -1
  48. package/dist/cli.js +26 -23
  49. package/dist/{clock-X7V3C7NL.js → clock-ZT5YT6HA.js} +2 -2
  50. package/dist/{cloud-sync-FM73SVFJ.js → cloud-sync-RTUXMYU2.js} +20 -20
  51. package/dist/{conversations-FH3ODBL7.js → conversations-ERMMPMOS.js} +3 -3
  52. package/dist/{create-P75ZFTVN.js → create-IUCFJXCE.js} +1 -1
  53. package/dist/{daemon-restart-JQMMMITM.js → daemon-restart-N2YOISNJ.js} +11 -6
  54. package/dist/daemon.js +125 -202
  55. package/dist/{db-BONH4SUG.js → db-BQFYIONA.js} +1 -1
  56. package/dist/{delivery-manager-H23Q23N7.js → delivery-manager-5EGCFN4K.js} +16 -16
  57. package/dist/{delivery-notices-S7TKOACE.js → delivery-notices-LZKZXWTX.js} +4 -4
  58. package/dist/{delivery-router-KHBVEVVL.js → delivery-router-U6Q22ZYU.js} +2 -2
  59. package/dist/doctor-225FYBAQ.js +454 -0
  60. package/dist/{down-UN2EDX2Y.js → down-3BQSPUAZ.js} +4 -4
  61. package/dist/echo-text-Y2DFTD7L.js +40 -0
  62. package/dist/{env-SQFCWW52.js → env-4YX5YNWZ.js} +2 -2
  63. package/dist/{exec-Z34TTUO3.js → exec-Y5VMDAVA.js} +2 -2
  64. package/dist/{export-VBNWM7I4.js → export-ASRHBMRG.js} +2 -2
  65. package/dist/{extensions-QD22GXZD.js → extensions-YEPEWURN.js} +20 -20
  66. package/dist/{files-DUGRXN6V.js → files-FASUDSZQ.js} +2 -2
  67. package/dist/{import-RDDUGGFI.js → import-O35Y7DSF.js} +5 -5
  68. package/dist/{isolation-UQPDO34R.js → isolation-ZOAUXYXA.js} +2 -2
  69. package/dist/{login-57MMYILL.js → login-54TZQQP4.js} +5 -5
  70. package/dist/{logout-YFZAJRPY.js → logout-4G46Z4RU.js} +1 -1
  71. package/dist/message-delivery-HBTMGWFU.js +46 -0
  72. package/dist/{mind-BARCLI7O.js → mind-IKMX7K7G.js} +8 -24
  73. package/dist/{mind-activity-tracker-UT23RGBF.js → mind-activity-tracker-ABAEIMA3.js} +3 -3
  74. package/dist/mind-service-LRVOQG2T.js +48 -0
  75. package/dist/{mind-sleep-24HV4RCA.js → mind-sleep-LZAFBDZD.js} +2 -2
  76. package/dist/{package-AUDBDKAO.js → package-X5O7OD2E.js} +3 -2
  77. package/dist/{prompts-MOBF3TMO.js → prompts-ZNOE3KN3.js} +2 -2
  78. package/dist/{registry-TRC2HJXR.js → registry-BTQXLDW6.js} +1 -1
  79. package/dist/{sandbox-VI7XWBIA.js → sandbox-OUFAGN45.js} +2 -2
  80. package/dist/scheduler-G6BCIVGP.js +27 -0
  81. package/dist/{seed-cmd-M6A7N7F3.js → seed-cmd-BGAW3WDY.js} +2 -2
  82. package/dist/{seed-create-TGFZW4IO.js → seed-create-SMCPEUFQ.js} +3 -3
  83. package/dist/{seed-readiness-XBH2MUNA.js → seed-readiness-RBANMSWW.js} +3 -3
  84. package/dist/{seed-sprout-3IC5ZVTI.js → seed-sprout-CSHV36N3.js} +6 -6
  85. package/dist/{send-DHYBAYK4.js → send-D3ADUBR5.js} +5 -5
  86. package/dist/{service-T4P5W6RS.js → service-SWEEBOOY.js} +3 -24
  87. package/dist/{service-install-R4SNYUVO.js → service-install-RCC26KDV.js} +4 -4
  88. package/dist/{setup-6KAH3GRW.js → setup-L5NZG2U3.js} +5 -5
  89. package/dist/{setup-WZSXHHRJ.js → setup-R7Q4HFJP.js} +1 -5
  90. package/dist/{skills-LKQCYFVP.js → skills-BCCU4OJW.js} +3 -3
  91. package/dist/sleep-manager-25P44HAO.js +42 -0
  92. package/dist/{spirit-FKXMGO3N.js → spirit-YPG2MU6W.js} +5 -5
  93. package/dist/spirit-availability-ZQM5IH4C.js +43 -0
  94. package/dist/{status-LCKTTIWS.js → status-BYPCJU6H.js} +4 -4
  95. package/dist/{system-events-ZYOCYAO2.js → system-events-CWC7CBKP.js} +2 -2
  96. package/dist/{systems-HL7SGSW7.js → systems-VDRUZXNF.js} +2 -2
  97. package/dist/{tailscale-F2IMBILZ.js → tailscale-4XY7B5A2.js} +1 -1
  98. package/dist/{template-staleness-IBD722PN.js → template-staleness-CL4V7BT7.js} +2 -2
  99. package/dist/{turn-tracker-BE34OI6O.js → turn-tracker-LZP5X6GZ.js} +6 -6
  100. package/dist/{up-J47J5JRB.js → up-3AAN4GYY.js} +4 -4
  101. package/dist/{update-ILCPVNDD.js → update-2MWXRE2S.js} +4 -4
  102. package/dist/{update-check-SZ7B5IFI.js → update-check-PJOZXZYJ.js} +2 -2
  103. package/dist/variant-cleanup-K7RFMSH7.js +24 -0
  104. package/dist/{version-notify-KIXYNHJC.js → version-notify-QIDHR6WO.js} +5 -5
  105. package/dist/web-assets/assets/{index-CoU1eUKE.js → index-Bfvls20e.js} +3 -3
  106. package/dist/web-assets/index.html +1 -1
  107. package/drizzle/0000_crazy_epoch.sql +232 -0
  108. package/drizzle/README.md +42 -0
  109. package/drizzle/meta/0000_snapshot.json +1420 -3
  110. package/drizzle/meta/_journal.json +2 -128
  111. package/package.json +3 -2
  112. package/dist/auto-upgrade-2MZF7NG3.js +0 -46
  113. package/dist/echo-text-ULEIFJJF.js +0 -40
  114. package/dist/message-delivery-LU4EP244.js +0 -46
  115. package/dist/migrate-init-infrastructure-Z72UJ5NT.js +0 -44
  116. package/dist/migrate-name-placeholder-64AEAWPE.js +0 -37
  117. package/dist/migrate-thread-config-SVF2M3D3.js +0 -90
  118. package/dist/mind-service-ZJCUBAUL.js +0 -48
  119. package/dist/scheduler-GLINVC2B.js +0 -27
  120. package/dist/seed-5JGR7ZRA.js +0 -11
  121. package/dist/sleep-manager-Q3ITFNOJ.js +0 -42
  122. package/dist/spirit-availability-5R2WYSWF.js +0 -43
  123. package/dist/sprout-VEW3CUNX.js +0 -11
  124. package/dist/variant-HHDTW74J.js +0 -62
  125. package/dist/variant-cleanup-JGJZ5KB4.js +0 -24
  126. package/drizzle/0000_baseline.sql +0 -152
  127. package/drizzle/0001_add_conversation_private.sql +0 -1
  128. package/drizzle/0002_turns.sql +0 -21
  129. package/drizzle/0003_turn_feed_links.sql +0 -11
  130. package/drizzle/0004_spirits.sql +0 -5
  131. package/drizzle/0005_meta_summaries.sql +0 -15
  132. package/drizzle/0006_channels.sql +0 -17
  133. package/drizzle/0007_drop_conversation_name_title.sql +0 -11
  134. package/drizzle/0008_performance_indexes.sql +0 -6
  135. package/drizzle/0009_mind_notices.sql +0 -14
  136. package/drizzle/0010_delivery_queue_redrive.sql +0 -10
  137. package/drizzle/0011_drop_turn_summary_event_id.sql +0 -3
  138. package/drizzle/0012_channel_gates.sql +0 -17
  139. package/drizzle/0013_variant_purpose.sql +0 -3
  140. package/drizzle/0014_system_events.sql +0 -26
  141. package/drizzle/0015_rename_session_to_thread.sql +0 -12
  142. package/drizzle/0016_brain_to_human.sql +0 -4
  143. package/drizzle/0017_event_history_rows.sql +0 -9
  144. package/drizzle/0018_api_tokens.sql +0 -20
  145. package/drizzle/meta/0001_snapshot.json +0 -7
  146. package/drizzle/meta/0002_snapshot.json +0 -7
  147. package/drizzle/meta/0003_snapshot.json +0 -7
  148. package/drizzle/meta/0004_snapshot.json +0 -7
  149. package/drizzle/meta/0005_snapshot.json +0 -7
  150. package/drizzle/meta/0006_snapshot.json +0 -7
  151. package/drizzle/meta/0007_snapshot.json +0 -7
  152. package/dist/{env-7AZFBPWX.js → env-IBW2QI6K.js} +5 -5
  153. package/dist/{login-4NUS72Z5.js → login-RJJTCVR3.js} +3 -3
  154. package/dist/{mind-contacts-PEXCDRXA.js → mind-contacts-KV64UDJS.js} +6 -6
  155. package/dist/{mind-history-RZMMCHMX.js → mind-history-H45GM2M2.js} +6 -6
  156. package/dist/{register-WNCSOTAU.js → register-OX4HRSGC.js} +3 -3
  157. package/dist/{restart-B4GNMVF2.js → restart-AGEGNSYQ.js} +4 -4
  158. package/dist/{skill-QYTBUDNQ.js → skill-B5OJEQUA.js} +4 -4
  159. package/dist/{start-BDHJVOVX.js → start-MUMNFR52.js} +3 -3
  160. package/dist/{stop-45QYSGYS.js → stop-EKERNYTX.js} +4 -4
@@ -2,16 +2,10 @@
2
2
  import {
3
3
  exec,
4
4
  execInherit
5
- } from "./chunk-OIOW3FPT.js";
5
+ } from "./chunk-NA2NJXY4.js";
6
6
  import {
7
7
  voluteSystemDir
8
- } from "./chunk-H6X6CKDN.js";
9
-
10
- // packages/daemon/src/lib/config/service-mode.ts
11
- import { execFileSync } from "child_process";
12
- import { existsSync, readFileSync as readFileSync2 } from "fs";
13
- import { homedir } from "os";
14
- import { resolve } from "path";
8
+ } from "./chunk-TAVIVN2I.js";
15
9
 
16
10
  // packages/daemon/src/lib/util/log-tail.ts
17
11
  import { readFileSync } from "fs";
@@ -28,6 +22,10 @@ function readLogTail(logFile, maxLines = 20) {
28
22
  }
29
23
 
30
24
  // packages/daemon/src/lib/config/service-mode.ts
25
+ import { execFileSync } from "child_process";
26
+ import { existsSync, readFileSync as readFileSync2 } from "fs";
27
+ import { homedir } from "os";
28
+ import { resolve } from "path";
31
29
  var SYSTEM_SERVICE_PATH = "/etc/systemd/system/volute.service";
32
30
  var USER_SYSTEMD_UNIT = resolve(homedir(), ".config", "systemd", "user", "volute.service");
33
31
  var LAUNCHD_PLIST_LABEL = "com.volute.daemon";
@@ -38,32 +36,43 @@ var LAUNCHD_PLIST_PATH = resolve(
38
36
  `${LAUNCHD_PLIST_LABEL}.plist`
39
37
  );
40
38
  var SYSTEM_LAUNCHD_PLIST_PATH = "/Library/LaunchDaemons/com.volute.daemon.plist";
41
- var HEALTH_POLL_TIMEOUT = 3e4;
39
+ var HEALTH_POLL_TIMEOUT = 12e4;
42
40
  var STOP_GRACE_TIMEOUT = 1e4;
43
41
  var POLL_INTERVAL = 500;
44
- function getServiceMode() {
45
- if (existsSync(SYSTEM_SERVICE_PATH)) {
46
- try {
47
- execFileSync("systemctl", ["is-enabled", "--quiet", "volute"]);
48
- return "system";
49
- } catch {
50
- }
42
+ function systemctlSucceeds(args) {
43
+ try {
44
+ execFileSync("systemctl", args, { stdio: "ignore" });
45
+ return true;
46
+ } catch {
47
+ return false;
51
48
  }
52
- if (existsSync(USER_SYSTEMD_UNIT)) {
53
- try {
54
- execFileSync("systemctl", ["--user", "is-enabled", "--quiet", "volute"]);
55
- return "user-systemd";
56
- } catch {
57
- }
49
+ }
50
+ function systemdManaged(scope) {
51
+ const prefix = scope === "user" ? ["--user"] : [];
52
+ return systemctlSucceeds([...prefix, "is-enabled", "--quiet", "volute"]) || systemctlSucceeds([...prefix, "is-active", "--quiet", "volute"]);
53
+ }
54
+ function resolveServiceMode(probes) {
55
+ if (probes.fileExists(SYSTEM_SERVICE_PATH) && probes.systemdManaged("system")) {
56
+ return "system";
58
57
  }
59
- if (process.platform === "darwin" && existsSync(SYSTEM_LAUNCHD_PLIST_PATH)) {
58
+ if (probes.fileExists(USER_SYSTEMD_UNIT) && probes.systemdManaged("user")) {
59
+ return "user-systemd";
60
+ }
61
+ if (probes.platform === "darwin" && probes.fileExists(SYSTEM_LAUNCHD_PLIST_PATH)) {
60
62
  return "system-launchd";
61
63
  }
62
- if (process.platform === "darwin" && existsSync(LAUNCHD_PLIST_PATH)) {
64
+ if (probes.platform === "darwin" && probes.fileExists(LAUNCHD_PLIST_PATH)) {
63
65
  return "user-launchd";
64
66
  }
65
67
  return "manual";
66
68
  }
69
+ function getServiceMode() {
70
+ return resolveServiceMode({
71
+ fileExists: existsSync,
72
+ systemdManaged,
73
+ platform: process.platform
74
+ });
75
+ }
67
76
  function getDaemonUrl(hostname, port) {
68
77
  const url = new URL("http://localhost");
69
78
  let h = hostname;
@@ -249,11 +258,13 @@ function modeLabel(mode) {
249
258
  }
250
259
 
251
260
  export {
261
+ readLogTail,
252
262
  SYSTEM_SERVICE_PATH,
253
263
  USER_SYSTEMD_UNIT,
254
264
  LAUNCHD_PLIST_LABEL,
255
265
  LAUNCHD_PLIST_PATH,
256
266
  SYSTEM_LAUNCHD_PLIST_PATH,
267
+ HEALTH_POLL_TIMEOUT,
257
268
  getServiceMode,
258
269
  getDaemonUrl,
259
270
  pollHealth,
@@ -264,6 +275,7 @@ export {
264
275
  daemonConfigPath,
265
276
  readDaemonToken,
266
277
  readDaemonConfig,
278
+ daemonLogSource,
267
279
  daemonLogReport,
268
280
  modeLabel
269
281
  };
@@ -2,33 +2,33 @@
2
2
  import {
3
3
  clearMind,
4
4
  summarizeOrphanedTurns
5
- } from "./chunk-BP2X5AIK.js";
5
+ } from "./chunk-TGYKFUCF.js";
6
6
  import {
7
7
  isSandboxEnabled,
8
8
  wrapForSandbox
9
- } from "./chunk-XAG53RWY.js";
9
+ } from "./chunk-CLH357FI.js";
10
10
  import {
11
11
  deliverEvent,
12
12
  recordNotice
13
- } from "./chunk-DUV4EMNW.js";
13
+ } from "./chunk-6LICEQGP.js";
14
14
  import {
15
15
  getPrompt
16
- } from "./chunk-HTSWDOJE.js";
16
+ } from "./chunk-CVPCRWWC.js";
17
17
  import {
18
18
  chownMindDir,
19
19
  isIsolationEnabled,
20
20
  wrapForIsolation
21
- } from "./chunk-OIOW3FPT.js";
21
+ } from "./chunk-NA2NJXY4.js";
22
22
  import {
23
23
  loadMergedEnv
24
- } from "./chunk-GLM7TVWP.js";
24
+ } from "./chunk-OHHS5PSI.js";
25
25
  import {
26
26
  OAuthRefreshError,
27
27
  getAiConfig,
28
28
  resolveApiKey,
29
29
  resolveOAuthCredentials,
30
30
  resolveProviderKey
31
- } from "./chunk-Z7TNIIHW.js";
31
+ } from "./chunk-E2SN3ZOJ.js";
32
32
  import {
33
33
  logger_default
34
34
  } from "./chunk-2674KIGI.js";
@@ -42,7 +42,7 @@ import {
42
42
  setMindRunning,
43
43
  stateDir,
44
44
  voluteSystemDir
45
- } from "./chunk-H6X6CKDN.js";
45
+ } from "./chunk-TAVIVN2I.js";
46
46
 
47
47
  // packages/daemon/src/lib/daemon/mind-tokens.ts
48
48
  import { randomUUID } from "crypto";
@@ -809,9 +809,9 @@ var MindManager = class {
809
809
  mlog.info(`started mind ${name} on port ${port}`);
810
810
  await this.deliverPendingContext(name);
811
811
  try {
812
- const { getSleepManagerIfReady } = await import("./sleep-manager-Q3ITFNOJ.js");
812
+ const { getSleepManagerIfReady } = await import("./sleep-manager-25P44HAO.js");
813
813
  if (!getSleepManagerIfReady()?.isSleeping(name)) {
814
- const { flushQueuedEvents } = await import("./system-events-ZYOCYAO2.js");
814
+ const { flushQueuedEvents } = await import("./system-events-CWC7CBKP.js");
815
815
  const flushed = await flushQueuedEvents(name);
816
816
  if (flushed > 0) mlog.info(`redelivered ${flushed} pending event(s) to ${name}`);
817
817
  }
@@ -847,7 +847,7 @@ var MindManager = class {
847
847
  if (this.shuttingDown || this.stopping.has(name)) return;
848
848
  mlog.error(`mind ${name} exited with code ${code}`);
849
849
  try {
850
- const { getSleepManagerIfReady } = await import("./sleep-manager-Q3ITFNOJ.js");
850
+ const { getSleepManagerIfReady } = await import("./sleep-manager-25P44HAO.js");
851
851
  const sleepMgr = getSleepManagerIfReady();
852
852
  const sleepState = sleepMgr?.getState(name);
853
853
  if (sleepState?.sleeping) {
@@ -877,15 +877,15 @@ var MindManager = class {
877
877
  (err) => mlog.warn(`failed to clear turn state for ${name} after crash`, logger_default.errorData(err))
878
878
  );
879
879
  try {
880
- const { getDeliveryManager } = await import("./delivery-manager-H23Q23N7.js");
880
+ const { getDeliveryManager } = await import("./delivery-manager-5EGCFN4K.js");
881
881
  getDeliveryManager().clearMindSessions(name);
882
882
  } catch (err) {
883
883
  if (!(err instanceof Error && err.message.includes("not initialized"))) {
884
884
  mlog.warn(`failed to clear delivery state for ${name} after crash`, logger_default.errorData(err));
885
885
  }
886
886
  }
887
- import("./mind-activity-tracker-UT23RGBF.js").then(({ markIdle }) => markIdle(name)).catch((err) => mlog.warn(`failed to mark ${name} idle after crash`, logger_default.errorData(err)));
888
- import("./activity-events-TFAJBNBW.js").then(
887
+ import("./mind-activity-tracker-ABAEIMA3.js").then(({ markIdle }) => markIdle(name)).catch((err) => mlog.warn(`failed to mark ${name} idle after crash`, logger_default.errorData(err)));
888
+ import("./activity-events-YASF46HS.js").then(
889
889
  ({ publish }) => publish({ type: "mind_stopped", mind: name, summary: `${name} crashed (exit ${code})` })
890
890
  ).catch((err) => mlog.warn(`failed to publish crash event for ${name}`, logger_default.errorData(err)));
891
891
  const { shouldRestart, delay, attempt } = this.restartTracker.recordCrash(name);
@@ -943,7 +943,7 @@ var MindManager = class {
943
943
  mlog.warn(`failed to clear turn state for ${name} on stop`, logger_default.errorData(err));
944
944
  }
945
945
  try {
946
- const { getDeliveryManager } = await import("./delivery-manager-H23Q23N7.js");
946
+ const { getDeliveryManager } = await import("./delivery-manager-5EGCFN4K.js");
947
947
  getDeliveryManager().clearMindSessions(name);
948
948
  } catch (err) {
949
949
  if (!(err instanceof Error && err.message.includes("not initialized"))) {
@@ -951,7 +951,7 @@ var MindManager = class {
951
951
  }
952
952
  }
953
953
  try {
954
- const { clearEchoTextCache } = await import("./echo-text-ULEIFJJF.js");
954
+ const { clearEchoTextCache } = await import("./echo-text-Y2DFTD7L.js");
955
955
  clearEchoTextCache(name);
956
956
  } catch (err) {
957
957
  mlog.debug(`failed to clear echo-text cache for ${name}`, logger_default.errorData(err));
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  bufferEvent,
4
4
  subscribe
5
- } from "./chunk-PRZUBJ4K.js";
5
+ } from "./chunk-FYMIGUJ5.js";
6
6
  import {
7
7
  logger_default
8
8
  } from "./chunk-2674KIGI.js";
9
9
  import {
10
10
  getDb
11
- } from "./chunk-H6X6CKDN.js";
11
+ } from "./chunk-TAVIVN2I.js";
12
12
  import {
13
13
  channels,
14
14
  conversationParticipants,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exec
4
- } from "./chunk-OIOW3FPT.js";
4
+ } from "./chunk-NA2NJXY4.js";
5
5
  import {
6
6
  logger_default
7
7
  } from "./chunk-2674KIGI.js";
@@ -11,7 +11,7 @@ import {
11
11
  readGlobalConfig,
12
12
  voluteHome,
13
13
  voluteSystemDir
14
- } from "./chunk-H6X6CKDN.js";
14
+ } from "./chunk-TAVIVN2I.js";
15
15
 
16
16
  // packages/daemon/src/lib/backup/restic.ts
17
17
  import { writeFileSync } from "fs";
@@ -29,7 +29,7 @@ import { fileURLToPath } from "url";
29
29
  import { and, eq, inArray, isNull, or } from "drizzle-orm";
30
30
 
31
31
  // packages/daemon/src/lib/config/setup.ts
32
- import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
32
+ import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
33
33
  import { resolve } from "path";
34
34
  function configPath() {
35
35
  return resolve(voluteSystemDir(), "config.json");
@@ -124,27 +124,6 @@ function writeGlobalConfig(config) {
124
124
  chmodSync(secPath, 384);
125
125
  _cachedConfig = { config, ts: Date.now() };
126
126
  }
127
- function migrateConfigSecrets() {
128
- const path = configPath();
129
- if (!existsSync(path)) return;
130
- let raw;
131
- try {
132
- raw = readFileSync(path, "utf-8");
133
- } catch {
134
- return;
135
- }
136
- let parsed;
137
- try {
138
- parsed = JSON.parse(raw);
139
- } catch {
140
- return;
141
- }
142
- const embedsSecrets = hasEntries(parsed.ai?.providers) || hasEntries(parsed.imagegen?.providers) || !!parsed.backup?.password || hasEntries(parsed.backup?.env);
143
- const mode = statSync(path).mode & 511;
144
- if (!embedsSecrets && mode === 420) return;
145
- _resetConfigCache();
146
- writeGlobalConfig(readGlobalConfig());
147
- }
148
127
  function computeSetupStatus(config) {
149
128
  if (config.setupCompleted === true) return "complete";
150
129
  if (config.setup != null && config.setupCompleted == null) return "complete";
@@ -196,13 +175,6 @@ function mindLimitError(count, limit) {
196
175
  }
197
176
  return null;
198
177
  }
199
- function migrateSetupCompleted() {
200
- const config = readGlobalConfig();
201
- if (config.setup != null && config.setupCompleted == null) {
202
- config.setupCompleted = true;
203
- writeGlobalConfig(config);
204
- }
205
- }
206
178
 
207
179
  // packages/daemon/src/lib/mind/registry.ts
208
180
  function isSpiritName(name) {
@@ -510,7 +482,6 @@ export {
510
482
  _resetConfigCache,
511
483
  readGlobalConfig,
512
484
  writeGlobalConfig,
513
- migrateConfigSecrets,
514
485
  computeSetupStatus,
515
486
  setupStatus,
516
487
  readGlobalConfigStrict,
@@ -519,6 +490,5 @@ export {
519
490
  getSpiritName,
520
491
  getSystemName,
521
492
  isImagegenEnabled,
522
- mindLimitError,
523
- migrateSetupCompleted
493
+ mindLimitError
524
494
  };
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getUserByUsername
4
- } from "./chunk-OFU6WJJZ.js";
4
+ } from "./chunk-I3OJ342S.js";
5
5
  import {
6
6
  parseDbTimestamp,
7
7
  publish
8
8
  } from "./chunk-MNKPAAQF.js";
9
9
  import {
10
10
  getPrompt
11
- } from "./chunk-HTSWDOJE.js";
11
+ } from "./chunk-CVPCRWWC.js";
12
12
  import {
13
13
  aiCompleteUtility
14
- } from "./chunk-Z7TNIIHW.js";
14
+ } from "./chunk-E2SN3ZOJ.js";
15
15
  import {
16
16
  logger_default
17
17
  } from "./chunk-2674KIGI.js";
18
18
  import {
19
19
  getDb,
20
20
  resolveMindDir
21
- } from "./chunk-H6X6CKDN.js";
21
+ } from "./chunk-TAVIVN2I.js";
22
22
  import {
23
23
  messages,
24
24
  mindHistory,
@@ -1195,11 +1195,11 @@ var Summarizer = class {
1195
1195
  }
1196
1196
  };
1197
1197
  async function reconcileWedgedTurns(idleMs) {
1198
- const { sweepWedgedTurns: sweepWedgedTurns2, summarizeOrphanedTurns: summarizeOrphanedTurns2 } = await import("./turn-tracker-BE34OI6O.js");
1198
+ const { sweepWedgedTurns: sweepWedgedTurns2, summarizeOrphanedTurns: summarizeOrphanedTurns2 } = await import("./turn-tracker-LZP5X6GZ.js");
1199
1199
  const wedged = await sweepWedgedTurns2(idleMs);
1200
1200
  if (wedged.length === 0) return;
1201
1201
  summarizeOrphanedTurns2(wedged);
1202
- const { tryGetDeliveryManager } = await import("./delivery-manager-H23Q23N7.js");
1202
+ const { tryGetDeliveryManager } = await import("./delivery-manager-5EGCFN4K.js");
1203
1203
  const dm = tryGetDeliveryManager();
1204
1204
  if (!dm) return;
1205
1205
  for (const t of wedged) {
@@ -3,10 +3,10 @@ import {
3
3
  LAUNCHD_PLIST_LABEL,
4
4
  LAUNCHD_PLIST_PATH,
5
5
  USER_SYSTEMD_UNIT
6
- } from "./chunk-CKPAVQNK.js";
6
+ } from "./chunk-OPTA3BJ4.js";
7
7
  import {
8
8
  resolveVoluteBin
9
- } from "./chunk-OIOW3FPT.js";
9
+ } from "./chunk-NA2NJXY4.js";
10
10
 
11
11
  // packages/daemon/src/lib/config/service-install.ts
12
12
  import { execFile } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  publish
4
- } from "./chunk-PRZUBJ4K.js";
4
+ } from "./chunk-FYMIGUJ5.js";
5
5
  import {
6
6
  logger_default
7
7
  } from "./chunk-2674KIGI.js";
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  getSleepManagerIfReady,
4
4
  startSpiritFull
5
- } from "./chunk-NCRG4SBR.js";
5
+ } from "./chunk-ELQU2GBT.js";
6
6
  import {
7
7
  spiritCreationInProgress
8
- } from "./chunk-UEZC5MNB.js";
8
+ } from "./chunk-GAAATVTM.js";
9
9
  import {
10
10
  MindStartupError,
11
11
  tryGetMindManager
12
- } from "./chunk-HLWQ3P3R.js";
12
+ } from "./chunk-PAO7JZNW.js";
13
13
  import {
14
14
  logger_default
15
15
  } from "./chunk-2674KIGI.js";
@@ -17,7 +17,7 @@ import {
17
17
  computeSetupStatus,
18
18
  findMind,
19
19
  readGlobalConfigStrict
20
- } from "./chunk-H6X6CKDN.js";
20
+ } from "./chunk-TAVIVN2I.js";
21
21
 
22
22
  // packages/daemon/src/lib/chat/spirit-availability.ts
23
23
  var slog = logger_default.child("spirit-availability");
@@ -8,10 +8,10 @@ import {
8
8
  import {
9
9
  MEMORY_PLACEHOLDER_MARKER,
10
10
  ORIENTATION_MARKER
11
- } from "./chunk-HTSWDOJE.js";
11
+ } from "./chunk-CVPCRWWC.js";
12
12
  import {
13
13
  isImagegenEnabled
14
- } from "./chunk-H6X6CKDN.js";
14
+ } from "./chunk-TAVIVN2I.js";
15
15
 
16
16
  // packages/daemon/src/lib/mind/seed-readiness.ts
17
17
  import { existsSync, readFileSync } from "fs";
@@ -12,7 +12,7 @@ import {
12
12
  mindDir,
13
13
  readAllMinds,
14
14
  voluteHome
15
- } from "./chunk-H6X6CKDN.js";
15
+ } from "./chunk-TAVIVN2I.js";
16
16
 
17
17
  // packages/daemon/src/lib/util/avatar-image.ts
18
18
  import { readdir, readFile, writeFile } from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  mindDir,
4
4
  stateDir
5
- } from "./chunk-H6X6CKDN.js";
5
+ } from "./chunk-TAVIVN2I.js";
6
6
 
7
7
  // packages/daemon/src/lib/mind/archive.ts
8
8
  import { execFileSync } from "child_process";
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ if (!process.env.VOLUTE_HOME) {
10
10
  var command = process.argv[2];
11
11
  var args = process.argv.slice(3);
12
12
  if (command === "--version" || command === "-v") {
13
- const { default: pkg } = await import("./package-AUDBDKAO.js");
13
+ const { default: pkg } = await import("./package-X5O7OD2E.js");
14
14
  console.log(pkg.version);
15
15
  process.exit(0);
16
16
  }
@@ -30,11 +30,13 @@ var ungatedCommands = /* @__PURE__ */ new Set([
30
30
  "login",
31
31
  "logout",
32
32
  "service",
33
+ "doctor",
34
+ // diagnostics must run on a broken/half-set-up machine
33
35
  void 0
34
36
  ]);
35
37
  var isMind = !!process.env.VOLUTE_MIND_TOKEN;
36
38
  if (!isMind && !ungatedCommands.has(command)) {
37
- const { setupStatus, setupUrl } = await import("./setup-WZSXHHRJ.js");
39
+ const { setupStatus, setupUrl } = await import("./setup-R7Q4HFJP.js");
38
40
  const status = setupStatus();
39
41
  if (status !== "complete") {
40
42
  if (status === "in-progress") {
@@ -56,64 +58,64 @@ if (!isMind && !ungatedCommands.has(command)) {
56
58
  }
57
59
  switch (command) {
58
60
  case "setup":
59
- await import("./setup-6KAH3GRW.js").then((m) => m.run(args));
61
+ await import("./setup-L5NZG2U3.js").then((m) => m.run(args));
60
62
  break;
61
63
  case "mind":
62
- await import("./mind-BARCLI7O.js").then((m) => m.run(args));
64
+ await import("./mind-IKMX7K7G.js").then((m) => m.run(args));
63
65
  break;
64
66
  case "seed":
65
- await import("./seed-cmd-M6A7N7F3.js").then((m) => m.run(args));
67
+ await import("./seed-cmd-BGAW3WDY.js").then((m) => m.run(args));
66
68
  break;
67
69
  case "chat":
68
- await import("./chat-HVPOZK3O.js").then((m) => m.run(args));
69
- break;
70
- case "variant":
71
- await import("./variant-HHDTW74J.js").then((m) => m.run(args));
70
+ await import("./chat-7YCF4ZU5.js").then((m) => m.run(args));
72
71
  break;
73
72
  case "clock":
74
- await import("./clock-X7V3C7NL.js").then((m) => m.run(args));
73
+ await import("./clock-ZT5YT6HA.js").then((m) => m.run(args));
75
74
  break;
76
75
  case "skill":
77
- await import("./skill-QYTBUDNQ.js").then((m) => m.run(args));
76
+ await import("./skill-B5OJEQUA.js").then((m) => m.run(args));
78
77
  break;
79
78
  case "env":
80
- await import("./env-7AZFBPWX.js").then((m) => m.run(args));
79
+ await import("./env-IBW2QI6K.js").then((m) => m.run(args));
81
80
  break;
82
81
  case "config":
83
82
  await import("./config-UGJS57VT.js").then((m) => m.run(args));
84
83
  break;
85
84
  case "up":
86
- await import("./up-J47J5JRB.js").then((m) => m.run(args));
85
+ await import("./up-3AAN4GYY.js").then((m) => m.run(args));
87
86
  break;
88
87
  case "backup":
89
- await import("./backup-GDCWH6MC.js").then((m) => m.run(args));
88
+ await import("./backup-TPM7QQBQ.js").then((m) => m.run(args));
90
89
  break;
91
90
  case "down":
92
- await import("./down-UN2EDX2Y.js").then((m) => m.run(args));
91
+ await import("./down-3BQSPUAZ.js").then((m) => m.run(args));
93
92
  break;
94
93
  case "restart":
95
- await import("./daemon-restart-JQMMMITM.js").then((m) => m.run(args));
94
+ await import("./daemon-restart-N2YOISNJ.js").then((m) => m.run(args));
96
95
  break;
97
96
  case "update":
98
- await import("./update-ILCPVNDD.js").then((m) => m.run(args));
97
+ await import("./update-2MWXRE2S.js").then((m) => m.run(args));
99
98
  break;
100
99
  case "status":
101
- await import("./status-LCKTTIWS.js").then((m) => m.run(args));
100
+ await import("./status-BYPCJU6H.js").then((m) => m.run(args));
101
+ break;
102
+ case "doctor":
103
+ await import("./doctor-225FYBAQ.js").then((m) => m.run(args));
102
104
  break;
103
105
  case "extension":
104
106
  await import("./extension-MRYJWSMV.js").then((m) => m.run(args));
105
107
  break;
106
108
  case "systems":
107
- await import("./systems-HL7SGSW7.js").then((m) => m.run(args));
109
+ await import("./systems-VDRUZXNF.js").then((m) => m.run(args));
108
110
  break;
109
111
  case "login":
110
- await import("./login-57MMYILL.js").then((m) => m.run(args));
112
+ await import("./login-54TZQQP4.js").then((m) => m.run(args));
111
113
  break;
112
114
  case "logout":
113
- await import("./logout-YFZAJRPY.js").then((m) => m.run(args));
115
+ await import("./logout-4G46Z4RU.js").then((m) => m.run(args));
114
116
  break;
115
117
  case "service":
116
- await import("./service-T4P5W6RS.js").then((m) => m.run(args));
118
+ await import("./service-SWEEBOOY.js").then((m) => m.run(args));
117
119
  break;
118
120
  case "--help":
119
121
  case "-h":
@@ -149,6 +151,7 @@ System:
149
151
  setup [--system] [--cli] First-time setup
150
152
  up / down / restart Daemon control
151
153
  status Show daemon & service status
154
+ doctor [--bundle] Diagnose the install / write a bug-report bundle
152
155
  backup init/create/list/restore Back up and restore the system
153
156
  extension list/install/uninstall Manage extensions
154
157
  login / logout CLI authentication
@@ -310,7 +313,7 @@ Run 'volute --help' for usage.`);
310
313
  }
311
314
  }
312
315
  if (command !== "update") {
313
- import("./update-check-SZ7B5IFI.js").then((m) => m.checkForUpdate()).then((result) => {
316
+ import("./update-check-PJOZXZYJ.js").then((m) => m.checkForUpdate()).then((result) => {
314
317
  if (result.updateAvailable) {
315
318
  console.error(`
316
319
  Update available: ${result.current} \u2192 ${result.latest}`);
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  parseDuration,
4
4
  run
5
- } from "./chunk-7XKPG66D.js";
5
+ } from "./chunk-G7A5LEVI.js";
6
6
  import "./chunk-7YJY3F2R.js";
7
- import "./chunk-LOPXTW6H.js";
8
7
  import "./chunk-BTY4WNFE.js";
9
8
  import "./chunk-M74I3HHF.js";
9
+ import "./chunk-LOPXTW6H.js";
10
10
  import "./chunk-TXSA4Q3V.js";
11
11
  import "./chunk-O7IGP7ZW.js";
12
12
  import "./chunk-FNJCBRD3.js";
@@ -1,37 +1,37 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  deliverMessage
4
- } from "./chunk-NCRG4SBR.js";
5
- import "./chunk-UEZC5MNB.js";
4
+ } from "./chunk-ELQU2GBT.js";
5
+ import "./chunk-GAAATVTM.js";
6
6
  import "./chunk-P3GXOT2X.js";
7
- import "./chunk-CKOA4LWV.js";
8
- import "./chunk-TMTAHKYP.js";
9
- import "./chunk-HLWQ3P3R.js";
10
- import "./chunk-BP2X5AIK.js";
11
- import "./chunk-XAG53RWY.js";
7
+ import "./chunk-2B4E6SL7.js";
8
+ import "./chunk-IOMBP2T5.js";
9
+ import "./chunk-PAO7JZNW.js";
10
+ import "./chunk-TGYKFUCF.js";
11
+ import "./chunk-CLH357FI.js";
12
12
  import {
13
13
  getAuthHeaders,
14
14
  getWebhookUrl
15
- } from "./chunk-6HBGUPBA.js";
16
- import "./chunk-7AA4T2RT.js";
17
- import "./chunk-IT4GEFDH.js";
15
+ } from "./chunk-Q5M5QFKY.js";
16
+ import "./chunk-UMQP5TC5.js";
17
+ import "./chunk-WTZD6LFW.js";
18
18
  import "./chunk-DW4TRDOZ.js";
19
19
  import "./chunk-WCFSBH33.js";
20
- import "./chunk-W3OIPJPB.js";
21
- import "./chunk-OFU6WJJZ.js";
22
- import "./chunk-PRZUBJ4K.js";
23
- import "./chunk-DUV4EMNW.js";
20
+ import "./chunk-IQROTVBG.js";
21
+ import "./chunk-I3OJ342S.js";
22
+ import "./chunk-FYMIGUJ5.js";
23
+ import "./chunk-6LICEQGP.js";
24
24
  import "./chunk-MNKPAAQF.js";
25
- import "./chunk-HTSWDOJE.js";
26
- import "./chunk-4VAQKLMU.js";
27
- import "./chunk-OIOW3FPT.js";
28
- import "./chunk-GLM7TVWP.js";
29
- import "./chunk-Z7TNIIHW.js";
25
+ import "./chunk-CVPCRWWC.js";
26
+ import "./chunk-IRNM4LSF.js";
27
+ import "./chunk-NA2NJXY4.js";
28
+ import "./chunk-OHHS5PSI.js";
29
+ import "./chunk-E2SN3ZOJ.js";
30
30
  import {
31
31
  logger_default
32
32
  } from "./chunk-2674KIGI.js";
33
33
  import "./chunk-LGNUFVMR.js";
34
- import "./chunk-H6X6CKDN.js";
34
+ import "./chunk-TAVIVN2I.js";
35
35
  import "./chunk-2RNMBXD2.js";
36
36
  import "./chunk-K3NQKI34.js";
37
37
 
@@ -31,10 +31,10 @@ import {
31
31
  removeParticipant,
32
32
  setConversationPrivate,
33
33
  updateChannelSettings
34
- } from "./chunk-6HBGUPBA.js";
35
- import "./chunk-PRZUBJ4K.js";
34
+ } from "./chunk-Q5M5QFKY.js";
35
+ import "./chunk-FYMIGUJ5.js";
36
36
  import "./chunk-2674KIGI.js";
37
- import "./chunk-H6X6CKDN.js";
37
+ import "./chunk-TAVIVN2I.js";
38
38
  import "./chunk-2RNMBXD2.js";
39
39
  import "./chunk-K3NQKI34.js";
40
40
  export {