From 70c77373515896e578a04587dd528fec52f5f497 Mon Sep 17 00:00:00 2001 From: Paul Wang Date: Tue, 23 Jun 2026 15:34:28 -0700 Subject: [PATCH 1/2] widen --- clients/go/ahptypes/state.generated.go | 6 ++++-- .../agenthostprotocol/generated/State.generated.kt | 6 ++++-- clients/rust/crates/ahp-types/src/state.rs | 6 ++++-- .../AgentHostProtocol/Generated/State.generated.swift | 8 +++++--- schema/actions.schema.json | 4 ++-- schema/commands.schema.json | 4 ++-- schema/errors.schema.json | 4 ++-- schema/notifications.schema.json | 4 ++-- schema/state.schema.json | 4 ++-- types/channels-root/state.ts | 9 +++++++-- 10 files changed, 34 insertions(+), 21 deletions(-) diff --git a/clients/go/ahptypes/state.generated.go b/clients/go/ahptypes/state.generated.go index 01f6169a..a4e4bb9e 100644 --- a/clients/go/ahptypes/state.generated.go +++ b/clients/go/ahptypes/state.generated.go @@ -564,8 +564,10 @@ type SessionModelInfo struct { type ModelSelection struct { // Model identifier Id string `json:"id"` - // Model-specific configuration values - Config map[string]string `json:"config,omitempty"` + // Model-specific configuration values. Values are JSON primitives: most + // pickers produce strings, but some (e.g. a numeric context-size picker) + // produce numbers or booleans, which are carried through as-is. + Config map[string]json.RawMessage `json:"config,omitempty"` } // A selected custom agent for a session. 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 ef35303f..cf05c3b4 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 @@ -933,9 +933,11 @@ data class ModelSelection( */ val id: String, /** - * Model-specific configuration values + * Model-specific configuration values. Values are JSON primitives: most + * pickers produce strings, but some (e.g. a numeric context-size picker) + * produce numbers or booleans, which are carried through as-is. */ - val config: Map? = null + val config: Map? = null ) @Serializable diff --git a/clients/rust/crates/ahp-types/src/state.rs b/clients/rust/crates/ahp-types/src/state.rs index 4b8c3fc6..2426c9bc 100644 --- a/clients/rust/crates/ahp-types/src/state.rs +++ b/clients/rust/crates/ahp-types/src/state.rs @@ -783,9 +783,11 @@ pub struct SessionModelInfo { pub struct ModelSelection { /// Model identifier pub id: String, - /// Model-specific configuration values + /// Model-specific configuration values. Values are JSON primitives: most + /// pickers produce strings, but some (e.g. a numeric context-size picker) + /// produce numbers or booleans, which are carried through as-is. #[serde(default, skip_serializing_if = "Option::is_none")] - pub config: Option>, + pub config: Option>, } /// A selected custom agent for a session. diff --git a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift index 7e18bf9e..e1d2a117 100644 --- a/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift +++ b/clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift @@ -655,12 +655,14 @@ public struct SessionModelInfo: Codable, Sendable { public struct ModelSelection: Codable, Sendable { /// Model identifier public var id: String - /// Model-specific configuration values - public var config: [String: String]? + /// Model-specific configuration values. Values are JSON primitives: most + /// pickers produce strings, but some (e.g. a numeric context-size picker) + /// produce numbers or booleans, which are carried through as-is. + public var config: [String: AnyCodable]? public init( id: String, - config: [String: String]? = nil + config: [String: AnyCodable]? = nil ) { self.id = id self.config = config diff --git a/schema/actions.schema.json b/schema/actions.schema.json index 7014cc74..55de11c2 100644 --- a/schema/actions.schema.json +++ b/schema/actions.schema.json @@ -2484,9 +2484,9 @@ "config": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/$defs/JsonPrimitive" }, - "description": "Model-specific configuration values" + "description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is." } }, "required": [ diff --git a/schema/commands.schema.json b/schema/commands.schema.json index 3f0db697..7a0ed130 100644 --- a/schema/commands.schema.json +++ b/schema/commands.schema.json @@ -1822,9 +1822,9 @@ "config": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/$defs/JsonPrimitive" }, - "description": "Model-specific configuration values" + "description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is." } }, "required": [ diff --git a/schema/errors.schema.json b/schema/errors.schema.json index 6dced4ca..9d8e2136 100644 --- a/schema/errors.schema.json +++ b/schema/errors.schema.json @@ -674,9 +674,9 @@ "config": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/$defs/JsonPrimitive" }, - "description": "Model-specific configuration values" + "description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is." } }, "required": [ diff --git a/schema/notifications.schema.json b/schema/notifications.schema.json index 627102d3..ff363992 100644 --- a/schema/notifications.schema.json +++ b/schema/notifications.schema.json @@ -808,9 +808,9 @@ "config": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/$defs/JsonPrimitive" }, - "description": "Model-specific configuration values" + "description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is." } }, "required": [ diff --git a/schema/state.schema.json b/schema/state.schema.json index 9c8e26b7..b2b132f2 100644 --- a/schema/state.schema.json +++ b/schema/state.schema.json @@ -585,9 +585,9 @@ "config": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/$defs/JsonPrimitive" }, - "description": "Model-specific configuration values" + "description": "Model-specific configuration values. Values are JSON primitives: most\npickers produce strings, but some (e.g. a numeric context-size picker)\nproduce numbers or booleans, which are carried through as-is." } }, "required": [ diff --git a/types/channels-root/state.ts b/types/channels-root/state.ts index 132c0aff..061d10c3 100644 --- a/types/channels-root/state.ts +++ b/types/channels-root/state.ts @@ -6,6 +6,7 @@ import type { ConfigSchema, + JsonPrimitive, ProtectedResourceMetadata, } from '../common/state.js'; import type { TerminalInfo } from '../channels-terminal/state.js'; @@ -131,8 +132,12 @@ export interface SessionModelInfo { export interface ModelSelection { /** Model identifier */ id: string; - /** Model-specific configuration values */ - config?: Record; + /** + * Model-specific configuration values. Values are JSON primitives: most + * pickers produce strings, but some (e.g. a numeric context-size picker) + * produce numbers or booleans, which are carried through as-is. + */ + config?: Record; } // ─── Root Config Types ─────────────────────────────────────────────────────── From 9921c520aaf4dac06e1e0be11727cbbdefb3862f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Jun 2026 22:37:13 +0000 Subject: [PATCH 2/2] Add changelog entries for ModelSelection.config widening to JsonPrimitive --- CHANGELOG.md | 1 + clients/go/CHANGELOG.md | 2 ++ clients/kotlin/CHANGELOG.md | 2 ++ clients/rust/CHANGELOG.md | 2 ++ clients/swift/CHANGELOG.md | 2 ++ clients/typescript/CHANGELOG.md | 2 ++ 6 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f4c5de..8056ae5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ changes accumulate. Track in-flight protocol changes via PRs touching ### Changed - `ConfigPropertySchema.enum` now accepts `JsonPrimitive[]` instead of `string[]`, allowing numeric, boolean, and null enum values. +- `ModelSelection.config` values are now `JsonPrimitive` (`string | number | boolean | null`) instead of `string`, allowing numeric, boolean, and null configuration values. ## [0.5.0] — Unreleased diff --git a/clients/go/CHANGELOG.md b/clients/go/CHANGELOG.md index 1fa537d4..e7de2f5a 100644 --- a/clients/go/CHANGELOG.md +++ b/clients/go/CHANGELOG.md @@ -25,6 +25,8 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file. - `ConfigPropertySchema.Enum` field is now `[]json.RawMessage` instead of `[]string`, allowing numeric, boolean, and null enum values. +- `ModelSelection.Config` values are now `json.RawMessage` instead of `string`, + allowing numeric, boolean, and null configuration values. ## [0.4.0] — 2026-06-19 diff --git a/clients/kotlin/CHANGELOG.md b/clients/kotlin/CHANGELOG.md index 33698557..52801d99 100644 --- a/clients/kotlin/CHANGELOG.md +++ b/clients/kotlin/CHANGELOG.md @@ -26,6 +26,8 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump - `ConfigPropertySchema.enum` field is now `List?` instead of `List?`, allowing numeric, boolean, and null enum values. +- `ModelSelection.config` values are now `JsonElement` instead of `String`, + allowing numeric, boolean, and null configuration values. ## [0.4.0] — 2026-06-19 diff --git a/clients/rust/CHANGELOG.md b/clients/rust/CHANGELOG.md index 8c975552..d1e7ca25 100644 --- a/clients/rust/CHANGELOG.md +++ b/clients/rust/CHANGELOG.md @@ -34,6 +34,8 @@ matching `## [X.Y.Z]` heading is missing from this file. on `ahp-ws` with `default-features = false, features = ["native-tls"]`. - `ConfigPropertySchema.enum` field is now `Option>` instead of `Option>`, allowing numeric, boolean, and null enum values. +- `ModelSelection.config` values are now `AnyValue` instead of `String`, + allowing numeric, boolean, and null configuration values. ## [0.4.0] — 2026-06-19 diff --git a/clients/swift/CHANGELOG.md b/clients/swift/CHANGELOG.md index e885cae2..152a416e 100644 --- a/clients/swift/CHANGELOG.md +++ b/clients/swift/CHANGELOG.md @@ -28,6 +28,8 @@ the tag matches the version pinned in [`VERSION`](VERSION). - `ConfigPropertySchema.enum` field is now `[AnyCodable]?` instead of `[String]?`, allowing numeric, boolean, and null enum values. +- `ModelSelection.config` values are now `AnyCodable` instead of `String`, + allowing numeric, boolean, and null configuration values. ## [0.4.0] — 2026-06-19 diff --git a/clients/typescript/CHANGELOG.md b/clients/typescript/CHANGELOG.md index 950888ab..46335e8c 100644 --- a/clients/typescript/CHANGELOG.md +++ b/clients/typescript/CHANGELOG.md @@ -32,6 +32,8 @@ hotfix escape hatch. - `ConfigPropertySchema.enum` field is now `JsonPrimitive[]` instead of `string[]`, allowing numeric, boolean, and null enum values. +- `ModelSelection.config` values are now `JsonPrimitive` instead of `string`, + allowing numeric, boolean, and null configuration values. ### Fixed