@@ -417,7 +417,7 @@ export const toolCallContentSchema = z.union([
417417 /**
418418 * The original content (None for new files).
419419 */
420- oldText : z . string ( ) . nullable ( ) ,
420+ oldText : z . string ( ) . optional ( ) . nullable ( ) ,
421421 /**
422422 * The file path being modified.
423423 */
@@ -453,11 +453,11 @@ export const fileSystemCapabilitySchema = z.object({
453453 /**
454454 * Whether the Client supports `fs/read_text_file` requests.
455455 */
456- readTextFile : z . boolean ( ) ,
456+ readTextFile : z . boolean ( ) . optional ( ) ,
457457 /**
458458 * Whether the Client supports `fs/write_text_file` requests.
459459 */
460- writeTextFile : z . boolean ( ) ,
460+ writeTextFile : z . boolean ( ) . optional ( ) ,
461461} ) ;
462462
463463/**
@@ -560,7 +560,7 @@ export const authMethodSchema = z.object({
560560 /**
561561 * Optional description providing more details about this authentication method.
562562 */
563- description : z . string ( ) . nullable ( ) ,
563+ description : z . string ( ) . optional ( ) . nullable ( ) ,
564564 /**
565565 * Unique identifier for this authentication method.
566566 */
@@ -578,18 +578,18 @@ export const promptCapabilitiesSchema = z.object({
578578 /**
579579 * Agent supports [`ContentBlock::Audio`].
580580 */
581- audio : z . boolean ( ) ,
581+ audio : z . boolean ( ) . optional ( ) ,
582582 /**
583583 * Agent supports embedded context in `session/prompt` requests.
584584 *
585585 * When enabled, the Client is allowed to include [`ContentBlock::Resource`]
586586 * in prompt requests for pieces of context that are referenced in the message.
587587 */
588- embeddedContext : z . boolean ( ) ,
588+ embeddedContext : z . boolean ( ) . optional ( ) ,
589589 /**
590590 * Agent supports [`ContentBlock::Image`].
591591 */
592- image : z . boolean ( ) ,
592+ image : z . boolean ( ) . optional ( ) ,
593593} ) ;
594594
595595/**
@@ -889,7 +889,7 @@ export const toolCallUpdateSchema = z.object({
889889 * Capabilities supported by the client.
890890 */
891891export const clientCapabilitiesSchema = z . object ( {
892- fs : fileSystemCapabilitySchema ,
892+ fs : fileSystemCapabilitySchema . optional ( ) ,
893893} ) ;
894894
895895/**
@@ -899,8 +899,8 @@ export const agentCapabilitiesSchema = z.object({
899899 /**
900900 * Whether the agent supports `session/load`.
901901 */
902- loadSession : z . boolean ( ) ,
903- promptCapabilities : promptCapabilitiesSchema ,
902+ loadSession : z . boolean ( ) . optional ( ) ,
903+ promptCapabilities : promptCapabilitiesSchema . optional ( ) ,
904904} ) ;
905905
906906/**
@@ -940,7 +940,7 @@ export const requestPermissionRequestSchema = z.object({
940940 * See: <https://agentclientprotocol.com/protocol/initialization>
941941 */
942942export const initializeRequestSchema = z . object ( {
943- clientCapabilities : clientCapabilitiesSchema ,
943+ clientCapabilities : clientCapabilitiesSchema . optional ( ) ,
944944 /**
945945 * The latest protocol version supported by the client.
946946 */
@@ -955,11 +955,11 @@ export const initializeRequestSchema = z.object({
955955 * See: <https://agentclientprotocol.com/protocol/initialization>
956956 */
957957export const initializeResponseSchema = z . object ( {
958- agentCapabilities : agentCapabilitiesSchema ,
958+ agentCapabilities : agentCapabilitiesSchema . optional ( ) ,
959959 /**
960960 * Authentication methods supported by the agent.
961961 */
962- authMethods : z . array ( authMethodSchema ) ,
962+ authMethods : z . array ( authMethodSchema ) . optional ( ) ,
963963 /**
964964 * The protocol version the client specified if supported by the agent,
965965 * or the latest protocol version supported by the agent.
0 commit comments