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.

Copilot SDK v1.0.0-beta.6: Java Support & MCP Hooks

TL;DR

  • Java SDK now a first-class monorepo citizen with full CI and Maven publishing
  • New preMcpToolCall hook 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.
  • preMcpToolCall hook — Intercept MCP tool calls before execution across all SDKs. Return null to leave _meta unchanged, a new object to replace it, or explicitly set metaToUse to null to strip it.
  • Optional tool callbacks — Declare tools and permission handlers without callbacks. Resolve requests manually later from event streams instead of inline.
  • sessionId on hook inputs — All hook input types now carry sessionId. 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 model field in CustomAgentConfig. Falls back to parent session model if unavailable.
  • Cloud session config — Request cloud-backed remote sessions with repository metadata at session creation.
  • C# DefineTool helper — Typed wrapper for tool definition that applies Copilot metadata without magic strings.

Breaking Changes

  • Connection configuration refactoredCliPath, Port, CliUrl replaced by RuntimeConnection discriminated 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 addedsend(string) and sendAndWait(string) now available across all SDKs.
  • C# renamesCopilotHomeBaseDirectory, delegates replaced with Func<...>, LogLevelCopilotLogLevel, SessionConfigBase extracted.

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.0 and net10. Symbols package (.snupkg) published to NuGet.org.
  • Node.js exports generated session event types.
  • MCPStdioServerConfig.args now 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