volute 0.47.0 → 0.49.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.
- package/README.md +82 -331
- package/dist/{accept-YAFP5JFJ.js → accept-KYNC5X3U.js} +3 -3
- package/dist/{activity-events-MIOK3IOU.js → activity-events-GJJAI2WT.js} +4 -4
- package/dist/{ai-service-CVZEYKTK.js → ai-service-A7FS7EC3.js} +9 -5
- package/dist/{archive-6Z4GFQPH.js → archive-7E3YE6VF.js} +3 -3
- package/dist/{auth-A4VGHADI.js → auth-ABYLOEZ7.js} +5 -5
- package/dist/{avatar-image-7S3WA77A.js → avatar-image-6ATV2IOZ.js} +6 -5
- package/dist/{backup-IIAFOW2L.js → backup-XYAMT4CU.js} +15 -15
- package/dist/{bridge-TIZGSXOD.js → bridge-3FNSWLNQ.js} +3 -3
- package/dist/{channels-ITE4YC57.js → channels-SGQZHNQJ.js} +3 -3
- package/dist/{chat-AJLJCQ3M.js → chat-OGXAEXMV.js} +9 -9
- package/dist/{chunk-LTLFOSA4.js → chunk-3B427GUK.js} +3 -3
- package/dist/{chunk-RUFLGTOT.js → chunk-4B62E4CG.js} +2 -2
- package/dist/{chunk-ODDGGLM6.js → chunk-4DSGN4FL.js} +3 -3
- package/dist/{chunk-BGYHLR54.js → chunk-6HGEZJDH.js} +2 -2
- package/dist/{chunk-RBNMDAKB.js → chunk-BCG45AQB.js} +15 -1
- package/dist/{chunk-5IERLDUS.js → chunk-DAIIMBLB.js} +26 -6
- package/dist/{chunk-DGGZVZTM.js → chunk-DVN6DNMI.js} +1 -1
- package/dist/chunk-DW4TRDOZ.js +29 -0
- package/dist/chunk-EADX54RG.js +113 -0
- package/dist/{chunk-EIQDZC43.js → chunk-EFT2OALG.js} +6 -2
- package/dist/{chunk-XHN6XBWV.js → chunk-EG5LSKHU.js} +2 -2
- package/dist/{chunk-VMCZBXF2.js → chunk-FBBS4BVR.js} +10 -34
- package/dist/{chunk-IWJSNMSY.js → chunk-GWVFDUNB.js} +45 -14
- package/dist/{chunk-CBOIHNMR.js → chunk-HCYQRME2.js} +41 -5
- package/dist/{chunk-4I72V3E5.js → chunk-IH5TKXX6.js} +15 -15
- package/dist/{chunk-5NN2VHJV.js → chunk-JBIFXB6I.js} +4 -4
- package/dist/{chunk-JSVHH32K.js → chunk-JCBPU57A.js} +15 -13
- package/dist/{chunk-M3XDVS5Q.js → chunk-JCWB2ITW.js} +2 -2
- package/dist/{chunk-JCMGDCGX.js → chunk-JPGHSXSV.js} +20 -25
- package/dist/{chunk-K23P5Q5N.js → chunk-K3JOLGWF.js} +30 -8
- package/dist/{chunk-3YUBFTDN.js → chunk-KHCKZ36O.js} +1 -1
- package/dist/{chunk-7KRIHYLR.js → chunk-L27YYONJ.js} +2 -2
- package/dist/{chunk-SZJCJVXV.js → chunk-MG3Z34YE.js} +2 -2
- package/dist/{chunk-SKNXMUIU.js → chunk-NJHN6IRB.js} +26 -2
- package/dist/{chunk-2OIYNHWO.js → chunk-NOIAHMJB.js} +1 -1
- package/dist/{chunk-2MJ7EOMT.js → chunk-P4LHVRNE.js} +1 -0
- package/dist/{chunk-IYG4FBMP.js → chunk-PY24ZL62.js} +1 -1
- package/dist/{chunk-F55GRIEK.js → chunk-QQBOI3QA.js} +356 -296
- package/dist/{chunk-T2TP6ZC6.js → chunk-QUSMYGNQ.js} +6 -0
- package/dist/{chunk-KDLYIECM.js → chunk-R772ET2M.js} +18 -4
- package/dist/{chunk-WW6C3PLV.js → chunk-RSBL3FAD.js} +39 -6
- package/dist/{mind-list-KEGRGQEQ.js → chunk-SHKM5RGD.js} +19 -6
- package/dist/{chunk-YKA7DCVW.js → chunk-SX72DOO3.js} +1 -1
- package/dist/chunk-TXJL36ZQ.js +48 -0
- package/dist/{chunk-M6TTZRGH.js → chunk-VIUH5CHQ.js} +72 -24
- package/dist/{chunk-HPGN6XRT.js → chunk-VNRSXEBF.js} +4 -4
- package/dist/{chunk-PFZBNKUH.js → chunk-WCFSBH33.js} +0 -1
- package/dist/chunk-XTEKINWG.js +158 -0
- package/dist/{chunk-LWDTP6DH.js → chunk-YIJGKHIS.js} +32 -2
- package/dist/{chunk-MTRMQFCQ.js → chunk-ZX46PGCC.js} +2 -2
- package/dist/cli.js +34 -26
- package/dist/{clock-E6N5Y3YW.js → clock-6JZL2FS6.js} +3 -3
- package/dist/{cloud-sync-LQTVDTQ3.js → cloud-sync-VFDTNNCA.js} +22 -20
- package/dist/{config-TJLYUV3U.js → config-RPSLA2HX.js} +3 -3
- package/dist/{conversations-C7IKYSHD.js → conversations-TUM5PJJ4.js} +5 -5
- package/dist/{create-A7PDHIIL.js → create-VIQVP3QB.js} +3 -3
- package/dist/{create-PQQXKTJK.js → create-Z5FSDNVZ.js} +16 -5
- package/dist/{daemon-client-IYR4KCPU.js → daemon-client-ZFY5MOAL.js} +5 -3
- package/dist/{daemon-restart-5F3YTLZK.js → daemon-restart-54L4B6AQ.js} +7 -7
- package/dist/daemon.js +1105 -601
- package/dist/{db-FO6LXYCW.js → db-F6UMFRYD.js} +2 -2
- package/dist/{db-LZTLA7XC.js → db-IPXRJUI7.js} +1 -1
- package/dist/{delete-HPLC7ETU.js → delete-ESEP7NGQ.js} +1 -1
- package/dist/delivery-manager-RBXBPVWM.js +36 -0
- package/dist/{delivery-router-3QFG2ZEX.js → delivery-router-VUOL5YSA.js} +8 -6
- package/dist/{down-ZI4S6265.js → down-6X7KX7BZ.js} +5 -5
- package/dist/echo-text-B6NZ5FGE.js +36 -0
- package/dist/env-KUL4XKN2.js +18 -0
- package/dist/{env-HRL2PWAT.js → env-ZYMSCB7B.js} +6 -6
- package/dist/{exec-QIFYZG4C.js → exec-FBXA3CM4.js} +3 -3
- package/dist/{export-4GVGNW54.js → export-TNBPDH77.js} +4 -4
- package/dist/{extension-QBY4C44L.js → extension-J4ZQ2GHV.js} +3 -3
- package/dist/{extensions-PIMIQ7J3.js → extensions-AWNO3SZF.js} +22 -20
- package/dist/{files-FEFZKMNM.js → files-BVBRJJ2P.js} +6 -6
- package/dist/{import-7MO3YTRE.js → import-ZUNKMCKC.js} +9 -9
- package/dist/{isolation-MCT4ZYLT.js → isolation-OPCZQRTH.js} +3 -3
- package/dist/{join-ZJV7W6MO.js → join-34TR2GXQ.js} +1 -1
- package/dist/{list-LQO2DCIK.js → list-PMUXZNAM.js} +3 -3
- package/dist/{login-OF4WXDAN.js → login-KAKNFCW5.js} +14 -5
- package/dist/{login-6TLMI2TQ.js → login-LKNLCJPA.js} +3 -3
- package/dist/{logout-ERE2BGA3.js → logout-RLT62RQP.js} +5 -5
- package/dist/{logout-BK53HXNY.js → logout-YZRMZ3O2.js} +3 -3
- package/dist/message-delivery-ABPV76EA.js +42 -0
- package/dist/{mind-POOHFZHP.js → mind-IF6CGMFW.js} +23 -19
- package/dist/{mind-activity-tracker-YVZPC4A5.js → mind-activity-tracker-YMMERB6B.js} +5 -5
- package/dist/mind-contacts-BKUFPUCU.js +64 -0
- package/dist/{mind-history-47DN6ILW.js → mind-history-WI5OI3BW.js} +5 -5
- package/dist/mind-list-OTHV4ZO4.js +13 -0
- package/dist/{mind-profile-PEQYASQX.js → mind-profile-LUG353ZT.js} +1 -1
- package/dist/mind-service-42GDO4KH.js +44 -0
- package/dist/{mind-sleep-IN3WPA76.js → mind-sleep-VBV7YRSU.js} +5 -5
- package/dist/{mind-status-SMUWJKGV.js → mind-status-BJNPGXKC.js} +8 -3
- package/dist/{mind-wake-R54BPESY.js → mind-wake-LVTZ55EZ.js} +3 -3
- package/dist/notices-N6BCGHFV.js +25 -0
- package/dist/{package-WPEE2HVJ.js → package-PD67VPHB.js} +8 -5
- package/dist/prompts-MDHDLWEX.js +24 -0
- package/dist/{read-PWAJOQIQ.js → read-YSWUXYL7.js} +3 -3
- package/dist/{register-7SZJFHU6.js → register-TWQDKQRT.js} +3 -3
- package/dist/{registry-UMMDRPRM.js → registry-3ELJPUGJ.js} +6 -2
- package/dist/{reject-6VH7N2A4.js → reject-SXGCYN4A.js} +3 -3
- package/dist/{restart-H5WJDMA7.js → restart-5F5QDBOG.js} +5 -5
- package/dist/{sandbox-G4X4K3UN.js → sandbox-XPYA7UIF.js} +5 -5
- package/dist/scheduler-K7Y7Z7FQ.js +34 -0
- package/dist/{schema-VEVO7HG6.js → schema-6YONVTKZ.js} +1 -1
- package/dist/{seed-VANPU43L.js → seed-NQED7PSX.js} +1 -1
- package/dist/{seed-check-VLTVILOV.js → seed-check-TYD7RRZY.js} +1 -1
- package/dist/{seed-cmd-SYVDZKM4.js → seed-cmd-QF3F2G4S.js} +3 -3
- package/dist/{seed-create-3FGZPS6C.js → seed-create-XOO4N2OE.js} +6 -4
- package/dist/seed-readiness-3LRYASA4.js +18 -0
- package/dist/{seed-sprout-H7QLFPFM.js → seed-sprout-HSBBGSS2.js} +32 -33
- package/dist/{send-HYDFGC6G.js → send-IHRJYNXA.js} +8 -8
- package/dist/{service-SYJ5G6LP.js → service-YCOPCTSZ.js} +4 -4
- package/dist/{service-install-FQ43Z4DF.js → service-install-Y46OTF55.js} +5 -5
- package/dist/{setup-QJHGMGSN.js → setup-F4TE64YI.js} +7 -7
- package/dist/{setup-KFYVWTXG.js → setup-TCN7VH5U.js} +9 -3
- package/dist/{skill-GUKG2YVH.js → skill-4CYJLYVY.js} +6 -6
- package/dist/skills/dreaming/SKILL.md +5 -1
- package/dist/skills/dreaming/scripts/dream.ts +5 -1
- package/dist/skills/orientation/SKILL.md +8 -7
- package/dist/skills/tending/SKILL.md +51 -2
- package/dist/skills/volute-mind/SKILL.md +5 -3
- package/dist/skills/volute-mind/references/routing.md +6 -5
- package/dist/skills/volute-mind/references/variants.md +48 -14
- package/dist/{skills-L2CMTW7A.js → skills-NN5UZCUU.js} +8 -6
- package/dist/sleep-manager-DSPXFHGX.js +38 -0
- package/dist/spirit-SSJMYC6A.js +31 -0
- package/dist/{split-WBMZXBHF.js → split-JF2VWTXA.js} +5 -2
- package/dist/{sprout-LTL5P36T.js → sprout-AXA2SECQ.js} +1 -1
- package/dist/{src-OJHARHTF.js → src-ZN4LXMPI.js} +17 -8
- package/dist/{start-X46I3GXB.js → start-BTVMTP3K.js} +5 -5
- package/dist/{status-V4RJMHJ4.js → status-VJGXMQ4L.js} +10 -8
- package/dist/{stop-HJQV4YSM.js → stop-YORESK4U.js} +5 -5
- package/dist/system-chat-M2XOBKEM.js +40 -0
- package/dist/{systems-B5YJKMW4.js → systems-5MH2ELQE.js} +6 -6
- package/dist/{tailscale-MCLY5GYE.js → tailscale-AMMVKDXB.js} +3 -3
- package/dist/{template-staleness-EMQORSGG.js → template-staleness-HKGCTS3H.js} +4 -4
- package/dist/{turn-tracker-JZRZDFWV.js → turn-tracker-JQ2YUUY2.js} +7 -7
- package/dist/up-SDLTLPAO.js +20 -0
- package/dist/{update-ACV4SAY3.js → update-WEA4N2TR.js} +5 -5
- package/dist/{update-check-266R4ZSY.js → update-check-DZOTONII.js} +3 -3
- package/dist/{upgrade-NWAZ7MLD.js → upgrade-K5FIQPQD.js} +1 -1
- package/dist/variant-cleanup-P4MBNLJD.js +33 -0
- package/dist/{version-notify-XRGTEEDK.js → version-notify-WFA5XB5A.js} +27 -25
- package/dist/web-assets/assets/index-BostMFoR.css +1 -0
- package/dist/web-assets/assets/index-CKlqUkyG.js +92 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0013_variant_purpose.sql +3 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +8 -5
- package/packages/extensions/pages/dist/ui/assets/index-BuXnE-rb.css +1 -0
- package/packages/extensions/pages/dist/ui/assets/index-DtzftuPA.js +2 -0
- package/packages/extensions/pages/dist/ui/index.html +2 -2
- package/templates/_base/.init/.local/hooks/startup-context.ts +19 -2
- package/templates/_base/home/VOLUTE.md +13 -1
- package/templates/_base/src/lib/daemon-client.ts +27 -7
- package/templates/_base/src/lib/startup.ts +16 -1
- package/templates/claude/src/agent.ts +10 -3
- package/templates/claude/src/lib/hooks/identity-reload.ts +12 -3
- package/templates/claude/src/server.ts +4 -2
- package/templates/pi/src/agent.ts +7 -10
- package/templates/pi/src/lib/dispatch.ts +65 -0
- package/templates/pi/src/lib/event-handler.ts +47 -6
- package/dist/delivery-manager-TN5KK2AP.js +0 -34
- package/dist/echo-text-SEQCLGAT.js +0 -34
- package/dist/message-delivery-ZE3YGJDD.js +0 -38
- package/dist/mind-service-JFY7UG5E.js +0 -40
- package/dist/scheduler-HQSDYJFY.js +0 -32
- package/dist/sleep-manager-3NA7ZJP3.js +0 -36
- package/dist/spirit-WXN4IDBF.js +0 -23
- package/dist/system-chat-N2F7HVY3.js +0 -38
- package/dist/up-J2PBPOZL.js +0 -18
- package/dist/volute-config-A52FHWKM.js +0 -14
- package/dist/web-assets/assets/index-DtctoDXY.css +0 -1
- package/dist/web-assets/assets/index-Wpyb2CML.js +0 -86
- package/packages/extensions/pages/dist/ui/assets/index-BcY6lnq4.css +0 -1
- package/packages/extensions/pages/dist/ui/assets/index-CQjEQg1r.js +0 -2
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
stopDaemon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6HGEZJDH.js";
|
|
5
5
|
import {
|
|
6
6
|
promptLine,
|
|
7
7
|
promptPassword
|
|
8
8
|
} from "./chunk-VHWGEJ4V.js";
|
|
9
|
-
import {
|
|
10
|
-
command,
|
|
11
|
-
subcommands
|
|
12
|
-
} from "./chunk-TXSA4Q3V.js";
|
|
13
|
-
import "./chunk-O7IGP7ZW.js";
|
|
14
9
|
import {
|
|
15
10
|
daemonFetch
|
|
16
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BCG45AQB.js";
|
|
17
12
|
import {
|
|
18
13
|
getClient,
|
|
19
14
|
urlOf
|
|
20
15
|
} from "./chunk-LOPXTW6H.js";
|
|
16
|
+
import {
|
|
17
|
+
command,
|
|
18
|
+
subcommands
|
|
19
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
20
|
+
import "./chunk-O7IGP7ZW.js";
|
|
21
21
|
import {
|
|
22
22
|
RESTIC_INSTALL_HINT,
|
|
23
23
|
resticVersion,
|
|
24
24
|
restoreStagedDb
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JBIFXB6I.js";
|
|
26
26
|
import {
|
|
27
27
|
getServiceMode,
|
|
28
28
|
modeLabel,
|
|
29
29
|
stopService
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HCYQRME2.js";
|
|
31
31
|
import {
|
|
32
32
|
chownMindDir,
|
|
33
33
|
exec,
|
|
34
34
|
execInherit,
|
|
35
35
|
wrapForIsolation
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-DVN6DNMI.js";
|
|
37
37
|
import {
|
|
38
38
|
_resetConfigCache,
|
|
39
39
|
readGlobalConfig
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-NJHN6IRB.js";
|
|
41
|
+
import "./chunk-QUSMYGNQ.js";
|
|
42
42
|
import {
|
|
43
43
|
voluteHome,
|
|
44
44
|
voluteSystemDir
|
|
45
|
-
} from "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-RSBL3FAD.js";
|
|
46
|
+
import "./chunk-P4LHVRNE.js";
|
|
47
47
|
import "./chunk-K3NQKI34.js";
|
|
48
48
|
|
|
49
49
|
// src/commands/backup.ts
|
|
@@ -337,7 +337,7 @@ Restore failed: ${err instanceof Error ? err.message : err}`);
|
|
|
337
337
|
if (readGlobalConfig().setup?.isolation === "user") {
|
|
338
338
|
process.env.VOLUTE_ISOLATION = "user";
|
|
339
339
|
}
|
|
340
|
-
const { readAllMinds, mindDir } = await import("./registry-
|
|
340
|
+
const { readAllMinds, mindDir } = await import("./registry-3ELJPUGJ.js");
|
|
341
341
|
const seen = /* @__PURE__ */ new Set();
|
|
342
342
|
for (const mind of await readAllMinds()) {
|
|
343
343
|
const dir = mind.dir ?? mindDir(mind.name);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
daemonFetch
|
|
4
|
+
} from "./chunk-BCG45AQB.js";
|
|
2
5
|
import {
|
|
3
6
|
command,
|
|
4
7
|
subcommands
|
|
5
8
|
} from "./chunk-TXSA4Q3V.js";
|
|
6
9
|
import "./chunk-O7IGP7ZW.js";
|
|
7
|
-
import {
|
|
8
|
-
daemonFetch
|
|
9
|
-
} from "./chunk-RBNMDAKB.js";
|
|
10
10
|
import "./chunk-K3NQKI34.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/commands/chat/bridge.ts
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveMindName
|
|
4
4
|
} from "./chunk-BTY4WNFE.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-BCG45AQB.js";
|
|
5
8
|
import {
|
|
6
9
|
command,
|
|
7
10
|
subcommands
|
|
8
11
|
} from "./chunk-TXSA4Q3V.js";
|
|
9
12
|
import "./chunk-O7IGP7ZW.js";
|
|
10
|
-
import {
|
|
11
|
-
daemonFetch
|
|
12
|
-
} from "./chunk-RBNMDAKB.js";
|
|
13
13
|
import "./chunk-K3NQKI34.js";
|
|
14
14
|
|
|
15
15
|
// packages/cli/src/commands/chat/channels.ts
|
|
@@ -12,39 +12,39 @@ var cmd = subcommands({
|
|
|
12
12
|
commands: {
|
|
13
13
|
send: {
|
|
14
14
|
description: "Send a message",
|
|
15
|
-
run: (args) => import("./send-
|
|
15
|
+
run: (args) => import("./send-IHRJYNXA.js").then((m) => m.run(args))
|
|
16
16
|
},
|
|
17
17
|
list: {
|
|
18
18
|
description: "List conversations",
|
|
19
|
-
run: (args) => import("./list-
|
|
19
|
+
run: (args) => import("./list-PMUXZNAM.js").then((m) => m.run(args))
|
|
20
20
|
},
|
|
21
21
|
read: {
|
|
22
22
|
description: "Read conversation messages",
|
|
23
|
-
run: (args) => import("./read-
|
|
23
|
+
run: (args) => import("./read-YSWUXYL7.js").then((m) => m.run(args))
|
|
24
24
|
},
|
|
25
25
|
create: {
|
|
26
26
|
description: "Create a conversation",
|
|
27
|
-
run: (args) => import("./create-
|
|
27
|
+
run: (args) => import("./create-VIQVP3QB.js").then((m) => m.run(args))
|
|
28
28
|
},
|
|
29
29
|
bridge: {
|
|
30
30
|
description: "Manage platform bridges",
|
|
31
|
-
run: (args) => import("./bridge-
|
|
31
|
+
run: (args) => import("./bridge-3FNSWLNQ.js").then((m) => m.run(args))
|
|
32
32
|
},
|
|
33
33
|
channels: {
|
|
34
34
|
description: "Manage unrouted (gated) channels",
|
|
35
|
-
run: (args) => import("./channels-
|
|
35
|
+
run: (args) => import("./channels-SGQZHNQJ.js").then((m) => m.run(args))
|
|
36
36
|
},
|
|
37
37
|
files: {
|
|
38
38
|
description: "List pending incoming files",
|
|
39
|
-
run: (args) => import("./files-
|
|
39
|
+
run: (args) => import("./files-BVBRJJ2P.js").then((m) => m.run(args))
|
|
40
40
|
},
|
|
41
41
|
accept: {
|
|
42
42
|
description: "Accept a pending file",
|
|
43
|
-
run: (args) => import("./accept-
|
|
43
|
+
run: (args) => import("./accept-KYNC5X3U.js").then((m) => m.run(args))
|
|
44
44
|
},
|
|
45
45
|
reject: {
|
|
46
46
|
description: "Reject a pending file",
|
|
47
|
-
run: (args) => import("./reject-
|
|
47
|
+
run: (args) => import("./reject-SXGCYN4A.js").then((m) => m.run(args))
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
footer: "Use --mind <name> or VOLUTE_MIND to identify the mind."
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
logger_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RSBL3FAD.js";
|
|
8
8
|
import {
|
|
9
9
|
activity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P4LHVRNE.js";
|
|
11
11
|
|
|
12
12
|
// packages/daemon/src/lib/events/event-sequencer.ts
|
|
13
13
|
var BUFFER_SIZE = 1e3;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
LAUNCHD_PLIST_LABEL,
|
|
4
4
|
LAUNCHD_PLIST_PATH,
|
|
5
5
|
USER_SYSTEMD_UNIT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HCYQRME2.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveVoluteBin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DVN6DNMI.js";
|
|
10
10
|
|
|
11
11
|
// packages/daemon/src/lib/config/service-install.ts
|
|
12
12
|
import { execFile } from "child_process";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
broadcast
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3B427GUK.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RSBL3FAD.js";
|
|
8
8
|
import {
|
|
9
9
|
users
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P4LHVRNE.js";
|
|
11
11
|
|
|
12
12
|
// packages/daemon/src/lib/auth.ts
|
|
13
13
|
import { compareSync, hashSync } from "bcryptjs";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
pollHealthDown,
|
|
9
9
|
readDaemonConfig,
|
|
10
10
|
stopService
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HCYQRME2.js";
|
|
12
12
|
import {
|
|
13
13
|
voluteSystemDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RSBL3FAD.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/down.ts
|
|
17
17
|
import { existsSync, readFileSync, unlinkSync } from "fs";
|
|
@@ -82,6 +82,19 @@ function resolveDaemonUrl() {
|
|
|
82
82
|
if (session?.daemonUrl) return session.daemonUrl;
|
|
83
83
|
return buildUrl(readDaemonConfig());
|
|
84
84
|
}
|
|
85
|
+
function resolveWebUrl() {
|
|
86
|
+
if (process.env.VOLUTE_DAEMON_URL) return process.env.VOLUTE_DAEMON_URL;
|
|
87
|
+
const session = readCliSession();
|
|
88
|
+
if (session?.daemonUrl) return session.daemonUrl;
|
|
89
|
+
const config = readDaemonConfig();
|
|
90
|
+
const url = new URL(config.tls ? "https://localhost" : "http://localhost");
|
|
91
|
+
url.port = String(config.port);
|
|
92
|
+
let hostname = config.hostname || "localhost";
|
|
93
|
+
if (hostname === "0.0.0.0") hostname = "localhost";
|
|
94
|
+
if (hostname === "::") hostname = "localhost";
|
|
95
|
+
url.hostname = hostname;
|
|
96
|
+
return url.origin;
|
|
97
|
+
}
|
|
85
98
|
function getAuthToken() {
|
|
86
99
|
return process.env.VOLUTE_MIND_TOKEN ?? readCliSession()?.sessionId;
|
|
87
100
|
}
|
|
@@ -106,7 +119,7 @@ async function daemonFetch(path, options) {
|
|
|
106
119
|
headers,
|
|
107
120
|
dispatcher: daemonDispatcher
|
|
108
121
|
});
|
|
109
|
-
if (res.status === 401 && !path.startsWith("/api/auth/")) {
|
|
122
|
+
if (res.status === 401 && !path.startsWith("/api/auth/") && !path.startsWith("/api/setup/")) {
|
|
110
123
|
if (cliSession) {
|
|
111
124
|
console.error("Session expired. Run `volute login` again.");
|
|
112
125
|
} else {
|
|
@@ -128,6 +141,7 @@ export {
|
|
|
128
141
|
daemonDispatcher,
|
|
129
142
|
readSessionFile,
|
|
130
143
|
resolveDaemonUrl,
|
|
144
|
+
resolveWebUrl,
|
|
131
145
|
getAuthToken,
|
|
132
146
|
daemonFetch
|
|
133
147
|
};
|
|
@@ -3,23 +3,31 @@ import {
|
|
|
3
3
|
command
|
|
4
4
|
} from "./chunk-TXSA4Q3V.js";
|
|
5
5
|
import {
|
|
6
|
+
daemonLogReport,
|
|
6
7
|
getServiceMode,
|
|
7
8
|
modeLabel,
|
|
8
9
|
pollHealth,
|
|
9
10
|
startService
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HCYQRME2.js";
|
|
11
12
|
import {
|
|
12
13
|
readGlobalConfig
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NJHN6IRB.js";
|
|
14
15
|
import {
|
|
15
16
|
voluteHome,
|
|
16
17
|
voluteSystemDir
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RSBL3FAD.js";
|
|
18
19
|
|
|
19
20
|
// src/commands/up.ts
|
|
20
21
|
import { spawn } from "child_process";
|
|
21
22
|
import { existsSync, mkdirSync, openSync, readFileSync } from "fs";
|
|
22
23
|
import { dirname, resolve } from "path";
|
|
24
|
+
function formatStartupFailure(exit, timeoutMs) {
|
|
25
|
+
if (exit) {
|
|
26
|
+
const cause = exit.signal ? `signal ${exit.signal}` : `exit code ${exit.code}`;
|
|
27
|
+
return `Daemon exited (${cause}) before becoming healthy.`;
|
|
28
|
+
}
|
|
29
|
+
return `Daemon started but did not become healthy within ${Math.round(timeoutMs / 1e3)}s.`;
|
|
30
|
+
}
|
|
23
31
|
var cmd = command({
|
|
24
32
|
name: "volute up",
|
|
25
33
|
description: "Start the daemon",
|
|
@@ -47,6 +55,7 @@ var cmd = command({
|
|
|
47
55
|
console.log(`Volute daemon running on ${h}:${p}`);
|
|
48
56
|
} else {
|
|
49
57
|
console.error("Service started but daemon did not become healthy within 30s.");
|
|
58
|
+
for (const line of daemonLogReport(mode)) console.error(line);
|
|
50
59
|
process.exit(1);
|
|
51
60
|
}
|
|
52
61
|
return;
|
|
@@ -123,11 +132,20 @@ var cmd = command({
|
|
|
123
132
|
detached: true
|
|
124
133
|
});
|
|
125
134
|
child.unref();
|
|
135
|
+
child.on("error", (err) => {
|
|
136
|
+
console.error(`Failed to launch daemon: ${err.message}`);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
});
|
|
139
|
+
let exitInfo = null;
|
|
140
|
+
child.on("exit", (code, signal) => {
|
|
141
|
+
exitInfo = { code, signal };
|
|
142
|
+
});
|
|
126
143
|
const pollPort = useTailscale ? port + 1 : port;
|
|
127
144
|
const url = `http://localhost:${pollPort}/api/health`;
|
|
128
145
|
const maxWait = 3e4;
|
|
129
146
|
const start = Date.now();
|
|
130
147
|
while (Date.now() - start < maxWait) {
|
|
148
|
+
if (exitInfo) break;
|
|
131
149
|
try {
|
|
132
150
|
const res = await fetch(url);
|
|
133
151
|
if (res.ok) {
|
|
@@ -143,7 +161,7 @@ var cmd = command({
|
|
|
143
161
|
}
|
|
144
162
|
await new Promise((r) => setTimeout(r, 500));
|
|
145
163
|
}
|
|
146
|
-
if (child.pid) {
|
|
164
|
+
if (!exitInfo && child.pid) {
|
|
147
165
|
try {
|
|
148
166
|
process.kill(-child.pid, "SIGTERM");
|
|
149
167
|
} catch {
|
|
@@ -153,13 +171,15 @@ var cmd = command({
|
|
|
153
171
|
}
|
|
154
172
|
}
|
|
155
173
|
}
|
|
156
|
-
|
|
157
|
-
console.error(
|
|
174
|
+
const exited = exitInfo;
|
|
175
|
+
console.error(formatStartupFailure(exited, maxWait));
|
|
176
|
+
for (const line of daemonLogReport(mode)) console.error(line);
|
|
158
177
|
process.exit(1);
|
|
159
178
|
}
|
|
160
179
|
});
|
|
161
180
|
var run = cmd.execute;
|
|
162
181
|
|
|
163
182
|
export {
|
|
183
|
+
formatStartupFailure,
|
|
164
184
|
run
|
|
165
185
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// packages/daemon/src/lib/util/paths.ts
|
|
4
|
+
import { resolve, sep } from "path";
|
|
5
|
+
var PathTraversalError = class extends Error {
|
|
6
|
+
constructor(base, userPath) {
|
|
7
|
+
super(`Path "${userPath}" escapes base directory "${base}"`);
|
|
8
|
+
this.name = "PathTraversalError";
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
function resolveWithinBase(base, userPath) {
|
|
12
|
+
const resolvedBase = resolve(base);
|
|
13
|
+
const target = resolve(resolvedBase, userPath);
|
|
14
|
+
if (target !== resolvedBase && !target.startsWith(resolvedBase + sep)) {
|
|
15
|
+
throw new PathTraversalError(base, userPath);
|
|
16
|
+
}
|
|
17
|
+
return target;
|
|
18
|
+
}
|
|
19
|
+
function safeResolveWithinBase(base, userPath) {
|
|
20
|
+
try {
|
|
21
|
+
return resolveWithinBase(base, userPath);
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
safeResolveWithinBase
|
|
29
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getMindManager
|
|
4
|
+
} from "./chunk-QQBOI3QA.js";
|
|
5
|
+
import {
|
|
6
|
+
chownMindDir,
|
|
7
|
+
gitExec
|
|
8
|
+
} from "./chunk-DVN6DNMI.js";
|
|
9
|
+
import {
|
|
10
|
+
logger_default
|
|
11
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
12
|
+
import {
|
|
13
|
+
deleteMindDbFootprint,
|
|
14
|
+
mindDir,
|
|
15
|
+
readAllMinds,
|
|
16
|
+
removeMind
|
|
17
|
+
} from "./chunk-RSBL3FAD.js";
|
|
18
|
+
|
|
19
|
+
// packages/daemon/src/lib/mind/variant-cleanup.ts
|
|
20
|
+
import { existsSync, readdirSync, rmSync, statSync } from "fs";
|
|
21
|
+
import { resolve } from "path";
|
|
22
|
+
async function cleanupVariant(variantName, projectRoot, variantPath, opts) {
|
|
23
|
+
if (opts?.stop) {
|
|
24
|
+
try {
|
|
25
|
+
await getMindManager().stopMind(variantName);
|
|
26
|
+
} catch (err) {
|
|
27
|
+
logger_default.warn(`failed to stop variant ${variantName}`, logger_default.errorData(err));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const { findMind } = await import("./registry-3ELJPUGJ.js");
|
|
31
|
+
const variantEntry = await findMind(variantName);
|
|
32
|
+
const branchName = variantEntry?.branch ?? variantName;
|
|
33
|
+
if (existsSync(variantPath)) {
|
|
34
|
+
try {
|
|
35
|
+
await gitExec(["worktree", "remove", "--force", variantPath], { cwd: projectRoot });
|
|
36
|
+
} catch {
|
|
37
|
+
rmSync(variantPath, { recursive: true, force: true });
|
|
38
|
+
try {
|
|
39
|
+
await gitExec(["worktree", "prune"], { cwd: projectRoot });
|
|
40
|
+
} catch (err) {
|
|
41
|
+
logger_default.warn(`failed to prune worktrees for ${variantName}`, logger_default.errorData(err));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
await gitExec(["branch", "-D", branchName], { cwd: projectRoot });
|
|
47
|
+
} catch (err) {
|
|
48
|
+
logger_default.warn(`failed to delete branch ${branchName} for ${variantName}`, logger_default.errorData(err));
|
|
49
|
+
}
|
|
50
|
+
const baseName = variantEntry?.parent ?? variantName;
|
|
51
|
+
try {
|
|
52
|
+
await removeMind(variantName);
|
|
53
|
+
} catch (err) {
|
|
54
|
+
logger_default.warn(`failed to remove variant ${variantName} from DB`, logger_default.errorData(err));
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
await deleteMindDbFootprint(variantName);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
logger_default.warn(`failed to purge DB footprint for variant ${variantName}`, logger_default.errorData(err));
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
await chownMindDir(projectRoot, baseName);
|
|
63
|
+
} catch (err) {
|
|
64
|
+
logger_default.error(
|
|
65
|
+
`failed to fix ownership during variant cleanup for ${variantName}`,
|
|
66
|
+
logger_default.errorData(err)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async function reconcileVariants() {
|
|
71
|
+
const all = await readAllMinds();
|
|
72
|
+
const variants = all.filter((e) => e.parent);
|
|
73
|
+
const bases = all.filter((e) => !e.parent);
|
|
74
|
+
const baseDir = (name) => bases.find((b) => b.name === name)?.dir ?? mindDir(name);
|
|
75
|
+
for (const v of variants) {
|
|
76
|
+
if (v.dir && existsSync(v.dir)) continue;
|
|
77
|
+
logger_default.warn(
|
|
78
|
+
`reconcile: dropping stale variant row ${v.name} (worktree ${v.dir ?? "<none>"} missing)`
|
|
79
|
+
);
|
|
80
|
+
try {
|
|
81
|
+
await cleanupVariant(v.name, baseDir(v.parent), v.dir ?? "");
|
|
82
|
+
} catch (err) {
|
|
83
|
+
logger_default.warn(`reconcile: failed to drop stale variant ${v.name}`, logger_default.errorData(err));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const knownDirs = new Set(variants.map((v) => v.dir).filter((d) => Boolean(d)));
|
|
87
|
+
for (const base of bases) {
|
|
88
|
+
const variantsDir = resolve(base.dir ?? mindDir(base.name), ".variants");
|
|
89
|
+
if (!existsSync(variantsDir)) continue;
|
|
90
|
+
let entries;
|
|
91
|
+
try {
|
|
92
|
+
entries = readdirSync(variantsDir);
|
|
93
|
+
} catch (err) {
|
|
94
|
+
logger_default.warn(`reconcile: failed to read ${variantsDir}`, logger_default.errorData(err));
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
for (const name of entries) {
|
|
98
|
+
const full = resolve(variantsDir, name);
|
|
99
|
+
if (knownDirs.has(full)) continue;
|
|
100
|
+
try {
|
|
101
|
+
if (statSync(full).isDirectory()) {
|
|
102
|
+
logger_default.warn(`reconcile: orphaned variant worktree on disk with no registry row: ${full}`);
|
|
103
|
+
}
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
cleanupVariant,
|
|
112
|
+
reconcileVariants
|
|
113
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
logger_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
5
5
|
import {
|
|
6
6
|
mindDir
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RSBL3FAD.js";
|
|
8
8
|
|
|
9
9
|
// packages/daemon/src/lib/delivery/delivery-router.ts
|
|
10
10
|
import { readFileSync, statSync } from "fs";
|
|
@@ -146,6 +146,9 @@ function resolveRoute(config, meta) {
|
|
|
146
146
|
}
|
|
147
147
|
return { destination: "mind", session: fallback, matched: false };
|
|
148
148
|
}
|
|
149
|
+
function shouldGate(config, route) {
|
|
150
|
+
return route.destination === "mind" && !route.matched && config.gateUnmatched !== false;
|
|
151
|
+
}
|
|
149
152
|
var DEFAULT_BATCH_DEBOUNCE = 5;
|
|
150
153
|
var DEFAULT_BATCH_MAX_WAIT = 120;
|
|
151
154
|
function normalizeBatchConfig(batch) {
|
|
@@ -217,5 +220,6 @@ export {
|
|
|
217
220
|
getRoutingConfig,
|
|
218
221
|
clearConfigCache,
|
|
219
222
|
resolveRoute,
|
|
223
|
+
shouldGate,
|
|
220
224
|
resolveDeliveryMode
|
|
221
225
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
setBridgeConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MG3Z34YE.js";
|
|
5
5
|
import {
|
|
6
6
|
readEnv,
|
|
7
7
|
sharedEnvPath,
|
|
8
8
|
writeEnv
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PY24ZL62.js";
|
|
10
10
|
|
|
11
11
|
// packages/daemon/src/lib/template/import-utils.ts
|
|
12
12
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -1,45 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
safeResolveWithinBase
|
|
4
|
+
} from "./chunk-DW4TRDOZ.js";
|
|
2
5
|
import {
|
|
3
6
|
readVoluteConfig
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WCFSBH33.js";
|
|
5
8
|
import {
|
|
6
9
|
logger_default
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
8
11
|
import {
|
|
9
12
|
mindDir,
|
|
10
13
|
readAllMinds,
|
|
11
14
|
voluteHome
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RSBL3FAD.js";
|
|
13
16
|
|
|
14
17
|
// packages/daemon/src/lib/util/avatar-image.ts
|
|
15
18
|
import { readdir, readFile, writeFile } from "fs/promises";
|
|
16
|
-
import { extname, resolve
|
|
17
|
-
|
|
18
|
-
// packages/daemon/src/lib/util/paths.ts
|
|
19
|
-
import { resolve, sep } from "path";
|
|
20
|
-
var PathTraversalError = class extends Error {
|
|
21
|
-
constructor(base, userPath) {
|
|
22
|
-
super(`Path "${userPath}" escapes base directory "${base}"`);
|
|
23
|
-
this.name = "PathTraversalError";
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
function resolveWithinBase(base, userPath) {
|
|
27
|
-
const resolvedBase = resolve(base);
|
|
28
|
-
const target = resolve(resolvedBase, userPath);
|
|
29
|
-
if (target !== resolvedBase && !target.startsWith(resolvedBase + sep)) {
|
|
30
|
-
throw new PathTraversalError(base, userPath);
|
|
31
|
-
}
|
|
32
|
-
return target;
|
|
33
|
-
}
|
|
34
|
-
function safeResolveWithinBase(base, userPath) {
|
|
35
|
-
try {
|
|
36
|
-
return resolveWithinBase(base, userPath);
|
|
37
|
-
} catch {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// packages/daemon/src/lib/util/avatar-image.ts
|
|
19
|
+
import { extname, resolve } from "path";
|
|
43
20
|
var alog = logger_default.child("avatar-image");
|
|
44
21
|
var AVATAR_DIM = 256;
|
|
45
22
|
var AVATAR_CONTEXT_DIM = 128;
|
|
@@ -96,10 +73,10 @@ async function downscaleFile(sharp, filePath) {
|
|
|
96
73
|
async function migrateAvatarSizes() {
|
|
97
74
|
const sharp = await loadSharp();
|
|
98
75
|
if (!sharp) return;
|
|
99
|
-
const userAvatarsDir =
|
|
76
|
+
const userAvatarsDir = resolve(voluteHome(), "avatars");
|
|
100
77
|
let userAvatars = [];
|
|
101
78
|
try {
|
|
102
|
-
userAvatars = (await readdir(userAvatarsDir)).map((f) =>
|
|
79
|
+
userAvatars = (await readdir(userAvatarsDir)).map((f) => resolve(userAvatarsDir, f));
|
|
103
80
|
} catch {
|
|
104
81
|
}
|
|
105
82
|
const mindAvatars = [];
|
|
@@ -108,7 +85,7 @@ async function migrateAvatarSizes() {
|
|
|
108
85
|
const dir = mind.dir ?? mindDir(mind.name);
|
|
109
86
|
const avatar = readVoluteConfig(dir)?.profile?.avatar;
|
|
110
87
|
if (!avatar) continue;
|
|
111
|
-
const path = safeResolveWithinBase(
|
|
88
|
+
const path = safeResolveWithinBase(resolve(dir, "home"), avatar);
|
|
112
89
|
if (path) mindAvatars.push(path);
|
|
113
90
|
}
|
|
114
91
|
} catch (err) {
|
|
@@ -154,7 +131,6 @@ async function renderAvatarBlock(filePath, label) {
|
|
|
154
131
|
}
|
|
155
132
|
|
|
156
133
|
export {
|
|
157
|
-
safeResolveWithinBase,
|
|
158
134
|
AVATAR_DIM,
|
|
159
135
|
AVATAR_CONTEXT_DIM,
|
|
160
136
|
MAX_AVATAR_BLOCK_BYTES,
|