From e10ac8ca429354bdbf3e7399136081cf48e675b4 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Thu, 2 Jul 2026 12:04:24 +0200 Subject: [PATCH 1/2] Changeset - add optional `contentSha256` to `ContentRef` --- CHANGELOG.md | 2 ++ clients/go/CHANGELOG.md | 2 ++ clients/go/ahptypes/state.generated.go | 12 ++++++++++-- clients/kotlin/CHANGELOG.md | 2 ++ .../generated/State.generated.kt | 18 +++++++++++++++++- clients/rust/CHANGELOG.md | 2 ++ clients/rust/crates/ahp-types/src/state.rs | 12 ++++++++++++ .../Generated/State.generated.swift | 19 ++++++++++++++++++- clients/swift/CHANGELOG.md | 2 ++ clients/typescript/CHANGELOG.md | 2 ++ schema/actions.schema.json | 16 ++++++++++++++++ schema/commands.schema.json | 16 ++++++++++++++++ schema/errors.schema.json | 16 ++++++++++++++++ schema/notifications.schema.json | 16 ++++++++++++++++ schema/state.schema.json | 16 ++++++++++++++++ types/common/state.ts | 2 ++ 16 files changed, 151 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ee62817..713916b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ changes accumulate. Track in-flight protocol changes via PRs touching ### Added +- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of + the referenced content so consumers can verify integrity or deduplicate. - Optional `intention` field on `chat/toolCallStart` and every `ToolCallState` variant, providing a human-readable description of what the invocation intends to do. diff --git a/clients/go/CHANGELOG.md b/clients/go/CHANGELOG.md index fd43e073..97d1b060 100644 --- a/clients/go/CHANGELOG.md +++ b/clients/go/CHANGELOG.md @@ -16,6 +16,8 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file. ### Added +- Optional `ContentSha256` field on `ContentRef`, carrying the SHA-256 hash of + the referenced content so consumers can verify integrity or deduplicate. - `SubscribeParams.Delivery.MaxLatencyMs` and `Client.SubscribeWithDelivery` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/clients/go/ahptypes/state.generated.go b/clients/go/ahptypes/state.generated.go index 700beae5..2507fc25 100644 --- a/clients/go/ahptypes/state.generated.go +++ b/clients/go/ahptypes/state.generated.go @@ -1517,6 +1517,8 @@ type MessageResourceAttachment struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` + // Content SHA-256 hash + ContentSha256 *string `json:"contentSha256,omitempty"` // Discriminant Type MessageAttachmentKind `json:"type"` // Optional selection within the referenced textual resource. @@ -1583,6 +1585,8 @@ type ContentRef struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` + // Content SHA-256 hash + ContentSha256 *string `json:"contentSha256,omitempty"` } // A content part that's a reference to large content stored outside the state tree. @@ -1593,6 +1597,8 @@ type ResourceResponsePart struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` + // Content SHA-256 hash + ContentSha256 *string `json:"contentSha256,omitempty"` // Discriminant Kind ResponsePartKind `json:"kind"` } @@ -1954,8 +1960,10 @@ type ToolResultResourceContent struct { // Approximate size in bytes SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type - ContentType *string `json:"contentType,omitempty"` - Type ToolResultContentType `json:"type"` + ContentType *string `json:"contentType,omitempty"` + // Content SHA-256 hash + ContentSha256 *string `json:"contentSha256,omitempty"` + Type ToolResultContentType `json:"type"` } // Describes a file modification performed by a tool. diff --git a/clients/kotlin/CHANGELOG.md b/clients/kotlin/CHANGELOG.md index eb5c051e..f959bf37 100644 --- a/clients/kotlin/CHANGELOG.md +++ b/clients/kotlin/CHANGELOG.md @@ -17,6 +17,8 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump ### Added +- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of + the referenced content so consumers can verify integrity or deduplicate. - `SubscribeParams.delivery.maxLatencyMs` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. - Optional `capabilities` field on `AgentInfo` (`AgentCapabilities` with a diff --git a/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt b/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt index 4ca2b7de..7cf35537 100644 --- a/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt +++ b/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt @@ -2112,6 +2112,10 @@ data class MessageResourceAttachment( * Content MIME type */ val contentType: String? = null, + /** + * Content SHA-256 hash + */ + val contentSha256: String? = null, /** * Discriminant */ @@ -2204,7 +2208,11 @@ data class ContentRef( /** * Content MIME type */ - val contentType: String? = null + val contentType: String? = null, + /** + * Content SHA-256 hash + */ + val contentSha256: String? = null ) @Serializable @@ -2221,6 +2229,10 @@ data class ResourceReponsePart( * Content MIME type */ val contentType: String? = null, + /** + * Content SHA-256 hash + */ + val contentSha256: String? = null, /** * Discriminant */ @@ -2785,6 +2797,10 @@ data class ToolResultResourceContent( * Content MIME type */ val contentType: String? = null, + /** + * Content SHA-256 hash + */ + val contentSha256: String? = null, val type: ToolResultContentType ) diff --git a/clients/rust/CHANGELOG.md b/clients/rust/CHANGELOG.md index 68deb44e..b3ac8dc6 100644 --- a/clients/rust/CHANGELOG.md +++ b/clients/rust/CHANGELOG.md @@ -17,6 +17,8 @@ matching `## [X.Y.Z]` heading is missing from this file. ### Added +- Optional `content_sha256` field on `ContentRef`, carrying the SHA-256 hash of + the referenced content so consumers can verify integrity or deduplicate. - `SubscribeParams.delivery.max_latency_ms` and `Client::subscribe_with_delivery` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/clients/rust/crates/ahp-types/src/state.rs b/clients/rust/crates/ahp-types/src/state.rs index 2e8b15d8..ad3ec278 100644 --- a/clients/rust/crates/ahp-types/src/state.rs +++ b/clients/rust/crates/ahp-types/src/state.rs @@ -1919,6 +1919,9 @@ pub struct MessageResourceAttachment { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, + /// Content SHA-256 hash + #[serde(default, skip_serializing_if = "Option::is_none")] + pub content_sha256: Option, /// Optional selection within the referenced textual resource. /// /// Only meaningful for textual resources. @@ -1992,6 +1995,9 @@ pub struct ContentRef { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, + /// Content SHA-256 hash + #[serde(default, skip_serializing_if = "Option::is_none")] + pub content_sha256: Option, } /// A content part that's a reference to large content stored outside the state tree. @@ -2006,6 +2012,9 @@ pub struct ResourceResponsePart { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, + /// Content SHA-256 hash + #[serde(default, skip_serializing_if = "Option::is_none")] + pub content_sha256: Option, } /// A tool call represented as a response part. @@ -2443,6 +2452,9 @@ pub struct ToolResultResourceContent { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, + /// Content SHA-256 hash + #[serde(default, skip_serializing_if = "Option::is_none")] + pub content_sha256: Option, } /// Describes a file modification performed by a tool. diff --git a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift index 4e278a52..e27b447b 100644 --- a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift +++ b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift @@ -2061,6 +2061,8 @@ public struct MessageResourceAttachment: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? + /// Content SHA-256 hash + public var contentSha256: String? /// Discriminant public var type: MessageAttachmentKind /// Optional selection within the referenced textual resource. @@ -2076,6 +2078,7 @@ public struct MessageResourceAttachment: Codable, Sendable { case uri case sizeHint case contentType + case contentSha256 case type case selection } @@ -2088,6 +2091,7 @@ public struct MessageResourceAttachment: Codable, Sendable { uri: String, sizeHint: Int? = nil, contentType: String? = nil, + contentSha256: String? = nil, type: MessageAttachmentKind, selection: TextSelection? = nil ) { @@ -2098,6 +2102,7 @@ public struct MessageResourceAttachment: Codable, Sendable { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType + self.contentSha256 = contentSha256 self.type = type self.selection = selection } @@ -2192,15 +2197,19 @@ public struct ContentRef: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? + /// Content SHA-256 hash + public var contentSha256: String? public init( uri: String, sizeHint: Int? = nil, - contentType: String? = nil + contentType: String? = nil, + contentSha256: String? = nil ) { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType + self.contentSha256 = contentSha256 } } @@ -2211,6 +2220,8 @@ public struct ResourceReponsePart: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? + /// Content SHA-256 hash + public var contentSha256: String? /// Discriminant public var kind: ResponsePartKind @@ -2218,11 +2229,13 @@ public struct ResourceReponsePart: Codable, Sendable { uri: String, sizeHint: Int? = nil, contentType: String? = nil, + contentSha256: String? = nil, kind: ResponsePartKind ) { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType + self.contentSha256 = contentSha256 self.kind = kind } } @@ -2939,17 +2952,21 @@ public struct ToolResultResourceContent: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? + /// Content SHA-256 hash + public var contentSha256: String? public var type: ToolResultContentType public init( uri: String, sizeHint: Int? = nil, contentType: String? = nil, + contentSha256: String? = nil, type: ToolResultContentType ) { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType + self.contentSha256 = contentSha256 self.type = type } } diff --git a/clients/swift/CHANGELOG.md b/clients/swift/CHANGELOG.md index 7bf7e226..35ea1dc0 100644 --- a/clients/swift/CHANGELOG.md +++ b/clients/swift/CHANGELOG.md @@ -19,6 +19,8 @@ the tag matches the version pinned in [`VERSION`](VERSION). ### Added +- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of + the referenced content so consumers can verify integrity or deduplicate. - `SubscribeParams.delivery.maxLatencyMs` and `AHPClient.subscribe(_:delivery:)` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/clients/typescript/CHANGELOG.md b/clients/typescript/CHANGELOG.md index 88476600..87f711e9 100644 --- a/clients/typescript/CHANGELOG.md +++ b/clients/typescript/CHANGELOG.md @@ -22,6 +22,8 @@ hotfix escape hatch. ### Added +- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of + the referenced content so consumers can verify integrity or deduplicate. - `SubscribeParams.delivery.maxLatencyMs` and `AhpClient.subscribe` delivery options for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/schema/actions.schema.json b/schema/actions.schema.json index 62e065d9..76ef340a 100644 --- a/schema/actions.schema.json +++ b/schema/actions.schema.json @@ -2216,6 +2216,10 @@ "contentType": { "type": "string", "description": "Content MIME type" + }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" } }, "required": [ @@ -4807,6 +4811,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", "description": "Discriminant" @@ -4903,6 +4911,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", "description": "Discriminant" @@ -5629,6 +5641,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" } diff --git a/schema/commands.schema.json b/schema/commands.schema.json index 0136d547..97b45a99 100644 --- a/schema/commands.schema.json +++ b/schema/commands.schema.json @@ -1561,6 +1561,10 @@ "contentType": { "type": "string", "description": "Content MIME type" + }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" } }, "required": [ @@ -4152,6 +4156,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", "description": "Discriminant" @@ -4248,6 +4256,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", "description": "Discriminant" @@ -4974,6 +4986,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" } diff --git a/schema/errors.schema.json b/schema/errors.schema.json index 08d3863e..c1f34570 100644 --- a/schema/errors.schema.json +++ b/schema/errors.schema.json @@ -379,6 +379,10 @@ "contentType": { "type": "string", "description": "Content MIME type" + }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" } }, "required": [ @@ -2970,6 +2974,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", "description": "Discriminant" @@ -3066,6 +3074,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", "description": "Discriminant" @@ -3792,6 +3804,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" } diff --git a/schema/notifications.schema.json b/schema/notifications.schema.json index fe8b92f3..02d093d6 100644 --- a/schema/notifications.schema.json +++ b/schema/notifications.schema.json @@ -539,6 +539,10 @@ "contentType": { "type": "string", "description": "Content MIME type" + }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" } }, "required": [ @@ -3130,6 +3134,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", "description": "Discriminant" @@ -3226,6 +3234,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", "description": "Discriminant" @@ -3952,6 +3964,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" } diff --git a/schema/state.schema.json b/schema/state.schema.json index f58baac1..db9cd18f 100644 --- a/schema/state.schema.json +++ b/schema/state.schema.json @@ -290,6 +290,10 @@ "contentType": { "type": "string", "description": "Content MIME type" + }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" } }, "required": [ @@ -2881,6 +2885,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", "description": "Discriminant" @@ -2977,6 +2985,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", "description": "Discriminant" @@ -3703,6 +3715,10 @@ "type": "string", "description": "Content MIME type" }, + "contentSha256": { + "type": "string", + "description": "Content SHA-256 hash" + }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" } diff --git a/types/common/state.ts b/types/common/state.ts index a451c5f1..4596552b 100644 --- a/types/common/state.ts +++ b/types/common/state.ts @@ -252,6 +252,8 @@ export interface ContentRef { sizeHint?: number; /** Content MIME type */ contentType?: string; + /** Content SHA-256 hash */ + contentSha256?: string; } // ─── File Edit ─────────────────────────────────────────────────────────────── From ed6482a87e62ee477a338b666f9385d71b9d560f Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Thu, 2 Jul 2026 17:12:54 +0200 Subject: [PATCH 2/2] Pull request feedback --- CHANGELOG.md | 3 +- clients/go/CHANGELOG.md | 3 +- clients/go/ahptypes/state.generated.go | 18 +++++----- clients/kotlin/CHANGELOG.md | 3 +- .../generated/State.generated.kt | 16 ++++----- clients/rust/CHANGELOG.md | 3 +- clients/rust/crates/ahp-types/src/state.rs | 16 ++++----- .../Generated/State.generated.swift | 34 +++++++++---------- clients/swift/CHANGELOG.md | 3 +- clients/typescript/CHANGELOG.md | 3 +- schema/actions.schema.json | 16 ++++----- schema/commands.schema.json | 16 ++++----- schema/errors.schema.json | 16 ++++----- schema/notifications.schema.json | 16 ++++----- schema/state.schema.json | 16 ++++----- types/common/state.ts | 4 +-- 16 files changed, 90 insertions(+), 96 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 713916b1..e6c655a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,8 +25,7 @@ changes accumulate. Track in-flight protocol changes via PRs touching ### Added -- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of - the referenced content so consumers can verify integrity or deduplicate. +- Optional `nonce` field on `ContentRef`. - Optional `intention` field on `chat/toolCallStart` and every `ToolCallState` variant, providing a human-readable description of what the invocation intends to do. diff --git a/clients/go/CHANGELOG.md b/clients/go/CHANGELOG.md index 97d1b060..75dcfeab 100644 --- a/clients/go/CHANGELOG.md +++ b/clients/go/CHANGELOG.md @@ -16,8 +16,7 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file. ### Added -- Optional `ContentSha256` field on `ContentRef`, carrying the SHA-256 hash of - the referenced content so consumers can verify integrity or deduplicate. +- Optional `Nonce` field on `ContentRef`. - `SubscribeParams.Delivery.MaxLatencyMs` and `Client.SubscribeWithDelivery` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/clients/go/ahptypes/state.generated.go b/clients/go/ahptypes/state.generated.go index 2507fc25..33278b92 100644 --- a/clients/go/ahptypes/state.generated.go +++ b/clients/go/ahptypes/state.generated.go @@ -1517,8 +1517,8 @@ type MessageResourceAttachment struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` - // Content SHA-256 hash - ContentSha256 *string `json:"contentSha256,omitempty"` + // Content nonce + Nonce *string `json:"nonce,omitempty"` // Discriminant Type MessageAttachmentKind `json:"type"` // Optional selection within the referenced textual resource. @@ -1585,8 +1585,8 @@ type ContentRef struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` - // Content SHA-256 hash - ContentSha256 *string `json:"contentSha256,omitempty"` + // Content nonce + Nonce *string `json:"nonce,omitempty"` } // A content part that's a reference to large content stored outside the state tree. @@ -1597,8 +1597,8 @@ type ResourceResponsePart struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` - // Content SHA-256 hash - ContentSha256 *string `json:"contentSha256,omitempty"` + // Content nonce + Nonce *string `json:"nonce,omitempty"` // Discriminant Kind ResponsePartKind `json:"kind"` } @@ -1961,9 +1961,9 @@ type ToolResultResourceContent struct { SizeHint *int64 `json:"sizeHint,omitempty"` // Content MIME type ContentType *string `json:"contentType,omitempty"` - // Content SHA-256 hash - ContentSha256 *string `json:"contentSha256,omitempty"` - Type ToolResultContentType `json:"type"` + // Content nonce + Nonce *string `json:"nonce,omitempty"` + Type ToolResultContentType `json:"type"` } // Describes a file modification performed by a tool. diff --git a/clients/kotlin/CHANGELOG.md b/clients/kotlin/CHANGELOG.md index f959bf37..2a1a66b8 100644 --- a/clients/kotlin/CHANGELOG.md +++ b/clients/kotlin/CHANGELOG.md @@ -17,8 +17,7 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump ### Added -- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of - the referenced content so consumers can verify integrity or deduplicate. +- Optional `nonce` field on `ContentRef`. - `SubscribeParams.delivery.maxLatencyMs` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. - Optional `capabilities` field on `AgentInfo` (`AgentCapabilities` with a diff --git a/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt b/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt index 7cf35537..243ef5e3 100644 --- a/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt +++ b/clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/State.generated.kt @@ -2113,9 +2113,9 @@ data class MessageResourceAttachment( */ val contentType: String? = null, /** - * Content SHA-256 hash + * Content nonce */ - val contentSha256: String? = null, + val nonce: String? = null, /** * Discriminant */ @@ -2210,9 +2210,9 @@ data class ContentRef( */ val contentType: String? = null, /** - * Content SHA-256 hash + * Content nonce */ - val contentSha256: String? = null + val nonce: String? = null ) @Serializable @@ -2230,9 +2230,9 @@ data class ResourceReponsePart( */ val contentType: String? = null, /** - * Content SHA-256 hash + * Content nonce */ - val contentSha256: String? = null, + val nonce: String? = null, /** * Discriminant */ @@ -2798,9 +2798,9 @@ data class ToolResultResourceContent( */ val contentType: String? = null, /** - * Content SHA-256 hash + * Content nonce */ - val contentSha256: String? = null, + val nonce: String? = null, val type: ToolResultContentType ) diff --git a/clients/rust/CHANGELOG.md b/clients/rust/CHANGELOG.md index b3ac8dc6..d24b55d9 100644 --- a/clients/rust/CHANGELOG.md +++ b/clients/rust/CHANGELOG.md @@ -17,8 +17,7 @@ matching `## [X.Y.Z]` heading is missing from this file. ### Added -- Optional `content_sha256` field on `ContentRef`, carrying the SHA-256 hash of - the referenced content so consumers can verify integrity or deduplicate. +- Optional `nonce` field on `ContentRef`. - `SubscribeParams.delivery.max_latency_ms` and `Client::subscribe_with_delivery` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/clients/rust/crates/ahp-types/src/state.rs b/clients/rust/crates/ahp-types/src/state.rs index ad3ec278..61fd6dc8 100644 --- a/clients/rust/crates/ahp-types/src/state.rs +++ b/clients/rust/crates/ahp-types/src/state.rs @@ -1919,9 +1919,9 @@ pub struct MessageResourceAttachment { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, - /// Content SHA-256 hash + /// Content nonce #[serde(default, skip_serializing_if = "Option::is_none")] - pub content_sha256: Option, + pub nonce: Option, /// Optional selection within the referenced textual resource. /// /// Only meaningful for textual resources. @@ -1995,9 +1995,9 @@ pub struct ContentRef { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, - /// Content SHA-256 hash + /// Content nonce #[serde(default, skip_serializing_if = "Option::is_none")] - pub content_sha256: Option, + pub nonce: Option, } /// A content part that's a reference to large content stored outside the state tree. @@ -2012,9 +2012,9 @@ pub struct ResourceResponsePart { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, - /// Content SHA-256 hash + /// Content nonce #[serde(default, skip_serializing_if = "Option::is_none")] - pub content_sha256: Option, + pub nonce: Option, } /// A tool call represented as a response part. @@ -2452,9 +2452,9 @@ pub struct ToolResultResourceContent { /// Content MIME type #[serde(default, skip_serializing_if = "Option::is_none")] pub content_type: Option, - /// Content SHA-256 hash + /// Content nonce #[serde(default, skip_serializing_if = "Option::is_none")] - pub content_sha256: Option, + pub nonce: Option, } /// Describes a file modification performed by a tool. diff --git a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift index e27b447b..f575fdb6 100644 --- a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift +++ b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift @@ -2061,8 +2061,8 @@ public struct MessageResourceAttachment: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? - /// Content SHA-256 hash - public var contentSha256: String? + /// Content nonce + public var nonce: String? /// Discriminant public var type: MessageAttachmentKind /// Optional selection within the referenced textual resource. @@ -2078,7 +2078,7 @@ public struct MessageResourceAttachment: Codable, Sendable { case uri case sizeHint case contentType - case contentSha256 + case nonce case type case selection } @@ -2091,7 +2091,7 @@ public struct MessageResourceAttachment: Codable, Sendable { uri: String, sizeHint: Int? = nil, contentType: String? = nil, - contentSha256: String? = nil, + nonce: String? = nil, type: MessageAttachmentKind, selection: TextSelection? = nil ) { @@ -2102,7 +2102,7 @@ public struct MessageResourceAttachment: Codable, Sendable { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType - self.contentSha256 = contentSha256 + self.nonce = nonce self.type = type self.selection = selection } @@ -2197,19 +2197,19 @@ public struct ContentRef: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? - /// Content SHA-256 hash - public var contentSha256: String? + /// Content nonce + public var nonce: String? public init( uri: String, sizeHint: Int? = nil, contentType: String? = nil, - contentSha256: String? = nil + nonce: String? = nil ) { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType - self.contentSha256 = contentSha256 + self.nonce = nonce } } @@ -2220,8 +2220,8 @@ public struct ResourceReponsePart: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? - /// Content SHA-256 hash - public var contentSha256: String? + /// Content nonce + public var nonce: String? /// Discriminant public var kind: ResponsePartKind @@ -2229,13 +2229,13 @@ public struct ResourceReponsePart: Codable, Sendable { uri: String, sizeHint: Int? = nil, contentType: String? = nil, - contentSha256: String? = nil, + nonce: String? = nil, kind: ResponsePartKind ) { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType - self.contentSha256 = contentSha256 + self.nonce = nonce self.kind = kind } } @@ -2952,21 +2952,21 @@ public struct ToolResultResourceContent: Codable, Sendable { public var sizeHint: Int? /// Content MIME type public var contentType: String? - /// Content SHA-256 hash - public var contentSha256: String? + /// Content nonce + public var nonce: String? public var type: ToolResultContentType public init( uri: String, sizeHint: Int? = nil, contentType: String? = nil, - contentSha256: String? = nil, + nonce: String? = nil, type: ToolResultContentType ) { self.uri = uri self.sizeHint = sizeHint self.contentType = contentType - self.contentSha256 = contentSha256 + self.nonce = nonce self.type = type } } diff --git a/clients/swift/CHANGELOG.md b/clients/swift/CHANGELOG.md index 35ea1dc0..3bfc8257 100644 --- a/clients/swift/CHANGELOG.md +++ b/clients/swift/CHANGELOG.md @@ -19,8 +19,7 @@ the tag matches the version pinned in [`VERSION`](VERSION). ### Added -- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of - the referenced content so consumers can verify integrity or deduplicate. +- Optional `nonce` field on `ContentRef`. - `SubscribeParams.delivery.maxLatencyMs` and `AHPClient.subscribe(_:delivery:)` for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/clients/typescript/CHANGELOG.md b/clients/typescript/CHANGELOG.md index 87f711e9..9623a328 100644 --- a/clients/typescript/CHANGELOG.md +++ b/clients/typescript/CHANGELOG.md @@ -22,8 +22,7 @@ hotfix escape hatch. ### Added -- Optional `contentSha256` field on `ContentRef`, carrying the SHA-256 hash of - the referenced content so consumers can verify integrity or deduplicate. +- Optional `nonce` field on `ContentRef`. - `SubscribeParams.delivery.maxLatencyMs` and `AhpClient.subscribe` delivery options for clients to request a maximum subscription delivery latency, including `0` for no intentional coalescing. diff --git a/schema/actions.schema.json b/schema/actions.schema.json index 76ef340a..9012e298 100644 --- a/schema/actions.schema.json +++ b/schema/actions.schema.json @@ -2217,9 +2217,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" } }, "required": [ @@ -4811,9 +4811,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", @@ -4911,9 +4911,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", @@ -5641,9 +5641,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" diff --git a/schema/commands.schema.json b/schema/commands.schema.json index 97b45a99..0aa780c9 100644 --- a/schema/commands.schema.json +++ b/schema/commands.schema.json @@ -1562,9 +1562,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" } }, "required": [ @@ -4156,9 +4156,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", @@ -4256,9 +4256,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", @@ -4986,9 +4986,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" diff --git a/schema/errors.schema.json b/schema/errors.schema.json index c1f34570..e6ed6f7e 100644 --- a/schema/errors.schema.json +++ b/schema/errors.schema.json @@ -380,9 +380,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" } }, "required": [ @@ -2974,9 +2974,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", @@ -3074,9 +3074,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", @@ -3804,9 +3804,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" diff --git a/schema/notifications.schema.json b/schema/notifications.schema.json index 02d093d6..abe3e99a 100644 --- a/schema/notifications.schema.json +++ b/schema/notifications.schema.json @@ -540,9 +540,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" } }, "required": [ @@ -3134,9 +3134,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", @@ -3234,9 +3234,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", @@ -3964,9 +3964,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" diff --git a/schema/state.schema.json b/schema/state.schema.json index db9cd18f..4df40258 100644 --- a/schema/state.schema.json +++ b/schema/state.schema.json @@ -291,9 +291,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" } }, "required": [ @@ -2885,9 +2885,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/MessageAttachmentKind.Resource", @@ -2985,9 +2985,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "kind": { "$ref": "#/$defs/ResponsePartKind.ContentRef", @@ -3715,9 +3715,9 @@ "type": "string", "description": "Content MIME type" }, - "contentSha256": { + "nonce": { "type": "string", - "description": "Content SHA-256 hash" + "description": "Content nonce" }, "type": { "$ref": "#/$defs/ToolResultContentType.Resource" diff --git a/types/common/state.ts b/types/common/state.ts index 4596552b..044e3063 100644 --- a/types/common/state.ts +++ b/types/common/state.ts @@ -252,8 +252,8 @@ export interface ContentRef { sizeHint?: number; /** Content MIME type */ contentType?: string; - /** Content SHA-256 hash */ - contentSha256?: string; + /** Content nonce */ + nonce?: string; } // ─── File Edit ───────────────────────────────────────────────────────────────