volute 0.5.0 → 0.7.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/dist/{agent-Z2B6EFEQ.js → agent-7JF7MT73.js} +13 -9
- package/dist/{agent-manager-PXBKA2GK.js → agent-manager-IMZ7ZMBF.js} +4 -4
- package/dist/channel-SMCNOIVQ.js +262 -0
- package/dist/{chunk-MW2KFO3B.js → chunk-62X577Y7.js} +10 -8
- package/dist/chunk-7ACDT3P2.js +265 -0
- package/dist/{chunk-MXUCNIBG.js → chunk-BX7KI4S3.js} +68 -3
- package/dist/{up-7ILD7GU7.js → chunk-EG45HBSJ.js} +16 -4
- package/dist/{chunk-HE67X4T6.js → chunk-H7AMDUIA.js} +1 -1
- package/dist/{chunk-7L4AN5D4.js → chunk-JR4UXCTO.js} +1 -1
- package/dist/{down-O7IFZLVJ.js → chunk-LLJNZPCU.js} +48 -13
- package/dist/{chunk-5X7HGB6L.js → chunk-NKXULRSW.js} +2 -1
- package/dist/{chunk-UX25Z2ND.js → chunk-UWHWAPGO.js} +7 -0
- package/dist/{chunk-UAVD2AHX.js → chunk-W76KWE23.js} +1 -1
- package/dist/chunk-ZZOOTYXK.js +583 -0
- package/dist/cli.js +22 -21
- package/dist/{connector-LYEMXQEV.js → connector-Y7JPNROO.js} +3 -3
- package/dist/connectors/discord.js +38 -7
- package/dist/connectors/slack.js +22 -3
- package/dist/connectors/telegram.js +34 -4
- package/dist/{create-RVCZN6HE.js → create-G525LWEA.js} +2 -2
- package/dist/{daemon-client-ZY6UUN2M.js → daemon-client-442IV43D.js} +2 -2
- package/dist/daemon-restart-4HVEKYFY.js +23 -0
- package/dist/daemon.js +1042 -809
- package/dist/{delete-3QH7VYIN.js → delete-UOU4AFQN.js} +7 -3
- package/dist/down-AZVH5TCD.js +11 -0
- package/dist/{env-4D4REPJF.js → env-7GLUJCWS.js} +2 -2
- package/dist/{history-OEONB53Z.js → history-H72ZUIBN.js} +2 -2
- package/dist/{import-MXJB2EII.js → import-AVKQJDYC.js} +2 -2
- package/dist/{logs-DF342W4M.js → logs-EDGK26AK.js} +1 -1
- package/dist/{message-ADHWFHSI.js → message-SCOQDR3P.js} +2 -2
- package/dist/{package-VQOE7JNH.js → package-T2WAVJOU.js} +1 -1
- package/dist/restart-O4ETYLJF.js +29 -0
- package/dist/{schedule-NAG6F463.js → schedule-S6QVC5ON.js} +2 -2
- package/dist/send-G7PE4DOJ.js +72 -0
- package/dist/{setup-RPRRGG2F.js → setup-F4TCWVSP.js} +2 -2
- package/dist/{start-TUOXDSFL.js → start-VHQ7LNWM.js} +2 -2
- package/dist/{status-A36EHRO4.js → status-QAJWXKMZ.js} +2 -2
- package/dist/{stop-AOJZLQ5X.js → stop-CAGCT5NI.js} +2 -2
- package/dist/up-RWZF6MLT.js +12 -0
- package/dist/{update-LPSIAWQ2.js → update-F7QWV2LB.js} +2 -2
- package/dist/{update-check-Y33QDCFL.js → update-check-B4J6IEQ4.js} +2 -2
- package/dist/{upgrade-FX2TKJ2S.js → upgrade-YXKPWDRU.js} +2 -2
- package/dist/{variant-LAB67OC2.js → variant-4Z6W3PP6.js} +2 -2
- package/dist/web-assets/assets/index-B1CqjUYD.js +308 -0
- package/dist/web-assets/index.html +1 -1
- package/package.json +1 -1
- package/templates/_base/.init/.config/scripts/session-reader.ts +59 -0
- package/templates/_base/_skills/sessions/SKILL.md +49 -0
- package/templates/_base/_skills/volute-agent/SKILL.md +13 -9
- package/templates/_base/src/lib/format-prefix.ts +6 -0
- package/templates/_base/src/lib/router.ts +30 -3
- package/templates/_base/src/lib/session-monitor.ts +400 -0
- package/templates/_base/src/lib/types.ts +2 -0
- package/templates/agent-sdk/src/agent.ts +16 -0
- package/templates/agent-sdk/src/lib/hooks/session-context.ts +32 -0
- package/templates/pi/src/agent.ts +7 -1
- package/templates/pi/src/lib/session-context-extension.ts +33 -0
- package/dist/channel-MK5OK2SI.js +0 -113
- package/dist/chunk-SMISE4SV.js +0 -226
- package/dist/conversation-ERXEQZTY.js +0 -163
- package/dist/send-66QMKRUH.js +0 -75
- package/dist/web-assets/assets/index-BbRmoxoA.js +0 -308
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveAgentName
|
|
4
4
|
} from "./chunk-AZEL2IEK.js";
|
|
5
|
+
import {
|
|
6
|
+
deleteAgentUser as deleteAgentUser2
|
|
7
|
+
} from "./chunk-7ACDT3P2.js";
|
|
5
8
|
import {
|
|
6
9
|
parseArgs
|
|
7
10
|
} from "./chunk-D424ZQGI.js";
|
|
8
11
|
import {
|
|
9
12
|
deleteAgentUser
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W76KWE23.js";
|
|
11
14
|
import {
|
|
12
15
|
agentDir,
|
|
13
16
|
findAgent,
|
|
14
17
|
removeAgent,
|
|
15
18
|
removeAllVariants
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UWHWAPGO.js";
|
|
17
20
|
import "./chunk-K3NQKI34.js";
|
|
18
21
|
|
|
19
22
|
// src/commands/delete.ts
|
|
@@ -29,7 +32,7 @@ async function run(args) {
|
|
|
29
32
|
process.exit(1);
|
|
30
33
|
}
|
|
31
34
|
try {
|
|
32
|
-
const { daemonFetch } = await import("./daemon-client-
|
|
35
|
+
const { daemonFetch } = await import("./daemon-client-442IV43D.js");
|
|
33
36
|
const res = await daemonFetch(`/api/agents/${encodeURIComponent(name)}/stop`, {
|
|
34
37
|
method: "POST"
|
|
35
38
|
});
|
|
@@ -41,6 +44,7 @@ async function run(args) {
|
|
|
41
44
|
const dir = agentDir(name);
|
|
42
45
|
removeAllVariants(name);
|
|
43
46
|
removeAgent(name);
|
|
47
|
+
await deleteAgentUser2(name);
|
|
44
48
|
console.log(`Removed ${name} from registry.`);
|
|
45
49
|
if (existsSync(dir)) {
|
|
46
50
|
if (!flags.force) {
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
readEnv,
|
|
6
6
|
sharedEnvPath,
|
|
7
7
|
writeEnv
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-H7AMDUIA.js";
|
|
9
9
|
import {
|
|
10
10
|
parseArgs
|
|
11
11
|
} from "./chunk-D424ZQGI.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveAgent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UWHWAPGO.js";
|
|
15
15
|
import "./chunk-K3NQKI34.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/env.ts
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "./chunk-D424ZQGI.js";
|
|
8
8
|
import {
|
|
9
9
|
daemonFetch
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JR4UXCTO.js";
|
|
11
|
+
import "./chunk-UWHWAPGO.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/history.ts
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
agentEnvPath,
|
|
8
8
|
readEnv,
|
|
9
9
|
writeEnv
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H7AMDUIA.js";
|
|
11
11
|
import {
|
|
12
12
|
composeTemplate,
|
|
13
13
|
copyTemplateToDir,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
agentDir,
|
|
26
26
|
ensureVoluteHome,
|
|
27
27
|
nextPort
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UWHWAPGO.js";
|
|
29
29
|
import "./chunk-K3NQKI34.js";
|
|
30
30
|
|
|
31
31
|
// src/commands/import.ts
|
|
@@ -6,10 +6,10 @@ async function run(args) {
|
|
|
6
6
|
const subcommand = args[0];
|
|
7
7
|
switch (subcommand) {
|
|
8
8
|
case "send":
|
|
9
|
-
await import("./send-
|
|
9
|
+
await import("./send-G7PE4DOJ.js").then((m) => m.run(args.slice(1)));
|
|
10
10
|
break;
|
|
11
11
|
case "history":
|
|
12
|
-
await import("./history-
|
|
12
|
+
await import("./history-H72ZUIBN.js").then((m) => m.run(args.slice(1)));
|
|
13
13
|
break;
|
|
14
14
|
case "--help":
|
|
15
15
|
case "-h":
|
|
@@ -4,7 +4,7 @@ import "./chunk-K3NQKI34.js";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "volute",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.7.0",
|
|
8
8
|
description: "CLI for creating and managing self-modifying AI agents powered by the Claude Agent SDK",
|
|
9
9
|
type: "module",
|
|
10
10
|
license: "MIT",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveAgentName
|
|
4
|
+
} from "./chunk-AZEL2IEK.js";
|
|
5
|
+
import {
|
|
6
|
+
daemonFetch
|
|
7
|
+
} from "./chunk-JR4UXCTO.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveAgent
|
|
10
|
+
} from "./chunk-UWHWAPGO.js";
|
|
11
|
+
import "./chunk-K3NQKI34.js";
|
|
12
|
+
|
|
13
|
+
// src/commands/restart.ts
|
|
14
|
+
async function run(args) {
|
|
15
|
+
const name = resolveAgentName({ agent: args[0] });
|
|
16
|
+
const { entry } = resolveAgent(name);
|
|
17
|
+
const res = await daemonFetch(`/api/agents/${encodeURIComponent(name)}/restart`, {
|
|
18
|
+
method: "POST"
|
|
19
|
+
});
|
|
20
|
+
const data = await res.json();
|
|
21
|
+
if (!res.ok) {
|
|
22
|
+
console.error(data.error || "Failed to restart agent");
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
console.log(`${name} restarted on port ${entry.port}`);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
run
|
|
29
|
+
};
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "./chunk-D424ZQGI.js";
|
|
8
8
|
import {
|
|
9
9
|
daemonFetch
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JR4UXCTO.js";
|
|
11
|
+
import "./chunk-UWHWAPGO.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/schedule.ts
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
readStdin
|
|
4
|
+
} from "./chunk-ZYGKG6VC.js";
|
|
5
|
+
import {
|
|
6
|
+
summarizeTool
|
|
7
|
+
} from "./chunk-B3R6L2GW.js";
|
|
8
|
+
import {
|
|
9
|
+
getChannelDriver
|
|
10
|
+
} from "./chunk-ZZOOTYXK.js";
|
|
11
|
+
import "./chunk-BX7KI4S3.js";
|
|
12
|
+
import {
|
|
13
|
+
daemonFetch
|
|
14
|
+
} from "./chunk-JR4UXCTO.js";
|
|
15
|
+
import "./chunk-UWHWAPGO.js";
|
|
16
|
+
import "./chunk-K3NQKI34.js";
|
|
17
|
+
|
|
18
|
+
// src/commands/send.ts
|
|
19
|
+
import { userInfo } from "os";
|
|
20
|
+
async function run(args) {
|
|
21
|
+
const name = args[0];
|
|
22
|
+
const message = args[1] ?? await readStdin();
|
|
23
|
+
if (!name || !message) {
|
|
24
|
+
console.error('Usage: volute message send <name> "<message>"');
|
|
25
|
+
console.error(' echo "message" | volute message send <name>');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const agentSelf = process.env.VOLUTE_AGENT;
|
|
29
|
+
const sender = agentSelf || userInfo().username;
|
|
30
|
+
const driver = getChannelDriver("volute");
|
|
31
|
+
if (!driver?.sendAndStream || !driver.createConversation) {
|
|
32
|
+
console.error("Volute driver not available");
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const env = { VOLUTE_AGENT: name, VOLUTE_SENDER: sender };
|
|
36
|
+
let conversationId;
|
|
37
|
+
try {
|
|
38
|
+
conversationId = await driver.createConversation(env, [sender]);
|
|
39
|
+
} catch (err) {
|
|
40
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
for await (const event of driver.sendAndStream(env, conversationId, message)) {
|
|
45
|
+
if (event.type === "text") {
|
|
46
|
+
process.stdout.write(event.content);
|
|
47
|
+
} else if (event.type === "tool_use") {
|
|
48
|
+
process.stderr.write(`${summarizeTool(event.name, event.input)}
|
|
49
|
+
`);
|
|
50
|
+
}
|
|
51
|
+
if (event.type === "done") break;
|
|
52
|
+
}
|
|
53
|
+
process.stdout.write("\n");
|
|
54
|
+
} catch (err) {
|
|
55
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
if (agentSelf) {
|
|
59
|
+
try {
|
|
60
|
+
await daemonFetch(`/api/agents/${encodeURIComponent(agentSelf)}/history`, {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: { "Content-Type": "application/json" },
|
|
63
|
+
body: JSON.stringify({ channel: conversationId, content: message })
|
|
64
|
+
});
|
|
65
|
+
} catch (err) {
|
|
66
|
+
console.error(`Failed to persist to history: ${err instanceof Error ? err.message : err}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
run
|
|
72
|
+
};
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-D424ZQGI.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureVoluteGroup
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W76KWE23.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveVoluteBin
|
|
10
10
|
} from "./chunk-5SKQ6J7T.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-UWHWAPGO.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/setup.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
daemonFetch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JR4UXCTO.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveAgent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UWHWAPGO.js";
|
|
8
8
|
import "./chunk-K3NQKI34.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/start.ts
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-AZEL2IEK.js";
|
|
5
5
|
import {
|
|
6
6
|
daemonFetch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JR4UXCTO.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveAgent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UWHWAPGO.js";
|
|
11
11
|
import "./chunk-K3NQKI34.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/stop.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
checkForUpdate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NKXULRSW.js";
|
|
5
5
|
import {
|
|
6
6
|
execInherit,
|
|
7
7
|
resolveVoluteBin
|
|
8
8
|
} from "./chunk-5SKQ6J7T.js";
|
|
9
9
|
import {
|
|
10
10
|
voluteHome
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UWHWAPGO.js";
|
|
12
12
|
import "./chunk-K3NQKI34.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/update.ts
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
} from "./chunk-5SKQ6J7T.js";
|
|
17
17
|
import {
|
|
18
18
|
daemonFetch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JR4UXCTO.js";
|
|
20
20
|
import {
|
|
21
21
|
addVariant,
|
|
22
22
|
nextPort,
|
|
23
23
|
resolveAgent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UWHWAPGO.js";
|
|
25
25
|
import "./chunk-K3NQKI34.js";
|
|
26
26
|
|
|
27
27
|
// src/commands/upgrade.ts
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-5SKQ6J7T.js";
|
|
12
12
|
import {
|
|
13
13
|
daemonFetch
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JR4UXCTO.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-UWHWAPGO.js";
|
|
26
26
|
import "./chunk-K3NQKI34.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/variant.ts
|