Allow tools to set skipPermission#808
Conversation
There was a problem hiding this comment.
Pull request overview
Adds cross-SDK support for a per-tool skipPermission flag so “safe” tools can execute without triggering a permission prompt, aligning behavior across Python/Node/Go/.NET and documenting the new option.
Changes:
- Add
skipPermission/skip_permissionto tool definitions in all SDKs and forward it insession.create/session.resumepayloads. - Update SDK documentation (Python/Node/Go/.NET READMEs) with usage examples.
- Add/extend unit tests for serialization/forwarding in Node and Go.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| python/copilot/types.py | Extends Python Tool type with skip_permission. |
| python/copilot/tools.py | Adds skip_permission option to define_tool and propagates into Tool. |
| python/copilot/client.py | Forwards skipPermission into tool definitions for create/resume. |
| python/README.md | Documents skip_permission=True usage for Python tools. |
| nodejs/test/client.test.ts | Adds tests asserting skipPermission is sent on create/resume. |
| nodejs/src/types.ts | Extends TS Tool type and defineTool config with skipPermission. |
| nodejs/src/client.ts | Forwards skipPermission in tool definitions for create/resume. |
| nodejs/README.md | Documents skipPermission: true usage for Node tools. |
| go/types.go | Extends Go Tool struct with SkipPermission JSON field. |
| go/client_test.go | Adds tests validating skipPermission JSON serialization/omission. |
| go/README.md | Documents SkipPermission = true usage for Go tools. |
| dotnet/src/Client.cs | Maps skip_permission AdditionalProperties into skipPermission on RPC tool definitions. |
| dotnet/README.md | Documents skip_permission AdditionalProperties usage for .NET tools. |
You can also share your feedback on Copilot code review. Take the survey.
✅ Cross-SDK Consistency ReviewI've reviewed this PR for consistency across all four SDK implementations. Great work! This PR maintains excellent feature parity and consistent API design across Node.js/TypeScript, Python, Go, and .NET. SummaryThe PR adds a Consistency Analysis✅ Feature Implementation - All SDKs CoveredAll four SDK implementations include the new
✅ API Naming - Language Conventions RespectedThe naming follows each language's conventions appropriately:
✅ Protocol Serialization - Consistent Wire FormatAll SDKs serialize to the same JSON field name: ✅ Documentation - Parallel ExamplesEach SDK's README includes a dedicated "Skipping Permission Prompts" section with equivalent examples showing the same use case (safe lookup operation). ✅ Test Coverage - Comprehensive & ParallelAll SDKs include tests verifying:
Minor Observation (Non-Blocking)The .NET implementation uses ConclusionNo consistency issues found. This PR exemplifies excellent cross-SDK engineering: feature parity, consistent semantics, language-idiomatic APIs, and comprehensive test coverage. All changes maintain the established patterns within each SDK while achieving the same functionality across the board. Generated by SDK Consistency Review Agent
|
✅ Cross-SDK Consistency ReviewThis PR successfully implements the Summary
Key Consistency Points✅ Correct naming conventions: Each SDK follows its language-specific idiom (camelCase, snake_case, PascalCase) .NET Implementation NoteThe .NET SDK follows its existing pattern for tool flags by using No consistency issues found. The feature is ready from a cross-SDK perspective! 🎉
|
✅ Cross-SDK Consistency Review: PASSEDThis PR successfully implements the Feature Implementation Status
API Design Consistency ✅The implementation correctly follows language-specific conventions:
Implementation Patterns ✅Each SDK implements the feature using its established patterns:
All implementations correctly map the field to the VerdictThis PR exemplifies excellent cross-SDK consistency. The feature is:
No consistency issues found. Nice work! 🎉
|
✅ Cross-SDK Consistency ReviewThis PR successfully adds the ✅ Consistent ImplementationAll four SDKs implement the feature with appropriate language idioms:
✅ Complete Feature ParityEach SDK includes:
Language Idiom ComplianceThe naming conventions correctly follow each language's standards:
All variants correctly serialize to No cross-SDK consistency issues found. 🎉
|
Replace approveAll with tracking permission handlers in all skipPermission tests (Node.js, Python, Go, .NET) and assert the handler is never called. Removes outdated TODO comments since the CLI already respects skipPermission. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d7e43de to
ef046b8
Compare
A nice to have for extensions adding relatively safe tools.