diff --git a/agent-client-protocol-schema/src/v1/agent.rs b/agent-client-protocol-schema/src/v1/agent.rs index fa7e1aabf..4c140007f 100644 --- a/agent-client-protocol-schema/src/v1/agent.rs +++ b/agent-client-protocol-schema/src/v1/agent.rs @@ -1740,13 +1740,9 @@ impl CloseSessionResponse { #[non_exhaustive] pub struct ListSessionsRequest { /// Filter sessions by working directory. Must be an absolute path. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub cwd: Option, /// Opaque cursor token from a previous response's nextCursor field for cursor-based pagination - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub cursor: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -2899,8 +2895,6 @@ pub struct McpServerHttp { /// URL to the MCP server. pub url: String, /// HTTP headers to set when making requests to the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub headers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2957,8 +2951,6 @@ pub struct McpServerSse { /// URL to the MCP server. pub url: String, /// HTTP headers to set when making requests to the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub headers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3098,12 +3090,8 @@ pub struct McpServerStdio { /// Absolute path to the MCP server executable. pub command: PathBuf, /// Command-line arguments to pass to the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub args: Vec, /// Environment variables to set when launching the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub env: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3277,8 +3265,6 @@ pub struct PromptRequest { /// When available, [`ContentBlock::Resource`] is preferred /// as it avoids extra round-trips and allows the message to include /// pieces of context from sources the agent may not have access to. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub prompt: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3636,8 +3622,6 @@ pub struct ProviderInfo { pub required: bool, /// Current effective non-secret routing config. /// Null or omitted means provider is disabled. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub current: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3742,8 +3726,6 @@ impl ListProvidersRequest { #[non_exhaustive] pub struct ListProvidersResponse { /// Configurable providers with current routing info suitable for UI display. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub providers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3803,8 +3785,6 @@ pub struct SetProviderRequest { pub base_url: String, /// Full headers map for this provider. /// May include authorization, routing, or other integration-specific headers. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default, skip_serializing_if = "HashMap::is_empty")] pub headers: HashMap, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -6661,4 +6641,30 @@ mod test_serialization { let deserialized: AgentCapabilities = serde_json::from_value(json).unwrap(); assert!(deserialized.providers.is_some()); } + + #[test] + fn prompt_request_rejects_malformed_content_block() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "prompt": [{"type": "text"}] + })) + .is_err() + ); + } + + #[test] + fn prompt_request_rejects_non_array_prompt() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "prompt": "hello" + })) + .is_err() + ); + } } diff --git a/agent-client-protocol-schema/src/v1/client.rs b/agent-client-protocol-schema/src/v1/client.rs index dfb62974f..2846c3416 100644 --- a/agent-client-protocol-schema/src/v1/client.rs +++ b/agent-client-protocol-schema/src/v1/client.rs @@ -656,8 +656,6 @@ pub struct RequestPermissionRequest { /// Details about the tool call requiring permission. pub tool_call: ToolCallUpdate, /// Available permission options for the user to choose from. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub options: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2982,4 +2980,26 @@ mod tests { .unwrap(); assert_eq!(request_with_null_params.params, None); } + + #[test] + fn request_permission_request_rejects_malformed_options() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "toolCall": {"toolCallId": "tc-1"}, + "options": "not-an-array" + })) + .is_err() + ); + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "toolCall": {"toolCallId": "tc-1"}, + "options": [{"optionId": "allow"}] + })) + .is_err() + ); + } } diff --git a/agent-client-protocol-schema/src/v1/elicitation.rs b/agent-client-protocol-schema/src/v1/elicitation.rs index 5aad80755..e64d8b087 100644 --- a/agent-client-protocol-schema/src/v1/elicitation.rs +++ b/agent-client-protocol-schema/src/v1/elicitation.rs @@ -131,23 +131,15 @@ pub struct StringPropertySchema { #[serde(default)] pub description: Option, /// Minimum string length. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub min_length: Option, /// Maximum string length. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub max_length: Option, /// Pattern the string must match. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub pattern: Option, /// String format. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub format: Option, /// Default value. @@ -156,14 +148,10 @@ pub struct StringPropertySchema { #[serde(default)] pub default: Option, /// Enum values for untitled single-select enums. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] #[serde(rename = "enum")] pub enum_values: Option>, /// Titled enum options for titled single-select enums. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] #[serde(rename = "oneOf")] pub one_of: Option>, @@ -315,13 +303,9 @@ pub struct NumberPropertySchema { #[serde(default)] pub description: Option, /// Minimum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub minimum: Option, /// Maximum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub maximum: Option, /// Default value. @@ -413,13 +397,9 @@ pub struct IntegerPropertySchema { #[serde(default)] pub description: Option, /// Minimum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub minimum: Option, /// Maximum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub maximum: Option, /// Default value. @@ -574,8 +554,6 @@ impl BooleanPropertySchema { #[non_exhaustive] pub struct StringMultiSelectItems { /// Allowed enum values. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(rename = "enum")] pub values: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -616,8 +594,6 @@ impl StringMultiSelectItems { #[non_exhaustive] pub struct TitledMultiSelectItems { /// Titled enum options. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(rename = "anyOf")] pub options: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -772,13 +748,9 @@ pub struct MultiSelectPropertySchema { #[serde(default)] pub description: Option, /// Minimum number of items to select. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub min_items: Option, /// Maximum number of items to select. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub max_items: Option, /// The items definition describing allowed values. @@ -1054,13 +1026,9 @@ pub struct ElicitationSchema { #[serde(default)] pub title: Option, /// Property definitions (must be primitive types). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub properties: BTreeMap, /// List of required property names. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub required: Option>, /// Optional description of what this schema represents. @@ -1951,8 +1919,6 @@ impl From for ElicitationAction { #[non_exhaustive] pub struct ElicitationAcceptAction { /// The user-provided content, if any, as an object matching the requested schema. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub content: Option>, } @@ -2781,34 +2747,28 @@ mod tests { } #[test] - fn response_accept_defaults_non_object_content() { - let response = serde_json::from_value::(json!({ - "action": "accept", - "content": "Alice" - })) - .unwrap(); - - assert_eq!( - response.action, - ElicitationAction::Accept(ElicitationAcceptAction::new()) + fn response_accept_rejects_non_object_content() { + assert!( + serde_json::from_value::(json!({ + "action": "accept", + "content": "Alice" + })) + .is_err() ); } #[test] - fn response_accept_defaults_nested_object_content() { - let response = serde_json::from_value::(json!({ - "action": "accept", - "content": { - "profile": { - "name": "Alice" + fn response_accept_rejects_nested_object_content() { + assert!( + serde_json::from_value::(json!({ + "action": "accept", + "content": { + "profile": { + "name": "Alice" + } } - } - })) - .unwrap(); - - assert_eq!( - response.action, - ElicitationAction::Accept(ElicitationAcceptAction::new()) + })) + .is_err() ); } diff --git a/agent-client-protocol-schema/src/v1/mcp.rs b/agent-client-protocol-schema/src/v1/mcp.rs index 39741bfdb..e1762a311 100644 --- a/agent-client-protocol-schema/src/v1/mcp.rs +++ b/agent-client-protocol-schema/src/v1/mcp.rs @@ -146,8 +146,6 @@ pub struct MessageMcpRequest { /// Optional inner MCP params. /// /// If omitted or set to `null`, the inner MCP message has no params. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub params: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional diff --git a/agent-client-protocol-schema/src/v1/nes.rs b/agent-client-protocol-schema/src/v1/nes.rs index c5beb4e43..f51a3ce80 100644 --- a/agent-client-protocol-schema/src/v1/nes.rs +++ b/agent-client-protocol-schema/src/v1/nes.rs @@ -1144,8 +1144,6 @@ impl DidChangeDocumentNotification { #[non_exhaustive] pub struct TextDocumentContentChangeEvent { /// The range of the document that changed. If `None`, the entire content is replaced. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub range: Option, /// The new text for the range, or the full document content if `range` is `None`. @@ -1367,8 +1365,6 @@ pub struct StartNesRequest { #[serde(default)] pub workspace_uri: Option, /// The workspace folders. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub workspace_folders: Option>, /// Repository metadata, if the workspace is a git repository. @@ -1707,15 +1703,11 @@ pub struct SuggestNesRequest { /// The current cursor position. pub position: Position, /// The current text selection range, if any. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub selection: Option, /// What triggered this suggestion request. pub trigger_kind: NesTriggerKind, /// Context for the suggestion, included based on agent capabilities. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub context: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -1786,33 +1778,21 @@ impl SuggestNesRequest { #[non_exhaustive] pub struct NesSuggestContext { /// Recently accessed files. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub recent_files: Option>, /// Related code snippets. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub related_snippets: Option>, /// Recent edit history. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub edit_history: Option>, /// Recent user actions (typing, navigation, etc.). - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub user_actions: Option>, /// Currently open files in the editor. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub open_files: Option>, /// Current diagnostics (errors, warnings). - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub diagnostics: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -1954,8 +1934,6 @@ pub struct NesRelatedSnippet { /// The URI of the file containing the snippets. pub uri: String, /// The code excerpts. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub excerpts: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2302,8 +2280,6 @@ pub enum NesDiagnosticSeverity { #[non_exhaustive] pub struct SuggestNesResponse { /// The list of suggestions. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub suggestions: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2367,8 +2343,6 @@ pub struct NesEditSuggestion { /// The URI of the file to edit. pub uri: String, /// The text edits to apply. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub edits: Vec, /// Optional suggested cursor position after applying edits. #[serde_as(deserialize_as = "DefaultOnError")] @@ -2591,8 +2565,6 @@ pub struct NesSearchAndReplaceSuggestion { /// The replacement text. pub replace: String, /// Whether `search` is a regular expression. Defaults to `false`. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub is_regex: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional diff --git a/agent-client-protocol-schema/src/v2/agent.rs b/agent-client-protocol-schema/src/v2/agent.rs index 08efb0e15..45cc75ac3 100644 --- a/agent-client-protocol-schema/src/v2/agent.rs +++ b/agent-client-protocol-schema/src/v2/agent.rs @@ -1735,13 +1735,9 @@ impl CloseSessionResponse { #[non_exhaustive] pub struct ListSessionsRequest { /// Filter sessions by working directory. Must be an absolute path. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub cwd: Option, /// Opaque cursor token from a previous response's nextCursor field for cursor-based pagination - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub cursor: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -2986,8 +2982,6 @@ pub struct McpServerHttp { #[schemars(url)] pub url: String, /// HTTP headers to set when making requests to the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub headers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3128,13 +3122,9 @@ pub struct McpServerStdio { /// Absolute path to the MCP server executable. pub command: PathBuf, /// Command-line arguments to pass to the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub args: Vec, /// Environment variables to set when launching the MCP server. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub env: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3309,8 +3299,6 @@ pub struct PromptRequest { /// When available, [`ContentBlock::Resource`] is preferred /// as it avoids extra round-trips and allows the message to include /// pieces of context from sources the agent may not have access to. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub prompt: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3652,8 +3640,6 @@ pub struct ProviderInfo { pub required: bool, /// Current effective non-secret routing config. /// Null or omitted means provider is disabled. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub current: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3758,8 +3744,6 @@ impl ListProvidersRequest { #[non_exhaustive] pub struct ListProvidersResponse { /// Configurable providers with current routing info suitable for UI display. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub providers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3819,8 +3803,6 @@ pub struct SetProviderRequest { pub base_url: String, /// Full headers map for this provider. /// May include authorization, routing, or other integration-specific headers. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default, skip_serializing_if = "HashMap::is_empty")] pub headers: HashMap, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -7131,4 +7113,30 @@ mod test_serialization { }) ); } + + #[test] + fn prompt_request_rejects_malformed_content_block() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "prompt": [{"type": "text"}] + })) + .is_err() + ); + } + + #[test] + fn prompt_request_rejects_non_array_prompt() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "prompt": "hello" + })) + .is_err() + ); + } } diff --git a/agent-client-protocol-schema/src/v2/client.rs b/agent-client-protocol-schema/src/v2/client.rs index 175729e0f..88f6bda20 100644 --- a/agent-client-protocol-schema/src/v2/client.rs +++ b/agent-client-protocol-schema/src/v2/client.rs @@ -228,6 +228,10 @@ impl<'de> Deserialize<'de> for OtherSessionUpdate { } fn is_known_session_update(session_update: &str) -> bool { + #[cfg(feature = "unstable_plan_operations")] + if session_update == "plan_removed" { + return true; + } matches!( session_update, "user_message_chunk" @@ -1290,13 +1294,9 @@ pub struct RequestPermissionRequest { /// Optional structured context about the operation requiring permission. /// /// Omitted or `null` both mean no structured subject was provided. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub subject: Option, /// Available permission options for the user to choose from. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub options: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -3119,4 +3119,39 @@ mod tests { .unwrap(); assert!(deserialized.terminal.is_none()); } + + #[test] + fn request_permission_request_rejects_malformed_options() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "title": "Run tool?", + "options": "not-an-array" + })) + .is_err() + ); + assert!( + serde_json::from_value::(json!({ + "sessionId": "sess-1", + "title": "Run tool?", + "options": [{"optionId": "allow"}] + })) + .is_err() + ); + } + + #[cfg(feature = "unstable_plan_operations")] + #[test] + fn malformed_plan_removed_is_not_hidden_as_unknown_update() { + use serde_json::json; + + assert!( + serde_json::from_value::(json!({ + "sessionUpdate": "plan_removed" + })) + .is_err() + ); + } } diff --git a/agent-client-protocol-schema/src/v2/elicitation.rs b/agent-client-protocol-schema/src/v2/elicitation.rs index dd0339f22..1bfcc3f71 100644 --- a/agent-client-protocol-schema/src/v2/elicitation.rs +++ b/agent-client-protocol-schema/src/v2/elicitation.rs @@ -136,23 +136,15 @@ pub struct StringPropertySchema { #[serde(default)] pub description: Option, /// Minimum string length. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub min_length: Option, /// Maximum string length. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub max_length: Option, /// Pattern the string must match. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub pattern: Option, /// String format. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub format: Option, /// Default value. @@ -161,14 +153,10 @@ pub struct StringPropertySchema { #[serde(default)] pub default: Option, /// Enum values for untitled single-select enums. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] #[serde(rename = "enum")] pub enum_values: Option>, /// Titled enum options for titled single-select enums. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] #[serde(rename = "oneOf")] pub one_of: Option>, @@ -320,13 +308,9 @@ pub struct NumberPropertySchema { #[serde(default)] pub description: Option, /// Minimum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub minimum: Option, /// Maximum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub maximum: Option, /// Default value. @@ -418,13 +402,9 @@ pub struct IntegerPropertySchema { #[serde(default)] pub description: Option, /// Minimum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub minimum: Option, /// Maximum value (inclusive). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub maximum: Option, /// Default value. @@ -579,8 +559,6 @@ impl BooleanPropertySchema { #[non_exhaustive] pub struct StringMultiSelectItems { /// Allowed enum values. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(rename = "enum")] pub values: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -621,8 +599,6 @@ impl StringMultiSelectItems { #[non_exhaustive] pub struct TitledMultiSelectItems { /// Titled enum options. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(rename = "anyOf")] pub options: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -765,13 +741,9 @@ pub struct MultiSelectPropertySchema { #[serde(default)] pub description: Option, /// Minimum number of items to select. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub min_items: Option, /// Maximum number of items to select. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub max_items: Option, /// The items definition describing allowed values. @@ -1033,13 +1005,9 @@ pub struct ElicitationSchema { #[serde(default)] pub title: Option, /// Property definitions (must be primitive types). - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub properties: BTreeMap, /// List of required property names. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub required: Option>, /// Optional description of what this schema represents. @@ -1892,8 +1860,6 @@ impl From for ElicitationAction { #[non_exhaustive] pub struct ElicitationAcceptAction { /// The user-provided content, if any, as an object matching the requested schema. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub content: Option>, } @@ -2719,34 +2685,28 @@ mod tests { } #[test] - fn response_accept_defaults_non_object_content() { - let response = serde_json::from_value::(json!({ - "action": "accept", - "content": "Alice" - })) - .unwrap(); - - assert_eq!( - response.action, - ElicitationAction::Accept(ElicitationAcceptAction::new()) + fn response_accept_rejects_non_object_content() { + assert!( + serde_json::from_value::(json!({ + "action": "accept", + "content": "Alice" + })) + .is_err() ); } #[test] - fn response_accept_defaults_nested_object_content() { - let response = serde_json::from_value::(json!({ - "action": "accept", - "content": { - "profile": { - "name": "Alice" + fn response_accept_rejects_nested_object_content() { + assert!( + serde_json::from_value::(json!({ + "action": "accept", + "content": { + "profile": { + "name": "Alice" + } } - } - })) - .unwrap(); - - assert_eq!( - response.action, - ElicitationAction::Accept(ElicitationAcceptAction::new()) + })) + .is_err() ); } diff --git a/agent-client-protocol-schema/src/v2/mcp.rs b/agent-client-protocol-schema/src/v2/mcp.rs index c3bcdc8f5..ceb5dd19e 100644 --- a/agent-client-protocol-schema/src/v2/mcp.rs +++ b/agent-client-protocol-schema/src/v2/mcp.rs @@ -145,8 +145,6 @@ pub struct MessageMcpRequest { /// Optional inner MCP params. /// /// If omitted or set to `null`, the inner MCP message has no params. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub params: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional diff --git a/agent-client-protocol-schema/src/v2/nes.rs b/agent-client-protocol-schema/src/v2/nes.rs index 74f785ea0..0ad87ea82 100644 --- a/agent-client-protocol-schema/src/v2/nes.rs +++ b/agent-client-protocol-schema/src/v2/nes.rs @@ -1150,8 +1150,6 @@ impl DidChangeDocumentNotification { #[non_exhaustive] pub struct TextDocumentContentChangeEvent { /// The range of the document that changed. If `None`, the entire content is replaced. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub range: Option, /// The new text for the range, or the full document content if `range` is `None`. @@ -1373,8 +1371,6 @@ pub struct StartNesRequest { #[serde(default)] pub workspace_uri: Option, /// The workspace folders. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub workspace_folders: Option>, /// Repository metadata, if the workspace is a git repository. @@ -1720,15 +1716,11 @@ pub struct SuggestNesRequest { /// The current cursor position. pub position: Position, /// The current text selection range, if any. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub selection: Option, /// What triggered this suggestion request. pub trigger_kind: NesTriggerKind, /// Context for the suggestion, included based on agent capabilities. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub context: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -1799,33 +1791,21 @@ impl SuggestNesRequest { #[non_exhaustive] pub struct NesSuggestContext { /// Recently accessed files. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub recent_files: Option>, /// Related code snippets. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub related_snippets: Option>, /// Recent edit history. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub edit_history: Option>, /// Recent user actions (typing, navigation, etc.). - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub user_actions: Option>, /// Currently open files in the editor. - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub open_files: Option>, /// Current diagnostics (errors, warnings). - #[serde_as(deserialize_as = "DefaultOnError>>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] #[serde(default)] pub diagnostics: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -1967,8 +1947,6 @@ pub struct NesRelatedSnippet { /// The URI of the file containing the snippets. pub uri: String, /// The code excerpts. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub excerpts: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2322,8 +2300,6 @@ pub enum NesDiagnosticSeverity { #[non_exhaustive] pub struct SuggestNesResponse { /// The list of suggestions. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub suggestions: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2481,8 +2457,6 @@ pub struct NesEditSuggestion { /// The URI of the file to edit. pub uri: String, /// The text edits to apply. - #[serde_as(deserialize_as = "DefaultOnError>")] - #[schemars(extend("x-deserialize-default-on-error" = true, "x-deserialize-skip-invalid-items" = true))] pub edits: Vec, /// Optional suggested cursor position after applying edits. #[serde_as(deserialize_as = "DefaultOnError")] @@ -2709,8 +2683,6 @@ pub struct NesSearchAndReplaceSuggestion { /// The replacement text. pub replace: String, /// Whether `search` is a regular expression. Defaults to `false`. - #[serde_as(deserialize_as = "DefaultOnError")] - #[schemars(extend("x-deserialize-default-on-error" = true))] #[serde(default)] pub is_regex: Option, /// The _meta property is reserved by ACP to allow clients and agents to attach additional diff --git a/schema-generator/src/main.rs b/schema-generator/src/main.rs index 2ac58dc34..ba3cdad9a 100644 --- a/schema-generator/src/main.rs +++ b/schema-generator/src/main.rs @@ -496,84 +496,6 @@ mod schema_annotation_tests { } } - #[test] - fn source_defaultable_and_vec_fields_are_lenient() { - let root = schema_crate_dir(); - let mut checked_defaultable = 0; - let mut checked_vec = 0; - - for module_dir in ["src/v1", "src/v2"] { - for entry in fs::read_dir(root.join(module_dir)).unwrap() { - let path = entry.unwrap().path(); - if path.extension().and_then(|ext| ext.to_str()) != Some("rs") { - continue; - } - - let source = fs::read_to_string(&path).unwrap(); - let lines: Vec<_> = source.lines().collect(); - for (line_index, line) in lines.iter().enumerate() { - let Some(field_type) = public_struct_field_type(line) else { - continue; - }; - - let annotations = field_annotations(&lines, line_index); - let has_serde_default = serde_annotations_contain_default(&annotations); - let is_option_like = field_type.starts_with("Option<") - || field_type.starts_with("MaybeUndefined<"); - let is_defaultable = is_option_like || has_serde_default; - let is_vec = is_top_level_vec(field_type); - - if is_defaultable { - checked_defaultable += 1; - assert!( - annotations.contains("DefaultOnError") - || annotations.contains("DefaultTrueOnError"), - "{}:{} defaultable field missing lenient deserialization", - path.display(), - line_index + 1 - ); - assert!( - annotations.contains(r#""x-deserialize-default-on-error" = true"#), - "{}:{} defaultable field missing {DEFAULT_ON_ERROR_EXTENSION}", - path.display(), - line_index + 1 - ); - if is_option_like { - assert!( - has_serde_default, - "{}:{} option-like field needs #[serde(default)] with serde_as", - path.display(), - line_index + 1 - ); - } - } - - if is_vec { - checked_vec += 1; - assert!( - annotations.contains("VecSkipError"), - "{}:{} vector field missing VecSkipError", - path.display(), - line_index + 1 - ); - assert!( - annotations.contains(r#""x-deserialize-skip-invalid-items" = true"#), - "{}:{} vector field missing {SKIP_INVALID_ITEMS_EXTENSION}", - path.display(), - line_index + 1 - ); - } - } - } - } - - assert!( - checked_defaultable > 0, - "expected at least one defaultable field" - ); - assert!(checked_vec > 0, "expected at least one vector field"); - } - #[test] fn source_meta_fields_are_default_on_error_annotated() { let root = schema_crate_dir(); @@ -679,100 +601,6 @@ mod schema_annotation_tests { } } - fn public_struct_field_type(line: &str) -> Option<&str> { - let line = line.trim(); - if !line.starts_with("pub ") || !line.ends_with(',') { - return None; - } - - let (_, field_type) = line.split_once(':')?; - Some(field_type.trim_end_matches(',').trim()) - } - - fn field_annotations(lines: &[&str], line_index: usize) -> String { - let mut start = line_index; - let mut cursor = line_index; - while cursor > 0 { - let previous = lines[cursor - 1].trim(); - if previous.is_empty() || previous.starts_with("///") || previous.starts_with("//!") { - break; - } - - if previous.starts_with("#[") { - start = cursor - 1; - cursor -= 1; - continue; - } - - if previous.ends_with(']') { - cursor -= 1; - while cursor > 0 && !lines[cursor].trim_start().starts_with("#[") { - cursor -= 1; - } - start = cursor; - continue; - } - - break; - } - - lines[start..line_index].join("\n") - } - - fn serde_annotations_contain_default(annotations: &str) -> bool { - let mut in_serde = false; - for line in annotations.lines() { - let line = line.trim(); - if line.starts_with("#[serde") { - if line.contains("default") { - return true; - } - in_serde = !line.ends_with(']'); - } else if in_serde { - if line.contains("default") { - return true; - } - if line.ends_with(']') { - in_serde = false; - } - } - } - false - } - - fn is_top_level_vec(field_type: &str) -> bool { - let mut field_type = field_type.trim(); - while let Some(inner) = strip_outer_type(field_type, "Option") - .or_else(|| strip_outer_type(field_type, "MaybeUndefined")) - { - field_type = inner; - } - field_type.starts_with("Vec<") - } - - fn strip_outer_type<'a>(field_type: &'a str, wrapper: &str) -> Option<&'a str> { - let prefix = format!("{wrapper}<"); - if !field_type.starts_with(&prefix) { - return None; - } - - let mut depth = 0; - for (index, character) in field_type[prefix.len() - 1..].char_indices() { - match character { - '<' => depth += 1, - '>' => { - depth -= 1; - if depth == 0 { - let end = prefix.len() - 1 + index; - return Some(field_type[prefix.len()..end].trim()); - } - } - _ => {} - } - } - None - } - fn assert_no_extension(schema: &Value, extension: &str) { assert!( schema.get(extension).is_none(), diff --git a/schema/v1/schema.json b/schema/v1/schema.json index 74679dc77..8361e704d 100644 --- a/schema/v1/schema.json +++ b/schema/v1/schema.json @@ -355,9 +355,7 @@ "type": "array", "items": { "$ref": "#/$defs/PermissionOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -3740,9 +3738,7 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -3770,9 +3766,7 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -3800,18 +3794,14 @@ "type": "array", "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -3873,13 +3863,11 @@ "properties": { "cwd": { "description": "Filter sessions by working directory. Must be an absolute path.", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "cursor": { "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -4069,9 +4057,7 @@ "type": "array", "items": { "$ref": "#/$defs/ContentBlock" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", diff --git a/schema/v1/schema.unstable.json b/schema/v1/schema.unstable.json index 8f55e7747..9bc911ec9 100644 --- a/schema/v1/schema.unstable.json +++ b/schema/v1/schema.unstable.json @@ -391,9 +391,7 @@ "type": "array", "items": { "$ref": "#/$defs/PermissionOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -1556,7 +1554,6 @@ "properties": { "description": "Property definitions (must be primitive types).", "type": "object", - "x-deserialize-default-on-error": true, "default": {}, "additionalProperties": { "$ref": "#/$defs/ElicitationPropertySchema" @@ -1567,9 +1564,7 @@ "type": ["array", "null"], "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "description": { "description": "Optional description of what this schema represents.", @@ -1813,20 +1808,17 @@ "description": "Minimum string length.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "maxLength": { "description": "Maximum string length.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "pattern": { "description": "Pattern the string must match.", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "format": { "description": "String format.", @@ -1837,8 +1829,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "default": { "description": "Default value.", @@ -1850,18 +1841,14 @@ "type": ["array", "null"], "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "oneOf": { "description": "Titled enum options for titled single-select enums.", "type": ["array", "null"], "items": { "$ref": "#/$defs/EnumOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -1888,14 +1875,12 @@ "minimum": { "description": "Minimum value (inclusive).", "type": ["number", "null"], - "format": "double", - "x-deserialize-default-on-error": true + "format": "double" }, "maximum": { "description": "Maximum value (inclusive).", "type": ["number", "null"], - "format": "double", - "x-deserialize-default-on-error": true + "format": "double" }, "default": { "description": "Default value.", @@ -1928,14 +1913,12 @@ "minimum": { "description": "Minimum value (inclusive).", "type": ["integer", "null"], - "format": "int64", - "x-deserialize-default-on-error": true + "format": "int64" }, "maximum": { "description": "Maximum value (inclusive).", "type": ["integer", "null"], - "format": "int64", - "x-deserialize-default-on-error": true + "format": "int64" }, "default": { "description": "Default value.", @@ -2047,9 +2030,7 @@ "type": "array", "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -2069,9 +2050,7 @@ "type": "array", "items": { "$ref": "#/$defs/EnumOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -2100,15 +2079,13 @@ "description": "Minimum number of items to select.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "maxItems": { "description": "Maximum number of items to select.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "items": { "description": "The items definition describing allowed values.", @@ -2261,7 +2238,6 @@ "params": { "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", "type": ["object", "null"], - "x-deserialize-default-on-error": true, "additionalProperties": true }, "_meta": { @@ -3654,9 +3630,7 @@ "type": "array", "items": { "$ref": "#/$defs/ProviderInfo" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -3703,8 +3677,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -4571,9 +4544,7 @@ "type": "array", "items": { "$ref": "#/$defs/NesSuggestion" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -4762,9 +4733,7 @@ "type": "array", "items": { "$ref": "#/$defs/NesTextEdit" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "cursorPosition": { "description": "Optional suggested cursor position after applying edits.", @@ -4883,8 +4852,7 @@ }, "isRegex": { "description": "Whether `search` is a regular expression. Defaults to `false`.", - "type": ["boolean", "null"], - "x-deserialize-default-on-error": true + "type": ["boolean", "null"] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -6665,7 +6633,6 @@ "headers": { "description": "Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers.", "type": "object", - "x-deserialize-default-on-error": true, "additionalProperties": { "type": "string" } @@ -6855,9 +6822,7 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -6885,9 +6850,7 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -6940,18 +6903,14 @@ "type": "array", "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -7013,13 +6972,11 @@ "properties": { "cwd": { "description": "Filter sessions by working directory. Must be an absolute path.", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "cursor": { "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -7279,9 +7236,7 @@ "type": "array", "items": { "$ref": "#/$defs/ContentBlock" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -7308,9 +7263,7 @@ "type": ["array", "null"], "items": { "$ref": "#/$defs/WorkspaceFolder" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "repository": { "description": "Repository metadata, if the workspace is a git repository.", @@ -7418,8 +7371,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "triggerKind": { "description": "What triggered this suggestion request.", @@ -7438,8 +7390,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -7481,54 +7432,42 @@ "type": ["array", "null"], "items": { "$ref": "#/$defs/NesRecentFile" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "relatedSnippets": { "description": "Related code snippets.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesRelatedSnippet" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "editHistory": { "description": "Recent edit history.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesEditHistoryEntry" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "userActions": { "description": "Recent user actions (typing, navigation, etc.).", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesUserAction" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "openFiles": { "description": "Currently open files in the editor.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesOpenFile" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "diagnostics": { "description": "Current diagnostics (errors, warnings).", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesDiagnostic" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -7576,9 +7515,7 @@ "type": "array", "items": { "$ref": "#/$defs/NesExcerpt" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", @@ -8361,7 +8298,6 @@ "content": { "description": "The user-provided content, if any, as an object matching the requested schema.", "type": ["object", "null"], - "x-deserialize-default-on-error": true, "additionalProperties": { "$ref": "#/$defs/ElicitationContentValue" } @@ -8637,8 +8573,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "text": { "description": "The new text for the range, or the full document content if `range` is `None`.", diff --git a/schema/v2/schema.json b/schema/v2/schema.json index 74a61c8c3..60ae6b5d1 100644 --- a/schema/v2/schema.json +++ b/schema/v2/schema.json @@ -563,17 +563,14 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "options": { "description": "Available permission options for the user to choose from.", "type": "array", "items": { "$ref": "#/$defs/PermissionOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -4421,9 +4418,7 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -4472,18 +4467,14 @@ "type": "array", "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -4545,13 +4536,11 @@ "properties": { "cwd": { "description": "Filter sessions by working directory. Must be an absolute path.", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "cursor": { "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -4710,9 +4699,7 @@ "type": "array", "items": { "$ref": "#/$defs/ContentBlock" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", diff --git a/schema/v2/schema.unstable.json b/schema/v2/schema.unstable.json index 2ba4f2832..61140e72a 100644 --- a/schema/v2/schema.unstable.json +++ b/schema/v2/schema.unstable.json @@ -707,17 +707,14 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "options": { "description": "Available permission options for the user to choose from.", "type": "array", "items": { "$ref": "#/$defs/PermissionOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -1907,7 +1904,6 @@ "properties": { "description": "Property definitions (must be primitive types).", "type": "object", - "x-deserialize-default-on-error": true, "default": {}, "additionalProperties": { "$ref": "#/$defs/ElicitationPropertySchema" @@ -1918,9 +1914,7 @@ "type": ["array", "null"], "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "description": { "description": "Optional description of what this schema represents.", @@ -2169,20 +2163,17 @@ "description": "Minimum string length.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "maxLength": { "description": "Maximum string length.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "pattern": { "description": "Pattern the string must match.", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "format": { "description": "String format.", @@ -2193,8 +2184,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "default": { "description": "Default value.", @@ -2206,18 +2196,14 @@ "type": ["array", "null"], "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "oneOf": { "description": "Titled enum options for titled single-select enums.", "type": ["array", "null"], "items": { "$ref": "#/$defs/EnumOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -2244,14 +2230,12 @@ "minimum": { "description": "Minimum value (inclusive).", "type": ["number", "null"], - "format": "double", - "x-deserialize-default-on-error": true + "format": "double" }, "maximum": { "description": "Maximum value (inclusive).", "type": ["number", "null"], - "format": "double", - "x-deserialize-default-on-error": true + "format": "double" }, "default": { "description": "Default value.", @@ -2284,14 +2268,12 @@ "minimum": { "description": "Minimum value (inclusive).", "type": ["integer", "null"], - "format": "int64", - "x-deserialize-default-on-error": true + "format": "int64" }, "maximum": { "description": "Maximum value (inclusive).", "type": ["integer", "null"], - "format": "int64", - "x-deserialize-default-on-error": true + "format": "int64" }, "default": { "description": "Default value.", @@ -2403,9 +2385,7 @@ "type": "array", "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -2425,9 +2405,7 @@ "type": "array", "items": { "$ref": "#/$defs/EnumOption" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -2456,15 +2434,13 @@ "description": "Minimum number of items to select.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "maxItems": { "description": "Maximum number of items to select.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0, - "x-deserialize-default-on-error": true + "minimum": 0 }, "items": { "description": "The items definition describing allowed values.", @@ -2617,7 +2593,6 @@ "params": { "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", "type": ["object", "null"], - "x-deserialize-default-on-error": true, "additionalProperties": true }, "_meta": { @@ -4087,9 +4062,7 @@ "type": "array", "items": { "$ref": "#/$defs/ProviderInfo" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -4136,8 +4109,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -4812,9 +4784,7 @@ "type": "array", "items": { "$ref": "#/$defs/NesSuggestion" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -5068,9 +5038,7 @@ "type": "array", "items": { "$ref": "#/$defs/NesTextEdit" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "cursorPosition": { "description": "Optional suggested cursor position after applying edits.", @@ -5189,8 +5157,7 @@ }, "isRegex": { "description": "Whether `search` is a regular expression. Defaults to `false`.", - "type": ["boolean", "null"], - "x-deserialize-default-on-error": true + "type": ["boolean", "null"] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -7382,7 +7349,6 @@ "headers": { "description": "Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers.", "type": "object", - "x-deserialize-default-on-error": true, "additionalProperties": { "type": "string" } @@ -7614,9 +7580,7 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -7669,18 +7633,14 @@ "type": "array", "items": { "type": "string" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -7742,13 +7702,11 @@ "properties": { "cwd": { "description": "Filter sessions by working directory. Must be an absolute path.", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "cursor": { "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", - "type": ["string", "null"], - "x-deserialize-default-on-error": true + "type": ["string", "null"] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -8023,9 +7981,7 @@ "type": "array", "items": { "$ref": "#/$defs/ContentBlock" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -8052,9 +8008,7 @@ "type": ["array", "null"], "items": { "$ref": "#/$defs/WorkspaceFolder" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "repository": { "description": "Repository metadata, if the workspace is a git repository.", @@ -8162,8 +8116,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "triggerKind": { "description": "What triggered this suggestion request.", @@ -8182,8 +8135,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -8230,54 +8182,42 @@ "type": ["array", "null"], "items": { "$ref": "#/$defs/NesRecentFile" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "relatedSnippets": { "description": "Related code snippets.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesRelatedSnippet" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "editHistory": { "description": "Recent edit history.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesEditHistoryEntry" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "userActions": { "description": "Recent user actions (typing, navigation, etc.).", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesUserAction" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "openFiles": { "description": "Currently open files in the editor.", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesOpenFile" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "diagnostics": { "description": "Current diagnostics (errors, warnings).", "type": ["array", "null"], "items": { "$ref": "#/$defs/NesDiagnostic" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -8325,9 +8265,7 @@ "type": "array", "items": { "$ref": "#/$defs/NesExcerpt" - }, - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + } }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -8920,7 +8858,6 @@ "content": { "description": "The user-provided content, if any, as an object matching the requested schema.", "type": ["object", "null"], - "x-deserialize-default-on-error": true, "additionalProperties": { "$ref": "#/$defs/ElicitationContentValue" } @@ -9196,8 +9133,7 @@ { "type": "null" } - ], - "x-deserialize-default-on-error": true + ] }, "text": { "description": "The new text for the range, or the full document content if `range` is `None`.",