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
|
@@ -2,25 +2,24 @@
|
|
|
2
2
|
import {
|
|
3
3
|
compactTime,
|
|
4
4
|
isCompact
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5T5YMX6S.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveMindName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BTY4WNFE.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
parseArgs
|
|
15
|
-
} from "./chunk-D424ZQGI.js";
|
|
10
|
+
command
|
|
11
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
12
|
+
import "./chunk-O7IGP7ZW.js";
|
|
16
13
|
import {
|
|
17
14
|
daemonFetch
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import
|
|
20
|
-
|
|
15
|
+
} from "./chunk-ZX7EAV5J.js";
|
|
16
|
+
import {
|
|
17
|
+
getClient,
|
|
18
|
+
urlOf
|
|
19
|
+
} from "./chunk-LOPXTW6H.js";
|
|
21
20
|
import "./chunk-7KJOFUNN.js";
|
|
22
21
|
|
|
23
|
-
// src/commands/mind-history.ts
|
|
22
|
+
// packages/cli/src/commands/mind-history.ts
|
|
24
23
|
function normalizeTimestamp(dateStr) {
|
|
25
24
|
return dateStr.endsWith("Z") ? dateStr : `${dateStr}Z`;
|
|
26
25
|
}
|
|
@@ -190,75 +189,87 @@ function getDefaultRange(period) {
|
|
|
190
189
|
return "";
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
192
|
+
var cmd = command({
|
|
193
|
+
name: "volute mind history",
|
|
194
|
+
description: "View mind activity history",
|
|
195
|
+
flags: {
|
|
196
|
+
mind: { type: "string", description: "Mind name" },
|
|
197
|
+
channel: { type: "string", description: "Filter by channel" },
|
|
198
|
+
session: { type: "string", description: "Filter by session" },
|
|
199
|
+
preset: { type: "string", description: "Use a preset view" },
|
|
200
|
+
limit: { type: "string", description: "Number of entries to show" },
|
|
201
|
+
full: { type: "boolean", description: "Show full details" },
|
|
202
|
+
period: { type: "string", description: "Time period (hour, day, week, month)" },
|
|
203
|
+
from: { type: "string", description: "Start date" },
|
|
204
|
+
to: { type: "string", description: "End date" }
|
|
205
|
+
},
|
|
206
|
+
examples: [
|
|
207
|
+
"volute mind history --mind myname",
|
|
208
|
+
"volute mind history --mind myname --full",
|
|
209
|
+
"volute mind history --mind myname --period day"
|
|
210
|
+
],
|
|
211
|
+
run: async ({ flags }) => {
|
|
212
|
+
if (flags.period) {
|
|
213
|
+
const validPeriods = ["hour", "day", "week", "month"];
|
|
214
|
+
if (!validPeriods.includes(flags.period)) {
|
|
215
|
+
console.error(
|
|
216
|
+
`Invalid period: ${flags.period}. Must be one of: ${validPeriods.join(", ")}`
|
|
217
|
+
);
|
|
218
|
+
process.exit(1);
|
|
219
|
+
}
|
|
220
|
+
const name2 = resolveMindName(flags);
|
|
221
|
+
const params = new URLSearchParams();
|
|
222
|
+
params.set("mind", name2);
|
|
223
|
+
params.set("period", flags.period);
|
|
224
|
+
if (flags.from) params.set("from", flags.from);
|
|
225
|
+
else params.set("from", getDefaultRange(flags.period));
|
|
226
|
+
if (flags.to) params.set("to", flags.to);
|
|
227
|
+
if (flags.limit) params.set("limit", flags.limit);
|
|
228
|
+
const res2 = await daemonFetch(`/api/v1/history/summaries?${params}`);
|
|
229
|
+
if (!res2.ok) {
|
|
230
|
+
let errorMsg = `Failed to get summaries: ${res2.status}`;
|
|
231
|
+
try {
|
|
232
|
+
const data = await res2.json();
|
|
233
|
+
if (data.error) errorMsg = data.error;
|
|
234
|
+
} catch {
|
|
235
|
+
}
|
|
236
|
+
console.error(errorMsg);
|
|
237
|
+
process.exit(1);
|
|
238
|
+
}
|
|
239
|
+
const rows2 = await res2.json();
|
|
240
|
+
for (const row of rows2.reverse()) {
|
|
241
|
+
console.log(formatMetaSummary(row));
|
|
242
|
+
}
|
|
243
|
+
return;
|
|
210
244
|
}
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
if (flags.
|
|
216
|
-
|
|
217
|
-
if (flags.
|
|
218
|
-
if (flags.
|
|
219
|
-
const
|
|
220
|
-
if (!
|
|
221
|
-
let errorMsg = `Failed to get
|
|
245
|
+
const name = resolveMindName(flags);
|
|
246
|
+
const client = getClient();
|
|
247
|
+
const url = client.api.minds[":name"].history.$url({ param: { name } });
|
|
248
|
+
if (flags.channel) url.searchParams.set("channel", flags.channel);
|
|
249
|
+
if (flags.session) url.searchParams.set("session", flags.session);
|
|
250
|
+
if (flags.preset) url.searchParams.set("preset", flags.preset);
|
|
251
|
+
if (flags.limit) url.searchParams.set("limit", flags.limit);
|
|
252
|
+
if (flags.full) url.searchParams.set("full", "true");
|
|
253
|
+
const res = await daemonFetch(urlOf(url));
|
|
254
|
+
if (!res.ok) {
|
|
255
|
+
let errorMsg = `Failed to get history: ${res.status}`;
|
|
222
256
|
try {
|
|
223
|
-
const data = await
|
|
257
|
+
const data = await res.json();
|
|
224
258
|
if (data.error) errorMsg = data.error;
|
|
225
259
|
} catch {
|
|
226
260
|
}
|
|
227
261
|
console.error(errorMsg);
|
|
228
262
|
process.exit(1);
|
|
229
263
|
}
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
264
|
+
const rows = await res.json();
|
|
265
|
+
const compact = isCompact();
|
|
266
|
+
for (const row of rows.reverse()) {
|
|
267
|
+
if (compact && (row.type === "done" || row.type === "usage")) continue;
|
|
268
|
+
console.log(compact ? formatRowCompact(row) : formatRow(row));
|
|
233
269
|
}
|
|
234
|
-
return;
|
|
235
270
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const url = client.api.minds[":name"].history.$url({ param: { name } });
|
|
239
|
-
if (flags.channel) url.searchParams.set("channel", flags.channel);
|
|
240
|
-
if (flags.session) url.searchParams.set("session", flags.session);
|
|
241
|
-
if (flags.preset) url.searchParams.set("preset", flags.preset);
|
|
242
|
-
if (flags.limit) url.searchParams.set("limit", flags.limit);
|
|
243
|
-
if (flags.full) url.searchParams.set("full", "true");
|
|
244
|
-
const res = await daemonFetch(urlOf(url));
|
|
245
|
-
if (!res.ok) {
|
|
246
|
-
let errorMsg = `Failed to get history: ${res.status}`;
|
|
247
|
-
try {
|
|
248
|
-
const data = await res.json();
|
|
249
|
-
if (data.error) errorMsg = data.error;
|
|
250
|
-
} catch {
|
|
251
|
-
}
|
|
252
|
-
console.error(errorMsg);
|
|
253
|
-
process.exit(1);
|
|
254
|
-
}
|
|
255
|
-
const rows = await res.json();
|
|
256
|
-
const compact = isCompact();
|
|
257
|
-
for (const row of rows.reverse()) {
|
|
258
|
-
if (compact && (row.type === "done" || row.type === "usage")) continue;
|
|
259
|
-
console.log(compact ? formatRowCompact(row) : formatRow(row));
|
|
260
|
-
}
|
|
261
|
-
}
|
|
271
|
+
});
|
|
272
|
+
var run = cmd.execute;
|
|
262
273
|
export {
|
|
263
274
|
run
|
|
264
275
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
command
|
|
4
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
5
|
+
import "./chunk-O7IGP7ZW.js";
|
|
6
|
+
import {
|
|
7
|
+
daemonFetch
|
|
8
|
+
} from "./chunk-ZX7EAV5J.js";
|
|
9
|
+
import "./chunk-7KJOFUNN.js";
|
|
10
|
+
|
|
11
|
+
// packages/cli/src/commands/mind-list.ts
|
|
12
|
+
var cmd = command({
|
|
13
|
+
name: "volute mind list",
|
|
14
|
+
description: "List all minds",
|
|
15
|
+
flags: {},
|
|
16
|
+
async run() {
|
|
17
|
+
const res = await daemonFetch("/api/minds");
|
|
18
|
+
if (!res.ok) {
|
|
19
|
+
const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
|
|
20
|
+
console.error(`Failed to list minds: ${body.error}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
const minds = await res.json();
|
|
24
|
+
if (minds.length === 0) {
|
|
25
|
+
console.log("No minds configured.");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
for (const mind of minds) {
|
|
29
|
+
const status = mind.status ?? (mind.running ? "running" : "stopped");
|
|
30
|
+
const label = mind.stage === "seed" ? " (seed)" : "";
|
|
31
|
+
console.log(` ${mind.name}: ${status}${label}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
var run = cmd.execute;
|
|
36
|
+
export {
|
|
37
|
+
run
|
|
38
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
MindManager,
|
|
4
|
+
getMindManager,
|
|
5
|
+
initMindManager
|
|
6
|
+
} from "./chunk-WJPROOU5.js";
|
|
7
|
+
import "./chunk-5XJYUFZH.js";
|
|
8
|
+
import "./chunk-AOB6GVRM.js";
|
|
9
|
+
import "./chunk-IJHIXLVN.js";
|
|
10
|
+
import "./chunk-QWTR6AWZ.js";
|
|
11
|
+
import "./chunk-N446KRP7.js";
|
|
12
|
+
import "./chunk-QHG4OMZL.js";
|
|
13
|
+
import "./chunk-XRQSAMX2.js";
|
|
14
|
+
import "./chunk-WZRZFFCL.js";
|
|
15
|
+
import "./chunk-CORXD635.js";
|
|
16
|
+
import "./chunk-ZSR72JB3.js";
|
|
17
|
+
import "./chunk-PWQ2ITYG.js";
|
|
18
|
+
import "./chunk-A2ZLHBHG.js";
|
|
19
|
+
import "./chunk-FT5KETXZ.js";
|
|
20
|
+
import "./chunk-BKF4WQCY.js";
|
|
21
|
+
import "./chunk-AN2W47GW.js";
|
|
22
|
+
import "./chunk-VHJRZM2S.js";
|
|
23
|
+
import "./chunk-BMZQYACC.js";
|
|
24
|
+
import "./chunk-BDYXIWA5.js";
|
|
25
|
+
import "./chunk-5N7Y5WAM.js";
|
|
26
|
+
import "./chunk-7KJOFUNN.js";
|
|
27
|
+
export {
|
|
28
|
+
MindManager,
|
|
29
|
+
getMindManager,
|
|
30
|
+
initMindManager
|
|
31
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-BTY4WNFE.js";
|
|
5
|
+
import {
|
|
6
|
+
command
|
|
7
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
8
|
+
import "./chunk-O7IGP7ZW.js";
|
|
9
|
+
import "./chunk-7KJOFUNN.js";
|
|
10
|
+
|
|
11
|
+
// packages/cli/src/commands/mind-profile.ts
|
|
12
|
+
var cmd = command({
|
|
13
|
+
name: "volute mind profile",
|
|
14
|
+
description: "Update mind profile",
|
|
15
|
+
flags: {
|
|
16
|
+
mind: { type: "string", description: "Mind name" },
|
|
17
|
+
"display-name": { type: "string", description: "Display name" },
|
|
18
|
+
description: { type: "string", description: "Description text" },
|
|
19
|
+
avatar: { type: "string", description: "Path to avatar image" }
|
|
20
|
+
},
|
|
21
|
+
async run({ flags }) {
|
|
22
|
+
const name = resolveMindName(flags);
|
|
23
|
+
const displayName = flags["display-name"];
|
|
24
|
+
const description = flags.description;
|
|
25
|
+
const avatar = flags.avatar;
|
|
26
|
+
if (!displayName && !description && !avatar) {
|
|
27
|
+
console.error(
|
|
28
|
+
"Usage: volute mind profile [--mind <name>] [--display-name <name>] [--description <text>] [--avatar <path>]"
|
|
29
|
+
);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
const { daemonFetch } = await import("./daemon-client-RVIKXGFQ.js");
|
|
33
|
+
const body = {};
|
|
34
|
+
if (displayName) body.displayName = displayName;
|
|
35
|
+
if (description) body.description = description;
|
|
36
|
+
if (avatar) body.avatar = avatar;
|
|
37
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(name)}/profile`, {
|
|
38
|
+
method: "PATCH",
|
|
39
|
+
headers: { "Content-Type": "application/json" },
|
|
40
|
+
body: JSON.stringify(body)
|
|
41
|
+
});
|
|
42
|
+
if (!res.ok) {
|
|
43
|
+
const data = await res.json().catch(() => ({}));
|
|
44
|
+
console.error(data.error ?? `Failed to update profile (HTTP ${res.status})`);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
console.log(`Profile updated for ${name}`);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var run = cmd.execute;
|
|
51
|
+
export {
|
|
52
|
+
run
|
|
53
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
sleepMind,
|
|
4
|
+
startMindFull,
|
|
5
|
+
startSpiritFull,
|
|
6
|
+
stopMindFull,
|
|
7
|
+
stopSpiritFull,
|
|
8
|
+
wakeMind
|
|
9
|
+
} from "./chunk-WJPROOU5.js";
|
|
10
|
+
import "./chunk-5XJYUFZH.js";
|
|
11
|
+
import "./chunk-AOB6GVRM.js";
|
|
12
|
+
import "./chunk-IJHIXLVN.js";
|
|
13
|
+
import "./chunk-QWTR6AWZ.js";
|
|
14
|
+
import "./chunk-N446KRP7.js";
|
|
15
|
+
import "./chunk-QHG4OMZL.js";
|
|
16
|
+
import "./chunk-XRQSAMX2.js";
|
|
17
|
+
import "./chunk-WZRZFFCL.js";
|
|
18
|
+
import "./chunk-CORXD635.js";
|
|
19
|
+
import "./chunk-ZSR72JB3.js";
|
|
20
|
+
import "./chunk-PWQ2ITYG.js";
|
|
21
|
+
import "./chunk-A2ZLHBHG.js";
|
|
22
|
+
import "./chunk-FT5KETXZ.js";
|
|
23
|
+
import "./chunk-BKF4WQCY.js";
|
|
24
|
+
import "./chunk-AN2W47GW.js";
|
|
25
|
+
import "./chunk-VHJRZM2S.js";
|
|
26
|
+
import "./chunk-BMZQYACC.js";
|
|
27
|
+
import "./chunk-BDYXIWA5.js";
|
|
28
|
+
import "./chunk-5N7Y5WAM.js";
|
|
29
|
+
import "./chunk-7KJOFUNN.js";
|
|
30
|
+
export {
|
|
31
|
+
sleepMind,
|
|
32
|
+
startMindFull,
|
|
33
|
+
startSpiritFull,
|
|
34
|
+
stopMindFull,
|
|
35
|
+
stopSpiritFull,
|
|
36
|
+
wakeMind
|
|
37
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-BTY4WNFE.js";
|
|
5
|
+
import {
|
|
6
|
+
command
|
|
7
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
8
|
+
import "./chunk-O7IGP7ZW.js";
|
|
9
|
+
import {
|
|
10
|
+
daemonFetch
|
|
11
|
+
} from "./chunk-ZX7EAV5J.js";
|
|
12
|
+
import "./chunk-7KJOFUNN.js";
|
|
13
|
+
|
|
14
|
+
// packages/cli/src/commands/mind-sleep.ts
|
|
15
|
+
var cmd = command({
|
|
16
|
+
name: "volute clock sleep",
|
|
17
|
+
description: "Put a mind to sleep",
|
|
18
|
+
args: [{ name: "name", description: "Mind to sleep (or use --mind / VOLUTE_MIND)" }],
|
|
19
|
+
flags: {
|
|
20
|
+
mind: { type: "string", description: "Mind name" },
|
|
21
|
+
"wake-at": { type: "string", description: "Schedule wake time" }
|
|
22
|
+
},
|
|
23
|
+
run: async ({ args, flags }) => {
|
|
24
|
+
const name = args.name || resolveMindName(flags);
|
|
25
|
+
if (!name) {
|
|
26
|
+
console.error("Provide a mind name as argument, --mind flag, or VOLUTE_MIND env var");
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
const body = {};
|
|
30
|
+
if (flags["wake-at"]) body.wakeAt = flags["wake-at"];
|
|
31
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(name)}/sleep`, {
|
|
32
|
+
method: "POST",
|
|
33
|
+
headers: { "Content-Type": "application/json" },
|
|
34
|
+
body: JSON.stringify(body)
|
|
35
|
+
});
|
|
36
|
+
const data = await res.json();
|
|
37
|
+
if (!res.ok) {
|
|
38
|
+
console.error(data.error || "Failed to put mind to sleep");
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
console.log(`${name} is going to sleep`);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
var run = cmd.execute;
|
|
45
|
+
export {
|
|
46
|
+
run
|
|
47
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-BTY4WNFE.js";
|
|
5
|
+
import {
|
|
6
|
+
command
|
|
7
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
8
|
+
import "./chunk-O7IGP7ZW.js";
|
|
9
|
+
import {
|
|
10
|
+
daemonFetch
|
|
11
|
+
} from "./chunk-ZX7EAV5J.js";
|
|
12
|
+
import "./chunk-7KJOFUNN.js";
|
|
13
|
+
|
|
14
|
+
// packages/cli/src/commands/mind-status.ts
|
|
15
|
+
var cmd = command({
|
|
16
|
+
name: "volute mind status",
|
|
17
|
+
description: "Check a mind's status",
|
|
18
|
+
args: [{ name: "name", description: "Mind to check (or use VOLUTE_MIND)" }],
|
|
19
|
+
flags: {},
|
|
20
|
+
async run({ args }) {
|
|
21
|
+
const name = args.name || (process.env.VOLUTE_MIND ? resolveMindName({}) : void 0);
|
|
22
|
+
if (!name) {
|
|
23
|
+
console.error("Usage: volute mind status <name>");
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(name)}`);
|
|
27
|
+
if (!res.ok) {
|
|
28
|
+
if (res.status === 404) {
|
|
29
|
+
console.error(`Mind "${name}" not found`);
|
|
30
|
+
} else {
|
|
31
|
+
const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
|
|
32
|
+
console.error(`Failed to get mind status: ${body.error}`);
|
|
33
|
+
}
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
const mind = await res.json();
|
|
37
|
+
const status = mind.status ?? (mind.running ? "running" : "stopped");
|
|
38
|
+
console.log(`Mind: ${mind.name}`);
|
|
39
|
+
console.log(`Status: ${status}`);
|
|
40
|
+
console.log(`Port: ${mind.port}`);
|
|
41
|
+
if (mind.stage) console.log(`Stage: ${mind.stage}`);
|
|
42
|
+
if (mind.parent) console.log(`Parent: ${mind.parent}`);
|
|
43
|
+
if (mind.model) console.log(`Model: ${mind.model}`);
|
|
44
|
+
if (mind.channels && mind.channels.length > 0) {
|
|
45
|
+
console.log(`
|
|
46
|
+
Channels:`);
|
|
47
|
+
for (const ch of mind.channels) {
|
|
48
|
+
console.log(` ${ch.type}: ${ch.status}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (mind.variants && mind.variants.length > 0) {
|
|
52
|
+
console.log(`
|
|
53
|
+
Variants:`);
|
|
54
|
+
for (const v of mind.variants) {
|
|
55
|
+
console.log(` ${v.name}: ${v.status}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (mind.hasPages) console.log(`
|
|
59
|
+
Pages: published`);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var run = cmd.execute;
|
|
63
|
+
export {
|
|
64
|
+
run
|
|
65
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-BTY4WNFE.js";
|
|
5
|
+
import {
|
|
6
|
+
command
|
|
7
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
8
|
+
import "./chunk-O7IGP7ZW.js";
|
|
9
|
+
import {
|
|
10
|
+
daemonFetch
|
|
11
|
+
} from "./chunk-ZX7EAV5J.js";
|
|
12
|
+
import "./chunk-7KJOFUNN.js";
|
|
13
|
+
|
|
14
|
+
// packages/cli/src/commands/mind-wake.ts
|
|
15
|
+
var cmd = command({
|
|
16
|
+
name: "volute clock wake",
|
|
17
|
+
description: "Wake a sleeping mind",
|
|
18
|
+
args: [{ name: "name", description: "Mind to wake (or use --mind / VOLUTE_MIND)" }],
|
|
19
|
+
flags: {
|
|
20
|
+
mind: { type: "string", description: "Mind name" }
|
|
21
|
+
},
|
|
22
|
+
run: async ({ args, flags }) => {
|
|
23
|
+
const name = args.name || resolveMindName(flags);
|
|
24
|
+
if (!name) {
|
|
25
|
+
console.error("Provide a mind name as argument, --mind flag, or VOLUTE_MIND env var");
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(name)}/wake`, {
|
|
29
|
+
method: "POST"
|
|
30
|
+
});
|
|
31
|
+
const data = await res.json();
|
|
32
|
+
if (!res.ok) {
|
|
33
|
+
console.error(data.error || "Failed to wake mind");
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
console.log(`${name} is waking up`);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
var run = cmd.execute;
|
|
40
|
+
export {
|
|
41
|
+
run
|
|
42
|
+
};
|
|
@@ -4,7 +4,7 @@ import "./chunk-7KJOFUNN.js";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "volute",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.35.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",
|
|
@@ -49,9 +49,9 @@ var package_default = {
|
|
|
49
49
|
scripts: {
|
|
50
50
|
dev: "tsx src/cli.ts",
|
|
51
51
|
build: "npm run build:ext && tsup && cp -r skills dist/skills && npm run build:web",
|
|
52
|
-
"build:ext": "npm run build:ext-theme --workspace=packages/ui && cp packages/ui/dist/ext-theme.css src/web/ui/public/ext-theme.css && npm run build:ui --workspace=packages/extensions/notes && npm run build:ui --workspace=packages/extensions/pages && npm run build:ui --workspace=packages/extensions/plan",
|
|
53
|
-
"build:web": "vite build --config src/web/ui/vite.config.ts",
|
|
54
|
-
"dev:web": "vite --config src/web/ui/vite.config.ts",
|
|
52
|
+
"build:ext": "npm run build:ext-theme --workspace=packages/ui && cp packages/ui/dist/ext-theme.css packages/daemon/src/web/ui/public/ext-theme.css && npm run build:ui --workspace=packages/extensions/notes && npm run build:ui --workspace=packages/extensions/pages && npm run build:ui --workspace=packages/extensions/plan",
|
|
53
|
+
"build:web": "vite build --config packages/daemon/src/web/ui/vite.config.ts",
|
|
54
|
+
"dev:web": "vite --config packages/daemon/src/web/ui/vite.config.ts",
|
|
55
55
|
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)",
|
|
56
56
|
"test:e2e": "node --import tsx --import ./test/setup.ts --test --test-force-exit --test-concurrency=1 test/daemon-e2e.test.ts",
|
|
57
57
|
"test:all": "npm test && npm run test:e2e",
|
|
@@ -61,7 +61,7 @@ var package_default = {
|
|
|
61
61
|
typecheck: "tsc --noEmit",
|
|
62
62
|
"typecheck:templates": "tsx scripts/typecheck-templates.ts",
|
|
63
63
|
"lint:templates": "biome check templates/",
|
|
64
|
-
"typecheck:web": "svelte-check --tsconfig src/web/ui/tsconfig.json",
|
|
64
|
+
"typecheck:web": "svelte-check --tsconfig packages/daemon/src/web/ui/tsconfig.json",
|
|
65
65
|
prepare: "lefthook install",
|
|
66
66
|
prepublishOnly: "npm run build",
|
|
67
67
|
"db:generate": "drizzle-kit generate",
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
compactTime,
|
|
4
|
+
isCompact
|
|
5
|
+
} from "./chunk-5T5YMX6S.js";
|
|
6
|
+
import {
|
|
7
|
+
resolveMindName
|
|
8
|
+
} from "./chunk-BTY4WNFE.js";
|
|
9
|
+
import {
|
|
10
|
+
command
|
|
11
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
12
|
+
import "./chunk-O7IGP7ZW.js";
|
|
13
|
+
import {
|
|
14
|
+
daemonFetch
|
|
15
|
+
} from "./chunk-ZX7EAV5J.js";
|
|
16
|
+
import "./chunk-7KJOFUNN.js";
|
|
17
|
+
|
|
18
|
+
// packages/cli/src/commands/chat/read.ts
|
|
19
|
+
async function resolveConversationId(mindName, input) {
|
|
20
|
+
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(input)) {
|
|
21
|
+
return input;
|
|
22
|
+
}
|
|
23
|
+
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mindName)}/conversations`);
|
|
24
|
+
if (!res.ok) {
|
|
25
|
+
return input;
|
|
26
|
+
}
|
|
27
|
+
const convs = await res.json();
|
|
28
|
+
const cleaned = input.replace(/^[@#]/, "");
|
|
29
|
+
const lower = cleaned.toLowerCase();
|
|
30
|
+
const channelMatch = convs.find((c) => c.type === "channel" && c.name?.toLowerCase() === lower);
|
|
31
|
+
if (channelMatch) return channelMatch.id;
|
|
32
|
+
const titleMatch = convs.find((c) => c.title?.toLowerCase() === lower);
|
|
33
|
+
if (titleMatch) return titleMatch.id;
|
|
34
|
+
const dmMatch = convs.find(
|
|
35
|
+
(c) => c.type === "dm" && c.title?.toLowerCase().split(/,\s*/).some((name) => name === lower)
|
|
36
|
+
);
|
|
37
|
+
if (dmMatch) return dmMatch.id;
|
|
38
|
+
const prefixMatch = convs.find((c) => c.id.startsWith(input));
|
|
39
|
+
if (prefixMatch) return prefixMatch.id;
|
|
40
|
+
return input;
|
|
41
|
+
}
|
|
42
|
+
var cmd = command({
|
|
43
|
+
name: "volute chat read",
|
|
44
|
+
description: "Read conversation messages",
|
|
45
|
+
args: [
|
|
46
|
+
{
|
|
47
|
+
name: "conversation",
|
|
48
|
+
required: true,
|
|
49
|
+
description: "Conversation ID, channel name, or DM participant"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
flags: {
|
|
53
|
+
mind: { type: "string", description: "Mind name" },
|
|
54
|
+
limit: { type: "number", description: "Number of messages to show (default 50)" }
|
|
55
|
+
},
|
|
56
|
+
async run({ args, flags }) {
|
|
57
|
+
const mindName = resolveMindName(flags);
|
|
58
|
+
const conversationId = await resolveConversationId(mindName, args.conversation);
|
|
59
|
+
const limit = String(flags.limit ?? 50);
|
|
60
|
+
const res = await daemonFetch(
|
|
61
|
+
`/api/minds/${encodeURIComponent(mindName)}/conversations/${encodeURIComponent(conversationId)}/messages?limit=${limit}`
|
|
62
|
+
);
|
|
63
|
+
if (!res.ok) {
|
|
64
|
+
console.error(`Failed to read conversation: ${res.status}`);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
const data = await res.json();
|
|
68
|
+
if (!Array.isArray(data.items)) {
|
|
69
|
+
console.error("Unexpected response format from server");
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
const compact = isCompact();
|
|
73
|
+
for (const msg of data.items) {
|
|
74
|
+
const sender = msg.sender_name ?? msg.role;
|
|
75
|
+
const text = Array.isArray(msg.content) ? msg.content.filter((b) => b.type === "text").map((b) => b.text).join("") : msg.content;
|
|
76
|
+
if (compact) {
|
|
77
|
+
const time = compactTime(msg.created_at);
|
|
78
|
+
console.log(`[${time}] ${sender}: ${text}`);
|
|
79
|
+
} else {
|
|
80
|
+
const time = new Date(
|
|
81
|
+
msg.created_at.endsWith("Z") ? msg.created_at : `${msg.created_at}Z`
|
|
82
|
+
).toLocaleString();
|
|
83
|
+
console.log(`[${time}] ${sender}: ${text}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
var run = cmd.execute;
|
|
89
|
+
export {
|
|
90
|
+
run
|
|
91
|
+
};
|