Copilot SDK v1.0.0-beta.6: Java Support & MCP Hooks
Copilot SDK beta.6 brings Java to the monorepo, adds preMcpToolCall hooks for all SDKs, and ships breaking API changes in C#, TypeScript, and Go. Cloud sessions and optional tool callbacks now supported.
TL;DR
- Java SDK now a first-class monorepo citizen with full CI and Maven publishing
- New
preMcpToolCallhook lets you intercept and modify MCP tool invocations across all SDKs - Breaking API changes in C#, TypeScript, and Go — connection config and lifecycle events restructured
New
- Java SDK in monorepo — Java joins TypeScript, Python, Go, C#, and Rust as a fully integrated SDK with generated types, CI pipelines, and Maven publishing.
preMcpToolCallhook — Intercept MCP tool calls before execution across all SDKs. Returnnullto leave_metaunchanged, a new object to replace it, or explicitly setmetaToUsetonullto strip it.- Optional tool callbacks — Declare tools and permission handlers without callbacks. Resolve requests manually later from event streams instead of inline.
sessionIdon hook inputs — All hook input types now carrysessionId. Hooks fire for sub-agent tool calls, letting you distinguish parent from child invocations.- Custom agent model selection — Specify which model a sub-agent uses via
modelfield inCustomAgentConfig. Falls back to parent session model if unavailable. - Cloud session config — Request cloud-backed remote sessions with repository metadata at session creation.
- C#
DefineToolhelper — Typed wrapper for tool definition that applies Copilot metadata without magic strings.
Breaking Changes
- Connection configuration refactored —
CliPath,Port,CliUrlreplaced byRuntimeConnectiondiscriminated union. TypeScript:new CopilotClient({ connection: RuntimeConnection.stdio(...) }). C#:new CopilotClientOptions { Connection = RuntimeConnection.Stdio(...) }. - Lifecycle events now typed — Replaced stringly-typed discriminators with polymorphic hierarchy (
SessionCreatedEvent, etc.) in C#, TypeScript, and Go. - Convenience send overloads added —
send(string)andsendAndWait(string)now available across all SDKs. - C# renames —
CopilotHome→BaseDirectory, delegates replaced withFunc<...>,LogLevel→CopilotLogLevel,SessionConfigBaseextracted.
Fixed
- C# MSBuild targets now honor preinstalled CLI path.
- C# argument validation edge cases resolved.
- Python
from_dict()round-trip fixed for optional fields with schema defaults.
Other
- C# now targets
netstandard2.0andnet10. Symbols package (.snupkg) published to NuGet.org. - Node.js exports generated session event types.
MCPStdioServerConfig.argsnow optional across all SDKs.- Go codegen replaced RPC quicktype with native Go implementation. Typed union interfaces and bool-discriminated unions now generated.
- Rust types now derive
Default. - Deprecated APIs hidden where language supports it.
Update via npm: npm install @github/copilot-sdk@1.0.0-beta.6
Source: Copilot SDK