tmcp 1.8.0 → 1.8.2
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/package.json +7 -5
- package/src/types/index.d.ts +946 -0
- package/src/types/index.d.ts.map +61 -0
- package/src/adapter.d.ts +0 -16
- package/src/index.d.ts +0 -140
- package/src/validation/index.d.ts +0 -4319
- package/src/validation/version.d.ts +0 -85
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if a protocol version is supported
|
|
3
|
-
* @param {string} version - The protocol version to check
|
|
4
|
-
* @returns {boolean} True if the version is supported
|
|
5
|
-
*/
|
|
6
|
-
export function is_supported_version(version: string): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Get the latest supported protocol version
|
|
9
|
-
* @returns {string} The latest protocol version
|
|
10
|
-
*/
|
|
11
|
-
export function get_latest_version(): string;
|
|
12
|
-
/**
|
|
13
|
-
* Get all supported protocol versions
|
|
14
|
-
* @returns {string[]} Array of supported protocol versions
|
|
15
|
-
*/
|
|
16
|
-
export function get_supported_versions(): string[];
|
|
17
|
-
/**
|
|
18
|
-
* Compare two protocol versions
|
|
19
|
-
* @param {string} version1 - First version to compare
|
|
20
|
-
* @param {string} version2 - Second version to compare
|
|
21
|
-
* @returns {number} -1 if version1 < version2, 0 if equal, 1 if version1 > version2
|
|
22
|
-
*/
|
|
23
|
-
export function compare_versions(version1: string, version2: string): number;
|
|
24
|
-
/**
|
|
25
|
-
* Check if a protocol version is newer than another
|
|
26
|
-
* @param {string} version1 - Version to check
|
|
27
|
-
* @param {string} version2 - Version to compare against
|
|
28
|
-
* @returns {boolean} True if version1 is newer than version2
|
|
29
|
-
*/
|
|
30
|
-
export function is_newer_version(version1: string, version2: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Check if a protocol version is older than another
|
|
33
|
-
* @param {string} version1 - Version to check
|
|
34
|
-
* @param {string} version2 - Version to compare against
|
|
35
|
-
* @returns {boolean} True if version1 is older than version2
|
|
36
|
-
*/
|
|
37
|
-
export function is_older_version(version1: string, version2: string): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Get the minimum version required for a feature
|
|
40
|
-
* @param {string} feature - The feature name
|
|
41
|
-
* @returns {string|null} The minimum version required, or null if unknown
|
|
42
|
-
*/
|
|
43
|
-
export function get_minimum_version_for_feature(feature: string): string | null;
|
|
44
|
-
/**
|
|
45
|
-
* Check if a feature is supported in a given protocol version
|
|
46
|
-
* @param {string} feature - The feature name
|
|
47
|
-
* @param {string} version - The protocol version to check
|
|
48
|
-
* @returns {boolean} True if the feature is supported
|
|
49
|
-
*/
|
|
50
|
-
export function is_feature_supported(feature: string, version: string): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Create a protocol version validation error
|
|
53
|
-
* @param {string} version - The invalid version
|
|
54
|
-
* @param {string} reason - The reason for the error
|
|
55
|
-
* @returns {Error} The validation error
|
|
56
|
-
*/
|
|
57
|
-
export function create_version_error(version: string, reason: string): Error;
|
|
58
|
-
/**
|
|
59
|
-
* Negotiate protocol version between client and server
|
|
60
|
-
* According to MCP spec:
|
|
61
|
-
* - If server supports client's version, return same version
|
|
62
|
-
* - Otherwise, return server's latest supported version
|
|
63
|
-
* @param {string} client_version - The protocol version requested by client
|
|
64
|
-
* @returns {string} The negotiated protocol version
|
|
65
|
-
*/
|
|
66
|
-
export function negotiate_protocol_version(client_version: string): string;
|
|
67
|
-
/**
|
|
68
|
-
* Check if version negotiation should result in an error
|
|
69
|
-
* @param {string} client_version - The protocol version requested by client
|
|
70
|
-
* @returns {boolean} True if negotiation should fail
|
|
71
|
-
*/
|
|
72
|
-
export function should_version_negotiation_fail(client_version: string): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Latest stable protocol version
|
|
75
|
-
*/
|
|
76
|
-
export const LATEST_PROTOCOL_VERSION: string;
|
|
77
|
-
/**
|
|
78
|
-
* Validate MCP protocol version format (YYYY-MM-DD)
|
|
79
|
-
*/
|
|
80
|
-
export const ProtocolVersionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Protocol version must be in YYYY-MM-DD format">]>;
|
|
81
|
-
/**
|
|
82
|
-
* Validate that the protocol version is supported
|
|
83
|
-
*/
|
|
84
|
-
export const SupportedProtocolVersionSchema: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Protocol version must be in YYYY-MM-DD format">]>, v.CheckAction<string, "Unsupported protocol version">]>;
|
|
85
|
-
import * as v from 'valibot';
|