volute 0.27.0 → 0.29.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.
Files changed (81) hide show
  1. package/README.md +20 -10
  2. package/dist/accept-666DIZX2.js +41 -0
  3. package/dist/api.d.ts +342 -143
  4. package/dist/{chat-MHJ3L6JQ.js → chat-KTPOR2JT.js} +18 -8
  5. package/dist/chunk-A6TUJJ3L.js +19 -0
  6. package/dist/{chunk-OQZH4PBB.js → chunk-CMILSHZD.js} +199 -277
  7. package/dist/{chunk-K5NAC55T.js → chunk-CQ7SNKNI.js} +1 -1
  8. package/dist/{chunk-PHSAT7YL.js → chunk-EHZKEMMV.js} +5 -5
  9. package/dist/{chunk-IAYBDWVG.js → chunk-FLZGS4QH.js} +145 -0
  10. package/dist/{chunk-USUXRNVD.js → chunk-J4IBNXGJ.js} +0 -2
  11. package/dist/chunk-MD4C26II.js +128 -0
  12. package/dist/{chunk-4WXYUOAK.js → chunk-NI5FFCCS.js} +8 -1
  13. package/dist/{chunk-JKOWNZ4P.js → chunk-P72MVS4R.js} +1 -40
  14. package/dist/chunk-THUUIU3E.js +232 -0
  15. package/dist/cli.js +21 -30
  16. package/dist/clock-DGCBVGYA.js +259 -0
  17. package/dist/{cloud-sync-T7M3ESC3.js → cloud-sync-KILFGV5Q.js} +7 -7
  18. package/dist/connectors/discord-bridge.js +1 -1
  19. package/dist/connectors/slack-bridge.js +1 -1
  20. package/dist/connectors/telegram-bridge.js +1 -1
  21. package/dist/{conversations-M2K4253F.js → conversations-P5BL7RMX.js} +7 -1
  22. package/dist/create-DFCAGEE5.js +70 -0
  23. package/dist/{daemon-restart-M2QTYMEG.js → daemon-restart-UHOMICXT.js} +1 -1
  24. package/dist/daemon.js +715 -661
  25. package/dist/files-M546TKVN.js +46 -0
  26. package/dist/{login-XX37I52P.js → login-BKP3AFWN.js} +7 -17
  27. package/dist/logout-IQK7FNEK.js +20 -0
  28. package/dist/{message-delivery-LDXLGERA.js → message-delivery-Q7VUMIEI.js} +11 -9
  29. package/dist/{mind-DI33C74K.js → mind-S5V6CK5W.js} +8 -13
  30. package/dist/{mind-activity-tracker-EN6XNXPF.js → mind-activity-tracker-WRHFI3YW.js} +1 -1
  31. package/dist/mind-list-UPJ75GPI.js +29 -0
  32. package/dist/{mind-manager-M6EMUW5I.js → mind-manager-P66HQDNE.js} +2 -2
  33. package/dist/mind-status-TK5AETEM.js +55 -0
  34. package/dist/{package-7WY6VKU3.js → package-OFKXNKJF.js} +1 -1
  35. package/dist/{pages-6EBS6CBR.js → pages-EUJR52AH.js} +5 -5
  36. package/dist/pages-watcher-P7QECRE2.js +21 -0
  37. package/dist/{publish-66UB2ZFY.js → publish-ZZB33WP4.js} +6 -17
  38. package/dist/{register-6B2CXTYM.js → register-CHREOMJ3.js} +5 -24
  39. package/dist/reject-LXIZFJ4Q.js +39 -0
  40. package/dist/{sandbox-TGBX22DS.js → sandbox-5BW5HPXM.js} +1 -1
  41. package/dist/{send-ZNCJDSRP.js → send-TAOEZ4NH.js} +64 -6
  42. package/dist/skills/dreaming/references/INSTALL.md +3 -17
  43. package/dist/skills/shared-files/SKILL.md +44 -0
  44. package/dist/skills/shared-files/scripts/merge.ts +72 -0
  45. package/dist/skills/shared-files/scripts/pull.ts +52 -0
  46. package/dist/skills/volute-mind/SKILL.md +48 -22
  47. package/dist/{sleep-manager-MWYHM5HV.js → sleep-manager-G4B5GW5P.js} +7 -7
  48. package/dist/{sprout-IJVVKSJ2.js → sprout-UNT7LKKE.js} +1 -1
  49. package/dist/{status-77YEPHMW.js → status-NQJYR4BG.js} +45 -1
  50. package/dist/{status-THLOBLWG.js → status-S7UUPNRW.js} +3 -13
  51. package/dist/systems-SMEFSHTA.js +60 -0
  52. package/dist/{up-NKSMXBWR.js → up-W6VAK2XE.js} +1 -1
  53. package/dist/{version-notify-5Z4MNR6M.js → version-notify-WDHRO3XD.js} +11 -11
  54. package/dist/web-assets/assets/index-BmKDnWDB.css +1 -0
  55. package/dist/web-assets/assets/index-CLJMx-GA.js +71 -0
  56. package/dist/web-assets/index.html +2 -2
  57. package/package.json +1 -1
  58. package/templates/_base/src/lib/logger.ts +10 -53
  59. package/templates/_base/src/lib/router.ts +1 -9
  60. package/templates/claude/src/lib/stream-consumer.ts +1 -4
  61. package/templates/pi/src/lib/event-handler.ts +1 -14
  62. package/dist/auth-D3OT2ARB.js +0 -37
  63. package/dist/chunk-KDGS53OS.js +0 -50
  64. package/dist/chunk-RWKVSSLY.js +0 -26
  65. package/dist/chunk-T6HKBWXZ.js +0 -23
  66. package/dist/create-D7J73A6H.js +0 -45
  67. package/dist/file-CR36YUPD.js +0 -204
  68. package/dist/log-ABYNVYJ3.js +0 -39
  69. package/dist/logout-W4KOOBIT.js +0 -18
  70. package/dist/logs-U35JR2KE.js +0 -77
  71. package/dist/merge-LNSMSAOF.js +0 -46
  72. package/dist/pull-XCHJTM5M.js +0 -39
  73. package/dist/schedule-QTJMFATP.js +0 -154
  74. package/dist/service-6LIN3F3K.js +0 -122
  75. package/dist/shared-ML5I4Q2A.js +0 -39
  76. package/dist/status-7GA4SM4Y.js +0 -35
  77. package/dist/web-assets/assets/index-CI5wgghI.css +0 -1
  78. package/dist/web-assets/assets/index-is5CvJWH.js +0 -75
  79. package/dist/{chunk-GIE6CSN5.js → chunk-DUAUMCEE.js} +0 -0
  80. package/dist/{history-XKRTAFS2.js → history-ALPTNB3I.js} +0 -0
  81. package/dist/{setup-JG4QAEBV.js → setup-RXYVGGT7.js} +3 -3
