Skip to content

Conversation

vaibhavgeek
Copy link

Summary

This PR updates the tool permission callback response format to match the latest control protocol specification:

  • Changes response format from {"allow": true/false} to {"behavior": "allow"/"deny"}
  • Renames "input" field to "updatedInput" and always includes it (either modified or original)
  • Renames "reason" field to "message" for deny responses
  • Adds support for "updatedPermissions" field in allow responses
  • Adds support for "interrupt" flag in deny responses
  • Fixes newline issues at end of files

Test plan

  • Updated unit tests to verify new response format
  • Updated e2e tests to verify callback behavior
  • All tests pass with new format

Related

Related to #209 which updated PermissionResult types to match the control protocol.

🤖 Generated with Claude Code

- Change response format from {"allow": true/false} to {"behavior": "allow"/"deny"}
- Rename "input" field to "updatedInput" and always include it
- Rename "reason" field to "message" for deny responses
- Add support for "updatedPermissions" field in allow responses
- Add support for "interrupt" flag in deny responses
- Fix newline issues at end of files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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.

1 participant