Skip to content

Commit 3525800

Browse files
committed
Put behind feature flag
1 parent 132a601 commit 3525800

File tree

4 files changed

+14
-89
lines changed

4 files changed

+14
-89
lines changed

Cargo.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,19 @@ categories = ["development-tools", "api-bindings"]
1414
include = ["/src/**/*.rs", "/README.md", "/LICENSE", "/Cargo.toml"]
1515

1616
[features]
17-
unstable = ["unstable_session_model", "unstable_session_list", "unstable_session_fork", "unstable_session_resume", "unstable_cancel_request"]
17+
unstable = [
18+
"unstable_cancel_request",
19+
"unstable_session_fork",
20+
"unstable_session_info_update",
21+
"unstable_session_list",
22+
"unstable_session_model",
23+
"unstable_session_resume",
24+
]
1825
unstable_cancel_request = []
19-
unstable_session_model = []
20-
unstable_session_list = []
2126
unstable_session_fork = []
27+
unstable_session_info_update = []
28+
unstable_session_list = []
29+
unstable_session_model = []
2230
unstable_session_resume = []
2331

2432
[[bin]]

docs/protocol/schema.mdx

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,32 +2421,6 @@ See protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session
24212421

24222422
**Type:** `string`
24232423

2424-
## <span class="font-mono">SessionInfoUpdate</span>
2425-
2426-
Update to session metadata. All fields are optional to support partial updates.
2427-
2428-
Agents send this notification to update session information like title or custom metadata.
2429-
This allows clients to display dynamic session names and track session state changes.
2430-
2431-
**Type:** Object
2432-
2433-
**Properties:**
2434-
2435-
<ResponseField name="_meta" type={"object | null"} >
2436-
The _meta property is reserved by ACP to allow clients and agents to attach additional
2437-
metadata to their interactions. Implementations MUST NOT make assumptions about values at
2438-
these keys.
2439-
2440-
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2441-
2442-
</ResponseField>
2443-
<ResponseField name="title" type={"string | null"} >
2444-
Human-readable title for the session. Set to null to clear.
2445-
</ResponseField>
2446-
<ResponseField name="updatedAt" type={"string | null"} >
2447-
ISO 8601 timestamp of last activity. Set to null to clear.
2448-
</ResponseField>
2449-
24502424
## <span class="font-mono">SessionMode</span>
24512425

24522426
A mode the agent can operate in.
@@ -2738,31 +2712,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
27382712
</Expandable>
27392713
</ResponseField>
27402714

2741-
<ResponseField name="session_info_update" type="object">
2742-
Session metadata has been updated (title, timestamps, custom metadata)
2743-
2744-
<Expandable title="Properties">
2745-
2746-
<ResponseField name="_meta" type={"object | null"} >
2747-
The _meta property is reserved by ACP to allow clients and agents to attach additional
2748-
metadata to their interactions. Implementations MUST NOT make assumptions about values at
2749-
these keys.
2750-
2751-
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2752-
2753-
</ResponseField>
2754-
<ResponseField name="sessionUpdate" type={"string"} required>
2755-
</ResponseField>
2756-
<ResponseField name="title" type={"string | null"} >
2757-
Human-readable title for the session. Set to null to clear.
2758-
</ResponseField>
2759-
<ResponseField name="updatedAt" type={"string | null"} >
2760-
ISO 8601 timestamp of last activity. Set to null to clear.
2761-
</ResponseField>
2762-
2763-
</Expandable>
2764-
</ResponseField>
2765-
27662715
## <span class="font-mono">StopReason</span>
27672716

27682717
Reasons why an agent stops processing a prompt turn.

schema/schema.json

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,25 +2067,6 @@
20672067
"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)",
20682068
"type": "string"
20692069
},
2070-
"SessionInfoUpdate": {
2071-
"description": "Update to session metadata. All fields are optional to support partial updates.\n\nAgents send this notification to update session information like title or custom metadata.\nThis allows clients to display dynamic session names and track session state changes.",
2072-
"properties": {
2073-
"_meta": {
2074-
"additionalProperties": true,
2075-
"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)",
2076-
"type": ["object", "null"]
2077-
},
2078-
"title": {
2079-
"description": "Human-readable title for the session. Set to null to clear.",
2080-
"type": ["string", "null"]
2081-
},
2082-
"updatedAt": {
2083-
"description": "ISO 8601 timestamp of last activity. Set to null to clear.",
2084-
"type": ["string", "null"]
2085-
}
2086-
},
2087-
"type": "object"
2088-
},
20892070
"SessionMode": {
20902071
"description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
20912072
"properties": {
@@ -2301,22 +2282,6 @@
23012282
},
23022283
"required": ["sessionUpdate"],
23032284
"type": "object"
2304-
},
2305-
{
2306-
"allOf": [
2307-
{
2308-
"$ref": "#/$defs/SessionInfoUpdate"
2309-
}
2310-
],
2311-
"description": "Session metadata has been updated (title, timestamps, custom metadata)",
2312-
"properties": {
2313-
"sessionUpdate": {
2314-
"const": "session_info_update",
2315-
"type": "string"
2316-
}
2317-
},
2318-
"required": ["sessionUpdate"],
2319-
"type": "object"
23202285
}
23212286
]
23222287
},

src/client.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub enum SessionUpdate {
9090
///
9191
/// See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
9292
CurrentModeUpdate(CurrentModeUpdate),
93+
#[cfg(feature = "unstable_session_info_update")]
9394
/// Session metadata has been updated (title, timestamps, custom metadata)
9495
SessionInfoUpdate(SessionInfoUpdate),
9596
}
@@ -137,6 +138,7 @@ impl CurrentModeUpdate {
137138
///
138139
/// Agents send this notification to update session information like title or custom metadata.
139140
/// This allows clients to display dynamic session names and track session state changes.
141+
#[cfg(feature = "unstable_session_info_update")]
140142
#[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
141143
#[serde(rename_all = "camelCase")]
142144
#[non_exhaustive]
@@ -156,6 +158,7 @@ pub struct SessionInfoUpdate {
156158
pub meta: Option<Meta>,
157159
}
158160

161+
#[cfg(feature = "unstable_session_info_update")]
159162
impl SessionInfoUpdate {
160163
#[must_use]
161164
pub fn new() -> Self {

0 commit comments

Comments
 (0)