@wrongstack/mcp 1.0.9 → 1.0.11
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/authorization.d.ts +6 -0
- package/dist/client.d.ts +8 -0
- package/dist/index.js +430 -191
- package/dist/registry-connect-loop.d.ts +1 -0
- package/dist/registry-slots.d.ts +11 -1
- package/dist/registry-types.d.ts +6 -0
- package/dist/registry.d.ts +31 -1
- package/dist/sse-reader.d.ts +8 -0
- package/dist/token-store.d.ts +2 -0
- package/dist/tool-schema.d.ts +14 -0
- package/dist/transport-jsonrpc.d.ts +6 -0
- package/dist/transport-sse.d.ts +25 -3
- package/dist/transport-streamable.d.ts +1 -0
- package/package.json +2 -2
package/dist/authorization.d.ts
CHANGED
|
@@ -102,6 +102,12 @@ export interface MCPAuthorizationProvider {
|
|
|
102
102
|
/** Refresh/discover/reauthorize. Return true to retry the HTTP request once. */
|
|
103
103
|
handleUnauthorized?(challenge: MCPAuthorizationChallenge, context: MCPAuthorizationContext): Promise<boolean>;
|
|
104
104
|
}
|
|
105
|
+
/** Non-2xx answer from an OAuth endpoint, carrying the HTTP status. */
|
|
106
|
+
export declare class MCPOAuthHttpError extends Error {
|
|
107
|
+
readonly status: number;
|
|
108
|
+
readonly name = "MCPOAuthHttpError";
|
|
109
|
+
constructor(message: string, status: number);
|
|
110
|
+
}
|
|
105
111
|
export declare function canonicalMcpResource(rawUrl: string): string;
|
|
106
112
|
export declare function authorizationHeaderForToken(token: MCPAccessToken, expectedResource: string, now?: number): string;
|
|
107
113
|
export declare function parseMcpBearerChallenge(header: string | null, resource: string): MCPAuthorizationChallenge;
|
package/dist/client.d.ts
CHANGED
|
@@ -13,6 +13,14 @@ export interface MCPClientOptions {
|
|
|
13
13
|
headers?: Record<string, string> | undefined;
|
|
14
14
|
startupTimeoutMs?: number | undefined;
|
|
15
15
|
requestTimeoutMs?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Working directory for a stdio server process. Presets address the project
|
|
18
|
+
* as `--project-root .` / `server-filesystem .`, which resolve against the
|
|
19
|
+
* spawn cwd — without this the child inherited WrongStack's PROCESS cwd, so
|
|
20
|
+
* a host serving a project from elsewhere (WebUI, ACP sessions with their
|
|
21
|
+
* own cwd) pointed those servers at the wrong directory.
|
|
22
|
+
*/
|
|
23
|
+
cwd?: string | undefined;
|
|
16
24
|
/** Host-owned, vault-backed authorization for HTTP transports. */
|
|
17
25
|
authorizationProvider?: MCPAuthorizationProvider | undefined;
|
|
18
26
|
/**
|