@yagni-app/code 1.0.5 → 1.0.7
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/README.md +89 -27
- package/dist/claudeCompat.d.ts +59 -0
- package/dist/claudeCompat.js +109 -2
- package/dist/claudePlugins.d.ts +45 -3
- package/dist/claudePlugins.js +129 -19
- package/dist/cli.js +28 -4
- package/dist/doctor.d.ts +42 -4
- package/dist/doctor.js +150 -15
- package/dist/extension/condensedTools.d.ts +12 -1
- package/dist/extension/condensedTools.js +17 -9
- package/dist/extension/index.d.ts +18 -5
- package/dist/extension/index.js +319 -72
- package/dist/extension/mcp/approval.d.ts +45 -0
- package/dist/extension/mcp/approval.js +164 -0
- package/dist/extension/mcp/auth.d.ts +124 -0
- package/dist/extension/mcp/auth.js +560 -0
- package/dist/extension/mcp/authStore.d.ts +61 -0
- package/dist/extension/mcp/authStore.js +105 -0
- package/dist/extension/mcp/callbackPage.d.ts +31 -0
- package/dist/extension/mcp/callbackPage.js +222 -0
- package/dist/extension/mcp/cliConfig.d.ts +12 -0
- package/dist/extension/mcp/cliConfig.js +12 -0
- package/dist/extension/mcp/config.d.ts +153 -0
- package/dist/extension/mcp/config.js +381 -0
- package/dist/extension/mcp/log.d.ts +28 -0
- package/dist/extension/mcp/log.js +82 -0
- package/dist/extension/mcp/manager.d.ts +100 -0
- package/dist/extension/mcp/manager.js +273 -0
- package/dist/extension/mcp/names.d.ts +25 -0
- package/dist/extension/mcp/names.js +40 -0
- package/dist/extension/mcp/panel.d.ts +33 -0
- package/dist/extension/mcp/panel.js +268 -0
- package/dist/extension/mcp/prompts.d.ts +23 -0
- package/dist/extension/mcp/prompts.js +93 -0
- package/dist/extension/mcp/startup.d.ts +55 -0
- package/dist/extension/mcp/startup.js +152 -0
- package/dist/extension/mcp/tools.d.ts +31 -0
- package/dist/extension/mcp/tools.js +117 -0
- package/dist/extension/mcp/transports.d.ts +17 -0
- package/dist/extension/mcp/transports.js +44 -0
- package/dist/extension/permission/gate.d.ts +104 -2
- package/dist/extension/permission/gate.js +387 -31
- package/dist/extension/permission/guardian.d.ts +24 -5
- package/dist/extension/permission/guardian.js +162 -24
- package/dist/extension/permissionRules/bashFileArgs.d.ts +39 -0
- package/dist/extension/permissionRules/bashFileArgs.js +236 -0
- package/dist/extension/permissionRules/engine.d.ts +50 -0
- package/dist/extension/permissionRules/engine.js +238 -0
- package/dist/extension/permissionRules/loadConfig.d.ts +53 -0
- package/dist/extension/permissionRules/loadConfig.js +90 -0
- package/dist/extension/permissionRules/parser.d.ts +38 -0
- package/dist/extension/permissionRules/parser.js +136 -0
- package/dist/extension/permissionRules/pathRules.d.ts +58 -0
- package/dist/extension/permissionRules/pathRules.js +120 -0
- package/dist/extension/permissionRules/shellRules.d.ts +52 -0
- package/dist/extension/permissionRules/shellRules.js +221 -0
- package/dist/extension/pipeline/invocation.d.ts +3 -6
- package/dist/extension/pipeline/invocation.js +3 -6
- package/dist/extension/pipeline/personas.js +5 -0
- package/dist/extension/pipeline/runner.d.ts +0 -1
- package/dist/extension/pipeline/runner.js +6 -14
- package/dist/extension/plugins/inventory.d.ts +88 -0
- package/dist/extension/plugins/inventory.js +144 -0
- package/dist/extension/plugins/panel.d.ts +45 -0
- package/dist/extension/plugins/panel.js +293 -0
- package/dist/extension/sandbox/bash.d.ts +99 -0
- package/dist/extension/sandbox/bash.js +190 -0
- package/dist/extension/sandbox/config.d.ts +114 -0
- package/dist/extension/sandbox/config.js +366 -0
- package/dist/extension/sandbox/manager.d.ts +98 -0
- package/dist/extension/sandbox/manager.js +216 -0
- package/dist/extension/sandbox/panel.d.ts +111 -0
- package/dist/extension/sandbox/panel.js +342 -0
- package/dist/extension/sandbox/session.d.ts +85 -0
- package/dist/extension/sandbox/session.js +775 -0
- package/dist/extension/telemetry/attrs.d.ts +96 -0
- package/dist/extension/telemetry/attrs.js +149 -0
- package/dist/extension/telemetry/config.d.ts +99 -0
- package/dist/extension/telemetry/config.js +193 -0
- package/dist/extension/telemetry/index.d.ts +7 -0
- package/dist/extension/telemetry/index.js +7 -0
- package/dist/extension/telemetry/probe.d.ts +29 -0
- package/dist/extension/telemetry/probe.js +122 -0
- package/dist/extension/telemetry/register.d.ts +40 -0
- package/dist/extension/telemetry/register.js +192 -0
- package/dist/extension/telemetry/sdk.d.ts +63 -0
- package/dist/extension/telemetry/sdk.js +207 -0
- package/dist/extension/telemetry/tracker.d.ts +131 -0
- package/dist/extension/telemetry/tracker.js +551 -0
- package/dist/extension/vendor/IGNORE-LICENSE-MIT +21 -0
- package/dist/extension/vendor/ignore.d.ts +86 -0
- package/dist/extension/vendor/ignore.js +788 -0
- package/dist/goHeadless.d.ts +1 -1
- package/dist/goHeadless.js +2 -2
- package/dist/launch.d.ts +4 -3
- package/dist/launch.js +7 -4
- package/dist/mcpCommand.d.ts +122 -0
- package/dist/mcpCommand.js +787 -0
- package/dist/otel.d.ts +69 -63
- package/dist/otel.js +154 -119
- package/dist/paths.d.ts +13 -0
- package/dist/paths.js +18 -0
- package/dist/pluginCommand.d.ts +43 -0
- package/dist/pluginCommand.js +499 -0
- package/dist/pluginStore.d.ts +170 -0
- package/dist/pluginStore.js +554 -0
- package/dist/upgrade.d.ts +11 -2
- package/dist/upgrade.js +48 -8
- package/package.json +20 -3
- package/dist/extension/mcpTools.d.ts +0 -57
- package/dist/extension/mcpTools.js +0 -132
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approval gate for project-scope `.mcp.json` servers, mirroring Claude Code's
|
|
3
|
+
* decision shape: a `.mcp.json` in the repo (shared, VCS-controlled) cannot
|
|
4
|
+
* spawn processes until the user has approved it. Choices live in the
|
|
5
|
+
* per-project entry of `~/.yagni-code/mcp.json` under Claude Code's exact key
|
|
6
|
+
* names (`enabledMcpjsonServers` / `disabledMcpjsonServers` /
|
|
7
|
+
* `enableAllProjectMcpServers`), so a decision made in one tool is respected
|
|
8
|
+
* by the other.
|
|
9
|
+
*/
|
|
10
|
+
import { mcpConfigPath, readProjectMcpConfig, readUserMcpConfig, writeUserMcpConfig, } from "./config.js";
|
|
11
|
+
/** Read the approval state for one project (abs path). Missing file/entry → fresh state. */
|
|
12
|
+
export function readProjectApproval(repoRoot) {
|
|
13
|
+
const { file, errors } = readUserMcpConfig();
|
|
14
|
+
const entry = (file.projects ?? {})[repoRoot] ?? {};
|
|
15
|
+
return {
|
|
16
|
+
state: {
|
|
17
|
+
enabledMcpjsonServers: entry.enabledMcpjsonServers ?? [],
|
|
18
|
+
disabledMcpjsonServers: entry.disabledMcpjsonServers ?? [],
|
|
19
|
+
enableAllProjectMcpServers: entry.enableAllProjectMcpServers ?? false,
|
|
20
|
+
},
|
|
21
|
+
errors,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** Effective decision for one project-scope server. Undecided by default. */
|
|
25
|
+
export function decisionFor(state, serverName) {
|
|
26
|
+
if (state.enableAllProjectMcpServers)
|
|
27
|
+
return "enabled";
|
|
28
|
+
if (state.enabledMcpjsonServers.includes(serverName))
|
|
29
|
+
return "enabled";
|
|
30
|
+
if (state.disabledMcpjsonServers.includes(serverName))
|
|
31
|
+
return "disabled";
|
|
32
|
+
return "undecided";
|
|
33
|
+
}
|
|
34
|
+
/** Which configured project servers await a decision (drives the session-start prompt). */
|
|
35
|
+
export function undecidedProjectServers(state, projectServerNames) {
|
|
36
|
+
return projectServerNames.filter((name) => decisionFor(state, name) === "undecided");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Record a decision. `enableAll: true` mirrors Claude Code's "Yes, approve all
|
|
40
|
+
* project servers in this repo" (sets the blanket flag); a single enable/disable
|
|
41
|
+
* appends to the corresponding list. Idempotent.
|
|
42
|
+
*/
|
|
43
|
+
export function recordProjectDecision(repoRoot, serverName, decision) {
|
|
44
|
+
const { file, errors } = readUserMcpConfig();
|
|
45
|
+
if (errors.length > 0)
|
|
46
|
+
return { errors };
|
|
47
|
+
const projects = file.projects ?? {};
|
|
48
|
+
const entry = projects[repoRoot] ?? {};
|
|
49
|
+
if (serverName === "all") {
|
|
50
|
+
if (decision === "enabled") {
|
|
51
|
+
projects[repoRoot] = { ...entry, enableAllProjectMcpServers: true };
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
// "Disable all" clears the blanket flag and marks every current server
|
|
55
|
+
// disabled by name (a new server added to .mcp.json later re-prompts).
|
|
56
|
+
const projectServerNames = currentProjectServerNames(repoRoot);
|
|
57
|
+
projects[repoRoot] = {
|
|
58
|
+
...entry,
|
|
59
|
+
enableAllProjectMcpServers: false,
|
|
60
|
+
enabledMcpjsonServers: [],
|
|
61
|
+
disabledMcpjsonServers: projectServerNames,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const enabled = new Set(entry.enabledMcpjsonServers ?? []);
|
|
67
|
+
const disabled = new Set(entry.disabledMcpjsonServers ?? []);
|
|
68
|
+
if (decision === "enabled") {
|
|
69
|
+
enabled.add(serverName);
|
|
70
|
+
disabled.delete(serverName);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
disabled.add(serverName);
|
|
74
|
+
enabled.delete(serverName);
|
|
75
|
+
}
|
|
76
|
+
projects[repoRoot] = {
|
|
77
|
+
...entry,
|
|
78
|
+
enabledMcpjsonServers: [...enabled],
|
|
79
|
+
disabledMcpjsonServers: [...disabled],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
file.projects = projects;
|
|
83
|
+
try {
|
|
84
|
+
writeUserMcpConfig(file);
|
|
85
|
+
return { errors: [] };
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
return {
|
|
89
|
+
errors: [
|
|
90
|
+
{
|
|
91
|
+
sourcePath: mcpConfigPath(),
|
|
92
|
+
message: `could not persist approval decision (${err instanceof Error ? err.message : String(err)})`,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function currentProjectServerNames(repoRoot) {
|
|
99
|
+
// Read fresh so a just-edited .mcp.json is reflected in a "disable all" write.
|
|
100
|
+
return Object.keys(readProjectMcpConfig(repoRoot).servers);
|
|
101
|
+
}
|
|
102
|
+
/** Clear this project's `.mcp.json` decisions (`yagni mcp reset-project-choices`). */
|
|
103
|
+
export function resetProjectChoices(repoRoot) {
|
|
104
|
+
const { file, errors } = readUserMcpConfig();
|
|
105
|
+
if (errors.length > 0)
|
|
106
|
+
return { errors };
|
|
107
|
+
const projects = file.projects ?? {};
|
|
108
|
+
const entry = projects[repoRoot] ?? {};
|
|
109
|
+
delete entry.enabledMcpjsonServers;
|
|
110
|
+
delete entry.disabledMcpjsonServers;
|
|
111
|
+
delete entry.enableAllProjectMcpServers;
|
|
112
|
+
// Keep the entry only if it still carries local servers; otherwise drop it.
|
|
113
|
+
if (Object.keys(entry).length > 0)
|
|
114
|
+
projects[repoRoot] = entry;
|
|
115
|
+
else
|
|
116
|
+
delete projects[repoRoot];
|
|
117
|
+
file.projects = projects;
|
|
118
|
+
try {
|
|
119
|
+
writeUserMcpConfig(file);
|
|
120
|
+
return { errors: [] };
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
return {
|
|
124
|
+
errors: [
|
|
125
|
+
{
|
|
126
|
+
sourcePath: mcpConfigPath(),
|
|
127
|
+
message: `could not reset project choices (${err instanceof Error ? err.message : String(err)})`,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Mutate `~/.yagni-code/mcp.json`'s per-project entry under a read-modify-write
|
|
135
|
+
* helper shared with CLI commands (add/remove at local scope).
|
|
136
|
+
*/
|
|
137
|
+
export function updateProjectEntry(repoRoot, mutate) {
|
|
138
|
+
const { file, errors } = readUserMcpConfig();
|
|
139
|
+
if (errors.length > 0)
|
|
140
|
+
return { errors };
|
|
141
|
+
const projects = file.projects ?? {};
|
|
142
|
+
const entry = projects[repoRoot] ?? {};
|
|
143
|
+
mutate(entry);
|
|
144
|
+
if (Object.keys(entry).length > 0)
|
|
145
|
+
projects[repoRoot] = entry;
|
|
146
|
+
else
|
|
147
|
+
delete projects[repoRoot];
|
|
148
|
+
file.projects = projects;
|
|
149
|
+
try {
|
|
150
|
+
writeUserMcpConfig(file);
|
|
151
|
+
return { errors: [] };
|
|
152
|
+
}
|
|
153
|
+
catch (err) {
|
|
154
|
+
return {
|
|
155
|
+
errors: [
|
|
156
|
+
{
|
|
157
|
+
sourcePath: mcpConfigPath(),
|
|
158
|
+
message: `could not persist project entry (${err instanceof Error ? err.message : String(err)})`,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=approval.js.map
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth 2.1 for MCP servers over HTTP/SSE transports, mirroring Claude Code's
|
|
3
|
+
* flow but keeping it to the application layer: the MCP SDK
|
|
4
|
+
* (`@modelcontextprotocol/sdk/client/auth.js`) already implements discovery,
|
|
5
|
+
* DCR, PKCE, token refresh, and the authorization-code exchange. This module
|
|
6
|
+
* is the glue the SDK needs from us:
|
|
7
|
+
*
|
|
8
|
+
* - `YagniAuthProvider` implements `OAuthClientProvider`: reflects our
|
|
9
|
+
* client metadata, persists DCR client info + tokens in the auth store,
|
|
10
|
+
* and captures the authorization URL when the SDK redirects.
|
|
11
|
+
* - `authenticate()` drives the interactive flow: SDK `auth()` (no code) →
|
|
12
|
+
* REDIRECT + authorization URL → open browser → loopback listener on
|
|
13
|
+
* 127.0.0.1 → validate `state` → SDK `auth()` with the code → AUTHORIZED.
|
|
14
|
+
* - `revokeServerTokens()` revokes access + refresh tokens (RFC 7009) when a
|
|
15
|
+
* server is removed — refresh first, access second, both best-effort.
|
|
16
|
+
*
|
|
17
|
+
* Loopback + redirect semantics follow RFC 8252: bind 127.0.0.1 on a random
|
|
18
|
+
* high port (or a fixed `oauth.callbackPort`), redirect_uri path `/callback`,
|
|
19
|
+
* and validate the returned `state` to prevent CSRF.
|
|
20
|
+
*/
|
|
21
|
+
import { type OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
22
|
+
import type { AuthorizationServerMetadata, OAuthClientInformationMixed, OAuthClientMetadata, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
|
|
23
|
+
import type { McpHttpServerConfig } from "./config.js";
|
|
24
|
+
export interface AuthDeps {
|
|
25
|
+
/** Open a URL in the browser; injected for tests, default is a best-effort opener. */
|
|
26
|
+
openUrl?: (url: string) => Promise<void>;
|
|
27
|
+
/** Traditional fetch for revocation (SDK auth uses its own fetch). */
|
|
28
|
+
fetch?: typeof fetch;
|
|
29
|
+
}
|
|
30
|
+
export type OAuthResult = {
|
|
31
|
+
result: "AUTHORIZED";
|
|
32
|
+
tokens?: OAuthTokens;
|
|
33
|
+
};
|
|
34
|
+
/** Cancellation via an AbortSignal (Ctrl-C / Esc in the /mcp panel). */
|
|
35
|
+
export declare class AuthenticationCancelledError extends Error {
|
|
36
|
+
constructor(message?: string);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Escape a provider-controlled string for interpolation into the loopback
|
|
40
|
+
* callback page's HTML. Dependency-free equivalent of the `xss` filter Claude
|
|
41
|
+
* Code applies at this exact spot: `&`, `<`, `>`, quotes → entities.
|
|
42
|
+
*/
|
|
43
|
+
export declare function escapeHtml(value: string): string;
|
|
44
|
+
/** Five-minute loopback wait, matching Claude Code's `Authentication timeout`. */
|
|
45
|
+
export declare const OAuthFlowTimeoutMs: number;
|
|
46
|
+
/**
|
|
47
|
+
* Wrap the fetch used by an OAuth transport so a failed silent token-refresh
|
|
48
|
+
* POST is recorded with its HTTP status + OAuth error code — the exact thing
|
|
49
|
+
* that is otherwise invisible when a cached token's refresh fails at connect
|
|
50
|
+
* time and the SDK falls through to `REDIRECT`. The response is cloned before
|
|
51
|
+
* inspection so the SDK's own `parseErrorResponse` still reads the original
|
|
52
|
+
* body untouched.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instrumentOAuthFetch(serverName: string, baseFetch?: typeof fetch): typeof fetch;
|
|
55
|
+
/** Fallback loopback port for the transport-level (refresh-only) provider. */
|
|
56
|
+
export declare const DEFAULT_REDIRECT_PORT = 42000;
|
|
57
|
+
/**
|
|
58
|
+
* Build a provider for a server at connect time. The redirect URL is only used
|
|
59
|
+
* when the SDK needs to (re)authorize; refresh- and access-token paths ignore
|
|
60
|
+
* it, so a stable default port is fine here. `authenticate()` binds its own
|
|
61
|
+
* fresh port and builds a dedicated provider for the interactive flow.
|
|
62
|
+
*/
|
|
63
|
+
export declare function authProviderForServer(serverName: string, config: McpHttpServerConfig, redirectUrl?: string): YagniAuthProvider;
|
|
64
|
+
/**
|
|
65
|
+
* The OAuthClientProvider the SDK drives. One instance per connection; the DCR
|
|
66
|
+
* client info and tokens persist in the auth store (not in memory) so a
|
|
67
|
+
* reconnect reads what the previous connection stored.
|
|
68
|
+
*/
|
|
69
|
+
export declare class YagniAuthProvider implements OAuthClientProvider {
|
|
70
|
+
readonly serverName: string;
|
|
71
|
+
private config;
|
|
72
|
+
private redirectUri;
|
|
73
|
+
private _codeVerifier;
|
|
74
|
+
private _state;
|
|
75
|
+
private _authorizationUrl;
|
|
76
|
+
constructor(serverName: string, config: McpHttpServerConfig, redirectUri: string);
|
|
77
|
+
get redirectUrl(): string;
|
|
78
|
+
/** The authorization URL the SDK last asked us to redirect to. */
|
|
79
|
+
get authorizationUrl(): string | undefined;
|
|
80
|
+
get clientMetadata(): OAuthClientMetadata;
|
|
81
|
+
state(): Promise<string>;
|
|
82
|
+
clientInformation(): Promise<OAuthClientInformationMixed | undefined>;
|
|
83
|
+
saveClientInformation(info: OAuthClientInformationMixed): Promise<void>;
|
|
84
|
+
tokens(): Promise<OAuthTokens | undefined>;
|
|
85
|
+
saveTokens(tokens: OAuthTokens): Promise<void>;
|
|
86
|
+
saveCodeVerifier(codeVerifier: string): Promise<void>;
|
|
87
|
+
codeVerifier(): Promise<string>;
|
|
88
|
+
redirectToAuthorization(authorizationUrl: URL): Promise<void>;
|
|
89
|
+
invalidateCredentials(scope: "all" | "client" | "tokens" | "verifier" | "discovery"): Promise<void>;
|
|
90
|
+
}
|
|
91
|
+
export declare function authenticate(serverName: string, config: McpHttpServerConfig, deps?: AuthDeps, opts?: {
|
|
92
|
+
signal?: AbortSignal;
|
|
93
|
+
timeoutMs?: number;
|
|
94
|
+
serverUrl?: string;
|
|
95
|
+
}): Promise<OAuthResult>;
|
|
96
|
+
/** Find a free loopback port (OS-assigned). */
|
|
97
|
+
export declare function findFreePort(): Promise<number>;
|
|
98
|
+
export declare function buildRedirectUri(port: number): string;
|
|
99
|
+
type CodeOutcomeEvent = "oauth_callback_code" | "oauth_callback_error" | "oauth_callback_state_mismatch" | "oauth_timeout" | "oauth_cancelled";
|
|
100
|
+
export interface WaitForCodeOpts {
|
|
101
|
+
/** Cancel the wait (Ctrl-C / Esc). Resolves with undefined via AuthenticationCancelledError → mapped by caller. */
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
/** Loopback wait duration before giving up (Claude Code parity: 5 minutes). */
|
|
104
|
+
timeoutMs?: number;
|
|
105
|
+
/** Structured log sink (injected so the helper stays free of the logger). */
|
|
106
|
+
onEvent?: (event: CodeOutcomeEvent, fields: Record<string, unknown>) => void;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Revoke access + refresh tokens on the server (RFC 7009) — refresh first,
|
|
110
|
+
* access second, both best-effort. Public clients put client_id in the body
|
|
111
|
+
* (no Authorization header); a 401 falls back to Bearer auth for
|
|
112
|
+
* non-compliant servers (CC parity). Never throws.
|
|
113
|
+
*/
|
|
114
|
+
export declare function revokeServerTokens(serverName: string, config: McpHttpServerConfig, metadata: AuthorizationServerMetadata, clientInfo: OAuthClientInformationMixed, deps?: AuthDeps): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Revoke tokens + clear stored credentials for a server being removed. Runs
|
|
117
|
+
* RFC 9728/8414 discovery to find the revocation endpoint, revokes (refresh →
|
|
118
|
+
* access, best-effort), then deletes the local auth store entry. Callers use
|
|
119
|
+
* this so `yagni mcp remove` also logs the server out rather than orphaning
|
|
120
|
+
* live tokens on disk. Never throws — a failed revoke must not block removal.
|
|
121
|
+
*/
|
|
122
|
+
export declare function revokeTokensOnRemove(serverName: string, config: McpHttpServerConfig, deps?: AuthDeps): Promise<void>;
|
|
123
|
+
export {};
|
|
124
|
+
//# sourceMappingURL=auth.d.ts.map
|