clawd-code-sdk 1.2.5__tar.gz → 1.2.6__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.2.5 → clawd_code_sdk-1.2.6}/PKG-INFO +1 -1
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/pyproject.toml +1 -1
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/client.py +3 -2
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/server_info.py +5 -1
- clawd_code_sdk-1.2.6/tests/test_apply_flag_settings.py +28 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/.gitignore +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/LICENSE +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/README.md +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_bundled/.gitignore +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_errors.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/mcp_compat.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/query.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/sdk_mcp_bridge.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/session_mutations.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/sessions.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/transport/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/transport/subprocess_cli.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/transport/subprocess_utils.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_version.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/anthropic_stream.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/instrumentation.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/list_sessions.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/mcp_utils.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/agents.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/anthropic_types.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/base.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/content_blocks.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/context_usage.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/control.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/hooks.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/input_types.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/mcp.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/messages.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/options.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/output_types.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/permissions.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/prompt_requests.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/prompts.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/session.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/settings.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/system_messages.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/thinking.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/models/usage.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/py.typed +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/session.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/storage/ARCHITECTURE.md +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/storage/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/storage/helpers.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/storage/models.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/storage/replay.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/conftest.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/__init__.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_agents_and_settings.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_dynamic_control.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_hook_events.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_hooks.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_include_partial_messages.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_mcp_resources.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_mcp_tools.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_sdk_mcp_resources.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_sdk_mcp_tools.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_slash_commands.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_stderr_callback.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_storage_parsing.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_structured_output.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_subagent_invocation.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/e2e/test_tool_permissions.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/mcp_server.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/mock_claude_server.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_api_content_blocks.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_changelog.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_client.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_elicitation_mcp_conversion.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_errors.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_get_usage.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_image.png +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_integration.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_line_framing.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_message_parser.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_result_error.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_sandbox_settings.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_sdk_0_3_types.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_sdk_mcp_integration.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_session.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_session_mutations.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_sessions.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_streaming_client.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_subprocess_buffering.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_tool_callbacks.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_transport.py +0 -0
- {clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/tests/test_transport_close.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: clawd-code-sdk
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.6
|
|
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
|
|
@@ -507,10 +507,11 @@ class ClaudeSDKClient:
|
|
|
507
507
|
other sources (user, project, etc.) to produce the effective settings.
|
|
508
508
|
|
|
509
509
|
Args:
|
|
510
|
-
settings: Settings to apply. Only
|
|
510
|
+
settings: Settings to apply. Only fields that were set explicitly (and are
|
|
511
|
+
not None) are sent: defaults would override every other settings source.
|
|
511
512
|
"""
|
|
512
513
|
query = self._ensure_connected()
|
|
513
|
-
serialized = settings.model_dump(by_alias=True, exclude_none=True)
|
|
514
|
+
serialized = settings.model_dump(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
514
515
|
req = SDKControlApplyFlagSettingsRequest(settings=serialized)
|
|
515
516
|
await query._send_control_request(req)
|
|
516
517
|
|
|
@@ -52,12 +52,16 @@ class ClaudeCodeModelInfo(ClaudeCodeBaseModel):
|
|
|
52
52
|
"""Whether the model supports fast mode."""
|
|
53
53
|
|
|
54
54
|
supports_auto_mode: bool | None = None
|
|
55
|
+
"""Whether the model supports auto mode."""
|
|
56
|
+
|
|
55
57
|
supports_thinking_off: bool | None = None
|
|
58
|
+
"""Whether thinking can be turned off for the model."""
|
|
59
|
+
|
|
56
60
|
disabled: bool | None = None
|
|
57
61
|
"""Visible but not selectable (only set for entries in ``unavailable_models``)."""
|
|
62
|
+
|
|
58
63
|
resolved_model: str | None = None
|
|
59
64
|
"""Concrete model ID this entry resolves to (e.g. for aliases)."""
|
|
60
|
-
"""Whether the model supports auto mode."""
|
|
61
65
|
|
|
62
66
|
|
|
63
67
|
class ClaudeCodeCommandInfo(ClaudeCodeBaseModel):
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""The apply_flag_settings control request sends only the settings that were set."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, cast
|
|
6
|
+
|
|
7
|
+
from clawd_code_sdk import ClaudeAgentOptions, ClaudeSDKClient
|
|
8
|
+
from clawd_code_sdk.models.control import SDKControlApplyFlagSettingsRequest
|
|
9
|
+
from clawd_code_sdk.models.settings import ClaudeCodeSettings
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class _RecordingQuery:
|
|
13
|
+
def __init__(self) -> None:
|
|
14
|
+
self.requests: list[Any] = []
|
|
15
|
+
|
|
16
|
+
async def _send_control_request(self, request: Any) -> dict[str, Any]:
|
|
17
|
+
self.requests.append(request)
|
|
18
|
+
return {}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
async def test_only_set_fields_are_sent() -> None:
|
|
22
|
+
client = ClaudeSDKClient(ClaudeAgentOptions())
|
|
23
|
+
query = _RecordingQuery()
|
|
24
|
+
client._query = cast(Any, query)
|
|
25
|
+
|
|
26
|
+
await client.apply_flag_settings(ClaudeCodeSettings(effort_level="low"))
|
|
27
|
+
|
|
28
|
+
assert query.requests == [SDKControlApplyFlagSettingsRequest(settings={"effortLevel": "low"})]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/sdk_mcp_bridge.py
RENAMED
|
File without changes
|
{clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/session_mutations.py
RENAMED
|
File without changes
|
|
File without changes
|
{clawd_code_sdk-1.2.5 → clawd_code_sdk-1.2.6}/src/clawd_code_sdk/_internal/transport/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|