You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align provider/copilotprovider with the .NET Copilot approval fix by installing a default OnPreToolUse hook for approval-required tools when the caller has not provided one. The hook returns ask for tools that require approval, preserves caller-supplied Hooks.OnPreToolUse, and clones tool/hook state so per-run session assembly does not mutate the caller's SessionConfig.
Added internal tests covering create-session and resume-session approval gating, preservation of caller-supplied OnPreToolUse hooks, and non-mutation of source SessionConfig.
Notes
Other recent upstream candidates were skipped because they were broader API work or upstream-only test churn.
This Go port keeps caller-provided Hooks.OnPreToolUse authoritative; unlike the upstream .NET change, it does not add a new logger surface just to warn when callers override approval handling.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch dotnet-port-fixes/copilot-approval-hook-948902a819b965e3.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Summary
Align
provider/copilotproviderwith the .NET Copilot approval fix by installing a defaultOnPreToolUsehook for approval-required tools when the caller has not provided one. The hook returnsaskfor tools that require approval, preserves caller-suppliedHooks.OnPreToolUse, and clones tool/hook state so per-run session assembly does not mutate the caller'sSessionConfig.Ported .NET PRs
d5c5fb9d3de3a19c0f55d958464646dfefdb59e3(https://github.com/microsoft/agent-framework/commit/d5c5fb9d3de3a19c0f55d958464646dfefdb59e3)Breaking Changes
No.
Tests and Examples
go test ./provider/copilotprovider -count=1go test ./provider/... -count=1OnPreToolUsehooks, and non-mutation of sourceSessionConfig.Notes
Hooks.OnPreToolUseauthoritative; unlike the upstream .NET change, it does not add a new logger surface just to warn when callers override approval handling.Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
dotnet-port-fixes/copilot-approval-hook-948902a819b965e3.Click here to create the pull request
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (235 of 235 lines)