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 ac1ee800..840af62b 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 @@ -2416,7 +2416,7 @@ data class ContentRef( ) @Serializable -data class ResourceReponsePart( +data class ResourceResponsePart( /** * Content URI */ @@ -4773,7 +4773,7 @@ sealed interface ResponsePart @JvmInline value class ResponsePartMarkdown(val value: MarkdownResponsePart) : ResponsePart @JvmInline -value class ResponsePartContentRef(val value: ResourceReponsePart) : ResponsePart +value class ResponsePartContentRef(val value: ResourceResponsePart) : ResponsePart @JvmInline value class ResponsePartToolCall(val value: ToolCallResponsePart) : ResponsePart @JvmInline @@ -4807,7 +4807,7 @@ internal object ResponsePartSerializer : KSerializer { ?: return ResponsePartUnknown(obj) return when (discriminant) { "markdown" -> ResponsePartMarkdown(input.json.decodeFromJsonElement(MarkdownResponsePart.serializer(), element)) - "contentRef" -> ResponsePartContentRef(input.json.decodeFromJsonElement(ResourceReponsePart.serializer(), element)) + "contentRef" -> ResponsePartContentRef(input.json.decodeFromJsonElement(ResourceResponsePart.serializer(), element)) "toolCall" -> ResponsePartToolCall(input.json.decodeFromJsonElement(ToolCallResponsePart.serializer(), element)) "reasoning" -> ResponsePartReasoning(input.json.decodeFromJsonElement(ReasoningResponsePart.serializer(), element)) "systemNotification" -> ResponsePartSystemNotification(input.json.decodeFromJsonElement(SystemNotificationResponsePart.serializer(), element)) @@ -4821,7 +4821,7 @@ internal object ResponsePartSerializer : KSerializer { ?: error("ResponsePart can only be serialized to JSON") val element: JsonElement = when (value) { is ResponsePartMarkdown -> output.json.encodeToJsonElement(MarkdownResponsePart.serializer(), value.value) - is ResponsePartContentRef -> output.json.encodeToJsonElement(ResourceReponsePart.serializer(), value.value) + is ResponsePartContentRef -> output.json.encodeToJsonElement(ResourceResponsePart.serializer(), value.value) is ResponsePartToolCall -> output.json.encodeToJsonElement(ToolCallResponsePart.serializer(), value.value) is ResponsePartReasoning -> output.json.encodeToJsonElement(ReasoningResponsePart.serializer(), value.value) is ResponsePartSystemNotification -> output.json.encodeToJsonElement(SystemNotificationResponsePart.serializer(), value.value) diff --git a/clients/swift/AHPApp/AHPApp/Views/ResponsePartView.swift b/clients/swift/AHPApp/AHPApp/Views/ResponsePartView.swift index fd59358d..21938d07 100644 --- a/clients/swift/AHPApp/AHPApp/Views/ResponsePartView.swift +++ b/clients/swift/AHPApp/AHPApp/Views/ResponsePartView.swift @@ -733,7 +733,7 @@ struct TerminalToolResultView: View { // MARK: - ContentRefView struct ContentRefView: View { - let ref: ResourceReponsePart + let ref: ResourceResponsePart var body: some View { HStack { @@ -892,7 +892,7 @@ struct ContentRefView: View { // Content Ref Text("Content Ref").font(.caption.bold()).foregroundStyle(.secondary) - ContentRefView(ref: ResourceReponsePart( + ContentRefView(ref: ResourceResponsePart( uri: "file:///Users/me/project/README.md", contentType: "text/markdown", kind: .contentRef diff --git a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift index 1157a4e4..4c3adb9b 100644 --- a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift +++ b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift @@ -2414,7 +2414,7 @@ public struct ContentRef: Codable, Sendable { } } -public struct ResourceReponsePart: Codable, Sendable { +public struct ResourceResponsePart: Codable, Sendable { /// Content URI public var uri: String /// Approximate size in bytes @@ -5330,7 +5330,7 @@ public enum ChatOrigin: Codable, Sendable { public enum ResponsePart: Codable, Sendable { case markdown(MarkdownResponsePart) - case contentRef(ResourceReponsePart) + case contentRef(ResourceResponsePart) case toolCall(ToolCallResponsePart) case reasoning(ReasoningResponsePart) case systemNotification(SystemNotificationResponsePart) @@ -5350,7 +5350,7 @@ public enum ResponsePart: Codable, Sendable { case "markdown": self = .markdown(try MarkdownResponsePart(from: decoder)) case "contentRef": - self = .contentRef(try ResourceReponsePart(from: decoder)) + self = .contentRef(try ResourceResponsePart(from: decoder)) case "toolCall": self = .toolCall(try ToolCallResponsePart(from: decoder)) case "reasoning": diff --git a/docs/.changes/20260730-resource-response-part-rename.json b/docs/.changes/20260730-resource-response-part-rename.json new file mode 100644 index 00000000..9d561559 --- /dev/null +++ b/docs/.changes/20260730-resource-response-part-rename.json @@ -0,0 +1,4 @@ +{ + "type": "changed", + "message": "Renamed `ResourceReponsePart` to `ResourceResponsePart`, correcting a misspelling. The Rust and Go clients already exposed the corrected name via generator-level renames; the TypeScript, Kotlin and Swift clients previously carried the typo, so the type now has one consistent name across all five clients." +} diff --git a/docs/guide/state-model.md b/docs/guide/state-model.md index 642952e7..2f55c06c 100644 --- a/docs/guide/state-model.md +++ b/docs/guide/state-model.md @@ -323,7 +323,7 @@ ToolCallResponsePart { } // Response-part wrapper around a large content reference -ResourceReponsePart { +ResourceResponsePart { kind: 'contentRef' uri: string sizeHint?: number diff --git a/schema/actions.schema.json b/schema/actions.schema.json index 33ab571e..f5d965f1 100644 --- a/schema/actions.schema.json +++ b/schema/actions.schema.json @@ -5475,7 +5475,7 @@ "content" ] }, - "ResourceReponsePart": { + "ResourceResponsePart": { "type": "object", "description": "A content part that's a reference to large content stored outside the state tree.", "properties": { @@ -7376,7 +7376,7 @@ "$ref": "#/$defs/MarkdownResponsePart" }, { - "$ref": "#/$defs/ResourceReponsePart" + "$ref": "#/$defs/ResourceResponsePart" }, { "$ref": "#/$defs/ToolCallResponsePart" diff --git a/schema/commands.schema.json b/schema/commands.schema.json index cae4edaf..9ab17160 100644 --- a/schema/commands.schema.json +++ b/schema/commands.schema.json @@ -4644,7 +4644,7 @@ "content" ] }, - "ResourceReponsePart": { + "ResourceResponsePart": { "type": "object", "description": "A content part that's a reference to large content stored outside the state tree.", "properties": { @@ -9084,7 +9084,7 @@ "$ref": "#/$defs/MarkdownResponsePart" }, { - "$ref": "#/$defs/ResourceReponsePart" + "$ref": "#/$defs/ResourceResponsePart" }, { "$ref": "#/$defs/ToolCallResponsePart" diff --git a/schema/errors.schema.json b/schema/errors.schema.json index 462251d4..77945879 100644 --- a/schema/errors.schema.json +++ b/schema/errors.schema.json @@ -3380,7 +3380,7 @@ "content" ] }, - "ResourceReponsePart": { + "ResourceResponsePart": { "type": "object", "description": "A content part that's a reference to large content stored outside the state tree.", "properties": { @@ -6684,7 +6684,7 @@ "$ref": "#/$defs/MarkdownResponsePart" }, { - "$ref": "#/$defs/ResourceReponsePart" + "$ref": "#/$defs/ResourceResponsePart" }, { "$ref": "#/$defs/ToolCallResponsePart" diff --git a/schema/notifications.schema.json b/schema/notifications.schema.json index 419f9a11..e95f38c8 100644 --- a/schema/notifications.schema.json +++ b/schema/notifications.schema.json @@ -3543,7 +3543,7 @@ "content" ] }, - "ResourceReponsePart": { + "ResourceResponsePart": { "type": "object", "description": "A content part that's a reference to large content stored outside the state tree.", "properties": { @@ -5502,7 +5502,7 @@ "$ref": "#/$defs/MarkdownResponsePart" }, { - "$ref": "#/$defs/ResourceReponsePart" + "$ref": "#/$defs/ResourceResponsePart" }, { "$ref": "#/$defs/ToolCallResponsePart" diff --git a/schema/state.schema.json b/schema/state.schema.json index a698f16e..07be2112 100644 --- a/schema/state.schema.json +++ b/schema/state.schema.json @@ -3291,7 +3291,7 @@ "content" ] }, - "ResourceReponsePart": { + "ResourceResponsePart": { "type": "object", "description": "A content part that's a reference to large content stored outside the state tree.", "properties": { @@ -5192,7 +5192,7 @@ "$ref": "#/$defs/MarkdownResponsePart" }, { - "$ref": "#/$defs/ResourceReponsePart" + "$ref": "#/$defs/ResourceResponsePart" }, { "$ref": "#/$defs/ToolCallResponsePart" diff --git a/scripts/generate-go.ts b/scripts/generate-go.ts index 25753a2e..34e8eabd 100644 --- a/scripts/generate-go.ts +++ b/scripts/generate-go.ts @@ -758,7 +758,7 @@ const STATE_STRUCTS: { name: string; omitDiscriminants?: boolean; goName?: strin { name: 'MessageChatAttachment' }, { name: 'MarkdownResponsePart' }, { name: 'ContentRef' }, - { name: 'ResourceReponsePart', goName: 'ResourceResponsePart' }, + { name: 'ResourceResponsePart' }, { name: 'ToolCallResponsePart' }, { name: 'ReasoningResponsePart' }, { name: 'SystemNotificationResponsePart' }, diff --git a/scripts/generate-kotlin.ts b/scripts/generate-kotlin.ts index e86113b7..81a192de 100644 --- a/scripts/generate-kotlin.ts +++ b/scripts/generate-kotlin.ts @@ -929,7 +929,7 @@ const STATE_STRUCTS = [ 'SimpleMessageAttachment', 'MessageEmbeddedResourceAttachment', 'MessageResourceAttachment', 'MessageAnnotationsAttachment', 'MessageChatAttachment', 'MarkdownResponsePart', 'ContentRef', - 'ResourceReponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart', + 'ResourceResponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart', 'SystemNotificationResponsePart', 'InputRequestResponsePart', 'ToolCallResult', 'ToolCallStreamingState', 'ToolCallPendingConfirmationState', 'ToolCallRunningState', 'ToolCallAuthRequiredState', @@ -965,7 +965,7 @@ const RESPONSE_PART_UNION: UnionConfig = { discriminantField: 'kind', variants: [ { caseName: 'Markdown', structName: 'MarkdownResponsePart', discriminantValue: 'markdown' }, - { caseName: 'ContentRef', structName: 'ResourceReponsePart', discriminantValue: 'contentRef' }, + { caseName: 'ContentRef', structName: 'ResourceResponsePart', discriminantValue: 'contentRef' }, { caseName: 'ToolCall', structName: 'ToolCallResponsePart', discriminantValue: 'toolCall' }, { caseName: 'Reasoning', structName: 'ReasoningResponsePart', discriminantValue: 'reasoning' }, { caseName: 'SystemNotification', structName: 'SystemNotificationResponsePart', discriminantValue: 'systemNotification' }, diff --git a/scripts/generate-rust.ts b/scripts/generate-rust.ts index 7fb9044d..2903226e 100644 --- a/scripts/generate-rust.ts +++ b/scripts/generate-rust.ts @@ -741,7 +741,7 @@ const STATE_STRUCTS: { name: string; omitDiscriminants?: boolean; rustName?: str { name: 'MessageChatAttachment', omitDiscriminants: true }, { name: 'MarkdownResponsePart', omitDiscriminants: true }, { name: 'ContentRef' }, - { name: 'ResourceReponsePart', omitDiscriminants: true, rustName: 'ResourceResponsePart' }, + { name: 'ResourceResponsePart', omitDiscriminants: true }, { name: 'ToolCallResponsePart', omitDiscriminants: true }, { name: 'ReasoningResponsePart', omitDiscriminants: true }, { name: 'SystemNotificationResponsePart', omitDiscriminants: true }, diff --git a/scripts/generate-swift.ts b/scripts/generate-swift.ts index 086f8659..6b486893 100644 --- a/scripts/generate-swift.ts +++ b/scripts/generate-swift.ts @@ -638,7 +638,7 @@ const STATE_STRUCTS = [ 'SimpleMessageAttachment', 'MessageEmbeddedResourceAttachment', 'MessageResourceAttachment', 'MessageAnnotationsAttachment', 'MessageChatAttachment', 'MarkdownResponsePart', 'ContentRef', - 'ResourceReponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart', + 'ResourceResponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart', 'SystemNotificationResponsePart', 'InputRequestResponsePart', 'ToolCallResult', 'ToolCallStreamingState', 'ToolCallPendingConfirmationState', 'ToolCallRunningState', 'ToolCallAuthRequiredState', @@ -679,7 +679,7 @@ const RESPONSE_PART_UNION: UnionConfig = { allowUnknown: true, variants: [ { caseName: 'markdown', structName: 'MarkdownResponsePart', discriminantValue: 'markdown' }, - { caseName: 'contentRef', structName: 'ResourceReponsePart', discriminantValue: 'contentRef' }, + { caseName: 'contentRef', structName: 'ResourceResponsePart', discriminantValue: 'contentRef' }, { caseName: 'toolCall', structName: 'ToolCallResponsePart', discriminantValue: 'toolCall' }, { caseName: 'reasoning', structName: 'ReasoningResponsePart', discriminantValue: 'reasoning' }, { caseName: 'systemNotification', structName: 'SystemNotificationResponsePart', discriminantValue: 'systemNotification' }, diff --git a/types/channels-chat/state.ts b/types/channels-chat/state.ts index 72644317..8e107a23 100644 --- a/types/channels-chat/state.ts +++ b/types/channels-chat/state.ts @@ -881,7 +881,7 @@ export interface MarkdownResponsePart { * * @category Response Parts */ -export interface ResourceReponsePart extends ContentRef { +export interface ResourceResponsePart extends ContentRef { /** Discriminant */ kind: ResponsePartKind.ContentRef; } @@ -921,7 +921,7 @@ export interface ReasoningResponsePart { */ export type ResponsePart = | MarkdownResponsePart - | ResourceReponsePart + | ResourceResponsePart | ToolCallResponsePart | ReasoningResponsePart | SystemNotificationResponsePart