clawd-code-sdk 0.6.3__tar.gz → 0.6.4__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-0.6.3 → clawd_code_sdk-0.6.4}/PKG-INFO +1 -1
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/pyproject.toml +1 -1
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_internal/transport/subprocess_cli.py +6 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/list_sessions.py +8 -12
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/settings.py +1 -1
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/system_messages.py +1 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/.gitignore +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/LICENSE +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/README.md +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_bundled/.gitignore +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_errors.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_internal/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_internal/message_parser.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_internal/query.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_internal/transport/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_version.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/anthropic_types.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/client.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/mcp_utils.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/agents.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/base.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/content_blocks.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/control.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/hooks.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/input_types.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/mcp.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/messages.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/options.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/output_types.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/permissions.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/prompt_requests.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/prompts.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/server_info.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/models/thinking.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/py.typed +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/query.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/session.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/storage/ARCHITECTURE.md +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/storage/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/storage/helpers.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/storage/models.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/storage/replay.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/usage.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/conftest.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/__init__.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_agents_and_settings.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_dynamic_control.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_hook_events.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_hooks.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_include_partial_messages.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_mcp_tools.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_sdk_mcp_tools.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_slash_commands.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_stderr_callback.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_structured_output.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_subagent_invocation.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/e2e/test_tool_permissions.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/mcp_server.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/mock_claude_server.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_changelog.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_client.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_errors.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_image.png +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_integration.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_message_parser.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_sdk_mcp_integration.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_session.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_streaming_client.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_subprocess_buffering.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_tool_callbacks.py +0 -0
- {clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/tests/test_transport.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clawd-code-sdk
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
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
|
|
@@ -255,6 +255,12 @@ class SubprocessCLITransport(Transport):
|
|
|
255
255
|
if self._options.enable_agent_teams:
|
|
256
256
|
process_env["CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS"] = "1"
|
|
257
257
|
|
|
258
|
+
# Enable fine-grained tool streaming. --include-partial-messages emits
|
|
259
|
+
# stream_event messages, but tool input parameters are still buffered
|
|
260
|
+
# by the API unless eager_input_streaming is also enabled at the
|
|
261
|
+
# per-tool level via this env var.
|
|
262
|
+
process_env.setdefault("CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING", "1")
|
|
263
|
+
|
|
258
264
|
if self._cwd:
|
|
259
265
|
process_env["PWD"] = self._cwd
|
|
260
266
|
|
|
@@ -97,12 +97,13 @@ def _extract_session_metadata(
|
|
|
97
97
|
try:
|
|
98
98
|
entry = anyenv.load_json(line, return_type=dict)
|
|
99
99
|
msg = entry.get("message")
|
|
100
|
-
if
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
if (
|
|
101
|
+
isinstance(msg, dict)
|
|
102
|
+
and (content := msg.get("content"))
|
|
103
|
+
and isinstance(content, str)
|
|
104
|
+
and (first_line := content.split("\n")[0].strip())
|
|
105
|
+
):
|
|
106
|
+
first_prompt = first_line
|
|
106
107
|
except anyenv.JsonLoadError:
|
|
107
108
|
pass
|
|
108
109
|
|
|
@@ -134,14 +135,11 @@ def _build_session_info(session_path: Path, project_cwd: str | None) -> SDKSessi
|
|
|
134
135
|
session_id = session_path.stem
|
|
135
136
|
last_modified = int(stat.st_mtime * 1000) # milliseconds since epoch
|
|
136
137
|
file_size = stat.st_size
|
|
137
|
-
|
|
138
138
|
custom_title, first_prompt = _extract_session_metadata(session_path)
|
|
139
|
-
|
|
140
139
|
# Get git branch from the tail of the file.
|
|
141
140
|
# The raw JSONL uses camelCase ("gitBranch") per ClaudeCodeBaseModel alias config.
|
|
142
141
|
# Not all entry types carry gitBranch, so we scan backward until we find one.
|
|
143
142
|
git_branch = _read_git_branch_from_tail(session_path)
|
|
144
|
-
|
|
145
143
|
# Build display summary: prefer custom title, then first prompt, then session ID
|
|
146
144
|
summary = custom_title or first_prompt or session_id
|
|
147
145
|
|
|
@@ -231,13 +229,11 @@ def list_sessions(options: ListSessionsOptions | None = None) -> list[SDKSession
|
|
|
231
229
|
# Build session info for each file
|
|
232
230
|
sessions: list[SDKSessionInfo] = []
|
|
233
231
|
for session_path, cwd in session_files:
|
|
234
|
-
info
|
|
235
|
-
if info is not None:
|
|
232
|
+
if info := _build_session_info(session_path, cwd):
|
|
236
233
|
sessions.append(info)
|
|
237
234
|
|
|
238
235
|
# Sort by last_modified descending (newest first)
|
|
239
236
|
sessions.sort(key=lambda s: s.last_modified, reverse=True)
|
|
240
|
-
|
|
241
237
|
# Apply limit
|
|
242
238
|
if limit is not None and limit > 0:
|
|
243
239
|
sessions = sessions[:limit]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/src/clawd_code_sdk/_internal/message_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{clawd_code_sdk-0.6.3 → clawd_code_sdk-0.6.4}/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
|