Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ categories = ["development-tools", "api-bindings"]
include = ["/src/**/*.rs", "/README.md", "/LICENSE", "/Cargo.toml"]

[features]
unstable = ["unstable_session_model", "unstable_session_list"]
unstable = ["unstable_session_model", "unstable_session_list", "unstable_session_fork"]
unstable_session_model = []
unstable_session_list = []
unstable_session_fork = []

[[bin]]
name = "generate"
Expand Down
113 changes: 113 additions & 0 deletions docs/protocol/schema.unstable.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,88 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
The ID of the session to cancel operations for.
</ResponseField>

<a id="session-fork"></a>
### <span class="font-mono">session/fork</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Forks an existing session to create a new independent session.

This method is only available if the agent advertises the `session.fork` capability.

The agent should create a new session with the same conversation context as the
original, allowing operations like generating summaries without affecting the
original session's history.

#### <span class="font-mono">ForkSessionRequest</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Request parameters for forking an existing session.

Creates a new session based on the context of an existing one, allowing
operations like generating summaries without affecting the original session's history.

Only available if the Agent supports the `session.fork` capability.

**Type:** Object

**Properties:**

<ResponseField name="_meta" type={"object"} >
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
The ID of the session to fork.
</ResponseField>

#### <span class="font-mono">ForkSessionResponse</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Response from forking an existing session.

**Type:** Object

**Properties:**

<ResponseField name="_meta" type={"object"} >
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>
<ResponseField name="models" type={<><span><a href="#sessionmodelstate">SessionModelState</a></span><span> | null</span></>} >
**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Initial model state if supported by the Agent

</ResponseField>
<ResponseField name="modes" type={<><span><a href="#sessionmodestate">SessionModeState</a></span><span> | null</span></>} >
Initial mode state if supported by the Agent

See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)

</ResponseField>
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
Unique identifier for the newly created forked session.
</ResponseField>

<a id="session-list"></a>
### <span class="font-mono">session/list</span>

Expand Down Expand Up @@ -2591,6 +2673,14 @@ these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>
<ResponseField name="fork" type={<><span><a href="#sessionforkcapabilities">SessionForkCapabilities</a></span><span> | null</span></>} >
**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Whether the agent supports `session/fork`.

</ResponseField>
<ResponseField name="list" type={<><span><a href="#sessionlistcapabilities">SessionListCapabilities</a></span><span> | null</span></>} >
**UNSTABLE**
Expand All @@ -2601,6 +2691,29 @@ Whether the agent supports `session/list`.

</ResponseField>

## <span class="font-mono">SessionForkCapabilities</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Capabilities for the `session/fork` method.

By supplying `\{\}` it means that the agent supports forking of sessions.

**Type:** Object

**Properties:**

<ResponseField name="_meta" type={"object"} >
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>

## <span class="font-mono">SessionId</span>

A unique identifier for a conversation session between a client and agent.
Expand Down
1 change: 1 addition & 0 deletions schema/meta.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"authenticate": "authenticate",
"initialize": "initialize",
"session_cancel": "session/cancel",
"session_fork": "session/fork",
"session_list": "session/list",
"session_load": "session/load",
"session_new": "session/new",
Expand Down
93 changes: 93 additions & 0 deletions schema/schema.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@
{
"$ref": "#/$defs/ListSessionsResponse"
},
{
"$ref": "#/$defs/ForkSessionResponse"
},
{
"$ref": "#/$defs/SetSessionModeResponse"
},
Expand Down Expand Up @@ -573,6 +576,14 @@
],
"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."
},
{
"allOf": [
{
"$ref": "#/$defs/ForkSessionRequest"
}
],
"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."
},
{
"allOf": [
{
Expand Down Expand Up @@ -1076,6 +1087,68 @@
},
"type": "object"
},
"ForkSessionRequest": {
"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.",
"properties": {
"_meta": {
"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)"
},
"sessionId": {
"allOf": [
{
"$ref": "#/$defs/SessionId"
}
],
"description": "The ID of the session to fork."
}
},
"required": ["sessionId"],
"type": "object",
"x-method": "session/fork",
"x-side": "agent"
},
"ForkSessionResponse": {
"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.",
"properties": {
"_meta": {
"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)"
},
"models": {
"anyOf": [
{
"$ref": "#/$defs/SessionModelState"
},
{
"type": "null"
}
],
"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"
},
"modes": {
"anyOf": [
{
"$ref": "#/$defs/SessionModeState"
},
{
"type": "null"
}
],
"description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
},
"sessionId": {
"allOf": [
{
"$ref": "#/$defs/SessionId"
}
],
"description": "Unique identifier for the newly created forked session."
}
},
"required": ["sessionId"],
"type": "object",
"x-method": "session/fork",
"x-side": "agent"
},
"HttpHeader": {
"description": "An HTTP header to set when making requests to the MCP server.",
"properties": {
Expand Down Expand Up @@ -2182,6 +2255,17 @@
"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)",
"type": ["object", "null"]
},
"fork": {
"anyOf": [
{
"$ref": "#/$defs/SessionForkCapabilities"
},
{
"type": "null"
}
],
"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`."
},
"list": {
"anyOf": [
{
Expand All @@ -2196,6 +2280,15 @@
},
"type": "object"
},
"SessionForkCapabilities": {
"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.",
"properties": {
"_meta": {
"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)"
}
},
"type": "object"
},
"SessionId": {
"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)",
"type": "string"
Expand Down
Loading