claude-code-sdk-python/examples
Kashyap Murali a774031c34
feat: Add tool permission and hook callbacks support
- Added ToolPermissionCallback type for controlling tool execution
- Added HookCallback type for intercepting tool events
- Added callbacks to ClaudeCodeOptions
- Thread callbacks through InternalClient and ClaudeSDKClient to Query
- Updated Query to handle tool permission requests with new types
- Support both ToolPermissionResponse and dict returns for compatibility
- Added example demonstrating permission control and input modification
- Added comprehensive tests for callbacks functionality
- Fixed NotRequired import for Python 3.11+ compatibility
2025-09-02 15:35:39 -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 Improve examples 2025-07-19 19:57:17 -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: Add tool permission and hook callbacks support 2025-09-02 15:35:39 -07:00