clawd-code-sdk 1.1.5__tar.gz → 1.1.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.1.5 → clawd_code_sdk-1.1.6}/PKG-INFO +1 -1
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/pyproject.toml +1 -1
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/session_mutations.py +22 -53
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/client.py +8 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/control.py +19 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/hooks.py +26 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/options.py +3 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/settings.py +12 -2
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/.gitignore +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/LICENSE +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/README.md +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_bundled/.gitignore +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_errors.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/query.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/sessions.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/transport/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/transport/subprocess_cli.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/transport/subprocess_utils.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_version.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/anthropic_stream.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/instrumentation.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/list_sessions.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/mcp_utils.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/agents.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/anthropic_types.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/base.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/content_blocks.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/context_usage.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/input_types.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/mcp.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/messages.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/output_types.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/permissions.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/prompt_requests.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/prompts.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/server_info.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/session.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/system_messages.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/thinking.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/models/usage.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/py.typed +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/session.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/storage/ARCHITECTURE.md +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/storage/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/storage/helpers.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/storage/models.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/storage/replay.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/usage.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/conftest.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/__init__.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_agents_and_settings.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_dynamic_control.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_hook_events.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_hooks.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_include_partial_messages.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_mcp_resources.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_mcp_tools.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_sdk_mcp_resources.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_sdk_mcp_tools.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_slash_commands.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_stderr_callback.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_storage_parsing.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_structured_output.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_subagent_invocation.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/e2e/test_tool_permissions.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/mcp_server.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/mock_claude_server.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_changelog.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_client.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_errors.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_image.png +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_integration.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_message_parser.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_sdk_mcp_integration.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_session.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_session_mutations.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_sessions.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_streaming_client.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_subprocess_buffering.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/tests/test_tool_callbacks.py +0 -0
- {clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/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.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
|
{clawd_code_sdk-1.1.5 → clawd_code_sdk-1.1.6}/src/clawd_code_sdk/_internal/session_mutations.py
RENAMED
|
@@ -52,11 +52,7 @@ if TYPE_CHECKING:
|
|
|
52
52
|
# ---------------------------------------------------------------------------
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
def rename_session(
|
|
56
|
-
session_id: str,
|
|
57
|
-
title: str,
|
|
58
|
-
directory: str | None = None,
|
|
59
|
-
) -> None:
|
|
55
|
+
def rename_session(session_id: str, title: str, directory: str | None = None) -> None:
|
|
60
56
|
"""Rename a session by appending a custom-title entry.
|
|
61
57
|
|
|
62
58
|
``list_sessions`` reads the LAST custom-title from the file tail, so
|
|
@@ -429,10 +425,7 @@ def fork_session(
|
|
|
429
425
|
# ---------------------------------------------------------------------------
|
|
430
426
|
|
|
431
427
|
|
|
432
|
-
def _find_session_file(
|
|
433
|
-
session_id: str,
|
|
434
|
-
directory: str | None,
|
|
435
|
-
) -> Path | None:
|
|
428
|
+
def _find_session_file(session_id: str, directory: str | None) -> Path | None:
|
|
436
429
|
"""Find the path to a session's JSONL file.
|
|
437
430
|
|
|
438
431
|
Returns the path if found, None otherwise.
|
|
@@ -441,10 +434,7 @@ def _find_session_file(
|
|
|
441
434
|
return result[0] if result else None
|
|
442
435
|
|
|
443
436
|
|
|
444
|
-
def _find_session_file_with_dir(
|
|
445
|
-
session_id: str,
|
|
446
|
-
directory: str | None,
|
|
447
|
-
) -> tuple[Path, Path] | None:
|
|
437
|
+
def _find_session_file_with_dir(session_id: str, directory: str | None) -> tuple[Path, Path] | None:
|
|
448
438
|
"""Find a session file and its containing project directory.
|
|
449
439
|
|
|
450
440
|
Returns ``(file_path, project_dir)`` or None. The fork operation
|
|
@@ -455,8 +445,7 @@ def _find_session_file_with_dir(
|
|
|
455
445
|
def _try_dir(project_dir: Path) -> tuple[Path, Path] | None:
|
|
456
446
|
path = project_dir / file_name
|
|
457
447
|
try:
|
|
458
|
-
|
|
459
|
-
if st.st_size > 0:
|
|
448
|
+
if path.stat().st_size > 0:
|
|
460
449
|
return (path, project_dir)
|
|
461
450
|
except OSError:
|
|
462
451
|
pass
|
|
@@ -464,20 +453,13 @@ def _find_session_file_with_dir(
|
|
|
464
453
|
|
|
465
454
|
if directory:
|
|
466
455
|
canonical = _canonicalize_path(directory)
|
|
467
|
-
project_dir
|
|
468
|
-
|
|
469
|
-
result = _try_dir(project_dir)
|
|
470
|
-
if result:
|
|
471
|
-
return result
|
|
472
|
-
|
|
456
|
+
if (project_dir := _find_project_dir(canonical)) and (result := _try_dir(project_dir)):
|
|
457
|
+
return result
|
|
473
458
|
for wt in _get_worktree_paths(canonical):
|
|
474
459
|
if wt == canonical:
|
|
475
460
|
continue
|
|
476
|
-
wt_project_dir
|
|
477
|
-
|
|
478
|
-
result = _try_dir(wt_project_dir)
|
|
479
|
-
if result:
|
|
480
|
-
return result
|
|
461
|
+
if (wt_project_dir := _find_project_dir(wt)) and (result := _try_dir(wt_project_dir)):
|
|
462
|
+
return result
|
|
481
463
|
return None
|
|
482
464
|
|
|
483
465
|
projects_dir = _get_projects_dir()
|
|
@@ -486,8 +468,7 @@ def _find_session_file_with_dir(
|
|
|
486
468
|
except OSError:
|
|
487
469
|
return None
|
|
488
470
|
for entry in dirents:
|
|
489
|
-
result
|
|
490
|
-
if result:
|
|
471
|
+
if result := _try_dir(entry):
|
|
491
472
|
return result
|
|
492
473
|
return None
|
|
493
474
|
|
|
@@ -514,22 +495,16 @@ def _parse_fork_transcript(
|
|
|
514
495
|
entry = anyenv.load_json(stripped, return_type=dict)
|
|
515
496
|
except (anyenv.JsonLoadError, ValueError):
|
|
516
497
|
continue
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
entry_type == "content-replacement"
|
|
528
|
-
and entry.get("sessionId") == session_id
|
|
529
|
-
and isinstance(entry.get("replacements"), list)
|
|
530
|
-
):
|
|
531
|
-
content_replacements.extend(entry["replacements"])
|
|
532
|
-
|
|
498
|
+
match entry:
|
|
499
|
+
case {
|
|
500
|
+
"type": "user" | "assistant" | "attachment" | "system" | "progress",
|
|
501
|
+
"uuid": str(),
|
|
502
|
+
}:
|
|
503
|
+
transcript.append(entry)
|
|
504
|
+
case {"type": "content-replacement", "sessionId": str(sid), "replacements": list()} if (
|
|
505
|
+
sid == session_id
|
|
506
|
+
):
|
|
507
|
+
content_replacements.extend(entry["replacements"])
|
|
533
508
|
return transcript, content_replacements
|
|
534
509
|
|
|
535
510
|
|
|
@@ -545,23 +520,17 @@ def _append_to_session(session_id: str, data: str, directory: str | None) -> Non
|
|
|
545
520
|
if directory:
|
|
546
521
|
canonical = _canonicalize_path(directory)
|
|
547
522
|
# Try the exact/prefix-matched project directory first.
|
|
548
|
-
|
|
549
|
-
if project_dir is not None and _try_append(project_dir / file_name, data):
|
|
523
|
+
if (proj_dir := _find_project_dir(canonical)) and _try_append(proj_dir / file_name, data):
|
|
550
524
|
return
|
|
551
|
-
|
|
552
525
|
# Worktree fallback — matches list_sessions/get_session_messages.
|
|
553
526
|
# Sessions may live under a different worktree root.
|
|
554
527
|
for wt in _get_worktree_paths(canonical):
|
|
555
528
|
if wt == canonical:
|
|
556
529
|
continue # already tried above
|
|
557
|
-
|
|
558
|
-
if wt_project_dir is not None and _try_append(wt_project_dir / file_name, data):
|
|
530
|
+
if (proj_dir := _find_project_dir(wt)) and _try_append(proj_dir / file_name, data):
|
|
559
531
|
return
|
|
560
532
|
|
|
561
|
-
raise FileNotFoundError(
|
|
562
|
-
f"Session {session_id} not found in project directory for {directory}"
|
|
563
|
-
)
|
|
564
|
-
|
|
533
|
+
raise FileNotFoundError(f"{session_id=} not found in project {directory=}")
|
|
565
534
|
# No directory — search all project directories by trying each directly.
|
|
566
535
|
projects_dir = _get_projects_dir()
|
|
567
536
|
try:
|
|
@@ -208,6 +208,7 @@ class ClaudeSDKClient:
|
|
|
208
208
|
agent_progress_summaries=options.agent_progress_summaries,
|
|
209
209
|
title=title,
|
|
210
210
|
skills=options.skills,
|
|
211
|
+
plan_mode_instructions=options.plan_mode_instructions,
|
|
211
212
|
)
|
|
212
213
|
response = await query._send_control_request(request, timeout=initialize_timeout)
|
|
213
214
|
self._initialization_result = ClaudeCodeServerInfo.model_validate(response)
|
|
@@ -475,6 +476,13 @@ class ClaudeSDKClient:
|
|
|
475
476
|
result = await query._send_control_request(request)
|
|
476
477
|
return SDKControlGetContextUsageResponse.model_validate(result)
|
|
477
478
|
|
|
479
|
+
# async def get_session_cost(self) -> SDKControlGetSessionCostResponse:
|
|
480
|
+
# """Get the formatted session cost summary (the same text as /usage)."""
|
|
481
|
+
# query = self._ensure_connected()
|
|
482
|
+
# request = SDKControlGetSessionCostRequest()
|
|
483
|
+
# result = await query._send_control_request(request)
|
|
484
|
+
# return SDKControlGetSessionCostResponse.model_validate(result)
|
|
485
|
+
|
|
478
486
|
async def mcp_authenticate(self, server_name: str) -> McpAuthenticateResponse:
|
|
479
487
|
"""Trigger OAuth authentication for an MCP server.
|
|
480
488
|
|
|
@@ -123,6 +123,11 @@ class SDKControlInitializeRequest(_ControlBase):
|
|
|
123
123
|
exact name, plugin-qualified name, or ":name" suffix.
|
|
124
124
|
Omit to load every discovered skill.
|
|
125
125
|
Applies to the main session only; subagents use AgentDefinition.skills."""
|
|
126
|
+
plan_mode_instructions: str | None = Field(
|
|
127
|
+
default=None,
|
|
128
|
+
serialization_alias="planModeInstructions",
|
|
129
|
+
)
|
|
130
|
+
"""Custom workflow body for the plan-mode system reminder."""
|
|
126
131
|
|
|
127
132
|
|
|
128
133
|
class SDKControlSetPermissionModeRequest(_ControlBase):
|
|
@@ -496,6 +501,12 @@ class SDKControlGetContextUsageRequest(_ControlBase):
|
|
|
496
501
|
subtype: Literal["get_context_usage"] = "get_context_usage"
|
|
497
502
|
|
|
498
503
|
|
|
504
|
+
class SDKControlGetSessionCostRequest(_ControlBase):
|
|
505
|
+
"""Requests the formatted session cost summary (the same text as /usage)."""
|
|
506
|
+
|
|
507
|
+
subtype: Literal["get_session_cost"] = "get_session_cost"
|
|
508
|
+
|
|
509
|
+
|
|
499
510
|
class SDKControlGetSettingsRequest(_ControlBase):
|
|
500
511
|
"""Returns the effective merged settings and the raw per-source settings."""
|
|
501
512
|
|
|
@@ -508,6 +519,13 @@ class SDKControlSetProactiveRequest(_ControlBase):
|
|
|
508
519
|
subtype: Literal["set_proactive"] = "set_proactive"
|
|
509
520
|
|
|
510
521
|
|
|
522
|
+
class SDKControlSetColorRequest(_ControlBase):
|
|
523
|
+
"""Sets the session accent color. Accepts an agent color name or "default" to reset."""
|
|
524
|
+
|
|
525
|
+
subtype: Literal["set_color"] = "set_color"
|
|
526
|
+
color: str
|
|
527
|
+
|
|
528
|
+
|
|
511
529
|
class SDKControlClaudeOAuthWaitForCompletionRequest(_ControlBase):
|
|
512
530
|
"""Waits for an in-progress Claude OAuth flow to complete.
|
|
513
531
|
|
|
@@ -622,6 +640,7 @@ OutgoingControlRequest = Annotated[
|
|
|
622
640
|
| SDKControlStopTaskRequest
|
|
623
641
|
| SDKControlApplyFlagSettingsRequest
|
|
624
642
|
| SDKControlGetContextUsageRequest
|
|
643
|
+
| SDKControlGetSessionCostRequest
|
|
625
644
|
| SDKControlGetSettingsRequest
|
|
626
645
|
| SDKControlRewindFilesRequest
|
|
627
646
|
| SDKControlCancelAsyncMessageRequest
|
|
@@ -22,6 +22,7 @@ HookEvent = Literal[
|
|
|
22
22
|
"PreToolUse",
|
|
23
23
|
"PostToolUse",
|
|
24
24
|
"PostToolUseFailure",
|
|
25
|
+
"PostToolBatch",
|
|
25
26
|
"UserPromptSubmit",
|
|
26
27
|
"Stop",
|
|
27
28
|
"StopFailure",
|
|
@@ -188,6 +189,22 @@ class PostToolUseFailureHookInput(BaseHookInput):
|
|
|
188
189
|
agent_type: NotRequired[str]
|
|
189
190
|
|
|
190
191
|
|
|
192
|
+
class PostToolBatchToolCall(BaseModel):
|
|
193
|
+
"""Represents a tool call in a PostToolBatch hook event."""
|
|
194
|
+
|
|
195
|
+
tool_name: str
|
|
196
|
+
tool_input: dict[str, Any]
|
|
197
|
+
tool_use_id: str
|
|
198
|
+
tool_response: Any = None
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class PostToolBatchHookInput(BaseHookInput):
|
|
202
|
+
"""Input data for PostToolBatch hook events."""
|
|
203
|
+
|
|
204
|
+
hook_event_name: Literal["PostToolBatch"]
|
|
205
|
+
tool_calls: list[PostToolBatchToolCall]
|
|
206
|
+
|
|
207
|
+
|
|
191
208
|
class UserPromptSubmitHookInput(BaseHookInput):
|
|
192
209
|
"""Input data for UserPromptSubmit hook events."""
|
|
193
210
|
|
|
@@ -420,6 +437,7 @@ HookInput = (
|
|
|
420
437
|
PreToolUseHookInput
|
|
421
438
|
| PostToolUseHookInput
|
|
422
439
|
| PostToolUseFailureHookInput
|
|
440
|
+
| PostToolBatchHookInput
|
|
423
441
|
| UserPromptSubmitHookInput
|
|
424
442
|
| StopHookInput
|
|
425
443
|
| StopFailureHookInput
|
|
@@ -474,6 +492,13 @@ class PostToolUseFailureHookSpecificOutput(TypedDict):
|
|
|
474
492
|
additionalContext: NotRequired[str]
|
|
475
493
|
|
|
476
494
|
|
|
495
|
+
class PostToolBatchHookSpecificOutput(TypedDict):
|
|
496
|
+
"""Hook-specific output for PostToolBatch events."""
|
|
497
|
+
|
|
498
|
+
hookEventName: Literal["PostToolBatch"]
|
|
499
|
+
additionalContext: NotRequired[str]
|
|
500
|
+
|
|
501
|
+
|
|
477
502
|
class UserPromptSubmitHookSpecificOutput(TypedDict):
|
|
478
503
|
"""Hook-specific output for UserPromptSubmit events."""
|
|
479
504
|
|
|
@@ -567,6 +592,7 @@ HookSpecificOutput = (
|
|
|
567
592
|
PreToolUseHookSpecificOutput
|
|
568
593
|
| PostToolUseHookSpecificOutput
|
|
569
594
|
| PostToolUseFailureHookSpecificOutput
|
|
595
|
+
| PostToolBatchHookSpecificOutput
|
|
570
596
|
| PermissionDeniedHookSpecificOutput
|
|
571
597
|
| UserPromptSubmitHookSpecificOutput
|
|
572
598
|
| SessionStartHookSpecificOutput
|
|
@@ -271,11 +271,14 @@ class ClaudeAgentOptions:
|
|
|
271
271
|
include_builtin_system_prompt: bool = True
|
|
272
272
|
"""Whether to include Claude Code's builtin system prompt.
|
|
273
273
|
|
|
274
|
+
|
|
274
275
|
When True (default) and system_prompt is set, it is appended to the
|
|
275
276
|
builtin system prompt. When False, the system_prompt replaces it entirely.
|
|
276
277
|
"""
|
|
277
278
|
exclude_dynamic_sections: bool | None = None
|
|
278
279
|
"""Whether to exclude dynamic sections from the system prompt."""
|
|
280
|
+
plan_mode_instructions: str | None = None
|
|
281
|
+
"""Custom workflow body for the plan-mode system reminder."""
|
|
279
282
|
|
|
280
283
|
hooks: dict[HookEvent, list[HookMatcher]] | None = None
|
|
281
284
|
"""Hook configurations."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: claude-code-settings-titled.json
|
|
3
|
-
# timestamp: 2026-04-
|
|
3
|
+
# timestamp: 2026-04-23T20:01:58+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -283,6 +283,14 @@ class ExtraKnownMarketplaces(ClaudeCodeBaseModel):
|
|
|
283
283
|
"""
|
|
284
284
|
Local cache path where marketplace manifest is stored (auto-generated if not provided)
|
|
285
285
|
"""
|
|
286
|
+
auto_update: bool | None = Field(None, alias="autoUpdate")
|
|
287
|
+
"""
|
|
288
|
+
Whether to automatically update this marketplace on Claude Code startup. Written automatically by Claude Code when you toggle auto-update for a marketplace
|
|
289
|
+
"""
|
|
290
|
+
last_updated: str | None = Field(None, alias="lastUpdated")
|
|
291
|
+
"""
|
|
292
|
+
ISO 8601 timestamp of the last marketplace refresh. Written automatically by Claude Code
|
|
293
|
+
"""
|
|
286
294
|
|
|
287
295
|
|
|
288
296
|
class StrictMarketplaceHostPattern(ClaudeCodeBaseModel):
|
|
@@ -1217,7 +1225,9 @@ class ClaudeCodeSettings(ClaudeCodeBaseModel):
|
|
|
1217
1225
|
"""
|
|
1218
1226
|
Map Anthropic model IDs to provider-specific model IDs such as Bedrock inference profile ARNs, Vertex AI version names, or Foundry deployment names. Each model picker entry uses its mapped value when calling the provider API. Unknown keys are ignored. See https://code.claude.com/docs/en/model-config#override-model-ids-per-version
|
|
1219
1227
|
"""
|
|
1220
|
-
effort_level: Literal["low", "medium", "high"] | None = Field(
|
|
1228
|
+
effort_level: Literal["low", "medium", "high", "xhigh"] | None = Field(
|
|
1229
|
+
None, alias="effortLevel"
|
|
1230
|
+
)
|
|
1221
1231
|
"""
|
|
1222
1232
|
Control Opus 4.6 adaptive reasoning effort. Lower effort is faster and cheaper for straightforward tasks, higher effort provides deeper reasoning. Defaults vary by model and plan (Opus 4.6 defaults to medium for Max and Team subscribers). Use /effort auto to reset to model default. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level
|
|
1223
1233
|
"""
|
|
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.1.5 → clawd_code_sdk-1.1.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
|