@wrongstack/mcp 1.0.33 → 1.0.35
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/client-hosts.d.ts +13 -0
- package/dist/client-http-connection.d.ts +3 -1
- package/dist/client-internals.d.ts +60 -0
- package/dist/client-lifecycle.d.ts +22 -0
- package/dist/client-stdio-protocol.d.ts +3 -0
- package/dist/client-stdio-request.d.ts +21 -0
- package/dist/client-types.d.ts +8 -0
- package/dist/client.d.ts +38 -22
- package/dist/constants.d.ts +58 -7
- package/dist/contracts.d.ts +36 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2559 -2180
- package/dist/protocol.d.ts +41 -0
- package/dist/registry-authorization.d.ts +7 -5
- package/dist/registry-catalog-operations.d.ts +7 -0
- package/dist/registry-contexts.d.ts +11 -0
- package/dist/registry-describe.d.ts +39 -0
- package/dist/registry-internals.d.ts +57 -0
- package/dist/registry-runtime.d.ts +101 -0
- package/dist/registry-server-lifecycle.d.ts +42 -0
- package/dist/registry-slot-events.d.ts +32 -0
- package/dist/registry-slots.d.ts +10 -0
- package/dist/registry.d.ts +14 -105
- package/dist/server-dispatch.d.ts +37 -3
- package/dist/server.d.ts +1 -1
- package/dist/transport-base.d.ts +15 -1
- package/package.json +2 -2
package/dist/transport-base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as https from 'node:https';
|
|
|
2
2
|
import { type MCPAuthorizationProvider } from './authorization.js';
|
|
3
3
|
import type { ConnectionState, MCPTool } from './contracts.js';
|
|
4
4
|
import { type ServerRequest, ServerRequestResponder } from './elicitation.js';
|
|
5
|
-
import type { MCPServerMetadata } from './protocol.js';
|
|
5
|
+
import type { MCPLogMessageNotification, MCPProgressNotification, MCPServerMetadata } from './protocol.js';
|
|
6
6
|
import { type TransportDnsLookup } from './transport-security.js';
|
|
7
7
|
export interface HttpTransportOptions {
|
|
8
8
|
name: string;
|
|
@@ -86,6 +86,9 @@ export declare abstract class BaseHTTPTransport {
|
|
|
86
86
|
protected readonly resourcesChangedListeners: Set<() => void>;
|
|
87
87
|
protected readonly resourceUpdatedListeners: Set<(uri: string) => void>;
|
|
88
88
|
protected readonly promptsChangedListeners: Set<() => void>;
|
|
89
|
+
protected readonly progressListeners: Set<(progress: MCPProgressNotification) => void>;
|
|
90
|
+
protected readonly logMessageListeners: Set<(log: MCPLogMessageNotification) => void>;
|
|
91
|
+
private progressTokenCounter;
|
|
89
92
|
protected protocolVersion?: string | undefined;
|
|
90
93
|
protected readonly serverRequests: ServerRequestResponder;
|
|
91
94
|
constructor(opts: HttpTransportOptions, transportName: string);
|
|
@@ -98,6 +101,8 @@ export declare abstract class BaseHTTPTransport {
|
|
|
98
101
|
onResourcesChanged(cb: () => void): () => void;
|
|
99
102
|
onPromptsChanged(cb: () => void): () => void;
|
|
100
103
|
onResourceUpdated(cb: (uri: string) => void): () => void;
|
|
104
|
+
onProgress(cb: (progress: MCPProgressNotification) => void): () => void;
|
|
105
|
+
onLogMessage(cb: (log: MCPLogMessageNotification) => void): () => void;
|
|
101
106
|
/**
|
|
102
107
|
* Fire all disconnect handlers. Subclasses call this when the connection
|
|
103
108
|
* drops so the registry can schedule reconnects.
|
|
@@ -106,6 +111,15 @@ export declare abstract class BaseHTTPTransport {
|
|
|
106
111
|
protected notifyResourcesChanged(): void;
|
|
107
112
|
protected notifyPromptsChanged(): void;
|
|
108
113
|
protected notifyResourceUpdated(uri: string): void;
|
|
114
|
+
protected notifyProgress(progress: MCPProgressNotification): void;
|
|
115
|
+
protected notifyLogMessage(log: MCPLogMessageNotification): void;
|
|
116
|
+
/**
|
|
117
|
+
* Fresh `params._meta.progressToken` for a request that opts into
|
|
118
|
+
* `notifications/progress` (2024-11-05 progress utility). Unique per
|
|
119
|
+
* transport, so `(server name, token)` identifies the in-flight request a
|
|
120
|
+
* progress notification belongs to.
|
|
121
|
+
*/
|
|
122
|
+
protected nextProgressToken(): string;
|
|
109
123
|
private dispatcherFetch;
|
|
110
124
|
private pinnedDispatcher;
|
|
111
125
|
private applyPinnedDispatcher;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack Model Context Protocol client and registry: stdio, SSE, and streamable HTTP transports.",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"!dist/**/*.map"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@wrongstack/core": "1.0.
|
|
29
|
+
"@wrongstack/core": "1.0.35",
|
|
30
30
|
"undici": "^8.10.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|