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.
Files changed (62) hide show
  1. package/dist/{agent-Z2B6EFEQ.js → agent-7JF7MT73.js} +13 -9
  2. package/dist/{agent-manager-PXBKA2GK.js → agent-manager-IMZ7ZMBF.js} +4 -4
  3. package/dist/channel-SMCNOIVQ.js +262 -0
  4. package/dist/{chunk-MW2KFO3B.js → chunk-62X577Y7.js} +10 -8
  5. package/dist/chunk-7ACDT3P2.js +265 -0
  6. package/dist/{chunk-MXUCNIBG.js → chunk-BX7KI4S3.js} +68 -3
  7. package/dist/{up-7ILD7GU7.js → chunk-EG45HBSJ.js} +16 -4
  8. package/dist/{chunk-HE67X4T6.js → chunk-H7AMDUIA.js} +1 -1
  9. package/dist/{chunk-7L4AN5D4.js → chunk-JR4UXCTO.js} +1 -1
  10. package/dist/{down-O7IFZLVJ.js → chunk-LLJNZPCU.js} +48 -13
  11. package/dist/{chunk-5X7HGB6L.js → chunk-NKXULRSW.js} +2 -1
  12. package/dist/{chunk-UX25Z2ND.js → chunk-UWHWAPGO.js} +7 -0
  13. package/dist/{chunk-UAVD2AHX.js → chunk-W76KWE23.js} +1 -1
  14. package/dist/chunk-ZZOOTYXK.js +583 -0
  15. package/dist/cli.js +22 -21
  16. package/dist/{connector-LYEMXQEV.js → connector-Y7JPNROO.js} +3 -3
  17. package/dist/connectors/discord.js +38 -7
  18. package/dist/connectors/slack.js +22 -3
  19. package/dist/connectors/telegram.js +34 -4
  20. package/dist/{create-RVCZN6HE.js → create-G525LWEA.js} +2 -2
  21. package/dist/{daemon-client-ZY6UUN2M.js → daemon-client-442IV43D.js} +2 -2
  22. package/dist/daemon-restart-4HVEKYFY.js +23 -0
  23. package/dist/daemon.js +1042 -809
  24. package/dist/{delete-3QH7VYIN.js → delete-UOU4AFQN.js} +7 -3
  25. package/dist/down-AZVH5TCD.js +11 -0
  26. package/dist/{env-4D4REPJF.js → env-7GLUJCWS.js} +2 -2
  27. package/dist/{history-OEONB53Z.js → history-H72ZUIBN.js} +2 -2
  28. package/dist/{import-MXJB2EII.js → import-AVKQJDYC.js} +2 -2
  29. package/dist/{logs-DF342W4M.js → logs-EDGK26AK.js} +1 -1
  30. package/dist/{message-ADHWFHSI.js → message-SCOQDR3P.js} +2 -2
  31. package/dist/{package-VQOE7JNH.js → package-T2WAVJOU.js} +1 -1
  32. package/dist/restart-O4ETYLJF.js +29 -0
  33. package/dist/{schedule-NAG6F463.js → schedule-S6QVC5ON.js} +2 -2
  34. package/dist/send-G7PE4DOJ.js +72 -0
  35. package/dist/{setup-RPRRGG2F.js → setup-F4TCWVSP.js} +2 -2
  36. package/dist/{start-TUOXDSFL.js → start-VHQ7LNWM.js} +2 -2
  37. package/dist/{status-A36EHRO4.js → status-QAJWXKMZ.js} +2 -2
  38. package/dist/{stop-AOJZLQ5X.js → stop-CAGCT5NI.js} +2 -2
  39. package/dist/up-RWZF6MLT.js +12 -0
  40. package/dist/{update-LPSIAWQ2.js → update-F7QWV2LB.js} +2 -2
  41. package/dist/{update-check-Y33QDCFL.js → update-check-B4J6IEQ4.js} +2 -2
  42. package/dist/{upgrade-FX2TKJ2S.js → upgrade-YXKPWDRU.js} +2 -2
  43. package/dist/{variant-LAB67OC2.js → variant-4Z6W3PP6.js} +2 -2
  44. package/dist/web-assets/assets/index-B1CqjUYD.js +308 -0
  45. package/dist/web-assets/index.html +1 -1
  46. package/package.json +1 -1
  47. package/templates/_base/.init/.config/scripts/session-reader.ts +59 -0
  48. package/templates/_base/_skills/sessions/SKILL.md +49 -0
  49. package/templates/_base/_skills/volute-agent/SKILL.md +13 -9
  50. package/templates/_base/src/lib/format-prefix.ts +6 -0
  51. package/templates/_base/src/lib/router.ts +30 -3
  52. package/templates/_base/src/lib/session-monitor.ts +400 -0
  53. package/templates/_base/src/lib/types.ts +2 -0
  54. package/templates/agent-sdk/src/agent.ts +16 -0
  55. package/templates/agent-sdk/src/lib/hooks/session-context.ts +32 -0
  56. package/templates/pi/src/agent.ts +7 -1
  57. package/templates/pi/src/lib/session-context-extension.ts +33 -0
  58. package/dist/channel-MK5OK2SI.js +0 -113
  59. package/dist/chunk-SMISE4SV.js +0 -226
  60. package/dist/conversation-ERXEQZTY.js +0 -163
  61. package/dist/send-66QMKRUH.js +0 -75
  62. 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-UAVD2AHX.js";
