mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
Remove unstable public APIs from SDK (#151)
Hide hooks, tool permission callbacks, and SDK MCP server APIs from public interface while keeping implementation code intact. These features are not yet stable and should not be documented or exposed to users. Changes: - Remove hook-related exports (HookCallback, HookContext, HookMatcher) from __all__ - Remove tool permission exports (CanUseTool, ToolPermissionContext) from __all__ - Remove SDK MCP exports (tool, create_sdk_mcp_server, SdkMcpTool) from __all__ - Delete examples using unstable APIs (tool_permission_callback.py, mcp_calculator.py) - Remove SDK MCP server documentation from README 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
99d13717d5
commit
e4feaf2e57
5 changed files with 1 additions and 727 deletions
|
|
@ -16,12 +16,8 @@ from .client import ClaudeSDKClient
|
|||
from .query import query
|
||||
from .types import (
|
||||
AssistantMessage,
|
||||
CanUseTool,
|
||||
ClaudeCodeOptions,
|
||||
ContentBlock,
|
||||
HookCallback,
|
||||
HookContext,
|
||||
HookMatcher,
|
||||
McpSdkServerConfig,
|
||||
McpServerConfig,
|
||||
Message,
|
||||
|
|
@ -34,7 +30,6 @@ from .types import (
|
|||
SystemMessage,
|
||||
TextBlock,
|
||||
ThinkingBlock,
|
||||
ToolPermissionContext,
|
||||
ToolResultBlock,
|
||||
ToolUseBlock,
|
||||
UserMessage,
|
||||
|
|
@ -297,20 +292,11 @@ __all__ = [
|
|||
"ToolUseBlock",
|
||||
"ToolResultBlock",
|
||||
"ContentBlock",
|
||||
# Tool callbacks
|
||||
"CanUseTool",
|
||||
"ToolPermissionContext",
|
||||
# Permission results (keep these as they may be used by internal callbacks)
|
||||
"PermissionResult",
|
||||
"PermissionResultAllow",
|
||||
"PermissionResultDeny",
|
||||
"PermissionUpdate",
|
||||
"HookCallback",
|
||||
"HookContext",
|
||||
"HookMatcher",
|
||||
# MCP Server Support
|
||||
"create_sdk_mcp_server",
|
||||
"tool",
|
||||
"SdkMcpTool",
|
||||
# Errors
|
||||
"ClaudeSDKError",
|
||||
"CLIConnectionError",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue