WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit b7b6502

Browse files
committed
Update schema
1 parent b339a2a commit b7b6502

File tree

4 files changed

+218
-0
lines changed

4 files changed

+218
-0
lines changed

docs/protocol/draft/schema.mdx

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,90 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
583583
Indicates why the agent stopped processing the turn.
584584
</ResponseField>
585585

586+
<a id="session-resume"></a>
587+
### <span class="font-mono">session/resume</span>
588+
589+
**UNSTABLE**
590+
591+
This capability is not part of the spec yet, and may be removed or changed at any point.
592+
593+
Resumes an existing session without returning previous messages.
594+
595+
This method is only available if the agent advertises the `session.resume` capability.
596+
597+
The agent should resume the session context, allowing the conversation to continue
598+
without replaying the message history (unlike `session/load`).
599+
600+
#### <span class="font-mono">ResumeSessionRequest</span>
601+
602+
**UNSTABLE**
603+
604+
This capability is not part of the spec yet, and may be removed or changed at any point.
605+
606+
Request parameters for resuming an existing session.
607+
608+
Resumes an existing session without returning previous messages (unlike `session/load`).
609+
This is useful for agents that can resume sessions but don't implement full session loading.
610+
611+
Only available if the Agent supports the `session.resume` capability.
612+
613+
**Type:** Object
614+
615+
**Properties:**
616+
617+
<ResponseField name="_meta" type={"object | null"} >
618+
The _meta property is reserved by ACP to allow clients and agents to attach additional
619+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
620+
these keys.
621+
622+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
623+
624+
</ResponseField>
625+
<ResponseField name="cwd" type={"string"} required>
626+
The working directory for this session.
627+
</ResponseField>
628+
<ResponseField name="mcpServers" type={<><span><a href="#mcpserver">McpServer</a></span><span>[]</span></>} >
629+
List of MCP servers to connect to for this session.
630+
</ResponseField>
631+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
632+
The ID of the session to resume.
633+
</ResponseField>
634+
635+
#### <span class="font-mono">ResumeSessionResponse</span>
636+
637+
**UNSTABLE**
638+
639+
This capability is not part of the spec yet, and may be removed or changed at any point.
640+
641+
Response from resuming an existing session.
642+
643+
**Type:** Object
644+
645+
**Properties:**
646+
647+
<ResponseField name="_meta" type={"object | null"} >
648+
The _meta property is reserved by ACP to allow clients and agents to attach additional
649+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
650+
these keys.
651+
652+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
653+
654+
</ResponseField>
655+
<ResponseField name="models" type={<><span><a href="#sessionmodelstate">SessionModelState</a></span><span> | null</span></>} >
656+
**UNSTABLE**
657+
658+
This capability is not part of the spec yet, and may be removed or changed at any point.
659+
660+
Initial model state if supported by the Agent
661+
662+
</ResponseField>
663+
<ResponseField name="modes" type={<><span><a href="#sessionmodestate">SessionModeState</a></span><span> | null</span></>} >
664+
Initial mode state if supported by the Agent
665+
666+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
667+
668+
</ResponseField>
669+
586670
<a id="session-set_mode"></a>
587671
### <span class="font-mono">session/set_mode</span>
588672

@@ -2759,6 +2843,14 @@ This capability is not part of the spec yet, and may be removed or changed at an
27592843

27602844
Whether the agent supports `session/list`.
27612845

2846+
</ResponseField>
2847+
<ResponseField name="resume" type={<><span><a href="#sessionresumecapabilities">SessionResumeCapabilities</a></span><span> | null</span></>} >
2848+
**UNSTABLE**
2849+
2850+
This capability is not part of the spec yet, and may be removed or changed at any point.
2851+
2852+
Whether the agent supports `session/resume`.
2853+
27622854
</ResponseField>
27632855

27642856
## <span class="font-mono">SessionForkCapabilities</span>
@@ -2930,6 +3022,29 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
29303022
The current model the Agent is in.
29313023
</ResponseField>
29323024

3025+
## <span class="font-mono">SessionResumeCapabilities</span>
3026+
3027+
**UNSTABLE**
3028+
3029+
This capability is not part of the spec yet, and may be removed or changed at any point.
3030+
3031+
Capabilities for the `session/resume` method.
3032+
3033+
By supplying `\{\}` it means that the agent supports resuming of sessions.
3034+
3035+
**Type:** Object
3036+
3037+
**Properties:**
3038+
3039+
<ResponseField name="_meta" type={"object | null"} >
3040+
The _meta property is reserved by ACP to allow clients and agents to attach additional
3041+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
3042+
these keys.
3043+
3044+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3045+
3046+
</ResponseField>
3047+
29333048
## <span class="font-mono">SessionUpdate</span>
29343049

29353050
Different types of updates that can be sent during session processing.

