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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ changes accumulate. Track in-flight protocol changes via PRs touching

### Added

- 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.
Expand Down
1 change: 1 addition & 0 deletions clients/go/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file.

### Added

- 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.
Expand Down
12 changes: 10 additions & 2 deletions clients/go/ahptypes/state.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,8 @@ type MessageResourceAttachment struct {
SizeHint *int64 `json:"sizeHint,omitempty"`
// Content MIME type
ContentType *string `json:"contentType,omitempty"`
// Content nonce
Nonce *string `json:"nonce,omitempty"`
// Discriminant
Type MessageAttachmentKind `json:"type"`
// Optional selection within the referenced textual resource.
Expand Down Expand Up @@ -1583,6 +1585,8 @@ type ContentRef struct {
SizeHint *int64 `json:"sizeHint,omitempty"`
// Content MIME type
ContentType *string `json:"contentType,omitempty"`
// Content nonce
Nonce *string `json:"nonce,omitempty"`
}

// A content part that's a reference to large content stored outside the state tree.
Expand All @@ -1593,6 +1597,8 @@ type ResourceResponsePart struct {
SizeHint *int64 `json:"sizeHint,omitempty"`
// Content MIME type
ContentType *string `json:"contentType,omitempty"`
// Content nonce
Nonce *string `json:"nonce,omitempty"`
// Discriminant
Kind ResponsePartKind `json:"kind"`
}
Expand Down Expand Up @@ -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 nonce
Nonce *string `json:"nonce,omitempty"`
Type ToolResultContentType `json:"type"`
}

// Describes a file modification performed by a tool.
Expand Down
1 change: 1 addition & 0 deletions clients/kotlin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump

### Added

