Copilot SDK v0.2.1: Commands & Metadata Across All SDKs
Copilot SDK v0.2.1 brings slash commands and UI dialogs to Python, Go, and .NET, adds session metadata lookup, and includes breaking changes to Node.js handlers.
TL;DR
- Slash commands and UI dialogs now available in Python, Go, and .NET (previously Node.js only)
- New
getSessionMetadatamethod across all SDKs for efficient session lookup - Breaking change in Node.js:
onElicitationRequesthandler signature changed to single context object
New
- Commands and UI elicitation across all SDKs — Register slash commands and drive interactive dialogs (confirm, select) from Python, Go, and .NET. Previously Node.js-only.
session.getSessionMetadataacross all SDKs — Fetch metadata for a single session by ID without listing all sessions. Returnsundefined/nullif not found.sessionFsfor Node SDK — Custom storage adapter to redirect per-session storage (event logs, large files) to any backing store. Useful for serverless and custom persistence.- Python: async context manager support —
CopilotClientandCopilotSessionnow supportasync withfor automatic resource cleanup.
Fixed
- Structured tool results now sent as objects instead of stringified JSON, preserving metadata across Node, Go, and Python SDKs.
Breaking Changes
- Node.js:
onElicitationRequestsignature — Changed from two arguments (request, invocation) to a singleElicitationContext. Update callers to usecontext.sessionIdandcontext.messagedirectly. - Python: types import path —
copilot.typesmodule removed. Import types directly fromcopilot. - Go: RPC package API — Struct names simplified; removed redundant
Rpcinfix (e.g.,ModelRpcApi→ModelApi). - Go:
Session.SetModelsignature — Now takes a pointer for optional options instead of variadic argument.
Improvements
- Python: Path handling —
workspace_pathnow accepts anyos.PathLikeand returnspathlib.Path.
Update with: npm install @github/copilot-sdk@0.2.1 (Node.js), pip install github-copilot-sdk==0.2.1 (Python), or check the release page for Go and .NET packages.
Source: Copilot SDK