schema/meta.unstable.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"session_load": "session/load",
99
"session_new": "session/new",
1010
"session_prompt": "session/prompt",
11+
"session_resume": "session/resume",
1112
"session_set_mode": "session/set_mode",
1213
"session_set_model": "session/set_model"
1314
},

schema/schema.unstable.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@
211211
{
212212
"$ref": "#/$defs/ForkSessionResponse"
213213
},
214+
{
215+
"$ref": "#/$defs/ResumeSessionResponse"
216+
},
214217
{
215218
"$ref": "#/$defs/SetSessionModeResponse"
216219
},
@@ -606,6 +609,14 @@
606609
],
607610
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForks an existing session to create a new independent session.\n\nThis method is only available if the agent advertises the `session.fork` capability.\n\nThe agent should create a new session with the same conversation context as the\noriginal, allowing operations like generating summaries without affecting the\noriginal session's history."
608611
},
612+
{
613+
"allOf": [
614+
{
615+
"$ref": "#/$defs/ResumeSessionRequest"
616+
}
617+
],
618+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `session.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`)."
619+
},
609620
{
610621
"allOf": [
611622
{
@@ -2254,6 +2265,74 @@
22542265
"required": ["name", "uri"],
22552266
"type": "object"
22562267
},
2268+
"ResumeSessionRequest": {
2269+
"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 resuming an existing session.\n\nResumes an existing session without returning previous messages (unlike `session/load`).\nThis is useful for agents that can resume sessions but don't implement full session loading.\n\nOnly available if the Agent supports the `session.resume` capability.",
2270+
"properties": {
2271+
"_meta": {
2272+
"additionalProperties": true,
2273+
"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)",
2274+
"type": ["object", "null"]
2275+
},
2276+
"cwd": {
2277+
"description": "The working directory for this session.",
2278+
"type": "string"
2279+
},
2280+
"mcpServers": {
2281+
"description": "List of MCP servers to connect to for this session.",
2282+
"items": {
2283+
"$ref": "#/$defs/McpServer"
2284+
},
2285+
"type": "array"
2286+
},
2287+
"sessionId": {
2288+
"allOf": [
2289+
{
2290+
"$ref": "#/$defs/SessionId"
2291+
}
2292+
],
2293+
"description": "The ID of the session to resume."
2294+
}
2295+
},
2296+
"required": ["sessionId", "cwd"],
2297+
"type": "object",
2298+
"x-method": "session/resume",
2299+
"x-side": "agent"
2300+
},
2301+
"ResumeSessionResponse": {
2302+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from resuming an existing session.",
2303+
"properties": {
2304+
"_meta": {
2305+
"additionalProperties": true,
2306+
"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)",
2307+
"type": ["object", "null"]
2308+
},
2309+
"models": {
2310+
"anyOf": [
2311+
{
2312+
"$ref": "#/$defs/SessionModelState"
2313+
},
2314+
{
2315+
"type": "null"
2316+
}
2317+
],
2318+
"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"
2319+
},
2320+
"modes": {
2321+
"anyOf": [
2322+
{
2323+
"$ref": "#/$defs/SessionModeState"
2324+
},
2325+
{
2326+
"type": "null"
2327+
}
2328+
],
2329+
"description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
2330+
}
2331+
},
2332+
"type": "object",
2333+
"x-method": "session/resume",
2334+
"x-side": "agent"
2335+
},
22572336
"Role": {
22582337
"description": "The sender or recipient of messages and data in a conversation.",
22592338
"enum": ["assistant", "user"],
@@ -2308,6 +2387,17 @@
23082387
}
23092388
],
23102389
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/list`."
2390+
},
2391+
"resume": {
2392+
"anyOf": [
2393+
{
2394+
"$ref": "#/$defs/SessionResumeCapabilities"
2395+
},
2396+
{
2397+
"type": "null"
2398+
}
2399+
],
2400+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/resume`."
23112401
}
23122402
},
23132403
"type": "object"
@@ -2479,6 +2569,17 @@
24792569
"x-method": "session/update",
24802570
"x-side": "client"
24812571
},
2572+
"SessionResumeCapabilities": {
2573+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for the `session/resume` method.\n\nBy supplying `{}` it means that the agent supports resuming of sessions.",
2574+
"properties": {
2575+
"_meta": {
2576+
"additionalProperties": true,
2577+
"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)",
2578+
"type": ["object", "null"]
2579+
}
2580+
},
2581+
"type": "object"
2582+
},
24822583
"SessionUpdate": {
24832584
"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)",
24842585
"discriminator": {

src/agent.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ pub struct ResumeSessionRequest {
755755
/// The working directory for this session.
756756
pub cwd: PathBuf,
757757
/// List of MCP servers to connect to for this session.
758+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
758759
pub mcp_servers: Vec<McpServer>,
759760
/// The _meta property is reserved by ACP to allow clients and agents to attach additional
760761
/// metadata to their interactions. Implementations MUST NOT make assumptions about values at

0 commit comments

Comments
 (0)