volute 0.33.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-ZW4SDL2C.js +15 -0
- package/dist/{ai-service-SBY2WG7O.js → ai-service-LURBEDDB.js} +6 -6
- package/dist/{api-client-YPKOZP2O.js → api-client-3A77HMH7.js} +2 -2
- package/dist/api.d.ts +1 -5195
- package/dist/{archive-INXYFVCW.js → archive-ESU2FUN4.js} +4 -4
- package/dist/{auth-GKCDSO4T.js → auth-WX4TESEI.js} +6 -6
- package/dist/bridge-PXIO6PS2.js +206 -0
- package/dist/chat-QXAJF3FU.js +51 -0
- package/dist/{chunk-NNB4WIG7.js → chunk-2TGZJFAT.js} +3 -3
- package/dist/{chunk-6LXAAQ43.js → chunk-33ODGMFZ.js} +1 -1
- package/dist/{chunk-RPZZSXV3.js → chunk-5N7Y5WAM.js} +21 -2
- package/dist/chunk-5T5YMX6S.js +23 -0
- package/dist/{chunk-7J3HEVR7.js → chunk-5XJYUFZH.js} +28 -16
- package/dist/chunk-7KJOFUNN.js +22 -0
- package/dist/{chunk-2NGTS5UU.js → chunk-A2ZLHBHG.js} +2 -2
- package/dist/{chunk-KIEPMIM5.js → chunk-AN2W47GW.js} +2 -2
- package/dist/{chunk-G53F3JA4.js → chunk-AOB6GVRM.js} +1 -1
- package/dist/{chunk-LRCG2JLP.js → chunk-BDYXIWA5.js} +9 -5
- package/dist/{chunk-YUIHSKR6.js → chunk-BKF4WQCY.js} +2 -2
- package/dist/{chunk-N432I7QH.js → chunk-BMZQYACC.js} +2 -2
- package/dist/{chunk-NAOW2CLO.js → chunk-BTY4WNFE.js} +1 -1
- package/dist/{chunk-ALEF47VT.js → chunk-BV65KRHM.js} +2 -2
- package/dist/{chunk-KVK2DLWI.js → chunk-CORXD635.js} +4 -4
- package/dist/{chunk-PVY5W6QN.js → chunk-F7ZNLYKZ.js} +2 -2
- package/dist/{chunk-QTUVYI7W.js → chunk-FT5KETXZ.js} +3 -3
- package/dist/{chunk-C7I35G4R.js → chunk-IJHIXLVN.js} +44 -8
- package/dist/{chunk-JUKK7FPS.js → chunk-J6CJQDWI.js} +37 -28
- package/dist/{chunk-4RQBJWQX.js → chunk-LOPXTW6H.js} +1 -1
- package/dist/{chunk-RSX4OPZY.js → chunk-MDJGMOSD.js} +8 -137
- package/dist/{chunk-LOEJ4HPQ.js → chunk-N446KRP7.js} +3 -3
- package/dist/{chunk-I5KY25PQ.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-M7UL5S3Q.js → chunk-OTC67N2Z.js} +2 -2
- package/dist/{chunk-GY5HBI7A.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-SKLSMHXO.js → chunk-QWTR6AWZ.js} +3 -3
- package/dist/chunk-TXSA4Q3V.js +116 -0
- package/dist/{chunk-VH33ZWMW.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-RVGLDGMI.js → chunk-WZRZFFCL.js} +25 -27
- package/dist/{chunk-JYVGHWEJ.js → chunk-XRQSAMX2.js} +4 -4
- package/dist/{chunk-OYAKCAVY.js → chunk-ZSR72JB3.js} +1 -1
- package/dist/{chunk-UKVWJRKN.js → chunk-ZX7EAV5J.js} +17 -7
- package/dist/cli.js +90 -29
- package/dist/clock-HSEKS5AR.js +289 -0
- package/dist/{cloud-sync-4NWLMFVH.js → cloud-sync-6JL4C24T.js} +22 -23
- package/dist/config-UTS7QULS.js +76 -0
- package/dist/connectors/discord-bridge.js +4 -4
- package/dist/connectors/slack-bridge.js +4 -4
- package/dist/connectors/telegram-bridge.js +4 -4
- package/dist/{conversations-AWI5SZW2.js → conversations-2PW57WO2.js} +6 -6
- 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 +1349 -1211
- package/dist/db-BDMH4SZ2.js +20 -0
- package/dist/db-BVBJ57TU.js +9 -0
- package/dist/delete-L5PAVDGQ.js +42 -0
- package/dist/delivery-manager-H5ZVBMCQ.js +31 -0
- package/dist/{delivery-router-FL45JL7N.js → delivery-router-HEJSJAHQ.js} +5 -5
- package/dist/down-74VXM45A.js +17 -0
- package/dist/env-E4XHO2BI.js +223 -0
- package/dist/exec-PY7THYH4.js +17 -0
- package/dist/export-OAS6QVBN.js +113 -0
- package/dist/extension-D74CNM7G.js +89 -0
- package/dist/extensions-XDDFY72A.js +49 -0
- package/dist/files-CWTK6V3H.js +53 -0
- package/dist/import-5A3T7QV4.js +143 -0
- package/dist/{isolation-LLAYQYDY.js → isolation-TK5RX2WM.js} +4 -4
- package/dist/join-DF5XSJAC.js +67 -0
- package/dist/lib-DYEZMGW7.js +6588 -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-QBLIV7ZJ.js +18 -0
- package/dist/mind-history-IE2QH7U5.js +275 -0
- 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-U3VFO273.js → package-D2FSVFAX.js} +11 -8
- package/dist/read-67VRP2DO.js +91 -0
- package/dist/{read-stdin-HQJ7774D.js → read-stdin-3X5VYKNS.js} +2 -2
- package/dist/register-SB7NXCOE.js +51 -0
- package/dist/{registry-PJ4S5PHQ.js → registry-GBSNW3HG.js} +3 -3
- package/dist/reject-MUR2KWJ4.js +40 -0
- package/dist/restart-5EGG4JXU.js +42 -0
- package/dist/{sandbox-GJOK4QLQ.js → sandbox-R37VIU36.js} +6 -6
- package/dist/scheduler-Y7O4CJXL.js +31 -0
- package/dist/{schema-PA3M5ZKH.js → schema-XVZ2CLKW.js} +4 -2
- package/dist/{seed-QDYVLG74.js → seed-EQORWX77.js} +3 -3
- 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-XMCBE3LF.js → setup-BJ4YAY26.js} +155 -129
- package/dist/{setup-TISPCO22.js → setup-RHJRFURI.js} +4 -4
- package/dist/skill-TAAKEYBV.js +389 -0
- package/dist/skills/plan-coordinator/SKILL.md +60 -0
- package/dist/skills/volute-mind/SKILL.md +9 -227
- package/dist/skills/volute-mind/references/extensions.md +34 -0
- package/dist/skills/volute-mind/references/integrations.md +48 -0
- package/dist/skills/volute-mind/references/routing.md +86 -0
- package/dist/skills/volute-mind/references/sleep.md +33 -0
- package/dist/skills/volute-mind/references/variants.md +31 -0
- package/dist/{skills-7FV7EJTE.js → skills-EKMCQ46K.js} +12 -8
- 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-WKLZXUIQ.js → sprout-HE4TITMK.js} +3 -3
- 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-XHQBZROW.js → tailscale-ZIZ2HWJ5.js} +5 -5
- package/dist/template-hash-A7FNHTB7.js +9 -0
- package/dist/up-77ICEDEW.js +19 -0
- package/dist/update-ANE5ZM7F.js +225 -0
- package/dist/{update-check-ZD6OOIYQ.js → update-check-UV55CBEP.js} +4 -4
- package/dist/upgrade-ZMDGC7M2.js +74 -0
- package/dist/variant-QWL2WSRI.js +62 -0
- package/dist/{version-notify-NBI2MTJO.js → version-notify-FXSEMXWW.js} +29 -28
- package/dist/{volute-config-HD7WWUQC.js → volute-config-D2XVS2YI.js} +2 -2
- package/dist/web-assets/assets/index-BhxWKvbB.css +1 -0
- package/dist/web-assets/assets/index-CHVKJ9II.js +75 -0
- package/dist/web-assets/ext-theme.css +48 -9
- package/dist/web-assets/index.html +2 -2
- package/dist/web-assets/sw.js +117 -0
- package/drizzle/0005_meta_summaries.sql +15 -0
- package/drizzle/meta/0005_snapshot.json +7 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +10 -7
- 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/packages/extensions/plan/dist/ui/assets/index-CJj2gZnZ.css +1 -0
- package/packages/extensions/plan/dist/ui/assets/index-FMEJmvQz.js +61 -0
- package/packages/extensions/plan/dist/ui/index.html +14 -0
- package/packages/extensions/plan/skills/plan/SKILL.md +43 -0
- package/packages/extensions/plan/skills/plan/scripts/plan-hook.sh +37 -0
- package/templates/_base/home/VOLUTE.md +12 -19
- package/templates/_base/src/lib/auto-commit.ts +8 -8
- package/templates/_base/src/lib/context-breakdown.ts +450 -0
- package/templates/_base/src/lib/format-prefix.ts +17 -0
- package/templates/_base/src/lib/hook-loader.ts +8 -2
- package/templates/_base/src/lib/router.ts +75 -33
- package/templates/_base/src/lib/routing.ts +4 -1
- package/templates/_base/src/lib/startup.ts +16 -8
- package/templates/_base/src/lib/types.ts +2 -1
- package/templates/_base/src/lib/volute-server.ts +75 -8
- package/templates/claude/.init/CLAUDE.md +4 -10
- package/templates/claude/package.json.tmpl +1 -0
- package/templates/claude/src/agent.ts +108 -33
- package/templates/claude/src/lib/hooks/reply-instructions.ts +27 -7
- package/templates/claude/src/lib/stream-consumer.ts +2 -2
- package/templates/claude/src/server.ts +1 -0
- package/templates/codex/package.json.tmpl +1 -0
- package/templates/codex/src/agent.ts +80 -8
- package/templates/codex/src/server.ts +1 -4
- package/templates/pi/package.json.tmpl +1 -0
- package/templates/pi/src/agent.ts +115 -36
- package/templates/pi/src/lib/event-handler.ts +22 -7
- package/templates/pi/src/lib/reply-instructions-extension.ts +23 -4
- package/templates/pi/src/lib/subagents.ts +20 -17
- package/templates/pi/src/server.ts +2 -5
- package/dist/accept-D5VBM7JW.js +0 -42
- package/dist/activity-events-XJO3P4RR.js +0 -15
- package/dist/bridge-TXWWPPOJ.js +0 -207
- package/dist/chat-U5ZOME3O.js +0 -68
- package/dist/chunk-3Z2DPESO.js +0 -3634
- package/dist/chunk-A2A4KLFE.js +0 -1528
- package/dist/chunk-K3NQKI34.js +0 -10
- package/dist/chunk-NPKSDYA2.js +0 -156
- package/dist/chunk-PB65JZK2.js +0 -85
- package/dist/clock-BVH3V6E3.js +0 -266
- package/dist/config-H2H4UIF7.js +0 -72
- package/dist/create-2FK7Z46Y.js +0 -44
- package/dist/create-YWD2TIP4.js +0 -71
- package/dist/daemon-client-6QXHZ7US.js +0 -12
- package/dist/daemon-restart-GOBUKLX7.js +0 -52
- package/dist/db-F34YLV7D.js +0 -9
- package/dist/db-RA45JBFG.js +0 -16
- package/dist/delete-QTGWEDBI.js +0 -35
- package/dist/delivery-manager-PFAKEJTC.js +0 -32
- package/dist/down-FWWTEKXM.js +0 -15
- package/dist/env-JCOF2222.js +0 -191
- package/dist/export-SUYRLI5Q.js +0 -112
- package/dist/extension-OBTGKQQD.js +0 -175
- package/dist/extensions-KYNTVTMO.js +0 -30
- package/dist/files-65PMW5IK.js +0 -47
- package/dist/history-DKCDI3JO.js +0 -128
- package/dist/import-DDUFE7AY.js +0 -23
- package/dist/join-I5QEE3LG.js +0 -66
- package/dist/list-JQ463EDA.js +0 -41
- package/dist/login-D7ETSU4R.js +0 -47
- package/dist/login-RIJF2F4G.js +0 -47
- package/dist/logout-5MLHZALK.js +0 -40
- package/dist/logout-UZJRGY4Z.js +0 -21
- package/dist/message-delivery-DFF5SJRM.js +0 -42
- package/dist/mind-IOJFLEM5.js +0 -108
- package/dist/mind-activity-tracker-F6O4Q2SL.js +0 -18
- package/dist/mind-list-WUPMQDYQ.js +0 -30
- package/dist/mind-manager-NBJF5D26.js +0 -32
- package/dist/mind-profile-P67FEHOY.js +0 -47
- package/dist/mind-service-2MQ6UK5N.js +0 -38
- package/dist/mind-sleep-WW2IX7JT.js +0 -42
- package/dist/mind-status-L3EFFRPR.js +0 -56
- package/dist/mind-wake-VSSGW465.js +0 -37
- package/dist/read-EBY56C33.js +0 -75
- package/dist/register-HD74C4TT.js +0 -47
- package/dist/reject-UJKFBHRO.js +0 -40
- package/dist/restart-3UCMRUVC.js +0 -33
- package/dist/scheduler-ZZ7XGQG6.js +0 -32
- package/dist/seed-check-S2IX25RL.js +0 -32
- package/dist/seed-cmd-DKOUFEAU.js +0 -36
- package/dist/seed-create-4XBBOLRH.js +0 -112
- package/dist/seed-sprout-GQEIIQRT.js +0 -132
- package/dist/send-QIV2INHB.js +0 -373
- package/dist/skill-PSQGRRJX.js +0 -358
- 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-JTXSN7NV.js +0 -36
- package/dist/spirit-VRONKFMF.js +0 -23
- package/dist/split-STOROBYJ.js +0 -63
- package/dist/start-K2NCUUCG.js +0 -33
- package/dist/status-3JBTFSMI.js +0 -115
- package/dist/stop-H26JZDXF.js +0 -32
- package/dist/system-chat-JAPOJ3KE.js +0 -36
- package/dist/systems-XRI52VCH.js +0 -61
- package/dist/template-hash-A6VVKOXJ.js +0 -9
- package/dist/up-M5AS6SBV.js +0 -18
- package/dist/update-UD543CXX.js +0 -215
- package/dist/upgrade-O4Q7WJM3.js +0 -67
- package/dist/variant-7TGZHOU3.js +0 -41
- package/dist/web-assets/assets/index-CWJrVveV.css +0 -1
- package/dist/web-assets/assets/index-DJt14FRI.js +0 -75
- package/packages/extensions/pages/dist/ui/assets/index-tLTROSk5.js +0 -2
|
@@ -0,0 +1,64 @@
|
|
|
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/split.ts
|
|
12
|
+
var cmd = command({
|
|
13
|
+
name: "volute mind split",
|
|
14
|
+
description: "Create an experimental variant",
|
|
15
|
+
args: [{ name: "name", required: true, description: "Name for the variant" }],
|
|
16
|
+
flags: {
|
|
17
|
+
from: { type: "string", description: "Parent mind to split from" },
|
|
18
|
+
soul: { type: "string", description: "Custom SOUL.md content" },
|
|
19
|
+
port: { type: "number", description: "Port for variant server" },
|
|
20
|
+
"no-start": { type: "boolean", description: "Don't start the variant" },
|
|
21
|
+
json: { type: "boolean", description: "Output JSON result" }
|
|
22
|
+
},
|
|
23
|
+
run: async ({ args, flags }) => {
|
|
24
|
+
const mindName = resolveMindName({ mind: flags.from });
|
|
25
|
+
const variantName = args.name;
|
|
26
|
+
const { soul, port, json } = flags;
|
|
27
|
+
const noStart = flags["no-start"];
|
|
28
|
+
if (!json) console.log("Creating variant via daemon...");
|
|
29
|
+
const { daemonFetch } = await import("./daemon-client-RVIKXGFQ.js");
|
|
30
|
+
const { getClient, urlOf } = await import("./api-client-3A77HMH7.js");
|
|
31
|
+
const client = getClient();
|
|
32
|
+
const res = await daemonFetch(
|
|
33
|
+
urlOf(client.api.minds[":name"].variants.$url({ param: { name: mindName } })),
|
|
34
|
+
{
|
|
35
|
+
method: "POST",
|
|
36
|
+
headers: { "Content-Type": "application/json" },
|
|
37
|
+
body: JSON.stringify({
|
|
38
|
+
name: variantName,
|
|
39
|
+
...soul && { soul },
|
|
40
|
+
...port && { port },
|
|
41
|
+
...noStart && { noStart }
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
const data = await res.json();
|
|
46
|
+
if (!res.ok) {
|
|
47
|
+
console.error(data.error ?? "Failed to create variant");
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
if (json) {
|
|
51
|
+
console.log(JSON.stringify(data.variant, null, 2));
|
|
52
|
+
} else {
|
|
53
|
+
console.log(`
|
|
54
|
+
Variant created: ${variantName}`);
|
|
55
|
+
console.log(` Branch: ${data.variant?.branch}`);
|
|
56
|
+
console.log(` Path: ${data.variant?.path}`);
|
|
57
|
+
console.log(` Port: ${data.variant?.port}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var run = cmd.execute;
|
|
62
|
+
export {
|
|
63
|
+
run
|
|
64
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-7KJOFUNN.js";
|
|
3
3
|
|
|
4
|
-
// src/commands/sprout.ts
|
|
4
|
+
// packages/cli/src/commands/sprout.ts
|
|
5
5
|
async function run(args) {
|
|
6
6
|
console.error("Note: `volute mind sprout` is now `volute seed sprout`");
|
|
7
|
-
await import("./seed-sprout-
|
|
7
|
+
await import("./seed-sprout-JYXGXOP3.js").then((m) => m.run(args));
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
10
|
run
|
|
@@ -0,0 +1,39 @@
|
|
|
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 {
|
|
10
|
+
getClient,
|
|
11
|
+
urlOf
|
|
12
|
+
} from "./chunk-LOPXTW6H.js";
|
|
13
|
+
import "./chunk-7KJOFUNN.js";
|
|
14
|
+
|
|
15
|
+
// packages/cli/src/commands/start.ts
|
|
16
|
+
var cmd = command({
|
|
17
|
+
name: "volute mind start",
|
|
18
|
+
description: "Start a mind",
|
|
19
|
+
args: [{ name: "name", required: true, description: "Mind to start" }],
|
|
20
|
+
flags: {},
|
|
21
|
+
async run({ args }) {
|
|
22
|
+
const name = args.name;
|
|
23
|
+
const client = getClient();
|
|
24
|
+
const res = await daemonFetch(
|
|
25
|
+
urlOf(client.api.minds[":name"].start.$url({ param: { name } })),
|
|
26
|
+
{ method: "POST" }
|
|
27
|
+
);
|
|
28
|
+
const data = await res.json();
|
|
29
|
+
if (!res.ok) {
|
|
30
|
+
console.error(data.error || "Failed to start mind");
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
console.log(`${name} started on port ${data.port}`);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
var run = cmd.execute;
|
|
37
|
+
export {
|
|
38
|
+
run
|
|
39
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
getDaemonUrl,
|
|
9
|
+
getServiceMode,
|
|
10
|
+
modeLabel,
|
|
11
|
+
readDaemonConfig
|
|
12
|
+
} from "./chunk-2TGZJFAT.js";
|
|
13
|
+
import {
|
|
14
|
+
command
|
|
15
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
16
|
+
import "./chunk-O7IGP7ZW.js";
|
|
17
|
+
import {
|
|
18
|
+
checkForUpdate
|
|
19
|
+
} from "./chunk-OTC67N2Z.js";
|
|
20
|
+
import "./chunk-AN2W47GW.js";
|
|
21
|
+
import "./chunk-VHJRZM2S.js";
|
|
22
|
+
import "./chunk-BDYXIWA5.js";
|
|
23
|
+
import "./chunk-5N7Y5WAM.js";
|
|
24
|
+
import "./chunk-7KJOFUNN.js";
|
|
25
|
+
|
|
26
|
+
// src/commands/status.ts
|
|
27
|
+
import { execFile } from "child_process";
|
|
28
|
+
import { existsSync } from "fs";
|
|
29
|
+
import { promisify } from "util";
|
|
30
|
+
var execFileAsync = promisify(execFile);
|
|
31
|
+
var cmd = command({
|
|
32
|
+
name: "volute status",
|
|
33
|
+
description: "Show daemon status, version, and running minds",
|
|
34
|
+
flags: {},
|
|
35
|
+
run: async () => {
|
|
36
|
+
const mode = getServiceMode();
|
|
37
|
+
console.log(`Mode: ${modeLabel(mode)}`);
|
|
38
|
+
const { hostname, port, internalPort, token } = readDaemonConfig();
|
|
39
|
+
const apiPort = internalPort ?? port;
|
|
40
|
+
const baseUrl = getDaemonUrl("127.0.0.1", apiPort);
|
|
41
|
+
let running = false;
|
|
42
|
+
let version;
|
|
43
|
+
try {
|
|
44
|
+
const res = await fetch(`${baseUrl}/api/health`);
|
|
45
|
+
if (res.ok) {
|
|
46
|
+
const body = await res.json();
|
|
47
|
+
if (body.ok) {
|
|
48
|
+
running = true;
|
|
49
|
+
version = body.version;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
} catch {
|
|
53
|
+
}
|
|
54
|
+
if (!running) {
|
|
55
|
+
console.log("Status: not running");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
console.log(`Status: running on ${hostname}:${port}`);
|
|
59
|
+
if (version) console.log(`Version: ${version}`);
|
|
60
|
+
const update = await checkForUpdate();
|
|
61
|
+
if (update.updateAvailable) {
|
|
62
|
+
console.log(`Update available: ${update.current} \u2192 ${update.latest}`);
|
|
63
|
+
}
|
|
64
|
+
if (mode !== "manual") {
|
|
65
|
+
const serviceInfo = await getServiceInfo();
|
|
66
|
+
if (serviceInfo) {
|
|
67
|
+
console.log(`
|
|
68
|
+
Service:
|
|
69
|
+
${serviceInfo}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const headers = {};
|
|
73
|
+
if (token) headers.Authorization = `Bearer ${token}`;
|
|
74
|
+
headers.Origin = baseUrl;
|
|
75
|
+
try {
|
|
76
|
+
const res = await fetch(`${baseUrl}/api/minds`, { headers });
|
|
77
|
+
if (res.ok) {
|
|
78
|
+
const minds = await res.json();
|
|
79
|
+
if (minds.length > 0) {
|
|
80
|
+
console.log(`
|
|
81
|
+
Minds (${minds.length}):`);
|
|
82
|
+
for (const mind of minds) {
|
|
83
|
+
const status = mind.status ?? (mind.running ? "running" : "stopped");
|
|
84
|
+
const label = mind.stage === "seed" ? " (seed)" : "";
|
|
85
|
+
console.log(` ${mind.name}: ${status}${label}`);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
console.log("\nNo minds configured.");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
} catch {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
var run = cmd.execute;
|
|
96
|
+
async function getServiceInfo() {
|
|
97
|
+
const platform = process.platform;
|
|
98
|
+
if (platform === "darwin") {
|
|
99
|
+
const plistPath = existsSync(SYSTEM_LAUNCHD_PLIST_PATH) ? SYSTEM_LAUNCHD_PLIST_PATH : existsSync(LAUNCHD_PLIST_PATH) ? LAUNCHD_PLIST_PATH : null;
|
|
100
|
+
if (!plistPath) return null;
|
|
101
|
+
try {
|
|
102
|
+
const { stdout } = await execFileAsync("launchctl", ["list", LAUNCHD_PLIST_LABEL]);
|
|
103
|
+
return stdout.trim();
|
|
104
|
+
} catch {
|
|
105
|
+
return "Service installed but not currently loaded.";
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (platform === "linux") {
|
|
109
|
+
const unitPath = existsSync(SYSTEM_SERVICE_PATH) ? "system" : existsSync(USER_SYSTEMD_UNIT) ? "user" : null;
|
|
110
|
+
if (!unitPath) return null;
|
|
111
|
+
const args = unitPath === "system" ? ["status", "volute", "--no-pager"] : ["--user", "status", "volute", "--no-pager"];
|
|
112
|
+
try {
|
|
113
|
+
const { stdout } = await execFileAsync("systemctl", args);
|
|
114
|
+
return stdout.trim();
|
|
115
|
+
} catch (err) {
|
|
116
|
+
const e = err;
|
|
117
|
+
if (e.stdout) return e.stdout.trim();
|
|
118
|
+
return "Service installed but status unknown.";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
export {
|
|
124
|
+
run
|
|
125
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
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 {
|
|
13
|
+
getClient,
|
|
14
|
+
urlOf
|
|
15
|
+
} from "./chunk-LOPXTW6H.js";
|
|
16
|
+
import "./chunk-7KJOFUNN.js";
|
|
17
|
+
|
|
18
|
+
// packages/cli/src/commands/stop.ts
|
|
19
|
+
var cmd = command({
|
|
20
|
+
name: "volute mind stop",
|
|
21
|
+
description: "Stop a mind",
|
|
22
|
+
args: [{ name: "name", description: "Mind to stop (or use VOLUTE_MIND)" }],
|
|
23
|
+
flags: {},
|
|
24
|
+
async run({ args }) {
|
|
25
|
+
const name = resolveMindName({ mind: args.name });
|
|
26
|
+
const client = getClient();
|
|
27
|
+
const res = await daemonFetch(urlOf(client.api.minds[":name"].stop.$url({ param: { name } })), {
|
|
28
|
+
method: "POST"
|
|
29
|
+
});
|
|
30
|
+
const data = await res.json();
|
|
31
|
+
if (!res.ok) {
|
|
32
|
+
console.error(data.error || "Failed to stop mind");
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
console.log(`${name} stopped.`);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
var run = cmd.execute;
|
|
39
|
+
export {
|
|
40
|
+
run
|
|
41
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ensureSystemDM,
|
|
4
|
+
generateSystemReply,
|
|
5
|
+
resetSystemDMCache,
|
|
6
|
+
sendSystemMessage,
|
|
7
|
+
sendSystemMessageDirect
|
|
8
|
+
} from "./chunk-WJPROOU5.js";
|
|
9
|
+
import "./chunk-5XJYUFZH.js";
|
|
10
|
+
import "./chunk-AOB6GVRM.js";
|
|
11
|
+
import "./chunk-IJHIXLVN.js";
|
|
12
|
+
import "./chunk-QWTR6AWZ.js";
|
|
13
|
+
import "./chunk-N446KRP7.js";
|
|
14
|
+
import "./chunk-QHG4OMZL.js";
|
|
15
|
+
import "./chunk-XRQSAMX2.js";
|
|
16
|
+
import "./chunk-WZRZFFCL.js";
|
|
17
|
+
import "./chunk-CORXD635.js";
|
|
18
|
+
import "./chunk-ZSR72JB3.js";
|
|
19
|
+
import "./chunk-PWQ2ITYG.js";
|
|
20
|
+
import "./chunk-A2ZLHBHG.js";
|
|
21
|
+
import "./chunk-FT5KETXZ.js";
|
|
22
|
+
import "./chunk-BKF4WQCY.js";
|
|
23
|
+
import "./chunk-AN2W47GW.js";
|
|
24
|
+
import "./chunk-VHJRZM2S.js";
|
|
25
|
+
import "./chunk-BMZQYACC.js";
|
|
26
|
+
import "./chunk-BDYXIWA5.js";
|
|
27
|
+
import "./chunk-5N7Y5WAM.js";
|
|
28
|
+
import "./chunk-7KJOFUNN.js";
|
|
29
|
+
export {
|
|
30
|
+
ensureSystemDM,
|
|
31
|
+
generateSystemReply,
|
|
32
|
+
resetSystemDMCache,
|
|
33
|
+
sendSystemMessage,
|
|
34
|
+
sendSystemMessageDirect
|
|
35
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
subcommands
|
|
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/systems.ts
|
|
12
|
+
async function showStatus() {
|
|
13
|
+
const res = await daemonFetch("/api/system/info");
|
|
14
|
+
if (!res.ok) {
|
|
15
|
+
const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
|
|
16
|
+
console.error(`Failed to get system info: ${body.error}`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const { system } = await res.json();
|
|
20
|
+
if (!system) {
|
|
21
|
+
console.log("Not connected to volute.systems");
|
|
22
|
+
console.log('Run "volute systems register" or "volute systems login" to connect.');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
console.log(`System: ${system}`);
|
|
26
|
+
}
|
|
27
|
+
var cmd = subcommands({
|
|
28
|
+
name: "volute systems",
|
|
29
|
+
description: "Manage volute.systems account",
|
|
30
|
+
commands: {
|
|
31
|
+
status: {
|
|
32
|
+
description: "Show volute.systems account info",
|
|
33
|
+
run: async () => showStatus()
|
|
34
|
+
},
|
|
35
|
+
register: {
|
|
36
|
+
description: "Register a system on volute.systems",
|
|
37
|
+
run: (args) => import("./register-SB7NXCOE.js").then((m) => m.run(args))
|
|
38
|
+
},
|
|
39
|
+
login: {
|
|
40
|
+
description: "Log in with an existing API key",
|
|
41
|
+
run: (args) => import("./login-GOTAYLXP.js").then((m) => m.run(args))
|
|
42
|
+
},
|
|
43
|
+
logout: {
|
|
44
|
+
description: "Remove stored credentials",
|
|
45
|
+
run: (args) => import("./logout-6KIA74EV.js").then((m) => m.run(args))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
var run = cmd.execute;
|
|
50
|
+
export {
|
|
51
|
+
run
|
|
52
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
logger_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BKF4WQCY.js";
|
|
5
5
|
import {
|
|
6
6
|
voluteHome
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-BDYXIWA5.js";
|
|
8
|
+
import "./chunk-5N7Y5WAM.js";
|
|
9
|
+
import "./chunk-7KJOFUNN.js";
|
|
10
10
|
|
|
11
|
-
// src/lib/tailscale.ts
|
|
11
|
+
// packages/daemon/src/lib/tailscale.ts
|
|
12
12
|
import { execFile } from "child_process";
|
|
13
13
|
import { existsSync, mkdirSync, readFileSync } from "fs";
|
|
14
14
|
import { resolve } from "path";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
run
|
|
4
|
+
} from "./chunk-VY3RB2V7.js";
|
|
5
|
+
import "./chunk-2TGZJFAT.js";
|
|
6
|
+
import "./chunk-TXSA4Q3V.js";
|
|
7
|
+
import "./chunk-O7IGP7ZW.js";
|
|
8
|
+
import "./chunk-AN2W47GW.js";
|
|
9
|
+
import "./chunk-VHJRZM2S.js";
|
|
10
|
+
import {
|
|
11
|
+
readGlobalConfig
|
|
12
|
+
} from "./chunk-BMZQYACC.js";
|
|
13
|
+
import "./chunk-BDYXIWA5.js";
|
|
14
|
+
import "./chunk-5N7Y5WAM.js";
|
|
15
|
+
import "./chunk-7KJOFUNN.js";
|
|
16
|
+
export {
|
|
17
|
+
readGlobalConfig,
|
|
18
|
+
run
|
|
19
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getServiceMode,
|
|
4
|
+
modeLabel,
|
|
5
|
+
pollHealth,
|
|
6
|
+
readDaemonConfig,
|
|
7
|
+
restartService
|
|
8
|
+
} from "./chunk-2TGZJFAT.js";
|
|
9
|
+
import {
|
|
10
|
+
command
|
|
11
|
+
} from "./chunk-TXSA4Q3V.js";
|
|
12
|
+
import "./chunk-O7IGP7ZW.js";
|
|
13
|
+
import {
|
|
14
|
+
checkForUpdate
|
|
15
|
+
} from "./chunk-OTC67N2Z.js";
|
|
16
|
+
import {
|
|
17
|
+
exec,
|
|
18
|
+
execInherit,
|
|
19
|
+
resolveVoluteBin
|
|
20
|
+
} from "./chunk-AN2W47GW.js";
|
|
21
|
+
import "./chunk-VHJRZM2S.js";
|
|
22
|
+
import {
|
|
23
|
+
voluteSystemDir
|
|
24
|
+
} from "./chunk-BDYXIWA5.js";
|
|
25
|
+
import "./chunk-5N7Y5WAM.js";
|
|
26
|
+
import "./chunk-7KJOFUNN.js";
|
|
27
|
+
|
|
28
|
+
// src/commands/update.ts
|
|
29
|
+
import { existsSync, readFileSync, unlinkSync } from "fs";
|
|
30
|
+
import { resolve } from "path";
|
|
31
|
+
var cmd = command({
|
|
32
|
+
name: "volute update",
|
|
33
|
+
description: "Check for and install updates",
|
|
34
|
+
flags: {},
|
|
35
|
+
run: async () => {
|
|
36
|
+
const result = await checkForUpdate(true);
|
|
37
|
+
if (result.checkFailed) {
|
|
38
|
+
console.error("Could not reach npm registry. Check your network connection and try again.");
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
console.log(`Current version: ${result.current}`);
|
|
42
|
+
console.log(`Latest version: ${result.latest}`);
|
|
43
|
+
if (!result.updateAvailable) {
|
|
44
|
+
console.log("\nAlready up to date.");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
console.log(`
|
|
48
|
+
Updating volute ${result.current} \u2192 ${result.latest}...`);
|
|
49
|
+
const mode = getServiceMode();
|
|
50
|
+
if (mode === "system") {
|
|
51
|
+
let npmPath = "/usr/bin/npm";
|
|
52
|
+
if (!existsSync(npmPath)) {
|
|
53
|
+
try {
|
|
54
|
+
npmPath = (await exec("which", ["npm"])).trim();
|
|
55
|
+
} catch {
|
|
56
|
+
console.error("Could not find npm. Install npm and try again.");
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
await execInherit("sudo", [npmPath, "install", "-g", "volute@latest"]);
|
|
62
|
+
} catch (err) {
|
|
63
|
+
console.error(`
|
|
64
|
+
Update failed: ${err.message}`);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
console.log("Restarting service...");
|
|
68
|
+
try {
|
|
69
|
+
await restartService(mode);
|
|
70
|
+
} catch (err) {
|
|
71
|
+
console.error(`Failed to restart: ${err instanceof Error ? err.message : err}`);
|
|
72
|
+
console.error("Try: sudo systemctl restart volute");
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
{
|
|
76
|
+
const config = readDaemonConfig();
|
|
77
|
+
if (await pollHealth("127.0.0.1", config.internalPort ?? config.port)) {
|
|
78
|
+
console.log(`
|
|
79
|
+
Updated to volute v${result.latest}`);
|
|
80
|
+
} else {
|
|
81
|
+
console.error("Service restarted but daemon did not become healthy.");
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (mode === "user-systemd" || mode === "user-launchd") {
|
|
88
|
+
try {
|
|
89
|
+
await execInherit("npm", ["install", "-g", "volute@latest"]);
|
|
90
|
+
} catch (err) {
|
|
91
|
+
console.error(`
|
|
92
|
+
Update failed: ${err.message}`);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
console.log(`Restarting service (${modeLabel(mode)})...`);
|
|
96
|
+
try {
|
|
97
|
+
await restartService(mode);
|
|
98
|
+
} catch (err) {
|
|
99
|
+
console.error(`Failed to restart: ${err instanceof Error ? err.message : err}`);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
{
|
|
103
|
+
const config = readDaemonConfig();
|
|
104
|
+
if (await pollHealth("127.0.0.1", config.internalPort ?? config.port)) {
|
|
105
|
+
console.log(`
|
|
106
|
+
Updated to volute v${result.latest}`);
|
|
107
|
+
} else {
|
|
108
|
+
console.error("Service restarted but daemon did not become healthy.");
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const systemDir = voluteSystemDir();
|
|
115
|
+
const pidPath = resolve(systemDir, "daemon.pid");
|
|
116
|
+
const configPath = resolve(systemDir, "daemon.json");
|
|
117
|
+
let daemonWasRunning = false;
|
|
118
|
+
let daemonPort = 1618;
|
|
119
|
+
let daemonHost = "127.0.0.1";
|
|
120
|
+
if (existsSync(pidPath)) {
|
|
121
|
+
const pid = parseInt(readFileSync(pidPath, "utf-8").trim(), 10);
|
|
122
|
+
try {
|
|
123
|
+
process.kill(pid, 0);
|
|
124
|
+
daemonWasRunning = true;
|
|
125
|
+
} catch {
|
|
126
|
+
try {
|
|
127
|
+
unlinkSync(pidPath);
|
|
128
|
+
} catch {
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (daemonWasRunning && existsSync(configPath)) {
|
|
133
|
+
try {
|
|
134
|
+
const config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
135
|
+
daemonPort = config.port ?? 1618;
|
|
136
|
+
daemonHost = config.hostname || "127.0.0.1";
|
|
137
|
+
} catch {
|
|
138
|
+
console.error("Warning: could not read daemon config, using default port/host");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (daemonWasRunning) {
|
|
142
|
+
console.log("Stopping daemon...");
|
|
143
|
+
const pid = parseInt(readFileSync(pidPath, "utf-8").trim(), 10);
|
|
144
|
+
try {
|
|
145
|
+
process.kill(-pid, "SIGTERM");
|
|
146
|
+
} catch {
|
|
147
|
+
try {
|
|
148
|
+
process.kill(pid, "SIGTERM");
|
|
149
|
+
} catch {
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const maxWait = 1e4;
|
|
153
|
+
const start = Date.now();
|
|
154
|
+
while (Date.now() - start < maxWait) {
|
|
155
|
+
if (!existsSync(pidPath)) break;
|
|
156
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
157
|
+
}
|
|
158
|
+
if (existsSync(pidPath)) {
|
|
159
|
+
try {
|
|
160
|
+
process.kill(-pid, "SIGKILL");
|
|
161
|
+
} catch {
|
|
162
|
+
try {
|
|
163
|
+
process.kill(pid, "SIGKILL");
|
|
164
|
+
} catch {
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (existsSync(pidPath)) {
|
|
169
|
+
try {
|
|
170
|
+
const stalePid = parseInt(readFileSync(pidPath, "utf-8").trim(), 10);
|
|
171
|
+
process.kill(stalePid, 0);
|
|
172
|
+
console.error("Warning: daemon process may still be running. Aborting update.");
|
|
173
|
+
process.exit(1);
|
|
174
|
+
} catch {
|
|
175
|
+
try {
|
|
176
|
+
unlinkSync(pidPath);
|
|
177
|
+
} catch {
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
console.log("Daemon stopped.");
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
await execInherit("npm", ["install", "-g", "volute@latest"]);
|
|
185
|
+
} catch (err) {
|
|
186
|
+
console.error(`
|
|
187
|
+
Update failed: ${err.message}`);
|
|
188
|
+
if (daemonWasRunning) {
|
|
189
|
+
console.log("Restarting daemon with current version...");
|
|
190
|
+
try {
|
|
191
|
+
await execInherit(resolveVoluteBin(), [
|
|
192
|
+
"up",
|
|
193
|
+
"--port",
|
|
194
|
+
String(daemonPort),
|
|
195
|
+
"--host",
|
|
196
|
+
daemonHost
|
|
197
|
+
]);
|
|
198
|
+
} catch {
|
|
199
|
+
console.error("Failed to restart daemon. Run `volute up` manually.");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
process.exit(1);
|
|
203
|
+
}
|
|
204
|
+
if (daemonWasRunning) {
|
|
205
|
+
console.log("Restarting daemon...");
|
|
206
|
+
try {
|
|
207
|
+
await execInherit(resolveVoluteBin(), [
|
|
208
|
+
"up",
|
|
209
|
+
"--port",
|
|
210
|
+
String(daemonPort),
|
|
211
|
+
"--host",
|
|
212
|
+
daemonHost
|
|
213
|
+
]);
|
|
214
|
+
} catch {
|
|
215
|
+
console.error("Failed to restart daemon. Run `volute up` manually.");
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
console.log(`
|
|
219
|
+
Updated to volute v${result.latest}`);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
var run = cmd.execute;
|
|
223
|
+
export {
|
|
224
|
+
run
|
|
225
|
+
};
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
fetchLatestVersion,
|
|
6
6
|
getCurrentVersion,
|
|
7
7
|
isNewer
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-OTC67N2Z.js";
|
|
9
|
+
import "./chunk-BDYXIWA5.js";
|
|
10
|
+
import "./chunk-5N7Y5WAM.js";
|
|
11
|
+
import "./chunk-7KJOFUNN.js";
|
|
12
12
|
export {
|
|
13
13
|
checkForUpdate,
|
|
14
14
|
checkForUpdateCached,
|