volute 0.34.0 → 0.35.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 +7 -6
- package/dist/accept-ZBDVVCEU.js +42 -0
- package/dist/{activity-events-BN7V6KCC.js → activity-events-ZW4SDL2C.js} +4 -4
- package/dist/{ai-service-PSILB5WD.js → ai-service-LURBEDDB.js} +5 -5
- package/dist/{api-client-XUXOB7LI.js → api-client-3A77HMH7.js} +1 -1
- package/dist/api.d.ts +1 -5618
- package/dist/{archive-C2VEMQOR.js → archive-ESU2FUN4.js} +3 -3
- package/dist/{auth-ZFZXJZDQ.js → auth-WX4TESEI.js} +5 -5
- package/dist/bridge-PXIO6PS2.js +206 -0
- package/dist/chat-QXAJF3FU.js +51 -0
- package/dist/{chunk-7F2SW2KD.js → chunk-2TGZJFAT.js} +3 -3
- package/dist/{chunk-6LXAAQ43.js → chunk-33ODGMFZ.js} +1 -1
- package/dist/{chunk-4JSR7YO7.js → chunk-5N7Y5WAM.js} +1 -1
- package/dist/{chunk-FYCALD4Q.js → chunk-5T5YMX6S.js} +1 -1
- package/dist/{chunk-B2BVAIZ4.js → chunk-5XJYUFZH.js} +21 -15
- package/dist/{chunk-M3K5AARV.js → chunk-A2ZLHBHG.js} +2 -2
- package/dist/{chunk-U5BTYSAL.js → chunk-AN2W47GW.js} +2 -2
- package/dist/{chunk-G53F3JA4.js → chunk-AOB6GVRM.js} +1 -1
- package/dist/{chunk-N7BLAHNE.js → chunk-BDYXIWA5.js} +5 -5
- package/dist/{chunk-YUIHSKR6.js → chunk-BKF4WQCY.js} +2 -2
- package/dist/{chunk-6OWJXUAR.js → chunk-BMZQYACC.js} +2 -2
- package/dist/{chunk-NAOW2CLO.js → chunk-BTY4WNFE.js} +1 -1
- package/dist/{chunk-MLOQKQNB.js → chunk-BV65KRHM.js} +2 -2
- package/dist/{chunk-XWXBJQBE.js → chunk-CORXD635.js} +4 -4
- package/dist/{chunk-PVY5W6QN.js → chunk-F7ZNLYKZ.js} +2 -2
- package/dist/{chunk-BFWHBQK4.js → chunk-FT5KETXZ.js} +3 -3
- package/dist/{chunk-N3DNFPVA.js → chunk-IJHIXLVN.js} +8 -8
- package/dist/{chunk-V6ZCNULL.js → chunk-J6CJQDWI.js} +37 -28
- package/dist/{chunk-4RQBJWQX.js → chunk-LOPXTW6H.js} +1 -1
- package/dist/{chunk-47ZPNLF4.js → chunk-MDJGMOSD.js} +8 -137
- package/dist/{chunk-BTWAGDV5.js → chunk-N446KRP7.js} +3 -3
- package/dist/{chunk-6WAWMWR5.js → chunk-N5LMGYXX.js} +2 -2
- package/dist/{chunk-G6BSYHPK.js → chunk-NJK5SDGR.js} +1 -1
- package/dist/{chunk-D424ZQGI.js → chunk-O7IGP7ZW.js} +11 -3
- package/dist/{chunk-2IOP6PHB.js → chunk-OTC67N2Z.js} +2 -2
- package/dist/{chunk-V45JXOWY.js → chunk-PWQ2ITYG.js} +4 -4
- package/dist/{chunk-KTLFDYPT.js → chunk-QCH6K235.js} +1 -1
- package/dist/chunk-QHG4OMZL.js +145 -0
- package/dist/{chunk-IS7WJ56Q.js → chunk-QWTR6AWZ.js} +3 -3
- package/dist/chunk-TXSA4Q3V.js +116 -0
- package/dist/{chunk-BDK73LK6.js → chunk-VHJRZM2S.js} +2 -2
- package/dist/{chunk-SSI47XP2.js → chunk-VHWGEJ4V.js} +1 -1
- package/dist/chunk-VY3RB2V7.js +164 -0
- package/dist/chunk-WJPROOU5.js +8314 -0
- package/dist/{chunk-E5C7OWZ2.js → chunk-WZRZFFCL.js} +8 -8
- package/dist/{chunk-BM474GX6.js → chunk-XRQSAMX2.js} +4 -4
- package/dist/{chunk-OYAKCAVY.js → chunk-ZSR72JB3.js} +1 -1
- package/dist/{chunk-PLDWHR4D.js → chunk-ZX7EAV5J.js} +17 -7
- package/dist/cli.js +90 -29
- package/dist/clock-HSEKS5AR.js +289 -0
- package/dist/{cloud-sync-TG3TIX5H.js → cloud-sync-6JL4C24T.js} +21 -22
- package/dist/config-UTS7QULS.js +76 -0
- package/dist/connectors/discord-bridge.js +3 -3
- package/dist/connectors/slack-bridge.js +3 -3
- package/dist/connectors/telegram-bridge.js +3 -3
- package/dist/{conversations-HL2JP5GI.js → conversations-2PW57WO2.js} +5 -5
- package/dist/create-5BPOOJAN.js +75 -0
- package/dist/create-UVCK2CS6.js +50 -0
- package/dist/daemon-client-RVIKXGFQ.js +12 -0
- package/dist/daemon-restart-HSZ3BCX5.js +65 -0
- package/dist/daemon.js +845 -1766
- package/dist/{db-PLEDCBHZ.js → db-BDMH4SZ2.js} +7 -3
- package/dist/{db-RYX3SS2W.js → db-BVBJ57TU.js} +2 -2
- package/dist/delete-L5PAVDGQ.js +42 -0
- package/dist/delivery-manager-H5ZVBMCQ.js +31 -0
- package/dist/{delivery-router-D5ELDMS2.js → delivery-router-HEJSJAHQ.js} +4 -4
- package/dist/down-74VXM45A.js +17 -0
- package/dist/env-E4XHO2BI.js +223 -0
- package/dist/{exec-DVLXKRIO.js → exec-PY7THYH4.js} +4 -4
- package/dist/export-OAS6QVBN.js +113 -0
- package/dist/{extension-PM42QCID.js → extension-D74CNM7G.js} +25 -33
- package/dist/{extensions-BBGVL5JC.js → extensions-XDDFY72A.js} +22 -11
- package/dist/files-CWTK6V3H.js +53 -0
- package/dist/import-5A3T7QV4.js +143 -0
- package/dist/{isolation-62MKDZN3.js → isolation-TK5RX2WM.js} +3 -3
- package/dist/join-DF5XSJAC.js +67 -0
- package/dist/list-PDMQM7ZV.js +53 -0
- package/dist/login-7TE6CIZF.js +60 -0
- package/dist/login-GOTAYLXP.js +51 -0
- package/dist/logout-6KIA74EV.js +29 -0
- package/dist/logout-T4XS6LRU.js +50 -0
- package/dist/message-delivery-GRC4W6P7.js +41 -0
- package/dist/mind-5IEYKV7I.js +97 -0
- package/dist/{mind-activity-tracker-2ACNHA7B.js → mind-activity-tracker-QBLIV7ZJ.js} +5 -5
- package/dist/{mind-history-WOYFLQAI.js → mind-history-IE2QH7U5.js} +82 -71
- package/dist/mind-list-GEWHWAL4.js +38 -0
- package/dist/mind-manager-HFLB5653.js +31 -0
- package/dist/mind-profile-DCBDVF5B.js +53 -0
- package/dist/mind-service-X2CAA6W6.js +37 -0
- package/dist/mind-sleep-ITCF6OQA.js +47 -0
- package/dist/mind-status-X4SX3YUG.js +65 -0
- package/dist/mind-wake-KXMKMGWX.js +42 -0
- package/dist/{package-V2WHWVG6.js → package-D2FSVFAX.js} +5 -5
- package/dist/read-67VRP2DO.js +91 -0
- package/dist/{read-stdin-PIRM6A2Y.js → read-stdin-3X5VYKNS.js} +1 -1
- package/dist/register-SB7NXCOE.js +51 -0
- package/dist/{registry-UYV5S6QT.js → registry-GBSNW3HG.js} +2 -2
- package/dist/reject-MUR2KWJ4.js +40 -0
- package/dist/restart-5EGG4JXU.js +42 -0
- package/dist/{sandbox-SI5HMBP3.js → sandbox-R37VIU36.js} +5 -5
- package/dist/scheduler-Y7O4CJXL.js +31 -0
- package/dist/{schema-ETMABTW4.js → schema-XVZ2CLKW.js} +1 -1
- package/dist/{seed-WNGI6PNW.js → seed-EQORWX77.js} +2 -2
- package/dist/seed-check-KJNTL72M.js +35 -0
- package/dist/seed-cmd-ZM2XGVU2.js +30 -0
- package/dist/seed-create-DRWGGHEI.js +113 -0
- package/dist/seed-sprout-JYXGXOP3.js +148 -0
- package/dist/send-JBJJQ7CA.js +409 -0
- package/dist/service-WNPCNHOX.js +121 -0
- package/dist/{setup-Z3DEVWV7.js → setup-BJ4YAY26.js} +153 -127
- package/dist/{setup-GGMKENLN.js → setup-RHJRFURI.js} +3 -3
- package/dist/skill-TAAKEYBV.js +389 -0
- package/dist/skills/volute-mind/SKILL.md +3 -7
- package/dist/skills/volute-mind/references/extensions.md +8 -11
- package/dist/{skills-Q6VZ2UGD.js → skills-EKMCQ46K.js} +7 -7
- package/dist/sleep-manager-7KFK3USC.js +35 -0
- package/dist/spirit-ZFRDXMG7.js +23 -0
- package/dist/split-AWVOYOPZ.js +64 -0
- package/dist/{sprout-E3HJIV2Z.js → sprout-HE4TITMK.js} +2 -2
- package/dist/start-3UXOPXQG.js +39 -0
- package/dist/status-ZK34WYIM.js +125 -0
- package/dist/stop-3XYIBGFM.js +41 -0
- package/dist/system-chat-IDPHYHY4.js +35 -0
- package/dist/systems-O43WGQY6.js +52 -0
- package/dist/{tailscale-ZEUK7GKZ.js → tailscale-ZIZ2HWJ5.js} +4 -4
- package/dist/{template-hash-EJRTKE36.js → template-hash-A7FNHTB7.js} +2 -2
- package/dist/up-77ICEDEW.js +19 -0
- package/dist/update-ANE5ZM7F.js +225 -0
- package/dist/{update-check-X3YG4WVP.js → update-check-UV55CBEP.js} +3 -3
- package/dist/upgrade-ZMDGC7M2.js +74 -0
- package/dist/variant-QWL2WSRI.js +62 -0
- package/dist/{version-notify-YCH4UVQ2.js → version-notify-FXSEMXWW.js} +28 -27
- package/dist/{volute-config-WBKYJGYQ.js → volute-config-D2XVS2YI.js} +1 -1
- package/dist/web-assets/assets/index-BhxWKvbB.css +1 -0
- package/dist/web-assets/assets/index-CHVKJ9II.js +75 -0
- package/dist/web-assets/index.html +2 -2
- package/dist/web-assets/sw.js +117 -0
- package/package.json +5 -5
- package/packages/extensions/pages/dist/ui/assets/index-DKZLNMED.js +2 -0
- package/packages/extensions/pages/dist/ui/index.html +1 -1
- package/packages/extensions/pages/skills/pages/SKILL.md +84 -9
- package/templates/_base/src/lib/auto-commit.ts +8 -8
- package/templates/_base/src/lib/volute-server.ts +6 -0
- package/templates/claude/src/agent.ts +8 -1
- package/dist/accept-TW6V4WI4.js +0 -42
- package/dist/bridge-O753D5F4.js +0 -207
- package/dist/chat-BHYX7DJ4.js +0 -68
- package/dist/chunk-47XDEWWV.js +0 -156
- package/dist/chunk-CVL5IGIR.js +0 -2084
- package/dist/chunk-PB65JZK2.js +0 -85
- package/dist/chunk-TAHX36HZ.js +0 -3679
- package/dist/clock-3X4DSC2N.js +0 -281
- package/dist/config-OROA5DUA.js +0 -72
- package/dist/create-3SEKKI6P.js +0 -71
- package/dist/create-UOSOQ2HN.js +0 -44
- package/dist/daemon-client-WOAQXXBM.js +0 -12
- package/dist/daemon-restart-5ABHNXJZ.js +0 -52
- package/dist/delete-KYOVWR23.js +0 -35
- package/dist/delivery-manager-2BR5NZKF.js +0 -32
- package/dist/down-QVFN4UPK.js +0 -15
- package/dist/env-R34DT7XL.js +0 -195
- package/dist/export-6ZXAXATG.js +0 -112
- package/dist/files-VQV2VZQO.js +0 -47
- package/dist/import-MK2I2T6F.js +0 -23
- package/dist/join-DGYHTJUH.js +0 -66
- package/dist/list-C644WTHV.js +0 -49
- package/dist/login-IIGEQPHL.js +0 -47
- package/dist/login-KZQLMAWE.js +0 -47
- package/dist/logout-AGTZVRGP.js +0 -40
- package/dist/logout-KD6GXIJJ.js +0 -21
- package/dist/message-delivery-V3R6NXJP.js +0 -42
- package/dist/mind-BI4EPBVZ.js +0 -108
- package/dist/mind-list-6VPM7GUQ.js +0 -30
- package/dist/mind-manager-MWW3BTS4.js +0 -32
- package/dist/mind-profile-WPG42U5Y.js +0 -47
- package/dist/mind-service-VIKZJK2M.js +0 -38
- package/dist/mind-sleep-XDISJY74.js +0 -42
- package/dist/mind-status-7FTZWPZF.js +0 -56
- package/dist/mind-wake-KIIKEI3A.js +0 -37
- package/dist/read-H5C26YO7.js +0 -85
- package/dist/register-J27WP33N.js +0 -47
- package/dist/reject-OEANJYIA.js +0 -40
- package/dist/restart-V5EGYBJG.js +0 -33
- package/dist/scheduler-AGG3L2FO.js +0 -32
- package/dist/seed-check-PXTH7YXS.js +0 -32
- package/dist/seed-cmd-VENFTGS3.js +0 -36
- package/dist/seed-create-663ALOKH.js +0 -112
- package/dist/seed-sprout-EH3AGKAI.js +0 -132
- package/dist/send-7FUUUZZH.js +0 -386
- package/dist/skill-DKNYJS4P.js +0 -362
- package/dist/skills/shared-files/SKILL.md +0 -44
- package/dist/skills/shared-files/scripts/merge.ts +0 -72
- package/dist/skills/shared-files/scripts/pull.ts +0 -52
- package/dist/sleep-manager-BJK2ROPX.js +0 -36
- package/dist/spirit-4JP4TY4C.js +0 -23
- package/dist/split-3YPMS2CL.js +0 -63
- package/dist/start-W3TPKX4D.js +0 -33
- package/dist/status-4OVFXFEJ.js +0 -115
- package/dist/stop-GTT6YWYO.js +0 -32
- package/dist/system-channel-DXD2JBOU.js +0 -36
- package/dist/system-chat-TYLOL7SX.js +0 -36
- package/dist/systems-AYLO727G.js +0 -61
- package/dist/up-PA7F2CXE.js +0 -18
- package/dist/update-HG4LCUSG.js +0 -215
- package/dist/upgrade-YGNIDICG.js +0 -67
- package/dist/variant-MZUMRTQO.js +0 -41
- package/dist/web-assets/assets/index-DiiwC-CZ.css +0 -1
- package/dist/web-assets/assets/index-d6y5b9Ij.js +0 -75
- package/packages/extensions/pages/dist/ui/assets/index-tLTROSk5.js +0 -2
package/dist/clock-3X4DSC2N.js
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
compactDateTime,
|
|
4
|
-
isCompact
|
|
5
|
-
} from "./chunk-FYCALD4Q.js";
|
|
6
|
-
import {
|
|
7
|
-
resolveMindName
|
|
8
|
-
} from "./chunk-NAOW2CLO.js";
|
|
9
|
-
import {
|
|
10
|
-
getClient,
|
|
11
|
-
urlOf
|
|
12
|
-
} from "./chunk-4RQBJWQX.js";
|
|
13
|
-
import {
|
|
14
|
-
parseArgs
|
|
15
|
-
} from "./chunk-D424ZQGI.js";
|
|
16
|
-
import {
|
|
17
|
-
daemonFetch
|
|
18
|
-
} from "./chunk-PLDWHR4D.js";
|
|
19
|
-
import "./chunk-N7BLAHNE.js";
|
|
20
|
-
import "./chunk-4JSR7YO7.js";
|
|
21
|
-
import "./chunk-7KJOFUNN.js";
|
|
22
|
-
|
|
23
|
-
// src/commands/clock.ts
|
|
24
|
-
import { CronExpressionParser } from "cron-parser";
|
|
25
|
-
async function run(args) {
|
|
26
|
-
const subcommand = args[0];
|
|
27
|
-
switch (subcommand) {
|
|
28
|
-
case "status":
|
|
29
|
-
await clockStatus(args.slice(1));
|
|
30
|
-
break;
|
|
31
|
-
case "list":
|
|
32
|
-
await listSchedules(args.slice(1));
|
|
33
|
-
break;
|
|
34
|
-
case "add":
|
|
35
|
-
await addSchedule(args.slice(1));
|
|
36
|
-
break;
|
|
37
|
-
case "remove":
|
|
38
|
-
await removeSchedule(args.slice(1));
|
|
39
|
-
break;
|
|
40
|
-
case "sleep":
|
|
41
|
-
await import("./mind-sleep-XDISJY74.js").then((m) => m.run(args.slice(1)));
|
|
42
|
-
break;
|
|
43
|
-
case "wake":
|
|
44
|
-
await import("./mind-wake-KIIKEI3A.js").then((m) => m.run(args.slice(1)));
|
|
45
|
-
break;
|
|
46
|
-
case "--help":
|
|
47
|
-
case "-h":
|
|
48
|
-
case void 0:
|
|
49
|
-
printUsage();
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
printUsage();
|
|
53
|
-
process.exit(1);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function printUsage() {
|
|
57
|
-
console.log(`Usage:
|
|
58
|
-
volute clock status [--mind <name>]
|
|
59
|
-
volute clock list [--mind <name>]
|
|
60
|
-
volute clock add [--mind <name>] --id <name> --cron "..." --message/--script "..." [--session name] [--while-sleeping skip|queue|trigger-wake]
|
|
61
|
-
volute clock add [--mind <name>] --id <name> --in <duration> --message/--script "..." [--session name] [--while-sleeping skip|queue|trigger-wake]
|
|
62
|
-
volute clock remove [--mind <name>] --id <id>
|
|
63
|
-
volute clock sleep [name] [--wake-at <time>]
|
|
64
|
-
volute clock wake [name]
|
|
65
|
-
|
|
66
|
-
Duration format for --in: 30s, 10m, 1h, 2h30m`);
|
|
67
|
-
}
|
|
68
|
-
function parseDuration(input) {
|
|
69
|
-
const parts = input.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);
|
|
70
|
-
if (!parts || parts[0] !== input) return null;
|
|
71
|
-
const hours = parseInt(parts[1] || "0", 10);
|
|
72
|
-
const minutes = parseInt(parts[2] || "0", 10);
|
|
73
|
-
const seconds = parseInt(parts[3] || "0", 10);
|
|
74
|
-
const total = hours * 36e5 + minutes * 6e4 + seconds * 1e3;
|
|
75
|
-
return total > 0 ? total : null;
|
|
76
|
-
}
|
|
77
|
-
async function clockStatus(args) {
|
|
78
|
-
const { flags } = parseArgs(args, {
|
|
79
|
-
mind: { type: "string" }
|
|
80
|
-
});
|
|
81
|
-
const mind = resolveMindName(flags);
|
|
82
|
-
const client = getClient();
|
|
83
|
-
const res = await daemonFetch(
|
|
84
|
-
urlOf(client.api.minds[":name"].clock.status.$url({ param: { name: mind } }))
|
|
85
|
-
);
|
|
86
|
-
if (!res.ok) {
|
|
87
|
-
const data = await res.json();
|
|
88
|
-
console.error(data.error ?? `Failed to get clock status: ${res.status}`);
|
|
89
|
-
process.exit(1);
|
|
90
|
-
}
|
|
91
|
-
const status = await res.json();
|
|
92
|
-
const compact = isCompact();
|
|
93
|
-
const fmtTime = (s) => compact ? compactDateTime(s) : new Date(s).toLocaleString();
|
|
94
|
-
if (status.sleep?.sleeping) {
|
|
95
|
-
const since = status.sleep.sleepingSince ? fmtTime(status.sleep.sleepingSince) : "unknown";
|
|
96
|
-
console.log(`Sleep: sleeping since ${since}`);
|
|
97
|
-
if (status.sleep.scheduledWakeAt) {
|
|
98
|
-
console.log(` Wake at: ${fmtTime(status.sleep.scheduledWakeAt)}`);
|
|
99
|
-
}
|
|
100
|
-
if (status.sleep.voluntaryWakeAt) {
|
|
101
|
-
console.log(` Voluntary wake at: ${fmtTime(status.sleep.voluntaryWakeAt)}`);
|
|
102
|
-
}
|
|
103
|
-
if (status.sleep.queuedMessageCount > 0) {
|
|
104
|
-
console.log(` Queued messages: ${status.sleep.queuedMessageCount}`);
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
console.log("Sleep: awake");
|
|
108
|
-
}
|
|
109
|
-
if (status.sleepConfig?.enabled && status.sleepConfig.schedule) {
|
|
110
|
-
console.log(
|
|
111
|
-
` Schedule: sleep ${status.sleepConfig.schedule.sleep}, wake ${status.sleepConfig.schedule.wake}`
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
if (status.upcoming.length > 0) {
|
|
115
|
-
if (!compact) console.log("");
|
|
116
|
-
console.log("Upcoming (next 24h):");
|
|
117
|
-
for (const u of status.upcoming) {
|
|
118
|
-
const time = fmtTime(u.at);
|
|
119
|
-
const label = u.type === "timer" ? "[timer]" : "[cron]";
|
|
120
|
-
console.log(` ${u.id.padEnd(20)} ${label} ${time}`);
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
if (!compact) console.log("");
|
|
124
|
-
console.log("No upcoming events in next 24h.");
|
|
125
|
-
}
|
|
126
|
-
if (!compact) {
|
|
127
|
-
console.log(`
|
|
128
|
-
${status.schedules.length} schedule(s) configured.`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
async function listSchedules(args) {
|
|
132
|
-
const { flags } = parseArgs(args, {
|
|
133
|
-
mind: { type: "string" }
|
|
134
|
-
});
|
|
135
|
-
const mind = resolveMindName(flags);
|
|
136
|
-
const client = getClient();
|
|
137
|
-
const res = await daemonFetch(
|
|
138
|
-
urlOf(client.api.minds[":name"].schedules.$url({ param: { name: mind } }))
|
|
139
|
-
);
|
|
140
|
-
if (!res.ok) {
|
|
141
|
-
const data = await res.json();
|
|
142
|
-
console.error(data.error ?? `Failed to list schedules: ${res.status}`);
|
|
143
|
-
process.exit(1);
|
|
144
|
-
}
|
|
145
|
-
const schedules = await res.json();
|
|
146
|
-
if (schedules.length === 0) {
|
|
147
|
-
console.log("No schedules configured.");
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
const actionLabel = (s) => s.script ? `[script] ${s.script}` : s.message ?? "";
|
|
151
|
-
if (isCompact()) {
|
|
152
|
-
for (const s of schedules) {
|
|
153
|
-
const sched = s.cron ?? (s.fireAt ? `at ${s.fireAt}` : "");
|
|
154
|
-
console.log(`${s.id} ${sched} ${actionLabel(s)}`);
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
const idW = Math.max(2, ...schedules.map((s) => s.id.length));
|
|
158
|
-
const schedW = Math.max(8, ...schedules.map((s) => (s.cron ?? s.fireAt ?? "").length));
|
|
159
|
-
console.log(`${"ID".padEnd(idW)} ${"SCHEDULE".padEnd(schedW)} ENABLED ACTION`);
|
|
160
|
-
for (const s of schedules) {
|
|
161
|
-
const sched = s.cron ?? (s.fireAt ? `at ${s.fireAt}` : "");
|
|
162
|
-
console.log(
|
|
163
|
-
`${s.id.padEnd(idW)} ${sched.padEnd(schedW)} ${String(s.enabled).padEnd(7)} ${actionLabel(s)}`
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
async function addSchedule(args) {
|
|
169
|
-
const { flags } = parseArgs(args, {
|
|
170
|
-
mind: { type: "string" },
|
|
171
|
-
cron: { type: "string" },
|
|
172
|
-
in: { type: "string" },
|
|
173
|
-
message: { type: "string" },
|
|
174
|
-
script: { type: "string" },
|
|
175
|
-
id: { type: "string" },
|
|
176
|
-
channel: { type: "string" },
|
|
177
|
-
session: { type: "string" },
|
|
178
|
-
"while-sleeping": { type: "string" }
|
|
179
|
-
});
|
|
180
|
-
const mind = resolveMindName(flags);
|
|
181
|
-
if (!flags.id) {
|
|
182
|
-
console.error("--id is required (a descriptive name for this schedule)");
|
|
183
|
-
process.exit(1);
|
|
184
|
-
}
|
|
185
|
-
if (!flags.cron && !flags.in) {
|
|
186
|
-
console.error("--cron or --in is required");
|
|
187
|
-
process.exit(1);
|
|
188
|
-
}
|
|
189
|
-
if (flags.cron && flags.in) {
|
|
190
|
-
console.error("--cron and --in are mutually exclusive");
|
|
191
|
-
process.exit(1);
|
|
192
|
-
}
|
|
193
|
-
if (!flags.message && !flags.script) {
|
|
194
|
-
console.error("--message or --script is required");
|
|
195
|
-
process.exit(1);
|
|
196
|
-
}
|
|
197
|
-
if (flags.message && flags.script) {
|
|
198
|
-
console.error("--message and --script are mutually exclusive");
|
|
199
|
-
process.exit(1);
|
|
200
|
-
}
|
|
201
|
-
const body = {};
|
|
202
|
-
if (flags.cron) {
|
|
203
|
-
try {
|
|
204
|
-
CronExpressionParser.parse(flags.cron);
|
|
205
|
-
} catch {
|
|
206
|
-
console.error(`Invalid cron expression: ${flags.cron}`);
|
|
207
|
-
process.exit(1);
|
|
208
|
-
}
|
|
209
|
-
body.cron = flags.cron;
|
|
210
|
-
}
|
|
211
|
-
if (flags.in) {
|
|
212
|
-
const durationMs = parseDuration(flags.in);
|
|
213
|
-
if (!durationMs) {
|
|
214
|
-
console.error(`Invalid duration: ${flags.in} (expected format: 30s, 10m, 1h, 2h30m)`);
|
|
215
|
-
process.exit(1);
|
|
216
|
-
}
|
|
217
|
-
body.fireAt = new Date(Date.now() + durationMs).toISOString();
|
|
218
|
-
}
|
|
219
|
-
if (flags.message) body.message = flags.message;
|
|
220
|
-
if (flags.script) body.script = flags.script;
|
|
221
|
-
if (flags.id) body.id = flags.id;
|
|
222
|
-
if (flags.channel) body.channel = flags.channel;
|
|
223
|
-
if (flags.session) body.session = flags.session;
|
|
224
|
-
if (flags["while-sleeping"]) {
|
|
225
|
-
const ws = flags["while-sleeping"];
|
|
226
|
-
if (!["skip", "queue", "trigger-wake"].includes(ws)) {
|
|
227
|
-
console.error(`Invalid --while-sleeping value: ${ws} (must be skip, queue, or trigger-wake)`);
|
|
228
|
-
process.exit(1);
|
|
229
|
-
}
|
|
230
|
-
body.whileSleeping = ws;
|
|
231
|
-
}
|
|
232
|
-
const client = getClient();
|
|
233
|
-
const res = await daemonFetch(
|
|
234
|
-
urlOf(client.api.minds[":name"].schedules.$url({ param: { name: mind } })),
|
|
235
|
-
{
|
|
236
|
-
method: "POST",
|
|
237
|
-
headers: { "Content-Type": "application/json" },
|
|
238
|
-
body: JSON.stringify(body)
|
|
239
|
-
}
|
|
240
|
-
);
|
|
241
|
-
if (!res.ok) {
|
|
242
|
-
const data2 = await res.json();
|
|
243
|
-
console.error(data2.error ?? `Failed to add schedule: ${res.status}`);
|
|
244
|
-
process.exit(1);
|
|
245
|
-
}
|
|
246
|
-
const data = await res.json();
|
|
247
|
-
if (flags.in) {
|
|
248
|
-
console.log(`Timer set: ${data.id} (fires in ${flags.in})`);
|
|
249
|
-
} else {
|
|
250
|
-
console.log(`Schedule added: ${data.id}`);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
async function removeSchedule(args) {
|
|
254
|
-
const { flags } = parseArgs(args, {
|
|
255
|
-
mind: { type: "string" },
|
|
256
|
-
id: { type: "string" }
|
|
257
|
-
});
|
|
258
|
-
const mind = resolveMindName(flags);
|
|
259
|
-
if (!flags.id) {
|
|
260
|
-
console.error("--id is required");
|
|
261
|
-
process.exit(1);
|
|
262
|
-
}
|
|
263
|
-
const client = getClient();
|
|
264
|
-
const res = await daemonFetch(
|
|
265
|
-
urlOf(
|
|
266
|
-
client.api.minds[":name"].schedules[":id"].$url({
|
|
267
|
-
param: { name: mind, id: flags.id }
|
|
268
|
-
})
|
|
269
|
-
),
|
|
270
|
-
{ method: "DELETE" }
|
|
271
|
-
);
|
|
272
|
-
if (!res.ok) {
|
|
273
|
-
const data = await res.json();
|
|
274
|
-
console.error(data.error ?? `Failed to remove schedule: ${res.status}`);
|
|
275
|
-
process.exit(1);
|
|
276
|
-
}
|
|
277
|
-
console.log(`Schedule removed: ${flags.id}`);
|
|
278
|
-
}
|
|
279
|
-
export {
|
|
280
|
-
run
|
|
281
|
-
};
|
package/dist/config-OROA5DUA.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
parseArgs
|
|
4
|
-
} from "./chunk-D424ZQGI.js";
|
|
5
|
-
import "./chunk-7KJOFUNN.js";
|
|
6
|
-
|
|
7
|
-
// src/commands/config.ts
|
|
8
|
-
async function run(args) {
|
|
9
|
-
const { positional } = parseArgs(args, {});
|
|
10
|
-
const subcommand = positional[0];
|
|
11
|
-
switch (subcommand) {
|
|
12
|
-
case "models": {
|
|
13
|
-
const { daemonFetch } = await import("./daemon-client-WOAQXXBM.js");
|
|
14
|
-
const res = await daemonFetch("/api/config/models");
|
|
15
|
-
if (!res.ok) {
|
|
16
|
-
console.error(`Failed to fetch models (HTTP ${res.status})`);
|
|
17
|
-
process.exit(1);
|
|
18
|
-
}
|
|
19
|
-
const models = await res.json();
|
|
20
|
-
const enabled = models.filter((m) => m.enabled);
|
|
21
|
-
if (enabled.length === 0) {
|
|
22
|
-
console.log("No models enabled.");
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
for (const m of enabled) {
|
|
26
|
-
console.log(`${m.provider}:${m.id} ${m.name}`);
|
|
27
|
-
}
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
case "providers": {
|
|
31
|
-
const { daemonFetch } = await import("./daemon-client-WOAQXXBM.js");
|
|
32
|
-
const res = await daemonFetch("/api/config/providers");
|
|
33
|
-
if (!res.ok) {
|
|
34
|
-
console.error(`Failed to fetch providers (HTTP ${res.status})`);
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
const providers = await res.json();
|
|
38
|
-
const configured = providers.filter((p) => p.configured);
|
|
39
|
-
if (configured.length === 0) {
|
|
40
|
-
console.log("No providers configured.");
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
for (const p of configured) {
|
|
44
|
-
console.log(p.id);
|
|
45
|
-
}
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
case "status": {
|
|
49
|
-
const { daemonFetch } = await import("./daemon-client-WOAQXXBM.js");
|
|
50
|
-
const res = await daemonFetch("/api/config/status");
|
|
51
|
-
if (!res.ok) {
|
|
52
|
-
console.error(`Failed to fetch config (HTTP ${res.status})`);
|
|
53
|
-
process.exit(1);
|
|
54
|
-
}
|
|
55
|
-
const data = await res.json();
|
|
56
|
-
for (const [key, value] of Object.entries(data)) {
|
|
57
|
-
console.log(`${key}: ${value}`);
|
|
58
|
-
}
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
default:
|
|
62
|
-
console.error("Usage: volute config <models|providers|status>");
|
|
63
|
-
console.error("");
|
|
64
|
-
console.error(" models List enabled AI models (provider:id format)");
|
|
65
|
-
console.error(" providers List configured AI providers");
|
|
66
|
-
console.error(" status Show system configuration");
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
run
|
|
72
|
-
};
|
package/dist/create-3SEKKI6P.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
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-PLDWHR4D.js";
|
|
11
|
-
import "./chunk-N7BLAHNE.js";
|
|
12
|
-
import "./chunk-4JSR7YO7.js";
|
|
13
|
-
import "./chunk-7KJOFUNN.js";
|
|
14
|
-
|
|
15
|
-
// src/commands/chat/create.ts
|
|
16
|
-
async function run(args) {
|
|
17
|
-
const { flags } = parseArgs(args, {
|
|
18
|
-
mind: { type: "string" },
|
|
19
|
-
participants: { type: "string" },
|
|
20
|
-
name: { type: "string" },
|
|
21
|
-
channel: { type: "string" }
|
|
22
|
-
});
|
|
23
|
-
if (!flags.participants) {
|
|
24
|
-
console.error(
|
|
25
|
-
'Usage: volute chat create --participants u1,u2 [--name "..."] [--channel <name>] [--mind <name>]'
|
|
26
|
-
);
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
const mindName = resolveMindName(flags);
|
|
30
|
-
const participants = flags.participants.split(",").map((p) => p.trim());
|
|
31
|
-
if (participants.length > 2 && !flags.channel) {
|
|
32
|
-
console.error("Use --channel <name> for multi-participant conversations");
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
if (flags.channel) {
|
|
36
|
-
const res = await daemonFetch("/api/v1/channels", {
|
|
37
|
-
method: "POST",
|
|
38
|
-
headers: { "Content-Type": "application/json" },
|
|
39
|
-
body: JSON.stringify({
|
|
40
|
-
name: flags.channel,
|
|
41
|
-
participantNames: participants
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
if (!res.ok) {
|
|
45
|
-
const data = await res.json().catch(() => ({}));
|
|
46
|
-
console.error(data.error ?? `Failed to create channel: ${res.status}`);
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
const conv = await res.json();
|
|
50
|
-
console.log(`Created channel #${flags.channel}: ${conv.id}`);
|
|
51
|
-
} else {
|
|
52
|
-
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindName)}/conversations`, {
|
|
53
|
-
method: "POST",
|
|
54
|
-
headers: { "Content-Type": "application/json" },
|
|
55
|
-
body: JSON.stringify({
|
|
56
|
-
participantNames: participants,
|
|
57
|
-
title: flags.name
|
|
58
|
-
})
|
|
59
|
-
});
|
|
60
|
-
if (!res.ok) {
|
|
61
|
-
const data = await res.json().catch(() => ({}));
|
|
62
|
-
console.error(data.error ?? `Failed to create conversation: ${res.status}`);
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
const conv = await res.json();
|
|
66
|
-
console.log(`Created conversation: ${conv.id}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
run
|
|
71
|
-
};
|
package/dist/create-UOSOQ2HN.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
parseArgs
|
|
4
|
-
} from "./chunk-D424ZQGI.js";
|
|
5
|
-
import "./chunk-7KJOFUNN.js";
|
|
6
|
-
|
|
7
|
-
// src/commands/create.ts
|
|
8
|
-
async function run(args) {
|
|
9
|
-
const { positional, flags } = parseArgs(args, {
|
|
10
|
-
template: { type: "string" },
|
|
11
|
-
skills: { type: "string" }
|
|
12
|
-
});
|
|
13
|
-
const name = positional[0];
|
|
14
|
-
let template = flags.template;
|
|
15
|
-
if (!template) {
|
|
16
|
-
const { resolveTemplate } = await import("./ai-service-PSILB5WD.js");
|
|
17
|
-
template = resolveTemplate();
|
|
18
|
-
}
|
|
19
|
-
if (!name) {
|
|
20
|
-
console.error("Usage: volute mind create <name> [--template <name>] [--skills <list|none>]");
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
const skills = flags.skills === "none" ? [] : flags.skills ? flags.skills.split(",") : void 0;
|
|
24
|
-
const { daemonFetch } = await import("./daemon-client-WOAQXXBM.js");
|
|
25
|
-
const { getClient, urlOf } = await import("./api-client-XUXOB7LI.js");
|
|
26
|
-
const client = getClient();
|
|
27
|
-
const res = await daemonFetch(urlOf(client.api.minds.$url()), {
|
|
28
|
-
method: "POST",
|
|
29
|
-
headers: { "Content-Type": "application/json" },
|
|
30
|
-
body: JSON.stringify({ name, template, skills })
|
|
31
|
-
});
|
|
32
|
-
const data = await res.json();
|
|
33
|
-
if (!res.ok) {
|
|
34
|
-
console.error(data.error ?? "Failed to create mind");
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
console.log(`
|
|
38
|
-
${data.message ?? `Created mind: ${data.name} (port ${data.port})`}`);
|
|
39
|
-
console.log(`
|
|
40
|
-
volute mind start ${data.name ?? name}`);
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
run
|
|
44
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
run
|
|
4
|
-
} from "./chunk-47XDEWWV.js";
|
|
5
|
-
import {
|
|
6
|
-
stopDaemon
|
|
7
|
-
} from "./chunk-V6ZCNULL.js";
|
|
8
|
-
import {
|
|
9
|
-
getServiceMode,
|
|
10
|
-
modeLabel,
|
|
11
|
-
pollHealth,
|
|
12
|
-
readDaemonConfig,
|
|
13
|
-
restartService
|
|
14
|
-
} from "./chunk-7F2SW2KD.js";
|
|
15
|
-
import "./chunk-D424ZQGI.js";
|
|
16
|
-
import "./chunk-U5BTYSAL.js";
|
|
17
|
-
import "./chunk-BDK73LK6.js";
|
|
18
|
-
import "./chunk-6OWJXUAR.js";
|
|
19
|
-
import "./chunk-N7BLAHNE.js";
|
|
20
|
-
import "./chunk-4JSR7YO7.js";
|
|
21
|
-
import "./chunk-7KJOFUNN.js";
|
|
22
|
-
|
|
23
|
-
// src/commands/daemon-restart.ts
|
|
24
|
-
async function run2(args) {
|
|
25
|
-
const mode = getServiceMode();
|
|
26
|
-
if (mode !== "manual") {
|
|
27
|
-
console.log(`Restarting volute (${modeLabel(mode)})...`);
|
|
28
|
-
try {
|
|
29
|
-
await restartService(mode);
|
|
30
|
-
} catch (err) {
|
|
31
|
-
console.error(`Failed to restart service: ${err instanceof Error ? err.message : err}`);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
const config = readDaemonConfig();
|
|
35
|
-
if (await pollHealth("127.0.0.1", config.internalPort ?? config.port)) {
|
|
36
|
-
console.log("Daemon restarted.");
|
|
37
|
-
} else {
|
|
38
|
-
console.error("Service restarted but daemon did not become healthy within 30s.");
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const result = await stopDaemon();
|
|
44
|
-
if (!result.stopped && result.reason === "kill-failed") {
|
|
45
|
-
console.error("Cannot restart: failed to stop the running daemon.");
|
|
46
|
-
process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
await run(args);
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
run2 as run
|
|
52
|
-
};
|
package/dist/delete-KYOVWR23.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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 "./chunk-7KJOFUNN.js";
|
|
9
|
-
|
|
10
|
-
// src/commands/delete.ts
|
|
11
|
-
async function run(args) {
|
|
12
|
-
const { positional, flags } = parseArgs(args, {
|
|
13
|
-
force: { type: "boolean" }
|
|
14
|
-
});
|
|
15
|
-
const name = resolveMindName({ mind: positional[0] });
|
|
16
|
-
const { daemonFetch } = await import("./daemon-client-WOAQXXBM.js");
|
|
17
|
-
const { getClient, urlOf } = await import("./api-client-XUXOB7LI.js");
|
|
18
|
-
const client = getClient();
|
|
19
|
-
const url = urlOf(client.api.minds[":name"].$url({ param: { name } })) + (flags.force ? "?force=true" : "");
|
|
20
|
-
const res = await daemonFetch(url, { method: "DELETE" });
|
|
21
|
-
const data = await res.json();
|
|
22
|
-
if (!res.ok) {
|
|
23
|
-
console.error(data.error ?? "Failed to delete mind");
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
console.log(`Removed ${name}.`);
|
|
27
|
-
if (flags.force) {
|
|
28
|
-
console.log("Deleted mind directory.");
|
|
29
|
-
} else {
|
|
30
|
-
console.log("Use --force to also delete the mind directory.");
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
run
|
|
35
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
DeliveryManager,
|
|
4
|
-
getDeliveryManager,
|
|
5
|
-
initDeliveryManager
|
|
6
|
-
} from "./chunk-TAHX36HZ.js";
|
|
7
|
-
import "./chunk-CVL5IGIR.js";
|
|
8
|
-
import "./chunk-B2BVAIZ4.js";
|
|
9
|
-
import "./chunk-G53F3JA4.js";
|
|
10
|
-
import "./chunk-N3DNFPVA.js";
|
|
11
|
-
import "./chunk-OYAKCAVY.js";
|
|
12
|
-
import "./chunk-V45JXOWY.js";
|
|
13
|
-
import "./chunk-IS7WJ56Q.js";
|
|
14
|
-
import "./chunk-BTWAGDV5.js";
|
|
15
|
-
import "./chunk-M3K5AARV.js";
|
|
16
|
-
import "./chunk-PB65JZK2.js";
|
|
17
|
-
import "./chunk-BM474GX6.js";
|
|
18
|
-
import "./chunk-E5C7OWZ2.js";
|
|
19
|
-
import "./chunk-XWXBJQBE.js";
|
|
20
|
-
import "./chunk-BFWHBQK4.js";
|
|
21
|
-
import "./chunk-YUIHSKR6.js";
|
|
22
|
-
import "./chunk-U5BTYSAL.js";
|
|
23
|
-
import "./chunk-BDK73LK6.js";
|
|
24
|
-
import "./chunk-6OWJXUAR.js";
|
|
25
|
-
import "./chunk-N7BLAHNE.js";
|
|
26
|
-
import "./chunk-4JSR7YO7.js";
|
|
27
|
-
import "./chunk-7KJOFUNN.js";
|
|
28
|
-
export {
|
|
29
|
-
DeliveryManager,
|
|
30
|
-
getDeliveryManager,
|
|
31
|
-
initDeliveryManager
|
|
32
|
-
};
|
package/dist/down-QVFN4UPK.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
run,
|
|
4
|
-
stopDaemon
|
|
5
|
-
} from "./chunk-V6ZCNULL.js";
|
|
6
|
-
import "./chunk-7F2SW2KD.js";
|
|
7
|
-
import "./chunk-U5BTYSAL.js";
|
|
8
|
-
import "./chunk-BDK73LK6.js";
|
|
9
|
-
import "./chunk-N7BLAHNE.js";
|
|
10
|
-
import "./chunk-4JSR7YO7.js";
|
|
11
|
-
import "./chunk-7KJOFUNN.js";
|
|
12
|
-
export {
|
|
13
|
-
run,
|
|
14
|
-
stopDaemon
|
|
15
|
-
};
|