|
208 | 208 | { |
209 | 209 | "$ref": "#/$defs/ListSessionsResponse" |
210 | 210 | }, |
| 211 | + { |
| 212 | + "$ref": "#/$defs/ForkSessionResponse" |
| 213 | + }, |
211 | 214 | { |
212 | 215 | "$ref": "#/$defs/SetSessionModeResponse" |
213 | 216 | }, |
|
573 | 576 | ], |
574 | 577 | "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLists existing sessions known to the agent.\n\nThis method is only available if the agent advertises the `listSessions` capability.\n\nThe agent should return metadata about sessions with optional filtering and pagination support." |
575 | 578 | }, |
| 579 | + { |
| 580 | + "allOf": [ |
| 581 | + { |
| 582 | + "$ref": "#/$defs/ForkSessionRequest" |
| 583 | + } |
| 584 | + ], |
| 585 | + "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." |
| 586 | + }, |
576 | 587 | { |
577 | 588 | "allOf": [ |
578 | 589 | { |
|
976 | 987 | "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)", |
977 | 988 | "properties": { |
978 | 989 | "code": { |
979 | | - "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification.", |
980 | | - "format": "int32", |
981 | | - "type": "integer" |
| 990 | + "allOf": [ |
| 991 | + { |
| 992 | + "$ref": "#/$defs/ErrorCode" |
| 993 | + } |
| 994 | + ], |
| 995 | + "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification." |
982 | 996 | }, |
983 | 997 | "data": { |
984 | 998 | "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." |
|
991 | 1005 | "required": ["code", "message"], |
992 | 1006 | "type": "object" |
993 | 1007 | }, |
| 1008 | + "ErrorCode": { |
| 1009 | + "anyOf": [ |
| 1010 | + { |
| 1011 | + "const": -32700, |
| 1012 | + "description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", |
| 1013 | + "format": "int32", |
| 1014 | + "type": "integer" |
| 1015 | + }, |
| 1016 | + { |
| 1017 | + "const": -32600, |
| 1018 | + "description": "**Invalid request**: The JSON sent is not a valid Request object.", |
| 1019 | + "format": "int32", |
| 1020 | + "type": "integer" |
| 1021 | + }, |
| 1022 | + { |
| 1023 | + "const": -32601, |
| 1024 | + "description": "**Method not found**: The method does not exist or is not available.", |
| 1025 | + "format": "int32", |
| 1026 | + "type": "integer" |
| 1027 | + }, |
| 1028 | + { |
| 1029 | + "const": -32602, |
| 1030 | + "description": "**Invalid params**: Invalid method parameter(s).", |
| 1031 | + "format": "int32", |
| 1032 | + "type": "integer" |
| 1033 | + }, |
| 1034 | + { |
| 1035 | + "const": -32603, |
| 1036 | + "description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", |
| 1037 | + "format": "int32", |
| 1038 | + "type": "integer" |
| 1039 | + }, |
| 1040 | + { |
| 1041 | + "const": -32000, |
| 1042 | + "description": "**Authentication required**: Authentication is required before this operation can be performed.", |
| 1043 | + "format": "int32", |
| 1044 | + "type": "integer" |
| 1045 | + }, |
| 1046 | + { |
| 1047 | + "const": -32002, |
| 1048 | + "description": "**Resource not found**: A given resource, such as a file, was not found.", |
| 1049 | + "format": "int32", |
| 1050 | + "type": "integer" |
| 1051 | + }, |
| 1052 | + { |
| 1053 | + "description": "Other undefined error code.", |
| 1054 | + "format": "int32", |
| 1055 | + "type": "integer" |
| 1056 | + } |
| 1057 | + ], |
| 1058 | + "description": "Predefined error codes for common JSON-RPC and ACP-specific errors.\n\nThese codes follow the JSON-RPC 2.0 specification for standard errors\nand use the reserved range (-32000 to -32099) for protocol-specific errors." |
| 1059 | + }, |
994 | 1060 | "ExtNotification": { |
995 | 1061 | "description": "Allows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" |
996 | 1062 | }, |
|
1021 | 1087 | }, |
1022 | 1088 | "type": "object" |
1023 | 1089 | }, |
| 1090 | + "ForkSessionRequest": { |
| 1091 | + "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 forking an existing session.\n\nCreates a new session based on the context of an existing one, allowing\noperations like generating summaries without affecting the original session's history.\n\nOnly available if the Agent supports the `session.fork` capability.", |
| 1092 | + "properties": { |
| 1093 | + "_meta": { |
| 1094 | + "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)" |
| 1095 | + }, |
| 1096 | + "sessionId": { |
| 1097 | + "allOf": [ |
| 1098 | + { |
| 1099 | + "$ref": "#/$defs/SessionId" |
| 1100 | + } |
| 1101 | + ], |
| 1102 | + "description": "The ID of the session to fork." |
| 1103 | + } |
| 1104 | + }, |
| 1105 | + "required": ["sessionId"], |
| 1106 | + "type": "object", |
| 1107 | + "x-method": "session/fork", |
| 1108 | + "x-side": "agent" |
| 1109 | + }, |
| 1110 | + "ForkSessionResponse": { |
| 1111 | + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from forking an existing session.", |
| 1112 | + "properties": { |
| 1113 | + "_meta": { |
| 1114 | + "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)" |
| 1115 | + }, |
| 1116 | + "models": { |
| 1117 | + "anyOf": [ |
| 1118 | + { |
| 1119 | + "$ref": "#/$defs/SessionModelState" |
| 1120 | + }, |
| 1121 | + { |
| 1122 | + "type": "null" |
| 1123 | + } |
| 1124 | + ], |
| 1125 | + "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" |
| 1126 | + }, |
| 1127 | + "modes": { |
| 1128 | + "anyOf": [ |
| 1129 | + { |
| 1130 | + "$ref": "#/$defs/SessionModeState" |
| 1131 | + }, |
| 1132 | + { |
| 1133 | + "type": "null" |
| 1134 | + } |
| 1135 | + ], |
| 1136 | + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" |
| 1137 | + }, |
| 1138 | + "sessionId": { |
| 1139 | + "allOf": [ |
| 1140 | + { |
| 1141 | + "$ref": "#/$defs/SessionId" |
| 1142 | + } |
| 1143 | + ], |
| 1144 | + "description": "Unique identifier for the newly created forked session." |
| 1145 | + } |
| 1146 | + }, |
| 1147 | + "required": ["sessionId"], |
| 1148 | + "type": "object", |
| 1149 | + "x-method": "session/fork", |
| 1150 | + "x-side": "agent" |
| 1151 | + }, |
1024 | 1152 | "HttpHeader": { |
1025 | 1153 | "description": "An HTTP header to set when making requests to the MCP server.", |
1026 | 1154 | "properties": { |
|
2127 | 2255 | "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)", |
2128 | 2256 | "type": ["object", "null"] |
2129 | 2257 | }, |
| 2258 | + "fork": { |
| 2259 | + "anyOf": [ |
| 2260 | + { |
| 2261 | + "$ref": "#/$defs/SessionForkCapabilities" |
| 2262 | + }, |
| 2263 | + { |
| 2264 | + "type": "null" |
| 2265 | + } |
| 2266 | + ], |
| 2267 | + "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/fork`." |
| 2268 | + }, |
2130 | 2269 | "list": { |
2131 | 2270 | "anyOf": [ |
2132 | 2271 | { |
|
2141 | 2280 | }, |
2142 | 2281 | "type": "object" |
2143 | 2282 | }, |
| 2283 | + "SessionForkCapabilities": { |
| 2284 | + "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/fork` method.\n\nBy supplying `{}` it means that the agent supports forking of sessions.", |
| 2285 | + "properties": { |
| 2286 | + "_meta": { |
| 2287 | + "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)" |
| 2288 | + } |
| 2289 | + }, |
| 2290 | + "type": "object" |
| 2291 | + }, |
2144 | 2292 | "SessionId": { |
2145 | 2293 | "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)", |
2146 | 2294 | "type": "string" |
|
0 commit comments