volute 0.25.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 +28 -33
- package/dist/{activity-events-4O37J7PD.js → activity-events-BBIEA2F4.js} +2 -3
- package/dist/api.d.ts +886 -220
- package/dist/{archive-4ZQYK5MN.js → archive-UA4BDFXQ.js} +2 -2
- package/dist/{auth-HM2RSPY7.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-BOTQ25QT.js → chunk-2YP2TVDT.js} +138 -56
- package/dist/{chunk-DG7TO7EE.js → chunk-4WXYUOAK.js} +5 -7
- package/dist/{chunk-JTDFJWI2.js → chunk-AW7PFDVN.js} +5 -5
- package/dist/{chunk-2767L2RZ.js → chunk-EHYDTZTF.js} +6 -6
- package/dist/{chunk-ZSH4G2P5.js → chunk-GIE6CSN5.js} +17 -17
- package/dist/chunk-H7OZRFJB.js +432 -0
- package/dist/{chunk-ON3FF5JA.js → chunk-HDN7MNGD.js} +3 -3
- package/dist/chunk-IAYBDWVG.js +477 -0
- package/dist/chunk-IKRVFPWU.js +83 -0
- package/dist/{chunk-TRQEV3CD.js → chunk-JGFVMROS.js} +32 -6
- package/dist/{chunk-PHHKNGA3.js → chunk-JKOWNZ4P.js} +3 -3
- package/dist/{chunk-E7GOKNOT.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-3AIBT4TW.js → chunk-LAC664WU.js} +30 -4
- package/dist/{chunk-PMX4EIJK.js → chunk-OQZH4PBB.js} +467 -1054
- package/dist/{chunk-SHSWYG2J.js → chunk-PHSAT7YL.js} +71 -58
- package/dist/chunk-RKQEHRBB.js +177 -0
- package/dist/{chunk-RVKR2R7F.js → chunk-SSI47XP2.js} +10 -2
- package/dist/chunk-T6HKBWXZ.js +23 -0
- package/dist/chunk-USUXRNVD.js +113 -0
- package/dist/{chunk-BFK6SOEJ.js → chunk-VIVMW2H2.js} +4 -4
- package/dist/{chunk-KTJGZ7M7.js → chunk-XBLSAVJF.js} +1 -1
- package/dist/chunk-ZYGKG6VC.js +22 -0
- package/dist/cli.js +51 -32
- package/dist/{cloud-sync-PPBBJDY6.js → cloud-sync-T7M3ESC3.js} +15 -12
- 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-VDQJER52.js → create-QWV73WXD.js} +1 -1
- package/dist/{daemon-client-JOVQZ52X.js → daemon-client-I42FK2BF.js} +2 -2
- package/dist/{daemon-restart-FDNOZEAD.js → daemon-restart-M2QTYMEG.js} +7 -6
- package/dist/daemon.js +2247 -1085
- package/dist/db-IC4J52XQ.js +8 -0
- package/dist/{delete-2MRR4JX5.js → delete-4JYGD4VN.js} +1 -1
- package/dist/down-LVBXEULC.js +14 -0
- package/dist/{env-2FPOZK37.js → env-YJMUMFIY.js} +5 -5
- package/dist/{export-IKFAPRAO.js → export-BOJQWBMA.js} +4 -4
- package/dist/{file-KT3UIQM3.js → file-CR36YUPD.js} +4 -4
- package/dist/{history-46WZN5CN.js → history-XKRTAFS2.js} +7 -7
- package/dist/{import-TH26J76F.js → import-SRTQXBGH.js} +4 -4
- package/dist/join-J4QU42DL.js +66 -0
- package/dist/list-R73GENNL.js +40 -0
- package/dist/{log-6SGSSR3D.js → log-ABYNVYJ3.js} +4 -4
- package/dist/login-3QZNR2DF.js +46 -0
- package/dist/{login-UO6AOVEA.js → login-XX37I52P.js} +3 -3
- package/dist/logout-T53VKCPU.js +39 -0
- package/dist/{logout-UKD5LA37.js → logout-W4KOOBIT.js} +2 -2
- package/dist/{logs-HRBONI5I.js → logs-U35JR2KE.js} +7 -7
- package/dist/{merge-KSFJKX6T.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-YVWAHL2A.js → mind-DI33C74K.js} +25 -25
- package/dist/{mind-activity-tracker-NMDDEV3K.js → mind-activity-tracker-EN6XNXPF.js} +3 -4
- package/dist/{mind-manager-4NDNAYAB.js → mind-manager-M6EMUW5I.js} +6 -5
- package/dist/{mind-sleep-GHPTSAYN.js → mind-sleep-BTSWQNAC.js} +4 -4
- package/dist/{mind-wake-BJDJFMDF.js → mind-wake-SBAKIDVP.js} +4 -4
- package/dist/notes-XCER3I7M.js +220 -0
- package/dist/{package-3HF5MXU2.js → package-7WY6VKU3.js} +2 -1
- package/dist/{pages-Y6DRWUOJ.js → pages-6EBS6CBR.js} +2 -2
- package/dist/{publish-EEKTZBHW.js → publish-66UB2ZFY.js} +5 -5
- package/dist/{pull-D32SPFVU.js → pull-XCHJTM5M.js} +4 -4
- package/dist/read-36UFXN3G.js +46 -0
- package/dist/{register-U2UO6TC4.js → register-6B2CXTYM.js} +3 -3
- package/dist/{registry-D2BSQ2X5.js → registry-NDNOOYG4.js} +15 -9
- package/dist/{restart-5BMNV7KU.js → restart-6ESL3NBO.js} +6 -6
- package/dist/sandbox-TGBX22DS.js +19 -0
- package/dist/{schedule-YEFDLVMJ.js → schedule-QTJMFATP.js} +7 -7
- package/dist/{seed-6FEKB3YC.js → seed-SSUCYYDF.js} +2 -2
- package/dist/{send-IISDYFCL.js → send-ZNCJDSRP.js} +28 -36
- package/dist/service-6LIN3F3K.js +122 -0
- package/dist/setup-JG4QAEBV.js +371 -0
- package/dist/setup-JHL5ZEST.js +17 -0
- package/dist/{shared-LWMNTTZN.js → shared-ML5I4Q2A.js} +4 -4
- package/dist/{skill-T3EMR6IR.js → skill-AUAQTSP5.js} +7 -7
- package/dist/skills/dreaming/SKILL.md +68 -0
- package/dist/skills/dreaming/references/INSTALL.md +56 -0
- package/dist/skills/dreaming/scripts/dream.ts +289 -0
- package/dist/skills/dreaming/scripts/wake-context-dreams.sh +30 -0
- package/dist/skills/notes/SKILL.md +34 -0
- 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-QJVGJDSH.js → sprout-IJVVKSJ2.js} +6 -7
- package/dist/{start-C7XITZ5O.js → start-EUJSS5R4.js} +4 -4
- package/dist/{status-SIRPLEZC.js → status-77YEPHMW.js} +5 -5
- package/dist/{status-LYS4NUOZ.js → status-7GA4SM4Y.js} +4 -4
- package/dist/{status-LV34BG6G.js → status-THLOBLWG.js} +2 -2
- package/dist/{stop-CVKBSLXY.js → stop-3XAITBBF.js} +6 -6
- package/dist/{tailscale-AJ4VL5XK.js → tailscale-NY5MUMY3.js} +1 -1
- package/dist/up-NKSMXBWR.js +17 -0
- package/dist/{update-7XCZMYBT.js → update-PTSH22AZ.js} +11 -11
- package/dist/{update-check-F5Z3ALXX.js → update-check-64FWC4Y2.js} +2 -2
- package/dist/{upgrade-7RUIXGOO.js → upgrade-HA47CS4C.js} +12 -5
- package/dist/variant-7TGZHOU3.js +41 -0
- package/dist/{version-notify-AZQMC32A.js → version-notify-5Z4MNR6M.js} +26 -28
- 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/0015_notes.sql +23 -0
- package/drizzle/0016_note_reactions_and_replies.sql +15 -0
- package/drizzle/0017_minds.sql +16 -0
- package/drizzle/meta/_journal.json +21 -0
- package/package.json +2 -1
- package/templates/_base/.init/.config/hooks/wake-context.sh +7 -0
- package/templates/_base/.init/.config/prompts.json +2 -2
- package/templates/_base/home/VOLUTE.md +5 -5
- package/templates/_base/src/lib/startup.ts +10 -2
- package/templates/claude/src/agent.ts +51 -1
- package/templates/claude/src/server.ts +1 -0
- package/templates/pi/package.json.tmpl +1 -0
- package/templates/pi/src/agent.ts +48 -1
- package/templates/pi/src/lib/subagents.ts +150 -0
- package/templates/pi/src/server.ts +1 -0
- package/dist/channel-HZOSHGNF.js +0 -260
- package/dist/chunk-33XAVCS4.js +0 -203
- package/dist/chunk-B2CPS4QU.js +0 -283
- package/dist/chunk-NWPT4ASZ.js +0 -89
- package/dist/chunk-SIAG3QMM.js +0 -42
- package/dist/chunk-WSLPZF72.js +0 -173
- package/dist/connector-M6XFI6GM.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-674SX2IZ.js +0 -14
- package/dist/message-delivery-XMGV3FUM.js +0 -23
- package/dist/service-FASYWLTC.js +0 -247
- package/dist/setup-BMLM2UTK.js +0 -230
- package/dist/sleep-manager-RKTFZPD3.js +0 -27
- package/dist/up-CJ26KQLN.js +0 -15
- package/dist/variant-UGREB4G5.js +0 -207
- package/dist/web-assets/assets/index-CGPSVu19.js +0 -69
- package/dist/web-assets/assets/index-V_rNDsM8.css +0 -1
|
@@ -6,63 +6,63 @@ 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-QWV73WXD.js").then((m) => m.run(args.slice(1)));
|
|
10
10
|
break;
|
|
11
11
|
case "start":
|
|
12
|
-
await import("./start-
|
|
12
|
+
await import("./start-EUJSS5R4.js").then((m) => m.run(args.slice(1)));
|
|
13
13
|
break;
|
|
14
14
|
case "stop":
|
|
15
|
-
await import("./stop-
|
|
15
|
+
await import("./stop-3XAITBBF.js").then((m) => m.run(args.slice(1)));
|
|
16
16
|
break;
|
|
17
17
|
case "restart":
|
|
18
|
-
await import("./restart-
|
|
18
|
+
await import("./restart-6ESL3NBO.js").then((m) => m.run(args.slice(1)));
|
|
19
19
|
break;
|
|
20
20
|
case "delete":
|
|
21
|
-
await import("./delete-
|
|
21
|
+
await import("./delete-4JYGD4VN.js").then((m) => m.run(args.slice(1)));
|
|
22
22
|
break;
|
|
23
23
|
case "list":
|
|
24
|
-
await import("./status-
|
|
24
|
+
await import("./status-77YEPHMW.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-77YEPHMW.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-U35JR2KE.js").then((m) => m.run(logsArgs));
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
40
|
case "upgrade":
|
|
41
|
-
await import("./upgrade-
|
|
41
|
+
await import("./upgrade-HA47CS4C.js").then((m) => m.run(args.slice(1)));
|
|
42
42
|
break;
|
|
43
43
|
case "import":
|
|
44
|
-
await import("./import-
|
|
44
|
+
await import("./import-SRTQXBGH.js").then((m) => m.run(args.slice(1)));
|
|
45
45
|
break;
|
|
46
46
|
case "export":
|
|
47
|
-
await import("./export-
|
|
48
|
-
break;
|
|
49
|
-
case "connect":
|
|
50
|
-
await import("./connector-M6XFI6GM.js").then((m) => m.run(["connect", ...args.slice(1)]));
|
|
51
|
-
break;
|
|
52
|
-
case "disconnect":
|
|
53
|
-
await import("./connector-M6XFI6GM.js").then((m) => m.run(["disconnect", ...args.slice(1)]));
|
|
47
|
+
await import("./export-BOJQWBMA.js").then((m) => m.run(args.slice(1)));
|
|
54
48
|
break;
|
|
55
49
|
case "seed":
|
|
56
|
-
await import("./seed-
|
|
50
|
+
await import("./seed-SSUCYYDF.js").then((m) => m.run(args.slice(1)));
|
|
57
51
|
break;
|
|
58
52
|
case "sprout":
|
|
59
|
-
await import("./sprout-
|
|
53
|
+
await import("./sprout-IJVVKSJ2.js").then((m) => m.run(args.slice(1)));
|
|
60
54
|
break;
|
|
61
55
|
case "sleep":
|
|
62
|
-
await import("./mind-sleep-
|
|
56
|
+
await import("./mind-sleep-BTSWQNAC.js").then((m) => m.run(args.slice(1)));
|
|
63
57
|
break;
|
|
64
58
|
case "wake":
|
|
65
|
-
await import("./mind-wake-
|
|
59
|
+
await import("./mind-wake-SBAKIDVP.js").then((m) => m.run(args.slice(1)));
|
|
60
|
+
break;
|
|
61
|
+
case "split":
|
|
62
|
+
await import("./split-TKJ5OT3P.js").then((m) => m.run(args.slice(1)));
|
|
63
|
+
break;
|
|
64
|
+
case "join":
|
|
65
|
+
await import("./join-J4QU42DL.js").then((m) => m.run(args.slice(1)));
|
|
66
66
|
break;
|
|
67
67
|
case "--help":
|
|
68
68
|
case "-h":
|
|
@@ -91,14 +91,14 @@ function printUsage() {
|
|
|
91
91
|
volute mind list
|
|
92
92
|
volute mind status [name]
|
|
93
93
|
volute mind logs [name] [--follow] [-n N]
|
|
94
|
-
volute mind connect <type> [--mind <name>]
|
|
95
|
-
volute mind disconnect <type> [--mind <name>]
|
|
96
94
|
volute mind sprout
|
|
97
95
|
volute mind sleep [name] [--wake-at <time>]
|
|
98
96
|
volute mind wake [name]
|
|
99
|
-
volute mind
|
|
97
|
+
volute mind split <name> [--from <mind>] [--soul "..."] [--port N] [--no-start] [--json]
|
|
98
|
+
volute mind join <variant-name> [--summary "..." --justification "..." --memory "..."] [--skip-verify]
|
|
99
|
+
volute mind upgrade [name] [--template <name>] [--continue] [--accept]
|
|
100
100
|
volute mind import <path> [--name <name>] [--session <path>] [--template <name>]
|
|
101
|
-
volute mind export <name> [--include-env] [--include-identity] [--include-
|
|
101
|
+
volute mind export <name> [--include-env] [--include-identity] [--include-history] [--include-sessions] [--all] [--output <path>]
|
|
102
102
|
|
|
103
103
|
Mind name can be omitted (where shown as [name]) if VOLUTE_MIND is set.`);
|
|
104
104
|
}
|
|
@@ -4,11 +4,10 @@ import {
|
|
|
4
4
|
markIdle,
|
|
5
5
|
onMindEvent,
|
|
6
6
|
stopAll
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-33XAVCS4.js";
|
|
7
|
+
} from "./chunk-K5NAC55T.js";
|
|
8
|
+
import "./chunk-VIVMW2H2.js";
|
|
10
9
|
import "./chunk-YUIHSKR6.js";
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
11
|
import "./chunk-K3NQKI34.js";
|
|
13
12
|
export {
|
|
14
13
|
getActiveMinds,
|
|
@@ -3,12 +3,13 @@ import {
|
|
|
3
3
|
MindManager,
|
|
4
4
|
getMindManager,
|
|
5
5
|
initMindManager
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-PHSAT7YL.js";
|
|
7
|
+
import "./chunk-USUXRNVD.js";
|
|
8
|
+
import "./chunk-2WPW7OT6.js";
|
|
9
9
|
import "./chunk-YUIHSKR6.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-RKQEHRBB.js";
|
|
11
|
+
import "./chunk-IKRVFPWU.js";
|
|
12
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
13
|
import "./chunk-K3NQKI34.js";
|
|
13
14
|
export {
|
|
14
15
|
MindManager,
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveMindName
|
|
4
4
|
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
5
8
|
import {
|
|
6
9
|
parseArgs
|
|
7
10
|
} from "./chunk-D424ZQGI.js";
|
|
8
|
-
import
|
|
9
|
-
daemonFetch
|
|
10
|
-
} from "./chunk-TRQEV3CD.js";
|
|
11
|
-
import "./chunk-B2CPS4QU.js";
|
|
11
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/mind-sleep.ts
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveMindName
|
|
4
4
|
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
5
8
|
import {
|
|
6
9
|
parseArgs
|
|
7
10
|
} from "./chunk-D424ZQGI.js";
|
|
8
|
-
import
|
|
9
|
-
daemonFetch
|
|
10
|
-
} from "./chunk-TRQEV3CD.js";
|
|
11
|
-
import "./chunk-B2CPS4QU.js";
|
|
11
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/mind-wake.ts
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
readStdin
|
|
4
|
+
} from "./chunk-ZYGKG6VC.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
8
|
+
import {
|
|
9
|
+
parseArgs
|
|
10
|
+
} from "./chunk-D424ZQGI.js";
|
|
11
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
|
+
import "./chunk-K3NQKI34.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/notes.ts
|
|
15
|
+
function apiUrl(path) {
|
|
16
|
+
return `/api/notes${path}`;
|
|
17
|
+
}
|
|
18
|
+
async function list(args) {
|
|
19
|
+
const { flags } = parseArgs(args, {
|
|
20
|
+
author: { type: "string" },
|
|
21
|
+
limit: { type: "number" }
|
|
22
|
+
});
|
|
23
|
+
const params = new URLSearchParams();
|
|
24
|
+
if (flags.author) params.set("author", flags.author);
|
|
25
|
+
if (flags.limit) params.set("limit", String(flags.limit));
|
|
26
|
+
const res = await daemonFetch(`${apiUrl("")}?${params}`);
|
|
27
|
+
if (!res.ok) {
|
|
28
|
+
const data = await res.json().catch(() => ({ error: "Unknown error" }));
|
|
29
|
+
console.error(data.error);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
const notes = await res.json();
|
|
33
|
+
if (notes.length === 0) {
|
|
34
|
+
console.log("No notes yet.");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
for (const note of notes) {
|
|
38
|
+
const date = new Date(note.created_at).toLocaleDateString();
|
|
39
|
+
const comments = note.comment_count > 0 ? ` (${note.comment_count} comments)` : "";
|
|
40
|
+
const replyIndicator = note.reply_to ? ` \u21A9 ${note.reply_to.author_username}/${note.reply_to.slug}` : "";
|
|
41
|
+
const reactions = note.reactions && note.reactions.length > 0 ? ` ${note.reactions.map((r) => `${r.emoji} ${r.count}`).join(" ")}` : "";
|
|
42
|
+
console.log(
|
|
43
|
+
` ${note.author_username}/${note.slug} ${note.title} ${date}${comments}${replyIndicator}${reactions}`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function write(args) {
|
|
48
|
+
const { flags } = parseArgs(args, {
|
|
49
|
+
title: { type: "string" },
|
|
50
|
+
content: { type: "string" },
|
|
51
|
+
"reply-to": { type: "string" }
|
|
52
|
+
});
|
|
53
|
+
if (!flags.title) {
|
|
54
|
+
console.error(
|
|
55
|
+
'Usage: volute notes write --title "..." [--content "..." | stdin] [--reply-to <author>/<slug>]'
|
|
56
|
+
);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
const content = flags.content ?? await readStdin();
|
|
60
|
+
if (!content) {
|
|
61
|
+
console.error("Content required via --content or stdin");
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
const body = { title: flags.title, content };
|
|
65
|
+
if (flags["reply-to"]) body.reply_to = flags["reply-to"];
|
|
66
|
+
const res = await daemonFetch(apiUrl(""), {
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: { "Content-Type": "application/json" },
|
|
69
|
+
body: JSON.stringify(body)
|
|
70
|
+
});
|
|
71
|
+
if (!res.ok) {
|
|
72
|
+
const data = await res.json().catch(() => ({ error: "Unknown error" }));
|
|
73
|
+
console.error(data.error);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
const note = await res.json();
|
|
77
|
+
console.log(`Published: ${note.author_username}/${note.slug}`);
|
|
78
|
+
}
|
|
79
|
+
async function read(args) {
|
|
80
|
+
const { positional } = parseArgs(args, {});
|
|
81
|
+
const ref = positional[0];
|
|
82
|
+
if (!ref || !ref.includes("/")) {
|
|
83
|
+
console.error("Usage: volute notes read <author>/<slug>");
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
const [author, slug] = ref.split("/", 2);
|
|
87
|
+
const res = await daemonFetch(apiUrl(`/${author}/${slug}`));
|
|
88
|
+
if (!res.ok) {
|
|
89
|
+
const data = await res.json().catch(() => ({ error: "Unknown error" }));
|
|
90
|
+
console.error(data.error);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
const note = await res.json();
|
|
94
|
+
console.log(`
|
|
95
|
+
${note.title}`);
|
|
96
|
+
console.log(` by ${note.author_username} \xB7 ${new Date(note.created_at).toLocaleDateString()}`);
|
|
97
|
+
if (note.reply_to) {
|
|
98
|
+
console.log(
|
|
99
|
+
` In reply to: ${note.reply_to.author_username}/${note.reply_to.slug} \u2014 ${note.reply_to.title}`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
console.log("");
|
|
103
|
+
console.log(note.content);
|
|
104
|
+
if (note.reactions && note.reactions.length > 0) {
|
|
105
|
+
console.log(`
|
|
106
|
+
${note.reactions.map((r) => `${r.emoji} ${r.count}`).join(" ")}`);
|
|
107
|
+
}
|
|
108
|
+
if (note.comments && note.comments.length > 0) {
|
|
109
|
+
console.log(`
|
|
110
|
+
--- Comments (${note.comments.length}) ---
|
|
111
|
+
`);
|
|
112
|
+
for (const c of note.comments) {
|
|
113
|
+
const date = new Date(c.created_at).toLocaleDateString();
|
|
114
|
+
console.log(` ${c.author_username} (${date}):`);
|
|
115
|
+
console.log(` ${c.content}
|
|
116
|
+
`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (note.replies && note.replies.length > 0) {
|
|
120
|
+
console.log(`
|
|
121
|
+
--- Replies (${note.replies.length}) ---
|
|
122
|
+
`);
|
|
123
|
+
for (const r of note.replies) {
|
|
124
|
+
const date = new Date(r.created_at).toLocaleDateString();
|
|
125
|
+
console.log(` ${r.author_username}/${r.slug} ${r.title} ${date}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function react(args) {
|
|
130
|
+
const { positional } = parseArgs(args, {});
|
|
131
|
+
const ref = positional[0];
|
|
132
|
+
const emoji = positional[1];
|
|
133
|
+
if (!ref || !ref.includes("/") || !emoji) {
|
|
134
|
+
console.error("Usage: volute notes react <author>/<slug> <emoji>");
|
|
135
|
+
process.exit(1);
|
|
136
|
+
}
|
|
137
|
+
const [author, slug] = ref.split("/", 2);
|
|
138
|
+
const res = await daemonFetch(apiUrl(`/${author}/${slug}/reactions`), {
|
|
139
|
+
method: "POST",
|
|
140
|
+
headers: { "Content-Type": "application/json" },
|
|
141
|
+
body: JSON.stringify({ emoji })
|
|
142
|
+
});
|
|
143
|
+
if (!res.ok) {
|
|
144
|
+
const data = await res.json().catch(() => ({ error: "Unknown error" }));
|
|
145
|
+
console.error(data.error);
|
|
146
|
+
process.exit(1);
|
|
147
|
+
}
|
|
148
|
+
const result = await res.json();
|
|
149
|
+
console.log(result.added ? `Reacted with ${emoji}` : `Removed ${emoji} reaction`);
|
|
150
|
+
}
|
|
151
|
+
async function comment(args) {
|
|
152
|
+
const { positional } = parseArgs(args, {});
|
|
153
|
+
const ref = positional[0];
|
|
154
|
+
const text = positional[1] ?? await readStdin();
|
|
155
|
+
if (!ref || !ref.includes("/") || !text) {
|
|
156
|
+
console.error('Usage: volute notes comment <author>/<slug> "comment text"');
|
|
157
|
+
process.exit(1);
|
|
158
|
+
}
|
|
159
|
+
const [author, slug] = ref.split("/", 2);
|
|
160
|
+
const res = await daemonFetch(apiUrl(`/${author}/${slug}/comments`), {
|
|
161
|
+
method: "POST",
|
|
162
|
+
headers: { "Content-Type": "application/json" },
|
|
163
|
+
body: JSON.stringify({ content: text })
|
|
164
|
+
});
|
|
165
|
+
if (!res.ok) {
|
|
166
|
+
const data = await res.json().catch(() => ({ error: "Unknown error" }));
|
|
167
|
+
console.error(data.error);
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
console.log("Comment added.");
|
|
171
|
+
}
|
|
172
|
+
async function del(args) {
|
|
173
|
+
const { positional } = parseArgs(args, {});
|
|
174
|
+
const ref = positional[0];
|
|
175
|
+
if (!ref || !ref.includes("/")) {
|
|
176
|
+
console.error("Usage: volute notes delete <author>/<slug>");
|
|
177
|
+
process.exit(1);
|
|
178
|
+
}
|
|
179
|
+
const [author, slug] = ref.split("/", 2);
|
|
180
|
+
const res = await daemonFetch(apiUrl(`/${author}/${slug}`), {
|
|
181
|
+
method: "DELETE"
|
|
182
|
+
});
|
|
183
|
+
if (!res.ok) {
|
|
184
|
+
const data = await res.json().catch(() => ({ error: "Unknown error" }));
|
|
185
|
+
console.error(data.error);
|
|
186
|
+
process.exit(1);
|
|
187
|
+
}
|
|
188
|
+
console.log("Note deleted.");
|
|
189
|
+
}
|
|
190
|
+
async function run(args) {
|
|
191
|
+
const subcommand = args[0];
|
|
192
|
+
const rest = args.slice(1);
|
|
193
|
+
switch (subcommand) {
|
|
194
|
+
case "list":
|
|
195
|
+
return list(rest);
|
|
196
|
+
case "write":
|
|
197
|
+
return write(rest);
|
|
198
|
+
case "read":
|
|
199
|
+
return read(rest);
|
|
200
|
+
case "react":
|
|
201
|
+
return react(rest);
|
|
202
|
+
case "comment":
|
|
203
|
+
return comment(rest);
|
|
204
|
+
case "delete":
|
|
205
|
+
return del(rest);
|
|
206
|
+
default:
|
|
207
|
+
console.log(`volute notes \u2014 read and write notes
|
|
208
|
+
|
|
209
|
+
list [--author <name>] [--limit N] List notes
|
|
210
|
+
write --title "..." [--content "..."] [--reply-to ref] Write a note (content from --content or stdin)
|
|
211
|
+
read <author>/<slug> Read a note
|
|
212
|
+
react <author>/<slug> <emoji> Toggle a reaction on a note
|
|
213
|
+
comment <author>/<slug> "text" Comment on a note
|
|
214
|
+
delete <author>/<slug> Delete a note`);
|
|
215
|
+
if (subcommand && subcommand !== "--help" && subcommand !== "-h") process.exit(1);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export {
|
|
219
|
+
run
|
|
220
|
+
};
|
|
@@ -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.27.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",
|
|
@@ -60,6 +60,7 @@ var package_default = {
|
|
|
60
60
|
"db:migrate": "drizzle-kit migrate"
|
|
61
61
|
},
|
|
62
62
|
dependencies: {
|
|
63
|
+
"@anthropic-ai/sandbox-runtime": "^0.0.39",
|
|
63
64
|
"@hono/node-server": "^1.19.9",
|
|
64
65
|
"@hono/zod-validator": "^0.7.6",
|
|
65
66
|
"@libsql/client": "^0.17.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-66UB2ZFY.js").then((m) => m.run(args.slice(1)));
|
|
10
10
|
break;
|
|
11
11
|
case "status":
|
|
12
|
-
await import("./status-
|
|
12
|
+
await import("./status-THLOBLWG.js").then((m) => m.run(args.slice(1)));
|
|
13
13
|
break;
|
|
14
14
|
case "--help":
|
|
15
15
|
case "-h":
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
} from "./chunk-NAOW2CLO.js";
|
|
8
8
|
import {
|
|
9
9
|
sharedDir
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JKOWNZ4P.js";
|
|
11
11
|
import {
|
|
12
12
|
readSystemsConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KDGS53OS.js";
|
|
14
14
|
import "./chunk-YUIHSKR6.js";
|
|
15
|
+
import "./chunk-AW7PFDVN.js";
|
|
16
|
+
import "./chunk-RKQEHRBB.js";
|
|
15
17
|
import {
|
|
16
18
|
parseArgs
|
|
17
19
|
} from "./chunk-D424ZQGI.js";
|
|
18
|
-
import "./chunk-JTDFJWI2.js";
|
|
19
|
-
import "./chunk-NWPT4ASZ.js";
|
|
20
20
|
import {
|
|
21
21
|
mindDir
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-H7OZRFJB.js";
|
|
23
23
|
import "./chunk-K3NQKI34.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/pages/publish.ts
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveMindName
|
|
4
4
|
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
5
8
|
import {
|
|
6
9
|
parseArgs
|
|
7
10
|
} from "./chunk-D424ZQGI.js";
|
|
8
|
-
import
|
|
9
|
-
daemonFetch
|
|
10
|
-
} from "./chunk-TRQEV3CD.js";
|
|
11
|
-
import "./chunk-B2CPS4QU.js";
|
|
11
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/shared/pull.ts
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
8
|
+
import {
|
|
9
|
+
parseArgs
|
|
10
|
+
} from "./chunk-D424ZQGI.js";
|
|
11
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
|
+
import "./chunk-K3NQKI34.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/chat/read.ts
|
|
15
|
+
async function run(args) {
|
|
16
|
+
const { positional, flags } = parseArgs(args, {
|
|
17
|
+
mind: { type: "string" },
|
|
18
|
+
limit: { type: "number" }
|
|
19
|
+
});
|
|
20
|
+
const conversationId = positional[0];
|
|
21
|
+
if (!conversationId) {
|
|
22
|
+
console.error("Usage: volute chat read <conversation-id> [--limit N] [--mind <name>]");
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const mindName = resolveMindName(flags);
|
|
26
|
+
const limit = String(flags.limit ?? 50);
|
|
27
|
+
const res = await daemonFetch(
|
|
28
|
+
`/api/minds/${encodeURIComponent(mindName)}/conversations/${encodeURIComponent(conversationId)}/messages?limit=${limit}`
|
|
29
|
+
);
|
|
30
|
+
if (!res.ok) {
|
|
31
|
+
console.error(`Failed to read conversation: ${res.status}`);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
const data = await res.json();
|
|
35
|
+
for (const msg of data.messages) {
|
|
36
|
+
const sender = msg.sender_name ?? msg.role;
|
|
37
|
+
const text = Array.isArray(msg.content) ? msg.content.filter((b) => b.type === "text").map((b) => b.text).join("") : msg.content;
|
|
38
|
+
const time = new Date(
|
|
39
|
+
msg.created_at.endsWith("Z") ? msg.created_at : `${msg.created_at}Z`
|
|
40
|
+
).toLocaleString();
|
|
41
|
+
console.log(`[${time}] ${sender}: ${text}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
run
|
|
46
|
+
};
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "./chunk-RWKVSSLY.js";
|
|
5
5
|
import {
|
|
6
6
|
promptLine
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SSI47XP2.js";
|
|
8
8
|
import {
|
|
9
9
|
readSystemsConfig,
|
|
10
10
|
writeSystemsConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KDGS53OS.js";
|
|
12
12
|
import {
|
|
13
13
|
parseArgs
|
|
14
14
|
} from "./chunk-D424ZQGI.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-H7OZRFJB.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/pages/register.ts
|
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
addMind,
|
|
4
|
+
addVariant,
|
|
4
5
|
daemonLoopback,
|
|
6
|
+
ensureSystemDir,
|
|
5
7
|
ensureVoluteHome,
|
|
6
8
|
findMind,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
findVariants,
|
|
10
|
+
getBaseName,
|
|
9
11
|
mindDir,
|
|
10
12
|
nextPort,
|
|
13
|
+
readAllMinds,
|
|
11
14
|
readRegistry,
|
|
12
15
|
removeMind,
|
|
13
|
-
resolveMind,
|
|
14
16
|
setMindRunning,
|
|
15
17
|
setMindStage,
|
|
16
18
|
setMindTemplateHash,
|
|
17
19
|
stateDir,
|
|
18
20
|
validateMindName,
|
|
19
21
|
voluteHome,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
voluteSystemDir,
|
|
23
|
+
voluteUserHome
|
|
24
|
+
} from "./chunk-H7OZRFJB.js";
|
|
22
25
|
import "./chunk-K3NQKI34.js";
|
|
23
26
|
export {
|
|
24
27
|
addMind,
|
|
28
|
+
addVariant,
|
|
25
29
|
daemonLoopback,
|
|
30
|
+
ensureSystemDir,
|
|
26
31
|
ensureVoluteHome,
|
|
27
32
|
findMind,
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
findVariants,
|
|
34
|
+
getBaseName,
|
|
30
35
|
mindDir,
|
|
31
36
|
nextPort,
|
|
37
|
+
readAllMinds,
|
|
32
38
|
readRegistry,
|
|
33
39
|
removeMind,
|
|
34
|
-
resolveMind,
|
|
35
40
|
setMindRunning,
|
|
36
41
|
setMindStage,
|
|
37
42
|
setMindTemplateHash,
|
|
38
43
|
stateDir,
|
|
39
44
|
validateMindName,
|
|
40
45
|
voluteHome,
|
|
41
|
-
|
|
46
|
+
voluteSystemDir,
|
|
47
|
+
voluteUserHome
|
|
42
48
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
getClient,
|
|
4
|
-
urlOf
|
|
5
|
-
} from "./chunk-4RQBJWQX.js";
|
|
6
2
|
import {
|
|
7
3
|
resolveMindName
|
|
8
4
|
} from "./chunk-NAOW2CLO.js";
|
|
9
5
|
import {
|
|
10
6
|
daemonFetch
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
8
|
+
import {
|
|
9
|
+
getClient,
|
|
10
|
+
urlOf
|
|
11
|
+
} from "./chunk-4RQBJWQX.js";
|
|
12
|
+
import "./chunk-H7OZRFJB.js";
|
|
13
13
|
import "./chunk-K3NQKI34.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/restart.ts
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
buildDenyRead,
|
|
4
|
+
initSandbox,
|
|
5
|
+
isSandboxEnabled,
|
|
6
|
+
shellEscape,
|
|
7
|
+
wrapForSandbox
|
|
8
|
+
} from "./chunk-USUXRNVD.js";
|
|
9
|
+
import "./chunk-YUIHSKR6.js";
|
|
10
|
+
import "./chunk-IKRVFPWU.js";
|
|
11
|
+
import "./chunk-H7OZRFJB.js";
|
|
12
|
+
import "./chunk-K3NQKI34.js";
|
|
13
|
+
export {
|
|
14
|
+
buildDenyRead,
|
|
15
|
+
initSandbox,
|
|
16
|
+
isSandboxEnabled,
|
|
17
|
+
shellEscape,
|
|
18
|
+
wrapForSandbox
|
|
19
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JGFVMROS.js";
|
|
2
8
|
import {
|
|
3
9
|
getClient,
|
|
4
10
|
urlOf
|
|
5
11
|
} from "./chunk-4RQBJWQX.js";
|
|
6
|
-
import {
|
|
7
|
-
resolveMindName
|
|
8
|
-
} from "./chunk-NAOW2CLO.js";
|
|
9
12
|
import {
|
|
10
13
|
parseArgs
|
|
11
14
|
} from "./chunk-D424ZQGI.js";
|
|
12
|
-
import
|
|
13
|
-
daemonFetch
|
|
14
|
-
} from "./chunk-TRQEV3CD.js";
|
|
15
|
-
import "./chunk-B2CPS4QU.js";
|
|
15
|
+
import "./chunk-H7OZRFJB.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/schedule.ts
|