volute 0.17.0 → 0.19.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 +1 -1
- package/dist/archive-ZCFOSTKB.js +15 -0
- package/dist/{channel-SLURLIRV.js → channel-PUQKGSQM.js} +60 -7
- package/dist/{chunk-CE7WMOVW.js → chunk-2TJGRJ4O.js} +236 -103
- package/dist/{chunk-6BDNWYKG.js → chunk-32VR2EOH.js} +2 -2
- package/dist/chunk-4KPUF5JD.js +214 -0
- package/dist/{chunk-QJIIHU32.js → chunk-7NO7EV5Z.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-GSPWIM5E.js → chunk-EMQSAY3B.js} +77 -6
- package/dist/{chunk-37X7ECMF.js → chunk-FCDU5BFX.js} +1 -1
- package/dist/chunk-FGV2H4TX.js +803 -0
- package/dist/{chunk-ZCEYUUID.js → chunk-OGXOMR65.js} +2 -1
- package/dist/chunk-OTWLI7F4.js +375 -0
- package/dist/{chunk-3FC42ZBM.js → chunk-RHEGSQFJ.js} +4 -1
- package/dist/{chunk-MVSXRMJJ.js → chunk-SCUDS4US.js} +1 -1
- package/dist/{chunk-MIJIAGGG.js → chunk-UJ6GHNR7.js} +8 -6
- package/dist/{chunk-OYSZNX5I.js → chunk-VDWCHYTS.js} +1 -1
- package/dist/{chunk-77ISBIKI.js → chunk-VE4D3GOP.js} +2 -2
- package/dist/chunk-VQWDC6UK.js +142 -0
- package/dist/{chunk-OJQ47SCA.js → chunk-WC6ZHVRL.js} +1 -1
- package/dist/chunk-YUIHSKR6.js +72 -0
- package/dist/chunk-Z524RFCJ.js +36 -0
- package/dist/cli.js +44 -24
- 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-VRQMZLBK.js → daemon-restart-JMZM3QY4.js} +8 -8
- package/dist/daemon.js +1624 -940
- package/dist/db-5ZVC6MQF.js +10 -0
- package/dist/{delete-6G6WEX4F.js → delete-BSU7K3RY.js} +1 -1
- package/dist/delivery-manager-ISTJMZDW.js +16 -0
- package/dist/down-ZY35KMHR.js +14 -0
- package/dist/{env-6IDWGBUH.js → env-A3LMO777.js} +6 -6
- package/dist/export-GCDNQCF3.js +100 -0
- package/dist/{history-5F4WQW7S.js → history-WNK3DFUM.js} +10 -7
- package/dist/{import-EDGRLIGO.js → import-M63VIUJ5.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-PQ5NCPSU.js} +14 -10
- package/dist/mind-manager-RVCFROAY.js +18 -0
- package/dist/{package-4GTJGUXI.js → package-MYE2ZJLV.js} +7 -3
- package/dist/{pages-6IV4VQTU.js → pages-AXCOSY3P.js} +2 -2
- package/dist/{publish-Q4RPSJLL.js → publish-YB377JB7.js} +18 -4
- 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-LMX7GAQZ.js} +6 -6
- package/dist/schema-5BW7DFZI.js +24 -0
- package/dist/{seed-AP4Q7RZ7.js → seed-J43YDKXG.js} +7 -4
- package/dist/{send-4GKDO26C.js → send-KVIZIGCE.js} +8 -8
- package/dist/{service-U7MZ2H7F.js → service-LUR7WDO7.js} +6 -6
- package/dist/{setup-DJKIZKGW.js → setup-OH3PJUJO.js} +7 -7
- package/dist/shared-KO35ZM44.js +39 -0
- package/dist/skill-BCVNI6TV.js +287 -0
- 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 +35 -1
- package/dist/{sprout-TJ3BHVOG.js → sprout-VBEX63LX.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-JCJAOXTW.js} +2 -2
- package/dist/{stop-AA5K5LYG.js → stop-NBVKEFQQ.js} +6 -6
- package/dist/{up-LT3X5Q26.js → up-WG65SWJU.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-BAbuRsVF.css +1 -0
- package/dist/web-assets/assets/index-CiQhSKi_.js +63 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0007_system_prompts.sql +5 -0
- package/drizzle/0008_volute_channels.sql +24 -0
- package/drizzle/0009_shared_skills.sql +9 -0
- package/drizzle/0010_delivery_queue.sql +12 -0
- package/drizzle/0011_rename_human_to_brain.sql +1 -0
- package/drizzle/meta/0007_snapshot.json +7 -0
- package/drizzle/meta/0008_snapshot.json +7 -0
- package/drizzle/meta/0009_snapshot.json +7 -0
- package/drizzle/meta/0010_snapshot.json +7 -0
- package/drizzle/meta/0011_snapshot.json +7 -0
- package/drizzle/meta/_journal.json +35 -0
- package/package.json +7 -3
- package/templates/_base/.init/.config/hooks/startup-context.sh +1 -1
- package/templates/_base/.init/.config/prompts.json +5 -0
- package/templates/_base/.init/.config/scripts/session-reader.ts +3 -3
- package/templates/_base/home/VOLUTE.md +16 -1
- package/templates/_base/src/lib/auto-commit.ts +51 -14
- package/templates/_base/src/lib/router.ts +168 -29
- package/templates/_base/src/lib/routing.ts +4 -1
- package/templates/_base/src/lib/startup.ts +43 -0
- package/templates/_base/src/lib/types.ts +4 -0
- package/templates/_base/src/lib/volute-server.ts +91 -2
- package/templates/claude/src/agent.ts +4 -3
- package/templates/claude/src/lib/hooks/reply-instructions.ts +3 -1
- package/templates/claude/src/server.ts +2 -2
- package/templates/claude/volute-template.json +1 -2
- package/templates/pi/src/agent.ts +6 -7
- package/templates/pi/src/lib/reply-instructions-extension.ts +3 -1
- package/templates/pi/src/lib/session-context-extension.ts +2 -2
- 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-ETNCPQJN.js +0 -15
- package/dist/web-assets/assets/index-BcmT7Qxo.js +0 -63
- package/dist/web-assets/assets/index-DG01TyLb.css +0 -1
- /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-FGV2H4TX.js";
|
|
7
|
+
import "./chunk-YUIHSKR6.js";
|
|
8
|
+
import "./chunk-Z524RFCJ.js";
|
|
9
|
+
import "./chunk-VQWDC6UK.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-5ZVC6MQF.js");
|
|
63
|
+
const { eq } = await import("drizzle-orm");
|
|
64
|
+
const { mindHistory } = await import("./schema-5BW7DFZI.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
|
+
};
|
|
@@ -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,17 +11,16 @@ 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
|
|
19
|
+
function normalizeTimestamp(dateStr) {
|
|
20
|
+
return dateStr.endsWith("Z") ? dateStr : `${dateStr}Z`;
|
|
21
|
+
}
|
|
19
22
|
function formatRow(row) {
|
|
20
|
-
const time = new Date(row.created_at).toLocaleString();
|
|
23
|
+
const time = new Date(normalizeTimestamp(row.created_at)).toLocaleString();
|
|
21
24
|
const channel = row.channel ?? "";
|
|
22
25
|
switch (row.type) {
|
|
23
26
|
case "inbound":
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
parseNameFromIdentity,
|
|
7
7
|
run,
|
|
8
8
|
sessionMatchesWorkspace
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-EMQSAY3B.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-M63VIUJ5.js").then((m) => m.run(args.slice(1)));
|
|
45
|
+
break;
|
|
46
|
+
case "export":
|
|
47
|
+
await import("./export-GCDNQCF3.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,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
MindManager,
|
|
4
|
+
getMindManager,
|
|
5
|
+
initMindManager
|
|
6
|
+
} from "./chunk-2TJGRJ4O.js";
|
|
7
|
+
import "./chunk-YUIHSKR6.js";
|
|
8
|
+
import "./chunk-VDWCHYTS.js";
|
|
9
|
+
import "./chunk-Z524RFCJ.js";
|
|
10
|
+
import "./chunk-VQWDC6UK.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
|
+
};
|
|
@@ -4,7 +4,7 @@ import "./chunk-K3NQKI34.js";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "volute",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.19.0",
|
|
8
8
|
description: "CLI for creating and managing self-modifying AI minds powered by the Claude Agent SDK",
|
|
9
9
|
type: "module",
|
|
10
10
|
license: "MIT",
|
|
@@ -32,10 +32,12 @@ var package_default = {
|
|
|
32
32
|
],
|
|
33
33
|
scripts: {
|
|
34
34
|
dev: "tsx src/cli.ts",
|
|
35
|
-
build: "tsup && npm run build:web",
|
|
35
|
+
build: "tsup && cp -r skills dist/skills && npm run build:web",
|
|
36
36
|
"build:web": "vite build --config src/web/ui/vite.config.ts",
|
|
37
37
|
"dev:web": "vite --config src/web/ui/vite.config.ts",
|
|
38
|
-
test: "node --import tsx --import ./test/setup.ts --test --test-force-exit --test-concurrency=
|
|
38
|
+
test: "node --import tsx --import ./test/setup.ts --test --test-force-exit --test-concurrency=4 $(find test -name '*.test.ts' ! -name 'daemon-e2e.test.ts' | sort)",
|
|
39
|
+
"test:e2e": "node --import tsx --import ./test/setup.ts --test --test-force-exit --test-concurrency=1 test/daemon-e2e.test.ts",
|
|
40
|
+
"test:all": "npm test && npm run test:e2e",
|
|
39
41
|
lint: "biome check src/ test/",
|
|
40
42
|
"lint:fix": "biome check --write src/ test/",
|
|
41
43
|
format: "biome format --write src/ test/",
|
|
@@ -53,6 +55,7 @@ var package_default = {
|
|
|
53
55
|
"@hono/zod-validator": "^0.7.6",
|
|
54
56
|
"@libsql/client": "^0.17.0",
|
|
55
57
|
"@slack/bolt": "^4.6.0",
|
|
58
|
+
"adm-zip": "^0.5.16",
|
|
56
59
|
bcryptjs: "^3.0.3",
|
|
57
60
|
"cron-parser": "^5.5.0",
|
|
58
61
|
"discord.js": "^14.25.1",
|
|
@@ -67,6 +70,7 @@ var package_default = {
|
|
|
67
70
|
"@mariozechner/pi-ai": "^0.52.7",
|
|
68
71
|
"@mariozechner/pi-coding-agent": "^0.52.7",
|
|
69
72
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
73
|
+
"@types/adm-zip": "^0.5.7",
|
|
70
74
|
"@types/bcryptjs": "^2.4.6",
|
|
71
75
|
"@types/dompurify": "^3.0.5",
|
|
72
76
|
"@types/node": "^25.2.0",
|
|
@@ -6,10 +6,10 @@ async function run(args) {
|
|
|
6
6
|
const subcommand = args[0];
|
|
7
7
|
switch (subcommand) {
|
|
8
8
|
case "publish":
|
|
9
|
-
await import("./publish-
|
|
9
|
+
await import("./publish-YB377JB7.js").then((m) => m.run(args.slice(1)));
|
|
10
10
|
break;
|
|
11
11
|
case "status":
|
|
12
|
-
await import("./status-
|
|
12
|
+
await import("./status-JCJAOXTW.js").then((m) => m.run(args.slice(1)));
|
|
13
13
|
break;
|
|
14
14
|
case "--help":
|
|
15
15
|
case "-h":
|
|
@@ -5,15 +5,21 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
resolveMindName
|
|
7
7
|
} from "./chunk-NAOW2CLO.js";
|
|
8
|
+
import {
|
|
9
|
+
sharedDir
|
|
10
|
+
} from "./chunk-4KPUF5JD.js";
|
|
8
11
|
import {
|
|
9
12
|
readSystemsConfig
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FCDU5BFX.js";
|
|
14
|
+
import "./chunk-YUIHSKR6.js";
|
|
11
15
|
import {
|
|
12
16
|
parseArgs
|
|
13
17
|
} from "./chunk-D424ZQGI.js";
|
|
18
|
+
import "./chunk-DYZGP3EW.js";
|
|
19
|
+
import "./chunk-OGXOMR65.js";
|
|
14
20
|
import {
|
|
15
21
|
mindDir
|
|
16
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EBGCNDMM.js";
|
|
17
23
|
import "./chunk-K3NQKI34.js";
|
|
18
24
|
|
|
19
25
|
// src/commands/pages/publish.ts
|
|
@@ -28,8 +34,16 @@ async function run(args) {
|
|
|
28
34
|
console.error('Not logged in. Run "volute pages register" or "volute pages login" first.');
|
|
29
35
|
process.exit(1);
|
|
30
36
|
}
|
|
31
|
-
const
|
|
32
|
-
|
|
37
|
+
const hasMind = flags.mind || process.env.VOLUTE_MIND;
|
|
38
|
+
let mindName;
|
|
39
|
+
let pagesDir;
|
|
40
|
+
if (hasMind) {
|
|
41
|
+
mindName = resolveMindName(flags);
|
|
42
|
+
pagesDir = resolve(mindDir(mindName), "home", "pages");
|
|
43
|
+
} else {
|
|
44
|
+
mindName = "system";
|
|
45
|
+
pagesDir = resolve(sharedDir(), "pages");
|
|
46
|
+
}
|
|
33
47
|
if (!existsSync(pagesDir)) {
|
|
34
48
|
console.error(`No pages/ directory found at ${pagesDir}`);
|
|
35
49
|
process.exit(1);
|
|
@@ -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/pull.ts
|
|
15
|
+
async function run(args) {
|
|
16
|
+
const { flags } = parseArgs(args, {
|
|
17
|
+
mind: { type: "string" }
|
|
18
|
+
});
|
|
19
|
+
const mindName = resolveMindName(flags);
|
|
20
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindName)}/shared/pull`, {
|
|
21
|
+
method: "POST"
|
|
22
|
+
});
|
|
23
|
+
if (!res.ok) {
|
|
24
|
+
const body = await res.json().catch(() => ({}));
|
|
25
|
+
console.error(body.error ?? `Server responded with ${res.status}`);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const result = await res.json();
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
console.error(
|
|
31
|
+
result.message ?? "Pull failed. Try: git -C shared reset --hard main (then re-apply your changes)."
|
|
32
|
+
);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
console.log("Pulled latest shared changes.");
|
|
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/register.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
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";
|
|
5
9
|
import {
|
|
6
10
|
daemonFetch
|
|
7
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WC6ZHVRL.js";
|
|
8
12
|
import {
|
|
9
13
|
resolveMind
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
getClient,
|
|
13
|
-
urlOf
|
|
14
|
-
} from "./chunk-4RQBJWQX.js";
|
|
14
|
+
} from "./chunk-EBGCNDMM.js";
|
|
15
15
|
import "./chunk-K3NQKI34.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/restart.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/schedule.ts
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
conversationParticipants,
|
|
4
|
+
conversations,
|
|
5
|
+
deliveryQueue,
|
|
6
|
+
messages,
|
|
7
|
+
mindHistory,
|
|
8
|
+
sessions,
|
|
9
|
+
sharedSkills,
|
|
10
|
+
systemPrompts,
|
|
11
|
+
users
|
|
12
|
+
} from "./chunk-VQWDC6UK.js";
|
|
13
|
+
import "./chunk-K3NQKI34.js";
|
|
14
|
+
export {
|
|
15
|
+
conversationParticipants,
|
|
16
|
+
conversations,
|
|
17
|
+
deliveryQueue,
|
|
18
|
+
messages,
|
|
19
|
+
mindHistory,
|
|
20
|
+
sessions,
|
|
21
|
+
sharedSkills,
|
|
22
|
+
systemPrompts,
|
|
23
|
+
users
|
|
24
|
+
};
|