@@ -41,41 +41,6 @@ diff --git a/dist/cjs/client/auth.js b/dist/cjs/client/auth.js
4141 // Handle client registration if needed. Client information stamped for a different
4242 // authorization server reads back as `undefined`, so the flow re-registers exactly as if
4343 // nothing were stored.
44- diff --git a/dist/cjs/client/index.d.ts b/dist/cjs/client/index.d.ts
45- --- a/dist/cjs/client/index.d.ts
46- +++ b/dist/cjs/client/index.d.ts
47- @@ -20,6 +20,11 @@ export declare function getSupportedElicitationModes(capabilities: ClientCapabil
48- supportsUrlMode: boolean;
49- };
50- export type ClientOptions = ProtocolOptions & {
51- + /**
52- + * Protocol version to send in the initialize request.
53- + * @default LATEST_PROTOCOL_VERSION
54- + */
55- + protocolVersion?: string;
56- /**
57- * Capabilities to advertise as being supported by this client.
58- */
59- diff --git a/dist/cjs/client/index.js b/dist/cjs/client/index.js
60- --- a/dist/cjs/client/index.js
61- +++ b/dist/cjs/client/index.js
62- @@ -109,6 +109,7 @@ class Client extends protocol_js_1.Protocol {
63- this._cachedRequiredTaskTools = new Set();
64- this._listChangedDebounceTimers = new Map();
65- this._capabilities = options?.capabilities ?? {};
66- + this._protocolVersion = options?.protocolVersion ?? types_js_1.LATEST_PROTOCOL_VERSION;
67- this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new ajv_provider_js_1.AjvJsonSchemaValidator();
68- // Store list changed config for setup after connection (when we know server capabilities)
69- if (options?.listChanged) {
70- @@ -286,7 +287,7 @@ class Client extends protocol_js_1.Protocol {
71- const result = await this.request({
72- method: 'initialize',
73- params: {
74- - protocolVersion: types_js_1.LATEST_PROTOCOL_VERSION,
75- + protocolVersion: this._protocolVersion,
76- capabilities: this._capabilities,
77- clientInfo: this._clientInfo
78- }
7944diff --git a/dist/esm/client/auth.js b/dist/esm/client/auth.js
8045--- a/dist/esm/client/auth.js
8146+++ b/dist/esm/client/auth.js
@@ -119,38 +84,3 @@ diff --git a/dist/esm/client/auth.js b/dist/esm/client/auth.js
11984 // Handle client registration if needed. Client information stamped for a different
12085 // authorization server reads back as `undefined`, so the flow re-registers exactly as if
12186 // nothing were stored.
122- diff --git a/dist/esm/client/index.d.ts b/dist/esm/client/index.d.ts
123- --- a/dist/esm/client/index.d.ts
124- +++ b/dist/esm/client/index.d.ts
125- @@ -20,6 +20,11 @@ export declare function getSupportedElicitationModes(capabilities: ClientCapabil
126- supportsUrlMode: boolean;
127- };
128- export type ClientOptions = ProtocolOptions & {
129- + /**
130- + * Protocol version to send in the initialize request.
131- + * @default LATEST_PROTOCOL_VERSION
132- + */
133- + protocolVersion?: string;
134- /**
135- * Capabilities to advertise as being supported by this client.
136- */
137- diff --git a/dist/esm/client/index.js b/dist/esm/client/index.js
138- --- a/dist/esm/client/index.js
139- +++ b/dist/esm/client/index.js
140- @@ -105,6 +105,7 @@ export class Client extends Protocol {
141- this._cachedRequiredTaskTools = new Set();
142- this._listChangedDebounceTimers = new Map();
143- this._capabilities = options?.capabilities ?? {};
144- + this._protocolVersion = options?.protocolVersion ?? LATEST_PROTOCOL_VERSION;
145- this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();
146- // Store list changed config for setup after connection (when we know server capabilities)
147- if (options?.listChanged) {
148- @@ -282,7 +283,7 @@ export class Client extends Protocol {
149- const result = await this.request({
150- method: 'initialize',
151- params: {
152- - protocolVersion: LATEST_PROTOCOL_VERSION,
153- + protocolVersion: this._protocolVersion,
154- capabilities: this._capabilities,
155- clientInfo: this._clientInfo
156- }
0 commit comments