@@ -23,7 +23,7 @@ import type {
2323 ResourceTemplateReference ,
2424 PromptReference ,
2525 CompleteRequestParams ,
26- ProgressNotificationParams ,
26+ ProgressNotificationParams
2727} from './generated/sdk.types.js' ;
2828
2929// =============================================================================
@@ -77,7 +77,6 @@ import {
7777 TextResourceContentsSchema ,
7878 BlobResourceContentsSchema ,
7979 // Request/notification base schemas (with RELATED_TASK_META_KEY injected)
80- RequestParamsSchema ,
8180 TaskAugmentedRequestParamsSchema ,
8281 NotificationParamsSchema ,
8382 // Core request/notification schemas (params include proper _meta typing)
@@ -227,7 +226,7 @@ import {
227226 ClientCapabilitiesSchema ,
228227 ServerCapabilitiesSchema ,
229228 // Progress
230- ProgressNotificationParamsSchema ,
229+ ProgressNotificationParamsSchema
231230} from './generated/sdk.schemas.js' ;
232231
233232export {
@@ -375,7 +374,7 @@ export {
375374 ServerTasksCapabilitySchema ,
376375 ClientCapabilitiesSchema ,
377376 ServerCapabilitiesSchema ,
378- ProgressNotificationParamsSchema ,
377+ ProgressNotificationParamsSchema
379378} ;
380379
381380export const LATEST_PROTOCOL_VERSION = '2025-11-25' ;
@@ -391,12 +390,6 @@ export const JSONRPC_VERSION = '2.0';
391390 * Utility types
392391 */
393392type ExpandRecursively < T > = T extends object ? ( T extends infer O ? { [ K in keyof O ] : ExpandRecursively < O [ K ] > } : never ) : T ;
394- /**
395- * Assert 'object' type schema.
396- *
397- * @internal
398- */
399- const AssertObjectSchema = z . custom < object > ( ( v ) : v is object => v !== null && ( typeof v === 'object' || typeof v === 'function' ) ) ;
400393
401394/**
402395 * Task creation parameters, used to ask that the server create a task to represent a request.
@@ -425,7 +418,6 @@ export const TaskCreationParamsSchema = z.looseObject({
425418export const isTaskAugmentedRequestParams = ( value : unknown ) : value is TaskAugmentedRequestParams =>
426419 TaskAugmentedRequestParamsSchema . safeParse ( value ) . success ;
427420
428-
429421export const isJSONRPCRequest = ( value : unknown ) : value is JSONRPCRequest => JSONRPCRequestSchema . safeParse ( value ) . success ;
430422export const isJSONRPCNotification = ( value : unknown ) : value is JSONRPCNotification => JSONRPCNotificationSchema . safeParse ( value ) . success ;
431423export const isJSONRPCResultResponse = ( value : unknown ) : value is JSONRPCResultResponse =>
@@ -471,9 +463,6 @@ export const ElicitationCapabilitySchema = ClientCapabilitiesSchema.shape.elicit
471463
472464export const isInitializeRequest = ( value : unknown ) : value is InitializeRequest => InitializeRequestSchema . safeParse ( value ) . success ;
473465
474-
475-
476-
477466export const isInitializedNotification = ( value : unknown ) : value is InitializedNotification =>
478467 InitializedNotificationSchema . safeParse ( value ) . success ;
479468
@@ -492,18 +481,14 @@ export const ProgressSchema = ProgressNotificationParamsSchema.omit({ progressTo
492481
493482/* Resources */
494483
495-
496-
497484// ResourceRequestParamsSchema, ReadResourceRequestParamsSchema,
498485// SubscribeRequestParamsSchema, UnsubscribeRequestParamsSchema,
499486// ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema,
500487
501488/* Prompts */
502489
503-
504490// from generated with Base64 validation for data fields.
505491
506-
507492/* Tools */
508493// ListToolsResultSchema, CallToolResultSchema, CallToolRequestParamsSchema,
509494
@@ -613,12 +598,10 @@ export const SamplingContentSchema = z.discriminatedUnion('type', [TextContentSc
613598 * Uses single content block without tool types for v1.x API compatibility.
614599 * For tool use support, use CreateMessageResultWithToolsSchema instead.
615600 */
616- export const CreateMessageResultSchema = CreateMessageResultSpecSchema
617- . omit ( { content : true } )
618- . extend ( {
619- /** Response content. Single block, basic types only (text/image/audio). */
620- content : SamplingContentSchema
621- } ) ;
601+ export const CreateMessageResultSchema = CreateMessageResultSpecSchema . omit ( { content : true } ) . extend ( {
602+ /** Response content. Single block, basic types only (text/image/audio). */
603+ content : SamplingContentSchema
604+ } ) ;
622605
623606/**
624607 * The client's response to a sampling/create_message request when tools were provided.
@@ -653,7 +636,6 @@ export const CreateMessageResultWithToolsSchema = ResultSchema.extend({
653636// LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema,
654637// TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema,
655638
656-
657639/**
658640 * Parameters for a `notifications/elicitation/complete` notification.
659641 *
@@ -673,7 +655,6 @@ export const ElicitationCompleteNotificationParamsSchema = NotificationParamsSch
673655 */
674656export const ResourceReferenceSchema = ResourceTemplateReferenceSchema ;
675657
676-
677658export function assertCompleteRequestPrompt ( request : CompleteRequest ) : asserts request is CompleteRequestPrompt {
678659 if ( request . params . ref . type !== 'ref/prompt' ) {
679660 throw new TypeError ( `Expected CompleteRequestPrompt, but got ${ request . params . ref . type } ` ) ;
@@ -793,11 +774,7 @@ export interface MessageExtraInfo {
793774}
794775
795776// Import base types with aliases to avoid DOM collision, then re-export
796- import type {
797- Request as _Request ,
798- Notification as _Notification ,
799- Result as _Result ,
800- } from './generated/sdk.types.js' ;
777+ import type { Request as _Request , Notification as _Notification , Result as _Result } from './generated/sdk.types.js' ;
801778
802779// Re-export with original names
803780export type { _Request as Request , _Notification as Notification , _Result as Result } ;
@@ -967,7 +944,7 @@ export type {
967944 // Server messages
968945 ServerRequest ,
969946 ServerNotification ,
970- ServerResult ,
947+ ServerResult
971948} from './generated/sdk.types.js' ;
972949
973950/**
@@ -983,7 +960,9 @@ export type JSONRPCResponse = Infer<typeof JSONRPCResponseSchema>;
983960// Progress type - derived from ProgressNotificationParams without progressToken
984961export type Progress = Omit < ProgressNotificationParams , 'progressToken' > ;
985962// Type check: ensure Progress matches the inferred schema type
986- type _ProgressCheck = Progress extends Infer < typeof ProgressSchema > ? Infer < typeof ProgressSchema > extends Progress ? true : never : never ;
963+ type _ProgressCheck =
964+ Progress extends Infer < typeof ProgressSchema > ? ( Infer < typeof ProgressSchema > extends Progress ? true : never ) : never ;
965+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
987966const _progressTypeCheck : _ProgressCheck = true ;
988967
989968// Task creation params (SDK-specific)
@@ -1023,4 +1002,3 @@ export type CompleteRequestResourceTemplate = ExpandRecursively<
10231002 CompleteRequest & { params : CompleteRequestParams & { ref : ResourceTemplateReference } }
10241003> ;
10251004export type CompleteRequestPrompt = ExpandRecursively < CompleteRequest & { params : CompleteRequestParams & { ref : PromptReference } } > ;
1026-
0 commit comments