From 1f25140e1bb4715a080fd072620e4eb4fd0070c4 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Thu, 30 Oct 2025 13:54:35 +0100 Subject: [PATCH] Update to latest schema --- schema/schema.json | 19 +++++++++++++++++-- scripts/generate.js | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index 709abbf..b33f489 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -648,9 +648,12 @@ }, "ContentBlock": { "description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content—whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output streamed through `session/update` notifications\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/content)", + "discriminator": { + "propertyName": "type" + }, "oneOf": [ { - "description": "Plain text content\n\nAll agents MUST support text content blocks in prompts.", + "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", "properties": { "_meta": { "description": "Extension point for implementations" @@ -1261,7 +1264,10 @@ "type": "object" } ], - "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)" + "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)", + "discriminator": { + "propertyName": "type" + } }, "ModelId": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for a model.", @@ -1613,6 +1619,9 @@ }, "RequestPermissionOutcome": { "description": "The outcome of a permission request.", + "discriminator": { + "propertyName": "outcome" + }, "oneOf": [ { "description": "The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", @@ -1837,6 +1846,9 @@ }, "SessionUpdate": { "description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", + "discriminator": { + "propertyName": "sessionUpdate" + }, "oneOf": [ { "description": "A chunk of the user's message being streamed.", @@ -2249,6 +2261,9 @@ }, "ToolCallContent": { "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including\nstandard content blocks (text, images) or file diffs.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", + "discriminator": { + "propertyName": "type" + }, "oneOf": [ { "description": "Standard content block (text, images, resources).", diff --git a/scripts/generate.js b/scripts/generate.js index 230124b..521de19 100644 --- a/scripts/generate.js +++ b/scripts/generate.js @@ -5,7 +5,7 @@ import { generate } from "ts-to-zod"; import * as fs from "fs/promises"; import { dirname } from "path"; -const CURRENT_SCHEMA_RELEASE = "v0.6.2"; +const CURRENT_SCHEMA_RELEASE = "v0.6.3"; await downloadSchemas(CURRENT_SCHEMA_RELEASE);