@@ -1,77 +0,0 @@
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
- getClient,
10
- urlOf
11
- } from "./chunk-4RQBJWQX.js";
12
- import {
13
- parseArgs
14
- } from "./chunk-D424ZQGI.js";
15
- import "./chunk-H7OZRFJB.js";
16
- import "./chunk-K3NQKI34.js";
17
-
18
- // src/commands/logs.ts
19
- async function run(args) {
20
- const { flags } = parseArgs(args, {
21
- mind: { type: "string" },
22
- follow: { type: "boolean" },
23
- n: { type: "number" }
24
- });
25
- const name = resolveMindName(flags);
26
- const client = getClient();
27
- if (flags.follow) {
28
- const res = await daemonFetch(urlOf(client.api.minds[":name"].logs.$url({ param: { name } })));
29
- if (!res.ok) {
30
- const body = await res.json().catch(() => ({}));
31
- console.error(body.error ?? `Server responded with ${res.status}`);
32
- process.exit(1);
33
- }
34
- if (!res.body) {
35
- console.error("Server returned an empty response body for log streaming.");
36
- process.exit(1);
37
- }
38
- const reader = res.body.getReader();
39
- const decoder = new TextDecoder();
40
- let buffer = "";
41
- try {
42
- while (true) {
43
- const { done, value } = await reader.read();
44
- if (done) break;
45
- buffer += decoder.decode(value, { stream: true });
46
- const lines = buffer.split("\n");
47
- buffer = lines.pop();
48
- for (const line of lines) {
49
- if (line.startsWith("data: ")) {
50
- process.stdout.write(`${line.slice(6)}
51
- `);
52
- }
53
- }
54
- }
55
- } catch (err) {
56
- const isCleanClose = err instanceof Error && (err.name === "AbortError" || err.code === "ECONNRESET");
57
- if (!isCleanClose) {
58
- console.error(`Log stream error: ${err instanceof Error ? err.message : String(err)}`);
59
- process.exit(1);
60
- }
61
- }
62
- } else {
63
- const n = flags.n ?? 50;
64
- const url = client.api.minds[":name"].logs.tail.$url({ param: { name } });
65
- url.searchParams.set("n", String(n));
66
- const res = await daemonFetch(urlOf(url));
67
- if (!res.ok) {
68
- const body = await res.json().catch(() => ({}));
69
- console.error(body.error ?? `Server responded with ${res.status}`);
70
- process.exit(1);
71
- }
72
- console.log(await res.text());
73
- }
74
- }
75
- export {
76
- run
77
- };
@@ -1,46 +0,0 @@
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/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
- };
@@ -1,39 +0,0 @@
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/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
- };
@@ -1,154 +0,0 @@
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
- getClient,
10
- urlOf
11
- } from "./chunk-4RQBJWQX.js";
12
- import {
13
- parseArgs
14
- } from "./chunk-D424ZQGI.js";
15
- import "./chunk-H7OZRFJB.js";
16
- import "./chunk-K3NQKI34.js";
17
-
18
- // src/commands/schedule.ts
19
- import { CronExpressionParser } from "cron-parser";
20
- async function run(args) {
21
- const subcommand = args[0];
22
- switch (subcommand) {
23
- case "list":
24
- await listSchedules(args.slice(1));
25
- break;
26
- case "add":
27
- await addSchedule(args.slice(1));
28
- break;
29
- case "remove":
30
- await removeSchedule(args.slice(1));
31
- break;
32
- case "--help":
33
- case "-h":
34
- case void 0:
35
- printUsage();
36
- break;
37
- default:
38
- printUsage();
39
- process.exit(1);
40
- }
41
- }
42
- function printUsage() {
43
- console.log(`Usage:
44
- volute schedule list [--mind <name>]
45
- volute schedule add [--mind <name>] --cron "..." --message "..." [--id name]
46
- volute schedule add [--mind <name>] --cron "..." --script "..." [--id name]
47
- volute schedule remove [--mind <name>] --id <id>`);
48
- }
49
- async function listSchedules(args) {
50
- const { flags } = parseArgs(args, {
51
- mind: { type: "string" }
52
- });
53
- const mind = resolveMindName(flags);
54
- const client = getClient();
55
- const res = await daemonFetch(
56
- urlOf(client.api.minds[":name"].schedules.$url({ param: { name: mind } }))
57
- );
58
- if (!res.ok) {
59
- const data = await res.json();
60
- console.error(data.error ?? `Failed to list schedules: ${res.status}`);
61
- process.exit(1);
62
- }
63
- const schedules = await res.json();
64
- if (schedules.length === 0) {
65
- console.log("No schedules configured.");
66
- return;
67
- }
68
- const idW = Math.max(2, ...schedules.map((s) => s.id.length));
69
- const cronW = Math.max(4, ...schedules.map((s) => s.cron.length));
70
- const actionLabel = (s) => s.script ? `[script] ${s.script}` : s.message ?? "";
71
- console.log(`${"ID".padEnd(idW)} ${"CRON".padEnd(cronW)} ENABLED ACTION`);
72
- for (const s of schedules) {
73
- console.log(
74
- `${s.id.padEnd(idW)} ${s.cron.padEnd(cronW)} ${String(s.enabled).padEnd(7)} ${actionLabel(s)}`
75
- );
76
- }
77
- }
78
- async function addSchedule(args) {
79
- const { flags } = parseArgs(args, {
80
- mind: { type: "string" },
81
- cron: { type: "string" },
82
- message: { type: "string" },
83
- script: { type: "string" },
84
- id: { type: "string" }
85
- });
86
- const mind = resolveMindName(flags);
87
- if (!flags.cron) {
88
- console.error("--cron is required");
89
- process.exit(1);
90
- }
91
- if (!flags.message && !flags.script) {
92
- console.error("--message or --script is required");
93
- process.exit(1);
94
- }
95
- if (flags.message && flags.script) {
96
- console.error("--message and --script are mutually exclusive");
97
- process.exit(1);
98
- }
99
- try {
100
- CronExpressionParser.parse(flags.cron);
101
- } catch {
102
- console.error(`Invalid cron expression: ${flags.cron}`);
103
- process.exit(1);
104
- }
105
- const body = { cron: flags.cron };
106
- if (flags.message) body.message = flags.message;
107
- if (flags.script) body.script = flags.script;
108
- if (flags.id) body.id = flags.id;
109
- const client = getClient();
110
- const res = await daemonFetch(
111
- urlOf(client.api.minds[":name"].schedules.$url({ param: { name: mind } })),
112
- {
113
- method: "POST",
114
- headers: { "Content-Type": "application/json" },
115
- body: JSON.stringify(body)
116
- }
117
- );
118
- if (!res.ok) {
119
- const data2 = await res.json();
120
- console.error(data2.error ?? `Failed to add schedule: ${res.status}`);
121
- process.exit(1);
122
- }
123
- const data = await res.json();
124
- console.log(`Schedule added: ${data.id}`);
125
- }
126
- async function removeSchedule(args) {
127
- const { flags } = parseArgs(args, {
128
- mind: { type: "string" },
129
- id: { type: "string" }
130
- });
131
- const mind = resolveMindName(flags);
132
- if (!flags.id) {
133
- console.error("--id is required");
134
- process.exit(1);
135
- }
136
- const client = getClient();
137
- const res = await daemonFetch(
138
- urlOf(
139
- client.api.minds[":name"].schedules[":id"].$url({
140
- param: { name: mind, id: flags.id }
141
- })
142
- ),
143
- { method: "DELETE" }
144
- );
145
- if (!res.ok) {
146
- const data = await res.json();
147
- console.error(data.error ?? `Failed to remove schedule: ${res.status}`);
148
- process.exit(1);
149
- }
150
- console.log(`Schedule removed: ${flags.id}`);
151
- }
152
- export {
153
- run
154
- };
@@ -1,122 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- LAUNCHD_PLIST_LABEL,
4
- LAUNCHD_PLIST_PATH,
5
- SYSTEM_LAUNCHD_PLIST_PATH,
6
- SYSTEM_SERVICE_PATH,
7
- USER_SYSTEMD_UNIT
8
- } from "./chunk-LAC664WU.js";
9
- import "./chunk-AW7PFDVN.js";
10
- import "./chunk-RKQEHRBB.js";
11
- import {
12
- parseArgs
13
- } from "./chunk-D424ZQGI.js";
14
- import "./chunk-H7OZRFJB.js";
15
- import "./chunk-K3NQKI34.js";
16
-
17
- // src/commands/service.ts
18
- import { execFile } from "child_process";
19
- import { existsSync } from "fs";
20
- import { promisify } from "util";
21
- var execFileAsync = promisify(execFile);
22
- async function status() {
23
- const platform = process.platform;
24
- if (platform === "darwin") {
25
- if (existsSync(SYSTEM_LAUNCHD_PLIST_PATH)) {
26
- try {
27
- const { stdout } = await execFileAsync("launchctl", ["list", LAUNCHD_PLIST_LABEL]);
28
- console.log("System service (LaunchDaemon):");
29
- console.log(stdout);
30
- } catch {
31
- console.log("System service installed but not currently loaded.");
32
- }
33
- return;
34
- }
35
- if (!existsSync(LAUNCHD_PLIST_PATH)) {
36
- console.log("Service not installed.");
37
- return;
38
- }
39
- try {
40
- const { stdout } = await execFileAsync("launchctl", ["list", LAUNCHD_PLIST_LABEL]);
41
- console.log(stdout);
42
- } catch {
43
- console.log("Service installed but not currently loaded.");
44
- }
45
- } else if (platform === "linux") {
46
- if (existsSync(SYSTEM_SERVICE_PATH)) {
47
- try {
48
- const { stdout } = await execFileAsync("systemctl", ["status", "volute", "--no-pager"]);
49
- console.log(stdout);
50
- } catch (err) {
51
- const e = err;
52
- if (e.stdout) {
53
- console.log(e.stdout);
54
- } else {
55
- console.error("System service installed but could not retrieve status.");
56
- if (e.stderr) console.error(e.stderr);
57
- else if (e.message) console.error(e.message);
58
- console.error("Try running: systemctl status volute");
59
- }
60
- }
61
- return;
62
- }
63
- if (!existsSync(USER_SYSTEMD_UNIT)) {
64
- console.log("Service not installed.");
65
- return;
66
- }
67
- try {
68
- const { stdout } = await execFileAsync("systemctl", [
69
- "--user",
70
- "status",
71
- "volute",
72
- "--no-pager"
73
- ]);
74
- console.log(stdout);
75
- } catch (err) {
76
- const e = err;
77
- if (e.stdout) console.log(e.stdout);
78
- else console.log("Service installed but status unknown.");
79
- }
80
- } else {
81
- console.error(`Unsupported platform: ${platform}`);
82
- process.exit(1);
83
- }
84
- }
85
- async function run(args) {
86
- const { positional } = parseArgs(args, {});
87
- const subcommand = positional[0];
88
- switch (subcommand) {
89
- case "install":
90
- console.log("'volute service install' has been replaced by 'volute setup'.");
91
- console.log("Run `volute setup` to configure your installation.");
92
- break;
93
- case "uninstall":
94
- console.log("'volute service uninstall' has been replaced by 'volute setup'.");
95
- console.log("To uninstall the service, remove the service file manually:");
96
- if (process.platform === "darwin") {
97
- console.log(" launchctl unload ~/Library/LaunchAgents/com.volute.daemon.plist");
98
- console.log(" rm ~/Library/LaunchAgents/com.volute.daemon.plist");
99
- } else {
100
- console.log(" systemctl --user disable --now volute");
101
- console.log(" rm ~/.config/systemd/user/volute.service");
102
- }
103
- break;
104
- case "status":
105
- await status();
106
- break;
107
- default:
108
- console.log(`Usage:
109
- volute service status Check service status
110
-
111
- Note: 'volute service install' and 'volute service uninstall' have been
112
- replaced by 'volute setup'. Run 'volute setup' to configure your installation.`);
113
- if (subcommand && subcommand !== "--help") {
114
- console.error(`
115
- Unknown subcommand: ${subcommand}`);
116
- process.exit(1);
117
- }
118
- }
119
- }
120
- export {
121
- run
122
- };
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./chunk-K3NQKI34.js";
3
-
4
- // src/commands/shared.ts
5
- async function run(args) {
6
- const subcommand = args[0];
7
- switch (subcommand) {
8
- case "merge":
9
- await import("./merge-LNSMSAOF.js").then((m) => m.run(args.slice(1)));
10
- break;
11
- case "pull":
12
- await import("./pull-XCHJTM5M.js").then((m) => m.run(args.slice(1)));
13
- break;
14
- case "log":
15
- await import("./log-ABYNVYJ3.js").then((m) => m.run(args.slice(1)));
16
- break;
17
- case "status":
18
- await import("./status-7GA4SM4Y.js").then((m) => m.run(args.slice(1)));
19
- break;
20
- case "--help":
21
- case "-h":
22
- case void 0:
23
- printUsage();
24
- break;
25
- default:
26
- printUsage();
27
- process.exit(1);
28
- }
29
- }
30
- function printUsage() {
31
- console.log(`Usage:
32
- volute shared merge "<message>" [--mind <name>] Merge shared changes to main
33
- volute shared pull [--mind <name>] Pull latest shared changes
34
- volute shared log [--limit N] [--mind <name>] Show shared repo history
35
- volute shared status [--mind <name>] Show pending changes diff`);
36
- }
37
- export {
38
- run
39
- };
@@ -1,35 +0,0 @@
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/shared/status.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/status`);
21
- if (!res.ok) {
22
- const body = await res.json().catch(() => ({}));
23
- console.error(body.error ?? `Server responded with ${res.status}`);
24
- process.exit(1);
25
- }
26
- const output = await res.text();
27
- if (output.trim()) {
28
- console.log(output.trimEnd());
29
- } else {
30
- console.log("No pending changes.");
31
- }
32
- }
33
- export {
34
- run
35
- };