Skip to content

Commit d2da7cc

Browse files
Address PR #1242 follow-up items
- Restore spec.types.ts docstring header via npm run fetch:spec-types - Remove debugging console.log from spec.types.test.ts - Revert unrelated timeout increase in streamableHttp.test.ts
1 parent a606fb1 commit d2da7cc

File tree

3 files changed

+29
-21
lines changed

3 files changed

+29
-21
lines changed

src/spec.types.ts

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
/* JSON-RPC types */
1+
/**
2+
* This file is automatically generated from the Model Context Protocol specification.
3+
*
4+
* Source: https://github.com/modelcontextprotocol/modelcontextprotocol
5+
* Pulled from: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/schema/draft/schema.ts
6+
* Last updated from commit: 35fa160caf287a9c48696e3ae452c0645c713669
7+
*
8+
* DO NOT EDIT THIS FILE MANUALLY. Changes will be overwritten by automated updates.
9+
* To update this file, run: npm run fetch:spec-types
10+
*//* JSON-RPC types */
211

312
/**
413
* Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
@@ -11,7 +20,7 @@ export type JSONRPCMessage =
1120
| JSONRPCResponse;
1221

1322
/** @internal */
14-
export const LATEST_PROTOCOL_VERSION = "2025-11-25";
23+
export const LATEST_PROTOCOL_VERSION = "DRAFT-2026-v1";
1524
/** @internal */
1625
export const JSONRPC_VERSION = "2.0";
1726

@@ -52,7 +61,7 @@ export interface TaskAugmentedRequestParams extends RequestParams {
5261
*/
5362
export interface RequestParams {
5463
/**
55-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
64+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
5665
*/
5766
_meta?: {
5867
/**
@@ -74,7 +83,7 @@ export interface Request {
7483
/** @internal */
7584
export interface NotificationParams {
7685
/**
77-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
86+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
7887
*/
7988
_meta?: { [key: string]: unknown };
8089
}
@@ -92,7 +101,7 @@ export interface Notification {
92101
*/
93102
export interface Result {
94103
/**
95-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
104+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
96105
*/
97106
_meta?: { [key: string]: unknown };
98107
[key: string]: unknown;
@@ -830,7 +839,7 @@ export interface Resource extends BaseMetadata, Icons {
830839
size?: number;
831840

832841
/**
833-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
842+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
834843
*/
835844
_meta?: { [key: string]: unknown };
836845
}
@@ -866,7 +875,7 @@ export interface ResourceTemplate extends BaseMetadata, Icons {
866875
annotations?: Annotations;
867876

868877
/**
869-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
878+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
870879
*/
871880
_meta?: { [key: string]: unknown };
872881
}
@@ -889,7 +898,7 @@ export interface ResourceContents {
889898
mimeType?: string;
890899

891900
/**
892-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
901+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
893902
*/
894903
_meta?: { [key: string]: unknown };
895904
}
@@ -991,7 +1000,7 @@ export interface Prompt extends BaseMetadata, Icons {
9911000
arguments?: PromptArgument[];
9921001

9931002
/**
994-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1003+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
9951004
*/
9961005
_meta?: { [key: string]: unknown };
9971006
}
@@ -1061,7 +1070,7 @@ export interface EmbeddedResource {
10611070
annotations?: Annotations;
10621071

10631072
/**
1064-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1073+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
10651074
*/
10661075
_meta?: { [key: string]: unknown };
10671076
}
@@ -1289,7 +1298,7 @@ export interface Tool extends BaseMetadata, Icons {
12891298
annotations?: ToolAnnotations;
12901299

12911300
/**
1292-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1301+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
12931302
*/
12941303
_meta?: { [key: string]: unknown };
12951304
}
@@ -1679,7 +1688,7 @@ export interface SamplingMessage {
16791688
role: Role;
16801689
content: SamplingMessageContentBlock | SamplingMessageContentBlock[];
16811690
/**
1682-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1691+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
16831692
*/
16841693
_meta?: { [key: string]: unknown };
16851694
}
@@ -1756,7 +1765,7 @@ export interface TextContent {
17561765
annotations?: Annotations;
17571766

17581767
/**
1759-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1768+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
17601769
*/
17611770
_meta?: { [key: string]: unknown };
17621771
}
@@ -1787,7 +1796,7 @@ export interface ImageContent {
17871796
annotations?: Annotations;
17881797

17891798
/**
1790-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1799+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
17911800
*/
17921801
_meta?: { [key: string]: unknown };
17931802
}
@@ -1818,7 +1827,7 @@ export interface AudioContent {
18181827
annotations?: Annotations;
18191828

18201829
/**
1821-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1830+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
18221831
*/
18231832
_meta?: { [key: string]: unknown };
18241833
}
@@ -1852,7 +1861,7 @@ export interface ToolUseContent {
18521861
* Optional metadata about the tool use. Clients SHOULD preserve this field when
18531862
* including tool uses in subsequent sampling requests to enable caching optimizations.
18541863
*
1855-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1864+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
18561865
*/
18571866
_meta?: { [key: string]: unknown };
18581867
}
@@ -1899,7 +1908,7 @@ export interface ToolResultContent {
18991908
* Optional metadata about the tool result. Clients SHOULD preserve this field when
19001909
* including tool results in subsequent sampling requests to enable caching optimizations.
19011910
*
1902-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
1911+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
19031912
*/
19041913
_meta?: { [key: string]: unknown };
19051914
}
@@ -2127,7 +2136,7 @@ export interface Root {
21272136
name?: string;
21282137

21292138
/**
2130-
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
2139+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
21312140
*/
21322141
_meta?: { [key: string]: unknown };
21332142
}
@@ -2575,4 +2584,4 @@ export type ServerResult =
25752584
| GetTaskResult
25762585
| GetTaskPayloadResult
25772586
| ListTasksResult
2578-
| CancelTaskResult;
2587+
| CancelTaskResult;

test/server/streamableHttp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ describe.each(zodTestMatrix)('$zodVersionLabel', (entry: ZodMatrixEntry) => {
22852285

22862286
// Verify we received the notification that was sent while disconnected
22872287
expect(allText).toContain('Missed while disconnected');
2288-
}, 15000);
2288+
}, 10000);
22892289
});
22902290

22912291
// Test onsessionclosed callback

test/spec.types.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,6 @@ describe('Spec Types', () => {
729729
}
730730
}
731731

732-
console.log(missingTests);
733732
expect(missingTests).toHaveLength(0);
734733
});
735734

0 commit comments

Comments
 (0)