Skip to content

Export remaining Literal type aliases#996

Open
joaopedroassad wants to merge 1 commit into
anthropics:mainfrom
joaopedroassad:export-literal-type-aliases
Open

Export remaining Literal type aliases#996
joaopedroassad wants to merge 1 commit into
anthropics:mainfrom
joaopedroassad:export-literal-type-aliases

Conversation

@joaopedroassad
Copy link
Copy Markdown

Summary

  • Export AssistantMessageError — the Literal union used on AssistantMessage.error.
  • Export PermissionBehavior — the Literal union used on PermissionUpdate.behavior.
  • Export PermissionUpdateDestination — the Literal union used on PermissionUpdate.destination.
  • Export ThinkingDisplay — the Literal union used on ThinkingConfigAdaptive.display and ThinkingConfigEnabled.display.

All four aliases are already used as field types on publicly-exported classes, but downstream SDK wrappers that want to type-annotate variables with these unions currently have to import from the private claude_agent_sdk.types module. Same shape as #951 (EffortLevel).

Testing

  • .venv/bin/python -m pytest tests/test_types.py -q
  • .venv/bin/python -m ruff check src/claude_agent_sdk/__init__.py tests/test_types.py
  • .venv/bin/python -m ruff format --check src/claude_agent_sdk/__init__.py tests/test_types.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant