volute 0.38.0 → 0.40.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 (109) hide show
  1. package/dist/{activity-events-N6HCHU4P.js → activity-events-OJZ7G5CG.js} +3 -3
  2. package/dist/{ai-service-C2YNARGH.js → ai-service-JMV4KZN4.js} +8 -4
  3. package/dist/{archive-AWIJTVQV.js → archive-BC2MTNPV.js} +3 -3
  4. package/dist/{auth-2QOOPMBX.js → auth-2IMZ6N5G.js} +4 -4
  5. package/dist/{chat-XL7CVWVJ.js → chat-O5QCGCUG.js} +2 -2
  6. package/dist/{chunk-A6FLW5XD.js → chunk-2AQCEQYN.js} +1 -1
  7. package/dist/{chunk-3F7XK5Q7.js → chunk-3XSFMN3H.js} +1 -1
  8. package/dist/{chunk-NGXQ2ESO.js → chunk-43PVCF4V.js} +3 -3
  9. package/dist/{chunk-N42QMDID.js → chunk-5VBXKFPO.js} +2 -2
  10. package/dist/{chunk-BIEWHAAM.js → chunk-76Q6YLJL.js} +1 -1
  11. package/dist/{chunk-5DPRTREW.js → chunk-B7YJUWMM.js} +3 -3
  12. package/dist/{chunk-XLBQYIHH.js → chunk-DNQPHLGM.js} +1 -1
  13. package/dist/{chunk-SNW2NPP4.js → chunk-FBV22PFY.js} +1 -1
  14. package/dist/{chunk-WC635OPK.js → chunk-FRJ73IWR.js} +1 -1
  15. package/dist/{chunk-PMMHVSCR.js → chunk-HAJHDGBV.js} +1 -1
  16. package/dist/{chunk-SZJWC2GA.js → chunk-HEZM5GCV.js} +2 -2
  17. package/dist/{chunk-PLL2FM7A.js → chunk-JSITYTIL.js} +6 -6
  18. package/dist/{chunk-CJ26DXZL.js → chunk-MHFAWJCC.js} +16 -0
  19. package/dist/{chunk-7AZQFSOV.js → chunk-PC55DGNX.js} +1 -1
  20. package/dist/{chunk-2NHRJ3YO.js → chunk-PDSA3ILI.js} +3 -3
  21. package/dist/{chunk-ORNY3MZR.js → chunk-PGX52NFO.js} +15 -1
  22. package/dist/{chunk-UIM5NHPP.js → chunk-PHR4XQPL.js} +3 -3
  23. package/dist/chunk-PIRL2HAO.js +124 -0
  24. package/dist/{chunk-JOJT34M2.js → chunk-PZTVQL3J.js} +2 -2
  25. package/dist/{chunk-GVVVMZ4J.js → chunk-RMZSICLS.js} +1 -1
  26. package/dist/{chunk-LQ6Z4FXN.js → chunk-S4YO5OWV.js} +1 -1
  27. package/dist/{chunk-TNZ5XQA4.js → chunk-SGC6CDXB.js} +2 -2
  28. package/dist/{chunk-LN67VPZJ.js → chunk-SOPMVTTW.js} +2 -2
  29. package/dist/{chunk-VUM2K6EN.js → chunk-T26YLQPU.js} +5 -5
  30. package/dist/{chunk-2TR2OPVA.js → chunk-WGRMLXTH.js} +8 -8
  31. package/dist/{chunk-TEZRVSSB.js → chunk-XUJR6NZW.js} +513 -335
  32. package/dist/cli.js +15 -15
  33. package/dist/{cloud-sync-PEM3IVI4.js → cloud-sync-5JF2Z7VM.js} +16 -16
  34. package/dist/{conversations-G6YRSABR.js → conversations-LUVHGQSS.js} +4 -4
  35. package/dist/{create-PN73742N.js → create-TDQM3SHV.js} +1 -1
  36. package/dist/{daemon-restart-6QONRBTK.js → daemon-restart-XHDJDOPQ.js} +8 -8
  37. package/dist/daemon.js +221 -118
  38. package/dist/{db-CBOCDYVA.js → db-2GIS7HSG.js} +2 -2
  39. package/dist/delivery-manager-L5WFP2ND.js +30 -0
  40. package/dist/{delivery-router-QTFEZ26O.js → delivery-router-IU4OMVKZ.js} +3 -3
  41. package/dist/down-KIJVZ3OC.js +17 -0
  42. package/dist/echo-text-TJWCUBPB.js +31 -0
  43. package/dist/{exec-ONYZEA5B.js → exec-BGMU7VXR.js} +4 -4
  44. package/dist/{export-JPDBQESV.js → export-RKUWSQSG.js} +3 -3
  45. package/dist/{extensions-P477XR46.js → extensions-VN5SEVRP.js} +16 -16
  46. package/dist/{files-LAQ3NXQK.js → files-J2CKZ6PK.js} +3 -3
  47. package/dist/{import-EROF27RH.js → import-KVY6BYXG.js} +6 -6
  48. package/dist/{isolation-G5J3MTKU.js → isolation-MM7YHK6J.js} +3 -3
  49. package/dist/{login-F6YMAVLE.js → login-OHM32QVD.js} +2 -2
  50. package/dist/{logout-HHPH52KZ.js → logout-74WBDMOE.js} +2 -2
  51. package/dist/{message-delivery-54IXVE5H.js → message-delivery-VBBAJX3J.js} +16 -16
  52. package/dist/{mind-G5HDKBKL.js → mind-PUPXDIYQ.js} +5 -5
  53. package/dist/{mind-activity-tracker-42ENM32S.js → mind-activity-tracker-7GE24YZE.js} +4 -4
  54. package/dist/mind-manager-4Q6KGZHL.js +30 -0
  55. package/dist/mind-service-7OD4PRO5.js +36 -0
  56. package/dist/{package-LYQHSDPG.js → package-6YPVWGD3.js} +1 -1
  57. package/dist/{registry-KMELPC3X.js → registry-L272BZJR.js} +2 -2
  58. package/dist/{sandbox-PQYEICEF.js → sandbox-BQAFYHLE.js} +6 -6
  59. package/dist/scheduler-7E22Q7IC.js +30 -0
  60. package/dist/{schema-K575EBPE.js → schema-HHYJDG7B.js} +3 -1
  61. package/dist/{seed-3KH4ZRJL.js → seed-4V2O7FQE.js} +1 -1
  62. package/dist/{seed-cmd-6A76SSAA.js → seed-cmd-JKDEW4MP.js} +2 -2
  63. package/dist/{seed-create-XXRRGZCO.js → seed-create-EPAO3H5F.js} +3 -3
  64. package/dist/{seed-sprout-HLMUH2AI.js → seed-sprout-EONCL4DU.js} +8 -8
  65. package/dist/{send-7CIP5GLS.js → send-232RAHPX.js} +3 -3
  66. package/dist/{service-RH6Q2XWR.js → service-AG5BKRUV.js} +5 -5
  67. package/dist/{service-install-AIQBLE6P.js → service-install-HVAEUBAH.js} +6 -6
  68. package/dist/{setup-PF7JSFMO.js → setup-IL7QJZN4.js} +3 -3
  69. package/dist/{setup-NPAZXBIJ.js → setup-PSA7LJ5U.js} +8 -8
  70. package/dist/{skills-NVOWS5NY.js → skills-SLEY5X6W.js} +6 -6
  71. package/dist/sleep-manager-27S7MKJO.js +34 -0
  72. package/dist/{spirit-ZFYG4JOH.js → spirit-7BUHSEO2.js} +8 -8
  73. package/dist/{sprout-FLBCETYG.js → sprout-JWQ57KF3.js} +1 -1
  74. package/dist/{status-TGOKAFW3.js → status-6GSOSYOD.js} +6 -6
  75. package/dist/system-chat-EIINIHFB.js +34 -0
  76. package/dist/{tailscale-LTYNKIPZ.js → tailscale-6MHNLBAX.js} +2 -2
  77. package/dist/up-4XS3RCPP.js +19 -0
  78. package/dist/{update-ZCTQ6UGY.js → update-BT2PY73H.js} +6 -6
  79. package/dist/{update-check-IKS7SGK5.js → update-check-Y3HBEMF2.js} +3 -3
  80. package/dist/{version-notify-764EXVQQ.js → version-notify-NFQMI5IY.js} +17 -17
  81. package/dist/web-assets/assets/index-DqHSW9Fr.css +1 -0
  82. package/dist/web-assets/assets/index-Jluza4c-.js +73 -0
  83. package/dist/web-assets/index.html +2 -2
  84. package/drizzle/0009_mind_notices.sql +14 -0
  85. package/drizzle/meta/_journal.json +7 -0
  86. package/package.json +1 -1
  87. package/templates/_base/.init/.local/hooks/pre-prompt/notices.ts +46 -0
  88. package/templates/_base/src/lib/context-breakdown.ts +281 -126
  89. package/templates/_base/src/lib/daemon-client.ts +5 -2
  90. package/templates/_base/src/lib/transparency.ts +5 -3
  91. package/templates/_base/src/lib/volute-server.ts +23 -0
  92. package/templates/claude/src/agent.ts +54 -16
  93. package/templates/claude/src/server.ts +1 -0
  94. package/templates/codex/src/agent.ts +51 -12
  95. package/templates/codex/src/server.ts +1 -0
  96. package/templates/pi/src/agent.ts +72 -13
  97. package/templates/pi/src/server.ts +1 -0
  98. package/dist/chunk-KXXJYY62.js +0 -112
  99. package/dist/delivery-manager-IMCRV6A3.js +0 -30
  100. package/dist/down-5XZWH4ZP.js +0 -17
  101. package/dist/echo-text-ADKLNTIA.js +0 -31
  102. package/dist/mind-manager-5G6P2EAT.js +0 -30
  103. package/dist/mind-service-FDATHL6X.js +0 -36
  104. package/dist/scheduler-ZRUZNQI5.js +0 -30
  105. package/dist/sleep-manager-VPPQXBPH.js +0 -34
  106. package/dist/system-chat-YUIT7RA6.js +0 -34
  107. package/dist/up-YRZAEZ3Z.js +0 -19
  108. package/dist/web-assets/assets/index-BI7hUTBr.js +0 -73
  109. package/dist/web-assets/assets/index-BJifO9h_.css +0 -1
@@ -3,10 +3,10 @@ import {
3
3
  broadcast,
4
4
  publish,
5
5
  subscribe
6
- } from "./chunk-N42QMDID.js";
6
+ } from "./chunk-5VBXKFPO.js";
7
7
  import "./chunk-T2TP6ZC6.js";
8
- import "./chunk-2NHRJ3YO.js";
9
- import "./chunk-CJ26DXZL.js";
8
+ import "./chunk-PDSA3ILI.js";
9
+ import "./chunk-MHFAWJCC.js";
10
10
  import "./chunk-K3NQKI34.js";
11
11
  export {
12
12
  broadcast,
@@ -2,6 +2,7 @@
2
2
  import {
3
3
  aiComplete,
4
4
  aiCompleteUtility,
5
+ fireProviderRefreshHook,
5
6
  getAiConfig,
6
7
  getAvailableModels,
7
8
  getConfiguredProviders,
@@ -15,17 +16,19 @@ import {
15
16
  resolveTemplate,
16
17
  saveProviderConfig,
17
18
  setEnabledModels,
19
+ setProviderRefreshHook,
18
20
  setUtilityModel,
19
21
  unqualifyModelId
20
- } from "./chunk-ORNY3MZR.js";
21
- import "./chunk-A6FLW5XD.js";
22
+ } from "./chunk-PGX52NFO.js";
23
+ import "./chunk-2AQCEQYN.js";
22
24
  import "./chunk-T2TP6ZC6.js";
23
- import "./chunk-2NHRJ3YO.js";
24
- import "./chunk-CJ26DXZL.js";
25
+ import "./chunk-PDSA3ILI.js";
26
+ import "./chunk-MHFAWJCC.js";
25
27
  import "./chunk-K3NQKI34.js";
26
28
  export {
27
29
  aiComplete,
28
30
  aiCompleteUtility,
31
+ fireProviderRefreshHook,
29
32
  getAiConfig,
30
33
  getAvailableModels,
31
34
  getConfiguredProviders,
@@ -39,6 +42,7 @@ export {
39
42
  resolveTemplate,
40
43
  saveProviderConfig,
41
44
  setEnabledModels,
45
+ setProviderRefreshHook,
42
46
  setUtilityModel,
43
47
  unqualifyModelId
44
48
  };
@@ -5,9 +5,9 @@ import {
5
5
  extractArchive,
6
6
  isHomeOnlyArchive,
7
7
  readManifest
8
- } from "./chunk-BIEWHAAM.js";
9
- import "./chunk-2NHRJ3YO.js";
10
- import "./chunk-CJ26DXZL.js";
8
+ } from "./chunk-76Q6YLJL.js";
9
+ import "./chunk-PDSA3ILI.js";
10
+ import "./chunk-MHFAWJCC.js";
11
11
  import "./chunk-K3NQKI34.js";
12
12
  export {
13
13
  addHistoryToArchive,
@@ -17,11 +17,11 @@ import {
17
17
  syncMindProfile,
18
18
  updateUserProfile,
19
19
  verifyUser
20
- } from "./chunk-UIM5NHPP.js";
21
- import "./chunk-N42QMDID.js";
20
+ } from "./chunk-PHR4XQPL.js";
21
+ import "./chunk-5VBXKFPO.js";
22
22
  import "./chunk-T2TP6ZC6.js";
23
- import "./chunk-2NHRJ3YO.js";
24
- import "./chunk-CJ26DXZL.js";
23
+ import "./chunk-PDSA3ILI.js";
24
+ import "./chunk-MHFAWJCC.js";
25
25
  import "./chunk-K3NQKI34.js";
26
26
  export {
27
27
  approveUser,
@@ -12,7 +12,7 @@ var cmd = subcommands({
12
12
  commands: {
13
13
  send: {
14
14
  description: "Send a message",
15
- run: (args) => import("./send-7CIP5GLS.js").then((m) => m.run(args))
15
+ run: (args) => import("./send-232RAHPX.js").then((m) => m.run(args))
16
16
  },
17
17
  list: {
18
18
  description: "List conversations",
@@ -32,7 +32,7 @@ var cmd = subcommands({
32
32
  },
33
33
  files: {
34
34
  description: "List pending incoming files",
35
- run: (args) => import("./files-LAQ3NXQK.js").then((m) => m.run(args))
35
+ run: (args) => import("./files-J2CKZ6PK.js").then((m) => m.run(args))
36
36
  },
37
37
  accept: {
38
38
  description: "Accept a pending file",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  voluteSystemDir
4
- } from "./chunk-2NHRJ3YO.js";
4
+ } from "./chunk-PDSA3ILI.js";
5
5
 
6
6
  // packages/daemon/src/lib/config/setup.ts
7
7
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  wrapForIsolation
4
- } from "./chunk-SNW2NPP4.js";
4
+ } from "./chunk-FBV22PFY.js";
5
5
 
6
6
  // packages/daemon/src/lib/util/exec.ts
7
7
  import { execFile as execFileCb, execFileSync, spawn } from "child_process";
@@ -7,14 +7,14 @@ import {
7
7
  modeLabel,
8
8
  pollHealth,
9
9
  startService
10
- } from "./chunk-TNZ5XQA4.js";
10
+ } from "./chunk-SGC6CDXB.js";
11
11
  import {
12
12
  readGlobalConfig
13
- } from "./chunk-A6FLW5XD.js";
13
+ } from "./chunk-2AQCEQYN.js";
14
14
  import {
15
15
  voluteHome,
16
16
  voluteSystemDir
17
- } from "./chunk-2NHRJ3YO.js";
17
+ } from "./chunk-PDSA3ILI.js";
18
18
 
19
19
  // src/commands/up.ts
20
20
  import { spawn } from "child_process";
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-T2TP6ZC6.js";
5
5
  import {
6
6
  getDb
7
- } from "./chunk-2NHRJ3YO.js";
7
+ } from "./chunk-PDSA3ILI.js";
8
8
  import {
9
9
  activity
10
- } from "./chunk-CJ26DXZL.js";
10
+ } from "./chunk-MHFAWJCC.js";
11
11
 
12
12
  // packages/daemon/src/lib/events/activity-events.ts
13
13
  var subscribers = /* @__PURE__ */ new Set();
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  mindDir,
4
4
  stateDir
5
- } from "./chunk-2NHRJ3YO.js";
5
+ } from "./chunk-PDSA3ILI.js";
6
6
 
7
7
  // packages/daemon/src/lib/mind/archive.ts
8
8
  import { execFileSync } from "child_process";
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  subscribe
4
- } from "./chunk-N42QMDID.js";
4
+ } from "./chunk-5VBXKFPO.js";
5
5
  import {
6
6
  logger_default
7
7
  } from "./chunk-T2TP6ZC6.js";
8
8
  import {
9
9
  getDb
10
- } from "./chunk-2NHRJ3YO.js";
10
+ } from "./chunk-PDSA3ILI.js";
11
11
  import {
12
12
  channels,
13
13
  conversationParticipants,
@@ -15,7 +15,7 @@ import {
15
15
  conversations,
16
16
  messages,
17
17
  users
18
- } from "./chunk-CJ26DXZL.js";
18
+ } from "./chunk-MHFAWJCC.js";
19
19
 
20
20
  // packages/daemon/src/lib/events/conversations.ts
21
21
  import { randomUUID } from "crypto";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  stateDir
4
- } from "./chunk-2NHRJ3YO.js";
4
+ } from "./chunk-PDSA3ILI.js";
5
5
 
6
6
  // packages/daemon/src/lib/chat/file-sharing.ts
7
7
  import { randomBytes } from "crypto";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getBaseName,
4
4
  validateMindName
5
- } from "./chunk-2NHRJ3YO.js";
5
+ } from "./chunk-PDSA3ILI.js";
6
6
 
7
7
  // packages/daemon/src/lib/mind/isolation.ts
8
8
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  voluteSystemDir
4
- } from "./chunk-2NHRJ3YO.js";
4
+ } from "./chunk-PDSA3ILI.js";
5
5
 
6
6
  // packages/daemon/src/lib/update-check.ts
7
7
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  stateDir,
4
4
  voluteSystemDir
5
- } from "./chunk-2NHRJ3YO.js";
5
+ } from "./chunk-PDSA3ILI.js";
6
6
 
7
7
  // packages/daemon/src/lib/config/env.ts
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  setBridgeConfig
4
- } from "./chunk-LQ6Z4FXN.js";
4
+ } from "./chunk-S4YO5OWV.js";
5
5
  import {
6
6
  readEnv,
7
7
  sharedEnvPath,
8
8
  writeEnv
9
- } from "./chunk-PMMHVSCR.js";
9
+ } from "./chunk-HAJHDGBV.js";
10
10
 
11
11
  // packages/daemon/src/lib/template/import-utils.ts
12
12
  import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  findBridgeForChannel,
4
4
  getBridgeConfig
5
- } from "./chunk-LQ6Z4FXN.js";
5
+ } from "./chunk-S4YO5OWV.js";
6
6
  import {
7
7
  publish,
8
8
  recordOutbound
9
- } from "./chunk-TEZRVSSB.js";
9
+ } from "./chunk-XUJR6NZW.js";
10
10
  import {
11
11
  readEnv,
12
12
  sharedEnvPath
13
- } from "./chunk-PMMHVSCR.js";
13
+ } from "./chunk-HAJHDGBV.js";
14
14
  import {
15
15
  addMessage,
16
16
  findDMConversation,
@@ -18,14 +18,14 @@ import {
18
18
  getChannelName,
19
19
  getConversation,
20
20
  getParticipants
21
- } from "./chunk-5DPRTREW.js";
21
+ } from "./chunk-B7YJUWMM.js";
22
22
  import {
23
23
  readVoluteConfig
24
24
  } from "./chunk-CU6OFXMM.js";
25
25
  import {
26
26
  getOrCreateMindUser,
27
27
  getUserByUsername
28
- } from "./chunk-UIM5NHPP.js";
28
+ } from "./chunk-PHR4XQPL.js";
29
29
  import {
30
30
  logger_default
31
31
  } from "./chunk-T2TP6ZC6.js";
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  mindDir,
37
37
  voluteSystemDir
38
- } from "./chunk-2NHRJ3YO.js";
38
+ } from "./chunk-PDSA3ILI.js";
39
39
  import {
40
40
  __export
41
41
  } from "./chunk-K3NQKI34.js";
@@ -14,6 +14,7 @@ __export(schema_exports, {
14
14
  deliveryQueue: () => deliveryQueue,
15
15
  messages: () => messages,
16
16
  mindHistory: () => mindHistory,
17
+ mindNotices: () => mindNotices,
17
18
  minds: () => minds,
18
19
  sessions: () => sessions,
19
20
  sharedSkills: () => sharedSkills,
@@ -241,6 +242,20 @@ var messages = sqliteTable(
241
242
  index("idx_messages_turn_id").on(table.turn_id)
242
243
  ]
243
244
  );
245
+ var mindNotices = sqliteTable(
246
+ "mind_notices",
247
+ {
248
+ id: integer("id").primaryKey({ autoIncrement: true }),
249
+ mind: text("mind").notNull(),
250
+ session: text("session").notNull(),
251
+ kind: text("kind").$type().notNull(),
252
+ reason: text("reason").$type().notNull(),
253
+ detail: text("detail").notNull(),
254
+ raw: text("raw"),
255
+ created_at: text("created_at").notNull().default(sql`(datetime('now'))`)
256
+ },
257
+ (table) => [index("idx_mind_notices_mind_session").on(table.mind, table.session)]
258
+ );
244
259
 
245
260
  export {
246
261
  minds,
@@ -258,5 +273,6 @@ export {
258
273
  conversationReads,
259
274
  channels,
260
275
  messages,
276
+ mindNotices,
261
277
  schema_exports
262
278
  };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-T2TP6ZC6.js";
5
5
  import {
6
6
  mindDir
7
- } from "./chunk-2NHRJ3YO.js";
7
+ } from "./chunk-PDSA3ILI.js";
8
8
 
9
9
  // packages/daemon/src/lib/delivery/delivery-router.ts
10
10
  import { readFileSync, statSync } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  minds,
4
4
  schema_exports
5
- } from "./chunk-CJ26DXZL.js";
5
+ } from "./chunk-MHFAWJCC.js";
6
6
 
7
7
  // packages/daemon/src/lib/db.ts
8
8
  import { chmodSync, existsSync } from "fs";
@@ -17,7 +17,7 @@ import { mkdirSync } from "fs";
17
17
  import { homedir } from "os";
18
18
  import { dirname, resolve } from "path";
19
19
  import { fileURLToPath } from "url";
20
- import { and, eq, isNull } from "drizzle-orm";
20
+ import { and, eq, inArray, isNull } from "drizzle-orm";
21
21
  function voluteHome() {
22
22
  if (process.env.VOLUTE_HOME) return process.env.VOLUTE_HOME;
23
23
  const dir = dirname(fileURLToPath(import.meta.url));
@@ -61,7 +61,7 @@ function rowToEntry(row) {
61
61
  }
62
62
  async function readRegistry() {
63
63
  const db2 = await getDb();
64
- const rows = await db2.select().from(minds).where(and(isNull(minds.parent), eq(minds.mind_type, "mind")));
64
+ const rows = await db2.select().from(minds).where(and(isNull(minds.parent), inArray(minds.mind_type, ["mind", "spirit"])));
65
65
  return rows.map(rowToEntry);
66
66
  }
67
67
  async function readAllMinds() {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readGlobalConfig,
4
4
  writeGlobalConfig
5
- } from "./chunk-A6FLW5XD.js";
5
+ } from "./chunk-2AQCEQYN.js";
6
6
  import {
7
7
  logger_default
8
8
  } from "./chunk-T2TP6ZC6.js";
@@ -11,6 +11,17 @@ import {
11
11
  import { complete, getEnvApiKey, getModel, getModels, getProviders } from "@mariozechner/pi-ai";
12
12
  import { getOAuthApiKey } from "@mariozechner/pi-ai/oauth";
13
13
  var aiLog = logger_default.child("ai-service");
14
+ var providerRefreshHook;
15
+ function setProviderRefreshHook(hook) {
16
+ providerRefreshHook = hook;
17
+ }
18
+ function fireProviderRefreshHook(providerId) {
19
+ try {
20
+ providerRefreshHook?.(providerId);
21
+ } catch (err) {
22
+ aiLog.warn(`provider refresh hook failed for ${providerId}`, logger_default.errorData(err));
23
+ }
24
+ }
14
25
  function getAiConfig() {
15
26
  const config = readGlobalConfig();
16
27
  return config.ai ?? null;
@@ -131,6 +142,7 @@ async function resolveApiKey(providerId) {
131
142
  if (result) {
132
143
  if (result.newCredentials.access !== providerConfig.oauth.access) {
133
144
  saveProviderConfig(providerId, { ...providerConfig, oauth: result.newCredentials });
145
+ fireProviderRefreshHook(providerId);
134
146
  }
135
147
  return result.apiKey;
136
148
  }
@@ -206,6 +218,8 @@ async function aiComplete(systemPrompt, userMessage, modelId) {
206
218
  }
207
219
 
208
220
  export {
221
+ setProviderRefreshHook,
222
+ fireProviderRefreshHook,
209
223
  getAiConfig,
210
224
  saveProviderConfig,
211
225
  removeProviderConfig,
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  broadcast
4
- } from "./chunk-N42QMDID.js";
4
+ } from "./chunk-5VBXKFPO.js";
5
5
  import {
6
6
  getDb
7
- } from "./chunk-2NHRJ3YO.js";
7
+ } from "./chunk-PDSA3ILI.js";
8
8
  import {
9
9
  users
10
- } from "./chunk-CJ26DXZL.js";
10
+ } from "./chunk-MHFAWJCC.js";
11
11
 
12
12
  // packages/daemon/src/lib/auth.ts
13
13
  import { compareSync, hashSync } from "bcryptjs";
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ readGlobalConfig
4
+ } from "./chunk-2AQCEQYN.js";
5
+ import {
6
+ logger_default
7
+ } from "./chunk-T2TP6ZC6.js";
8
+
9
+ // packages/daemon/src/lib/mind/sandbox.ts
10
+ import { execFileSync } from "child_process";
11
+ var slog = logger_default.child("sandbox");
12
+ var sandboxManager = null;
13
+ function isSandboxEnabled() {
14
+ if (process.env.VOLUTE_SANDBOX === "0") return false;
15
+ return readGlobalConfig().setup?.isolation === "sandbox";
16
+ }
17
+ function findRipgrep() {
18
+ if (process.env.VOLUTE_RIPGREP_PATH) {
19
+ try {
20
+ execFileSync(process.env.VOLUTE_RIPGREP_PATH, ["--version"], {
21
+ encoding: "utf-8",
22
+ timeout: 5e3
23
+ });
24
+ return process.env.VOLUTE_RIPGREP_PATH;
25
+ } catch {
26
+ slog.warn(
27
+ `VOLUTE_RIPGREP_PATH set to ${process.env.VOLUTE_RIPGREP_PATH} but binary not executable \u2014 falling back to system PATH`
28
+ );
29
+ }
30
+ }
31
+ try {
32
+ return execFileSync("which", ["rg"], { encoding: "utf-8" }).trim() || null;
33
+ } catch {
34
+ return null;
35
+ }
36
+ }
37
+ async function initSandbox() {
38
+ if (!isSandboxEnabled()) return;
39
+ try {
40
+ const { SandboxManager } = await import("@anthropic-ai/sandbox-runtime");
41
+ const rgPath = findRipgrep();
42
+ const ripgrepConfig = rgPath ? { command: rgPath } : void 0;
43
+ const { errors, warnings } = SandboxManager.checkDependencies(ripgrepConfig);
44
+ if (warnings.length > 0) {
45
+ slog.warn(`sandbox dependency warnings: ${warnings.join(", ")}`);
46
+ }
47
+ if (errors.length > 0) {
48
+ if (process.platform === "darwin") {
49
+ slog.warn(`sandbox dependency issues (non-fatal on macOS): ${errors.join(", ")}`);
50
+ } else {
51
+ slog.error(
52
+ `sandbox dependencies missing \u2014 minds will run without sandbox isolation: ${errors.join(", ")}`
53
+ );
54
+ return;
55
+ }
56
+ }
57
+ const config = {
58
+ filesystem: {
59
+ denyRead: [],
60
+ allowWrite: [],
61
+ denyWrite: []
62
+ },
63
+ ...ripgrepConfig ? { ripgrep: ripgrepConfig } : {}
64
+ };
65
+ await SandboxManager.initialize(config);
66
+ sandboxManager = SandboxManager;
67
+ } catch (err) {
68
+ slog.error(
69
+ "sandbox runtime not available \u2014 minds will run without sandbox isolation",
70
+ logger_default.errorData(err)
71
+ );
72
+ }
73
+ }
74
+ async function buildSandboxReadConfig(_mindName, mindDir) {
75
+ const userHome = process.env.HOME || "";
76
+ const denyRead = [];
77
+ const allowRead = [mindDir];
78
+ if (userHome) {
79
+ denyRead.push(userHome);
80
+ } else {
81
+ slog.warn("$HOME is not set \u2014 sandbox read restrictions will be limited");
82
+ }
83
+ if (process.env.VOLUTE_ISOLATION === "user") {
84
+ const usersDir = process.platform === "darwin" ? "/Users" : "/home";
85
+ if (!denyRead.includes(usersDir)) {
86
+ denyRead.push(usersDir);
87
+ }
88
+ }
89
+ return { denyRead, allowRead };
90
+ }
91
+ function shellEscape(s) {
92
+ return `'${s.replace(/'/g, "'\\''")}'`;
93
+ }
94
+ async function wrapForSandbox(cmd, args, mindDir, mindName, allowWrite) {
95
+ if (!sandboxManager) return [cmd, args];
96
+ const { denyRead, allowRead } = await buildSandboxReadConfig(mindName, mindDir);
97
+ const customConfig = {
98
+ filesystem: {
99
+ denyRead,
100
+ allowRead,
101
+ allowWrite: allowWrite ?? [mindDir],
102
+ denyWrite: []
103
+ }
104
+ };
105
+ try {
106
+ const shellCmd = [cmd, ...args].map(shellEscape).join(" ");
107
+ const wrapped = await sandboxManager.wrapWithSandbox(shellCmd, void 0, customConfig);
108
+ return ["bash", ["-c", wrapped]];
109
+ } catch (err) {
110
+ slog.error(
111
+ `failed to sandbox mind ${mindName} \u2014 running without isolation`,
112
+ logger_default.errorData(err)
113
+ );
114
+ return [cmd, args];
115
+ }
116
+ }
117
+
118
+ export {
119
+ isSandboxEnabled,
120
+ initSandbox,
121
+ buildSandboxReadConfig,
122
+ shellEscape,
123
+ wrapForSandbox
124
+ };
@@ -3,10 +3,10 @@ import {
3
3
  LAUNCHD_PLIST_LABEL,
4
4
  LAUNCHD_PLIST_PATH,
5
5
  USER_SYSTEMD_UNIT
6
- } from "./chunk-TNZ5XQA4.js";
6
+ } from "./chunk-SGC6CDXB.js";
7
7
  import {
8
8
  resolveVoluteBin
9
- } from "./chunk-3F7XK5Q7.js";
9
+ } from "./chunk-3XSFMN3H.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-N42QMDID.js";
4
+ } from "./chunk-5VBXKFPO.js";
5
5
  import {
6
6
  logger_default
7
7
  } from "./chunk-T2TP6ZC6.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-T2TP6ZC6.js";
5
5
  import {
6
6
  voluteSystemDir
7
- } from "./chunk-2NHRJ3YO.js";
7
+ } from "./chunk-PDSA3ILI.js";
8
8
 
9
9
  // packages/daemon/src/lib/bridges/bridges.ts
10
10
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  exec,
4
4
  execInherit
5
- } from "./chunk-3F7XK5Q7.js";
5
+ } from "./chunk-3XSFMN3H.js";
6
6
  import {
7
7
  voluteSystemDir
8
- } from "./chunk-2NHRJ3YO.js";
8
+ } from "./chunk-PDSA3ILI.js";
9
9
 
10
10
  // packages/daemon/src/lib/config/service-mode.ts
11
11
  import { execFileSync } from "child_process";
@@ -8,10 +8,10 @@ import {
8
8
  pollHealthDown,
9
9
  readDaemonConfig,
10
10
  stopService
11
- } from "./chunk-TNZ5XQA4.js";
11
+ } from "./chunk-SGC6CDXB.js";
12
12
  import {
13
13
  voluteSystemDir
14
- } from "./chunk-2NHRJ3YO.js";
14
+ } from "./chunk-PDSA3ILI.js";
15
15
 
16
16
  // src/commands/down.ts
17
17
  import { existsSync, readFileSync, unlinkSync } from "fs";
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  exec,
4
4
  gitExec
5
- } from "./chunk-3F7XK5Q7.js";
5
+ } from "./chunk-3XSFMN3H.js";
6
6
  import {
7
7
  readGlobalConfig,
8
8
  writeGlobalConfig
9
- } from "./chunk-A6FLW5XD.js";
9
+ } from "./chunk-2AQCEQYN.js";
10
10
  import {
11
11
  logger_default
12
12
  } from "./chunk-T2TP6ZC6.js";
@@ -15,10 +15,10 @@ import {
15
15
  mindDir,
16
16
  readRegistry,
17
17
  voluteHome
18
- } from "./chunk-2NHRJ3YO.js";
18
+ } from "./chunk-PDSA3ILI.js";
19
19
  import {
20
20
  sharedSkills
21
- } from "./chunk-CJ26DXZL.js";
21
+ } from "./chunk-MHFAWJCC.js";
22
22
 
23
23
  // packages/daemon/src/lib/skills.ts
24
24
  import { createHash } from "crypto";
@@ -46,7 +46,7 @@ async function initDefaultSkills() {
46
46
  const config = readGlobalConfig();
47
47
  let extensionSkills = [];
48
48
  try {
49
- const { getExtensionStandardSkills } = await import("./extensions-P477XR46.js");
49
+ const { getExtensionStandardSkills } = await import("./extensions-VN5SEVRP.js");
50
50
  extensionSkills = getExtensionStandardSkills();
51
51
  } catch (err) {
52
52
  logger_default.warn("failed to load extension standard skills during init", logger_default.errorData(err));