@wirecat/cli-core 0.485.0 → 0.486.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
|
@@ -7,6 +7,15 @@ shape of this file.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## 0.486.0 — 30.10.2026
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **A messenger's `mcp revoke`, `mcp server stop` and `mcp server status` with no profile say what the profile is
|
|
15
|
+
for.** They refused with "name the profiles to serve", the words of `mcp serve`. Now: "name the profiles whose
|
|
16
|
+
browser logins to forget", "… whose server to stop", "… whose server to check". `mcp serve`, `mcp server start` and
|
|
17
|
+
`mcp config` keep "to serve". Same exit 2 and `details.profiles`.
|
|
18
|
+
|
|
10
19
|
## 0.485.0 — 30.10.2026
|
|
11
20
|
|
|
12
21
|
### Fixed
|
|
@@ -42,7 +42,7 @@ export interface ProfileSet {
|
|
|
42
42
|
export declare const servedProfiles: (self: Command, messenger: Pick<Messenger, "app" | "resolveSettings">, { settings, env }: {
|
|
43
43
|
settings: Pick<Settings, "profile" | "sources" | "profilesHere">;
|
|
44
44
|
env: NodeJS.ProcessEnv;
|
|
45
|
-
}, given: string | undefined, words: string) => {
|
|
45
|
+
}, given: string | undefined, words: string, purpose?: string) => {
|
|
46
46
|
profile: string;
|
|
47
47
|
} | {
|
|
48
48
|
set: ProfileSet;
|
|
@@ -23,13 +23,17 @@ const DEFAULT_PORT = MCP_HTTP_DEFAULT_PORT;
|
|
|
23
23
|
export const ALL_PROFILES = "_all";
|
|
24
24
|
/** `--profiles all`; a profile named `all` is served alone, as `<tool> all mcp serve`. */
|
|
25
25
|
export const EVERY_PROFILE = "all";
|
|
26
|
+
const SERVER_PURPOSE = {
|
|
27
|
+
stop: "whose server to stop",
|
|
28
|
+
status: "whose server to check",
|
|
29
|
+
};
|
|
26
30
|
/**
|
|
27
31
|
* The profile or profiles an MCP server is for, always named (NEED-1881, WC-MCP-9): a leading profile, or
|
|
28
32
|
* `--profiles` with a list or `all`. Neither, or both, is refused with the profiles on this computer. `--profiles`
|
|
29
33
|
* takes the place of `<PREFIX>_PROFILE`; under `<PREFIX>_PROFILE_LOCK` it may name the locked profile only
|
|
30
34
|
* (WC-ACCT-5).
|
|
31
35
|
*/
|
|
32
|
-
export const servedProfiles = (self, messenger, { settings, env }, given, words) => {
|
|
36
|
+
export const servedProfiles = (self, messenger, { settings, env }, given, words, purpose = "to serve") => {
|
|
33
37
|
const { app } = messenger;
|
|
34
38
|
const here = settings.profilesHere;
|
|
35
39
|
const listed = `profiles here: ${here.length > 0 ? here.join(", ") : "none"}`;
|
|
@@ -42,7 +46,7 @@ export const servedProfiles = (self, messenger, { settings, env }, given, words)
|
|
|
42
46
|
if (given === undefined) {
|
|
43
47
|
if (here.length === 0)
|
|
44
48
|
throw new NoProfileHere(app);
|
|
45
|
-
throw new CliError("validation_error", `name the profiles
|
|
49
|
+
throw new CliError("validation_error", `name the profiles ${purpose}: \`${app.command} <profile> ${words}\`, or \`${app.command} ${words} --profiles ` +
|
|
46
50
|
`<a,b>\` or \`--profiles all\` — ${listed}`, { profiles: here });
|
|
47
51
|
}
|
|
48
52
|
const names = [...new Set(given.split(",").map((one) => one.trim()))].filter(Boolean).sort();
|
|
@@ -149,7 +153,7 @@ export const mcpGroup = (host) => {
|
|
|
149
153
|
.summary("forget every login given to a browser app")
|
|
150
154
|
.description("forget every login `mcp serve --http` gave a browser app, of this profile or of the server `--profiles` names; each app must log in again")).action(async function () {
|
|
151
155
|
const context = host.context(this, { needsProfile: false });
|
|
152
|
-
const served = servedProfiles(this, host, context, this.opts().profiles, "mcp revoke");
|
|
156
|
+
const served = servedProfiles(this, host, context, this.opts().profiles, "mcp revoke", "whose browser logins to forget");
|
|
153
157
|
const { revokeAll } = await import("../../mcp/http/oauth.js");
|
|
154
158
|
revokeAll(httpTokenFile(app, "set" in served ? served.set.key : served.profile, context.env));
|
|
155
159
|
renderAnswer(this, context, itemOf("set" in served
|
|
@@ -163,7 +167,7 @@ export const mcpGroup = (host) => {
|
|
|
163
167
|
target: (self) => {
|
|
164
168
|
const context = host.context(self, { needsProfile: false });
|
|
165
169
|
const { env } = context;
|
|
166
|
-
const served = servedProfiles(self, host, context, self.opts().profiles, `mcp server ${self.name()}
|
|
170
|
+
const served = servedProfiles(self, host, context, self.opts().profiles, `mcp server ${self.name()}`, SERVER_PURPOSE[self.name()]);
|
|
167
171
|
if ("set" in served) {
|
|
168
172
|
const { set } = served;
|
|
169
173
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.486.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",
|