@wirecat/cli-core 0.473.0 → 0.474.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/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,14 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 0.474.0 — 29.10.2026
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Help no longer puts a profile into an example that has `--profiles`**: `<cli> mcp serve --profiles
|
|
13
|
+
work,personal` was shown as `<cli> personal mcp serve --profiles work,personal`, which `mcp serve` refuses ("name
|
|
14
|
+
one profile or --profiles, not both"). After an upgrade, the restart of an `mcp server start` server of several
|
|
15
|
+
profiles suggests `mcp server status|start` with the `--profiles` it was started with, not without.
|
|
9
16
|
|
|
10
17
|
## 0.473.0 — 29.10.2026
|
|
11
18
|
|
|
@@ -146,6 +146,8 @@ const errorText = (error) => error.code === "EPERM"
|
|
|
146
146
|
const restartOne = async (envPrefix, lockFile, lock, env, system) => {
|
|
147
147
|
const launch = readHttpLaunch(httpLaunchFile(lockFile));
|
|
148
148
|
const name = launch?.invocation ?? lockFile;
|
|
149
|
+
const set = launch?.argv.indexOf("--profiles") ?? -1;
|
|
150
|
+
const again = (verb) => `${name} mcp server ${verb}${set === -1 ? "" : ` --profiles ${launch?.argv[set + 1]}`}`;
|
|
149
151
|
const from = lock.version ?? null;
|
|
150
152
|
const left = (reason, rest = {}) => ({
|
|
151
153
|
name,
|
|
@@ -170,7 +172,7 @@ const restartOne = async (envPrefix, lockFile, lock, env, system) => {
|
|
|
170
172
|
for (let look = 0; look < STOP_LOOKS && system.alive(lock.pid); look++)
|
|
171
173
|
await system.pause();
|
|
172
174
|
if (system.alive(lock.pid))
|
|
173
|
-
return left(`asked it to stop, and it still ran after 15 s — \`${
|
|
175
|
+
return left(`asked it to stop, and it still ran after 15 s — \`${again("status")}\``);
|
|
174
176
|
const log = lockFile.replace(/\.lock$/, ".log");
|
|
175
177
|
const { [`${envPrefix}_TIMEOUT`]: _timeout, ...inherited } = env;
|
|
176
178
|
let pid;
|
|
@@ -178,7 +180,7 @@ const restartOne = async (envPrefix, lockFile, lock, env, system) => {
|
|
|
178
180
|
pid = system.spawn(launch.argv, { ...inherited, ...launch.env }, log);
|
|
179
181
|
}
|
|
180
182
|
catch (error) {
|
|
181
|
-
return left(`stopped it, and could not start it again: ${errorText(error)} — \`${
|
|
183
|
+
return left(`stopped it, and could not start it again: ${errorText(error)} — \`${again("start")}\``);
|
|
182
184
|
}
|
|
183
185
|
for (let look = 0; look < START_LOOKS; look++) {
|
|
184
186
|
const now = readHttpLock(lockFile);
|
|
@@ -186,11 +188,11 @@ const restartOne = async (envPrefix, lockFile, lock, env, system) => {
|
|
|
186
188
|
return { name, pid: lock.pid, restarted: true, from, to: now.version ?? null, newPid: pid };
|
|
187
189
|
if (!system.alive(pid)) {
|
|
188
190
|
const last = readableLog(tail(log, 5)).trim();
|
|
189
|
-
return left(`stopped it, and the new one exited before it listened${last ? `: ${last}` : ""} — \`${
|
|
191
|
+
return left(`stopped it, and the new one exited before it listened${last ? `: ${last}` : ""} — \`${again("start")}\``, { newPid: pid });
|
|
190
192
|
}
|
|
191
193
|
await system.pause();
|
|
192
194
|
}
|
|
193
|
-
return left(`started it again (PID ${pid}), and it was not listening after 30 s — \`${
|
|
195
|
+
return left(`started it again (PID ${pid}), and it was not listening after 30 s — \`${again("status")}\``, {
|
|
194
196
|
newPid: pid,
|
|
195
197
|
});
|
|
196
198
|
};
|
|
@@ -179,6 +179,9 @@ const withProfile = (command, example) => {
|
|
|
179
179
|
const top = commandPathOf(command)[0];
|
|
180
180
|
if (!profiled.has(root) || top === undefined || !takesProfile(command))
|
|
181
181
|
return example;
|
|
182
|
+
// `--profiles` names the profiles itself; a profile word beside it is refused.
|
|
183
|
+
if (example.split(" ").includes("--profiles"))
|
|
184
|
+
return example;
|
|
182
185
|
const prefix = `${root.name()} ${top}`;
|
|
183
186
|
return example === prefix || example.startsWith(`${prefix} `)
|
|
184
187
|
? `${root.name()} ${EXAMPLE_PROFILE} ${example.slice(root.name().length + 1)}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.474.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|