volute 0.7.0 → 0.8.1
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 +16 -14
- package/dist/{agent-7JF7MT73.js → agent-YORVRB6I.js} +10 -10
- package/dist/{agent-manager-IMZ7ZMBF.js → agent-manager-CMMH5KQQ.js} +4 -4
- package/dist/{channel-SMCNOIVQ.js → channel-RDGHBFSI.js} +16 -56
- package/dist/{chunk-JR4UXCTO.js → chunk-23L3MKEV.js} +1 -1
- package/dist/{chunk-5SKQ6J7T.js → chunk-5C5JWR2L.js} +15 -7
- package/dist/{chunk-UWHWAPGO.js → chunk-DP2DX4WV.js} +9 -1
- package/dist/{chunk-7ACDT3P2.js → chunk-ECPQXRLB.js} +1 -2
- package/dist/{chunk-LLJNZPCU.js → chunk-HZ5LTOEJ.js} +1 -1
- package/dist/{chunk-W76KWE23.js → chunk-IQXBMFZG.js} +6 -4
- package/dist/{chunk-ZZOOTYXK.js → chunk-LIPPXNIE.js} +60 -74
- package/dist/{chunk-BX7KI4S3.js → chunk-N6MLQ26B.js} +23 -96
- package/dist/{chunk-H7AMDUIA.js → chunk-QF22MYDJ.js} +6 -5
- package/dist/{chunk-NKXULRSW.js → chunk-RT6Y7AR3.js} +1 -1
- package/dist/{chunk-62X577Y7.js → chunk-W6TMWYU3.js} +126 -73
- package/dist/{chunk-EG45HBSJ.js → chunk-XSJ27WEM.js} +1 -1
- package/dist/cli.js +22 -20
- package/dist/{connector-Y7JPNROO.js → connector-ZP6MEFF4.js} +3 -3
- package/dist/connectors/discord.js +18 -59
- package/dist/connectors/slack.js +21 -38
- package/dist/connectors/telegram.js +31 -49
- package/dist/{create-G525LWEA.js → create-HGJHLABX.js} +22 -17
- package/dist/{daemon-client-442IV43D.js → daemon-client-54J3EIZD.js} +2 -2
- package/dist/{daemon-restart-4HVEKYFY.js → daemon-restart-CPBLMMRI.js} +3 -3
- package/dist/daemon.js +342 -402
- package/dist/{delete-UOU4AFQN.js → delete-45TGQC4N.js} +10 -5
- package/dist/{down-AZVH5TCD.js → down-O4EWZTVA.js} +2 -2
- package/dist/{env-7GLUJCWS.js → env-KMNYGVZ2.js} +7 -9
- package/dist/{history-H72ZUIBN.js → history-PXJVYLVY.js} +2 -2
- package/dist/{import-AVKQJDYC.js → import-CNEDF3TD.js} +6 -6
- package/dist/{logs-EDGK26AK.js → logs-TZB3MTLZ.js} +5 -4
- package/dist/{package-T2WAVJOU.js → package-RJSONENE.js} +1 -1
- package/dist/{restart-O4ETYLJF.js → restart-KVH3TK5N.js} +2 -2
- package/dist/{schedule-S6QVC5ON.js → schedule-HCUCBNQI.js} +2 -2
- package/dist/send-BNC2S5BY.js +162 -0
- package/dist/{service-HZNIDNJF.js → service-XCADRKIS.js} +8 -1
- package/dist/{setup-F4TCWVSP.js → setup-32KH5KLN.js} +85 -26
- package/dist/{start-VHQ7LNWM.js → start-QU73YTJW.js} +2 -2
- package/dist/{status-QAJWXKMZ.js → status-Q6ZQJXNI.js} +2 -2
- package/dist/{stop-CAGCT5NI.js → stop-N7U5N6A7.js} +2 -2
- package/dist/{up-RWZF6MLT.js → up-V6EAA7OZ.js} +2 -2
- package/dist/{update-F7QWV2LB.js → update-EUCZ7XGG.js} +3 -3
- package/dist/{update-check-B4J6IEQ4.js → update-check-SM4244SU.js} +2 -2
- package/dist/{upgrade-YXKPWDRU.js → upgrade-CZF6PN7Y.js} +4 -4
- package/dist/{variant-4Z6W3PP6.js → variant-RKXPN5DH.js} +20 -46
- package/dist/web-assets/assets/index-D-3zx6vs.js +307 -0
- package/dist/web-assets/index.html +1 -1
- package/drizzle/0004_magical_silverclaw.sql +1 -0
- package/drizzle/meta/0004_snapshot.json +410 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/templates/_base/_skills/volute-agent/SKILL.md +32 -16
- package/templates/_base/home/.config/routes.json +4 -8
- package/templates/_base/home/VOLUTE.md +16 -14
- package/templates/_base/src/lib/auto-reply.ts +38 -0
- package/templates/_base/src/lib/daemon-client.ts +53 -0
- package/templates/_base/src/lib/router.ts +66 -14
- package/templates/_base/src/lib/routing.ts +48 -9
- package/templates/_base/src/lib/startup.ts +1 -25
- package/templates/_base/src/lib/types.ts +2 -1
- package/templates/_base/src/lib/volute-server.ts +29 -14
- package/templates/agent-sdk/src/agent.ts +53 -111
- package/templates/agent-sdk/src/lib/content.ts +41 -0
- package/templates/agent-sdk/src/lib/session-store.ts +43 -0
- package/templates/agent-sdk/src/lib/stream-consumer.ts +66 -0
- package/templates/agent-sdk/src/server.ts +5 -13
- package/templates/pi/.init/AGENTS.md +5 -5
- package/templates/pi/src/agent.ts +32 -84
- package/templates/pi/src/lib/content.ts +15 -0
- package/templates/pi/src/lib/event-handler.ts +74 -0
- package/templates/pi/src/lib/resolve-model.ts +21 -0
- package/templates/pi/src/server.ts +3 -7
- package/dist/chunk-B3R6L2GW.js +0 -24
- package/dist/chunk-ZYGKG6VC.js +0 -22
- package/dist/message-SCOQDR3P.js +0 -32
- package/dist/send-G7PE4DOJ.js +0 -72
- package/dist/web-assets/assets/index-B1CqjUYD.js +0 -308
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
exec,
|
|
15
15
|
execInherit
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5C5JWR2L.js";
|
|
17
17
|
import {
|
|
18
18
|
daemonFetch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-23L3MKEV.js";
|
|
20
20
|
import {
|
|
21
21
|
addVariant,
|
|
22
22
|
nextPort,
|
|
23
23
|
resolveAgent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DP2DX4WV.js";
|
|
25
25
|
import "./chunk-K3NQKI34.js";
|
|
26
26
|
|
|
27
27
|
// src/commands/upgrade.ts
|
|
@@ -215,7 +215,7 @@ Upgrade variant running on port ${variantPort}`);
|
|
|
215
215
|
console.log(`
|
|
216
216
|
Next steps:`);
|
|
217
217
|
console.log(
|
|
218
|
-
` volute
|
|
218
|
+
` volute send @${agentName}@${VARIANT_NAME} "hello" # chat with upgraded variant`
|
|
219
219
|
);
|
|
220
220
|
console.log(` volute variant merge ${VARIANT_NAME} # merge back when satisfied`);
|
|
221
221
|
}
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
exec,
|
|
10
10
|
execInherit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5C5JWR2L.js";
|
|
12
12
|
import {
|
|
13
13
|
daemonFetch
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-23L3MKEV.js";
|
|
15
15
|
import {
|
|
16
16
|
addVariant,
|
|
17
17
|
checkHealth,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveAgent,
|
|
23
23
|
validateBranchName,
|
|
24
24
|
writeVariants
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DP2DX4WV.js";
|
|
26
26
|
import "./chunk-K3NQKI34.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/variant.ts
|
|
@@ -38,7 +38,7 @@ function tsxBin(cwd) {
|
|
|
38
38
|
}
|
|
39
39
|
function spawnServer(cwd, port, options) {
|
|
40
40
|
if (options?.detached) {
|
|
41
|
-
return spawnDetached(cwd, port);
|
|
41
|
+
return spawnDetached(cwd, port, options.logDir);
|
|
42
42
|
}
|
|
43
43
|
return spawnAttached(cwd, port);
|
|
44
44
|
}
|
|
@@ -68,8 +68,8 @@ function spawnAttached(cwd, port) {
|
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
function spawnDetached(cwd, port) {
|
|
72
|
-
const logsDir = resolve(cwd, ".volute", "logs");
|
|
71
|
+
function spawnDetached(cwd, port, logDir) {
|
|
72
|
+
const logsDir = logDir ?? resolve(cwd, ".volute", "logs");
|
|
73
73
|
mkdirSync(logsDir, { recursive: true });
|
|
74
74
|
const logPath = resolve(logsDir, "agent.log");
|
|
75
75
|
const logFd = openSync(logPath, "a");
|
|
@@ -123,40 +123,16 @@ async function verify(port) {
|
|
|
123
123
|
}),
|
|
124
124
|
signal: AbortSignal.timeout(6e4)
|
|
125
125
|
});
|
|
126
|
-
if (!res.ok
|
|
126
|
+
if (!res.ok) {
|
|
127
127
|
console.error(" Test message: failed to send");
|
|
128
128
|
return false;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
let buffer = "";
|
|
133
|
-
let gotDone = false;
|
|
134
|
-
while (true) {
|
|
135
|
-
const { done, value } = await reader.read();
|
|
136
|
-
if (done) break;
|
|
137
|
-
buffer += decoder.decode(value, { stream: true });
|
|
138
|
-
const lines = buffer.split("\n");
|
|
139
|
-
buffer = lines.pop() || "";
|
|
140
|
-
for (const line of lines) {
|
|
141
|
-
if (!line.trim()) continue;
|
|
142
|
-
try {
|
|
143
|
-
const event = JSON.parse(line);
|
|
144
|
-
if (event.type === "done") {
|
|
145
|
-
gotDone = true;
|
|
146
|
-
}
|
|
147
|
-
} catch {
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
if (gotDone) {
|
|
151
|
-
reader.cancel();
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (gotDone) {
|
|
130
|
+
const result = await res.json();
|
|
131
|
+
if (result.ok) {
|
|
156
132
|
console.log(" Test message: OK");
|
|
157
133
|
return true;
|
|
158
134
|
} else {
|
|
159
|
-
console.error(" Test message:
|
|
135
|
+
console.error(" Test message: unexpected response");
|
|
160
136
|
return false;
|
|
161
137
|
}
|
|
162
138
|
} catch (e) {
|
|
@@ -435,22 +411,20 @@ async function mergeVariant(args) {
|
|
|
435
411
|
console.error("npm install failed:", e);
|
|
436
412
|
}
|
|
437
413
|
console.log(`Variant ${variantName} merged and cleaned up.`);
|
|
438
|
-
const voluteDir = resolve2(projectRoot, ".volute");
|
|
439
|
-
if (!existsSync(voluteDir)) mkdirSync2(voluteDir, { recursive: true });
|
|
440
|
-
writeFileSync(
|
|
441
|
-
resolve2(voluteDir, "merged.json"),
|
|
442
|
-
JSON.stringify({
|
|
443
|
-
name: variantName,
|
|
444
|
-
...flags.summary && { summary: flags.summary },
|
|
445
|
-
...flags.justification && { justification: flags.justification },
|
|
446
|
-
...flags.memory && { memory: flags.memory }
|
|
447
|
-
})
|
|
448
|
-
);
|
|
449
414
|
if (process.env.VOLUTE_SUPERVISOR) return;
|
|
415
|
+
const context = {
|
|
416
|
+
type: "merged",
|
|
417
|
+
name: variantName,
|
|
418
|
+
...flags.summary && { summary: flags.summary },
|
|
419
|
+
...flags.justification && { justification: flags.justification },
|
|
420
|
+
...flags.memory && { memory: flags.memory }
|
|
421
|
+
};
|
|
450
422
|
try {
|
|
451
423
|
console.log("Restarting agent via daemon...");
|
|
452
424
|
const res = await daemonFetch(`/api/agents/${encodeURIComponent(agentName)}/restart`, {
|
|
453
|
-
method: "POST"
|
|
425
|
+
method: "POST",
|
|
426
|
+
headers: { "Content-Type": "application/json" },
|
|
427
|
+
body: JSON.stringify({ context })
|
|
454
428
|
});
|
|
455
429
|
if (res.ok) {
|
|
456
430
|
console.log(`${agentName} restarted.`);
|