Tracks ACP schema 0.6.3 (up from 0.4.9). The code generator gains JSON Schema discriminator support, smarter nested-type naming, and multi-line doc comments — which together rename a handful of generated types and reshape how callers build RequestPermissionRequest and McpServer values.
Added
Implementationmetadata on initialize.InitializeRequestgained an optionalClientInfo *ImplementationandInitializeResponsegained an optionalAgentInfo *Implementation, carryingname, optionaltitle, andversion. The schema notes these will become required in a future protocol revision, so populating them now is recommended (#3 by @ThomasK33):resp, err := conn.Initialize(ctx, acp.InitializeRequest{ ProtocolVersion: acp.ProtocolVersionNumber, ClientInfo: &acp.Implementation{ Name: "my-editor", Title: acp.Ptr("My Editor"), Version: "1.2.3", }, })
- JSON-RPC envelope and error types. New generated
AgentOutgoingMessage/ClientOutgoingMessage(withRequest/Response/Notificationvariants) and anErrorstruct mirroring the JSON-RPC 2.0 error object (#3). - Discriminator-aware codegen. The generator now honors explicit
discriminator: { propertyName: "type" }annotations on schema unions likeContentBlockandMcpServer, falling back to the previous const-property scan only when none is declared. Inline variants are also given idiomatic names via word-boundary heuristics — e.g.RequestPermissionRequest+toolCall→RequestPermissionToolCallinstead ofRequestPermissionRequestToolCall(#3).
Changed
- Schema bumped to 0.6.3.
schema/versionand the SDKversionare now0.6.3. - Doc comments preserve formatting.
cmd/generatereplaces the oldSanitizeCommentcollapser withFormatDocComment, which keeps newlines and paragraph breaks from JSON Schema descriptions. Generated godoc on types likeContentBlock,Agent, andClientis now multi-line and noticeably easier to read. - Generated type renames. A few inline-variant types now have shorter, more idiomatic names (see Breaking Changes below).
ResourceBlockhelper signature.ResourceBlock(EmbeddedResource)→ResourceBlock(EmbeddedResourceResource). Callers no longer need to wrap the resource:// Before acp.ResourceBlock(acp.EmbeddedResource{Resource: res}) // After acp.ResourceBlock(res)
ContentBlockTextdoc clarifies that text content may be Markdown and clients SHOULD render it as such.
Breaking Changes
Code that referenced the old generated names or constructed RequestPermissionRequest / McpServer literals must be updated:
| Before | After |
|---|---|
RequestPermissionRequest{ ToolCall: ToolCallUpdate{...} }
| RequestPermissionRequest{ ToolCall: RequestPermissionToolCall{...} }
|
SessionUpdate{ ToolCallUpdate: &SessionUpdateToolCallUpdate{...} }
| SessionUpdate{ ToolCallUpdate: &SessionToolCallUpdate{...} }
|
McpServer{ Stdio: &Stdio{...} }
| McpServer{ Stdio: &McpServerStdio{...} }
|
ResourceBlock(EmbeddedResource{Resource: res})
| ResourceBlock(res) (where res is EmbeddedResourceResource)
|
The custom ToolCallUpdateOpt callbacks now receive *SessionToolCallUpdate; recompiling against the new types is sufficient if you used the provided WithUpdate* helpers.
Full Changelog: v0.4.9...v0.6.3