volute 0.42.0 → 0.43.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/dist/{accept-7YVHZKRD.js → accept-N5XULCXK.js} +1 -1
- package/dist/{activity-events-KFKVRZE3.js → activity-events-UISXY4Y5.js} +3 -3
- package/dist/{ai-service-3GBOJGUA.js → ai-service-FBCCEYF5.js} +8 -4
- package/dist/{archive-4PPYF7LL.js → archive-I32WHCJB.js} +3 -3
- package/dist/{auth-EAASQPTN.js → auth-3RIG6GKN.js} +4 -4
- package/dist/{bridge-WPYSOQKR.js → bridge-2PO3AI5D.js} +1 -1
- package/dist/{chat-7DOENBY2.js → chat-SDSX5TVV.js} +8 -8
- package/dist/{chunk-M2YMNTHK.js → chunk-2HIVYZDB.js} +1 -1
- package/dist/{chunk-TKOWXAHG.js → chunk-3WLWKOGM.js} +21 -6
- package/dist/{chunk-QPTQKGGF.js → chunk-57LBQ7JX.js} +1 -1
- package/dist/{chunk-VSUZE2PD.js → chunk-65OLHBCL.js} +13 -12
- package/dist/{chunk-K547QOCM.js → chunk-7G2EEYXX.js} +2 -2
- package/dist/{chunk-E7XWFDZL.js → chunk-AD46AYZQ.js} +1 -1
- package/dist/{chunk-CGPESELY.js → chunk-ATEX3ZPG.js} +21 -5
- package/dist/{chunk-WR7CSHQ4.js → chunk-C6ESRQZ7.js} +1 -1
- package/dist/{chunk-OSUF75I7.js → chunk-EE7SZJON.js} +2 -2
- package/dist/{chunk-5QG36RV7.js → chunk-EFL5UOY4.js} +3 -3
- package/dist/{chunk-JLX3GC7T.js → chunk-FSSUANZJ.js} +5 -5
- package/dist/{chunk-2YRTSK5K.js → chunk-FZ5TH5PF.js} +14 -11
- package/dist/{chunk-OEJFZHZZ.js → chunk-GZJFC76M.js} +1 -1
- package/dist/{chunk-KUJVCDWT.js → chunk-JVK6QQIC.js} +2 -2
- package/dist/{chunk-YLTIEEVL.js → chunk-K4EHBHPE.js} +3 -3
- package/dist/{chunk-MHFAWJCC.js → chunk-L3IV23ZG.js} +12 -1
- package/dist/{chunk-VBKRZCR7.js → chunk-M3PGGSBH.js} +1 -1
- package/dist/{chunk-G777ME4L.js → chunk-O3DXAR44.js} +2 -2
- package/dist/{chunk-KZAL7HEQ.js → chunk-ONM2AZFL.js} +1 -1
- package/dist/{chunk-52NMCDBS.js → chunk-PF2AB7VJ.js} +568 -378
- package/dist/chunk-PGPLCJPK.js +272 -0
- package/dist/{chunk-IFNSAOA4.js → chunk-RBNMDAKB.js} +4 -0
- package/dist/{chunk-62ICA2FF.js → chunk-SPLPKBES.js} +17 -1
- package/dist/{chunk-BLOAJLGI.js → chunk-XDTKJNW5.js} +1 -1
- package/dist/{chunk-IUZ3EV2D.js → chunk-YAMO2U3N.js} +1 -1
- package/dist/{chunk-4ZSUUBG5.js → chunk-YSV3VJQK.js} +55 -2
- package/dist/{chunk-RKBYFLOR.js → chunk-ZO7IQJKO.js} +3 -3
- package/dist/cli.js +22 -22
- package/dist/{clock-HP2TGMG5.js → clock-K43IMROX.js} +3 -3
- package/dist/{cloud-sync-3OPHFOYQ.js → cloud-sync-FRYNWKCR.js} +16 -17
- package/dist/{config-W7MS3PWY.js → config-TJLYUV3U.js} +3 -3
- package/dist/{conversations-FSZCUUYO.js → conversations-67WWW25C.js} +4 -4
- package/dist/{create-YNBZWD34.js → create-7W3LV3J7.js} +2 -2
- package/dist/{create-CJ2SR4EU.js → create-DF3KISTW.js} +1 -1
- package/dist/{daemon-client-EWDPOOHC.js → daemon-client-IYR4KCPU.js} +3 -1
- package/dist/{daemon-restart-RAKGR56L.js → daemon-restart-5GVZ5V3X.js} +7 -8
- package/dist/daemon.js +541 -440
- package/dist/{db-ZJJJYJBU.js → db-CZV62BOQ.js} +2 -2
- package/dist/{delete-4ND5PLE7.js → delete-BFMIGAIB.js} +1 -1
- package/dist/delivery-manager-5J2BE22P.js +32 -0
- package/dist/{delivery-router-FDBZJQOY.js → delivery-router-HXBHYHJM.js} +7 -5
- package/dist/down-RRNYIGCU.js +16 -0
- package/dist/echo-text-XKBJM6RV.js +32 -0
- package/dist/{env-XX2MBZCZ.js → env-VZ4MLFQW.js} +1 -1
- package/dist/{exec-ZDD7NEB4.js → exec-SJK7VUTC.js} +3 -4
- package/dist/{export-5DOQV2WM.js → export-7LPCIB5J.js} +4 -4
- package/dist/{extension-BCFYXI7A.js → extension-SEID47SR.js} +1 -1
- package/dist/{extensions-BTNIUS5J.js → extensions-76EGTMFY.js} +16 -17
- package/dist/{files-K2MEMV3W.js → files-LV7VAKPC.js} +4 -4
- package/dist/{import-V6QEHMPQ.js → import-XPECCRQ7.js} +8 -8
- package/dist/{isolation-F7ABZMDA.js → isolation-5AYEY55P.js} +5 -3
- package/dist/{join-4S3KT7NE.js → join-RXPXGV4L.js} +1 -1
- package/dist/{list-XJB5WII6.js → list-OXIAY3W7.js} +1 -1
- package/dist/{login-PHMTLNUF.js → login-KJSN4JDA.js} +3 -3
- package/dist/{login-YWD6PUOT.js → login-MY6ETFYB.js} +1 -1
- package/dist/{logout-Q2WICH4V.js → logout-NCG3TMDL.js} +1 -1
- package/dist/{logout-BP3R3CAA.js → logout-TMJGUQV2.js} +3 -3
- package/dist/message-delivery-WJBZFALY.js +34 -0
- package/dist/{mind-VXV6ZYZY.js → mind-QEWCR7FA.js} +18 -18
- package/dist/{mind-activity-tracker-HWVFE533.js → mind-activity-tracker-JHAT6456.js} +4 -4
- package/dist/{mind-history-TDUQFYAG.js → mind-history-VRO5A76U.js} +1 -1
- package/dist/{mind-list-2T353Q5G.js → mind-list-4D7J4CHD.js} +1 -1
- package/dist/{mind-profile-2HHR7LZ7.js → mind-profile-PEQYASQX.js} +1 -1
- package/dist/mind-service-ZBVUMJ5H.js +36 -0
- package/dist/{mind-sleep-4NXV4J4U.js → mind-sleep-YMBR3I35.js} +1 -1
- package/dist/{mind-status-CG66OXDK.js → mind-status-UO34ASXZ.js} +1 -1
- package/dist/{mind-wake-TNB54DBR.js → mind-wake-LCLGTXA2.js} +1 -1
- package/dist/{package-UWH5IM76.js → package-ZOI2KAYC.js} +1 -1
- package/dist/{read-JLR4NQXU.js → read-QVAXMTPV.js} +1 -1
- package/dist/{register-IQ2M4UO6.js → register-Y2H4PY5R.js} +1 -1
- package/dist/{registry-MDLNPTTI.js → registry-7LQHTRUX.js} +2 -2
- package/dist/{reject-N2D4CZND.js → reject-EV35X64Y.js} +1 -1
- package/dist/{restart-43A5MBGV.js → restart-FJQ662XJ.js} +1 -1
- package/dist/{sandbox-E7RWZDVG.js → sandbox-SJH3XOPZ.js} +4 -4
- package/dist/scheduler-BR6C6B3E.js +30 -0
- package/dist/{schema-HHYJDG7B.js → schema-LRUTFOER.js} +1 -1
- package/dist/{seed-YQAOIXIY.js → seed-KOG6KJAO.js} +1 -1
- package/dist/{seed-check-N5ALJBT6.js → seed-check-VLTVILOV.js} +1 -1
- package/dist/{seed-cmd-7KJS4LCA.js → seed-cmd-GJFENEJH.js} +3 -3
- package/dist/{seed-create-Z7NDRRGP.js → seed-create-YXO6R4KE.js} +4 -4
- package/dist/{seed-sprout-PYDMVVUL.js → seed-sprout-BBU64QXP.js} +8 -9
- package/dist/{send-KQECN2EL.js → send-ZBZWIH5V.js} +4 -4
- package/dist/{service-Q5OVY5AK.js → service-4EVZKGSA.js} +4 -5
- package/dist/{service-install-GTDUHP6R.js → service-install-SHRM6NHK.js} +5 -6
- package/dist/{setup-IYOUPCIK.js → setup-25MMJ3J4.js} +3 -3
- package/dist/{setup-VARJ7N6Z.js → setup-354PDHUF.js} +8 -10
- package/dist/{skill-E43BI34Y.js → skill-FKFHIJRR.js} +1 -1
- package/dist/{skills-YBCYVOPQ.js → skills-DPI3WZPQ.js} +5 -6
- package/dist/sleep-manager-BVU5D2AE.js +34 -0
- package/dist/{spirit-NJFAY5CZ.js → spirit-JQQHUVWR.js} +7 -8
- package/dist/{split-5IBUODEE.js → split-WBMZXBHF.js} +1 -1
- package/dist/{sprout-B27C2WGE.js → sprout-4WAYBUVV.js} +1 -1
- package/dist/{start-5AYFGNS7.js → start-5JE3TV66.js} +1 -1
- package/dist/{status-ECZHHSY5.js → status-WTU2WHXY.js} +12 -9
- package/dist/{stop-WJ6IG6OK.js → stop-AAMTG3TU.js} +1 -1
- package/dist/system-chat-KMQIP7VH.js +34 -0
- package/dist/{systems-5MA57Q7G.js → systems-VNB5WKSS.js} +4 -4
- package/dist/{tailscale-TIRTGM6E.js → tailscale-Q7ZJL7S7.js} +2 -2
- package/dist/{turn-tracker-W4TASMR7.js → turn-tracker-2GMKJQTN.js} +7 -5
- package/dist/up-7RSBEKW6.js +18 -0
- package/dist/{update-OPR4KU4M.js → update-EJ7Q77ZX.js} +9 -10
- package/dist/{update-check-OG27AL4Z.js → update-check-ACYYNKTW.js} +3 -3
- package/dist/{upgrade-QB7AHIKX.js → upgrade-37DAGF6H.js} +1 -1
- package/dist/{version-notify-TCKAX7ZA.js → version-notify-DCAIXXZB.js} +17 -18
- package/dist/web-assets/assets/{index-CrFAsfiE.js → index-DTDmEfPU.js} +2 -2
- package/dist/web-assets/index.html +1 -1
- package/drizzle/0010_delivery_queue_redrive.sql +10 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/templates/codex/src/server.ts +2 -8
- package/dist/chunk-GN52E2DP.js +0 -59
- package/dist/chunk-TFBQESH7.js +0 -179
- package/dist/delivery-manager-5Y35DOX3.js +0 -33
- package/dist/down-DS6WCT34.js +0 -17
- package/dist/echo-text-YP3JVLNA.js +0 -32
- package/dist/message-delivery-FPIL26WV.js +0 -41
- package/dist/mind-manager-OYOIBGK6.js +0 -33
- package/dist/mind-service-PR4PR4XI.js +0 -37
- package/dist/scheduler-KXUY2I7W.js +0 -31
- package/dist/sleep-manager-FJLASHHW.js +0 -35
- package/dist/system-chat-P6KVGW4T.js +0 -35
- package/dist/up-POJX6S5Y.js +0 -19
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
broadcast,
|
|
4
4
|
publish,
|
|
5
5
|
subscribe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7G2EEYXX.js";
|
|
7
7
|
import "./chunk-T2TP6ZC6.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-YAMO2U3N.js";
|
|
9
|
+
import "./chunk-L3IV23ZG.js";
|
|
10
10
|
import "./chunk-K3NQKI34.js";
|
|
11
11
|
export {
|
|
12
12
|
broadcast,
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
aiComplete,
|
|
5
5
|
aiCompleteUtility,
|
|
6
6
|
buildCustomModel,
|
|
7
|
+
findModel,
|
|
7
8
|
fireProviderRefreshHook,
|
|
8
9
|
getAiConfig,
|
|
9
10
|
getAvailableModels,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
getEnabledModels,
|
|
13
14
|
getUtilityModel,
|
|
14
15
|
isAiConfigured,
|
|
16
|
+
migrateAiModelQualification,
|
|
15
17
|
qualifyModelId,
|
|
16
18
|
removeAiConfig,
|
|
17
19
|
removeCustomModel,
|
|
@@ -23,17 +25,18 @@ import {
|
|
|
23
25
|
setProviderRefreshHook,
|
|
24
26
|
setUtilityModel,
|
|
25
27
|
unqualifyModelId
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-YSV3VJQK.js";
|
|
29
|
+
import "./chunk-ONM2AZFL.js";
|
|
28
30
|
import "./chunk-T2TP6ZC6.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-YAMO2U3N.js";
|
|
32
|
+
import "./chunk-L3IV23ZG.js";
|
|
31
33
|
import "./chunk-K3NQKI34.js";
|
|
32
34
|
export {
|
|
33
35
|
addCustomModel,
|
|
34
36
|
aiComplete,
|
|
35
37
|
aiCompleteUtility,
|
|
36
38
|
buildCustomModel,
|
|
39
|
+
findModel,
|
|
37
40
|
fireProviderRefreshHook,
|
|
38
41
|
getAiConfig,
|
|
39
42
|
getAvailableModels,
|
|
@@ -42,6 +45,7 @@ export {
|
|
|
42
45
|
getEnabledModels,
|
|
43
46
|
getUtilityModel,
|
|
44
47
|
isAiConfigured,
|
|
48
|
+
migrateAiModelQualification,
|
|
45
49
|
qualifyModelId,
|
|
46
50
|
removeAiConfig,
|
|
47
51
|
removeCustomModel,
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
extractArchive,
|
|
6
6
|
isHomeOnlyArchive,
|
|
7
7
|
readManifest
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-GZJFC76M.js";
|
|
9
|
+
import "./chunk-YAMO2U3N.js";
|
|
10
|
+
import "./chunk-L3IV23ZG.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-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-EFL5UOY4.js";
|
|
21
|
+
import "./chunk-7G2EEYXX.js";
|
|
22
22
|
import "./chunk-T2TP6ZC6.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-YAMO2U3N.js";
|
|
24
|
+
import "./chunk-L3IV23ZG.js";
|
|
25
25
|
import "./chunk-K3NQKI34.js";
|
|
26
26
|
export {
|
|
27
27
|
approveUser,
|
|
@@ -12,35 +12,35 @@ 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-ZBZWIH5V.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-OXIAY3W7.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-QVAXMTPV.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-DF3KISTW.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-2PO3AI5D.js").then((m) => m.run(args))
|
|
32
32
|
},
|
|
33
33
|
files: {
|
|
34
34
|
description: "List pending incoming files",
|
|
35
|
-
run: (args) => import("./files-
|
|
35
|
+
run: (args) => import("./files-LV7VAKPC.js").then((m) => m.run(args))
|
|
36
36
|
},
|
|
37
37
|
accept: {
|
|
38
38
|
description: "Accept a pending file",
|
|
39
|
-
run: (args) => import("./accept-
|
|
39
|
+
run: (args) => import("./accept-N5XULCXK.js").then((m) => m.run(args))
|
|
40
40
|
},
|
|
41
41
|
reject: {
|
|
42
42
|
description: "Reject a pending file",
|
|
43
|
-
run: (args) => import("./reject-
|
|
43
|
+
run: (args) => import("./reject-EV35X64Y.js").then((m) => m.run(args))
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
footer: "Use --mind <name> or VOLUTE_MIND to identify the mind."
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
aiCompleteUtility
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YSV3VJQK.js";
|
|
5
5
|
import {
|
|
6
6
|
logger_default
|
|
7
7
|
} from "./chunk-T2TP6ZC6.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YAMO2U3N.js";
|
|
11
11
|
import {
|
|
12
12
|
messages,
|
|
13
13
|
mindHistory,
|
|
14
14
|
summaries,
|
|
15
15
|
systemPrompts,
|
|
16
16
|
turns
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L3IV23ZG.js";
|
|
18
18
|
|
|
19
19
|
// packages/daemon/src/lib/daemon/turn-tracker.ts
|
|
20
20
|
import { randomUUID } from "crypto";
|
|
21
|
-
import { eq as eq3, sql as sql2 } from "drizzle-orm";
|
|
21
|
+
import { and as and2, eq as eq3, sql as sql2 } from "drizzle-orm";
|
|
22
22
|
|
|
23
23
|
// packages/daemon/src/lib/daemon/summarizer.ts
|
|
24
24
|
import { and, desc, eq as eq2, gte, inArray, like, lt, sql } from "drizzle-orm";
|
|
@@ -1013,11 +1013,11 @@ var Summarizer = class {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
1015
|
async function reconcileWedgedTurns(idleMs) {
|
|
1016
|
-
const { sweepWedgedTurns: sweepWedgedTurns2, summarizeOrphanedTurns: summarizeOrphanedTurns2 } = await import("./turn-tracker-
|
|
1016
|
+
const { sweepWedgedTurns: sweepWedgedTurns2, summarizeOrphanedTurns: summarizeOrphanedTurns2 } = await import("./turn-tracker-2GMKJQTN.js");
|
|
1017
1017
|
const wedged = await sweepWedgedTurns2(idleMs);
|
|
1018
1018
|
if (wedged.length === 0) return;
|
|
1019
1019
|
summarizeOrphanedTurns2(wedged);
|
|
1020
|
-
const { tryGetDeliveryManager } = await import("./delivery-manager-
|
|
1020
|
+
const { tryGetDeliveryManager } = await import("./delivery-manager-5J2BE22P.js");
|
|
1021
1021
|
const dm = tryGetDeliveryManager();
|
|
1022
1022
|
if (!dm) return;
|
|
1023
1023
|
for (const t of wedged) {
|
|
@@ -1064,6 +1064,20 @@ async function createTurn(mind) {
|
|
|
1064
1064
|
function getActiveTurnId(mind, session) {
|
|
1065
1065
|
return (activeTurns.get(key(mind, session)) ?? activeTurns.get(key(mind)))?.turnId;
|
|
1066
1066
|
}
|
|
1067
|
+
async function linkInboundToActiveTurn(mind, session, channel) {
|
|
1068
|
+
if (!channel) return;
|
|
1069
|
+
const turnId = getActiveTurnId(mind, session);
|
|
1070
|
+
if (!turnId) return;
|
|
1071
|
+
const db = await getDb();
|
|
1072
|
+
await db.update(mindHistory).set({ turn_id: turnId }).where(
|
|
1073
|
+
and2(
|
|
1074
|
+
eq3(mindHistory.mind, mind),
|
|
1075
|
+
eq3(mindHistory.type, "inbound"),
|
|
1076
|
+
sql2`${mindHistory.turn_id} IS NULL`,
|
|
1077
|
+
eq3(mindHistory.channel, channel)
|
|
1078
|
+
)
|
|
1079
|
+
);
|
|
1080
|
+
}
|
|
1067
1081
|
function trackToolUse(mind, session, eventId) {
|
|
1068
1082
|
const entry = activeTurns.get(key(mind, session)) ?? activeTurns.get(key(mind));
|
|
1069
1083
|
if (entry) entry.lastToolUseEventId = eventId;
|
|
@@ -1201,6 +1215,7 @@ export {
|
|
|
1201
1215
|
takeErrored,
|
|
1202
1216
|
createTurn,
|
|
1203
1217
|
getActiveTurnId,
|
|
1218
|
+
linkInboundToActiveTurn,
|
|
1204
1219
|
trackToolUse,
|
|
1205
1220
|
getLastToolUseEventId,
|
|
1206
1221
|
assignSession,
|
|
@@ -10,21 +10,22 @@ import {
|
|
|
10
10
|
getSharedSkill,
|
|
11
11
|
installSkill,
|
|
12
12
|
mindSkillsDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FSSUANZJ.js";
|
|
14
14
|
import {
|
|
15
15
|
readVoluteConfig,
|
|
16
16
|
writeVoluteConfig
|
|
17
17
|
} from "./chunk-CU6OFXMM.js";
|
|
18
18
|
import {
|
|
19
19
|
exec
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PGPLCJPK.js";
|
|
21
21
|
import {
|
|
22
22
|
qualifyModelId,
|
|
23
|
-
resolveTemplate
|
|
24
|
-
|
|
23
|
+
resolveTemplate,
|
|
24
|
+
unqualifyModelId
|
|
25
|
+
} from "./chunk-YSV3VJQK.js";
|
|
25
26
|
import {
|
|
26
27
|
readGlobalConfig
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ONM2AZFL.js";
|
|
28
29
|
import {
|
|
29
30
|
logger_default
|
|
30
31
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
findMind,
|
|
34
35
|
nextPort,
|
|
35
36
|
voluteSystemDir
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-YAMO2U3N.js";
|
|
37
38
|
|
|
38
39
|
// packages/daemon/src/lib/mind/spirit.ts
|
|
39
40
|
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -99,7 +100,7 @@ async function ensureSpiritProject() {
|
|
|
99
100
|
writeFileSync(routesPath, `${JSON.stringify(routesContent, null, 2)}
|
|
100
101
|
`);
|
|
101
102
|
if (spiritModel) {
|
|
102
|
-
const modelForConfig = template === "pi" ? qualifyModelId(spiritModel) : spiritModel;
|
|
103
|
+
const modelForConfig = template === "pi" ? qualifyModelId(spiritModel) : unqualifyModelId(spiritModel);
|
|
103
104
|
const configPath = resolve(dir, "home/.config/config.json");
|
|
104
105
|
const mindConfig = existsSync(configPath) ? JSON.parse(readFileSync(configPath, "utf-8")) : {};
|
|
105
106
|
mindConfig.model = modelForConfig;
|
|
@@ -129,10 +130,10 @@ async function ensureSpiritProject() {
|
|
|
129
130
|
} catch (err) {
|
|
130
131
|
slog.warn("failed to add tending schedule to spirit config", logger_default.errorData(err));
|
|
131
132
|
}
|
|
132
|
-
const { createMindUser, chownMindDir, ensureVoluteGroup } = await import("./isolation-
|
|
133
|
+
const { createMindUser, chownMindDir, ensureVoluteGroup } = await import("./isolation-5AYEY55P.js");
|
|
133
134
|
ensureVoluteGroup();
|
|
134
135
|
createMindUser("volute", resolve(dir, "home"));
|
|
135
|
-
chownMindDir(dir, "volute");
|
|
136
|
+
await chownMindDir(dir, "volute");
|
|
136
137
|
const port = await nextPort();
|
|
137
138
|
await addSpirit("volute", port, template, dir);
|
|
138
139
|
slog.info("spirit project created");
|
|
@@ -163,8 +164,8 @@ async function syncSpiritTemplate() {
|
|
|
163
164
|
cpSync(newPkg, resolve(dir, "package.json"));
|
|
164
165
|
await exec("npm", ["install"], { cwd: dir, env: npmEnv() });
|
|
165
166
|
}
|
|
166
|
-
const db = await (await import("./db-
|
|
167
|
-
const { minds } = await import("./schema-
|
|
167
|
+
const db = await (await import("./db-CZV62BOQ.js")).getDb();
|
|
168
|
+
const { minds } = await import("./schema-LRUTFOER.js");
|
|
168
169
|
const { eq } = await import("drizzle-orm");
|
|
169
170
|
await db.update(minds).set({ template: expectedTemplate }).where(eq(minds.name, "volute"));
|
|
170
171
|
}
|
|
@@ -190,7 +191,7 @@ async function syncSpiritTemplate() {
|
|
|
190
191
|
writeFileSync(resolve(dir, "home/SOUL.md"), getSpiritSoul(systemName, config.description));
|
|
191
192
|
const spiritModel = config.spiritModel;
|
|
192
193
|
if (spiritModel) {
|
|
193
|
-
const modelForConfig = template === "pi" ? qualifyModelId(spiritModel) : spiritModel;
|
|
194
|
+
const modelForConfig = template === "pi" ? qualifyModelId(spiritModel) : unqualifyModelId(spiritModel);
|
|
194
195
|
const mindConfigPath = resolve(dir, "home/.config/config.json");
|
|
195
196
|
const mindConfig = existsSync(mindConfigPath) ? JSON.parse(readFileSync(mindConfigPath, "utf-8")) : {};
|
|
196
197
|
if (mindConfig.model !== modelForConfig) {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-T2TP6ZC6.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YAMO2U3N.js";
|
|
8
8
|
import {
|
|
9
9
|
activity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L3IV23ZG.js";
|
|
11
11
|
|
|
12
12
|
// packages/daemon/src/lib/events/activity-events.ts
|
|
13
13
|
var subscribers = /* @__PURE__ */ new Set();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
exec,
|
|
4
4
|
execInherit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PGPLCJPK.js";
|
|
6
6
|
import {
|
|
7
7
|
voluteSystemDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YAMO2U3N.js";
|
|
9
9
|
|
|
10
10
|
// packages/daemon/src/lib/config/service-mode.ts
|
|
11
11
|
import { execFileSync } from "child_process";
|
|
@@ -168,16 +168,30 @@ async function restartService(mode) {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
+
function daemonConfigPath() {
|
|
172
|
+
return resolve(voluteSystemDir(), "daemon.json");
|
|
173
|
+
}
|
|
174
|
+
function daemonTokenPath() {
|
|
175
|
+
return resolve(voluteSystemDir(), "daemon-token");
|
|
176
|
+
}
|
|
177
|
+
function readDaemonToken() {
|
|
178
|
+
const path = daemonTokenPath();
|
|
179
|
+
if (!existsSync(path)) return void 0;
|
|
180
|
+
try {
|
|
181
|
+
return readFileSync(path, "utf-8").trim() || void 0;
|
|
182
|
+
} catch {
|
|
183
|
+
return void 0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
171
186
|
function readDaemonConfig() {
|
|
172
|
-
const configPath =
|
|
187
|
+
const configPath = daemonConfigPath();
|
|
173
188
|
if (!existsSync(configPath)) return { hostname: "127.0.0.1", port: 1618 };
|
|
174
189
|
try {
|
|
175
190
|
const config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
176
191
|
return {
|
|
177
192
|
hostname: config.hostname || "127.0.0.1",
|
|
178
193
|
port: config.port ?? 1618,
|
|
179
|
-
internalPort: config.internalPort
|
|
180
|
-
token: config.token
|
|
194
|
+
internalPort: config.internalPort
|
|
181
195
|
};
|
|
182
196
|
} catch {
|
|
183
197
|
console.error("Warning: could not read daemon config, using defaults.");
|
|
@@ -212,6 +226,8 @@ export {
|
|
|
212
226
|
startService,
|
|
213
227
|
stopService,
|
|
214
228
|
restartService,
|
|
229
|
+
daemonConfigPath,
|
|
230
|
+
readDaemonToken,
|
|
215
231
|
readDaemonConfig,
|
|
216
232
|
modeLabel
|
|
217
233
|
};
|
|
@@ -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-ATEX3ZPG.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveVoluteBin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PGPLCJPK.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-7G2EEYXX.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YAMO2U3N.js";
|
|
8
8
|
import {
|
|
9
9
|
users
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L3IV23ZG.js";
|
|
11
11
|
|
|
12
12
|
// packages/daemon/src/lib/auth.ts
|
|
13
13
|
import { compareSync, hashSync } from "bcryptjs";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
exec,
|
|
4
4
|
gitExec
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PGPLCJPK.js";
|
|
6
6
|
import {
|
|
7
7
|
readGlobalConfig,
|
|
8
8
|
writeGlobalConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ONM2AZFL.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-
|
|
18
|
+
} from "./chunk-YAMO2U3N.js";
|
|
19
19
|
import {
|
|
20
20
|
sharedSkills
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-L3IV23ZG.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-
|
|
49
|
+
const { getExtensionStandardSkills } = await import("./extensions-76EGTMFY.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));
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findBridgeForChannel,
|
|
4
4
|
getBridgeConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-57LBQ7JX.js";
|
|
6
6
|
import {
|
|
7
7
|
recordOutbound
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PF2AB7VJ.js";
|
|
9
9
|
import {
|
|
10
10
|
readEnv,
|
|
11
11
|
sharedEnvPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XDTKJNW5.js";
|
|
13
13
|
import {
|
|
14
14
|
addMessage,
|
|
15
15
|
findDMConversation,
|
|
@@ -17,17 +17,21 @@ import {
|
|
|
17
17
|
getChannelName,
|
|
18
18
|
getConversation,
|
|
19
19
|
getParticipants
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-K4EHBHPE.js";
|
|
21
21
|
import {
|
|
22
22
|
readVoluteConfig
|
|
23
23
|
} from "./chunk-CU6OFXMM.js";
|
|
24
24
|
import {
|
|
25
25
|
publish
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3WLWKOGM.js";
|
|
27
|
+
import {
|
|
28
|
+
daemonConfigPath,
|
|
29
|
+
readDaemonToken
|
|
30
|
+
} from "./chunk-ATEX3ZPG.js";
|
|
27
31
|
import {
|
|
28
32
|
getOrCreateMindUser,
|
|
29
33
|
getUserByUsername
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-EFL5UOY4.js";
|
|
31
35
|
import {
|
|
32
36
|
logger_default
|
|
33
37
|
} from "./chunk-T2TP6ZC6.js";
|
|
@@ -35,9 +39,8 @@ import {
|
|
|
35
39
|
buildVoluteSlug
|
|
36
40
|
} from "./chunk-LGNUFVMR.js";
|
|
37
41
|
import {
|
|
38
|
-
mindDir
|
|
39
|
-
|
|
40
|
-
} from "./chunk-IUZ3EV2D.js";
|
|
42
|
+
mindDir
|
|
43
|
+
} from "./chunk-YAMO2U3N.js";
|
|
41
44
|
import {
|
|
42
45
|
__export
|
|
43
46
|
} from "./chunk-K3NQKI34.js";
|
|
@@ -540,7 +543,7 @@ function readSessionFile(mindDir2) {
|
|
|
540
543
|
return void 0;
|
|
541
544
|
}
|
|
542
545
|
function getDaemonConfig() {
|
|
543
|
-
const configPath =
|
|
546
|
+
const configPath = daemonConfigPath();
|
|
544
547
|
if (!existsSync(configPath)) {
|
|
545
548
|
throw new Error("Volute daemon is not running");
|
|
546
549
|
}
|
|
@@ -556,7 +559,7 @@ function getDaemonConfig() {
|
|
|
556
559
|
const url = new URL("http://localhost");
|
|
557
560
|
url.hostname = config.hostname || "localhost";
|
|
558
561
|
url.port = String(config.port);
|
|
559
|
-
return { url: url.origin, token:
|
|
562
|
+
return { url: url.origin, token: readDaemonToken() };
|
|
560
563
|
}
|
|
561
564
|
async function read4(env, channelSlug, limit) {
|
|
562
565
|
const mindName = env.VOLUTE_MIND;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
setBridgeConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-57LBQ7JX.js";
|
|
5
5
|
import {
|
|
6
6
|
readEnv,
|
|
7
7
|
sharedEnvPath,
|
|
8
8
|
writeEnv
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XDTKJNW5.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,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
subscribe
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7G2EEYXX.js";
|
|
5
5
|
import {
|
|
6
6
|
logger_default
|
|
7
7
|
} from "./chunk-T2TP6ZC6.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YAMO2U3N.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-
|
|
18
|
+
} from "./chunk-L3IV23ZG.js";
|
|
19
19
|
|
|
20
20
|
// packages/daemon/src/lib/events/conversations.ts
|
|
21
21
|
import { randomUUID } from "crypto";
|
|
@@ -150,18 +150,29 @@ var deliveryQueue = sqliteTable(
|
|
|
150
150
|
"delivery_queue",
|
|
151
151
|
{
|
|
152
152
|
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
153
|
+
// Keying/cleanup/dedup key: always the base (parent) name, so an insert under a
|
|
154
|
+
// variant name and the id-scoped cleanup share a key.
|
|
153
155
|
mind: text("mind").notNull(),
|
|
156
|
+
// Original delivery target — may be a variant name. Used to resolve the port on
|
|
157
|
+
// redrive so a variant's stranded message is re-delivered to the variant, not the
|
|
158
|
+
// parent. Null on legacy rows → callers fall back to `mind`.
|
|
159
|
+
target_mind: text("target_mind"),
|
|
154
160
|
session: text("session").notNull(),
|
|
155
161
|
channel: text("channel"),
|
|
156
162
|
sender: text("sender"),
|
|
157
163
|
status: text("status").notNull().default("pending"),
|
|
158
164
|
payload: text("payload").notNull(),
|
|
165
|
+
// Redrive bookkeeping: how many delivery attempts have been made, and the
|
|
166
|
+
// earliest time the row is eligible for a retry (null = deliver ASAP).
|
|
167
|
+
attempts: integer("attempts").notNull().default(0),
|
|
168
|
+
next_attempt_at: text("next_attempt_at"),
|
|
159
169
|
created_at: text("created_at").notNull().default(sql`(datetime('now'))`)
|
|
160
170
|
},
|
|
161
171
|
(table) => [
|
|
162
172
|
index("idx_delivery_queue_mind_session").on(table.mind, table.session),
|
|
163
173
|
index("idx_delivery_queue_mind_status").on(table.mind, table.status),
|
|
164
|
-
index("idx_delivery_queue_status").on(table.status)
|
|
174
|
+
index("idx_delivery_queue_status").on(table.status),
|
|
175
|
+
index("idx_delivery_queue_status_next").on(table.status, table.next_attempt_at)
|
|
165
176
|
]
|
|
166
177
|
);
|
|
167
178
|
var activity = sqliteTable(
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
pollHealthDown,
|
|
9
9
|
readDaemonConfig,
|
|
10
10
|
stopService
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ATEX3ZPG.js";
|
|
12
12
|
import {
|
|
13
13
|
voluteSystemDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YAMO2U3N.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/down.ts
|
|
17
17
|
import { existsSync, readFileSync, unlinkSync } from "fs";
|