volute 0.13.1 → 0.14.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/{channel-JZJJRRWT.js → channel-SLURLIRV.js} +28 -28
- package/dist/{chunk-KRJ6KCBI.js → chunk-2Y77MCFG.js} +3 -3
- package/dist/{chunk-AA5TDLXB.js → chunk-3FC42ZBM.js} +24 -24
- package/dist/{chunk-YYUSXARD.js → chunk-6BDNWYKG.js} +2 -2
- package/dist/{chunk-DCZZFBCX.js → chunk-GR3OG4QK.js} +2 -2
- package/dist/{chunk-FE5O5RSL.js → chunk-GSPWIM5E.js} +25 -25
- package/dist/{chunk-K2ZT3YQ3.js → chunk-J52CJCVI.js} +72 -75
- package/dist/{chunk-LGSW7T7K.js → chunk-M77QBTEH.js} +60 -57
- package/dist/{chunk-KXOFPDO6.js → chunk-MVSXRMJJ.js} +1 -1
- package/dist/chunk-NAOW2CLO.js +15 -0
- package/dist/{chunk-VQIJUR43.js → chunk-OJQ47SCA.js} +1 -1
- package/dist/{chunk-O4BN3ZIY.js → chunk-OYSZNX5I.js} +7 -7
- package/dist/{chunk-AOSGW3MX.js → chunk-PDLAZJGC.js} +28 -28
- package/dist/{chunk-XUA3JUFK.js → chunk-PO5Q2AYN.js} +2 -2
- package/dist/{chunk-6BQHEIDO.js → chunk-QJIIHU32.js} +2 -2
- package/dist/{chunk-NXT67PPK.js → chunk-ZCEYUUID.js} +19 -19
- package/dist/cli.js +42 -42
- package/dist/{connector-WFT5KK67.js → connector-JFAHYFQX.js} +21 -21
- package/dist/connectors/discord.js +7 -7
- package/dist/connectors/slack.js +7 -7
- package/dist/connectors/telegram.js +9 -9
- package/dist/{create-HT47ZH5T.js → create-ZWHCRT5F.js} +7 -7
- package/dist/{daemon-client-DEF7IFEJ.js → daemon-client-ODKDUYDE.js} +2 -2
- package/dist/{daemon-restart-43RQBPF2.js → daemon-restart-KNJHZ7FP.js} +6 -6
- package/dist/daemon.js +2281 -1998
- package/dist/{delete-YG3RVURA.js → delete-6G6WEX4F.js} +8 -8
- package/dist/down-A56B5JLK.js +14 -0
- package/dist/{env-BQYYF4YL.js → env-6LXDUZDA.js} +25 -25
- package/dist/{history-I4KIKIUX.js → history-LKCJJMUV.js} +7 -7
- package/dist/{import-UHCK6PRC.js → import-EDGRLIGO.js} +3 -3
- package/dist/{logs-2DWFES6A.js → logs-GYOR3L2L.js} +8 -8
- package/dist/mind-OJN6RBZW.js +79 -0
- package/dist/mind-manager-PN5SUDJ4.js +15 -0
- package/dist/{package-GUQVVO3V.js → package-EYUA3AMC.js} +4 -4
- package/dist/{restart-6PE3GWYZ.js → restart-YFAWFS5T.js} +9 -9
- package/dist/{schedule-5AYTQM3N.js → schedule-AGYLDMNS.js} +17 -17
- package/dist/{seed-3QQVFMBU.js → seed-AP4Q7RZ7.js} +9 -9
- package/dist/{send-FPFW7J5Q.js → send-SV4K2TDE.js} +32 -24
- package/dist/{service-5X5EKPVM.js → service-U7MZ2H7F.js} +4 -4
- package/dist/{setup-Y6P7RFQ4.js → setup-DJKIZKGW.js} +22 -27
- package/dist/{sprout-VOUJ4Y3I.js → sprout-2V3MWONK.js} +18 -18
- package/dist/{start-ICPSQ2ZK.js → start-3YYRXBKP.js} +7 -7
- package/dist/{status-JBT7ENQN.js → status-VSFZYX7S.js} +14 -14
- package/dist/{stop-IXJGAG4T.js → stop-AA5K5LYG.js} +9 -9
- package/dist/{up-PR7SGODX.js → up-SUZ6C5PY.js} +5 -5
- package/dist/{update-GU6JYDSN.js → update-YAGN5ODG.js} +5 -5
- package/dist/{update-check-MUPZYTW4.js → update-check-APLTH4IN.js} +2 -2
- package/dist/{upgrade-275LKIEG.js → upgrade-KXZCQSZN.js} +8 -10
- package/dist/{variant-RE45F2IY.js → variant-X5QFG6KK.js} +30 -30
- package/dist/web-assets/assets/index-CeFLp8DZ.js +307 -0
- package/dist/web-assets/index.html +1 -1
- package/drizzle/0005_rename_agents_to_minds.sql +11 -0
- package/drizzle/meta/0005_snapshot.json +410 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +4 -4
- package/templates/_base/.init/.config/scripts/session-reader.ts +1 -1
- package/templates/_base/.init/SOUL.md +1 -1
- package/templates/_base/_skills/memory/SKILL.md +1 -1
- package/templates/_base/_skills/orientation/SKILL.md +6 -6
- package/templates/_base/_skills/sessions/SKILL.md +1 -1
- package/templates/_base/_skills/{volute-agent → volute-mind}/SKILL.md +21 -21
- package/templates/_base/home/VOLUTE.md +7 -7
- package/templates/_base/src/lib/auto-commit.ts +1 -1
- package/templates/_base/src/lib/auto-reply.ts +1 -1
- package/templates/_base/src/lib/daemon-client.ts +8 -8
- package/templates/_base/src/lib/router.ts +6 -6
- package/templates/_base/src/lib/routing.ts +9 -6
- package/templates/_base/src/lib/startup.ts +1 -1
- package/templates/_base/src/lib/volute-server.ts +1 -1
- package/templates/{agent-sdk → claude}/.init/CLAUDE.md +3 -3
- package/templates/{agent-sdk → claude}/src/agent.ts +10 -10
- package/templates/{agent-sdk → claude}/src/lib/hooks/pre-compact.ts +2 -2
- package/templates/{agent-sdk → claude}/src/lib/session-store.ts +2 -2
- package/templates/{agent-sdk → claude}/src/lib/stream-consumer.ts +1 -1
- package/templates/{agent-sdk → claude}/src/server.ts +4 -4
- package/templates/pi/.init/{AGENTS.md → MINDS.md} +3 -3
- package/templates/pi/home/.config/config.json.tmpl +1 -1
- package/templates/pi/src/agent.ts +12 -12
- package/templates/pi/src/lib/event-handler.ts +39 -4
- package/templates/pi/src/server.ts +3 -3
- package/dist/agent-IUSETOXJ.js +0 -79
- package/dist/agent-manager-BLAMP6YV.js +0 -15
- package/dist/chunk-AZEL2IEK.js +0 -15
- package/dist/down-36YCOZ7V.js +0 -14
- package/dist/web-assets/assets/index-TqXd1QOX.js +0 -307
- /package/templates/{agent-sdk → claude}/.init/.claude/settings.json +0 -0
- /package/templates/{agent-sdk → claude}/.init/.config/routes.json +0 -0
- /package/templates/{agent-sdk → claude}/package.json.tmpl +0 -0
- /package/templates/{agent-sdk → claude}/src/lib/content.ts +0 -0
- /package/templates/{agent-sdk → claude}/src/lib/hooks/auto-commit.ts +0 -0
- /package/templates/{agent-sdk → claude}/src/lib/hooks/identity-reload.ts +0 -0
- /package/templates/{agent-sdk → claude}/src/lib/hooks/session-context.ts +0 -0
- /package/templates/{agent-sdk → claude}/src/lib/message-channel.ts +0 -0
- /package/templates/{agent-sdk → claude}/volute-template.json +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
5
|
import {
|
|
6
6
|
getChannelDriver
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PDLAZJGC.js";
|
|
8
8
|
import {
|
|
9
9
|
parseArgs
|
|
10
10
|
} from "./chunk-D424ZQGI.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-3FC42ZBM.js";
|
|
12
12
|
import {
|
|
13
13
|
daemonFetch
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OJQ47SCA.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
findMind
|
|
17
|
+
} from "./chunk-M77QBTEH.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient,
|
|
20
20
|
urlOf
|
|
@@ -73,16 +73,16 @@ async function readStdin() {
|
|
|
73
73
|
// src/commands/send.ts
|
|
74
74
|
async function run(args) {
|
|
75
75
|
const { positional, flags } = parseArgs(args, {
|
|
76
|
-
|
|
76
|
+
mind: { type: "string" }
|
|
77
77
|
});
|
|
78
78
|
const target = positional[0];
|
|
79
79
|
const message = positional[1] ?? await readStdin();
|
|
80
80
|
if (!target || !message) {
|
|
81
|
-
console.error('Usage: volute send <target> "<message>" [--
|
|
82
|
-
console.error(' echo "message" | volute send <target> [--
|
|
81
|
+
console.error('Usage: volute send <target> "<message>" [--mind <name>]');
|
|
82
|
+
console.error(' echo "message" | volute send <target> [--mind <name>]');
|
|
83
83
|
console.error("");
|
|
84
84
|
console.error("Examples:");
|
|
85
|
-
console.error(' volute send @other-
|
|
85
|
+
console.error(' volute send @other-mind "hello"');
|
|
86
86
|
console.error(' volute send animal-chat "hello everyone"');
|
|
87
87
|
console.error(' volute send discord:server/channel "hello"');
|
|
88
88
|
process.exit(1);
|
|
@@ -94,7 +94,15 @@ To reply to a person, use their username from the message prefix (e.g. volute se
|
|
|
94
94
|
);
|
|
95
95
|
process.exit(1);
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
let parsed = parseTarget(target);
|
|
98
|
+
if (!parsed.isDM && parsed.platform === "volute" && findMind(parsed.identifier)) {
|
|
99
|
+
parsed = {
|
|
100
|
+
platform: "volute",
|
|
101
|
+
identifier: `@${parsed.identifier}`,
|
|
102
|
+
uri: `volute:@${parsed.identifier}`,
|
|
103
|
+
isDM: true
|
|
104
|
+
};
|
|
105
|
+
}
|
|
98
106
|
const driver = getChannelDriver(parsed.platform);
|
|
99
107
|
if (!driver) {
|
|
100
108
|
console.error(`No driver for platform: ${parsed.platform}`);
|
|
@@ -103,17 +111,17 @@ To reply to a person, use their username from the message prefix (e.g. volute se
|
|
|
103
111
|
let channelUri = parsed.uri;
|
|
104
112
|
if (parsed.isDM && parsed.platform === "volute") {
|
|
105
113
|
const targetName = parsed.identifier.slice(1);
|
|
106
|
-
const
|
|
107
|
-
const sender =
|
|
114
|
+
const mindSelf = process.env.VOLUTE_MIND;
|
|
115
|
+
const sender = mindSelf || userInfo().username;
|
|
108
116
|
if (!driver.createConversation) {
|
|
109
117
|
console.error("Volute driver does not support creating conversations");
|
|
110
118
|
process.exit(1);
|
|
111
119
|
}
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const participants =
|
|
120
|
+
const targetIsMind = !!findMind(targetName);
|
|
121
|
+
const contextMind = mindSelf && !targetIsMind ? mindSelf : targetName;
|
|
122
|
+
const participants = mindSelf && !targetIsMind ? [targetName] : [sender];
|
|
115
123
|
const env = {
|
|
116
|
-
|
|
124
|
+
VOLUTE_MIND: contextMind,
|
|
117
125
|
VOLUTE_SENDER: sender
|
|
118
126
|
};
|
|
119
127
|
try {
|
|
@@ -129,11 +137,11 @@ To reply to a person, use their username from the message prefix (e.g. volute se
|
|
|
129
137
|
console.error(err instanceof Error ? err.message : String(err));
|
|
130
138
|
process.exit(1);
|
|
131
139
|
}
|
|
132
|
-
if (
|
|
140
|
+
if (mindSelf) {
|
|
133
141
|
try {
|
|
134
142
|
const client = getClient();
|
|
135
143
|
await daemonFetch(
|
|
136
|
-
urlOf(client.api.
|
|
144
|
+
urlOf(client.api.minds[":name"].history.$url({ param: { name: mindSelf } })),
|
|
137
145
|
{
|
|
138
146
|
method: "POST",
|
|
139
147
|
headers: { "Content-Type": "application/json" },
|
|
@@ -145,10 +153,10 @@ To reply to a person, use their username from the message prefix (e.g. volute se
|
|
|
145
153
|
}
|
|
146
154
|
}
|
|
147
155
|
} else {
|
|
148
|
-
const
|
|
156
|
+
const mindName = resolveMindName(flags);
|
|
149
157
|
const client = getClient();
|
|
150
158
|
const res = await daemonFetch(
|
|
151
|
-
urlOf(client.api.
|
|
159
|
+
urlOf(client.api.minds[":name"].channels.send.$url({ param: { name: mindName } })),
|
|
152
160
|
{
|
|
153
161
|
method: "POST",
|
|
154
162
|
headers: { "Content-Type": "application/json" },
|
|
@@ -161,10 +169,10 @@ To reply to a person, use their username from the message prefix (e.g. volute se
|
|
|
161
169
|
process.exit(1);
|
|
162
170
|
}
|
|
163
171
|
console.log("Message sent.");
|
|
164
|
-
if (process.env.
|
|
172
|
+
if (process.env.VOLUTE_MIND) {
|
|
165
173
|
try {
|
|
166
174
|
await daemonFetch(
|
|
167
|
-
urlOf(client.api.
|
|
175
|
+
urlOf(client.api.minds[":name"].history.$url({ param: { name: mindName } })),
|
|
168
176
|
{
|
|
169
177
|
method: "POST",
|
|
170
178
|
headers: { "Content-Type": "application/json" },
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
LAUNCHD_PLIST_PATH,
|
|
5
5
|
SYSTEM_SERVICE_PATH,
|
|
6
6
|
USER_SYSTEMD_UNIT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6BDNWYKG.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveVoluteBin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-2Y77MCFG.js";
|
|
11
|
+
import "./chunk-ZCEYUUID.js";
|
|
12
12
|
import {
|
|
13
13
|
parseArgs
|
|
14
14
|
} from "./chunk-D424ZQGI.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-M77QBTEH.js";
|
|
16
16
|
import "./chunk-K3NQKI34.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/service.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
SYSTEM_SERVICE_PATH
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6BDNWYKG.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveVoluteBin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2Y77MCFG.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureVoluteGroup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZCEYUUID.js";
|
|
11
11
|
import {
|
|
12
12
|
parseArgs
|
|
13
13
|
} from "./chunk-D424ZQGI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-M77QBTEH.js";
|
|
15
15
|
import "./chunk-K3NQKI34.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/setup.ts
|
|
@@ -23,8 +23,8 @@ var SERVICE_NAME = "volute.service";
|
|
|
23
23
|
var PROFILE_PATH = "/etc/profile.d/volute.sh";
|
|
24
24
|
var WRAPPER_PATH = "/usr/local/bin/volute";
|
|
25
25
|
var DATA_DIR = "/var/lib/volute";
|
|
26
|
-
var
|
|
27
|
-
var
|
|
26
|
+
var MINDS_DIR = "/minds";
|
|
27
|
+
var LEGACY_AGENTS_DIR = "/agents";
|
|
28
28
|
var HOST_RE = /^[a-zA-Z0-9.:_-]+$/;
|
|
29
29
|
function validateHost(host) {
|
|
30
30
|
if (!HOST_RE.test(host)) {
|
|
@@ -52,7 +52,7 @@ function generateUnit(voluteBin, port, host) {
|
|
|
52
52
|
const binUnderHome = voluteBin.startsWith(`${home}/`);
|
|
53
53
|
const lines = [
|
|
54
54
|
"[Unit]",
|
|
55
|
-
"Description=Volute
|
|
55
|
+
"Description=Volute Mind Manager",
|
|
56
56
|
"After=network.target",
|
|
57
57
|
"",
|
|
58
58
|
"[Service]",
|
|
@@ -60,13 +60,12 @@ function generateUnit(voluteBin, port, host) {
|
|
|
60
60
|
`ExecStart=${voluteBin} ${args.join(" ")}`,
|
|
61
61
|
`Environment=PATH=${buildServicePath(voluteBin)}`,
|
|
62
62
|
`Environment=VOLUTE_HOME=${DATA_DIR}`,
|
|
63
|
-
`Environment=
|
|
63
|
+
`Environment=VOLUTE_MINDS_DIR=${MINDS_DIR}`,
|
|
64
64
|
"Environment=VOLUTE_ISOLATION=user",
|
|
65
|
-
`Environment=CLAUDE_CONFIG_DIR=${CLAUDE_DIR}`,
|
|
66
65
|
"Restart=on-failure",
|
|
67
66
|
"RestartSec=5",
|
|
68
67
|
"ProtectSystem=true",
|
|
69
|
-
`ReadWritePaths=${DATA_DIR} ${
|
|
68
|
+
`ReadWritePaths=${DATA_DIR} ${MINDS_DIR}`,
|
|
70
69
|
"PrivateTmp=yes"
|
|
71
70
|
];
|
|
72
71
|
if (!binUnderHome) {
|
|
@@ -75,7 +74,7 @@ function generateUnit(voluteBin, port, host) {
|
|
|
75
74
|
console.warn(`Warning: ProtectHome=yes omitted because volute binary is under ${home}.`);
|
|
76
75
|
console.warn("Consider installing Node.js system-wide for stronger sandboxing.");
|
|
77
76
|
}
|
|
78
|
-
lines.push("", "[Install]", "WantedBy=multi-user.target", "");
|
|
77
|
+
lines.push("RestrictSUIDSGID=yes", "", "[Install]", "WantedBy=multi-user.target", "");
|
|
79
78
|
return lines.join("\n");
|
|
80
79
|
}
|
|
81
80
|
function install(port, host) {
|
|
@@ -92,21 +91,17 @@ function install(port, host) {
|
|
|
92
91
|
const voluteBin = resolveVoluteBin();
|
|
93
92
|
mkdirSync(DATA_DIR, { recursive: true });
|
|
94
93
|
console.log(`Created ${DATA_DIR}`);
|
|
95
|
-
mkdirSync(
|
|
96
|
-
console.log(`Created ${
|
|
94
|
+
mkdirSync(MINDS_DIR, { recursive: true });
|
|
95
|
+
console.log(`Created ${MINDS_DIR}`);
|
|
97
96
|
ensureVoluteGroup({ force: true });
|
|
98
97
|
console.log("Ensured volute group exists");
|
|
99
|
-
mkdirSync(CLAUDE_DIR, { recursive: true });
|
|
100
|
-
execFileSync("chown", ["root:volute", CLAUDE_DIR]);
|
|
101
|
-
execFileSync("chmod", ["2770", CLAUDE_DIR]);
|
|
102
|
-
console.log(`Created ${CLAUDE_DIR}`);
|
|
103
98
|
execFileSync("chmod", ["755", DATA_DIR]);
|
|
104
|
-
execFileSync("chmod", ["755",
|
|
99
|
+
execFileSync("chmod", ["755", MINDS_DIR]);
|
|
105
100
|
console.log("Set permissions on directories");
|
|
106
101
|
writeFileSync(
|
|
107
102
|
PROFILE_PATH,
|
|
108
103
|
`export VOLUTE_HOME=${DATA_DIR}
|
|
109
|
-
export
|
|
104
|
+
export VOLUTE_MINDS_DIR=${MINDS_DIR}
|
|
110
105
|
`
|
|
111
106
|
);
|
|
112
107
|
console.log(`Wrote ${PROFILE_PATH}`);
|
|
@@ -115,7 +110,7 @@ export VOLUTE_AGENTS_DIR=${AGENTS_DIR}
|
|
|
115
110
|
const wrapper = `#!/bin/sh
|
|
116
111
|
export PATH="${binDir}:$PATH"
|
|
117
112
|
export VOLUTE_HOME="${DATA_DIR}"
|
|
118
|
-
export
|
|
113
|
+
export VOLUTE_MINDS_DIR="${MINDS_DIR}"
|
|
119
114
|
exec "${voluteBin}" "$@"
|
|
120
115
|
`;
|
|
121
116
|
writeFileSync(WRAPPER_PATH, wrapper, { mode: 493 });
|
|
@@ -143,10 +138,6 @@ exec "${voluteBin}" "$@"
|
|
|
143
138
|
console.log(`
|
|
144
139
|
Volute daemon is running. Data directory: ${DATA_DIR}`);
|
|
145
140
|
console.log("Use `systemctl status volute` to check status.");
|
|
146
|
-
console.log(
|
|
147
|
-
`
|
|
148
|
-
For agent-sdk agents, copy ~/.claude/.credentials.json to ${CLAUDE_DIR}/.credentials.json`
|
|
149
|
-
);
|
|
150
141
|
} catch (err) {
|
|
151
142
|
const e = err;
|
|
152
143
|
console.error("Service installed but failed to start.");
|
|
@@ -202,9 +193,13 @@ function uninstall(force) {
|
|
|
202
193
|
rmSync(DATA_DIR, { recursive: true, force: true });
|
|
203
194
|
console.log(`Deleted ${DATA_DIR}`);
|
|
204
195
|
}
|
|
205
|
-
if (existsSync(
|
|
206
|
-
rmSync(
|
|
207
|
-
console.log(`Deleted ${
|
|
196
|
+
if (existsSync(MINDS_DIR)) {
|
|
197
|
+
rmSync(MINDS_DIR, { recursive: true, force: true });
|
|
198
|
+
console.log(`Deleted ${MINDS_DIR}`);
|
|
199
|
+
}
|
|
200
|
+
if (existsSync(LEGACY_AGENTS_DIR)) {
|
|
201
|
+
rmSync(LEGACY_AGENTS_DIR, { recursive: true, force: true });
|
|
202
|
+
console.log(`Deleted ${LEGACY_AGENTS_DIR} (legacy)`);
|
|
208
203
|
}
|
|
209
204
|
try {
|
|
210
205
|
execFileSync("groupdel", ["volute"], { stdio: "ignore" });
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
composeTemplate,
|
|
4
4
|
findTemplatesRoot
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PO5Q2AYN.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
findMind,
|
|
8
|
+
mindDir,
|
|
9
|
+
setMindStage
|
|
10
|
+
} from "./chunk-M77QBTEH.js";
|
|
11
11
|
import "./chunk-K3NQKI34.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/sprout.ts
|
|
@@ -15,21 +15,21 @@ import { cpSync, existsSync, readFileSync, rmSync } from "fs";
|
|
|
15
15
|
import { resolve } from "path";
|
|
16
16
|
var ORIENTATION_MARKER = "You don't have a soul yet";
|
|
17
17
|
async function run(_args) {
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
20
|
-
console.error("volute sprout must be run by
|
|
18
|
+
const mindName = process.env.VOLUTE_MIND;
|
|
19
|
+
if (!mindName) {
|
|
20
|
+
console.error("volute sprout must be run by a mind (VOLUTE_MIND not set)");
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
|
-
const entry =
|
|
23
|
+
const entry = findMind(mindName);
|
|
24
24
|
if (!entry) {
|
|
25
|
-
console.error(`Unknown
|
|
25
|
+
console.error(`Unknown mind: ${mindName}`);
|
|
26
26
|
process.exit(1);
|
|
27
27
|
}
|
|
28
28
|
if (entry.stage !== "seed") {
|
|
29
|
-
console.error(`${
|
|
29
|
+
console.error(`${mindName} is not a seed \u2014 already at stage "${entry.stage}"`);
|
|
30
30
|
process.exit(1);
|
|
31
31
|
}
|
|
32
|
-
const dir =
|
|
32
|
+
const dir = mindDir(mindName);
|
|
33
33
|
const soulPath = resolve(dir, "home/SOUL.md");
|
|
34
34
|
const memoryPath = resolve(dir, "home/MEMORY.md");
|
|
35
35
|
if (!existsSync(soulPath)) {
|
|
@@ -48,11 +48,11 @@ async function run(_args) {
|
|
|
48
48
|
process.exit(1);
|
|
49
49
|
}
|
|
50
50
|
const templatesRoot = findTemplatesRoot();
|
|
51
|
-
const { composedDir, manifest } = composeTemplate(templatesRoot, "
|
|
51
|
+
const { composedDir, manifest } = composeTemplate(templatesRoot, "claude");
|
|
52
52
|
try {
|
|
53
53
|
const skillsDir = resolve(dir, manifest.skillsDir);
|
|
54
54
|
const composedSkillsDir = resolve(composedDir, manifest.skillsDir);
|
|
55
|
-
for (const skill of ["volute-
|
|
55
|
+
for (const skill of ["volute-mind", "memory", "sessions"]) {
|
|
56
56
|
const src = resolve(composedSkillsDir, skill);
|
|
57
57
|
if (existsSync(src)) {
|
|
58
58
|
cpSync(src, resolve(skillsDir, skill), { recursive: true });
|
|
@@ -65,12 +65,12 @@ async function run(_args) {
|
|
|
65
65
|
} finally {
|
|
66
66
|
rmSync(composedDir, { recursive: true, force: true });
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
const { daemonFetch } = await import("./daemon-client-
|
|
68
|
+
setMindStage(mindName, "sprouted");
|
|
69
|
+
const { daemonFetch } = await import("./daemon-client-ODKDUYDE.js");
|
|
70
70
|
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
71
71
|
const client = getClient();
|
|
72
72
|
const res = await daemonFetch(
|
|
73
|
-
urlOf(client.api.
|
|
73
|
+
urlOf(client.api.minds[":name"].restart.$url({ param: { name: mindName } })),
|
|
74
74
|
{
|
|
75
75
|
method: "POST",
|
|
76
76
|
headers: { "Content-Type": "application/json" },
|
|
@@ -82,7 +82,7 @@ async function run(_args) {
|
|
|
82
82
|
console.error(data.error ?? "Failed to restart after sprouting");
|
|
83
83
|
process.exit(1);
|
|
84
84
|
}
|
|
85
|
-
console.log("Sprouted! You now have full
|
|
85
|
+
console.log("Sprouted! You now have full mind capabilities.");
|
|
86
86
|
}
|
|
87
87
|
export {
|
|
88
88
|
run
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
daemonFetch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OJQ47SCA.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
resolveMind
|
|
7
|
+
} from "./chunk-M77QBTEH.js";
|
|
8
8
|
import {
|
|
9
9
|
getClient,
|
|
10
10
|
urlOf
|
|
@@ -15,17 +15,17 @@ import "./chunk-K3NQKI34.js";
|
|
|
15
15
|
async function run(args) {
|
|
16
16
|
const name = args[0];
|
|
17
17
|
if (!name) {
|
|
18
|
-
console.error("Usage: volute
|
|
18
|
+
console.error("Usage: volute mind start <name>");
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
21
|
-
const { entry } =
|
|
21
|
+
const { entry } = resolveMind(name);
|
|
22
22
|
const client = getClient();
|
|
23
|
-
const res = await daemonFetch(urlOf(client.api.
|
|
23
|
+
const res = await daemonFetch(urlOf(client.api.minds[":name"].start.$url({ param: { name } })), {
|
|
24
24
|
method: "POST"
|
|
25
25
|
});
|
|
26
26
|
const data = await res.json();
|
|
27
27
|
if (!res.ok) {
|
|
28
|
-
console.error(data.error || "Failed to start
|
|
28
|
+
console.error(data.error || "Failed to start mind");
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
31
|
console.log(`${name} started on port ${entry.port}`);
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
getServiceMode,
|
|
5
5
|
modeLabel,
|
|
6
6
|
readDaemonConfig
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-6BDNWYKG.js";
|
|
8
|
+
import "./chunk-2Y77MCFG.js";
|
|
9
|
+
import "./chunk-ZCEYUUID.js";
|
|
10
10
|
import {
|
|
11
11
|
checkForUpdate
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-MVSXRMJJ.js";
|
|
13
|
+
import "./chunk-M77QBTEH.js";
|
|
14
14
|
import "./chunk-K3NQKI34.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/status.ts
|
|
@@ -46,19 +46,19 @@ async function run(_args) {
|
|
|
46
46
|
if (token) headers.Authorization = `Bearer ${token}`;
|
|
47
47
|
headers.Origin = baseUrl;
|
|
48
48
|
try {
|
|
49
|
-
const res = await fetch(`${baseUrl}/api/
|
|
49
|
+
const res = await fetch(`${baseUrl}/api/minds`, { headers });
|
|
50
50
|
if (res.ok) {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
51
|
+
const minds = await res.json();
|
|
52
|
+
if (minds.length > 0) {
|
|
53
53
|
console.log(`
|
|
54
|
-
|
|
55
|
-
for (const
|
|
56
|
-
const status =
|
|
57
|
-
const label =
|
|
58
|
-
console.log(` ${
|
|
54
|
+
Minds (${minds.length}):`);
|
|
55
|
+
for (const mind of minds) {
|
|
56
|
+
const status = mind.running ? "running" : "stopped";
|
|
57
|
+
const label = mind.stage === "seed" ? " (seed)" : "";
|
|
58
|
+
console.log(` ${mind.name}: ${status}${label}`);
|
|
59
59
|
}
|
|
60
60
|
} else {
|
|
61
|
-
console.log("\nNo
|
|
61
|
+
console.log("\nNo minds configured.");
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
} catch {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
5
|
import {
|
|
6
6
|
daemonFetch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OJQ47SCA.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
resolveMind
|
|
10
|
+
} from "./chunk-M77QBTEH.js";
|
|
11
11
|
import {
|
|
12
12
|
getClient,
|
|
13
13
|
urlOf
|
|
@@ -16,15 +16,15 @@ import "./chunk-K3NQKI34.js";
|
|
|
16
16
|
|
|
17
17
|
// src/commands/stop.ts
|
|
18
18
|
async function run(args) {
|
|
19
|
-
const name =
|
|
20
|
-
|
|
19
|
+
const name = resolveMindName({ mind: args[0] });
|
|
20
|
+
resolveMind(name);
|
|
21
21
|
const client = getClient();
|
|
22
|
-
const res = await daemonFetch(urlOf(client.api.
|
|
22
|
+
const res = await daemonFetch(urlOf(client.api.minds[":name"].stop.$url({ param: { name } })), {
|
|
23
23
|
method: "POST"
|
|
24
24
|
});
|
|
25
25
|
const data = await res.json();
|
|
26
26
|
if (!res.ok) {
|
|
27
|
-
console.error(data.error || "Failed to stop
|
|
27
|
+
console.error(data.error || "Failed to stop mind");
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
console.log(`${name} stopped.`);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readGlobalConfig,
|
|
4
4
|
run
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GR3OG4QK.js";
|
|
6
|
+
import "./chunk-6BDNWYKG.js";
|
|
7
|
+
import "./chunk-2Y77MCFG.js";
|
|
8
|
+
import "./chunk-ZCEYUUID.js";
|
|
9
9
|
import "./chunk-D424ZQGI.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-M77QBTEH.js";
|
|
11
11
|
import "./chunk-K3NQKI34.js";
|
|
12
12
|
export {
|
|
13
13
|
readGlobalConfig,
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
pollHealth,
|
|
6
6
|
readDaemonConfig,
|
|
7
7
|
restartService
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6BDNWYKG.js";
|
|
9
9
|
import {
|
|
10
10
|
exec,
|
|
11
11
|
execInherit,
|
|
12
12
|
resolveVoluteBin
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-2Y77MCFG.js";
|
|
14
|
+
import "./chunk-ZCEYUUID.js";
|
|
15
15
|
import {
|
|
16
16
|
checkForUpdate
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MVSXRMJJ.js";
|
|
18
18
|
import {
|
|
19
19
|
voluteHome
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-M77QBTEH.js";
|
|
21
21
|
import "./chunk-K3NQKI34.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/update.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
resolveMindName
|
|
4
|
+
} from "./chunk-NAOW2CLO.js";
|
|
5
5
|
import {
|
|
6
6
|
parseArgs
|
|
7
7
|
} from "./chunk-D424ZQGI.js";
|
|
@@ -13,12 +13,12 @@ async function run(args) {
|
|
|
13
13
|
template: { type: "string" },
|
|
14
14
|
continue: { type: "boolean" }
|
|
15
15
|
});
|
|
16
|
-
const
|
|
17
|
-
const { daemonFetch } = await import("./daemon-client-
|
|
16
|
+
const mindName = resolveMindName({ mind: positional[0] });
|
|
17
|
+
const { daemonFetch } = await import("./daemon-client-ODKDUYDE.js");
|
|
18
18
|
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
19
19
|
const client = getClient();
|
|
20
20
|
const res = await daemonFetch(
|
|
21
|
-
urlOf(client.api.
|
|
21
|
+
urlOf(client.api.minds[":name"].upgrade.$url({ param: { name: mindName } })),
|
|
22
22
|
{
|
|
23
23
|
method: "POST",
|
|
24
24
|
headers: { "Content-Type": "application/json" },
|
|
@@ -30,7 +30,7 @@ async function run(args) {
|
|
|
30
30
|
);
|
|
31
31
|
const data = await res.json();
|
|
32
32
|
if (!res.ok && !data.conflicts) {
|
|
33
|
-
console.error(data.error ?? "Failed to upgrade
|
|
33
|
+
console.error(data.error ?? "Failed to upgrade mind");
|
|
34
34
|
process.exit(1);
|
|
35
35
|
}
|
|
36
36
|
if (data.conflicts) {
|
|
@@ -38,16 +38,14 @@ async function run(args) {
|
|
|
38
38
|
console.log(` ${data.worktreeDir}`);
|
|
39
39
|
console.log(`
|
|
40
40
|
Then run:`);
|
|
41
|
-
console.log(` volute
|
|
41
|
+
console.log(` volute mind upgrade ${mindName} --continue`);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
console.log(`
|
|
45
45
|
Upgrade variant running on port ${data.port}`);
|
|
46
46
|
console.log(`
|
|
47
47
|
Next steps:`);
|
|
48
|
-
console.log(
|
|
49
|
-
` volute send @${agentName}@${data.variant} "hello" # chat with upgraded variant`
|
|
50
|
-
);
|
|
48
|
+
console.log(` volute send @${mindName}@${data.variant} "hello" # chat with upgraded variant`);
|
|
51
49
|
console.log(` volute variant merge ${data.variant} # merge back when satisfied`);
|
|
52
50
|
}
|
|
53
51
|
export {
|