13
+ } from "./chunk-W76KWE23.js";
11
14
  import {
12
15
  agentDir,
13
16
  findAgent,
14
17
  removeAgent,
15
18
  removeAllVariants
16
- } from "./chunk-UX25Z2ND.js";
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-ZY6UUN2M.js");
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) {
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ run,
4
+ stopDaemon
5
+ } from "./chunk-LLJNZPCU.js";
6
+ import "./chunk-UWHWAPGO.js";
7
+ import "./chunk-K3NQKI34.js";
8
+ export {
9
+ run,
10
+ stopDaemon
11
+ };
@@ -5,13 +5,13 @@ import {
5
5
  readEnv,
6
6
  sharedEnvPath,
7
7
  writeEnv
8
- } from "./chunk-HE67X4T6.js";
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-UX25Z2ND.js";
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-7L4AN5D4.js";
11
- import "./chunk-UX25Z2ND.js";
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-HE67X4T6.js";
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-UX25Z2ND.js";
28
+ } from "./chunk-UWHWAPGO.js";
29
29
  import "./chunk-K3NQKI34.js";
30
30
 
31
31
  // src/commands/import.ts
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-D424ZQGI.js";
8
8
  import {
9
9
  resolveAgent
10
- } from "./chunk-UX25Z2ND.js";
10
+ } from "./chunk-UWHWAPGO.js";
11
11
  import "./chunk-K3NQKI34.js";
12
12
 
13
13
  // src/commands/logs.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-66QMKRUH.js").then((m) => m.run(args.slice(1)));
9
+ await import("./send-G7PE4DOJ.js").then((m) => m.run(args.slice(1)));
10
10
  break;
11
11
  case "history":
12
- await import("./history-OEONB53Z.js").then((m) => m.run(args.slice(1)));
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.5.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-7L4AN5D4.js";
11
- import "./chunk-UX25Z2ND.js";
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-UAVD2AHX.js";
7
+ } from "./chunk-W76KWE23.js";
8
8
  import {
9
9
  resolveVoluteBin
10
10
  } from "./chunk-5SKQ6J7T.js";
11
- import "./chunk-UX25Z2ND.js";
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-7L4AN5D4.js";
4
+ } from "./chunk-JR4UXCTO.js";
5
5
  import {
6
6
  resolveAgent
7
- } from "./chunk-UX25Z2ND.js";
7
+ } from "./chunk-UWHWAPGO.js";
8
8
  import "./chunk-K3NQKI34.js";
9
9
 
10
10
  // src/commands/start.ts
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  daemonFetch
4
- } from "./chunk-7L4AN5D4.js";
5
- import "./chunk-UX25Z2ND.js";
4
+ } from "./chunk-JR4UXCTO.js";
5
+ import "./chunk-UWHWAPGO.js";
6
6
  import "./chunk-K3NQKI34.js";
7
7
 
8
8
  // src/commands/status.ts
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-AZEL2IEK.js";
5
5
  import {
6
6
  daemonFetch
7
- } from "./chunk-7L4AN5D4.js";
7
+ } from "./chunk-JR4UXCTO.js";
8
8
  import {
9
9
  resolveAgent
10
- } from "./chunk-UX25Z2ND.js";
10
+ } from "./chunk-UWHWAPGO.js";
11
11
  import "./chunk-K3NQKI34.js";
12
12
 
13
13
  // src/commands/stop.ts
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ readGlobalConfig,
4
+ run
5
+ } from "./chunk-EG45HBSJ.js";
6
+ import "./chunk-D424ZQGI.js";
7
+ import "./chunk-UWHWAPGO.js";
8
+ import "./chunk-K3NQKI34.js";
9
+ export {
10
+ readGlobalConfig,
11
+ run
12
+ };
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  checkForUpdate
4
- } from "./chunk-5X7HGB6L.js";
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-UX25Z2ND.js";
11
+ } from "./chunk-UWHWAPGO.js";
12
12
  import "./chunk-K3NQKI34.js";
13
13
 
14
14
  // src/commands/update.ts
@@ -5,8 +5,8 @@ import {
5
5
  fetchLatestVersion,
6
6
  getCurrentVersion,
7
7
  isNewer
8
- } from "./chunk-5X7HGB6L.js";
9
- import "./chunk-UX25Z2ND.js";
8
+ } from "./chunk-NKXULRSW.js";
9
+ import "./chunk-UWHWAPGO.js";
10
10
  import "./chunk-K3NQKI34.js";
11
11
  export {
12
12
  checkForUpdate,
@@ -16,12 +16,12 @@ import {
16
16
  } from "./chunk-5SKQ6J7T.js";
17
17
  import {
18
18
  daemonFetch
19
- } from "./chunk-7L4AN5D4.js";
19
+ } from "./chunk-JR4UXCTO.js";
20
20
  import {
21
21
  addVariant,
22
22
  nextPort,
23
23
  resolveAgent
24
- } from "./chunk-UX25Z2ND.js";
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-7L4AN5D4.js";
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-UX25Z2ND.js";
25
+ } from "./chunk-UWHWAPGO.js";
26
26
  import "./chunk-K3NQKI34.js";
27
27
 
28
28
  // src/commands/variant.ts