volute 0.18.0 → 0.20.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 +67 -67
- package/dist/activity-events-OMXKXD5N.js +16 -0
- package/dist/archive-ZCFOSTKB.js +15 -0
- package/dist/{channel-SLURLIRV.js → channel-PUQKGSQM.js} +60 -7
- package/dist/{chunk-6BDNWYKG.js → chunk-32VR2EOH.js} +2 -2
- package/dist/chunk-5XNT2472.js +36 -0
- package/dist/{chunk-QJIIHU32.js → chunk-7NO7EV5Z.js} +2 -2
- package/dist/{chunk-6DVBMLVN.js → chunk-7UFKREVW.js} +2 -2
- package/dist/chunk-AW7P4EVV.js +159 -0
- package/dist/{chunk-2Y77MCFG.js → chunk-DYZGP3EW.js} +2 -2
- package/dist/{chunk-M77QBTEH.js → chunk-EBGCNDMM.js} +24 -14
- package/dist/{chunk-37X7ECMF.js → chunk-FCDU5BFX.js} +1 -1
- package/dist/chunk-FGSYHIS3.js +891 -0
- package/dist/chunk-GZ7DW4YL.js +97 -0
- package/dist/chunk-IKMY5X76.js +375 -0
- package/dist/chunk-NSE7VJQA.js +159 -0
- package/dist/{chunk-GSPWIM5E.js → chunk-O6ASDHFO.js} +79 -7
- package/dist/{chunk-ZCEYUUID.js → chunk-OGXOMR65.js} +2 -1
- package/dist/{chunk-AYB7XAWO.js → chunk-PUVXOZ6T.js} +120 -279
- package/dist/{chunk-GK4E7LM7.js → chunk-RHEGSQFJ.js} +1 -1
- package/dist/{chunk-MVSXRMJJ.js → chunk-SCUDS4US.js} +1 -1
- package/dist/chunk-TIWH32HP.js +227 -0
- package/dist/{chunk-FW5API7X.js → chunk-UJ6GHNR7.js} +2 -2
- package/dist/chunk-UU7A7KLB.js +58 -0
- package/dist/{chunk-OYSZNX5I.js → chunk-VDWCHYTS.js} +1 -1
- package/dist/{chunk-OJQ47SCA.js → chunk-WC6ZHVRL.js} +1 -1
- package/dist/chunk-YUIHSKR6.js +72 -0
- package/dist/cli.js +43 -25
- package/dist/{connector-3ELFMI2R.js → connector-JBVNZ7VK.js} +6 -6
- package/dist/connectors/discord.js +2 -2
- package/dist/connectors/slack.js +2 -2
- package/dist/connectors/telegram.js +2 -2
- package/dist/{create-ZWHCRT5F.js → create-HP4OVVHF.js} +6 -4
- package/dist/{daemon-client-ODKDUYDE.js → daemon-client-ITWUCNFO.js} +2 -2
- package/dist/{daemon-restart-2HVTHZAT.js → daemon-restart-KPSWNYTH.js} +6 -6
- package/dist/daemon.js +2463 -1707
- package/dist/db-C2CJ46ZU.js +10 -0
- package/dist/{delete-6G6WEX4F.js → delete-BSU7K3RY.js} +1 -1
- package/dist/delivery-manager-CSG7LXA4.js +16 -0
- package/dist/down-ZY35KMHR.js +14 -0
- package/dist/{env-6IDWGBUH.js → env-A3LMO777.js} +6 -6
- package/dist/export-6QBUOQGC.js +100 -0
- package/dist/file-C57SK5DK.js +204 -0
- package/dist/{history-YUEKTJ2N.js → history-WNK3DFUM.js} +6 -6
- package/dist/{import-EDGRLIGO.js → import-XEC34Y4Z.js} +3 -3
- package/dist/log-PPPZDVEF.js +39 -0
- package/dist/{login-ORQDXLBM.js → login-HNH3EUQV.js} +2 -2
- package/dist/{logout-XC5AUO5I.js → logout-I5CB5UZS.js} +2 -2
- package/dist/{logs-GYOR3L2L.js → logs-SF2IMJN4.js} +6 -6
- package/dist/merge-33C237A4.js +46 -0
- package/dist/{mind-OJN6RBZW.js → mind-Z7CKD6DG.js} +14 -10
- package/dist/mind-activity-tracker-624QLQLC.js +19 -0
- package/dist/mind-manager-3DMYKZPB.js +18 -0
- package/dist/{package-OKLFO7UY.js → package-4NHAVUUI.js} +5 -3
- package/dist/{pages-6IV4VQTU.js → pages-4DGQT7ZA.js} +2 -2
- package/dist/{publish-Q4RPSJLL.js → publish-TAJUET4I.js} +22 -5
- package/dist/pull-XAEWQJ47.js +39 -0
- package/dist/{register-LDE6LRXY.js → register-VSPCMHKX.js} +2 -2
- package/dist/{restart-YFAWFS5T.js → restart-IQKMCK5M.js} +6 -6
- package/dist/{schedule-AGYLDMNS.js → schedule-FFZG23IW.js} +31 -11
- package/dist/schema-GFH6RV3W.js +26 -0
- package/dist/{seed-AP4Q7RZ7.js → seed-J43YDKXG.js} +7 -4
- package/dist/{send-BNDTLUPM.js → send-KVIZIGCE.js} +8 -8
- package/dist/{service-U7MZ2H7F.js → service-LUR7WDO7.js} +6 -6
- package/dist/{setup-DJKIZKGW.js → setup-52YRV7VP.js} +23 -7
- package/dist/shared-KO35ZM44.js +39 -0
- package/dist/{skill-2Y42P4JY.js → skill-BCVNI6TV.js} +6 -6
- package/{templates/_base/_skills → dist/skills}/orientation/SKILL.md +1 -1
- package/{templates/_base/_skills → dist/skills}/sessions/SKILL.md +2 -2
- package/{templates/_base/_skills → dist/skills}/volute-mind/SKILL.md +51 -3
- package/dist/{sprout-TJ3BHVOG.js → sprout-QN7Y4VVO.js} +38 -20
- package/dist/{start-3YYRXBKP.js → start-I5JYB65M.js} +6 -6
- package/dist/{status-VSFZYX7S.js → status-4ESFLGH4.js} +5 -5
- package/dist/status-D7E5HHBV.js +35 -0
- package/dist/{status-OKNA6AR3.js → status-FU2PFVVF.js} +5 -4
- package/dist/{stop-AA5K5LYG.js → stop-NBVKEFQQ.js} +6 -6
- package/dist/{up-7B3BWF2U.js → up-FS7CKM6V.js} +5 -5
- package/dist/{update-YAGN5ODG.js → update-FJIHDJKM.js} +5 -5
- package/dist/{update-check-APLTH4IN.js → update-check-MWE5AH4U.js} +2 -2
- package/dist/{upgrade-KXZCQSZN.js → upgrade-AIT24B5I.js} +1 -1
- package/dist/{variant-X5QFG6KK.js → variant-63ZWO2W7.js} +4 -4
- package/dist/variants-JAGWGBXG.js +26 -0
- package/dist/web-assets/assets/index-CUZTZzaW.js +64 -0
- package/dist/web-assets/assets/index-adVuCkqy.css +1 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0010_delivery_queue.sql +12 -0
- package/drizzle/0011_rename_human_to_brain.sql +1 -0
- package/drizzle/0012_activity.sql +11 -0
- package/drizzle/meta/0010_snapshot.json +7 -0
- package/drizzle/meta/0011_snapshot.json +7 -0
- package/drizzle/meta/0012_snapshot.json +7 -0
- package/drizzle/meta/_journal.json +21 -0
- package/package.json +5 -3
- package/templates/_base/.init/.config/hooks/startup-context.sh +1 -1
- package/templates/_base/.init/.config/scripts/session-reader.ts +3 -3
- package/templates/_base/home/.config/routes.json +2 -2
- package/templates/_base/home/VOLUTE.md +16 -1
- package/templates/_base/src/lib/auto-commit.ts +51 -14
- package/templates/_base/src/lib/daemon-client.ts +22 -0
- package/templates/_base/src/lib/router.ts +123 -1
- package/templates/_base/src/lib/transparency.ts +1 -1
- package/templates/_base/src/lib/types.ts +4 -0
- package/templates/_base/src/lib/volute-server.ts +91 -2
- package/templates/claude/.init/.config/routes.json +7 -1
- package/templates/claude/src/server.ts +2 -2
- package/templates/claude/volute-template.json +1 -2
- package/templates/pi/.init/.config/routes.json +7 -1
- package/templates/pi/src/agent.ts +12 -6
- package/templates/pi/src/lib/session-context-extension.ts +6 -4
- package/templates/pi/src/server.ts +2 -0
- package/templates/pi/volute-template.json +1 -2
- package/dist/chunk-PO5Q2AYN.js +0 -121
- package/dist/down-A56B5JLK.js +0 -14
- package/dist/mind-manager-Z7O7PN2O.js +0 -15
- package/dist/web-assets/assets/index-CtiimdWK.css +0 -1
- package/dist/web-assets/assets/index-kt1_EcuO.js +0 -63
- /package/{templates/_base/_skills → dist/skills}/memory/SKILL.md +0 -0
|
@@ -13,7 +13,7 @@ async function run(args) {
|
|
|
13
13
|
force: { type: "boolean" }
|
|
14
14
|
});
|
|
15
15
|
const name = resolveMindName({ mind: positional[0] });
|
|
16
|
-
const { daemonFetch } = await import("./daemon-client-
|
|
16
|
+
const { daemonFetch } = await import("./daemon-client-ITWUCNFO.js");
|
|
17
17
|
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
18
18
|
const client = getClient();
|
|
19
19
|
const url = urlOf(client.api.minds[":name"].$url({ param: { name } })) + (flags.force ? "?force=true" : "");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
DeliveryManager,
|
|
4
|
+
getDeliveryManager,
|
|
5
|
+
initDeliveryManager
|
|
6
|
+
} from "./chunk-FGSYHIS3.js";
|
|
7
|
+
import "./chunk-YUIHSKR6.js";
|
|
8
|
+
import "./chunk-5XNT2472.js";
|
|
9
|
+
import "./chunk-NSE7VJQA.js";
|
|
10
|
+
import "./chunk-EBGCNDMM.js";
|
|
11
|
+
import "./chunk-K3NQKI34.js";
|
|
12
|
+
export {
|
|
13
|
+
DeliveryManager,
|
|
14
|
+
getDeliveryManager,
|
|
15
|
+
initDeliveryManager
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
run,
|
|
4
|
+
stopDaemon
|
|
5
|
+
} from "./chunk-7NO7EV5Z.js";
|
|
6
|
+
import "./chunk-32VR2EOH.js";
|
|
7
|
+
import "./chunk-DYZGP3EW.js";
|
|
8
|
+
import "./chunk-OGXOMR65.js";
|
|
9
|
+
import "./chunk-EBGCNDMM.js";
|
|
10
|
+
import "./chunk-K3NQKI34.js";
|
|
11
|
+
export {
|
|
12
|
+
run,
|
|
13
|
+
stopDaemon
|
|
14
|
+
};
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
promptLine
|
|
4
4
|
} from "./chunk-RVKR2R7F.js";
|
|
5
|
+
import {
|
|
6
|
+
getClient,
|
|
7
|
+
urlOf
|
|
8
|
+
} from "./chunk-4RQBJWQX.js";
|
|
5
9
|
import {
|
|
6
10
|
parseArgs
|
|
7
11
|
} from "./chunk-D424ZQGI.js";
|
|
8
12
|
import {
|
|
9
13
|
daemonFetch
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
getClient,
|
|
14
|
-
urlOf
|
|
15
|
-
} from "./chunk-4RQBJWQX.js";
|
|
14
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
15
|
+
import "./chunk-EBGCNDMM.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/env.ts
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
addHistoryToArchive,
|
|
4
|
+
createExportArchive
|
|
5
|
+
} from "./chunk-AW7P4EVV.js";
|
|
6
|
+
import {
|
|
7
|
+
parseArgs
|
|
8
|
+
} from "./chunk-D424ZQGI.js";
|
|
9
|
+
import {
|
|
10
|
+
findMind,
|
|
11
|
+
mindDir
|
|
12
|
+
} from "./chunk-EBGCNDMM.js";
|
|
13
|
+
import "./chunk-K3NQKI34.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/export.ts
|
|
16
|
+
import { existsSync, writeFileSync } from "fs";
|
|
17
|
+
import { resolve } from "path";
|
|
18
|
+
async function run(args) {
|
|
19
|
+
const { positional, flags } = parseArgs(args, {
|
|
20
|
+
"include-env": { type: "boolean" },
|
|
21
|
+
"include-identity": { type: "boolean" },
|
|
22
|
+
"include-connectors": { type: "boolean" },
|
|
23
|
+
"include-history": { type: "boolean" },
|
|
24
|
+
"include-sessions": { type: "boolean" },
|
|
25
|
+
all: { type: "boolean" },
|
|
26
|
+
output: { type: "string" }
|
|
27
|
+
});
|
|
28
|
+
const name = positional[0];
|
|
29
|
+
if (!name) {
|
|
30
|
+
console.error(
|
|
31
|
+
"Usage: volute mind export <name> [--include-env] [--include-identity] [--include-connectors] [--include-history] [--include-sessions] [--all] [--output <path>]"
|
|
32
|
+
);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const entry = findMind(name);
|
|
36
|
+
if (!entry) {
|
|
37
|
+
console.error(`Unknown mind: ${name}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
const dir = mindDir(name);
|
|
41
|
+
if (!existsSync(dir)) {
|
|
42
|
+
console.error(`Mind directory missing: ${dir}`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
const includeAll = flags.all;
|
|
46
|
+
const includeEnv = includeAll || flags["include-env"];
|
|
47
|
+
const includeIdentity = includeAll || flags["include-identity"];
|
|
48
|
+
const includeConnectors = includeAll || flags["include-connectors"];
|
|
49
|
+
const includeHistory = includeAll || flags["include-history"];
|
|
50
|
+
const includeSessions = includeAll || flags["include-sessions"];
|
|
51
|
+
const zip = createExportArchive({
|
|
52
|
+
name,
|
|
53
|
+
template: entry.template ?? "claude",
|
|
54
|
+
includeEnv,
|
|
55
|
+
includeIdentity,
|
|
56
|
+
includeConnectors,
|
|
57
|
+
includeHistory,
|
|
58
|
+
includeSessions
|
|
59
|
+
});
|
|
60
|
+
if (includeHistory) {
|
|
61
|
+
try {
|
|
62
|
+
const { getDb } = await import("./db-C2CJ46ZU.js");
|
|
63
|
+
const { eq } = await import("drizzle-orm");
|
|
64
|
+
const { mindHistory } = await import("./schema-GFH6RV3W.js");
|
|
65
|
+
const db = await getDb();
|
|
66
|
+
const rows = await db.select().from(mindHistory).where(eq(mindHistory.mind, name));
|
|
67
|
+
addHistoryToArchive(zip, rows);
|
|
68
|
+
} catch (err) {
|
|
69
|
+
console.error(`Error: could not export history: ${err.message}`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const outputPath = resolve(flags.output ?? `${name}.volute`);
|
|
74
|
+
const buf = zip.toBuffer();
|
|
75
|
+
try {
|
|
76
|
+
writeFileSync(outputPath, buf);
|
|
77
|
+
} catch (err) {
|
|
78
|
+
console.error(`Failed to write archive to ${outputPath}: ${err.message}`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
const sizeMB = (buf.length / 1024 / 1024).toFixed(2);
|
|
82
|
+
console.log(`
|
|
83
|
+
Exported ${name} \u2192 ${outputPath} (${sizeMB} MB)`);
|
|
84
|
+
const included = [];
|
|
85
|
+
const excluded = [];
|
|
86
|
+
for (const [key, val] of [
|
|
87
|
+
["env", includeEnv],
|
|
88
|
+
["identity", includeIdentity],
|
|
89
|
+
["connectors", includeConnectors],
|
|
90
|
+
["history", includeHistory],
|
|
91
|
+
["sessions", includeSessions]
|
|
92
|
+
]) {
|
|
93
|
+
(val ? included : excluded).push(key);
|
|
94
|
+
}
|
|
95
|
+
if (included.length > 0) console.log(` Included: ${included.join(", ")}`);
|
|
96
|
+
if (excluded.length > 0) console.log(` Excluded: ${excluded.join(", ")}`);
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
run
|
|
100
|
+
};
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
parseArgs
|
|
7
|
+
} from "./chunk-D424ZQGI.js";
|
|
8
|
+
import {
|
|
9
|
+
daemonFetch
|
|
10
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
11
|
+
import "./chunk-EBGCNDMM.js";
|
|
12
|
+
import "./chunk-K3NQKI34.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/file.ts
|
|
15
|
+
async function run(args) {
|
|
16
|
+
const subcommand = args[0];
|
|
17
|
+
switch (subcommand) {
|
|
18
|
+
case "send":
|
|
19
|
+
await sendFile(args.slice(1));
|
|
20
|
+
break;
|
|
21
|
+
case "list":
|
|
22
|
+
await listPending(args.slice(1));
|
|
23
|
+
break;
|
|
24
|
+
case "accept":
|
|
25
|
+
await acceptFile(args.slice(1));
|
|
26
|
+
break;
|
|
27
|
+
case "reject":
|
|
28
|
+
await rejectFile(args.slice(1));
|
|
29
|
+
break;
|
|
30
|
+
case "trust":
|
|
31
|
+
await trustSender(args.slice(1));
|
|
32
|
+
break;
|
|
33
|
+
case "untrust":
|
|
34
|
+
await untrustSender(args.slice(1));
|
|
35
|
+
break;
|
|
36
|
+
case "--help":
|
|
37
|
+
case "-h":
|
|
38
|
+
case void 0:
|
|
39
|
+
printUsage();
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
printUsage();
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function printUsage() {
|
|
47
|
+
console.log(`Usage:
|
|
48
|
+
volute file send <path> <target-mind> [--mind <name>] Send a file to another mind
|
|
49
|
+
volute file list [--mind <name>] List pending incoming files
|
|
50
|
+
volute file accept <id> [--mind <name>] Accept a pending file
|
|
51
|
+
volute file reject <id> [--mind <name>] Reject a pending file
|
|
52
|
+
volute file trust <sender> [--mind <name>] Trust a sender (auto-deliver)
|
|
53
|
+
volute file untrust <sender> [--mind <name>] Remove sender trust`);
|
|
54
|
+
}
|
|
55
|
+
async function sendFile(args) {
|
|
56
|
+
const { positional, flags } = parseArgs(args, {
|
|
57
|
+
mind: { type: "string" }
|
|
58
|
+
});
|
|
59
|
+
const mind = resolveMindName(flags);
|
|
60
|
+
const filePath = positional[0];
|
|
61
|
+
const targetMind = positional[1];
|
|
62
|
+
if (!filePath || !targetMind) {
|
|
63
|
+
console.error("Usage: volute file send <path> <target-mind> [--mind <name>]");
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/send`, {
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: { "Content-Type": "application/json" },
|
|
69
|
+
body: JSON.stringify({ targetMind, filePath })
|
|
70
|
+
});
|
|
71
|
+
if (!res.ok) {
|
|
72
|
+
const data2 = await res.json();
|
|
73
|
+
console.error(data2.error ?? `Failed to send file: ${res.status}`);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
const data = await res.json();
|
|
77
|
+
if (data.status === "delivered") {
|
|
78
|
+
console.log(`File delivered to ${targetMind}: ${data.destPath}`);
|
|
79
|
+
} else {
|
|
80
|
+
console.log(`File pending approval from ${targetMind} (id: ${data.id})`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async function listPending(args) {
|
|
84
|
+
const { flags } = parseArgs(args, {
|
|
85
|
+
mind: { type: "string" }
|
|
86
|
+
});
|
|
87
|
+
const mind = resolveMindName(flags);
|
|
88
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/pending`);
|
|
89
|
+
if (!res.ok) {
|
|
90
|
+
const data = await res.json();
|
|
91
|
+
console.error(data.error ?? `Failed to list pending files: ${res.status}`);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
const pending = await res.json();
|
|
95
|
+
if (pending.length === 0) {
|
|
96
|
+
console.log("No pending files.");
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const idW = Math.max(2, ...pending.map((p) => p.id.length));
|
|
100
|
+
const senderW = Math.max(6, ...pending.map((p) => p.sender.length));
|
|
101
|
+
const fileW = Math.max(4, ...pending.map((p) => p.filename.length));
|
|
102
|
+
console.log(`${"ID".padEnd(idW)} ${"SENDER".padEnd(senderW)} ${"FILE".padEnd(fileW)} SIZE`);
|
|
103
|
+
for (const p of pending) {
|
|
104
|
+
console.log(
|
|
105
|
+
`${p.id.padEnd(idW)} ${p.sender.padEnd(senderW)} ${p.filename.padEnd(fileW)} ${formatSize(p.size)}`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
async function acceptFile(args) {
|
|
110
|
+
const { positional, flags } = parseArgs(args, {
|
|
111
|
+
mind: { type: "string" }
|
|
112
|
+
});
|
|
113
|
+
const mind = resolveMindName(flags);
|
|
114
|
+
const id = positional[0];
|
|
115
|
+
if (!id) {
|
|
116
|
+
console.error("Usage: volute file accept <id> [--mind <name>]");
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/accept`, {
|
|
120
|
+
method: "POST",
|
|
121
|
+
headers: { "Content-Type": "application/json" },
|
|
122
|
+
body: JSON.stringify({ id })
|
|
123
|
+
});
|
|
124
|
+
if (!res.ok) {
|
|
125
|
+
const data2 = await res.json();
|
|
126
|
+
console.error(data2.error ?? `Failed to accept file: ${res.status}`);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
const data = await res.json();
|
|
130
|
+
console.log(`File accepted: ${data.destPath}`);
|
|
131
|
+
}
|
|
132
|
+
async function rejectFile(args) {
|
|
133
|
+
const { positional, flags } = parseArgs(args, {
|
|
134
|
+
mind: { type: "string" }
|
|
135
|
+
});
|
|
136
|
+
const mind = resolveMindName(flags);
|
|
137
|
+
const id = positional[0];
|
|
138
|
+
if (!id) {
|
|
139
|
+
console.error("Usage: volute file reject <id> [--mind <name>]");
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/reject`, {
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: { "Content-Type": "application/json" },
|
|
145
|
+
body: JSON.stringify({ id })
|
|
146
|
+
});
|
|
147
|
+
if (!res.ok) {
|
|
148
|
+
const data = await res.json();
|
|
149
|
+
console.error(data.error ?? `Failed to reject file: ${res.status}`);
|
|
150
|
+
process.exit(1);
|
|
151
|
+
}
|
|
152
|
+
console.log(`File rejected: ${id}`);
|
|
153
|
+
}
|
|
154
|
+
async function trustSender(args) {
|
|
155
|
+
const { positional, flags } = parseArgs(args, {
|
|
156
|
+
mind: { type: "string" }
|
|
157
|
+
});
|
|
158
|
+
const mind = resolveMindName(flags);
|
|
159
|
+
const sender = positional[0];
|
|
160
|
+
if (!sender) {
|
|
161
|
+
console.error("Usage: volute file trust <sender> [--mind <name>]");
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
164
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/trust`, {
|
|
165
|
+
method: "POST",
|
|
166
|
+
headers: { "Content-Type": "application/json" },
|
|
167
|
+
body: JSON.stringify({ sender })
|
|
168
|
+
});
|
|
169
|
+
if (!res.ok) {
|
|
170
|
+
const data = await res.json();
|
|
171
|
+
console.error(data.error ?? `Failed to trust sender: ${res.status}`);
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
console.log(`Trusted sender: ${sender}`);
|
|
175
|
+
}
|
|
176
|
+
async function untrustSender(args) {
|
|
177
|
+
const { positional, flags } = parseArgs(args, {
|
|
178
|
+
mind: { type: "string" }
|
|
179
|
+
});
|
|
180
|
+
const mind = resolveMindName(flags);
|
|
181
|
+
const sender = positional[0];
|
|
182
|
+
if (!sender) {
|
|
183
|
+
console.error("Usage: volute file untrust <sender> [--mind <name>]");
|
|
184
|
+
process.exit(1);
|
|
185
|
+
}
|
|
186
|
+
const res = await daemonFetch(
|
|
187
|
+
`/api/minds/${encodeURIComponent(mind)}/files/trust/${encodeURIComponent(sender)}`,
|
|
188
|
+
{ method: "DELETE" }
|
|
189
|
+
);
|
|
190
|
+
if (!res.ok) {
|
|
191
|
+
const data = await res.json();
|
|
192
|
+
console.error(data.error ?? `Failed to untrust sender: ${res.status}`);
|
|
193
|
+
process.exit(1);
|
|
194
|
+
}
|
|
195
|
+
console.log(`Untrusted sender: ${sender}`);
|
|
196
|
+
}
|
|
197
|
+
function formatSize(bytes) {
|
|
198
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
199
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
200
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
201
|
+
}
|
|
202
|
+
export {
|
|
203
|
+
run
|
|
204
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getClient,
|
|
4
|
+
urlOf
|
|
5
|
+
} from "./chunk-4RQBJWQX.js";
|
|
2
6
|
import {
|
|
3
7
|
resolveMindName
|
|
4
8
|
} from "./chunk-NAOW2CLO.js";
|
|
@@ -7,12 +11,8 @@ import {
|
|
|
7
11
|
} from "./chunk-D424ZQGI.js";
|
|
8
12
|
import {
|
|
9
13
|
daemonFetch
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
getClient,
|
|
14
|
-
urlOf
|
|
15
|
-
} from "./chunk-4RQBJWQX.js";
|
|
14
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
15
|
+
import "./chunk-EBGCNDMM.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/history.ts
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
parseNameFromIdentity,
|
|
7
7
|
run,
|
|
8
8
|
sessionMatchesWorkspace
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-O6ASDHFO.js";
|
|
10
|
+
import "./chunk-VDWCHYTS.js";
|
|
11
11
|
import "./chunk-D424ZQGI.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-EBGCNDMM.js";
|
|
13
13
|
import "./chunk-K3NQKI34.js";
|
|
14
14
|
export {
|
|
15
15
|
findOpenClawSession,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
parseArgs
|
|
7
|
+
} from "./chunk-D424ZQGI.js";
|
|
8
|
+
import {
|
|
9
|
+
daemonFetch
|
|
10
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
11
|
+
import "./chunk-EBGCNDMM.js";
|
|
12
|
+
import "./chunk-K3NQKI34.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/shared/log.ts
|
|
15
|
+
async function run(args) {
|
|
16
|
+
const { flags } = parseArgs(args, {
|
|
17
|
+
mind: { type: "string" },
|
|
18
|
+
limit: { type: "number" }
|
|
19
|
+
});
|
|
20
|
+
const mindName = resolveMindName(flags);
|
|
21
|
+
const limit = flags.limit ?? 20;
|
|
22
|
+
const res = await daemonFetch(
|
|
23
|
+
`/api/minds/${encodeURIComponent(mindName)}/shared/log?limit=${limit}`
|
|
24
|
+
);
|
|
25
|
+
if (!res.ok) {
|
|
26
|
+
const body = await res.json().catch(() => ({}));
|
|
27
|
+
console.error(body.error ?? `Server responded with ${res.status}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
const output = await res.text();
|
|
31
|
+
if (output.trim()) {
|
|
32
|
+
console.log(output.trimEnd());
|
|
33
|
+
} else {
|
|
34
|
+
console.log("No shared history yet.");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
run
|
|
39
|
+
};
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
readSystemsConfig,
|
|
10
10
|
writeSystemsConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FCDU5BFX.js";
|
|
12
12
|
import {
|
|
13
13
|
parseArgs
|
|
14
14
|
} from "./chunk-D424ZQGI.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-EBGCNDMM.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/pages/login.ts
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getClient,
|
|
4
|
+
urlOf
|
|
5
|
+
} from "./chunk-4RQBJWQX.js";
|
|
2
6
|
import {
|
|
3
7
|
resolveMindName
|
|
4
8
|
} from "./chunk-NAOW2CLO.js";
|
|
@@ -7,12 +11,8 @@ import {
|
|
|
7
11
|
} from "./chunk-D424ZQGI.js";
|
|
8
12
|
import {
|
|
9
13
|
daemonFetch
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
getClient,
|
|
14
|
-
urlOf
|
|
15
|
-
} from "./chunk-4RQBJWQX.js";
|
|
14
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
15
|
+
import "./chunk-EBGCNDMM.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/logs.ts
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
parseArgs
|
|
7
|
+
} from "./chunk-D424ZQGI.js";
|
|
8
|
+
import {
|
|
9
|
+
daemonFetch
|
|
10
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
11
|
+
import "./chunk-EBGCNDMM.js";
|
|
12
|
+
import "./chunk-K3NQKI34.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/shared/merge.ts
|
|
15
|
+
async function run(args) {
|
|
16
|
+
const { positional, flags } = parseArgs(args, {
|
|
17
|
+
mind: { type: "string" }
|
|
18
|
+
});
|
|
19
|
+
const message = positional[0];
|
|
20
|
+
if (!message) {
|
|
21
|
+
console.error('Usage: volute shared merge "<message>" [--mind <name>]');
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
const mindName = resolveMindName(flags);
|
|
25
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindName)}/shared/merge`, {
|
|
26
|
+
method: "POST",
|
|
27
|
+
headers: { "Content-Type": "application/json" },
|
|
28
|
+
body: JSON.stringify({ message })
|
|
29
|
+
});
|
|
30
|
+
if (!res.ok) {
|
|
31
|
+
const body = await res.json().catch(() => ({}));
|
|
32
|
+
console.error(body.error ?? `Server responded with ${res.status}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const result = await res.json();
|
|
36
|
+
if (result.conflicts) {
|
|
37
|
+
console.error(
|
|
38
|
+
"Merge conflicts detected. Run 'volute shared pull' to get the latest, reconcile your changes, and try again."
|
|
39
|
+
);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
console.log(result.message ?? "Merged successfully.");
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
run
|
|
46
|
+
};
|
|
@@ -6,42 +6,45 @@ async function run(args) {
|
|
|
6
6
|
const subcommand = args[0];
|
|
7
7
|
switch (subcommand) {
|
|
8
8
|
case "create":
|
|
9
|
-
await import("./create-
|
|
9
|
+
await import("./create-HP4OVVHF.js").then((m) => m.run(args.slice(1)));
|
|
10
10
|
break;
|
|
11
11
|
case "start":
|
|
12
|
-
await import("./start-
|
|
12
|
+
await import("./start-I5JYB65M.js").then((m) => m.run(args.slice(1)));
|
|
13
13
|
break;
|
|
14
14
|
case "stop":
|
|
15
|
-
await import("./stop-
|
|
15
|
+
await import("./stop-NBVKEFQQ.js").then((m) => m.run(args.slice(1)));
|
|
16
16
|
break;
|
|
17
17
|
case "restart":
|
|
18
|
-
await import("./restart-
|
|
18
|
+
await import("./restart-IQKMCK5M.js").then((m) => m.run(args.slice(1)));
|
|
19
19
|
break;
|
|
20
20
|
case "delete":
|
|
21
|
-
await import("./delete-
|
|
21
|
+
await import("./delete-BSU7K3RY.js").then((m) => m.run(args.slice(1)));
|
|
22
22
|
break;
|
|
23
23
|
case "list":
|
|
24
|
-
await import("./status-
|
|
24
|
+
await import("./status-4ESFLGH4.js").then((m) => m.run(args.slice(1)));
|
|
25
25
|
break;
|
|
26
26
|
case "status": {
|
|
27
27
|
const rest = args.slice(1);
|
|
28
28
|
if (!rest[0] && process.env.VOLUTE_MIND) {
|
|
29
29
|
rest.unshift(process.env.VOLUTE_MIND);
|
|
30
30
|
}
|
|
31
|
-
await import("./status-
|
|
31
|
+
await import("./status-4ESFLGH4.js").then((m) => m.run(rest));
|
|
32
32
|
break;
|
|
33
33
|
}
|
|
34
34
|
case "logs": {
|
|
35
35
|
const rest = args.slice(1);
|
|
36
36
|
const logsArgs = transformMindFlag(rest);
|
|
37
|
-
await import("./logs-
|
|
37
|
+
await import("./logs-SF2IMJN4.js").then((m) => m.run(logsArgs));
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
40
|
case "upgrade":
|
|
41
|
-
await import("./upgrade-
|
|
41
|
+
await import("./upgrade-AIT24B5I.js").then((m) => m.run(args.slice(1)));
|
|
42
42
|
break;
|
|
43
43
|
case "import":
|
|
44
|
-
await import("./import-
|
|
44
|
+
await import("./import-XEC34Y4Z.js").then((m) => m.run(args.slice(1)));
|
|
45
|
+
break;
|
|
46
|
+
case "export":
|
|
47
|
+
await import("./export-6QBUOQGC.js").then((m) => m.run(args.slice(1)));
|
|
45
48
|
break;
|
|
46
49
|
case "--help":
|
|
47
50
|
case "-h":
|
|
@@ -71,6 +74,7 @@ function printUsage() {
|
|
|
71
74
|
volute mind logs [name] [--follow] [-n N]
|
|
72
75
|
volute mind upgrade [name] [--template <name>] [--continue]
|
|
73
76
|
volute mind import <path> [--name <name>] [--session <path>] [--template <name>]
|
|
77
|
+
volute mind export <name> [--include-env] [--include-identity] [--include-connectors] [--include-history] [--include-sessions] [--all] [--output <path>]
|
|
74
78
|
|
|
75
79
|
Mind name can be omitted (where shown as [name]) if VOLUTE_MIND is set.`);
|
|
76
80
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getActiveMinds,
|
|
4
|
+
markIdle,
|
|
5
|
+
onMindEvent,
|
|
6
|
+
stopAll
|
|
7
|
+
} from "./chunk-GZ7DW4YL.js";
|
|
8
|
+
import "./chunk-UU7A7KLB.js";
|
|
9
|
+
import "./chunk-YUIHSKR6.js";
|
|
10
|
+
import "./chunk-5XNT2472.js";
|
|
11
|
+
import "./chunk-NSE7VJQA.js";
|
|
12
|
+
import "./chunk-EBGCNDMM.js";
|
|
13
|
+
import "./chunk-K3NQKI34.js";
|
|
14
|
+
export {
|
|
15
|
+
getActiveMinds,
|
|
16
|
+
markIdle,
|
|
17
|
+
onMindEvent,
|
|
18
|
+
stopAll
|
|
19
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
MindManager,
|
|
4
|
+
getMindManager,
|
|
5
|
+
initMindManager
|
|
6
|
+
} from "./chunk-PUVXOZ6T.js";
|
|
7
|
+
import "./chunk-YUIHSKR6.js";
|
|
8
|
+
import "./chunk-VDWCHYTS.js";
|
|
9
|
+
import "./chunk-5XNT2472.js";
|
|
10
|
+
import "./chunk-NSE7VJQA.js";
|
|
11
|
+
import "./chunk-OGXOMR65.js";
|
|
12
|
+
import "./chunk-EBGCNDMM.js";
|
|
13
|
+
import "./chunk-K3NQKI34.js";
|
|
14
|
+
export {
|
|
15
|
+
MindManager,
|
|
16
|
+
getMindManager,
|
|
17
|
+
initMindManager
|
|
18
|
+
};
|