volute 0.26.0 → 0.27.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 +13 -13
- package/dist/{activity-events-ZMBAKLUF.js → activity-events-BBIEA2F4.js} +2 -3
- package/dist/api.d.ts +363 -168
- package/dist/{archive-4ZQYK5MN.js → archive-UA4BDFXQ.js} +2 -2
- package/dist/{auth-4TV573WE.js → auth-D3OT2ARB.js} +3 -3
- package/dist/bridge-FQHZL3MC.js +206 -0
- package/dist/chat-MHJ3L6JQ.js +58 -0
- package/dist/{chunk-PHU4DEAJ.js → chunk-2WPW7OT6.js} +3 -3
- package/dist/{chunk-5Y3PBKW6.js → chunk-2YP2TVDT.js} +138 -56
- package/dist/{chunk-USNBKHYG.js → chunk-4WXYUOAK.js} +4 -6
- package/dist/{chunk-YJA7P64S.js → chunk-AW7PFDVN.js} +5 -5
- package/dist/{chunk-OZFKBXD6.js → chunk-EHYDTZTF.js} +6 -6
- package/dist/{chunk-LX22GRG7.js → chunk-GIE6CSN5.js} +11 -8
- package/dist/{chunk-WBHMQ5OZ.js → chunk-H7OZRFJB.js} +192 -12
- package/dist/{chunk-ON3FF5JA.js → chunk-HDN7MNGD.js} +3 -3
- package/dist/chunk-IAYBDWVG.js +477 -0
- package/dist/{chunk-TZKJLDQN.js → chunk-IKRVFPWU.js} +14 -9
- package/dist/{chunk-WGOGUMPO.js → chunk-JGFVMROS.js} +13 -6
- package/dist/{chunk-3TV4GLFO.js → chunk-JKOWNZ4P.js} +3 -3
- package/dist/{chunk-NWI2425I.js → chunk-K5NAC55T.js} +1 -1
- package/dist/{chunk-HFCBO2GL.js → chunk-KDGS53OS.js} +4 -4
- package/dist/chunk-KTLFDYPT.js +61 -0
- package/dist/{chunk-V63B7DX3.js → chunk-LAC664WU.js} +7 -4
- package/dist/{chunk-3CFRE2VC.js → chunk-OQZH4PBB.js} +337 -1061
- package/dist/{chunk-2VO7453N.js → chunk-PHSAT7YL.js} +30 -54
- package/dist/{chunk-XOXLRRR2.js → chunk-RKQEHRBB.js} +4 -3
- package/dist/chunk-T6HKBWXZ.js +23 -0
- package/dist/{chunk-UTL75LP6.js → chunk-USUXRNVD.js} +22 -22
- package/dist/{chunk-J2CO4WEV.js → chunk-VIVMW2H2.js} +4 -4
- package/dist/{chunk-KTJGZ7M7.js → chunk-XBLSAVJF.js} +1 -1
- package/dist/cli.js +31 -36
- package/dist/{cloud-sync-NI2K3C7G.js → cloud-sync-T7M3ESC3.js} +15 -14
- package/dist/connectors/discord-bridge.js +158 -0
- package/dist/connectors/slack-bridge.js +119 -0
- package/dist/connectors/telegram-bridge.js +133 -0
- package/dist/conversations-M2K4253F.js +55 -0
- package/dist/create-D7J73A6H.js +45 -0
- package/dist/{create-4YBRTTJS.js → create-QWV73WXD.js} +1 -1
- package/dist/{daemon-client-Z7FAJ6JW.js → daemon-client-I42FK2BF.js} +2 -2
- package/dist/{daemon-restart-BJZ3O4U4.js → daemon-restart-M2QTYMEG.js} +7 -7
- package/dist/daemon.js +1758 -1024
- package/dist/db-IC4J52XQ.js +8 -0
- package/dist/{delete-27OYNK25.js → delete-4JYGD4VN.js} +1 -1
- package/dist/down-LVBXEULC.js +14 -0
- package/dist/{env-M336ONDP.js → env-YJMUMFIY.js} +2 -2
- package/dist/{export-HP4G5DQC.js → export-BOJQWBMA.js} +4 -4
- package/dist/{file-HUDKTRAS.js → file-CR36YUPD.js} +4 -4
- package/dist/{history-B64GTFTD.js → history-XKRTAFS2.js} +5 -5
- package/dist/{import-XIB7UV4S.js → import-SRTQXBGH.js} +4 -4
- package/dist/join-J4QU42DL.js +66 -0
- package/dist/list-R73GENNL.js +40 -0
- package/dist/{log-PBFNILJ4.js → log-ABYNVYJ3.js} +4 -4
- package/dist/{login-B5E7N7MY.js → login-3QZNR2DF.js} +4 -4
- package/dist/{login-6U7U6BNG.js → login-XX37I52P.js} +2 -2
- package/dist/{logout-XSJRYS3U.js → logout-T53VKCPU.js} +4 -4
- package/dist/{logout-UKD5LA37.js → logout-W4KOOBIT.js} +2 -2
- package/dist/{logs-3CART7O7.js → logs-U35JR2KE.js} +5 -5
- package/dist/{merge-VK2HSKMA.js → merge-LNSMSAOF.js} +4 -4
- package/dist/message-delivery-LDXLGERA.js +25 -0
- package/dist/migrate-registry-to-db-XC7T5B7P.js +110 -0
- package/dist/{mind-HZ3QSDDJ.js → mind-DI33C74K.js} +25 -25
- package/dist/{mind-activity-tracker-4G6FURY2.js → mind-activity-tracker-EN6XNXPF.js} +3 -4
- package/dist/mind-manager-M6EMUW5I.js +18 -0
- package/dist/{mind-sleep-DTV7L44D.js → mind-sleep-BTSWQNAC.js} +4 -4
- package/dist/{mind-wake-PFN4FN3T.js → mind-wake-SBAKIDVP.js} +4 -4
- package/dist/{notes-37FW2UR2.js → notes-XCER3I7M.js} +11 -21
- package/dist/{package-VZWLXPHV.js → package-7WY6VKU3.js} +1 -1
- package/dist/{pages-DIIT5HMQ.js → pages-6EBS6CBR.js} +2 -2
- package/dist/{publish-HQV7YREB.js → publish-66UB2ZFY.js} +5 -5
- package/dist/{pull-2MB4SK3C.js → pull-XCHJTM5M.js} +4 -4
- package/dist/read-36UFXN3G.js +46 -0
- package/dist/{register-EFND67FQ.js → register-6B2CXTYM.js} +2 -2
- package/dist/{registry-D2BSQ2X5.js → registry-NDNOOYG4.js} +15 -9
- package/dist/{restart-CCK7D6TV.js → restart-6ESL3NBO.js} +5 -5
- package/dist/{sandbox-EHGFF52K.js → sandbox-TGBX22DS.js} +3 -3
- package/dist/{schedule-6F7ELB2M.js → schedule-QTJMFATP.js} +5 -5
- package/dist/{seed-E5OQGWX3.js → seed-SSUCYYDF.js} +2 -2
- package/dist/{send-IH6XZKPC.js → send-ZNCJDSRP.js} +25 -19
- package/dist/{service-LLBV3R7M.js → service-6LIN3F3K.js} +4 -4
- package/dist/{setup-F6TWFYGQ.js → setup-JG4QAEBV.js} +12 -12
- package/dist/{setup-YGAAIKKZ.js → setup-JHL5ZEST.js} +2 -2
- package/dist/{shared-UMO4S7CC.js → shared-ML5I4Q2A.js} +4 -4
- package/dist/{skill-42LGFBQC.js → skill-AUAQTSP5.js} +5 -5
- package/dist/skills/dreaming/references/INSTALL.md +2 -2
- package/dist/skills/orientation/SKILL.md +3 -3
- package/dist/skills/volute-mind/SKILL.md +32 -30
- package/dist/sleep-manager-MWYHM5HV.js +29 -0
- package/dist/split-TKJ5OT3P.js +63 -0
- package/dist/{sprout-QL74KR2X.js → sprout-IJVVKSJ2.js} +6 -7
- package/dist/{start-O5JQASRC.js → start-EUJSS5R4.js} +2 -2
- package/dist/{status-FZBEBM7Q.js → status-77YEPHMW.js} +5 -5
- package/dist/{status-WXD4HXRL.js → status-7GA4SM4Y.js} +4 -4
- package/dist/{status-LV34BG6G.js → status-THLOBLWG.js} +2 -2
- package/dist/{stop-2SOG5NYF.js → stop-3XAITBBF.js} +5 -5
- package/dist/{tailscale-AJ4VL5XK.js → tailscale-NY5MUMY3.js} +1 -1
- package/dist/up-NKSMXBWR.js +17 -0
- package/dist/{update-5VUDAI3D.js → update-PTSH22AZ.js} +9 -9
- package/dist/{update-check-F5Z3ALXX.js → update-check-64FWC4Y2.js} +2 -2
- package/dist/{upgrade-QCCO33BK.js → upgrade-HA47CS4C.js} +12 -5
- package/dist/variant-7TGZHOU3.js +41 -0
- package/dist/{version-notify-USFZBWMG.js → version-notify-5Z4MNR6M.js} +26 -30
- package/dist/web-assets/assets/index-CI5wgghI.css +1 -0
- package/dist/web-assets/assets/index-is5CvJWH.js +75 -0
- package/dist/web-assets/favicon.png +0 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0017_minds.sql +16 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/templates/_base/.init/.config/prompts.json +2 -2
- package/templates/_base/home/VOLUTE.md +5 -5
- package/templates/_base/src/lib/startup.ts +2 -2
- package/dist/channel-ZVZV42UD.js +0 -260
- package/dist/chunk-B2CPS4QU.js +0 -283
- package/dist/chunk-SIAG3QMM.js +0 -42
- package/dist/chunk-WSLPZF72.js +0 -173
- package/dist/connector-G722WXAU.js +0 -147
- package/dist/connectors/discord.js +0 -177
- package/dist/connectors/slack.js +0 -181
- package/dist/connectors/telegram.js +0 -187
- package/dist/down-7UKFMJJZ.js +0 -14
- package/dist/message-delivery-MS5JYPZX.js +0 -25
- package/dist/mind-manager-VVK67AY3.js +0 -19
- package/dist/sleep-manager-EE4NRN2Q.js +0 -29
- package/dist/up-SDMCSVI3.js +0 -17
- package/dist/variant-WWLDY6D5.js +0 -207
- package/dist/web-assets/assets/index-CUQ31ieL.js +0 -69
- package/dist/web-assets/assets/index-CW8NSl1o.css +0 -1
|
@@ -2,32 +2,28 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isSandboxEnabled,
|
|
4
4
|
wrapForSandbox
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-USUXRNVD.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
systemPrompts
|
|
10
|
-
} from "./chunk-WBHMQ5OZ.js";
|
|
7
|
+
loadMergedEnv
|
|
8
|
+
} from "./chunk-2WPW7OT6.js";
|
|
11
9
|
import {
|
|
12
10
|
logger_default
|
|
13
11
|
} from "./chunk-YUIHSKR6.js";
|
|
14
|
-
import {
|
|
15
|
-
loadMergedEnv
|
|
16
|
-
} from "./chunk-PHU4DEAJ.js";
|
|
17
12
|
import {
|
|
18
13
|
chownMindDir,
|
|
19
14
|
isIsolationEnabled,
|
|
20
15
|
wrapForIsolation
|
|
21
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RKQEHRBB.js";
|
|
22
17
|
import {
|
|
23
18
|
findMind,
|
|
24
|
-
|
|
19
|
+
getDb,
|
|
25
20
|
mindDir,
|
|
21
|
+
mindHistory,
|
|
26
22
|
setMindRunning,
|
|
27
|
-
setVariantRunning,
|
|
28
23
|
stateDir,
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
systemPrompts,
|
|
25
|
+
voluteSystemDir
|
|
26
|
+
} from "./chunk-H7OZRFJB.js";
|
|
31
27
|
|
|
32
28
|
// src/lib/daemon/mind-manager.ts
|
|
33
29
|
import { execFile, spawn } from "child_process";
|
|
@@ -144,7 +140,7 @@ Have a conversation with the human. Explore what kind of mind you want to be. Wh
|
|
|
144
140
|
category: "mind"
|
|
145
141
|
},
|
|
146
142
|
reply_instructions: {
|
|
147
|
-
content: 'To reply to this message, use: volute send ${channel} "your message"',
|
|
143
|
+
content: 'To reply to this message, use: volute chat send ${channel} "your message"',
|
|
148
144
|
description: "First-message reply hint injected via hook",
|
|
149
145
|
variables: ["channel"],
|
|
150
146
|
category: "mind"
|
|
@@ -160,7 +156,7 @@ Further messages will be saved to \${filePath}
|
|
|
160
156
|
|
|
161
157
|
To accept, add to .config/routes.json:
|
|
162
158
|
Rule: { "channel": "\${channel}", "session": "\${suggestedSession}" }
|
|
163
|
-
\${batchRecommendation}To respond, use: volute send \${channel} "your message"
|
|
159
|
+
\${batchRecommendation}To respond, use: volute chat send \${channel} "your message"
|
|
164
160
|
To reject, delete \${filePath}`,
|
|
165
161
|
description: "New channel notification template",
|
|
166
162
|
variables: [
|
|
@@ -313,9 +309,6 @@ function revokeMindToken(mindName) {
|
|
|
313
309
|
function resolveMindToken(token) {
|
|
314
310
|
return tokenToMind.get(token) ?? null;
|
|
315
311
|
}
|
|
316
|
-
function getMindToken(mindName) {
|
|
317
|
-
return mindToToken.get(mindName) ?? null;
|
|
318
|
-
}
|
|
319
312
|
|
|
320
313
|
// src/lib/daemon/restart-tracker.ts
|
|
321
314
|
var DEFAULT_MAX_ATTEMPTS = 5;
|
|
@@ -374,25 +367,23 @@ var MindManager = class {
|
|
|
374
367
|
shuttingDown = false;
|
|
375
368
|
restartTracker = new RestartTracker();
|
|
376
369
|
pendingContext = /* @__PURE__ */ new Map();
|
|
377
|
-
resolveTarget(name) {
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
if (
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
if (!variant) throw new Error(`Unknown variant: ${variantName} (mind: ${baseName})`);
|
|
384
|
-
return { dir: variant.path, port: variant.port, isVariant: true, baseName, variantName };
|
|
370
|
+
async resolveTarget(name) {
|
|
371
|
+
const entry = await findMind(name);
|
|
372
|
+
if (!entry) throw new Error(`Unknown mind: ${name}`);
|
|
373
|
+
if (entry.parent) {
|
|
374
|
+
if (!entry.dir) throw new Error(`Variant ${name} has no directory`);
|
|
375
|
+
return { dir: entry.dir, port: entry.port, baseName: entry.parent };
|
|
385
376
|
}
|
|
386
|
-
const dir = mindDir(
|
|
377
|
+
const dir = mindDir(name);
|
|
387
378
|
if (!existsSync3(dir)) throw new Error(`Mind directory missing: ${dir}`);
|
|
388
|
-
return { dir, port: entry.port,
|
|
379
|
+
return { dir, port: entry.port, baseName: name };
|
|
389
380
|
}
|
|
390
381
|
async startMind(name) {
|
|
391
382
|
if (this.minds.has(name)) {
|
|
392
383
|
throw new Error(`Mind ${name} is already running`);
|
|
393
384
|
}
|
|
394
|
-
const target = this.resolveTarget(name);
|
|
395
|
-
const { dir,
|
|
385
|
+
const target = await this.resolveTarget(name);
|
|
386
|
+
const { dir, baseName } = target;
|
|
396
387
|
const port = target.port;
|
|
397
388
|
const pidFile = mindPidPath(name);
|
|
398
389
|
try {
|
|
@@ -463,7 +454,7 @@ var MindManager = class {
|
|
|
463
454
|
let spawnCmd;
|
|
464
455
|
let spawnArgs;
|
|
465
456
|
if (isIsolationEnabled()) {
|
|
466
|
-
[spawnCmd, spawnArgs] = wrapForIsolation(tsxBin, tsxArgs, name);
|
|
457
|
+
[spawnCmd, spawnArgs] = await wrapForIsolation(tsxBin, tsxArgs, name);
|
|
467
458
|
} else if (isSandboxEnabled()) {
|
|
468
459
|
[spawnCmd, spawnArgs] = await wrapForSandbox(tsxBin, tsxArgs, dir, name);
|
|
469
460
|
} else {
|
|
@@ -519,11 +510,7 @@ var MindManager = class {
|
|
|
519
510
|
}
|
|
520
511
|
if (this.restartTracker.reset(name)) this.saveCrashAttempts();
|
|
521
512
|
this.setupCrashRecovery(name, child);
|
|
522
|
-
|
|
523
|
-
setVariantRunning(baseName, variantName, true);
|
|
524
|
-
} else {
|
|
525
|
-
setMindRunning(name, true);
|
|
526
|
-
}
|
|
513
|
+
await setMindRunning(name, true);
|
|
527
514
|
mlog.info(`started mind ${name} on port ${port}`);
|
|
528
515
|
await this.deliverPendingContext(name);
|
|
529
516
|
}
|
|
@@ -581,7 +568,7 @@ var MindManager = class {
|
|
|
581
568
|
if (this.shuttingDown || this.stopping.has(name)) return;
|
|
582
569
|
mlog.error(`mind ${name} exited with code ${code}`);
|
|
583
570
|
try {
|
|
584
|
-
const { getSleepManagerIfReady } = await import("./sleep-manager-
|
|
571
|
+
const { getSleepManagerIfReady } = await import("./sleep-manager-MWYHM5HV.js");
|
|
585
572
|
const sleepState = getSleepManagerIfReady()?.getState(name);
|
|
586
573
|
if (sleepState?.sleeping) {
|
|
587
574
|
mlog.info(`${name} is sleeping \u2014 skipping crash recovery`);
|
|
@@ -590,20 +577,15 @@ var MindManager = class {
|
|
|
590
577
|
} catch (err) {
|
|
591
578
|
mlog.warn(`failed to check sleep state for ${name}`, logger_default.errorData(err));
|
|
592
579
|
}
|
|
593
|
-
import("./mind-activity-tracker-
|
|
594
|
-
import("./activity-events-
|
|
580
|
+
import("./mind-activity-tracker-EN6XNXPF.js").then(({ markIdle }) => markIdle(name)).catch((err) => mlog.warn(`failed to mark ${name} idle after crash`, logger_default.errorData(err)));
|
|
581
|
+
import("./activity-events-BBIEA2F4.js").then(
|
|
595
582
|
({ publish }) => publish({ type: "mind_stopped", mind: name, summary: `${name} crashed (exit ${code})` })
|
|
596
583
|
).catch((err) => mlog.warn(`failed to publish crash event for ${name}`, logger_default.errorData(err)));
|
|
597
584
|
const { shouldRestart, delay, attempt } = this.restartTracker.recordCrash(name);
|
|
598
585
|
this.saveCrashAttempts();
|
|
599
586
|
if (!shouldRestart) {
|
|
600
587
|
mlog.error(`${name} crashed ${attempt} times \u2014 giving up on restart`);
|
|
601
|
-
|
|
602
|
-
if (variant) {
|
|
603
|
-
setVariantRunning(base, variant, false);
|
|
604
|
-
} else {
|
|
605
|
-
setMindRunning(name, false);
|
|
606
|
-
}
|
|
588
|
+
await setMindRunning(name, false);
|
|
607
589
|
return;
|
|
608
590
|
}
|
|
609
591
|
mlog.info(
|
|
@@ -643,12 +625,7 @@ var MindManager = class {
|
|
|
643
625
|
if (this.restartTracker.reset(name)) this.saveCrashAttempts();
|
|
644
626
|
rmSync2(mindPidPath(name), { force: true });
|
|
645
627
|
if (!this.shuttingDown) {
|
|
646
|
-
|
|
647
|
-
if (variantName) {
|
|
648
|
-
setVariantRunning(baseName, variantName, false);
|
|
649
|
-
} else {
|
|
650
|
-
setMindRunning(name, false);
|
|
651
|
-
}
|
|
628
|
+
await setMindRunning(name, false);
|
|
652
629
|
}
|
|
653
630
|
mlog.info(`stopped mind ${name}`);
|
|
654
631
|
}
|
|
@@ -668,7 +645,7 @@ var MindManager = class {
|
|
|
668
645
|
return [...this.minds.keys()];
|
|
669
646
|
}
|
|
670
647
|
get crashAttemptsPath() {
|
|
671
|
-
return resolve(
|
|
648
|
+
return resolve(voluteSystemDir(), "crash-attempts.json");
|
|
672
649
|
}
|
|
673
650
|
loadCrashAttempts() {
|
|
674
651
|
this.restartTracker.load(loadJsonMap(this.crashAttemptsPath));
|
|
@@ -721,8 +698,6 @@ function getMindManager() {
|
|
|
721
698
|
|
|
722
699
|
export {
|
|
723
700
|
RotatingLog,
|
|
724
|
-
resolveMindToken,
|
|
725
|
-
getMindToken,
|
|
726
701
|
RestartTracker,
|
|
727
702
|
PROMPT_KEYS,
|
|
728
703
|
PROMPT_DEFAULTS,
|
|
@@ -733,6 +708,7 @@ export {
|
|
|
733
708
|
loadJsonMap,
|
|
734
709
|
saveJsonMap,
|
|
735
710
|
clearJsonMap,
|
|
711
|
+
resolveMindToken,
|
|
736
712
|
MindManager,
|
|
737
713
|
initMindManager,
|
|
738
714
|
getMindManager
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
getBaseName,
|
|
3
4
|
validateMindName
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H7OZRFJB.js";
|
|
5
6
|
|
|
6
7
|
// src/lib/isolation.ts
|
|
7
8
|
import { execFileSync } from "child_process";
|
|
@@ -138,9 +139,9 @@ function deleteMindUser(name) {
|
|
|
138
139
|
} catch {
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
|
-
function wrapForIsolation(cmd, args, mindName) {
|
|
142
|
+
async function wrapForIsolation(cmd, args, mindName) {
|
|
142
143
|
if (!isIsolationEnabled()) return [cmd, args];
|
|
143
|
-
const baseName = mindName
|
|
144
|
+
const baseName = await getBaseName(mindName);
|
|
144
145
|
const user = mindUserName(baseName);
|
|
145
146
|
if (process.platform === "darwin") {
|
|
146
147
|
return ["sudo", ["-u", user, "--", cmd, ...args]];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/lib/slugify.ts
|
|
4
|
+
function slugify(text) {
|
|
5
|
+
return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
6
|
+
}
|
|
7
|
+
function buildVoluteSlug(opts) {
|
|
8
|
+
if (opts.convType === "channel" && opts.convName) {
|
|
9
|
+
return `volute:#${opts.convName}`;
|
|
10
|
+
}
|
|
11
|
+
const isDM = opts.participants.length === 2;
|
|
12
|
+
if (isDM) {
|
|
13
|
+
const other = opts.participants.find((p) => p.username !== opts.mindUsername);
|
|
14
|
+
const otherSlug = other ? slugify(other.username) : "";
|
|
15
|
+
return otherSlug ? `volute:@${otherSlug}` : `volute:${opts.conversationId}`;
|
|
16
|
+
}
|
|
17
|
+
return opts.convTitle ? `volute:${slugify(opts.convTitle)}` : `volute:${opts.conversationId}`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
slugify,
|
|
22
|
+
buildVoluteSlug
|
|
23
|
+
};
|
|
@@ -4,13 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-YUIHSKR6.js";
|
|
5
5
|
import {
|
|
6
6
|
readGlobalConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IKRVFPWU.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
getBaseName,
|
|
10
|
+
readRegistry,
|
|
11
|
+
voluteHome,
|
|
12
|
+
voluteSystemDir,
|
|
13
|
+
voluteUserHome
|
|
14
|
+
} from "./chunk-H7OZRFJB.js";
|
|
11
15
|
|
|
12
16
|
// src/lib/sandbox.ts
|
|
13
|
-
import { existsSync, readFileSync } from "fs";
|
|
14
17
|
import { resolve } from "path";
|
|
15
18
|
var slog = logger_default.child("sandbox");
|
|
16
19
|
var sandboxManager = null;
|
|
@@ -43,28 +46,25 @@ async function initSandbox() {
|
|
|
43
46
|
);
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
|
-
function buildDenyRead(mindName, mindDir) {
|
|
49
|
+
async function buildDenyRead(mindName, mindDir) {
|
|
47
50
|
const home = voluteHome();
|
|
48
51
|
const userHome = process.env.HOME || "";
|
|
49
52
|
const mindsDir = process.env.VOLUTE_MINDS_DIR || resolve(home, "minds");
|
|
50
53
|
const deny = [];
|
|
51
|
-
deny.push(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
deny.push(voluteSystemDir());
|
|
55
|
+
const userVoluteHome = voluteUserHome();
|
|
56
|
+
if (userVoluteHome !== home) {
|
|
57
|
+
deny.push(userVoluteHome);
|
|
58
|
+
} else {
|
|
59
|
+
deny.push(resolve(home, "systems.json"));
|
|
60
|
+
}
|
|
58
61
|
try {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (otherDir !== mindDir) {
|
|
66
|
-
deny.push(otherDir);
|
|
67
|
-
}
|
|
62
|
+
const entries = await readRegistry();
|
|
63
|
+
for (const entry of entries) {
|
|
64
|
+
if (entry.name === await getBaseName(mindName)) continue;
|
|
65
|
+
const otherDir = resolve(mindsDir, entry.name);
|
|
66
|
+
if (otherDir !== mindDir) {
|
|
67
|
+
deny.push(otherDir);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
} catch (err) {
|
|
@@ -83,7 +83,7 @@ function shellEscape(s) {
|
|
|
83
83
|
}
|
|
84
84
|
async function wrapForSandbox(cmd, args, mindDir, mindName, allowWrite) {
|
|
85
85
|
if (!sandboxManager) return [cmd, args];
|
|
86
|
-
const denyRead = buildDenyRead(mindName, mindDir);
|
|
86
|
+
const denyRead = await buildDenyRead(mindName, mindDir);
|
|
87
87
|
const customConfig = {
|
|
88
88
|
filesystem: {
|
|
89
89
|
denyRead,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
activity,
|
|
4
|
-
getDb
|
|
5
|
-
} from "./chunk-WBHMQ5OZ.js";
|
|
6
2
|
import {
|
|
7
3
|
logger_default
|
|
8
4
|
} from "./chunk-YUIHSKR6.js";
|
|
5
|
+
import {
|
|
6
|
+
activity,
|
|
7
|
+
getDb
|
|
8
|
+
} from "./chunk-H7OZRFJB.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/events/activity-events.ts
|
|
11
11
|
var subscribers = /* @__PURE__ */ new Set();
|
package/dist/cli.js
CHANGED
|
@@ -9,13 +9,13 @@ if (!process.env.VOLUTE_HOME) {
|
|
|
9
9
|
var command = process.argv[2];
|
|
10
10
|
var args = process.argv.slice(3);
|
|
11
11
|
if (command === "--version" || command === "-v") {
|
|
12
|
-
const { default: pkg } = await import("./package-
|
|
12
|
+
const { default: pkg } = await import("./package-7WY6VKU3.js");
|
|
13
13
|
console.log(pkg.version);
|
|
14
14
|
process.exit(0);
|
|
15
15
|
}
|
|
16
16
|
var ungatedCommands = /* @__PURE__ */ new Set(["setup", "--help", "-h", "--version", "-v", "update", void 0]);
|
|
17
17
|
if (!ungatedCommands.has(command)) {
|
|
18
|
-
const { isSetupComplete, migrateSetupConfig } = await import("./setup-
|
|
18
|
+
const { isSetupComplete, migrateSetupConfig } = await import("./setup-JHL5ZEST.js");
|
|
19
19
|
migrateSetupConfig();
|
|
20
20
|
if (!isSetupComplete()) {
|
|
21
21
|
console.error("Volute is not set up. Run `volute setup` first.");
|
|
@@ -24,70 +24,64 @@ if (!ungatedCommands.has(command)) {
|
|
|
24
24
|
}
|
|
25
25
|
switch (command) {
|
|
26
26
|
case "setup":
|
|
27
|
-
await import("./setup-
|
|
27
|
+
await import("./setup-JG4QAEBV.js").then((m) => m.run(args));
|
|
28
28
|
break;
|
|
29
29
|
case "mind":
|
|
30
|
-
await import("./mind-
|
|
30
|
+
await import("./mind-DI33C74K.js").then((m) => m.run(args));
|
|
31
31
|
break;
|
|
32
|
-
case "
|
|
33
|
-
await import("./
|
|
34
|
-
break;
|
|
35
|
-
case "history":
|
|
36
|
-
await import("./history-B64GTFTD.js").then((m) => m.run(args));
|
|
32
|
+
case "chat":
|
|
33
|
+
await import("./chat-MHJ3L6JQ.js").then((m) => m.run(args));
|
|
37
34
|
break;
|
|
38
35
|
case "variant":
|
|
39
|
-
await import("./variant-
|
|
40
|
-
break;
|
|
41
|
-
case "channel":
|
|
42
|
-
await import("./channel-ZVZV42UD.js").then((m) => m.run(args));
|
|
36
|
+
await import("./variant-7TGZHOU3.js").then((m) => m.run(args));
|
|
43
37
|
break;
|
|
44
38
|
case "schedule":
|
|
45
|
-
await import("./schedule-
|
|
39
|
+
await import("./schedule-QTJMFATP.js").then((m) => m.run(args));
|
|
46
40
|
break;
|
|
47
41
|
case "skill":
|
|
48
|
-
await import("./skill-
|
|
42
|
+
await import("./skill-AUAQTSP5.js").then((m) => m.run(args));
|
|
49
43
|
break;
|
|
50
44
|
case "shared":
|
|
51
|
-
await import("./shared-
|
|
45
|
+
await import("./shared-ML5I4Q2A.js").then((m) => m.run(args));
|
|
52
46
|
break;
|
|
53
47
|
case "file":
|
|
54
|
-
await import("./file-
|
|
48
|
+
await import("./file-CR36YUPD.js").then((m) => m.run(args));
|
|
55
49
|
break;
|
|
56
50
|
case "env":
|
|
57
|
-
await import("./env-
|
|
51
|
+
await import("./env-YJMUMFIY.js").then((m) => m.run(args));
|
|
58
52
|
break;
|
|
59
53
|
case "up":
|
|
60
|
-
await import("./up-
|
|
54
|
+
await import("./up-NKSMXBWR.js").then((m) => m.run(args));
|
|
61
55
|
break;
|
|
62
56
|
case "down":
|
|
63
|
-
await import("./down-
|
|
57
|
+
await import("./down-LVBXEULC.js").then((m) => m.run(args));
|
|
64
58
|
break;
|
|
65
59
|
case "restart":
|
|
66
|
-
await import("./daemon-restart-
|
|
60
|
+
await import("./daemon-restart-M2QTYMEG.js").then((m) => m.run(args));
|
|
67
61
|
break;
|
|
68
62
|
case "service":
|
|
69
|
-
await import("./service-
|
|
63
|
+
await import("./service-6LIN3F3K.js").then((m) => m.run(args));
|
|
70
64
|
break;
|
|
71
65
|
case "update":
|
|
72
|
-
await import("./update-
|
|
66
|
+
await import("./update-PTSH22AZ.js").then((m) => m.run(args));
|
|
73
67
|
break;
|
|
74
68
|
case "status":
|
|
75
|
-
await import("./status-
|
|
69
|
+
await import("./status-77YEPHMW.js").then((m) => m.run(args));
|
|
76
70
|
break;
|
|
77
71
|
case "notes":
|
|
78
|
-
await import("./notes-
|
|
72
|
+
await import("./notes-XCER3I7M.js").then((m) => m.run(args));
|
|
79
73
|
break;
|
|
80
74
|
case "pages":
|
|
81
|
-
await import("./pages-
|
|
75
|
+
await import("./pages-6EBS6CBR.js").then((m) => m.run(args));
|
|
82
76
|
break;
|
|
83
77
|
case "auth":
|
|
84
|
-
await import("./auth-
|
|
78
|
+
await import("./auth-D3OT2ARB.js").then((m) => m.run(args));
|
|
85
79
|
break;
|
|
86
80
|
case "login":
|
|
87
|
-
await import("./login-
|
|
81
|
+
await import("./login-3QZNR2DF.js").then((m) => m.run(args));
|
|
88
82
|
break;
|
|
89
83
|
case "logout":
|
|
90
|
-
await import("./logout-
|
|
84
|
+
await import("./logout-T53VKCPU.js").then((m) => m.run(args));
|
|
91
85
|
break;
|
|
92
86
|
case "--help":
|
|
93
87
|
case "-h":
|
|
@@ -95,8 +89,10 @@ switch (command) {
|
|
|
95
89
|
console.log(`volute \u2014 create and manage AI minds
|
|
96
90
|
|
|
97
91
|
Common:
|
|
98
|
-
send <target> "<msg>"
|
|
99
|
-
history [--channel <ch>]
|
|
92
|
+
chat send <target> "<msg>" Send a message
|
|
93
|
+
chat history [--channel <ch>] View activity history
|
|
94
|
+
chat list / read / create Manage conversations
|
|
95
|
+
chat bridge Manage platform bridges
|
|
100
96
|
status Show system status
|
|
101
97
|
|
|
102
98
|
Mind:
|
|
@@ -105,14 +101,13 @@ Mind:
|
|
|
105
101
|
mind start/stop/restart [name] Control a mind
|
|
106
102
|
mind list List all minds
|
|
107
103
|
mind status [name] Check a mind's status
|
|
108
|
-
mind connect/disconnect <type> Manage connectors
|
|
109
104
|
mind logs [name] [--follow] Tail mind logs
|
|
110
105
|
mind sprout Complete orientation
|
|
106
|
+
mind split/join Create and merge experimental splits
|
|
111
107
|
mind upgrade/import/export Lifecycle operations
|
|
112
108
|
|
|
113
109
|
Configuration:
|
|
114
|
-
|
|
115
|
-
variant Create and merge experimental variants
|
|
110
|
+
chat Conversations, messages, and platform bridges
|
|
116
111
|
schedule Manage cron schedules
|
|
117
112
|
skill Browse and install skills
|
|
118
113
|
env Manage environment variables
|
|
@@ -135,7 +130,7 @@ Options:
|
|
|
135
130
|
|
|
136
131
|
Run 'volute <command> --help' for details.
|
|
137
132
|
|
|
138
|
-
Mind-scoped commands (
|
|
133
|
+
Mind-scoped commands (chat, schedule, file, skill, shared, pages)
|
|
139
134
|
use --mind <name> or VOLUTE_MIND env var to identify the mind.`);
|
|
140
135
|
break;
|
|
141
136
|
default:
|
|
@@ -144,7 +139,7 @@ Run 'volute --help' for usage.`);
|
|
|
144
139
|
process.exit(1);
|
|
145
140
|
}
|
|
146
141
|
if (command !== "update") {
|
|
147
|
-
import("./update-check-
|
|
142
|
+
import("./update-check-64FWC4Y2.js").then((m) => m.checkForUpdate()).then((result) => {
|
|
148
143
|
if (result.updateAvailable) {
|
|
149
144
|
console.error(`
|
|
150
145
|
Update available: ${result.current} \u2192 ${result.latest}`);
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
deliverMessage
|
|
3
|
+
deliverMessage
|
|
4
|
+
} from "./chunk-OQZH4PBB.js";
|
|
5
|
+
import "./chunk-KDGS53OS.js";
|
|
6
|
+
import "./chunk-K5NAC55T.js";
|
|
7
|
+
import "./chunk-PHSAT7YL.js";
|
|
8
|
+
import "./chunk-USUXRNVD.js";
|
|
9
|
+
import {
|
|
4
10
|
getAuthHeaders,
|
|
5
11
|
getWebhookUrl
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-J2CO4WEV.js";
|
|
10
|
-
import "./chunk-2VO7453N.js";
|
|
11
|
-
import "./chunk-UTL75LP6.js";
|
|
12
|
-
import "./chunk-WBHMQ5OZ.js";
|
|
12
|
+
} from "./chunk-IAYBDWVG.js";
|
|
13
|
+
import "./chunk-VIVMW2H2.js";
|
|
14
|
+
import "./chunk-2WPW7OT6.js";
|
|
13
15
|
import {
|
|
14
16
|
logger_default
|
|
15
17
|
} from "./chunk-YUIHSKR6.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-B2CPS4QU.js";
|
|
18
|
+
import "./chunk-AW7PFDVN.js";
|
|
19
|
+
import "./chunk-RKQEHRBB.js";
|
|
20
|
+
import "./chunk-IKRVFPWU.js";
|
|
21
|
+
import "./chunk-T6HKBWXZ.js";
|
|
22
|
+
import "./chunk-H7OZRFJB.js";
|
|
22
23
|
import "./chunk-K3NQKI34.js";
|
|
23
24
|
|
|
24
25
|
// src/lib/cloud-sync.ts
|