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/bridge-O753D5F4.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
parseArgs
|
|
4
|
-
} from "./chunk-D424ZQGI.js";
|
|
5
|
-
import {
|
|
6
|
-
daemonFetch
|
|
7
|
-
} from "./chunk-PLDWHR4D.js";
|
|
8
|
-
import "./chunk-N7BLAHNE.js";
|
|
9
|
-
import "./chunk-4JSR7YO7.js";
|
|
10
|
-
import "./chunk-7KJOFUNN.js";
|
|
11
|
-
|
|
12
|
-
// src/commands/chat/bridge.ts
|
|
13
|
-
async function run(args) {
|
|
14
|
-
const subcommand = args[0];
|
|
15
|
-
const subArgs = args.slice(1);
|
|
16
|
-
switch (subcommand) {
|
|
17
|
-
case "add":
|
|
18
|
-
await bridgeAdd(subArgs);
|
|
19
|
-
break;
|
|
20
|
-
case "remove":
|
|
21
|
-
await bridgeRemove(subArgs);
|
|
22
|
-
break;
|
|
23
|
-
case "list":
|
|
24
|
-
await bridgeList();
|
|
25
|
-
break;
|
|
26
|
-
case "map":
|
|
27
|
-
await bridgeMap(subArgs);
|
|
28
|
-
break;
|
|
29
|
-
case "unmap":
|
|
30
|
-
await bridgeUnmap(subArgs);
|
|
31
|
-
break;
|
|
32
|
-
case "mappings":
|
|
33
|
-
await bridgeMappings(subArgs);
|
|
34
|
-
break;
|
|
35
|
-
case "--help":
|
|
36
|
-
case "-h":
|
|
37
|
-
case void 0:
|
|
38
|
-
console.log(`volute chat bridge \u2014 manage platform bridges
|
|
39
|
-
|
|
40
|
-
add <platform> Set up a bridge (e.g. discord, slack, telegram)
|
|
41
|
-
remove <platform> Remove a bridge
|
|
42
|
-
list Show bridges + status
|
|
43
|
-
map <platform>:<channel> <ch> Map external \u2192 Volute channel
|
|
44
|
-
unmap <platform>:<channel> Remove mapping
|
|
45
|
-
mappings [<platform>] List mappings`);
|
|
46
|
-
break;
|
|
47
|
-
default:
|
|
48
|
-
console.error(
|
|
49
|
-
`Unknown bridge subcommand: ${subcommand}
|
|
50
|
-
Run 'volute chat bridge --help' for usage.`
|
|
51
|
-
);
|
|
52
|
-
process.exit(1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
async function bridgeAdd(args) {
|
|
56
|
-
const { positional, flags } = parseArgs(args, {
|
|
57
|
-
"default-mind": { type: "string" }
|
|
58
|
-
});
|
|
59
|
-
const platform = positional[0];
|
|
60
|
-
if (!platform) {
|
|
61
|
-
console.error("Usage: volute chat bridge add <platform> --default-mind <name>");
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
const defaultMind = flags["default-mind"];
|
|
65
|
-
if (!defaultMind) {
|
|
66
|
-
console.error("--default-mind is required (mind to route DMs to)");
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}`, {
|
|
70
|
-
method: "POST",
|
|
71
|
-
headers: { "Content-Type": "application/json" },
|
|
72
|
-
body: JSON.stringify({ defaultMind })
|
|
73
|
-
});
|
|
74
|
-
if (!res.ok) {
|
|
75
|
-
const data = await res.json().catch(() => ({}));
|
|
76
|
-
if (data.error === "missing_env" && data.missing) {
|
|
77
|
-
console.error(`Missing required environment variables:`);
|
|
78
|
-
for (const v of data.missing) {
|
|
79
|
-
console.error(` ${v.name} \u2014 ${v.description}`);
|
|
80
|
-
}
|
|
81
|
-
console.error(`
|
|
82
|
-
Set them with: volute env set <VAR> <value>`);
|
|
83
|
-
} else {
|
|
84
|
-
console.error(data.error ?? `Failed to add bridge: ${res.status}`);
|
|
85
|
-
}
|
|
86
|
-
process.exit(1);
|
|
87
|
-
}
|
|
88
|
-
console.log(`Bridge ${platform} enabled.`);
|
|
89
|
-
}
|
|
90
|
-
async function bridgeRemove(args) {
|
|
91
|
-
const platform = args[0];
|
|
92
|
-
if (!platform) {
|
|
93
|
-
console.error("Usage: volute chat bridge remove <platform>");
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}`, {
|
|
97
|
-
method: "DELETE"
|
|
98
|
-
});
|
|
99
|
-
if (!res.ok) {
|
|
100
|
-
console.error(`Failed to remove bridge: ${res.status}`);
|
|
101
|
-
process.exit(1);
|
|
102
|
-
}
|
|
103
|
-
console.log(`Bridge ${platform} removed.`);
|
|
104
|
-
}
|
|
105
|
-
async function bridgeList() {
|
|
106
|
-
const res = await daemonFetch("/api/bridges");
|
|
107
|
-
if (!res.ok) {
|
|
108
|
-
console.error(`Failed to list bridges: ${res.status}`);
|
|
109
|
-
process.exit(1);
|
|
110
|
-
}
|
|
111
|
-
const bridges = await res.json();
|
|
112
|
-
if (bridges.length === 0) {
|
|
113
|
-
console.log("No bridges configured. Use 'volute chat bridge add <platform>' to set one up.");
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
for (const b of bridges) {
|
|
117
|
-
const status = b.running ? "running" : b.enabled ? "stopped" : "disabled";
|
|
118
|
-
console.log(` ${b.displayName} (${b.platform}) ${status} default: ${b.defaultMind}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
async function bridgeMap(args) {
|
|
122
|
-
const target = args[0];
|
|
123
|
-
const voluteChannel = args[1];
|
|
124
|
-
if (!target || !voluteChannel) {
|
|
125
|
-
console.error("Usage: volute chat bridge map <platform>:<channel> <volute-channel>");
|
|
126
|
-
process.exit(1);
|
|
127
|
-
}
|
|
128
|
-
const colonIdx = target.indexOf(":");
|
|
129
|
-
if (colonIdx < 1) {
|
|
130
|
-
console.error("Target must be in format platform:channel (e.g. discord:my-server/general)");
|
|
131
|
-
process.exit(1);
|
|
132
|
-
}
|
|
133
|
-
const platform = target.slice(0, colonIdx);
|
|
134
|
-
const externalChannel = target.slice(colonIdx + 1);
|
|
135
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}/mappings`, {
|
|
136
|
-
method: "PUT",
|
|
137
|
-
headers: { "Content-Type": "application/json" },
|
|
138
|
-
body: JSON.stringify({ externalChannel, voluteChannel })
|
|
139
|
-
});
|
|
140
|
-
if (!res.ok) {
|
|
141
|
-
const data = await res.json().catch(() => ({}));
|
|
142
|
-
console.error(data.error ?? `Failed to set mapping: ${res.status}`);
|
|
143
|
-
process.exit(1);
|
|
144
|
-
}
|
|
145
|
-
console.log(`Mapped ${platform}:${externalChannel} \u2192 ${voluteChannel}`);
|
|
146
|
-
}
|
|
147
|
-
async function bridgeUnmap(args) {
|
|
148
|
-
const target = args[0];
|
|
149
|
-
if (!target) {
|
|
150
|
-
console.error("Usage: volute chat bridge unmap <platform>:<channel>");
|
|
151
|
-
process.exit(1);
|
|
152
|
-
}
|
|
153
|
-
const colonIdx = target.indexOf(":");
|
|
154
|
-
if (colonIdx < 1) {
|
|
155
|
-
console.error("Target must be in format platform:channel");
|
|
156
|
-
process.exit(1);
|
|
157
|
-
}
|
|
158
|
-
const platform = target.slice(0, colonIdx);
|
|
159
|
-
const externalChannel = target.slice(colonIdx + 1);
|
|
160
|
-
const res = await daemonFetch(
|
|
161
|
-
`/api/bridges/${encodeURIComponent(platform)}/mappings/${encodeURIComponent(externalChannel)}`,
|
|
162
|
-
{ method: "DELETE" }
|
|
163
|
-
);
|
|
164
|
-
if (!res.ok) {
|
|
165
|
-
console.error(`Failed to remove mapping: ${res.status}`);
|
|
166
|
-
process.exit(1);
|
|
167
|
-
}
|
|
168
|
-
console.log(`Removed mapping for ${platform}:${externalChannel}`);
|
|
169
|
-
}
|
|
170
|
-
async function bridgeMappings(args) {
|
|
171
|
-
const platform = args[0];
|
|
172
|
-
if (platform) {
|
|
173
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}/mappings`);
|
|
174
|
-
if (!res.ok) {
|
|
175
|
-
console.error(`Failed to get mappings: ${res.status}`);
|
|
176
|
-
process.exit(1);
|
|
177
|
-
}
|
|
178
|
-
const mappings = await res.json();
|
|
179
|
-
if (Object.keys(mappings).length === 0) {
|
|
180
|
-
console.log(`No mappings for ${platform}.`);
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
for (const [external, volute] of Object.entries(mappings)) {
|
|
184
|
-
console.log(` ${platform}:${external} \u2192 ${volute}`);
|
|
185
|
-
}
|
|
186
|
-
} else {
|
|
187
|
-
const res = await daemonFetch("/api/bridges");
|
|
188
|
-
if (!res.ok) {
|
|
189
|
-
console.error(`Failed to list bridges: ${res.status}`);
|
|
190
|
-
process.exit(1);
|
|
191
|
-
}
|
|
192
|
-
const bridges = await res.json();
|
|
193
|
-
let found = false;
|
|
194
|
-
for (const b of bridges) {
|
|
195
|
-
for (const [external, volute] of Object.entries(b.channelMappings)) {
|
|
196
|
-
console.log(` ${b.platform}:${external} \u2192 ${volute}`);
|
|
197
|
-
found = true;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (!found) {
|
|
201
|
-
console.log("No mappings configured.");
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
export {
|
|
206
|
-
run
|
|
207
|
-
};
|
package/dist/chat-BHYX7DJ4.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-7KJOFUNN.js";
|
|
3
|
-
|
|
4
|
-
// src/commands/chat.ts
|
|
5
|
-
async function run(args) {
|
|
6
|
-
const subcommand = args[0];
|
|
7
|
-
const subArgs = args.slice(1);
|
|
8
|
-
switch (subcommand) {
|
|
9
|
-
case "send":
|
|
10
|
-
await import("./send-7FUUUZZH.js").then((m) => m.run(subArgs));
|
|
11
|
-
break;
|
|
12
|
-
case "list":
|
|
13
|
-
await import("./list-C644WTHV.js").then((m) => m.run(subArgs));
|
|
14
|
-
break;
|
|
15
|
-
case "read":
|
|
16
|
-
await import("./read-H5C26YO7.js").then((m) => m.run(subArgs));
|
|
17
|
-
break;
|
|
18
|
-
case "create":
|
|
19
|
-
await import("./create-3SEKKI6P.js").then((m) => m.run(subArgs));
|
|
20
|
-
break;
|
|
21
|
-
case "bridge":
|
|
22
|
-
await import("./bridge-O753D5F4.js").then((m) => m.run(subArgs));
|
|
23
|
-
break;
|
|
24
|
-
case "files":
|
|
25
|
-
await import("./files-VQV2VZQO.js").then((m) => m.run(subArgs));
|
|
26
|
-
break;
|
|
27
|
-
case "accept":
|
|
28
|
-
await import("./accept-TW6V4WI4.js").then((m) => m.run(subArgs));
|
|
29
|
-
break;
|
|
30
|
-
case "reject":
|
|
31
|
-
await import("./reject-OEANJYIA.js").then((m) => m.run(subArgs));
|
|
32
|
-
break;
|
|
33
|
-
case "--help":
|
|
34
|
-
case "-h":
|
|
35
|
-
case void 0:
|
|
36
|
-
console.log(`volute chat \u2014 conversations, files, and bridges
|
|
37
|
-
|
|
38
|
-
Messages:
|
|
39
|
-
send <target> "<msg>" Send a message (--image, --file)
|
|
40
|
-
list List conversations
|
|
41
|
-
read <conversation> [--limit] Read conversation messages
|
|
42
|
-
create --participants u1,u2 Create a conversation
|
|
43
|
-
|
|
44
|
-
Files:
|
|
45
|
-
files [--mind <name>] List pending incoming files
|
|
46
|
-
accept <id> [--mind] [--dest] Accept a pending file
|
|
47
|
-
reject <id> [--mind] Reject a pending file
|
|
48
|
-
|
|
49
|
-
Bridges:
|
|
50
|
-
bridge add <platform> Set up a bridge
|
|
51
|
-
bridge remove <platform> Remove a bridge
|
|
52
|
-
bridge list Show bridges + status
|
|
53
|
-
bridge map <p>:<ch> <volute> Map external \u2192 Volute channel
|
|
54
|
-
bridge unmap <p>:<ch> Remove mapping
|
|
55
|
-
bridge mappings [<platform>] List mappings
|
|
56
|
-
|
|
57
|
-
Send targets: @mindname for DMs, channel-name for conversations.
|
|
58
|
-
Mind-scoped commands use --mind <name> or VOLUTE_MIND env var.`);
|
|
59
|
-
break;
|
|
60
|
-
default:
|
|
61
|
-
console.error(`Unknown chat subcommand: ${subcommand}
|
|
62
|
-
Run 'volute chat --help' for usage.`);
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
run
|
|
68
|
-
};
|
package/dist/chunk-47XDEWWV.js
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
getServiceMode,
|
|
4
|
-
modeLabel,
|
|
5
|
-
pollHealth,
|
|
6
|
-
startService
|
|
7
|
-
} from "./chunk-7F2SW2KD.js";
|
|
8
|
-
import {
|
|
9
|
-
parseArgs
|
|
10
|
-
} from "./chunk-D424ZQGI.js";
|
|
11
|
-
import {
|
|
12
|
-
readGlobalConfig
|
|
13
|
-
} from "./chunk-6OWJXUAR.js";
|
|
14
|
-
import {
|
|
15
|
-
voluteHome,
|
|
16
|
-
voluteSystemDir
|
|
17
|
-
} from "./chunk-N7BLAHNE.js";
|
|
18
|
-
|
|
19
|
-
// src/commands/up.ts
|
|
20
|
-
import { spawn } from "child_process";
|
|
21
|
-
import { existsSync, mkdirSync, openSync, readFileSync } from "fs";
|
|
22
|
-
import { dirname, resolve } from "path";
|
|
23
|
-
async function run(args) {
|
|
24
|
-
const { flags } = parseArgs(args, {
|
|
25
|
-
port: { type: "number" },
|
|
26
|
-
host: { type: "string" },
|
|
27
|
-
foreground: { type: "boolean" },
|
|
28
|
-
tailscale: { type: "boolean" },
|
|
29
|
-
"no-sandbox": { type: "boolean" }
|
|
30
|
-
});
|
|
31
|
-
const mode = getServiceMode();
|
|
32
|
-
if (!flags.foreground && mode !== "manual") {
|
|
33
|
-
console.log(`Starting volute (${modeLabel(mode)})...`);
|
|
34
|
-
try {
|
|
35
|
-
await startService(mode);
|
|
36
|
-
} catch (err) {
|
|
37
|
-
console.error(`Failed to start service: ${err instanceof Error ? err.message : err}`);
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
const config2 = readGlobalConfig();
|
|
41
|
-
const h = flags.host ?? config2.hostname ?? "127.0.0.1";
|
|
42
|
-
const p = flags.port ?? config2.port ?? 1618;
|
|
43
|
-
if (await pollHealth(h, p)) {
|
|
44
|
-
console.log(`Volute daemon running on ${h}:${p}`);
|
|
45
|
-
} else {
|
|
46
|
-
console.error("Service started but daemon did not become healthy within 30s.");
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const config = readGlobalConfig();
|
|
52
|
-
const port = flags.port ?? config.port ?? 1618;
|
|
53
|
-
const hostname = flags.host ?? config.hostname ?? "127.0.0.1";
|
|
54
|
-
const home = voluteHome();
|
|
55
|
-
const systemDir = voluteSystemDir();
|
|
56
|
-
const pidPath = resolve(systemDir, "daemon.pid");
|
|
57
|
-
if (existsSync(pidPath)) {
|
|
58
|
-
try {
|
|
59
|
-
const pid = parseInt(readFileSync(pidPath, "utf-8").trim(), 10);
|
|
60
|
-
process.kill(pid, 0);
|
|
61
|
-
console.error(`Daemon already running (pid ${pid}). Use 'volute down' first.`);
|
|
62
|
-
process.exit(1);
|
|
63
|
-
} catch {
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const pollHost = hostname === "0.0.0.0" || hostname === "::" ? "localhost" : hostname;
|
|
67
|
-
let tailscaleHostname;
|
|
68
|
-
if (flags.tailscale) {
|
|
69
|
-
try {
|
|
70
|
-
const { execFile } = await import("child_process");
|
|
71
|
-
const { promisify } = await import("util");
|
|
72
|
-
const execFileAsync = promisify(execFile);
|
|
73
|
-
const { stdout } = await execFileAsync("tailscale", ["status", "--json"]);
|
|
74
|
-
const status = JSON.parse(stdout);
|
|
75
|
-
tailscaleHostname = status.Self?.DNSName?.replace(/\.$/, "");
|
|
76
|
-
} catch (err) {
|
|
77
|
-
console.error(`Tailscale setup failed: ${err instanceof Error ? err.message : err}`);
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
const res = await fetch(`http://${pollHost}:${port}/api/health`);
|
|
83
|
-
if (res.ok) {
|
|
84
|
-
const body = await res.json().catch(() => null);
|
|
85
|
-
if (body && body.ok) {
|
|
86
|
-
console.error(
|
|
87
|
-
`Port ${port} is already in use by a Volute daemon. Use 'volute down' first, or kill the process on that port.`
|
|
88
|
-
);
|
|
89
|
-
process.exit(1);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
} catch {
|
|
93
|
-
}
|
|
94
|
-
if (flags["no-sandbox"]) {
|
|
95
|
-
process.env.VOLUTE_SANDBOX = "0";
|
|
96
|
-
}
|
|
97
|
-
if (flags.foreground) {
|
|
98
|
-
const { startDaemon } = await import("./daemon.js");
|
|
99
|
-
await startDaemon({ port, hostname, foreground: true, tailscale: flags.tailscale });
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const daemonModule = resolve(dirname(new URL(import.meta.url).pathname), "daemon.js");
|
|
103
|
-
if (!existsSync(daemonModule)) {
|
|
104
|
-
console.error("Could not find daemon module. Run `npm run build` first.");
|
|
105
|
-
process.exit(1);
|
|
106
|
-
}
|
|
107
|
-
mkdirSync(home, { recursive: true });
|
|
108
|
-
mkdirSync(systemDir, { recursive: true });
|
|
109
|
-
const logFile = resolve(systemDir, "daemon.log");
|
|
110
|
-
const logFd = openSync(logFile, "a");
|
|
111
|
-
const daemonArgs = [daemonModule, "--port", String(port), "--host", hostname];
|
|
112
|
-
if (flags.tailscale) daemonArgs.push("--tailscale");
|
|
113
|
-
if (flags["no-sandbox"]) daemonArgs.push("--no-sandbox");
|
|
114
|
-
const child = spawn(process.execPath, daemonArgs, {
|
|
115
|
-
stdio: ["ignore", "ignore", logFd],
|
|
116
|
-
detached: true
|
|
117
|
-
});
|
|
118
|
-
child.unref();
|
|
119
|
-
const pollPort = flags.tailscale ? port + 1 : port;
|
|
120
|
-
const url = `http://localhost:${pollPort}/api/health`;
|
|
121
|
-
const maxWait = 3e4;
|
|
122
|
-
const start = Date.now();
|
|
123
|
-
while (Date.now() - start < maxWait) {
|
|
124
|
-
try {
|
|
125
|
-
const res = await fetch(url);
|
|
126
|
-
if (res.ok) {
|
|
127
|
-
const displayHost = tailscaleHostname ?? hostname;
|
|
128
|
-
const displayProto = flags.tailscale ? "https" : "http";
|
|
129
|
-
console.log(
|
|
130
|
-
`Volute daemon running on ${displayProto}://${displayHost}:${port} (pid ${child.pid})`
|
|
131
|
-
);
|
|
132
|
-
console.log(`Logs: ${logFile}`);
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
} catch {
|
|
136
|
-
}
|
|
137
|
-
await new Promise((r) => setTimeout(r, 500));
|
|
138
|
-
}
|
|
139
|
-
if (child.pid) {
|
|
140
|
-
try {
|
|
141
|
-
process.kill(-child.pid, "SIGTERM");
|
|
142
|
-
} catch {
|
|
143
|
-
try {
|
|
144
|
-
process.kill(child.pid, "SIGTERM");
|
|
145
|
-
} catch {
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
console.error("Daemon started but did not become healthy within 30s.");
|
|
150
|
-
console.error(`Check logs: ${logFile}`);
|
|
151
|
-
process.exit(1);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
run
|
|
156
|
-
};
|