Copilot SDK v1.0.0-beta.4: Typed Unions & Experimental Markers

Copilot SDK beta.4 brings typed Go unions for compile-time safety, experimental API markers across languages, and a breaking RPC codegen rewrite. Go callers need to update.

Copilot SDK v1.0.0-beta.4: Typed Unions & Experimental Markers

TL;DR

  • Go SDK now uses typed union interfaces instead of flattened structs — compile-time safety, no more invalid states
  • Experimental API markers added across all languages (C#, TypeScript, Go, Python, Rust)
  • Go RPC codegen rewritten; breaking change for existing Go callers

New

  • Typed Go union interfaces — Switch on concrete variants with full type safety. Unknown union members and session events are now preserved instead of dropped.
  • Experimental schema type annotations — Language-specific compiler warnings for unstable APIs: [Experimental] in C#, @experimental JSDoc in TypeScript, doc comments in Go/Python, and #[doc] in Rust.

Fixed

  • Go CLI stderr capture — Startup errors now include captured stderr, surfacing root causes (missing module, auth failure, version mismatch) instead of generic opaque messages.

Breaking Changes

  • Go RPC codegen rewrite — Custom schema-aware generator replaces quicktype. Preserves distinct named types and aligns casing with repo policy. Existing Go callers using generated RPC types must update.

Update via: go get -u github.com/github/copilot-sdk@v1.0.0-beta.4

Source: Copilot SDK