Add optional implementation identity (serverInfo/clientInfo) to the initialize handshake#309
Open
colbylwilliams wants to merge 3 commits into
Open
Add optional implementation identity (serverInfo/clientInfo) to the initialize handshake#309colbylwilliams wants to merge 3 commits into
serverInfo/clientInfo) to the initialize handshake#309colbylwilliams wants to merge 3 commits into
Conversation
Introduce an `Implementation` type ({ name, version?, title? }) and add
optional `InitializeResult.serverInfo` and `InitializeParams.clientInfo`,
mirroring LSP's clientInfo/serverInfo and MCP's Implementation. The fields
identify the host/client software and build behind either side of the
handshake — informational only, explicitly not a feature-detection
mechanism (that stays with the capability model).
Regenerate all five client mirrors + JSON Schema, register the new type in
each generator's exhaustiveness list, document the fields in the lifecycle
spec, add a round-trip conformance fixture wired into all five client
harnesses, and record CHANGELOG entries for the spec and every client.
Closes #306
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds an additive Implementation identity type and wires it into the initialize handshake (InitializeParams.clientInfo? / InitializeResult.serverInfo?) so clients/hosts can optionally report implementation name/version/title for logging/telemetry/about surfaces (explicitly not for feature detection). The change ripples through the generated client mirrors, JSON Schema outputs, conformance fixtures, and documentation.
Changes:
- Introduce
Implementationand add optionalclientInfo/serverInfofields to the initialize command types. - Regenerate/update JSON Schemas and all client mirrors (Go/Rust/Kotlin/Swift/TypeScript) including round-trip fixture harnesses.
- Document the new handshake fields and add a conformance round-trip fixture + changelog entries.
Show a summary per file
| File | Description |
|---|---|
| types/test-cases/round-trips/028-implementation-identity.json | Adds a round-trip fixture for the new Implementation wire type. |
| types/common/commands.ts | Defines Implementation and adds clientInfo? / serverInfo? to initialize params/result. |
| scripts/generate-swift.ts | Registers Implementation as a generated Swift command struct. |
| scripts/generate-rust.ts | Registers Implementation as a generated Rust command struct. |
| scripts/generate-kotlin.ts | Registers Implementation as a generated Kotlin command struct. |
| scripts/generate-go.ts | Registers Implementation as a generated Go command struct. |
| schema/errors.schema.json | Updates schema output to include Implementation and the new initialize fields. |
| schema/commands.schema.json | Updates schema output to include Implementation and the new initialize fields. |
| docs/specification/lifecycle.md | Documents clientInfo / serverInfo and adds an “Implementation identity” subsection. |
| clients/typescript/test/types-round-trip.test.ts | Adds Implementation to the TS fixture type binder. |
| clients/typescript/CHANGELOG.md | Notes the new optional initialize identity fields in the TS client changelog. |
| clients/swift/CHANGELOG.md | Notes the new optional initialize identity fields in the Swift client changelog. |
| clients/swift/AgentHostProtocol/Tests/AgentHostProtocolClientTests/TypesRoundTripFixtureTests.swift | Adds Implementation decode/re-encode case to the Swift round-trip harness. |
| clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/Commands.generated.swift | Generated Swift types include Implementation and initialize fields. |
| clients/rust/crates/ahp-types/tests/roundtrip_corpus.rs | Adds Implementation to Rust round-trip corpus harness. |
| clients/rust/crates/ahp-types/src/commands.rs | Generated Rust types include Implementation and initialize fields. |
| clients/rust/CHANGELOG.md | Notes the new optional initialize identity fields in the Rust client changelog. |
| clients/kotlin/src/test/kotlin/com/microsoft/agenthostprotocol/RoundTripCorpusTest.kt | Adds Implementation to Kotlin round-trip corpus harness. |
| clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/Commands.generated.kt | Generated Kotlin types include Implementation and initialize fields. |
| clients/kotlin/CHANGELOG.md | Notes the new optional initialize identity fields in the Kotlin client changelog. |
| clients/go/CHANGELOG.md | Notes the new optional initialize identity fields in the Go client changelog. |
| clients/go/ahptypes/roundtrip_fixture_test.go | Adds Implementation decode/re-encode case to Go round-trip harness. |
| clients/go/ahptypes/commands.generated.go | Generated Go types include Implementation and initialize fields. |
| CHANGELOG.md | Notes the new optional initialize identity fields in the spec changelog. |
Review details
- Files reviewed: 22/24 changed files
- Comments generated: 1
- Review effort level: Low
The hand-written ahp client crate constructed InitializeParams with a struct literal, and the ahp-types crate docs include an initialize doctest; both needed the new client_info field to compile after the types change. The client convenience method sets it to None (matching the existing locale/capabilities handling), and the doctest now shows a populated Implementation to demonstrate the field. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The quick-glance handshake signature at the top of the connection lifecycle doc omitted the new optional clientInfo/serverInfo fields, making it inconsistent with the JSON examples and the Implementation identity section below. Add them to the summary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #306.
Summary
The
initializehandshake negotiates a protocol version but carries no way to identify the implementation — the software and build — on either end. LSP and MCP both exchange this. This adds an optional, purely-additive identity to the handshake.A new shared
Implementationtype:wired into both sides of the handshake:
InitializeResult.serverInfo?: ImplementationInitializeParams.clientInfo?: ImplementationSemantics
Implementation identity is informational only — for logging, telemetry, an about/status affordance, and, as a last resort, a known-issue workaround for a specific buggy build. It answers "what software, and which build, is on the other end," which is distinct from both the negotiated
protocolVersionand theAgentInfothat names the agent persona.It is not a feature-detection mechanism. Feature availability stays with the capability model (
ClientCapabilitiesand the various*.capabilitiesdeclarations); peers should not gate protocol behaviour on parsingversion.Compatibility
Purely additive and optional. Both fields default to absent; a peer that omits its own info, or ignores the other side's, stays fully interoperable. No protocol version bump.
Changes
types/common/commands.ts— theImplementationtype and the two optional fields.docs/specification/lifecycle.md— documents the fields and adds an Implementation identity section.028-implementation-identity.json, wired into every client's harness.