feat: update PermissionResult to match latest control protocol#174
Closed
thelinuxkid wants to merge 2 commits into
Closed
feat: update PermissionResult to match latest control protocol#174thelinuxkid wants to merge 2 commits into
thelinuxkid wants to merge 2 commits into
Conversation
Collaborator
|
Thanks for your change! Are you able to:
Alternatively, if it's too much work for you, I can merge in the changes you have here in a separate PR. I tested this code on an example, and it works well. |
- Change response format from "allow" to "behavior" field - Update input modification field from "input" to "updatedInput" - Add support for updatedPermissions in allow responses - Update deny response to use "message" instead of "reason" - Add support for interrupt flag in deny responses - Update tests to reflect new response format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix syntax errors in query.py permission serialization - Add to_dict() method to PermissionUpdate class to properly handle all type variants - Replace complex inline serialization with clean method call - Ensure compatibility with TypeScript control protocol interface 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
4aa5c5d to
1a23f48
Compare
ashwin-ant
added a commit
that referenced
this pull request
Oct 6, 2025
Recreation of #174, with signed commits
|
Can you expedite merging this PR? We are facing the same issue with our project as well. |
|
Can you expedite merging this PR please? We have been waiting on this for a while |
Collaborator
|
We merged #209, which was the equivalent PR but with code signing. If you update to 0.1.1 it should work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
{"allow": true/false}to{"behavior": "allow"/"deny"}"input"to"updatedInput"updatedPermissionsin allow responses"reason"to"message"and addedinterruptflag supportTechnical Details
This PR updates the permission callback response handling in
src/claude_code_sdk/_internal/query.pyto align with the latest control protocol specification. The changes ensure compatibility with newer versions of the control protocol while maintaining backward compatibility through proper type handling.Test plan
🤖 Generated with Claude Code