claude-code-sdk-python/examples
Kashyap Murali 4f4fcfe3f3
feat: Full TypeScript SDK compatibility for tool permissions
- Align PermissionResult structure with TypeScript SDK
  - Add PermissionResultAllow with updatedInput and updatedPermissions
  - Add PermissionResultDeny with message and interrupt flag
  - Remove misleading ToolPermissionResponse alias (no actual backward compat)

- Add PermissionUpdate types matching TypeScript
  - PermissionUpdate with all update types
  - PermissionRuleValue for rule definitions
  - PermissionUpdateDestination and PermissionBehavior literals

- Update all tests and examples to use new types
- Update Query handler to properly handle Allow/Deny variants

Breaking change: Callbacks must now return PermissionResultAllow or
PermissionResultDeny instead of the old ToolPermissionResponse format.

This ensures full compatibility with TypeScript SDK's permission system.
2025-09-03 09:05:51 -07:00
..
quick_start.py cost_usd -> total_cost_usd in example 2025-06-25 15:18:52 -04:00
streaming_mode.py Implement control protocol support for Python SDK (#139) 2025-09-01 23:04:22 -07:00
streaming_mode_ipython.py fix: Remove duplicate get_server_info method and fix linting issues 2025-09-02 16:17:00 -07:00
streaming_mode_trio.py Make streaming implementation trio-compatible (#84) 2025-07-22 23:31:42 -07:00
tool_permission_callback.py feat: Full TypeScript SDK compatibility for tool permissions 2025-09-03 09:05:51 -07:00