Skip to content

Update GitHub Copilot integration to SDK v0.3.0 and CLI v1.0.37#218

Merged
hendrikmennen merged 3 commits intomainfrom
copilot/update-github-copilot-integration
Apr 28, 2026
Merged

Update GitHub Copilot integration to SDK v0.3.0 and CLI v1.0.37#218
hendrikmennen merged 3 commits intomainfrom
copilot/update-github-copilot-integration

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

Tracks the latest Copilot SDK and Copilot CLI releases, picking up the v0.2.0 / v0.3.0 SDK breaking changes (typed permission kinds, polymorphic PermissionRequest, default sub-agent streaming).

Version bumps

  • GitHub.Copilot.SDK: 0.1.290.3.0
  • Bundled Copilot CLI package: 0.0.4181.0.37 (asset URLs unchanged in shape)

CopilotChatService adaptations

  • PermissionRequestResult.Kind is now a typed PermissionRequestResultKind instead of a free-form string:
    // before
    new PermissionRequestResult { Kind = "approved" }
    // after
    new PermissionRequestResult { Kind = PermissionRequestResultKind.Approved }
  • PermissionRequest is now polymorphic. The base type no longer carries ToolCallId / ExtensionData; replaced dictionary-based extraction with pattern matching on the typed subclasses (PermissionRequestShell / Write / Read / Url / Mcp / CustomTool / Memory / Hook), surfacing richer per-kind context (command, file, intention, MCP server/tool, memory subject/fact, hook message) and per-kind prompt titles in the approval dialog.
  • IsCustomToolPermissionRequest uses is PermissionRequestCustomTool instead of string comparison.
  • Set IncludeSubAgentStreamingEvents = false on SessionConfig / ResumeSessionConfig to preserve root-agent-only streaming; the SDK now emits sub-agent deltas by default, which would interleave in the UI since there is no agentId-aware renderer.
  • Removed the SDK-level OnPreToolUse hook that previously gated editFile / runTerminalCommand. In SDK v0.1.x that hook surfaced as a tool-named permission request whose approval unblocked the tool, but in v0.3.0 the same PermissionDecision = "ask" output is now surfaced as a PermissionRequestHook whose approval gates the hook rather than the underlying tool — leaving file edits blocked even after the user approves. The host already gates these tools through its own permission infrastructure (RegisteredOneWareAiFunction.InvokeCoreAsyncAiFunctionProvider.EnsurePermissionAsyncFunctionPermissionRequestedChatViewModel), so removing the redundant SDK-level hook restores file editing and terminal commands while preserving the user-confirmation prompt.
  • Dropped the now-unused NormalizeExtensionValue / AddExtensionValue helpers and the System.Text.Json import.

Note

The issue links to github/copilot-sdk "starting from v2.0", but that repo's releases top out at v0.3.0. Treated as a typo and updated to the latest stable v0.3.0.

Copilot AI linked an issue Apr 28, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/one-ware/OneWare/sessions/ac9ad328-a035-4d35-b316-1e58064a4bf2

Co-authored-by: hendrikmennen <25281882+hendrikmennen@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GitHub Copilot integration based on latest releases Update GitHub Copilot integration to SDK v0.3.0 and CLI v1.0.37 Apr 28, 2026
Copilot AI requested a review from hendrikmennen April 28, 2026 10:18
@hendrikmennen
Copy link
Copy Markdown
Contributor

@copilot not sufficient, it is currently not able to edit files, asking to execute a "hook" and approve does not seem to count

…nalCommand

Agent-Logs-Url: https://github.com/one-ware/OneWare/sessions/f19ceae6-c57f-4fc7-bf4e-43d06c4f6502

Co-authored-by: hendrikmennen <25281882+hendrikmennen@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 28, 2026

@copilot not sufficient, it is currently not able to edit files, asking to execute a "hook" and approve does not seem to count

You're right — in SDK v0.3.0 the OnPreToolUse hook returning "ask" now surfaces as a PermissionRequestHook whose approval gates the hook, not the underlying tool, so file edits stayed blocked.

Removed the redundant SDK-level hook in 116832b. The host already gates editFile/runTerminalCommand itself via RegisteredOneWareAiFunctionAiFunctionProvider.EnsurePermissionAsyncFunctionPermissionRequested (rendered by ChatViewModel), so the user-confirmation prompt is preserved and the tool actually runs after approval.

@hendrikmennen hendrikmennen marked this pull request as ready for review April 28, 2026 12:04
@hendrikmennen hendrikmennen merged commit 5d02d4e into main Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GitHub Copilot Integration

2 participants