@wrongstack/mcp 1.0.32 → 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.
@@ -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.32",
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.32",
29
+ "@wrongstack/core": "1.0.35",
30
30
  "undici": "^8.10.2"
31
31
  },
32
32
  "devDependencies": {