Skip to content

Commit 508b822

Browse files
author
Chojan Shang
committed
feat: bump protocol to 0.6.3
Signed-off-by: Chojan Shang <chojan.shang@vesoft.com>
1 parent 893fcf4 commit 508b822

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

schema/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
refs/tags/v0.6.2
1+
refs/tags/v0.6.3

schema/schema.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,12 @@
708708
},
709709
"ContentBlock": {
710710
"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\u2014whether\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)",
711+
"discriminator": {
712+
"propertyName": "type"
713+
},
711714
"oneOf": [
712715
{
713-
"description": "Plain text content\n\nAll agents MUST support text content blocks in prompts.",
716+
"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.",
714717
"properties": {
715718
"_meta": {
716719
"description": "Extension point for implementations"
@@ -1406,7 +1409,10 @@
14061409
"type": "object"
14071410
}
14081411
],
1409-
"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)"
1412+
"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)",
1413+
"discriminator": {
1414+
"propertyName": "type"
1415+
}
14101416
},
14111417
"ModelId": {
14121418
"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.",
@@ -1796,6 +1802,9 @@
17961802
},
17971803
"RequestPermissionOutcome": {
17981804
"description": "The outcome of a permission request.",
1805+
"discriminator": {
1806+
"propertyName": "outcome"
1807+
},
17991808
"oneOf": [
18001809
{
18011810
"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)",
@@ -2060,6 +2069,9 @@
20602069
},
20612070
"SessionUpdate": {
20622071
"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)",
2072+
"discriminator": {
2073+
"propertyName": "sessionUpdate"
2074+
},
20632075
"oneOf": [
20642076
{
20652077
"description": "A chunk of the user's message being streamed.",
@@ -2530,6 +2542,9 @@
25302542
},
25312543
"ToolCallContent": {
25322544
"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)",
2545+
"discriminator": {
2546+
"propertyName": "type"
2547+
},
25332548
"oneOf": [
25342549
{
25352550
"description": "Standard content block (text, images, resources).",

src/acp/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from schema/meta.json. Do not edit by hand.
2-
# Schema ref: refs/tags/v0.6.2
2+
# Schema ref: refs/tags/v0.6.3
33
AGENT_METHODS = {'authenticate': 'authenticate', 'initialize': 'initialize', 'session_cancel': 'session/cancel', 'session_load': 'session/load', 'session_new': 'session/new', 'session_prompt': 'session/prompt', 'session_set_mode': 'session/set_mode', 'session_set_model': 'session/set_model'}
44
CLIENT_METHODS = {'fs_read_text_file': 'fs/read_text_file', 'fs_write_text_file': 'fs/write_text_file', 'session_request_permission': 'session/request_permission', 'session_update': 'session/update', 'terminal_create': 'terminal/create', 'terminal_kill': 'terminal/kill', 'terminal_output': 'terminal/output', 'terminal_release': 'terminal/release', 'terminal_wait_for_exit': 'terminal/wait_for_exit'}
55
PROTOCOL_VERSION = 1

src/acp/schema.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from schema/schema.json. Do not edit by hand.
2-
# Schema ref: refs/tags/v0.6.2
2+
# Schema ref: refs/tags/v0.6.3
33

44
from __future__ import annotations
55

@@ -244,6 +244,7 @@ class StdioMcpServer(BaseModel):
244244
]
245245
# Human-readable name identifying this MCP server.
246246
name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")]
247+
type: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
247248

248249

249250
class ModelInfo(BaseModel):
@@ -336,7 +337,10 @@ class RequestPermissionResponse(BaseModel):
336337
# The user's decision on the permission request.
337338
outcome: Annotated[
338339
Union[DeniedOutcome, AllowedOutcome],
339-
Field(description="The user's decision on the permission request."),
340+
Field(
341+
description="The user's decision on the permission request.",
342+
discriminator="outcome",
343+
),
340344
]
341345

342346

@@ -1195,7 +1199,7 @@ class UserMessageChunk(BaseModel):
11951199
Union[
11961200
TextContentBlock, ImageContentBlock, AudioContentBlock, ResourceContentBlock, EmbeddedResourceContentBlock
11971201
],
1198-
Field(description="A single item of content"),
1202+
Field(description="A single item of content", discriminator="type"),
11991203
]
12001204
sessionUpdate: Literal["user_message_chunk"]
12011205

@@ -1211,7 +1215,7 @@ class AgentMessageChunk(BaseModel):
12111215
Union[
12121216
TextContentBlock, ImageContentBlock, AudioContentBlock, ResourceContentBlock, EmbeddedResourceContentBlock
12131217
],
1214-
Field(description="A single item of content"),
1218+
Field(description="A single item of content", discriminator="type"),
12151219
]
12161220
sessionUpdate: Literal["agent_message_chunk"]
12171221

@@ -1227,7 +1231,7 @@ class AgentThoughtChunk(BaseModel):
12271231
Union[
12281232
TextContentBlock, ImageContentBlock, AudioContentBlock, ResourceContentBlock, EmbeddedResourceContentBlock
12291233
],
1230-
Field(description="A single item of content"),
1234+
Field(description="A single item of content", discriminator="type"),
12311235
]
12321236
sessionUpdate: Literal["agent_thought_chunk"]
12331237

@@ -1238,7 +1242,7 @@ class ContentToolCallContent(BaseModel):
12381242
Union[
12391243
TextContentBlock, ImageContentBlock, AudioContentBlock, ResourceContentBlock, EmbeddedResourceContentBlock
12401244
],
1241-
Field(description="The actual content block."),
1245+
Field(description="The actual content block.", discriminator="type"),
12421246
]
12431247
type: Literal["content"]
12441248

@@ -1457,7 +1461,7 @@ class SessionNotification(BaseModel):
14571461
AvailableCommandsUpdate,
14581462
CurrentModeUpdate,
14591463
],
1460-
Field(description="The actual update content."),
1464+
Field(description="The actual update content.", discriminator="sessionUpdate"),
14611465
]
14621466

14631467

0 commit comments

Comments
 (0)