diff --git a/docs/protocol/v1/draft/schema.mdx b/docs/protocol/v1/draft/schema.mdx
index 6b3c606c..5b4d018e 100644
--- a/docs/protocol/v1/draft/schema.mdx
+++ b/docs/protocol/v1/draft/schema.mdx
@@ -1527,6 +1527,56 @@ See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/v1/d
+
+### session/setTitle
+
+Sets the title for a session.
+
+Empty titles are valid and request that the agent clear the session title.
+
+This method can be called at any time during a session, whether the Agent is
+idle or actively generating a response.
+
+#### SetSessionTitleRequest
+
+Request parameters for setting a session title.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v1/draft/extensibility)
+
+
+SessionId} required>
+ The ID of the session to set the title for.
+
+
+ The new title for the session.
+
+
+#### SetSessionTitleResponse
+
+Response to `session/setTitle` method.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v1/draft/extensibility)
+
+
+
### session/set_config_option
@@ -6698,6 +6748,9 @@ Whether the agent supports `session/fork`.
SessionResumeCapabilities | null>} >
Whether the agent supports `session/resume`.
+SessionSetTitleCapabilities | null>} >
+ Whether the agent supports `session/setTitle`.
+
## SessionCloseCapabilities
@@ -7159,6 +7212,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d
+## SessionSetTitleCapabilities
+
+Capabilities for the `session/setTitle` method.
+
+By supplying `\{\}` it means that the agent supports setting session titles.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v1/draft/extensibility)
+
+
+
## SessionUpdate
Different types of updates that can be sent during session processing.
diff --git a/docs/protocol/v1/schema.mdx b/docs/protocol/v1/schema.mdx
index 46168908..a6ddb9bd 100644
--- a/docs/protocol/v1/schema.mdx
+++ b/docs/protocol/v1/schema.mdx
@@ -673,6 +673,56 @@ See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/v1/s
+
+### session/setTitle
+
+Sets the title for a session.
+
+Empty titles are valid and request that the agent clear the session title.
+
+This method can be called at any time during a session, whether the Agent is
+idle or actively generating a response.
+
+#### SetSessionTitleRequest
+
+Request parameters for setting a session title.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v1/extensibility)
+
+
+SessionId} required>
+ The ID of the session to set the title for.
+
+
+ The new title for the session.
+
+
+#### SetSessionTitleResponse
+
+Response to `session/setTitle` method.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v1/extensibility)
+
+
+
### session/set_config_option
@@ -2872,6 +2922,9 @@ additional-root list associated with a listed session.
SessionResumeCapabilities | null>} >
Whether the agent supports `session/resume`.
+SessionSetTitleCapabilities | null>} >
+ Whether the agent supports `session/setTitle`.
+
## SessionCloseCapabilities
@@ -3223,6 +3276,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e
+## SessionSetTitleCapabilities
+
+Capabilities for the `session/setTitle` method.
+
+By supplying `\{\}` it means that the agent supports setting session titles.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v1/extensibility)
+
+
+
## SessionUpdate
Different types of updates that can be sent during session processing.
diff --git a/docs/protocol/v2/draft/schema.mdx b/docs/protocol/v2/draft/schema.mdx
index a5d9a9d9..70966e38 100644
--- a/docs/protocol/v2/draft/schema.mdx
+++ b/docs/protocol/v2/draft/schema.mdx
@@ -1504,6 +1504,56 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
Initial session configuration options if supported by the Agent.
+
+### session/setTitle
+
+Sets the title for a session.
+
+Empty titles are valid and request that the agent clear the session title.
+
+This method can be called at any time during a session, whether the Agent is
+idle or actively generating a response.
+
+#### SetSessionTitleRequest
+
+Request parameters for setting a session title.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v2/draft/extensibility)
+
+
+SessionId} required>
+ The ID of the session to set the title for.
+
+
+ The new title for the session.
+
+
+#### SetSessionTitleResponse
+
+Response to `session/setTitle` method.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v2/draft/extensibility)
+
+
+
### session/set_config_option
@@ -6810,6 +6860,9 @@ Whether the agent supports `session/fork`.
SessionResumeCapabilities | null>} >
Whether the agent supports `session/resume`.
+SessionSetTitleCapabilities | null>} >
+ Whether the agent supports `session/setTitle`.
+
## SessionCloseCapabilities
@@ -7247,6 +7300,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
+## SessionSetTitleCapabilities
+
+Capabilities for the `session/setTitle` method.
+
+By supplying `\{\}` it means that the agent supports setting session titles.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v2/draft/extensibility)
+
+
+
## SessionUpdate
Different types of updates that can be sent during session processing.
diff --git a/docs/protocol/v2/schema.mdx b/docs/protocol/v2/schema.mdx
index 513ad48c..3feeff8a 100644
--- a/docs/protocol/v2/schema.mdx
+++ b/docs/protocol/v2/schema.mdx
@@ -655,6 +655,56 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e
Initial session configuration options if supported by the Agent.
+
+### session/setTitle
+
+Sets the title for a session.
+
+Empty titles are valid and request that the agent clear the session title.
+
+This method can be called at any time during a session, whether the Agent is
+idle or actively generating a response.
+
+#### SetSessionTitleRequest
+
+Request parameters for setting a session title.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v2/extensibility)
+
+
+SessionId} required>
+ The ID of the session to set the title for.
+
+
+ The new title for the session.
+
+
+#### SetSessionTitleResponse
+
+Response to `session/setTitle` method.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v2/extensibility)
+
+
+
### session/set_config_option
@@ -2911,6 +2961,9 @@ additional-root list associated with a listed session.
SessionResumeCapabilities | null>} >
Whether the agent supports `session/resume`.
+SessionSetTitleCapabilities | null>} >
+ Whether the agent supports `session/setTitle`.
+
## SessionCloseCapabilities
@@ -3267,6 +3320,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e
+## SessionSetTitleCapabilities
+
+Capabilities for the `session/setTitle` method.
+
+By supplying `\{\}` it means that the agent supports setting session titles.
+
+**Type:** Object
+
+**Properties:**
+
+
+ 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/v2/extensibility)
+
+
+
## SessionUpdate
Different types of updates that can be sent during session processing.
diff --git a/schema/meta.json b/schema/meta.json
index bc5135b2..a4d90250 100644
--- a/schema/meta.json
+++ b/schema/meta.json
@@ -11,7 +11,8 @@
"session_prompt": "session/prompt",
"session_resume": "session/resume",
"session_set_config_option": "session/set_config_option",
- "session_set_mode": "session/set_mode"
+ "session_set_mode": "session/set_mode",
+ "session_set_title": "session/setTitle"
},
"clientMethods": {
"fs_read_text_file": "fs/read_text_file",
diff --git a/schema/meta.unstable.json b/schema/meta.unstable.json
index 071a291d..93e67c03 100644
--- a/schema/meta.unstable.json
+++ b/schema/meta.unstable.json
@@ -27,7 +27,8 @@
"session_prompt": "session/prompt",
"session_resume": "session/resume",
"session_set_config_option": "session/set_config_option",
- "session_set_mode": "session/set_mode"
+ "session_set_mode": "session/set_mode",
+ "session_set_title": "session/setTitle"
},
"clientMethods": {
"elicitation_complete": "elicitation/complete",
diff --git a/schema/meta.v2.unstable.json b/schema/meta.v2.unstable.json
index 612d1405..0383d5fc 100644
--- a/schema/meta.v2.unstable.json
+++ b/schema/meta.v2.unstable.json
@@ -26,7 +26,8 @@
"session_new": "session/new",
"session_prompt": "session/prompt",
"session_resume": "session/resume",
- "session_set_config_option": "session/set_config_option"
+ "session_set_config_option": "session/set_config_option",
+ "session_set_title": "session/setTitle"
},
"clientMethods": {
"elicitation_complete": "elicitation/complete",
diff --git a/schema/schema.json b/schema/schema.json
index 42251b54..c7ffe192 100644
--- a/schema/schema.json
+++ b/schema/schema.json
@@ -308,6 +308,14 @@
],
"title": "SetSessionModeResponse"
},
+ {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SetSessionTitleResponse"
+ }
+ ],
+ "title": "SetSessionTitleResponse"
+ },
{
"allOf": [
{
@@ -751,6 +759,15 @@
"description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
"title": "SetSessionModeRequest"
},
+ {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SetSessionTitleRequest"
+ }
+ ],
+ "description": "Sets the title for a session.\n\nEmpty titles are valid and request that the agent clear the session title.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.",
+ "title": "SetSessionTitleRequest"
+ },
{
"allOf": [
{
@@ -2641,6 +2658,18 @@
],
"description": "Whether the agent supports `session/resume`.",
"x-deserialize-default-on-error": true
+ },
+ "setTitle": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionSetTitleCapabilities"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Whether the agent supports `session/setTitle`.",
+ "x-deserialize-default-on-error": true
}
},
"type": "object"
@@ -3027,6 +3056,17 @@
},
"type": "object"
},
+ "SessionSetTitleCapabilities": {
+ "description": "Capabilities for the `session/setTitle` method.\n\nBy supplying `{}` it means that the agent supports setting session titles.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ }
+ },
+ "type": "object"
+ },
"SessionUpdate": {
"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)",
"discriminator": {
@@ -3299,6 +3339,45 @@
"x-method": "session/set_mode",
"x-side": "agent"
},
+ "SetSessionTitleRequest": {
+ "description": "Request parameters for setting a session title.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ },
+ "sessionId": {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ }
+ ],
+ "description": "The ID of the session to set the title for."
+ },
+ "title": {
+ "description": "The new title for the session.",
+ "type": "string"
+ }
+ },
+ "required": ["sessionId", "title"],
+ "type": "object",
+ "x-method": "session/setTitle",
+ "x-side": "agent"
+ },
+ "SetSessionTitleResponse": {
+ "description": "Response to `session/setTitle` method.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ }
+ },
+ "type": "object",
+ "x-method": "session/setTitle",
+ "x-side": "agent"
+ },
"StopReason": {
"description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)",
"oneOf": [
diff --git a/schema/schema.unstable.json b/schema/schema.unstable.json
index 70afba0a..fd2d517e 100644
--- a/schema/schema.unstable.json
+++ b/schema/schema.unstable.json
@@ -465,6 +465,14 @@
],
"title": "SetSessionModeResponse"
},
+ {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SetSessionTitleResponse"
+ }
+ ],
+ "title": "SetSessionTitleResponse"
+ },
{
"allOf": [
{
@@ -1351,6 +1359,15 @@
"description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
"title": "SetSessionModeRequest"
},
+ {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SetSessionTitleRequest"
+ }
+ ],
+ "description": "Sets the title for a session.\n\nEmpty titles are valid and request that the agent clear the session title.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.",
+ "title": "SetSessionTitleRequest"
+ },
{
"allOf": [
{
@@ -5933,6 +5950,18 @@
],
"description": "Whether the agent supports `session/resume`.",
"x-deserialize-default-on-error": true
+ },
+ "setTitle": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionSetTitleCapabilities"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Whether the agent supports `session/setTitle`.",
+ "x-deserialize-default-on-error": true
}
},
"type": "object"
@@ -6368,6 +6397,17 @@
},
"type": "object"
},
+ "SessionSetTitleCapabilities": {
+ "description": "Capabilities for the `session/setTitle` method.\n\nBy supplying `{}` it means that the agent supports setting session titles.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ }
+ },
+ "type": "object"
+ },
"SessionUpdate": {
"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)",
"discriminator": {
@@ -6763,6 +6803,45 @@
"x-method": "session/set_mode",
"x-side": "agent"
},
+ "SetSessionTitleRequest": {
+ "description": "Request parameters for setting a session title.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ },
+ "sessionId": {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ }
+ ],
+ "description": "The ID of the session to set the title for."
+ },
+ "title": {
+ "description": "The new title for the session.",
+ "type": "string"
+ }
+ },
+ "required": ["sessionId", "title"],
+ "type": "object",
+ "x-method": "session/setTitle",
+ "x-side": "agent"
+ },
+ "SetSessionTitleResponse": {
+ "description": "Response to `session/setTitle` method.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ }
+ },
+ "type": "object",
+ "x-method": "session/setTitle",
+ "x-side": "agent"
+ },
"StartNesRequest": {
"description": "Request to start an NES session.",
"properties": {
diff --git a/schema/schema.v2.unstable.json b/schema/schema.v2.unstable.json
index dcddf8ad..f718cf36 100644
--- a/schema/schema.v2.unstable.json
+++ b/schema/schema.v2.unstable.json
@@ -457,6 +457,14 @@
],
"title": "CloseSessionResponse"
},
+ {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SetSessionTitleResponse"
+ }
+ ],
+ "title": "SetSessionTitleResponse"
+ },
{
"allOf": [
{
@@ -1422,6 +1430,15 @@
"description": "Closes an active session and frees up any resources associated with it.\n\nThis method is only available if the agent advertises the `sessionCapabilities.close` capability.\n\nThe agent must cancel any ongoing work (as if `session/cancel` was called)\nand then free up any resources associated with the session.",
"title": "CloseSessionRequest"
},
+ {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SetSessionTitleRequest"
+ }
+ ],
+ "description": "Sets the title for a session.\n\nEmpty titles are valid and request that the agent clear the session title.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.",
+ "title": "SetSessionTitleRequest"
+ },
{
"allOf": [
{
@@ -6146,6 +6163,18 @@
],
"description": "Whether the agent supports `session/resume`.",
"x-deserialize-default-on-error": true
+ },
+ "setTitle": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SessionSetTitleCapabilities"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Whether the agent supports `session/setTitle`.",
+ "x-deserialize-default-on-error": true
}
},
"type": "object"
@@ -6564,6 +6593,17 @@
},
"type": "object"
},
+ "SessionSetTitleCapabilities": {
+ "description": "Capabilities for the `session/setTitle` method.\n\nBy supplying `{}` it means that the agent supports setting session titles.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ }
+ },
+ "type": "object"
+ },
"SessionUpdate": {
"anyOf": [
{
@@ -7037,6 +7077,45 @@
"x-method": "session/set_config_option",
"x-side": "agent"
},
+ "SetSessionTitleRequest": {
+ "description": "Request parameters for setting a session title.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ },
+ "sessionId": {
+ "allOf": [
+ {
+ "$ref": "#/$defs/SessionId"
+ }
+ ],
+ "description": "The ID of the session to set the title for."
+ },
+ "title": {
+ "description": "The new title for the session.",
+ "type": "string"
+ }
+ },
+ "required": ["sessionId", "title"],
+ "type": "object",
+ "x-method": "session/setTitle",
+ "x-side": "agent"
+ },
+ "SetSessionTitleResponse": {
+ "description": "Response to `session/setTitle` method.",
+ "properties": {
+ "_meta": {
+ "additionalProperties": true,
+ "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"]
+ }
+ },
+ "type": "object",
+ "x-method": "session/setTitle",
+ "x-side": "agent"
+ },
"StartNesRequest": {
"description": "Request to start an NES session.",
"properties": {
diff --git a/src/bin/generate.rs b/src/bin/generate.rs
index 42e481d7..f27bbf86 100644
--- a/src/bin/generate.rs
+++ b/src/bin/generate.rs
@@ -1370,6 +1370,7 @@ starting with '$/' it is free to ignore the notification."
"session/fork" => self.agent.get("ForkSessionRequest").unwrap(),
"session/resume" => self.agent.get("ResumeSessionRequest").unwrap(),
"session/set_mode" => self.agent.get("SetSessionModeRequest").unwrap(),
+ "session/setTitle" => self.agent.get("SetSessionTitleRequest").unwrap(),
"session/set_config_option" => {
self.agent.get("SetSessionConfigOptionRequest").unwrap()
}
diff --git a/src/v1/agent.rs b/src/v1/agent.rs
index 16ee3096..16a9131f 100644
--- a/src/v1/agent.rs
+++ b/src/v1/agent.rs
@@ -2031,6 +2031,77 @@ impl SetSessionModeResponse {
}
}
+/// Request parameters for setting a session title.
+#[skip_serializing_none]
+#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
+#[schemars(extend("x-side" = "agent", "x-method" = SESSION_SET_TITLE_METHOD_NAME))]
+#[serde(rename_all = "camelCase")]
+#[non_exhaustive]
+pub struct SetSessionTitleRequest {
+ /// The ID of the session to set the title for.
+ pub session_id: SessionId,
+ /// The new title for the session.
+ pub title: String,
+ /// 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)
+ #[serde(rename = "_meta")]
+ pub meta: Option,
+}
+
+impl SetSessionTitleRequest {
+ #[must_use]
+ pub fn new(session_id: impl Into, title: impl Into) -> Self {
+ Self {
+ session_id: session_id.into(),
+ title: title.into(),
+ meta: None,
+ }
+ }
+
+ #[must_use]
+ pub fn meta(mut self, meta: impl IntoOption) -> Self {
+ self.meta = meta.into_option();
+ self
+ }
+}
+
+/// Response to `session/setTitle` method.
+#[skip_serializing_none]
+#[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
+#[schemars(extend("x-side" = "agent", "x-method" = SESSION_SET_TITLE_METHOD_NAME))]
+#[serde(rename_all = "camelCase")]
+#[non_exhaustive]
+pub struct SetSessionTitleResponse {
+ /// 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)
+ #[serde(rename = "_meta")]
+ pub meta: Option,
+}
+
+impl SetSessionTitleResponse {
+ #[must_use]
+ pub fn new() -> Self {
+ Self::default()
+ }
+
+ /// 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)
+ #[must_use]
+ pub fn meta(mut self, meta: impl IntoOption) -> Self {
+ self.meta = meta.into_option();
+ self
+ }
+}
+
// Session config options
/// Unique identifier for a session configuration option.
@@ -3890,6 +3961,11 @@ pub struct SessionCapabilities {
#[schemars(extend("x-deserialize-default-on-error" = true))]
#[serde(default)]
pub close: Option,
+ /// Whether the agent supports `session/setTitle`.
+ #[serde_as(deserialize_as = "DefaultOnError")]
+ #[schemars(extend("x-deserialize-default-on-error" = true))]
+ #[serde(default)]
+ pub set_title: Option,
/// 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.
@@ -3963,6 +4039,13 @@ impl SessionCapabilities {
self
}
+ /// Whether the agent supports `session/setTitle`.
+ #[must_use]
+ pub fn set_title(mut self, set_title: impl IntoOption) -> Self {
+ self.set_title = set_title.into_option();
+ self
+ }
+
/// 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.
@@ -4194,6 +4277,40 @@ impl SessionCloseCapabilities {
}
}
+/// Capabilities for the `session/setTitle` method.
+///
+/// By supplying `{}` it means that the agent supports setting session titles.
+#[skip_serializing_none]
+#[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
+#[non_exhaustive]
+pub struct SessionSetTitleCapabilities {
+ /// 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)
+ #[serde(rename = "_meta")]
+ pub meta: Option,
+}
+
+impl SessionSetTitleCapabilities {
+ #[must_use]
+ pub fn new() -> Self {
+ Self::default()
+ }
+
+ /// 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)
+ #[must_use]
+ pub fn meta(mut self, meta: impl IntoOption) -> Self {
+ self.meta = meta.into_option();
+ self
+ }
+}
+
/// Prompt capabilities supported by the agent in `session/prompt` requests.
///
/// Baseline agent functionality requires support for [`ContentBlock::Text`]
@@ -4374,6 +4491,8 @@ pub struct AgentMethodNames {
pub session_load: &'static str,
/// Method for setting the mode for a session.
pub session_set_mode: &'static str,
+ /// Method for setting the title for a session.
+ pub session_set_title: &'static str,
/// Method for setting a configuration option for a session.
pub session_set_config_option: &'static str,
/// Method for sending a prompt to the agent.
@@ -4442,6 +4561,7 @@ pub const AGENT_METHOD_NAMES: AgentMethodNames = AgentMethodNames {
session_new: SESSION_NEW_METHOD_NAME,
session_load: SESSION_LOAD_METHOD_NAME,
session_set_mode: SESSION_SET_MODE_METHOD_NAME,
+ session_set_title: SESSION_SET_TITLE_METHOD_NAME,
session_set_config_option: SESSION_SET_CONFIG_OPTION_METHOD_NAME,
session_prompt: SESSION_PROMPT_METHOD_NAME,
session_cancel: SESSION_CANCEL_METHOD_NAME,
@@ -4496,6 +4616,8 @@ pub(crate) const SESSION_NEW_METHOD_NAME: &str = "session/new";
pub(crate) const SESSION_LOAD_METHOD_NAME: &str = "session/load";
/// Method name for setting the mode for a session.
pub(crate) const SESSION_SET_MODE_METHOD_NAME: &str = "session/set_mode";
+/// Method name for setting the title for a session.
+pub(crate) const SESSION_SET_TITLE_METHOD_NAME: &str = "session/setTitle";
/// Method name for setting a configuration option for a session.
pub(crate) const SESSION_SET_CONFIG_OPTION_METHOD_NAME: &str = "session/set_config_option";
/// Method name for sending a prompt.
@@ -4656,6 +4778,13 @@ pub enum ClientRequest {
///
/// See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
SetSessionModeRequest(SetSessionModeRequest),
+ /// Sets the title for a session.
+ ///
+ /// Empty titles are valid and request that the agent clear the session title.
+ ///
+ /// This method can be called at any time during a session, whether the Agent is
+ /// idle or actively generating a response.
+ SetSessionTitleRequest(SetSessionTitleRequest),
/// Sets the current value for a session configuration option.
SetSessionConfigOptionRequest(SetSessionConfigOptionRequest),
/// Processes a user prompt within a session.
@@ -4734,6 +4863,7 @@ impl ClientRequest {
Self::ResumeSessionRequest(_) => AGENT_METHOD_NAMES.session_resume,
Self::CloseSessionRequest(_) => AGENT_METHOD_NAMES.session_close,
Self::SetSessionModeRequest(_) => AGENT_METHOD_NAMES.session_set_mode,
+ Self::SetSessionTitleRequest(_) => AGENT_METHOD_NAMES.session_set_title,
Self::SetSessionConfigOptionRequest(_) => AGENT_METHOD_NAMES.session_set_config_option,
Self::PromptRequest(_) => AGENT_METHOD_NAMES.session_prompt,
#[cfg(feature = "unstable_nes")]
@@ -4780,6 +4910,7 @@ pub enum AgentResponse {
ResumeSessionResponse(#[serde(default)] ResumeSessionResponse),
CloseSessionResponse(#[serde(default)] CloseSessionResponse),
SetSessionModeResponse(#[serde(default)] SetSessionModeResponse),
+ SetSessionTitleResponse(#[serde(default)] SetSessionTitleResponse),
SetSessionConfigOptionResponse(SetSessionConfigOptionResponse),
PromptResponse(PromptResponse),
#[cfg(feature = "unstable_nes")]
@@ -5583,6 +5714,43 @@ mod test_serialization {
}
}
+ #[test]
+ fn test_set_session_title_request_roundtrip() {
+ let original = SetSessionTitleRequest::new("sess_1", "A clearer thread title");
+ let json = serde_json::to_value(&original).unwrap();
+ assert_eq!(
+ json,
+ json!({
+ "sessionId": "sess_1",
+ "title": "A clearer thread title"
+ })
+ );
+ let roundtripped: SetSessionTitleRequest = serde_json::from_value(json).unwrap();
+ assert_eq!(original, roundtripped);
+ }
+
+ #[test]
+ fn test_set_session_title_response_roundtrip() {
+ let original = SetSessionTitleResponse::new();
+ let json = serde_json::to_value(&original).unwrap();
+ assert_eq!(json, json!({}));
+ let roundtripped: SetSessionTitleResponse = serde_json::from_value(json).unwrap();
+ assert_eq!(original, roundtripped);
+ }
+
+ #[test]
+ fn test_set_session_title_capabilities_serialization() {
+ assert_eq!(
+ serde_json::to_value(
+ SessionCapabilities::new().set_title(SessionSetTitleCapabilities::new())
+ )
+ .unwrap(),
+ json!({
+ "setTitle": {}
+ })
+ );
+ }
+
#[cfg(feature = "unstable_boolean_config")]
#[test]
fn test_session_config_option_value_id_serialize() {
diff --git a/src/v2/agent.rs b/src/v2/agent.rs
index 26b9f793..3fef955f 100644
--- a/src/v2/agent.rs
+++ b/src/v2/agent.rs
@@ -1979,6 +1979,77 @@ impl SessionInfo {
}
}
+/// Request parameters for setting a session title.
+#[skip_serializing_none]
+#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
+#[schemars(extend("x-side" = "agent", "x-method" = SESSION_SET_TITLE_METHOD_NAME))]
+#[serde(rename_all = "camelCase")]
+#[non_exhaustive]
+pub struct SetSessionTitleRequest {
+ /// The ID of the session to set the title for.
+ pub session_id: SessionId,
+ /// The new title for the session.
+ pub title: String,
+ /// 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)
+ #[serde(rename = "_meta")]
+ pub meta: Option,
+}
+
+impl SetSessionTitleRequest {
+ #[must_use]
+ pub fn new(session_id: impl Into, title: impl Into) -> Self {
+ Self {
+ session_id: session_id.into(),
+ title: title.into(),
+ meta: None,
+ }
+ }
+
+ #[must_use]
+ pub fn meta(mut self, meta: impl IntoOption) -> Self {
+ self.meta = meta.into_option();
+ self
+ }
+}
+
+/// Response to `session/setTitle` method.
+#[skip_serializing_none]
+#[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
+#[schemars(extend("x-side" = "agent", "x-method" = SESSION_SET_TITLE_METHOD_NAME))]
+#[serde(rename_all = "camelCase")]
+#[non_exhaustive]
+pub struct SetSessionTitleResponse {
+ /// 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)
+ #[serde(rename = "_meta")]
+ pub meta: Option,
+}
+
+impl SetSessionTitleResponse {
+ #[must_use]
+ pub fn new() -> Self {
+ Self::default()
+ }
+
+ /// 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)
+ #[must_use]
+ pub fn meta(mut self, meta: impl IntoOption) -> Self {
+ self.meta = meta.into_option();
+ self
+ }
+}
+
// Session config options
/// Unique identifier for a session configuration option.
@@ -3938,6 +4009,11 @@ pub struct SessionCapabilities {
#[schemars(extend("x-deserialize-default-on-error" = true))]
#[serde(default)]
pub close: Option,
+ /// Whether the agent supports `session/setTitle`.
+ #[serde_as(deserialize_as = "DefaultOnError")]
+ #[schemars(extend("x-deserialize-default-on-error" = true))]
+ #[serde(default)]
+ pub set_title: Option,
/// 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.
@@ -4011,6 +4087,13 @@ impl SessionCapabilities {
self
}
+ /// Whether the agent supports `session/setTitle`.
+ #[must_use]
+ pub fn set_title(mut self, set_title: impl IntoOption) -> Self {
+ self.set_title = set_title.into_option();
+ self
+ }
+
/// 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.
@@ -4242,6 +4325,40 @@ impl SessionCloseCapabilities {
}
}
+/// Capabilities for the `session/setTitle` method.
+///
+/// By supplying `{}` it means that the agent supports setting session titles.
+#[skip_serializing_none]
+#[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
+#[non_exhaustive]
+pub struct SessionSetTitleCapabilities {
+ /// 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)
+ #[serde(rename = "_meta")]
+ pub meta: Option,
+}
+
+impl SessionSetTitleCapabilities {
+ #[must_use]
+ pub fn new() -> Self {
+ Self::default()
+ }
+
+ /// 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)
+ #[must_use]
+ pub fn meta(mut self, meta: impl IntoOption) -> Self {
+ self.meta = meta.into_option();
+ self
+ }
+}
+
/// Prompt capabilities supported by the agent in `session/prompt` requests.
///
/// Baseline agent functionality requires support for [`ContentBlock::Text`]
@@ -4420,6 +4537,8 @@ pub struct AgentMethodNames {
pub session_new: &'static str,
/// Method for loading an existing session.
pub session_load: &'static str,
+ /// Method for setting the title for a session.
+ pub session_set_title: &'static str,
/// Method for setting a configuration option for a session.
pub session_set_config_option: &'static str,
/// Method for sending a prompt to the agent.
@@ -4487,6 +4606,7 @@ pub const AGENT_METHOD_NAMES: AgentMethodNames = AgentMethodNames {
providers_disable: PROVIDERS_DISABLE_METHOD_NAME,
session_new: SESSION_NEW_METHOD_NAME,
session_load: SESSION_LOAD_METHOD_NAME,
+ session_set_title: SESSION_SET_TITLE_METHOD_NAME,
session_set_config_option: SESSION_SET_CONFIG_OPTION_METHOD_NAME,
session_prompt: SESSION_PROMPT_METHOD_NAME,
session_cancel: SESSION_CANCEL_METHOD_NAME,
@@ -4539,6 +4659,8 @@ pub(crate) const PROVIDERS_DISABLE_METHOD_NAME: &str = "providers/disable";
pub(crate) const SESSION_NEW_METHOD_NAME: &str = "session/new";
/// Method name for loading an existing session.
pub(crate) const SESSION_LOAD_METHOD_NAME: &str = "session/load";
+/// Method name for setting the title for a session.
+pub(crate) const SESSION_SET_TITLE_METHOD_NAME: &str = "session/setTitle";
/// Method name for setting a configuration option for a session.
pub(crate) const SESSION_SET_CONFIG_OPTION_METHOD_NAME: &str = "session/set_config_option";
/// Method name for sending a prompt.
@@ -4685,6 +4807,13 @@ pub enum ClientRequest {
/// The agent must cancel any ongoing work (as if `session/cancel` was called)
/// and then free up any resources associated with the session.
CloseSessionRequest(CloseSessionRequest),
+ /// Sets the title for a session.
+ ///
+ /// Empty titles are valid and request that the agent clear the session title.
+ ///
+ /// This method can be called at any time during a session, whether the Agent is
+ /// idle or actively generating a response.
+ SetSessionTitleRequest(SetSessionTitleRequest),
/// Sets the current value for a session configuration option.
SetSessionConfigOptionRequest(SetSessionConfigOptionRequest),
/// Processes a user prompt within a session.
@@ -4762,6 +4891,7 @@ impl ClientRequest {
Self::ForkSessionRequest(_) => AGENT_METHOD_NAMES.session_fork,
Self::ResumeSessionRequest(_) => AGENT_METHOD_NAMES.session_resume,
Self::CloseSessionRequest(_) => AGENT_METHOD_NAMES.session_close,
+ Self::SetSessionTitleRequest(_) => AGENT_METHOD_NAMES.session_set_title,
Self::SetSessionConfigOptionRequest(_) => AGENT_METHOD_NAMES.session_set_config_option,
Self::PromptRequest(_) => AGENT_METHOD_NAMES.session_prompt,
#[cfg(feature = "unstable_nes")]
@@ -4807,6 +4937,7 @@ pub enum AgentResponse {
ForkSessionResponse(ForkSessionResponse),
ResumeSessionResponse(#[serde(default)] ResumeSessionResponse),
CloseSessionResponse(#[serde(default)] CloseSessionResponse),
+ SetSessionTitleResponse(#[serde(default)] SetSessionTitleResponse),
SetSessionConfigOptionResponse(SetSessionConfigOptionResponse),
PromptResponse(PromptResponse),
#[cfg(feature = "unstable_nes")]
@@ -5588,6 +5719,43 @@ mod test_serialization {
}
}
+ #[test]
+ fn test_set_session_title_request_roundtrip() {
+ let original = SetSessionTitleRequest::new("sess_1", "A clearer thread title");
+ let json = serde_json::to_value(&original).unwrap();
+ assert_eq!(
+ json,
+ json!({
+ "sessionId": "sess_1",
+ "title": "A clearer thread title"
+ })
+ );
+ let roundtripped: SetSessionTitleRequest = serde_json::from_value(json).unwrap();
+ assert_eq!(original, roundtripped);
+ }
+
+ #[test]
+ fn test_set_session_title_response_roundtrip() {
+ let original = SetSessionTitleResponse::new();
+ let json = serde_json::to_value(&original).unwrap();
+ assert_eq!(json, json!({}));
+ let roundtripped: SetSessionTitleResponse = serde_json::from_value(json).unwrap();
+ assert_eq!(original, roundtripped);
+ }
+
+ #[test]
+ fn test_set_session_title_capabilities_serialization() {
+ assert_eq!(
+ serde_json::to_value(
+ SessionCapabilities::new().set_title(SessionSetTitleCapabilities::new())
+ )
+ .unwrap(),
+ json!({
+ "setTitle": {}
+ })
+ );
+ }
+
#[cfg(feature = "unstable_boolean_config")]
#[test]
fn test_session_config_option_value_id_serialize() {
diff --git a/src/v2/conversion.rs b/src/v2/conversion.rs
index ac86a50f..19082031 100644
--- a/src/v2/conversion.rs
+++ b/src/v2/conversion.rs
@@ -3968,6 +3968,61 @@ impl IntoV2 for crate::v1::SessionInfo {
}
}
+impl IntoV1 for super::SetSessionTitleRequest {
+ type Output = crate::v1::SetSessionTitleRequest;
+
+ fn into_v1(self) -> Result {
+ let Self {
+ session_id,
+ title,
+ meta,
+ } = self;
+ Ok(crate::v1::SetSessionTitleRequest {
+ session_id: session_id.into_v1()?,
+ title,
+ meta: meta.into_v1()?,
+ })
+ }
+}
+
+impl IntoV2 for crate::v1::SetSessionTitleRequest {
+ type Output = super::SetSessionTitleRequest;
+
+ fn into_v2(self) -> Result {
+ let Self {
+ session_id,
+ title,
+ meta,
+ } = self;
+ Ok(super::SetSessionTitleRequest {
+ session_id: session_id.into_v2()?,
+ title,
+ meta: meta.into_v2()?,
+ })
+ }
+}
+
+impl IntoV1 for super::SetSessionTitleResponse {
+ type Output = crate::v1::SetSessionTitleResponse;
+
+ fn into_v1(self) -> Result {
+ let Self { meta } = self;
+ Ok(crate::v1::SetSessionTitleResponse {
+ meta: meta.into_v1()?,
+ })
+ }
+}
+
+impl IntoV2 for crate::v1::SetSessionTitleResponse {
+ type Output = super::SetSessionTitleResponse;
+
+ fn into_v2(self) -> Result {
+ let Self { meta } = self;
+ Ok(super::SetSessionTitleResponse {
+ meta: meta.into_v2()?,
+ })
+ }
+}
impl IntoV1 for super::SessionConfigId {
type Output = crate::v1::SessionConfigId;
@@ -5177,6 +5232,7 @@ impl IntoV1 for super::SessionCapabilities {
fork,
resume,
close,
+ set_title,
meta,
} = self;
Ok(crate::v1::SessionCapabilities {
@@ -5188,6 +5244,7 @@ impl IntoV1 for super::SessionCapabilities {
fork: fork.into_v1()?,
resume: resume.into_v1()?,
close: close.into_v1()?,
+ set_title: set_title.into_v1()?,
meta: meta.into_v1()?,
})
}
@@ -5206,6 +5263,7 @@ impl IntoV2 for crate::v1::SessionCapabilities {
fork,
resume,
close,
+ set_title,
meta,
} = self;
Ok(super::SessionCapabilities {
@@ -5217,6 +5275,7 @@ impl IntoV2 for crate::v1::SessionCapabilities {
fork: fork.into_v2()?,
resume: resume.into_v2()?,
close: close.into_v2()?,
+ set_title: set_title.into_v2()?,
meta: meta.into_v2()?,
})
}
@@ -5357,6 +5416,28 @@ impl IntoV2 for crate::v1::SessionCloseCapabilities {
}
}
+impl IntoV1 for super::SessionSetTitleCapabilities {
+ type Output = crate::v1::SessionSetTitleCapabilities;
+
+ fn into_v1(self) -> Result {
+ let Self { meta } = self;
+ Ok(crate::v1::SessionSetTitleCapabilities {
+ meta: meta.into_v1()?,
+ })
+ }
+}
+
+impl IntoV2 for crate::v1::SessionSetTitleCapabilities {
+ type Output = super::SessionSetTitleCapabilities;
+
+ fn into_v2(self) -> Result {
+ let Self { meta } = self;
+ Ok(super::SessionSetTitleCapabilities {
+ meta: meta.into_v2()?,
+ })
+ }
+}
+
impl IntoV1 for super::PromptCapabilities {
type Output = crate::v1::PromptCapabilities;
@@ -5484,6 +5565,9 @@ impl IntoV1 for super::ClientRequest {
Self::CloseSessionRequest(value) => {
crate::v1::ClientRequest::CloseSessionRequest(value.into_v1()?)
}
+ Self::SetSessionTitleRequest(value) => {
+ crate::v1::ClientRequest::SetSessionTitleRequest(value.into_v1()?)
+ }
Self::SetSessionConfigOptionRequest(value) => {
crate::v1::ClientRequest::SetSessionConfigOptionRequest(value.into_v1()?)
}
@@ -5561,6 +5645,9 @@ impl IntoV2 for crate::v1::ClientRequest {
Self::SetSessionModeRequest(_) => {
return Err(removed_v1_enum_variant("ClientRequest", "session/set_mode"));
}
+ Self::SetSessionTitleRequest(value) => {
+ super::ClientRequest::SetSessionTitleRequest(value.into_v2()?)
+ }
Self::SetSessionConfigOptionRequest(value) => {
super::ClientRequest::SetSessionConfigOptionRequest(value.into_v2()?)
}
@@ -5633,6 +5720,9 @@ impl IntoV1 for super::AgentResponse {
Self::CloseSessionResponse(value) => {
crate::v1::AgentResponse::CloseSessionResponse(value.into_v1()?)
}
+ Self::SetSessionTitleResponse(value) => {
+ crate::v1::AgentResponse::SetSessionTitleResponse(value.into_v1()?)
+ }
Self::SetSessionConfigOptionResponse(value) => {
crate::v1::AgentResponse::SetSessionConfigOptionResponse(value.into_v1()?)
}
@@ -5712,6 +5802,9 @@ impl IntoV2 for crate::v1::AgentResponse {
Self::SetSessionModeResponse(_) => {
return Err(removed_v1_enum_variant("AgentResponse", "session/set_mode"));
}
+ Self::SetSessionTitleResponse(value) => {
+ super::AgentResponse::SetSessionTitleResponse(value.into_v2()?)
+ }
Self::SetSessionConfigOptionResponse(value) => {
super::AgentResponse::SetSessionConfigOptionResponse(value.into_v2()?)
}