- 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,10 @@ data class MessageResourceAttachment(
* Content MIME type
*/
val contentType: String? = null,
/**
* Content nonce
*/
val nonce: String? = null,
/**
* Discriminant
*/
Expand Down Expand Up @@ -2204,7 +2208,11 @@ data class ContentRef(
/**
* Content MIME type
*/
val contentType: String? = null
val contentType: String? = null,
/**
* Content nonce
*/
val nonce: String? = null
)

@Serializable
Expand All @@ -2221,6 +2229,10 @@ data class ResourceReponsePart(
* Content MIME type
*/
val contentType: String? = null,
/**
* Content nonce
*/
val nonce: String? = null,
/**
* Discriminant
*/
Expand Down Expand Up @@ -2785,6 +2797,10 @@ data class ToolResultResourceContent(
* Content MIME type
*/
val contentType: String? = null,
/**
* Content nonce
*/
val nonce: String? = null,
val type: ToolResultContentType
)

Expand Down
1 change: 1 addition & 0 deletions clients/rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ matching `## [X.Y.Z]` heading is missing from this file.

### Added

- 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.
Expand Down
12 changes: 12 additions & 0 deletions clients/rust/crates/ahp-types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,9 @@ pub struct MessageResourceAttachment {
/// Content MIME type
#[serde(default, skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
/// Content nonce
#[serde(default, skip_serializing_if = "Option::is_none")]
pub nonce: Option<String>,
/// Optional selection within the referenced textual resource.
///
/// Only meaningful for textual resources.
Expand Down Expand Up @@ -1992,6 +1995,9 @@ pub struct ContentRef {
/// Content MIME type
#[serde(default, skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
/// Content nonce
#[serde(default, skip_serializing_if = "Option::is_none")]
pub nonce: Option<String>,
}

/// A content part that's a reference to large content stored outside the state tree.
Expand All @@ -2006,6 +2012,9 @@ pub struct ResourceResponsePart {
/// Content MIME type
#[serde(default, skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
/// Content nonce
#[serde(default, skip_serializing_if = "Option::is_none")]
pub nonce: Option<String>,
}

/// A tool call represented as a response part.
Expand Down Expand Up @@ -2443,6 +2452,9 @@ pub struct ToolResultResourceContent {
/// Content MIME type
#[serde(default, skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
/// Content nonce
#[serde(default, skip_serializing_if = "Option::is_none")]
pub nonce: Option<String>,
}

/// Describes a file modification performed by a tool.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,8 @@ public struct MessageResourceAttachment: Codable, Sendable {
public var sizeHint: Int?
/// Content MIME type
public var contentType: String?
/// Content nonce
public var nonce: String?
/// Discriminant
public var type: MessageAttachmentKind
/// Optional selection within the referenced textual resource.
Expand All @@ -2076,6 +2078,7 @@ public struct MessageResourceAttachment: Codable, Sendable {
case uri
case sizeHint
case contentType
case nonce
case type
case selection
}
Expand All @@ -2088,6 +2091,7 @@ public struct MessageResourceAttachment: Codable, Sendable {
uri: String,
sizeHint: Int? = nil,
contentType: String? = nil,
nonce: String? = nil,
type: MessageAttachmentKind,
selection: TextSelection? = nil
) {
Expand All @@ -2098,6 +2102,7 @@ public struct MessageResourceAttachment: Codable, Sendable {
self.uri = uri
self.sizeHint = sizeHint
self.contentType = contentType
self.nonce = nonce
self.type = type
self.selection = selection
}
Expand Down Expand Up @@ -2192,15 +2197,19 @@ public struct ContentRef: Codable, Sendable {
public var sizeHint: Int?
/// Content MIME type
public var contentType: String?
/// Content nonce
public var nonce: String?

public init(
uri: String,
sizeHint: Int? = nil,
contentType: String? = nil
contentType: String? = nil,
nonce: String? = nil
) {
self.uri = uri
self.sizeHint = sizeHint
self.contentType = contentType
self.nonce = nonce
}
}

Expand All @@ -2211,18 +2220,22 @@ public struct ResourceReponsePart: Codable, Sendable {
public var sizeHint: Int?
/// Content MIME type
public var contentType: String?
/// Content nonce
public var nonce: String?
/// Discriminant
public var kind: ResponsePartKind

public init(
uri: String,
sizeHint: Int? = nil,
contentType: String? = nil,
nonce: String? = nil,
kind: ResponsePartKind
) {
self.uri = uri
self.sizeHint = sizeHint
self.contentType = contentType
self.nonce = nonce
self.kind = kind
}
}
Expand Down Expand Up @@ -2939,17 +2952,21 @@ public struct ToolResultResourceContent: Codable, Sendable {
public var sizeHint: Int?
/// Content MIME type
public var contentType: String?
/// Content nonce
public var nonce: String?
public var type: ToolResultContentType

public init(
uri: String,
sizeHint: Int? = nil,
contentType: String? = nil,
nonce: String? = nil,
type: ToolResultContentType
) {
self.uri = uri
self.sizeHint = sizeHint
self.contentType = contentType
self.nonce = nonce
self.type = type
}
}
Expand Down
1 change: 1 addition & 0 deletions clients/swift/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ the tag matches the version pinned in [`VERSION`](VERSION).

### Added

- 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.
Expand Down
1 change: 1 addition & 0 deletions clients/typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ hotfix escape hatch.

### Added

- 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.
Expand Down
16 changes: 16 additions & 0 deletions schema/actions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2216,6 +2216,10 @@
"contentType": {
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
}
},
"required": [
Expand Down Expand Up @@ -4807,6 +4811,10 @@
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
},
"type": {
"$ref": "#/$defs/MessageAttachmentKind.Resource",
"description": "Discriminant"
Expand Down Expand Up @@ -4903,6 +4911,10 @@
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
},
"kind": {
"$ref": "#/$defs/ResponsePartKind.ContentRef",
"description": "Discriminant"
Expand Down Expand Up @@ -5629,6 +5641,10 @@
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
},
"type": {
"$ref": "#/$defs/ToolResultContentType.Resource"
}
Expand Down
16 changes: 16 additions & 0 deletions schema/commands.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,10 @@
"contentType": {
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
}
},
"required": [
Expand Down Expand Up @@ -4152,6 +4156,10 @@
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
},
"type": {
"$ref": "#/$defs/MessageAttachmentKind.Resource",
"description": "Discriminant"
Expand Down Expand Up @@ -4248,6 +4256,10 @@
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
},
"kind": {
"$ref": "#/$defs/ResponsePartKind.ContentRef",
"description": "Discriminant"
Expand Down Expand Up @@ -4974,6 +4986,10 @@
"type": "string",
"description": "Content MIME type"
},
"nonce": {
"type": "string",
"description": "Content nonce"
},
"type": {
"$ref": "#/$defs/ToolResultContentType.Resource"
}
Expand Down
Loading
Loading