Skip to content

Commit 7c65880

Browse files
author
Chojan Shang
committed
feat: bump meta and schema to 0.4.5
Signed-off-by: Chojan Shang <chojan.shang@vesoft.com>
1 parent ae5e795 commit 7c65880

File tree

4 files changed

+188
-8
lines changed

4 files changed

+188
-8
lines changed

schema/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"session_load": "session/load",
77
"session_new": "session/new",
88
"session_prompt": "session/prompt",
9-
"session_set_mode": "session/set_mode"
9+
"session_set_mode": "session/set_mode",
10+
"session_set_model": "session/set_model"
1011
},
1112
"clientMethods": {
1213
"fs_read_text_file": "fs/read_text_file",

schema/schema.json

Lines changed: 124 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,15 @@
111111
"$ref": "#/$defs/PromptResponse",
112112
"title": "PromptResponse"
113113
},
114+
{
115+
"$ref": "#/$defs/SetSessionModelResponse",
116+
"title": "SetSessionModelResponse"
117+
},
114118
{
115119
"title": "ExtMethodResponse"
116120
}
117121
],
118-
"description": "All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding ClientRequest variants.",
122+
"description": "All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `ClientRequest` variants.",
119123
"x-docs-ignore": true
120124
},
121125
"Annotations": {
@@ -261,7 +265,7 @@
261265
"description": "Input for the command if required"
262266
},
263267
"name": {
264-
"description": "Command name (e.g., \"create_plan\", \"research_codebase\").",
268+
"description": "Command name (e.g., `create_plan`, `research_codebase`).",
265269
"type": "string"
266270
}
267271
},
@@ -394,6 +398,10 @@
394398
"$ref": "#/$defs/PromptRequest",
395399
"title": "PromptRequest"
396400
},
401+
{
402+
"$ref": "#/$defs/SetSessionModelRequest",
403+
"title": "SetSessionModelRequest"
404+
},
397405
{
398406
"title": "ExtMethodRequest"
399407
}
@@ -439,7 +447,7 @@
439447
"title": "ExtMethodResponse"
440448
}
441449
],
442-
"description": "All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding AgentRequest variants.",
450+
"description": "All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `AgentRequest` variants.",
443451
"x-docs-ignore": true
444452
},
445453
"ContentBlock": {
@@ -987,6 +995,17 @@
987995
"_meta": {
988996
"description": "Extension point for implementations"
989997
},
998+
"models": {
999+
"anyOf": [
1000+
{
1001+
"$ref": "#/$defs/SessionModelState"
1002+
},
1003+
{
1004+
"type": "null"
1005+
}
1006+
],
1007+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
1008+
},
9901009
"modes": {
9911010
"anyOf": [
9921011
{
@@ -1124,6 +1143,38 @@
11241143
],
11251144
"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)"
11261145
},
1146+
"ModelId": {
1147+
"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.",
1148+
"type": "string"
1149+
},
1150+
"ModelInfo": {
1151+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a selectable model.",
1152+
"properties": {
1153+
"_meta": {
1154+
"description": "Extension point for implementations"
1155+
},
1156+
"description": {
1157+
"description": "Optional description of the model.",
1158+
"type": [
1159+
"string",
1160+
"null"
1161+
]
1162+
},
1163+
"modelId": {
1164+
"$ref": "#/$defs/ModelId",
1165+
"description": "Unique identifier for the model."
1166+
},
1167+
"name": {
1168+
"description": "Human-readable name of the model.",
1169+
"type": "string"
1170+
}
1171+
},
1172+
"required": [
1173+
"modelId",
1174+
"name"
1175+
],
1176+
"type": "object"
1177+
},
11271178
"NewSessionRequest": {
11281179
"description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)",
11291180
"properties": {
@@ -1156,6 +1207,17 @@
11561207
"_meta": {
11571208
"description": "Extension point for implementations"
11581209
},
1210+
"models": {
1211+
"anyOf": [
1212+
{
1213+
"$ref": "#/$defs/SessionModelState"
1214+
},
1215+
{
1216+
"type": "null"
1217+
}
1218+
],
1219+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
1220+
},
11591221
"modes": {
11601222
"anyOf": [
11611223
{
@@ -1690,6 +1752,30 @@
16901752
],
16911753
"type": "object"
16921754
},
1755+
"SessionModelState": {
1756+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe set of models and the one currently active.",
1757+
"properties": {
1758+
"_meta": {
1759+
"description": "Extension point for implementations"
1760+
},
1761+
"availableModels": {
1762+
"description": "The set of models that the Agent can use",
1763+
"items": {
1764+
"$ref": "#/$defs/ModelInfo"
1765+
},
1766+
"type": "array"
1767+
},
1768+
"currentModelId": {
1769+
"$ref": "#/$defs/ModelId",
1770+
"description": "The current model the Agent is in."
1771+
}
1772+
},
1773+
"required": [
1774+
"currentModelId",
1775+
"availableModels"
1776+
],
1777+
"type": "object"
1778+
},
16931779
"SessionNotification": {
16941780
"description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)",
16951781
"properties": {
@@ -1992,6 +2078,40 @@
19922078
"x-method": "session/set_mode",
19932079
"x-side": "agent"
19942080
},
2081+
"SetSessionModelRequest": {
2082+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for setting a session model.",
2083+
"properties": {
2084+
"_meta": {
2085+
"description": "Extension point for implementations"
2086+
},
2087+
"modelId": {
2088+
"$ref": "#/$defs/ModelId",
2089+
"description": "The ID of the model to set."
2090+
},
2091+
"sessionId": {
2092+
"$ref": "#/$defs/SessionId",
2093+
"description": "The ID of the session to set the model for."
2094+
}
2095+
},
2096+
"required": [
2097+
"sessionId",
2098+
"modelId"
2099+
],
2100+
"type": "object",
2101+
"x-method": "session/set_model",
2102+
"x-side": "agent"
2103+
},
2104+
"SetSessionModelResponse": {
2105+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `session/set_model` method.",
2106+
"properties": {
2107+
"_meta": {
2108+
"description": "Extension point for implementations"
2109+
}
2110+
},
2111+
"type": "object",
2112+
"x-method": "session/set_model",
2113+
"x-side": "agent"
2114+
},
19952115
"StopReason": {
19962116
"description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)",
19972117
"oneOf": [
@@ -2535,7 +2655,7 @@
25352655
"x-side": "client"
25362656
},
25372657
"WriteTextFileResponse": {
2538-
"description": "Response to fs/write_text_file",
2658+
"description": "Response to `fs/write_text_file`",
25392659
"properties": {
25402660
"_meta": {
25412661
"description": "Extension point for implementations"

src/acp/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# This file is generated from schema/meta.json. Do not edit by hand.
2-
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'}
2+
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'}
33
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'}
44
PROTOCOL_VERSION = 1

src/acp/schema.py

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: schema.json
3-
# timestamp: 2025-09-13T16:38:08+00:00
3+
# timestamp: 2025-10-08T17:34:51+00:00
44

55
from __future__ import annotations
66

@@ -164,6 +164,18 @@ class McpServer3(BaseModel):
164164
]
165165

166166

167+
class ModelInfo(BaseModel):
168+
field_meta: Annotated[
169+
Optional[Any],
170+
Field(alias='_meta', description='Extension point for implementations'),
171+
] = None
172+
description: Annotated[
173+
Optional[str], Field(description='Optional description of the model.')
174+
] = None
175+
modelId: Annotated[str, Field(description='Unique identifier for the model.')]
176+
name: Annotated[str, Field(description='Human-readable name of the model.')]
177+
178+
167179
class NewSessionRequest(BaseModel):
168180
field_meta: Annotated[
169181
Optional[Any],
@@ -244,6 +256,19 @@ class Role(Enum):
244256
user = 'user'
245257

246258

259+
class SessionModelState(BaseModel):
260+
field_meta: Annotated[
261+
Optional[Any],
262+
Field(alias='_meta', description='Extension point for implementations'),
263+
] = None
264+
availableModels: Annotated[
265+
List[ModelInfo], Field(description='The set of models that the Agent can use')
266+
]
267+
currentModelId: Annotated[
268+
str, Field(description='The current model the Agent is in.')
269+
]
270+
271+
247272
class SessionUpdate8(BaseModel):
248273
currentModeId: Annotated[
249274
str, Field(description='Unique identifier for a Session Mode.')
@@ -266,6 +291,24 @@ class SetSessionModeResponse(BaseModel):
266291
meta: Optional[Any] = None
267292

268293

294+
class SetSessionModelRequest(BaseModel):
295+
field_meta: Annotated[
296+
Optional[Any],
297+
Field(alias='_meta', description='Extension point for implementations'),
298+
] = None
299+
modelId: Annotated[str, Field(description='The ID of the model to set.')]
300+
sessionId: Annotated[
301+
str, Field(description='The ID of the session to set the model for.')
302+
]
303+
304+
305+
class SetSessionModelResponse(BaseModel):
306+
field_meta: Annotated[
307+
Optional[Any],
308+
Field(alias='_meta', description='Extension point for implementations'),
309+
] = None
310+
311+
269312
class TerminalExitStatus(BaseModel):
270313
field_meta: Annotated[
271314
Optional[Any],
@@ -468,7 +511,7 @@ class AvailableCommand(BaseModel):
468511
] = None
469512
name: Annotated[
470513
str,
471-
Field(description='Command name (e.g., "create_plan", "research_codebase").'),
514+
Field(description='Command name (e.g., `create_plan`, `research_codebase`).'),
472515
]
473516

474517

@@ -824,6 +867,12 @@ class LoadSessionResponse(BaseModel):
824867
Optional[Any],
825868
Field(alias='_meta', description='Extension point for implementations'),
826869
] = None
870+
models: Annotated[
871+
Optional[SessionModelState],
872+
Field(
873+
description='**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent'
874+
),
875+
] = None
827876
modes: Annotated[
828877
Optional[SessionModeState],
829878
Field(
@@ -837,6 +886,12 @@ class NewSessionResponse(BaseModel):
837886
Optional[Any],
838887
Field(alias='_meta', description='Extension point for implementations'),
839888
] = None
889+
models: Annotated[
890+
Optional[SessionModelState],
891+
Field(
892+
description='**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent'
893+
),
894+
] = None
840895
modes: Annotated[
841896
Optional[SessionModeState],
842897
Field(
@@ -1150,6 +1205,7 @@ class Model(
11501205
LoadSessionRequest,
11511206
SetSessionModeRequest,
11521207
PromptRequest,
1208+
SetSessionModelRequest,
11531209
Any,
11541210
],
11551211
Union[
@@ -1159,6 +1215,7 @@ class Model(
11591215
LoadSessionResponse,
11601216
SetSessionModeResponse,
11611217
PromptResponse,
1218+
SetSessionModelResponse,
11621219
Any,
11631220
],
11641221
Union[SessionNotification, Any],
@@ -1196,6 +1253,7 @@ class Model(
11961253
LoadSessionRequest,
11971254
SetSessionModeRequest,
11981255
PromptRequest,
1256+
SetSessionModelRequest,
11991257
Any,
12001258
],
12011259
Union[
@@ -1205,6 +1263,7 @@ class Model(
12051263
LoadSessionResponse,
12061264
SetSessionModeResponse,
12071265
PromptResponse,
1266+
SetSessionModelResponse,
12081267
Any,
12091268
],
12101269
Union[SessionNotification, Any],

0 commit comments

Comments
 (0)