clawd-code-sdk 1.1.1__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/PKG-INFO +4 -1
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/pyproject.toml +4 -5
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/__init__.py +18 -18
- clawd_code_sdk-1.1.3/src/clawd_code_sdk/_internal/session_mutations.py +663 -0
- clawd_code_sdk-1.1.3/src/clawd_code_sdk/_internal/sessions.py +1311 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_internal/transport/subprocess_cli.py +27 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/client.py +62 -14
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/list_sessions.py +0 -84
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/__init__.py +14 -12
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/base.py +3 -2
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/control.py +100 -2
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/hooks.py +21 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/mcp.py +8 -1
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/messages.py +46 -3
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/options.py +7 -1
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/output_types.py +3 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/session.py +5 -54
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/settings.py +9 -1
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/system_messages.py +35 -1
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/storage/replay.py +23 -13
- clawd_code_sdk-1.1.3/tests/test_session_mutations.py +741 -0
- clawd_code_sdk-1.1.3/tests/test_sessions.py +1682 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/.gitignore +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/LICENSE +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/README.md +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_bundled/.gitignore +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_errors.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_internal/__init__.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_internal/query.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_internal/transport/__init__.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_internal/transport/subprocess_utils.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/_version.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/anthropic_stream.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/instrumentation.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/mcp_utils.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/agents.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/anthropic_types.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/content_blocks.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/context_usage.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/input_types.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/permissions.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/prompt_requests.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/prompts.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/server_info.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/thinking.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/models/usage.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/py.typed +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/session.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/storage/ARCHITECTURE.md +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/storage/__init__.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/storage/helpers.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/storage/models.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/src/clawd_code_sdk/usage.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/__init__.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/conftest.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/__init__.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_agents_and_settings.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_dynamic_control.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_hook_events.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_hooks.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_include_partial_messages.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_mcp_resources.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_mcp_tools.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_sdk_mcp_resources.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_sdk_mcp_tools.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_slash_commands.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_stderr_callback.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_storage_parsing.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_structured_output.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_subagent_invocation.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/e2e/test_tool_permissions.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/mcp_server.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/mock_claude_server.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_changelog.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_client.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_errors.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_image.png +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_integration.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_message_parser.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_sdk_mcp_integration.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_session.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_streaming_client.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_subprocess_buffering.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_tool_callbacks.py +0 -0
- {clawd_code_sdk-1.1.1 → clawd_code_sdk-1.1.3}/tests/test_transport.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clawd-code-sdk
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Python SDK for Claude Code
|
|
5
5
|
Project-URL: Documentation, https://github.com/phil65/claude-agent-sdk-python
|
|
6
6
|
Project-URL: Homepage, https://github.com/phil65/claude-agent-sdk-python
|
|
@@ -25,12 +25,15 @@ Requires-Dist: mcp>=0.1.0
|
|
|
25
25
|
Requires-Dist: python-dotenv>=1.2.1
|
|
26
26
|
Provides-Extra: dev
|
|
27
27
|
Requires-Dist: anyio[trio]>=4.0.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: fastmcp>=3.0.0; extra == 'dev'
|
|
28
29
|
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
29
30
|
Requires-Dist: pytest-asyncio>=0.20.0; extra == 'dev'
|
|
30
31
|
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
31
32
|
Requires-Dist: pytest-timeout>=2.4.0; extra == 'dev'
|
|
32
33
|
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
33
34
|
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
35
|
+
Provides-Extra: otel
|
|
36
|
+
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'otel'
|
|
34
37
|
Description-Content-Type: text/markdown
|
|
35
38
|
|
|
36
39
|
# Claude Agent SDK for Python
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "clawd-code-sdk"
|
|
3
|
-
version = "1.1.
|
|
3
|
+
version = "1.1.3"
|
|
4
4
|
description = "Python SDK for Claude Code"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -41,12 +41,11 @@ dev = [
|
|
|
41
41
|
"pytest-timeout>=2.4.0",
|
|
42
42
|
"mypy>=1.0.0",
|
|
43
43
|
"ruff>=0.1.0",
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
[dependency-groups]
|
|
47
|
-
dev = [
|
|
48
44
|
"fastmcp>=3.0.0",
|
|
49
45
|
]
|
|
46
|
+
otel = [
|
|
47
|
+
"opentelemetry-api>=1.20.0",
|
|
48
|
+
]
|
|
50
49
|
|
|
51
50
|
[build-system]
|
|
52
51
|
requires = ["hatchling"]
|
|
@@ -21,15 +21,23 @@ from ._errors import (
|
|
|
21
21
|
ServerError,
|
|
22
22
|
)
|
|
23
23
|
from ._internal.transport import Transport
|
|
24
|
+
from ._internal.sessions import (
|
|
25
|
+
get_session_info,
|
|
26
|
+
get_session_messages,
|
|
27
|
+
get_subagent_messages,
|
|
28
|
+
list_sessions,
|
|
29
|
+
list_subagents,
|
|
30
|
+
)
|
|
31
|
+
from ._internal.session_mutations import tag_session, delete_session, fork_session, rename_session
|
|
24
32
|
from ._version import __version__
|
|
25
33
|
from .models.anthropic_types import ToolResultContentBlock
|
|
26
34
|
from .client import ClaudeSDKClient
|
|
27
|
-
from .list_sessions import list_sessions
|
|
28
35
|
from .models import (
|
|
29
36
|
AgentDefinition,
|
|
30
37
|
AgentHookHandler,
|
|
31
38
|
AgentHooksConfig,
|
|
32
39
|
ContinueLatest,
|
|
40
|
+
SessionMessage,
|
|
33
41
|
AssistantMessage,
|
|
34
42
|
BaseHookInput,
|
|
35
43
|
CanUseTool,
|
|
@@ -47,7 +55,6 @@ from .models import (
|
|
|
47
55
|
HookMatcher,
|
|
48
56
|
HookMatcherConfig,
|
|
49
57
|
PromptHookHandler,
|
|
50
|
-
ListSessionsOptions,
|
|
51
58
|
McpSdkServerConfig,
|
|
52
59
|
McpSdkServerConfigWithInstance,
|
|
53
60
|
McpServerConfig,
|
|
@@ -135,11 +142,8 @@ __cli_version__ = "2.1.11"
|
|
|
135
142
|
|
|
136
143
|
|
|
137
144
|
__all__ = [
|
|
138
|
-
# API Errors
|
|
139
145
|
"APIError",
|
|
140
|
-
# Agent support
|
|
141
146
|
"AgentDefinition",
|
|
142
|
-
# Hook support
|
|
143
147
|
"AgentHookHandler",
|
|
144
148
|
"AgentHooksConfig",
|
|
145
149
|
"AppliedSettings",
|
|
@@ -152,17 +156,13 @@ __all__ = [
|
|
|
152
156
|
"CLIConnectionError",
|
|
153
157
|
"CLIJSONDecodeError",
|
|
154
158
|
"CLINotFoundError",
|
|
155
|
-
# Tool callbacks
|
|
156
159
|
"CanUseTool",
|
|
157
160
|
"ClaudeAgentOptions",
|
|
158
|
-
# Settings / sandbox
|
|
159
161
|
"ClaudeCodeSettings",
|
|
160
162
|
"ClaudeSDKClient",
|
|
161
|
-
# Errors
|
|
162
163
|
"ClaudeSDKError",
|
|
163
164
|
"CommandHookHandler",
|
|
164
165
|
"ContentBlock",
|
|
165
|
-
# Session config
|
|
166
166
|
"ContinueLatest",
|
|
167
167
|
"ConversationTurn",
|
|
168
168
|
"DocumentMediaType",
|
|
@@ -182,7 +182,6 @@ __all__ = [
|
|
|
182
182
|
"ImageSource",
|
|
183
183
|
"InitSystemMessage",
|
|
184
184
|
"InvalidRequestError",
|
|
185
|
-
"ListSessionsOptions",
|
|
186
185
|
"McpAuthenticateResponse",
|
|
187
186
|
"McpSdkServerConfig",
|
|
188
187
|
"McpSdkServerConfigWithInstance",
|
|
@@ -194,7 +193,6 @@ __all__ = [
|
|
|
194
193
|
"NotificationHookInput",
|
|
195
194
|
"NotificationHookSpecificOutput",
|
|
196
195
|
"OnUserQuestion",
|
|
197
|
-
# Types
|
|
198
196
|
"PermissionMode",
|
|
199
197
|
"PermissionRequestHookInput",
|
|
200
198
|
"PermissionRequestHookSpecificOutput",
|
|
@@ -220,16 +218,14 @@ __all__ = [
|
|
|
220
218
|
"ResumeSession",
|
|
221
219
|
"SDKSessionInfo",
|
|
222
220
|
"Sandbox",
|
|
223
|
-
# Beta support
|
|
224
221
|
"SdkBeta",
|
|
225
222
|
"SdkMcpTool",
|
|
226
|
-
# Plugin support
|
|
227
223
|
"SdkPluginConfig",
|
|
228
224
|
"ServerError",
|
|
229
225
|
"Session",
|
|
230
226
|
"SessionConfig",
|
|
231
|
-
# Session management
|
|
232
227
|
"SessionManager",
|
|
228
|
+
"SessionMessage",
|
|
233
229
|
"SessionSnapshot",
|
|
234
230
|
"SessionState",
|
|
235
231
|
"SettingSource",
|
|
@@ -240,7 +236,6 @@ __all__ = [
|
|
|
240
236
|
"SubagentStopHookInput",
|
|
241
237
|
"TextBlock",
|
|
242
238
|
"ThinkingBlock",
|
|
243
|
-
# Thinking configuration
|
|
244
239
|
"ThinkingConfig",
|
|
245
240
|
"ThinkingConfigAdaptive",
|
|
246
241
|
"ThinkingConfigDisabled",
|
|
@@ -250,7 +245,6 @@ __all__ = [
|
|
|
250
245
|
"ToolResultBlock",
|
|
251
246
|
"ToolResultContentBlock",
|
|
252
247
|
"ToolUseBlock",
|
|
253
|
-
# Transport
|
|
254
248
|
"Transport",
|
|
255
249
|
"UserDocumentPrompt",
|
|
256
250
|
"UserDocumentURLPrompt",
|
|
@@ -262,9 +256,15 @@ __all__ = [
|
|
|
262
256
|
"UserPromptSubmitHookInput",
|
|
263
257
|
"UserTextPrompt",
|
|
264
258
|
"__version__",
|
|
265
|
-
# MCP Server Support
|
|
266
259
|
"create_sdk_mcp_server",
|
|
260
|
+
"delete_session",
|
|
261
|
+
"fork_session",
|
|
262
|
+
"get_session_info",
|
|
263
|
+
"get_session_messages",
|
|
264
|
+
"get_subagent_messages",
|
|
267
265
|
"list_sessions",
|
|
268
|
-
|
|
266
|
+
"list_subagents",
|
|
267
|
+
"rename_session",
|
|
268
|
+
"tag_session",
|
|
269
269
|
"tool",
|
|
270
270
|
]
|