volute 0.48.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 +79 -328
- package/dist/{activity-events-MIOK3IOU.js → activity-events-GJJAI2WT.js} +4 -4
- package/dist/{ai-service-643TNFPH.js → ai-service-A7FS7EC3.js} +5 -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-Y45R7LW5.js → avatar-image-6ATV2IOZ.js} +4 -4
- package/dist/{backup-UDH4GMSW.js → backup-XYAMT4CU.js} +15 -15
- package/dist/{chat-X43VYHH2.js → chat-OGXAEXMV.js} +2 -2
- package/dist/{chunk-LTLFOSA4.js → chunk-3B427GUK.js} +3 -3
- package/dist/{chunk-XVBSFLM7.js → chunk-4B62E4CG.js} +2 -2
- package/dist/{chunk-ODDGGLM6.js → chunk-4DSGN4FL.js} +3 -3
- package/dist/{chunk-PJVPDY2Z.js → chunk-6HGEZJDH.js} +2 -2
- package/dist/{chunk-MJRXFUMS.js → chunk-DAIIMBLB.js} +3 -3
- package/dist/{chunk-DGGZVZTM.js → chunk-DVN6DNMI.js} +1 -1
- package/dist/chunk-EADX54RG.js +113 -0
- package/dist/{chunk-EIQDZC43.js → chunk-EFT2OALG.js} +6 -2
- package/dist/{chunk-OQJMTHEH.js → chunk-EG5LSKHU.js} +2 -2
- package/dist/{chunk-WQ46E33M.js → chunk-FBBS4BVR.js} +2 -2
- package/dist/{chunk-HUNDXZBZ.js → chunk-GWVFDUNB.js} +45 -14
- package/dist/{chunk-FJ2MZ5PH.js → chunk-HCYQRME2.js} +2 -2
- package/dist/{chunk-T4VS7UDW.js → chunk-IH5TKXX6.js} +9 -9
- package/dist/{chunk-Q7HOAVFR.js → chunk-JBIFXB6I.js} +4 -4
- package/dist/{chunk-WARH6GIV.js → chunk-JCBPU57A.js} +12 -10
- package/dist/{chunk-VZRA5TYO.js → chunk-JCWB2ITW.js} +2 -2
- package/dist/{chunk-MOERAQXH.js → chunk-JPGHSXSV.js} +18 -25
- package/dist/{chunk-USD45JKR.js → chunk-K3JOLGWF.js} +7 -7
- 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-5KXCM5AW.js → chunk-NJHN6IRB.js} +9 -1
- package/dist/{chunk-2OIYNHWO.js → chunk-NOIAHMJB.js} +1 -1
- package/dist/{chunk-2MJ7EOMT.js → chunk-P4LHVRNE.js} +1 -0
- package/dist/{chunk-IJPMIEVE.js → chunk-PY24ZL62.js} +1 -1
- package/dist/{chunk-VB2QXUJQ.js → chunk-QQBOI3QA.js} +202 -117
- package/dist/{chunk-T2TP6ZC6.js → chunk-QUSMYGNQ.js} +6 -0
- package/dist/{chunk-WW6C3PLV.js → chunk-RSBL3FAD.js} +39 -6
- package/dist/{chunk-YKA7DCVW.js → chunk-SX72DOO3.js} +1 -1
- package/dist/{chunk-4FCL4DVZ.js → chunk-TXJL36ZQ.js} +2 -2
- package/dist/{chunk-HNGFKPNS.js → chunk-VIUH5CHQ.js} +55 -23
- package/dist/{chunk-HPGN6XRT.js → chunk-VNRSXEBF.js} +4 -4
- package/dist/{chunk-IYCV34IU.js → chunk-XTEKINWG.js} +3 -3
- package/dist/{chunk-YNBXEQAP.js → chunk-YIJGKHIS.js} +3 -3
- package/dist/{chunk-MTRMQFCQ.js → chunk-ZX46PGCC.js} +2 -2
- package/dist/cli.js +20 -20
- package/dist/{clock-CNRF6F7T.js → clock-6JZL2FS6.js} +2 -2
- package/dist/{cloud-sync-WHKCB4CD.js → cloud-sync-VFDTNNCA.js} +20 -20
- package/dist/{conversations-C7IKYSHD.js → conversations-TUM5PJJ4.js} +5 -5
- package/dist/{create-GJKHABJB.js → create-Z5FSDNVZ.js} +1 -1
- package/dist/{daemon-restart-7KUHVZIN.js → daemon-restart-54L4B6AQ.js} +7 -7
- package/dist/daemon.js +647 -410
- package/dist/{db-FO6LXYCW.js → db-F6UMFRYD.js} +2 -2
- package/dist/delivery-manager-RBXBPVWM.js +36 -0
- package/dist/{delivery-router-3QFG2ZEX.js → delivery-router-VUOL5YSA.js} +8 -6
- package/dist/{down-G6IADJXV.js → down-6X7KX7BZ.js} +5 -5
- package/dist/echo-text-B6NZ5FGE.js +36 -0
- package/dist/{env-6TGPO5WG.js → env-KUL4XKN2.js} +3 -3
- package/dist/{exec-QIFYZG4C.js → exec-FBXA3CM4.js} +3 -3
- package/dist/{export-C2K3NIRD.js → export-TNBPDH77.js} +3 -3
- package/dist/{extensions-GEKF47A4.js → extensions-AWNO3SZF.js} +20 -20
- package/dist/{files-LXQSQOFG.js → files-BVBRJJ2P.js} +3 -3
- package/dist/{import-SX3ZXHB4.js → import-ZUNKMCKC.js} +7 -7
- package/dist/{isolation-MCT4ZYLT.js → isolation-OPCZQRTH.js} +3 -3
- package/dist/{login-CL4IT2ED.js → login-KAKNFCW5.js} +6 -6
- package/dist/{logout-HZYJCYCA.js → logout-RLT62RQP.js} +2 -2
- package/dist/message-delivery-ABPV76EA.js +42 -0
- package/dist/{mind-46AOK373.js → mind-IF6CGMFW.js} +12 -12
- package/dist/{mind-activity-tracker-YVZPC4A5.js → mind-activity-tracker-YMMERB6B.js} +5 -5
- package/dist/mind-service-42GDO4KH.js +44 -0
- package/dist/{mind-sleep-DV7KP255.js → mind-sleep-VBV7YRSU.js} +2 -2
- package/dist/{notices-2KU5NTRY.js → notices-N6BCGHFV.js} +4 -4
- package/dist/{package-RTN2PS7O.js → package-PD67VPHB.js} +5 -4
- package/dist/prompts-MDHDLWEX.js +24 -0
- package/dist/{registry-UMMDRPRM.js → registry-3ELJPUGJ.js} +6 -2
- package/dist/{sandbox-5VQ454XP.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-F2HXZQU4.js → seed-NQED7PSX.js} +1 -1
- package/dist/{seed-cmd-MLCTGSX5.js → seed-cmd-QF3F2G4S.js} +2 -2
- package/dist/{seed-create-KQ7OILWB.js → seed-create-XOO4N2OE.js} +3 -3
- package/dist/{seed-readiness-RBPGOLSZ.js → seed-readiness-3LRYASA4.js} +5 -5
- package/dist/{seed-sprout-HVYCFJLA.js → seed-sprout-HSBBGSS2.js} +11 -11
- package/dist/{send-TD2X5U3K.js → send-IHRJYNXA.js} +6 -6
- package/dist/{service-CVZMQYK6.js → service-YCOPCTSZ.js} +4 -4
- package/dist/{service-install-VCRMFWX5.js → service-install-Y46OTF55.js} +5 -5
- package/dist/{setup-AE4CVUC4.js → setup-F4TE64YI.js} +7 -7
- package/dist/{setup-5ECWTYKG.js → setup-TCN7VH5U.js} +5 -3
- package/dist/skills/volute-mind/SKILL.md +3 -3
- package/dist/skills/volute-mind/references/routing.md +6 -5
- package/dist/skills/volute-mind/references/variants.md +48 -14
- package/dist/{skills-B3SVDCEB.js → skills-NN5UZCUU.js} +8 -6
- package/dist/sleep-manager-DSPXFHGX.js +38 -0
- package/dist/spirit-SSJMYC6A.js +31 -0
- package/dist/{split-SKZ4Y2D6.js → split-JF2VWTXA.js} +4 -1
- package/dist/{sprout-KQ43BWZJ.js → sprout-AXA2SECQ.js} +1 -1
- package/dist/{status-F4PGREUU.js → status-VJGXMQ4L.js} +5 -5
- package/dist/system-chat-M2XOBKEM.js +40 -0
- package/dist/{systems-JJNGQHAO.js → systems-5MH2ELQE.js} +2 -2
- 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-KLPV3PAU.js → turn-tracker-JQ2YUUY2.js} +7 -7
- package/dist/{up-RVGDE6CQ.js → up-SDLTLPAO.js} +6 -6
- package/dist/{update-OXQEGGXD.js → update-WEA4N2TR.js} +5 -5
- package/dist/{update-check-266R4ZSY.js → update-check-DZOTONII.js} +3 -3
- package/dist/variant-cleanup-P4MBNLJD.js +33 -0
- package/dist/{version-notify-73YURTFR.js → version-notify-WFA5XB5A.js} +23 -23
- 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 +5 -4
- 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/claude/src/agent.ts +1 -1
- package/templates/claude/src/lib/hooks/identity-reload.ts +12 -3
- package/templates/pi/src/lib/event-handler.ts +47 -6
- package/dist/delivery-manager-HZTT5SJR.js +0 -36
- package/dist/echo-text-H3SH337Q.js +0 -36
- package/dist/message-delivery-GPQ5SE5N.js +0 -40
- package/dist/mind-service-2ARGJNKP.js +0 -44
- package/dist/scheduler-I7JZCT47.js +0 -34
- package/dist/sleep-manager-Z27R3WTW.js +0 -38
- package/dist/spirit-WXS3HCLN.js +0 -25
- package/dist/system-chat-63ABFF6V.js +0 -40
- package/dist/web-assets/assets/index-WdZ60R6c.css +0 -1
- package/dist/web-assets/assets/index-taX6Ezfa.js +0 -92
- package/dist/{env-C7Z55QCJ.js → env-ZYMSCB7B.js} +5 -5
- package/dist/{login-ARRZ4ORJ.js → login-LKNLCJPA.js} +3 -3
- package/dist/{mind-contacts-GV7XYL5D.js → mind-contacts-BKUFPUCU.js} +6 -6
- package/dist/{mind-history-TTGA5BHZ.js → mind-history-WI5OI3BW.js} +4 -4
- package/dist/{register-42VBJKTP.js → register-TWQDKQRT.js} +3 -3
- package/dist/{restart-YYEGZJDD.js → restart-5F5QDBOG.js} +4 -4
- package/dist/{skill-UUM4JZRF.js → skill-4CYJLYVY.js} +4 -4
- package/dist/{src-WLJE73NP.js → src-ZN4LXMPI.js} +3 -3
- package/dist/{start-O6UKK7BG.js → start-BTVMTP3K.js} +3 -3
- package/dist/{stop-UBX6X5RA.js → stop-YORESK4U.js} +4 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
stopDaemon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6HGEZJDH.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
promptLine,
|
|
7
|
+
promptPassword
|
|
8
|
+
} from "./chunk-VHWGEJ4V.js";
|
|
9
9
|
import {
|
|
10
10
|
daemonFetch
|
|
11
11
|
} from "./chunk-BCG45AQB.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
getClient,
|
|
14
|
+
urlOf
|
|
15
|
+
} from "./chunk-LOPXTW6H.js";
|
|
16
16
|
import {
|
|
17
17
|
command,
|
|
18
18
|
subcommands
|
|
@@ -22,28 +22,28 @@ 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);
|
|
@@ -12,7 +12,7 @@ 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",
|
|
@@ -36,7 +36,7 @@ var cmd = subcommands({
|
|
|
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",
|
|
@@ -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";
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
modeLabel,
|
|
9
9
|
pollHealth,
|
|
10
10
|
startService
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HCYQRME2.js";
|
|
12
12
|
import {
|
|
13
13
|
readGlobalConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NJHN6IRB.js";
|
|
15
15
|
import {
|
|
16
16
|
voluteHome,
|
|
17
17
|
voluteSystemDir
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RSBL3FAD.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/up.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -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";
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
} from "./chunk-WCFSBH33.js";
|
|
8
8
|
import {
|
|
9
9
|
logger_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
11
11
|
import {
|
|
12
12
|
mindDir,
|
|
13
13
|
readAllMinds,
|
|
14
14
|
voluteHome
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RSBL3FAD.js";
|
|
16
16
|
|
|
17
17
|
// packages/daemon/src/lib/util/avatar-image.ts
|
|
18
18
|
import { readdir, readFile, writeFile } from "fs/promises";
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
exec,
|
|
4
4
|
gitExec
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DVN6DNMI.js";
|
|
6
6
|
import {
|
|
7
7
|
readGlobalConfig,
|
|
8
8
|
writeGlobalConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NJHN6IRB.js";
|
|
10
10
|
import {
|
|
11
11
|
logger_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getDb,
|
|
15
15
|
mindDir,
|
|
16
16
|
readRegistry,
|
|
17
17
|
voluteHome
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RSBL3FAD.js";
|
|
19
19
|
import {
|
|
20
20
|
sharedSkills
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-P4LHVRNE.js";
|
|
22
22
|
|
|
23
23
|
// packages/daemon/src/lib/skills.ts
|
|
24
24
|
import { createHash } from "crypto";
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
mkdirSync,
|
|
29
29
|
readdirSync,
|
|
30
30
|
readFileSync,
|
|
31
|
+
renameSync,
|
|
31
32
|
rmSync,
|
|
32
33
|
writeFileSync
|
|
33
34
|
} from "fs";
|
|
@@ -46,7 +47,7 @@ async function initDefaultSkills() {
|
|
|
46
47
|
const config = readGlobalConfig();
|
|
47
48
|
let extensionSkills = [];
|
|
48
49
|
try {
|
|
49
|
-
const { getExtensionStandardSkills } = await import("./extensions-
|
|
50
|
+
const { getExtensionStandardSkills } = await import("./extensions-AWNO3SZF.js");
|
|
50
51
|
extensionSkills = getExtensionStandardSkills();
|
|
51
52
|
} catch (err) {
|
|
52
53
|
logger_default.warn("failed to load extension standard skills during init", logger_default.errorData(err));
|
|
@@ -185,9 +186,12 @@ function mindSkillsDir(dir) {
|
|
|
185
186
|
}
|
|
186
187
|
return resolve(home, subdir);
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
+
function mindSkillsSubdir(dir) {
|
|
189
190
|
const home = resolve(dir, "home");
|
|
190
|
-
return
|
|
191
|
+
return mindSkillsDir(dir).slice(home.length + 1);
|
|
192
|
+
}
|
|
193
|
+
function relSkillsPath(dir) {
|
|
194
|
+
return join("home", mindSkillsSubdir(dir));
|
|
191
195
|
}
|
|
192
196
|
function readUpstream(skillDir) {
|
|
193
197
|
const upstreamPath = join(skillDir, ".upstream.json");
|
|
@@ -453,9 +457,7 @@ exec node ${skillScriptPath} "$@"
|
|
|
453
457
|
exec bash ${skillScriptPath} "$@"
|
|
454
458
|
`;
|
|
455
459
|
}
|
|
456
|
-
function installHookShims(dir, skillId, hooks) {
|
|
457
|
-
const home = resolve(dir, "home");
|
|
458
|
-
const skillsSubdir = mindSkillsDir(dir).slice(home.length + 1);
|
|
460
|
+
function installHookShims(dir, skillId, hooks, skillsSubdir = mindSkillsSubdir(dir)) {
|
|
459
461
|
for (const [event, scriptPath] of Object.entries(hooks)) {
|
|
460
462
|
const eventDir = join(dir, "home", ".local", "hooks", event);
|
|
461
463
|
mkdirSync(eventDir, { recursive: true });
|
|
@@ -498,9 +500,7 @@ function binShimOwner(shimPath) {
|
|
|
498
500
|
const line = readFileSync(shimPath, "utf-8").split("\n").find((l) => l.startsWith(BIN_SHIM_MARKER));
|
|
499
501
|
return line?.slice(BIN_SHIM_MARKER.length).trim() || void 0;
|
|
500
502
|
}
|
|
501
|
-
function installBinShim(dir, skillId, scriptPath) {
|
|
502
|
-
const home = resolve(dir, "home");
|
|
503
|
-
const skillsSubdir = mindSkillsDir(dir).slice(home.length + 1);
|
|
503
|
+
function installBinShim(dir, skillId, scriptPath, skillsSubdir = mindSkillsSubdir(dir)) {
|
|
504
504
|
const binDir = join(dir, "home", ".local", "bin");
|
|
505
505
|
mkdirSync(binDir, { recursive: true });
|
|
506
506
|
const cmdName = binCommandName(scriptPath);
|
|
@@ -520,6 +520,36 @@ function removeBinShim(dir, scriptPath) {
|
|
|
520
520
|
const shimPath = join(dir, "home", ".local", "bin", cmdName);
|
|
521
521
|
if (existsSync(shimPath)) rmSync(shimPath);
|
|
522
522
|
}
|
|
523
|
+
function migrateSkillsToTemplate(dir, oldTemplate, newTemplate) {
|
|
524
|
+
const home = resolve(dir, "home");
|
|
525
|
+
const oldSubdir = TEMPLATE_SKILLS_DIR[oldTemplate] ?? TEMPLATE_SKILLS_DIR.claude;
|
|
526
|
+
const newSubdir = TEMPLATE_SKILLS_DIR[newTemplate] ?? TEMPLATE_SKILLS_DIR.claude;
|
|
527
|
+
if (oldSubdir === newSubdir) return [];
|
|
528
|
+
const oldDir = resolve(home, oldSubdir);
|
|
529
|
+
const newDir = resolve(home, newSubdir);
|
|
530
|
+
if (!existsSync(oldDir)) return [];
|
|
531
|
+
const skillIds = readdirSync(oldDir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
|
|
532
|
+
const migrated = [];
|
|
533
|
+
if (skillIds.length > 0) {
|
|
534
|
+
mkdirSync(newDir, { recursive: true });
|
|
535
|
+
for (const skillId of skillIds) {
|
|
536
|
+
const from = join(oldDir, skillId);
|
|
537
|
+
const to = join(newDir, skillId);
|
|
538
|
+
if (existsSync(to)) rmSync(to, { recursive: true, force: true });
|
|
539
|
+
renameSync(from, to);
|
|
540
|
+
removeHookShims(dir, skillId);
|
|
541
|
+
const skillMdPath = join(to, "SKILL.md");
|
|
542
|
+
if (existsSync(skillMdPath)) {
|
|
543
|
+
const { hooks, bin } = parseSkillMd(readFileSync(skillMdPath, "utf-8"));
|
|
544
|
+
installHookShims(dir, skillId, hooks, newSubdir);
|
|
545
|
+
if (bin) installBinShim(dir, skillId, bin, newSubdir);
|
|
546
|
+
}
|
|
547
|
+
migrated.push(skillId);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
rmSync(oldDir, { recursive: true, force: true });
|
|
551
|
+
return migrated;
|
|
552
|
+
}
|
|
523
553
|
function listFilesRecursive(dir, prefix = "") {
|
|
524
554
|
const results = [];
|
|
525
555
|
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
@@ -641,6 +671,7 @@ export {
|
|
|
641
671
|
removeHookShims,
|
|
642
672
|
installBinShim,
|
|
643
673
|
removeBinShim,
|
|
674
|
+
migrateSkillsToTemplate,
|
|
644
675
|
listFilesRecursive,
|
|
645
676
|
findSkillsRoot,
|
|
646
677
|
hashSkillDir,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
exec,
|
|
4
4
|
execInherit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DVN6DNMI.js";
|
|
6
6
|
import {
|
|
7
7
|
voluteSystemDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RSBL3FAD.js";
|
|
9
9
|
|
|
10
10
|
// packages/daemon/src/lib/config/service-mode.ts
|
|
11
11
|
import { execFileSync } from "child_process";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findBridgeForChannel,
|
|
4
4
|
getBridgeConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MG3Z34YE.js";
|
|
6
6
|
import {
|
|
7
7
|
recordOutbound
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QQBOI3QA.js";
|
|
9
9
|
import {
|
|
10
10
|
publish
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-K3JOLGWF.js";
|
|
12
12
|
import {
|
|
13
13
|
getOrCreateMindUser,
|
|
14
14
|
getUserByUsername
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4DSGN4FL.js";
|
|
16
16
|
import {
|
|
17
17
|
addMessage,
|
|
18
18
|
findDMConversation,
|
|
@@ -20,27 +20,27 @@ import {
|
|
|
20
20
|
getChannelName,
|
|
21
21
|
getConversation,
|
|
22
22
|
getParticipants
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VNRSXEBF.js";
|
|
24
24
|
import {
|
|
25
25
|
readVoluteConfig
|
|
26
26
|
} from "./chunk-WCFSBH33.js";
|
|
27
27
|
import {
|
|
28
28
|
daemonConfigPath,
|
|
29
29
|
readDaemonToken
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HCYQRME2.js";
|
|
31
31
|
import {
|
|
32
32
|
readEnv,
|
|
33
33
|
sharedEnvPath
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-PY24ZL62.js";
|
|
35
35
|
import {
|
|
36
36
|
logger_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
38
38
|
import {
|
|
39
39
|
buildVoluteSlug
|
|
40
40
|
} from "./chunk-LGNUFVMR.js";
|
|
41
41
|
import {
|
|
42
42
|
mindDir
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-RSBL3FAD.js";
|
|
44
44
|
import {
|
|
45
45
|
__export
|
|
46
46
|
} from "./chunk-K3NQKI34.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
exec
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DVN6DNMI.js";
|
|
5
5
|
import {
|
|
6
6
|
readGlobalConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NJHN6IRB.js";
|
|
8
8
|
import {
|
|
9
9
|
logger_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
11
11
|
import {
|
|
12
12
|
getDb,
|
|
13
13
|
readAllMinds,
|
|
14
14
|
voluteHome,
|
|
15
15
|
voluteSystemDir
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RSBL3FAD.js";
|
|
17
17
|
|
|
18
18
|
// packages/daemon/src/lib/backup/restic.ts
|
|
19
19
|
import { writeFileSync } from "fs";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
compactDateTime,
|
|
4
4
|
isCompact
|
|
5
5
|
} from "./chunk-5T5YMX6S.js";
|
|
6
|
-
import {
|
|
7
|
-
getClient,
|
|
8
|
-
urlOf
|
|
9
|
-
} from "./chunk-LOPXTW6H.js";
|
|
10
6
|
import {
|
|
11
7
|
resolveMindName
|
|
12
8
|
} from "./chunk-BTY4WNFE.js";
|
|
13
9
|
import {
|
|
14
10
|
daemonFetch
|
|
15
11
|
} from "./chunk-BCG45AQB.js";
|
|
12
|
+
import {
|
|
13
|
+
getClient,
|
|
14
|
+
urlOf
|
|
15
|
+
} from "./chunk-LOPXTW6H.js";
|
|
16
16
|
import {
|
|
17
17
|
command,
|
|
18
18
|
subcommands
|
|
@@ -114,18 +114,20 @@ var listSchedulesCmd = command({
|
|
|
114
114
|
console.log("No schedules configured.");
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
+
const compact = isCompact();
|
|
118
|
+
const fmtTime = (s) => compact ? compactDateTime(s) : new Date(s).toLocaleString();
|
|
119
|
+
const scheduleOf = (s) => s.cron ?? (s.fireAt ? `at ${fmtTime(s.fireAt)}` : "");
|
|
117
120
|
const actionLabel = (s) => s.script ? `[script] ${s.script}` : s.messages?.length ? `[rotating x${s.messages.length}] ${s.messages[0]}` : s.message ?? "";
|
|
118
|
-
if (
|
|
121
|
+
if (compact) {
|
|
119
122
|
for (const s of schedules) {
|
|
120
|
-
|
|
121
|
-
console.log(`${s.id} ${sched} ${actionLabel(s)}`);
|
|
123
|
+
console.log(`${s.id} ${scheduleOf(s)} ${actionLabel(s)}`);
|
|
122
124
|
}
|
|
123
125
|
} else {
|
|
124
126
|
const idW = Math.max(2, ...schedules.map((s) => s.id.length));
|
|
125
|
-
const schedW = Math.max(8, ...schedules.map((s) => (s
|
|
127
|
+
const schedW = Math.max(8, ...schedules.map((s) => scheduleOf(s).length));
|
|
126
128
|
console.log(`${"ID".padEnd(idW)} ${"SCHEDULE".padEnd(schedW)} ENABLED ACTION`);
|
|
127
129
|
for (const s of schedules) {
|
|
128
|
-
const sched =
|
|
130
|
+
const sched = scheduleOf(s);
|
|
129
131
|
console.log(
|
|
130
132
|
`${s.id.padEnd(idW)} ${sched.padEnd(schedW)} ${String(s.enabled).padEnd(7)} ${actionLabel(s)}`
|
|
131
133
|
);
|
|
@@ -277,7 +279,7 @@ var cmd = subcommands({
|
|
|
277
279
|
},
|
|
278
280
|
sleep: {
|
|
279
281
|
description: "Put a mind to sleep",
|
|
280
|
-
run: (args) => import("./mind-sleep-
|
|
282
|
+
run: (args) => import("./mind-sleep-VBV7YRSU.js").then((m) => m.run(args))
|
|
281
283
|
},
|
|
282
284
|
wake: {
|
|
283
285
|
description: "Wake a sleeping mind",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readGlobalConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NJHN6IRB.js";
|
|
5
5
|
import {
|
|
6
6
|
logger_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QUSMYGNQ.js";
|
|
8
8
|
|
|
9
9
|
// packages/daemon/src/lib/mind/sandbox.ts
|
|
10
10
|
import { execFileSync } from "child_process";
|