volute 0.23.0 → 0.24.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 +5 -5
- package/dist/{activity-events-3WHHCOBB.js → activity-events-4O37J7PD.js} +2 -2
- package/dist/api.d.ts +306 -15
- package/dist/{channel-BOOMFULW.js → channel-HZOSHGNF.js} +1 -1
- package/dist/{chunk-QIXPN3OO.js → chunk-2767L2RZ.js} +5 -5
- package/dist/{chunk-SGPEZ32F.js → chunk-33XAVCS4.js} +16 -0
- package/dist/{chunk-VT5QODNE.js → chunk-3AIBT4TW.js} +4 -3
- package/dist/{chunk-RK627D57.js → chunk-4TJ72QQ3.js} +2 -2
- package/dist/{chunk-A4S7H6G6.js → chunk-BFK6SOEJ.js} +1 -1
- package/dist/{chunk-HGCDWKSP.js → chunk-E7GOKNOT.js} +1 -1
- package/dist/{chunk-M5CNKH4J.js → chunk-NOBRGACV.js} +7 -7
- package/dist/{chunk-ISWZ6QUK.js → chunk-OOW675I3.js} +778 -108
- package/dist/{chunk-TFS25FIM.js → chunk-P3W36ZGD.js} +1 -1
- package/dist/{chunk-JG4CCJOA.js → chunk-TQDITGES.js} +33 -15
- package/dist/{chunk-KFI7TQJ6.js → chunk-TRQEV3CD.js} +9 -5
- package/dist/cli.js +18 -18
- package/dist/{cloud-sync-PI47U2LT.js → cloud-sync-DIU3OCPV.js} +6 -8
- package/dist/{connector-PYT5UOTZ.js → connector-M6XFI6GM.js} +1 -1
- package/dist/{create-WIDA3M4C.js → create-VDQJER52.js} +1 -1
- package/dist/{daemon-client-ZHCDL4RS.js → daemon-client-JOVQZ52X.js} +1 -1
- package/dist/{daemon-restart-RMGOOGPE.js → daemon-restart-YMPEATQH.js} +5 -5
- package/dist/daemon.js +665 -813
- package/dist/{delete-LOIANQGD.js → delete-2MRR4JX5.js} +1 -1
- package/dist/{down-WSUASL5E.js → down-674SX2IZ.js} +2 -2
- package/dist/{env-4PHIHTF4.js → env-2FPOZK37.js} +1 -1
- package/dist/{export-XD6PJBQP.js → export-IKFAPRAO.js} +1 -1
- package/dist/{file-X4L5TTOL.js → file-KT3UIQM3.js} +1 -1
- package/dist/{history-HTEKRNID.js → history-46WZN5CN.js} +1 -1
- package/dist/{import-EAXTHHXL.js → import-FRDPQPJ2.js} +1 -1
- package/dist/{log-SRO5Q6AD.js → log-6SGSSR3D.js} +1 -1
- package/dist/{logs-HNTNNBDW.js → logs-HRBONI5I.js} +1 -1
- package/dist/{merge-B6SYTGI7.js → merge-KSFJKX6T.js} +1 -1
- package/dist/{message-delivery-FHV4NO2F.js → message-delivery-S7BCNV6Y.js} +5 -5
- package/dist/{mind-BTXR5B3C.js → mind-KPLCRKQA.js} +17 -17
- package/dist/{mind-activity-tracker-PGC3DBJ7.js → mind-activity-tracker-NMDDEV3K.js} +3 -3
- package/dist/{mind-manager-KMY4GA2J.js → mind-manager-ZNRIYEK3.js} +2 -2
- package/dist/{mind-sleep-FWRBIFBS.js → mind-sleep-GHPTSAYN.js} +1 -1
- package/dist/{mind-wake-LJK2YU5X.js → mind-wake-BJDJFMDF.js} +1 -1
- package/dist/{package-CUBJ4PKS.js → package-S5YF25XV.js} +1 -1
- package/dist/{pull-GRQAXM2E.js → pull-D32SPFVU.js} +1 -1
- package/dist/{restart-CIDAKGG2.js → restart-5BMNV7KU.js} +1 -1
- package/dist/{schedule-NLR3LZLY.js → schedule-YEFDLVMJ.js} +1 -1
- package/dist/{seed-3H2MRREW.js → seed-6FEKB3YC.js} +1 -1
- package/dist/{send-RP2TA7SG.js → send-IISDYFCL.js} +1 -1
- package/dist/{service-7BFXDI6J.js → service-FASYWLTC.js} +3 -3
- package/dist/{setup-SSIIXQMI.js → setup-BMLM2UTK.js} +1 -1
- package/dist/{shared-2OGT3NSL.js → shared-LWMNTTZN.js} +4 -4
- package/dist/{skill-Q2Y6PQ3L.js → skill-BQOFACEI.js} +1 -1
- package/dist/skills/volute-mind/SKILL.md +71 -1
- package/dist/{sleep-manager-2TMQ65E4.js → sleep-manager-XXSWQQLE.js} +5 -5
- package/dist/{sprout-UKCYBGHK.js → sprout-CGSW4CF5.js} +3 -3
- package/dist/{start-JR6CUUWF.js → start-C7XITZ5O.js} +1 -1
- package/dist/{status-5XDGYHKP.js → status-LYS4NUOZ.js} +1 -1
- package/dist/{status-H2MKDN6L.js → status-SIRPLEZC.js} +4 -3
- package/dist/{stop-VKPGK25U.js → stop-CVKBSLXY.js} +1 -1
- package/dist/tailscale-AJ4VL5XK.js +49 -0
- package/dist/{up-Z5JRG2M2.js → up-OMHACRJL.js} +2 -2
- package/dist/{update-ELC6MEUT.js → update-7XCZMYBT.js} +7 -7
- package/dist/{upgrade-GXW2EQY3.js → upgrade-7RUIXGOO.js} +1 -1
- package/dist/{variant-A4I7PHXS.js → variant-UGREB4G5.js} +4 -4
- package/dist/{version-notify-LKABEJSA.js → version-notify-SZ75QRGO.js} +5 -5
- package/dist/web-assets/assets/index-Bx9WDoaQ.js +69 -0
- package/dist/web-assets/assets/index-Clz8OhmJ.css +1 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0013_user_profiles.sql +3 -0
- package/drizzle/0014_conversation_reads.sql +7 -0
- package/drizzle/meta/0013_snapshot.json +7 -0
- package/drizzle/meta/_journal.json +14 -0
- package/package.json +1 -1
- package/templates/_base/src/lib/format-prefix.ts +18 -2
- package/templates/_base/src/lib/routing.ts +2 -1
- package/templates/_base/src/lib/types.ts +8 -0
- package/dist/chunk-G5KRTU2F.js +0 -76
- package/dist/web-assets/assets/index-CZ26vsyY.js +0 -69
- package/dist/web-assets/assets/index-DyyAvJwW.css +0 -1
- /package/dist/{pages-YSTRWJR4.js → pages-TWR6U7DS.js} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
modeLabel,
|
|
5
5
|
pollHealth,
|
|
6
6
|
startService
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3AIBT4TW.js";
|
|
8
8
|
import {
|
|
9
9
|
parseArgs
|
|
10
10
|
} from "./chunk-D424ZQGI.js";
|
|
@@ -30,7 +30,8 @@ async function run(args) {
|
|
|
30
30
|
const { flags } = parseArgs(args, {
|
|
31
31
|
port: { type: "number" },
|
|
32
32
|
host: { type: "string" },
|
|
33
|
-
foreground: { type: "boolean" }
|
|
33
|
+
foreground: { type: "boolean" },
|
|
34
|
+
tailscale: { type: "boolean" }
|
|
34
35
|
});
|
|
35
36
|
const mode = getServiceMode();
|
|
36
37
|
if (!flags.foreground && mode !== "manual") {
|
|
@@ -43,7 +44,7 @@ async function run(args) {
|
|
|
43
44
|
}
|
|
44
45
|
const config2 = readGlobalConfig();
|
|
45
46
|
const h = flags.host ?? config2.hostname ?? "127.0.0.1";
|
|
46
|
-
const p = flags.port ?? config2.port ??
|
|
47
|
+
const p = flags.port ?? config2.port ?? 1618;
|
|
47
48
|
if (await pollHealth(h, p)) {
|
|
48
49
|
console.log(`Volute daemon running on ${h}:${p}`);
|
|
49
50
|
} else {
|
|
@@ -53,7 +54,7 @@ async function run(args) {
|
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
56
|
const config = readGlobalConfig();
|
|
56
|
-
const port = flags.port ?? config.port ??
|
|
57
|
+
const port = flags.port ?? config.port ?? 1618;
|
|
57
58
|
const hostname = flags.host ?? config.hostname ?? "127.0.0.1";
|
|
58
59
|
const home = voluteHome();
|
|
59
60
|
const pidPath = resolve(home, "daemon.pid");
|
|
@@ -67,6 +68,20 @@ async function run(args) {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
const pollHost = hostname === "0.0.0.0" || hostname === "::" ? "localhost" : hostname;
|
|
71
|
+
let tailscaleHostname;
|
|
72
|
+
if (flags.tailscale) {
|
|
73
|
+
try {
|
|
74
|
+
const { execFile } = await import("child_process");
|
|
75
|
+
const { promisify } = await import("util");
|
|
76
|
+
const execFileAsync = promisify(execFile);
|
|
77
|
+
const { stdout } = await execFileAsync("tailscale", ["status", "--json"]);
|
|
78
|
+
const status = JSON.parse(stdout);
|
|
79
|
+
tailscaleHostname = status.Self?.DNSName?.replace(/\.$/, "");
|
|
80
|
+
} catch (err) {
|
|
81
|
+
console.error(`Tailscale setup failed: ${err instanceof Error ? err.message : err}`);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
70
85
|
try {
|
|
71
86
|
const res = await fetch(`http://${pollHost}:${port}/api/health`);
|
|
72
87
|
if (res.ok) {
|
|
@@ -82,7 +97,7 @@ async function run(args) {
|
|
|
82
97
|
}
|
|
83
98
|
if (flags.foreground) {
|
|
84
99
|
const { startDaemon } = await import("./daemon.js");
|
|
85
|
-
await startDaemon({ port, hostname, foreground: true });
|
|
100
|
+
await startDaemon({ port, hostname, foreground: true, tailscale: flags.tailscale });
|
|
86
101
|
return;
|
|
87
102
|
}
|
|
88
103
|
const daemonModule = resolve(dirname(new URL(import.meta.url).pathname), "daemon.js");
|
|
@@ -93,23 +108,26 @@ async function run(args) {
|
|
|
93
108
|
mkdirSync(home, { recursive: true });
|
|
94
109
|
const logFile = resolve(home, "daemon.log");
|
|
95
110
|
const logFd = openSync(logFile, "a");
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
);
|
|
111
|
+
const daemonArgs = [daemonModule, "--port", String(port), "--host", hostname];
|
|
112
|
+
if (flags.tailscale) daemonArgs.push("--tailscale");
|
|
113
|
+
const child = spawn(process.execPath, daemonArgs, {
|
|
114
|
+
stdio: ["ignore", "ignore", logFd],
|
|
115
|
+
detached: true
|
|
116
|
+
});
|
|
104
117
|
child.unref();
|
|
105
|
-
const
|
|
118
|
+
const pollPort = flags.tailscale ? port + 1 : port;
|
|
119
|
+
const url = `http://localhost:${pollPort}/api/health`;
|
|
106
120
|
const maxWait = 3e4;
|
|
107
121
|
const start = Date.now();
|
|
108
122
|
while (Date.now() - start < maxWait) {
|
|
109
123
|
try {
|
|
110
124
|
const res = await fetch(url);
|
|
111
125
|
if (res.ok) {
|
|
112
|
-
|
|
126
|
+
const displayHost = tailscaleHostname ?? hostname;
|
|
127
|
+
const displayProto = flags.tailscale ? "https" : "http";
|
|
128
|
+
console.log(
|
|
129
|
+
`Volute daemon running on ${displayProto}://${displayHost}:${port} (pid ${child.pid})`
|
|
130
|
+
);
|
|
113
131
|
console.log(`Logs: ${logFile}`);
|
|
114
132
|
return;
|
|
115
133
|
}
|
|
@@ -32,11 +32,15 @@ function readDaemonConfig() {
|
|
|
32
32
|
}
|
|
33
33
|
function buildUrl(config) {
|
|
34
34
|
const url = new URL("http://localhost");
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
url.port = String(config.internalPort ?? config.port);
|
|
36
|
+
if (config.internalPort) {
|
|
37
|
+
url.hostname = "127.0.0.1";
|
|
38
|
+
} else {
|
|
39
|
+
let hostname = config.hostname || "localhost";
|
|
40
|
+
if (hostname === "0.0.0.0") hostname = "127.0.0.1";
|
|
41
|
+
if (hostname === "::") hostname = "[::1]";
|
|
42
|
+
url.hostname = hostname;
|
|
43
|
+
}
|
|
40
44
|
return url.origin;
|
|
41
45
|
}
|
|
42
46
|
async function daemonFetch(path, options) {
|
package/dist/cli.js
CHANGED
|
@@ -9,61 +9,61 @@ if (!process.env.VOLUTE_HOME) {
|
|
|
9
9
|
var command = process.argv[2];
|
|
10
10
|
var args = process.argv.slice(3);
|
|
11
11
|
if (command === "--version" || command === "-v") {
|
|
12
|
-
const { default: pkg } = await import("./package-
|
|
12
|
+
const { default: pkg } = await import("./package-S5YF25XV.js");
|
|
13
13
|
console.log(pkg.version);
|
|
14
14
|
process.exit(0);
|
|
15
15
|
}
|
|
16
16
|
switch (command) {
|
|
17
17
|
case "mind":
|
|
18
|
-
await import("./mind-
|
|
18
|
+
await import("./mind-KPLCRKQA.js").then((m) => m.run(args));
|
|
19
19
|
break;
|
|
20
20
|
case "send":
|
|
21
|
-
await import("./send-
|
|
21
|
+
await import("./send-IISDYFCL.js").then((m) => m.run(args));
|
|
22
22
|
break;
|
|
23
23
|
case "history":
|
|
24
|
-
await import("./history-
|
|
24
|
+
await import("./history-46WZN5CN.js").then((m) => m.run(args));
|
|
25
25
|
break;
|
|
26
26
|
case "variant":
|
|
27
|
-
await import("./variant-
|
|
27
|
+
await import("./variant-UGREB4G5.js").then((m) => m.run(args));
|
|
28
28
|
break;
|
|
29
29
|
case "channel":
|
|
30
|
-
await import("./channel-
|
|
30
|
+
await import("./channel-HZOSHGNF.js").then((m) => m.run(args));
|
|
31
31
|
break;
|
|
32
32
|
case "schedule":
|
|
33
|
-
await import("./schedule-
|
|
33
|
+
await import("./schedule-YEFDLVMJ.js").then((m) => m.run(args));
|
|
34
34
|
break;
|
|
35
35
|
case "skill":
|
|
36
|
-
await import("./skill-
|
|
36
|
+
await import("./skill-BQOFACEI.js").then((m) => m.run(args));
|
|
37
37
|
break;
|
|
38
38
|
case "shared":
|
|
39
|
-
await import("./shared-
|
|
39
|
+
await import("./shared-LWMNTTZN.js").then((m) => m.run(args));
|
|
40
40
|
break;
|
|
41
41
|
case "file":
|
|
42
|
-
await import("./file-
|
|
42
|
+
await import("./file-KT3UIQM3.js").then((m) => m.run(args));
|
|
43
43
|
break;
|
|
44
44
|
case "env":
|
|
45
|
-
await import("./env-
|
|
45
|
+
await import("./env-2FPOZK37.js").then((m) => m.run(args));
|
|
46
46
|
break;
|
|
47
47
|
case "up":
|
|
48
|
-
await import("./up-
|
|
48
|
+
await import("./up-OMHACRJL.js").then((m) => m.run(args));
|
|
49
49
|
break;
|
|
50
50
|
case "down":
|
|
51
|
-
await import("./down-
|
|
51
|
+
await import("./down-674SX2IZ.js").then((m) => m.run(args));
|
|
52
52
|
break;
|
|
53
53
|
case "restart":
|
|
54
|
-
await import("./daemon-restart-
|
|
54
|
+
await import("./daemon-restart-YMPEATQH.js").then((m) => m.run(args));
|
|
55
55
|
break;
|
|
56
56
|
case "service":
|
|
57
|
-
await import("./service-
|
|
57
|
+
await import("./service-FASYWLTC.js").then((m) => m.run(args));
|
|
58
58
|
break;
|
|
59
59
|
case "update":
|
|
60
|
-
await import("./update-
|
|
60
|
+
await import("./update-7XCZMYBT.js").then((m) => m.run(args));
|
|
61
61
|
break;
|
|
62
62
|
case "status":
|
|
63
|
-
await import("./status-
|
|
63
|
+
await import("./status-SIRPLEZC.js").then((m) => m.run(args));
|
|
64
64
|
break;
|
|
65
65
|
case "pages":
|
|
66
|
-
await import("./pages-
|
|
66
|
+
await import("./pages-TWR6U7DS.js").then((m) => m.run(args));
|
|
67
67
|
break;
|
|
68
68
|
case "auth":
|
|
69
69
|
await import("./auth-HM2RSPY7.js").then((m) => m.run(args));
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
deliverMessage,
|
|
3
4
|
getAuthHeaders,
|
|
4
5
|
getWebhookUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
deliverMessage
|
|
8
|
-
} from "./chunk-ISWZ6QUK.js";
|
|
6
|
+
} from "./chunk-OOW675I3.js";
|
|
9
7
|
import "./chunk-HFCBO2GL.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-E7GOKNOT.js";
|
|
9
|
+
import "./chunk-BFK6SOEJ.js";
|
|
10
|
+
import "./chunk-NOBRGACV.js";
|
|
13
11
|
import "./chunk-XLC342FO.js";
|
|
14
12
|
import "./chunk-PHU4DEAJ.js";
|
|
15
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-33XAVCS4.js";
|
|
16
14
|
import {
|
|
17
15
|
logger_default
|
|
18
16
|
} from "./chunk-YUIHSKR6.js";
|
|
@@ -17,7 +17,7 @@ async function run(args) {
|
|
|
17
17
|
process.exit(1);
|
|
18
18
|
}
|
|
19
19
|
const skills = flags.skills === "none" ? [] : flags.skills ? flags.skills.split(",") : void 0;
|
|
20
|
-
const { daemonFetch } = await import("./daemon-client-
|
|
20
|
+
const { daemonFetch } = await import("./daemon-client-JOVQZ52X.js");
|
|
21
21
|
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
22
22
|
const client = getClient();
|
|
23
23
|
const res = await daemonFetch(urlOf(client.api.minds.$url()), {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
run
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TQDITGES.js";
|
|
5
5
|
import {
|
|
6
6
|
stopDaemon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2767L2RZ.js";
|
|
8
8
|
import {
|
|
9
9
|
getServiceMode,
|
|
10
10
|
modeLabel,
|
|
11
11
|
pollHealth,
|
|
12
12
|
readDaemonConfig,
|
|
13
13
|
restartService
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3AIBT4TW.js";
|
|
15
15
|
import "./chunk-D424ZQGI.js";
|
|
16
16
|
import "./chunk-JTDFJWI2.js";
|
|
17
17
|
import "./chunk-NWPT4ASZ.js";
|
|
@@ -29,8 +29,8 @@ async function run2(args) {
|
|
|
29
29
|
console.error(`Failed to restart service: ${err instanceof Error ? err.message : err}`);
|
|
30
30
|
process.exit(1);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
if (await pollHealth(
|
|
32
|
+
const config = readDaemonConfig();
|
|
33
|
+
if (await pollHealth("127.0.0.1", config.internalPort ?? config.port)) {
|
|
34
34
|
console.log("Daemon restarted.");
|
|
35
35
|
} else {
|
|
36
36
|
console.error("Service restarted but daemon did not become healthy within 30s.");
|