Skip to content

Add optional implementation identity (serverInfo/clientInfo) to the initialize handshake#309

Open
colbylwilliams wants to merge 3 commits into
mainfrom
colby-add-serverinfo-initializeresult
Open

Add optional implementation identity (serverInfo/clientInfo) to the initialize handshake#309
colbylwilliams wants to merge 3 commits into
mainfrom
colby-add-serverinfo-initializeresult

Conversation

@colbylwilliams

@colbylwilliams colbylwilliams commented Jul 7, 2026

Copy link
Copy Markdown
Member

Closes #306.

Summary

The initialize handshake 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 Implementation type:

export interface Implementation {
  name: string;      // required
  version?: string;  // SemVer recommended, not required
  title?: string;    // optional display name
}

wired into both sides of the handshake:

  • InitializeResult.serverInfo?: Implementation
  • InitializeParams.clientInfo?: Implementation

Semantics

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 protocolVersion and the AgentInfo that names the agent persona.

It is not a feature-detection mechanism. Feature availability stays with the capability model (ClientCapabilities and the various *.capabilities declarations); peers should not gate protocol behaviour on parsing version.

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 — the Implementation type and the two optional fields.
  • Regenerated all five client mirrors (Go/Rust/Kotlin/Swift/TypeScript) and the JSON Schema.
  • docs/specification/lifecycle.md — documents the fields and adds an Implementation identity section.
  • Round-trip conformance fixture 028-implementation-identity.json, wired into every client's harness.
  • CHANGELOG entries for the spec and each client.

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Implementation and add optional clientInfo/serverInfo fields 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

Comment thread docs/specification/lifecycle.md
colbylwilliams and others added 2 commits July 7, 2026 06:25
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>
@colbylwilliams colbylwilliams requested a review from connor4312 July 7, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add optional serverInfo (implementation name + version) to InitializeResult

2 participants