Skip to content

Commit 0773dde

Browse files
authored
feat: Update to 0.10.2 of the schema (#39)
1 parent 7f00af5 commit 0773dde

File tree

7 files changed

+359
-68
lines changed

7 files changed

+359
-68
lines changed

release-please-config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
".": {
44
"changelog-path": "CHANGELOG.md",
55
"release-type": "node",
6-
"bump-minor-pre-major": false,
7-
"bump-patch-for-minor-pre-major": false,
6+
"bump-minor-pre-major": true,
7+
"bump-patch-for-minor-pre-major": true,
88
"draft": false,
99
"prerelease": true
1010
}
1111
},
1212
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
13-
}
13+
}

schema/meta.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.json

Lines changed: 113 additions & 1 deletion
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
{
@@ -1123,6 +1134,17 @@
11231134
"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)",
11241135
"type": ["object", "null"]
11251136
},
1137+
"cwd": {
1138+
"description": "The working directory for this session.",
1139+
"type": "string"
1140+
},
1141+
"mcpServers": {
1142+
"description": "List of MCP servers to connect to for this session.",
1143+
"items": {
1144+
"$ref": "#/$defs/McpServer"
1145+
},
1146+
"type": "array"
1147+
},
11261148
"sessionId": {
11271149
"allOf": [
11281150
{
@@ -1132,7 +1154,7 @@
11321154
"description": "The ID of the session to fork."
11331155
}
11341156
},
1135-
"required": ["sessionId"],
1157+
"required": ["sessionId", "cwd"],
11361158
"type": "object",
11371159
"x-method": "session/fork",
11381160
"x-side": "agent"
@@ -2254,6 +2276,74 @@
22542276
"required": ["name", "uri"],
22552277
"type": "object"
22562278
},
2279+
"ResumeSessionRequest": {
2280+
"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.",
2281+
"properties": {
2282+
"_meta": {
2283+
"additionalProperties": true,
2284+
"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)",
2285+
"type": ["object", "null"]
2286+
},
2287+
"cwd": {
2288+
"description": "The working directory for this session.",
2289+
"type": "string"
2290+
},
2291+
"mcpServers": {
2292+
"description": "List of MCP servers to connect to for this session.",
2293+
"items": {
2294+
"$ref": "#/$defs/McpServer"
2295+
},
2296+
"type": "array"
2297+
},
2298+
"sessionId": {
2299+
"allOf": [
2300+
{
2301+
"$ref": "#/$defs/SessionId"
2302+
}
2303+
],
2304+
"description": "The ID of the session to resume."
2305+
}
2306+
},
2307+
"required": ["sessionId", "cwd"],
2308+
"type": "object",
2309+
"x-method": "session/resume",
2310+
"x-side": "agent"
2311+
},
2312+
"ResumeSessionResponse": {
2313+
"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.",
2314+
"properties": {
2315+
"_meta": {
2316+
"additionalProperties": true,
2317+
"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)",
2318+
"type": ["object", "null"]
2319+
},
2320+
"models": {
2321+
"anyOf": [
2322+
{
2323+
"$ref": "#/$defs/SessionModelState"
2324+
},
2325+
{
2326+
"type": "null"
2327+
}
2328+
],
2329+
"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"
2330+
},
2331+
"modes": {
2332+
"anyOf": [
2333+
{
2334+
"$ref": "#/$defs/SessionModeState"
2335+
},
2336+
{
2337+
"type": "null"
2338+
}
2339+
],
2340+
"description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
2341+
}
2342+
},
2343+
"type": "object",
2344+
"x-method": "session/resume",
2345+
"x-side": "agent"
2346+
},
22572347
"Role": {
22582348
"description": "The sender or recipient of messages and data in a conversation.",
22592349
"enum": ["assistant", "user"],
@@ -2308,6 +2398,17 @@
23082398
}
23092399
],
23102400
"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`."
2401+
},
2402+
"resume": {
2403+
"anyOf": [
2404+
{
2405+
"$ref": "#/$defs/SessionResumeCapabilities"
2406+
},
2407+
{
2408+
"type": "null"
2409+
}
2410+
],
2411+
"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`."
23112412
}
23122413
},
23132414
"type": "object"
@@ -2479,6 +2580,17 @@
24792580
"x-method": "session/update",
24802581
"x-side": "client"
24812582
},
2583+
"SessionResumeCapabilities": {
2584+
"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.",
2585+
"properties": {
2586+
"_meta": {
2587+
"additionalProperties": true,
2588+
"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)",
2589+
"type": ["object", "null"]
2590+
}
2591+
},
2592+
"type": "object"
2593+
},
24822594
"SessionUpdate": {
24832595
"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)",
24842596
"discriminator": {

scripts/generate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as fs from "fs/promises";
55
import { dirname } from "path";
66
import * as prettier from "prettier";
77

8-
const CURRENT_SCHEMA_RELEASE = "v0.10.1";
8+
const CURRENT_SCHEMA_RELEASE = "v0.10.2";
99

1010
await main();
1111

src/schema/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const AGENT_METHODS = {
1111
session_load: "session/load",
1212
session_new: "session/new",
1313
session_prompt: "session/prompt",
14+
session_resume: "session/resume",
1415
session_set_mode: "session/set_mode",
1516
session_set_model: "session/set_model",
1617
} as const;

src/schema/types.gen.ts

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export type AgentResponse =
7878
| LoadSessionResponse
7979
| ListSessionsResponse
8080
| ForkSessionResponse
81+
| ResumeSessionResponse
8182
| SetSessionModeResponse
8283
| PromptResponse
8384
| SetSessionModelResponse
@@ -360,6 +361,7 @@ export type ClientRequest = {
360361
| LoadSessionRequest
361362
| ListSessionsRequest
362363
| ForkSessionRequest
364+
| ResumeSessionRequest
363365
| SetSessionModeRequest
364366
| PromptRequest
365367
| SetSessionModelRequest
@@ -759,6 +761,14 @@ export type ForkSessionRequest = {
759761
_meta?: {
760762
[key: string]: unknown;
761763
} | null;
764+
/**
765+
* The working directory for this session.
766+
*/
767+
cwd: string;
768+
/**
769+
* List of MCP servers to connect to for this session.
770+
*/
771+
mcpServers?: Array<McpServer>;
762772
/**
763773
* The ID of the session to fork.
764774
*/
@@ -1793,6 +1803,83 @@ export type ResourceLink = {
17931803
uri: string;
17941804
};
17951805

1806+
/**
1807+
* **UNSTABLE**
1808+
*
1809+
* This capability is not part of the spec yet, and may be removed or changed at any point.
1810+
*
1811+
* Request parameters for resuming an existing session.
1812+
*
1813+
* Resumes an existing session without returning previous messages (unlike `session/load`).
1814+
* This is useful for agents that can resume sessions but don't implement full session loading.
1815+
*
1816+
* Only available if the Agent supports the `session.resume` capability.
1817+
*
1818+
* @experimental
1819+
*/
1820+
export type ResumeSessionRequest = {
1821+
/**
1822+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
1823+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
1824+
* these keys.
1825+
*
1826+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1827+
*/
1828+
_meta?: {
1829+
[key: string]: unknown;
1830+
} | null;
1831+
/**
1832+
* The working directory for this session.
1833+
*/
1834+
cwd: string;
1835+
/**
1836+
* List of MCP servers to connect to for this session.
1837+
*/
1838+
mcpServers?: Array<McpServer>;
1839+
/**
1840+
* The ID of the session to resume.
1841+
*/
1842+
sessionId: SessionId;
1843+
};
1844+
1845+
/**
1846+
* **UNSTABLE**
1847+
*
1848+
* This capability is not part of the spec yet, and may be removed or changed at any point.
1849+
*
1850+
* Response from resuming an existing session.
1851+
*
1852+
* @experimental
1853+
*/
1854+
export type ResumeSessionResponse = {
1855+
/**
1856+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
1857+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
1858+
* these keys.
1859+
*
1860+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1861+
*/
1862+
_meta?: {
1863+
[key: string]: unknown;
1864+
} | null;
1865+
/**
1866+
* **UNSTABLE**
1867+
*
1868+
* This capability is not part of the spec yet, and may be removed or changed at any point.
1869+
*
1870+
* Initial model state if supported by the Agent
1871+
*
1872+
* @experimental
1873+
*/
1874+
models?: SessionModelState | null;
1875+
/**
1876+
* Initial mode state if supported by the Agent
1877+
*
1878+
* See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
1879+
*/
1880+
modes?: SessionModeState | null;
1881+
};
1882+
17961883
/**
17971884
* The sender or recipient of messages and data in a conversation.
17981885
*/
@@ -1860,6 +1947,16 @@ export type SessionCapabilities = {
18601947
* @experimental
18611948
*/
18621949
list?: SessionListCapabilities | null;
1950+
/**
1951+
* **UNSTABLE**
1952+
*
1953+
* This capability is not part of the spec yet, and may be removed or changed at any point.
1954+
*
1955+
* Whether the agent supports `session/resume`.
1956+
*
1957+
* @experimental
1958+
*/
1959+
resume?: SessionResumeCapabilities | null;
18631960
};
18641961

18651962
/**
@@ -2062,6 +2159,30 @@ export type SessionNotification = {
20622159
update: SessionUpdate;
20632160
};
20642161

2162+
/**
2163+
* **UNSTABLE**
2164+
*
2165+
* This capability is not part of the spec yet, and may be removed or changed at any point.
2166+
*
2167+
* Capabilities for the `session/resume` method.
2168+
*
2169+
* By supplying `{}` it means that the agent supports resuming of sessions.
2170+
*
2171+
* @experimental
2172+
*/
2173+
export type SessionResumeCapabilities = {
2174+
/**
2175+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
2176+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
2177+
* these keys.
2178+
*
2179+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2180+
*/
2181+
_meta?: {
2182+
[key: string]: unknown;
2183+
} | null;
2184+
};
2185+
20652186
/**
20662187
* Different types of updates that can be sent during session processing.
20672188
*

0 commit comments

Comments
 (0)