diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_config.py new file mode 100644 index 0000000000000000000000000000000000000000..cc7b95c80433aa390a755bdf47e909a7e523aed0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaBrowserWaitConfig"] + + +class BetaBrowserWaitConfig(BaseModel): + """``wait``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..77b3c27b4017bed36f06d1f30b5e33615bb09df5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaBrowserWaitConfigParam"] + + +class BetaBrowserWaitConfigParam(TypedDict, total=False): + """``wait``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_input.py new file mode 100644 index 0000000000000000000000000000000000000000..83f39265d090fddae9f831b86fa4f0dd681cc35e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_input.py @@ -0,0 +1,15 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaBrowserWaitInput"] + + +class BetaBrowserWaitInput(BaseModel): + """Pause for the given duration.""" + + duration: float + """Seconds to wait (maximum 30).""" + + tab_id: Optional[str] = None + """Tab to act on. Defaults to the active tab when omitted.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..761844258fb779da0b5776b2eca4a68bf42be1a1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_wait_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_browser_wait_input import BetaBrowserWaitInput + +__all__ = ["BetaBrowserWaitToolUseBlock"] + + +class BetaBrowserWaitToolUseBlock(BaseModel): + id: str + + input: BetaBrowserWaitInput + """Pause for the given duration.""" + + name: Literal["wait"] + + toolset_name: Literal["browser"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_config.py new file mode 100644 index 0000000000000000000000000000000000000000..8aef34dda4a06841b4eac929180220a5b6680390 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaBrowserZoomConfig"] + + +class BetaBrowserZoomConfig(BaseModel): + """``zoom``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..8ce4a36cca5749c5b9386b5c219ae017ae155b0b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaBrowserZoomConfigParam"] + + +class BetaBrowserZoomConfigParam(TypedDict, total=False): + """``zoom``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_input.py new file mode 100644 index 0000000000000000000000000000000000000000..824ff6685f9484b169dd5e68e9de94e7831a3023 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_input.py @@ -0,0 +1,19 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaBrowserZoomInput"] + + +class BetaBrowserZoomInput(BaseModel): + """ + Return a cropped screenshot of the given viewport region, scaled up for closer + inspection — useful for small icons, buttons, or text. Coordinates are in the + same viewport-pixel space as a full screenshot. + """ + + region: List[int] + """[x0, y0, x1, y1] in viewport pixels.""" + + tab_id: Optional[str] = None + """Tab to act on. Defaults to the active tab when omitted.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..b73962b3e5341e708f7bc6a9663c651212d94993 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_browser_zoom_tool_use_block.py @@ -0,0 +1,31 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_browser_zoom_input import BetaBrowserZoomInput + +__all__ = ["BetaBrowserZoomToolUseBlock"] + + +class BetaBrowserZoomToolUseBlock(BaseModel): + id: str + + input: BetaBrowserZoomInput + """ + Return a cropped screenshot of the given viewport region, scaled up for closer + inspection — useful for small icons, buttons, or text. Coordinates are in the + same viewport-pixel space as a full screenshot. + """ + + name: Literal["zoom"] + + toolset_name: Literal["browser"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_control_ephemeral.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_control_ephemeral.py new file mode 100644 index 0000000000000000000000000000000000000000..cde9ce9c1bf45561ddadb8e65c8beea16ce6fe78 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_control_ephemeral.py @@ -0,0 +1,23 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheControlEphemeral"] + + +class BetaCacheControlEphemeral(BaseModel): + type: Literal["ephemeral"] + + ttl: Optional[Literal["5m", "1h"]] = None + """The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See + [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) + for details. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_control_ephemeral_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_control_ephemeral_param.py new file mode 100644 index 0000000000000000000000000000000000000000..5b778d84702cd141af5899bf6e1d730d22c70513 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_control_ephemeral_param.py @@ -0,0 +1,22 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCacheControlEphemeralParam"] + + +class BetaCacheControlEphemeralParam(TypedDict, total=False): + type: Required[Literal["ephemeral"]] + + ttl: Literal["5m", "1h"] + """The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See + [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) + for details. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_creation.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_creation.py new file mode 100644 index 0000000000000000000000000000000000000000..a78536a3e93ecbb637a453d2dee98279a8d63384 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_creation.py @@ -0,0 +1,11 @@ +from ..._models import BaseModel + +__all__ = ["BetaCacheCreation"] + + +class BetaCacheCreation(BaseModel): + ephemeral_1h_input_tokens: int + """The number of input tokens used to create the 1 hour cache entry.""" + + ephemeral_5m_input_tokens: int + """The number of input tokens used to create the 5 minute cache entry.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_messages_changed.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_messages_changed.py new file mode 100644 index 0000000000000000000000000000000000000000..160bd73aec22291710864a8c27997cb5e253d242 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_messages_changed.py @@ -0,0 +1,21 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheMissMessagesChanged"] + + +class BetaCacheMissMessagesChanged(BaseModel): + """ + A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match. + + See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + """ + + cache_missed_input_tokens: int + """ + Approximate number of input tokens that would have been read from cache had the + prefix matched the previous request. + """ + + type: Literal["messages_changed"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_model_changed.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_model_changed.py new file mode 100644 index 0000000000000000000000000000000000000000..bbc44999a6b8a0f235d22a787b04d3a5bc0c6c29 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_model_changed.py @@ -0,0 +1,21 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheMissModelChanged"] + + +class BetaCacheMissModelChanged(BaseModel): + """ + A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's. + + See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + """ + + cache_missed_input_tokens: int + """ + Approximate number of input tokens that would have been read from cache had the + prefix matched the previous request. + """ + + type: Literal["model_changed"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_previous_message_not_found.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_previous_message_not_found.py new file mode 100644 index 0000000000000000000000000000000000000000..e4bf23475a636658a13697fa274d80eeecee4cfb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_previous_message_not_found.py @@ -0,0 +1,17 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheMissPreviousMessageNotFound"] + + +class BetaCacheMissPreviousMessageNotFound(BaseModel): + """ + A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references. + + This doesn't mean that this request changed. + + See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + """ + + type: Literal["previous_message_not_found"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_reason.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_reason.py new file mode 100644 index 0000000000000000000000000000000000000000..ba4feb28cf707f948c3ab427c626a3fa13d2cb02 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_reason.py @@ -0,0 +1,24 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_cache_miss_unavailable import BetaCacheMissUnavailable +from .beta_cache_miss_model_changed import BetaCacheMissModelChanged +from .beta_cache_miss_tools_changed import BetaCacheMissToolsChanged +from .beta_cache_miss_system_changed import BetaCacheMissSystemChanged +from .beta_cache_miss_messages_changed import BetaCacheMissMessagesChanged +from .beta_cache_miss_previous_message_not_found import BetaCacheMissPreviousMessageNotFound + +__all__ = ["BetaCacheMissReason"] + +BetaCacheMissReason: TypeAlias = Annotated[ + Union[ + BetaCacheMissModelChanged, + BetaCacheMissSystemChanged, + BetaCacheMissToolsChanged, + BetaCacheMissMessagesChanged, + BetaCacheMissPreviousMessageNotFound, + BetaCacheMissUnavailable, + ], + UnionDiscriminator("type"), +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_system_changed.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_system_changed.py new file mode 100644 index 0000000000000000000000000000000000000000..02bebc6f47483057f90dc320d37ab68575980f51 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_system_changed.py @@ -0,0 +1,21 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheMissSystemChanged"] + + +class BetaCacheMissSystemChanged(BaseModel): + """ + A `cache_miss_reason` for a request whose `system` differs from the previous request's. + + See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + """ + + cache_missed_input_tokens: int + """ + Approximate number of input tokens that would have been read from cache had the + prefix matched the previous request. + """ + + type: Literal["system_changed"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_tools_changed.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_tools_changed.py new file mode 100644 index 0000000000000000000000000000000000000000..f4a5c400b0f7286638cd341ee14045a952f0fb88 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_tools_changed.py @@ -0,0 +1,21 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheMissToolsChanged"] + + +class BetaCacheMissToolsChanged(BaseModel): + """ + A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered. + + See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + """ + + cache_missed_input_tokens: int + """ + Approximate number of input tokens that would have been read from cache had the + prefix matched the previous request. + """ + + type: Literal["tools_changed"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_unavailable.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_unavailable.py new file mode 100644 index 0000000000000000000000000000000000000000..ca72891077ace5004077ce791ba082e6877befe5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cache_miss_unavailable.py @@ -0,0 +1,18 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCacheMissUnavailable"] + + +class BetaCacheMissUnavailable(BaseModel): + """A `cache_miss_reason` for when the API can't give a diagnosis. + + The request itself was processed normally. + + This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ. + + See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + """ + + type: Literal["unavailable"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_capability_support.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_capability_support.py new file mode 100644 index 0000000000000000000000000000000000000000..783ba7fe6d26351dd560fac506330b9648a8fbd2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_capability_support.py @@ -0,0 +1,10 @@ +from ..._models import BaseModel + +__all__ = ["BetaCapabilitySupport"] + + +class BetaCapabilitySupport(BaseModel): + """Indicates whether a capability is supported.""" + + supported: bool + """Whether this capability is supported by the model.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_char_location.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_char_location.py new file mode 100644 index 0000000000000000000000000000000000000000..e9e7d89b4d23c63237bc1b22fe0490b7be72cb51 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_char_location.py @@ -0,0 +1,22 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCitationCharLocation"] + + +class BetaCitationCharLocation(BaseModel): + cited_text: str + + document_index: int + + document_title: Optional[str] = None + + end_char_index: int + + file_id: Optional[str] = None + + start_char_index: int + + type: Literal["char_location"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_char_location_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_char_location_param.py new file mode 100644 index 0000000000000000000000000000000000000000..ac540f713940e7e4d0ea26a0f7881c2befef33dc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_char_location_param.py @@ -0,0 +1,20 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCitationCharLocationParam"] + + +class BetaCitationCharLocationParam(TypedDict, total=False): + cited_text: Required[str] + + document_index: Required[int] + + document_title: Required[Optional[str]] + + end_char_index: Required[int] + + start_char_index: Required[int] + + type: Required[Literal["char_location"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_config.py new file mode 100644 index 0000000000000000000000000000000000000000..89003a09870eb52b034ea914f40914ef789b98fa --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_config.py @@ -0,0 +1,7 @@ +from ..._models import BaseModel + +__all__ = ["BetaCitationConfig"] + + +class BetaCitationConfig(BaseModel): + enabled: bool diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_content_block_location.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_content_block_location.py new file mode 100644 index 0000000000000000000000000000000000000000..f92d2402c85788b0532d58d80ff480952b618348 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_content_block_location.py @@ -0,0 +1,37 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCitationContentBlockLocation"] + + +class BetaCitationContentBlockLocation(BaseModel): + cited_text: str + """The full text of the cited block range, concatenated. + + Always equals the contents of `content[start_block_index:end_block_index]` + joined together. The text block is the minimal citable unit; this field is never + a substring of a single block. Not counted toward output tokens, and not counted + toward input tokens when sent back in subsequent turns. + """ + + document_index: int + + document_title: Optional[str] = None + + end_block_index: int + """ + Exclusive 0-based end index of the cited block range in the source's `content` + array. + + Always greater than `start_block_index`; a single-block citation has + `end_block_index = start_block_index + 1`. + """ + + file_id: Optional[str] = None + + start_block_index: int + """0-based index of the first cited block in the source's `content` array.""" + + type: Literal["content_block_location"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_content_block_location_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_content_block_location_param.py new file mode 100644 index 0000000000000000000000000000000000000000..0dc0fc680e62e7e66090ac7c5acfaa5f82f6f2de --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_content_block_location_param.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCitationContentBlockLocationParam"] + + +class BetaCitationContentBlockLocationParam(TypedDict, total=False): + cited_text: Required[str] + """The full text of the cited block range, concatenated. + + Always equals the contents of `content[start_block_index:end_block_index]` + joined together. The text block is the minimal citable unit; this field is never + a substring of a single block. Not counted toward output tokens, and not counted + toward input tokens when sent back in subsequent turns. + """ + + document_index: Required[int] + + document_title: Required[Optional[str]] + + end_block_index: Required[int] + """ + Exclusive 0-based end index of the cited block range in the source's `content` + array. + + Always greater than `start_block_index`; a single-block citation has + `end_block_index = start_block_index + 1`. + """ + + start_block_index: Required[int] + """0-based index of the first cited block in the source's `content` array.""" + + type: Required[Literal["content_block_location"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_page_location.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_page_location.py new file mode 100644 index 0000000000000000000000000000000000000000..f061b3862e25cef8dda1b97a0ad21aa3b4ec8361 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_page_location.py @@ -0,0 +1,22 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCitationPageLocation"] + + +class BetaCitationPageLocation(BaseModel): + cited_text: str + + document_index: int + + document_title: Optional[str] = None + + end_page_number: int + + file_id: Optional[str] = None + + start_page_number: int + + type: Literal["page_location"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_page_location_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_page_location_param.py new file mode 100644 index 0000000000000000000000000000000000000000..93ac7f17ef3e8ec9284a7f4bc583b16c71e09ea7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_page_location_param.py @@ -0,0 +1,20 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCitationPageLocationParam"] + + +class BetaCitationPageLocationParam(TypedDict, total=False): + cited_text: Required[str] + + document_index: Required[int] + + document_title: Required[Optional[str]] + + end_page_number: Required[int] + + start_page_number: Required[int] + + type: Required[Literal["page_location"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_search_result_location.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_search_result_location.py new file mode 100644 index 0000000000000000000000000000000000000000..7d80484eb64680a1b330647a8a0dffb2b1528ac6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_search_result_location.py @@ -0,0 +1,45 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCitationSearchResultLocation"] + + +class BetaCitationSearchResultLocation(BaseModel): + cited_text: str + """The full text of the cited block range, concatenated. + + Always equals the contents of `content[start_block_index:end_block_index]` + joined together. The text block is the minimal citable unit; this field is never + a substring of a single block. Not counted toward output tokens, and not counted + toward input tokens when sent back in subsequent turns. + """ + + end_block_index: int + """ + Exclusive 0-based end index of the cited block range in the source's `content` + array. + + Always greater than `start_block_index`; a single-block citation has + `end_block_index = start_block_index + 1`. + """ + + search_result_index: int + """ + 0-based index of the cited search result among all `search_result` content + blocks in the request, in the order they appear across messages and tool + results. + + Counted separately from `document_index`; server-side web search results are not + included in this count. + """ + + source: str + + start_block_index: int + """0-based index of the first cited block in the source's `content` array.""" + + title: Optional[str] = None + + type: Literal["search_result_location"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_search_result_location_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_search_result_location_param.py new file mode 100644 index 0000000000000000000000000000000000000000..c49b63e7ca096ea46cb1dfb264d03242b6239dd2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_search_result_location_param.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCitationSearchResultLocationParam"] + + +class BetaCitationSearchResultLocationParam(TypedDict, total=False): + cited_text: Required[str] + """The full text of the cited block range, concatenated. + + Always equals the contents of `content[start_block_index:end_block_index]` + joined together. The text block is the minimal citable unit; this field is never + a substring of a single block. Not counted toward output tokens, and not counted + toward input tokens when sent back in subsequent turns. + """ + + end_block_index: Required[int] + """ + Exclusive 0-based end index of the cited block range in the source's `content` + array. + + Always greater than `start_block_index`; a single-block citation has + `end_block_index = start_block_index + 1`. + """ + + search_result_index: Required[int] + """ + 0-based index of the cited search result among all `search_result` content + blocks in the request, in the order they appear across messages and tool + results. + + Counted separately from `document_index`; server-side web search results are not + included in this count. + """ + + source: Required[str] + + start_block_index: Required[int] + """0-based index of the first cited block in the source's `content` array.""" + + title: Required[Optional[str]] + + type: Required[Literal["search_result_location"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_web_search_result_location_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_web_search_result_location_param.py new file mode 100644 index 0000000000000000000000000000000000000000..48e4df9a4664b26bc5b796c26679236cd4d6bca4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citation_web_search_result_location_param.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCitationWebSearchResultLocationParam"] + + +class BetaCitationWebSearchResultLocationParam(TypedDict, total=False): + cited_text: Required[str] + + encrypted_index: Required[str] + + title: Required[Optional[str]] + + type: Required[Literal["web_search_result_location"]] + + url: Required[str] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..dab7a1029fb15d596e3587619767e8053423f0b0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_config_param.py @@ -0,0 +1,9 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaCitationsConfigParam"] + + +class BetaCitationsConfigParam(BaseModel): + enabled: Optional[bool] = None diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_config_param_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_config_param_param.py new file mode 100644 index 0000000000000000000000000000000000000000..54159ffdc22b136b63b66f29cdf5977ae3323264 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_config_param_param.py @@ -0,0 +1,9 @@ +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["BetaCitationsConfigParamParam"] + + +class BetaCitationsConfigParamParam(TypedDict, total=False): + enabled: bool diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_delta.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_delta.py new file mode 100644 index 0000000000000000000000000000000000000000..932d52032385247333a229f907f90a57603744d3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_delta.py @@ -0,0 +1,28 @@ +from typing import Union +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_citation_char_location import BetaCitationCharLocation +from .beta_citation_page_location import BetaCitationPageLocation +from .beta_citation_content_block_location import BetaCitationContentBlockLocation +from .beta_citation_search_result_location import BetaCitationSearchResultLocation +from .beta_citations_web_search_result_location import BetaCitationsWebSearchResultLocation + +__all__ = ["BetaCitationsDelta", "Citation"] + +Citation: TypeAlias = Annotated[ + Union[ + BetaCitationCharLocation, + BetaCitationPageLocation, + BetaCitationContentBlockLocation, + BetaCitationsWebSearchResultLocation, + BetaCitationSearchResultLocation, + ], + UnionDiscriminator("type"), +] + + +class BetaCitationsDelta(BaseModel): + citation: Citation + + type: Literal["citations_delta"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_web_search_result_location.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_web_search_result_location.py new file mode 100644 index 0000000000000000000000000000000000000000..991c3fba4f832a53e11add82790467e6a61449a3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_citations_web_search_result_location.py @@ -0,0 +1,18 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCitationsWebSearchResultLocation"] + + +class BetaCitationsWebSearchResultLocation(BaseModel): + cited_text: str + + encrypted_index: str + + title: Optional[str] = None + + type: Literal["web_search_result_location"] + + url: str diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_thinking_20251015_edit_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_thinking_20251015_edit_param.py new file mode 100644 index 0000000000000000000000000000000000000000..19ab6f6796f634c8dcfbe352f790e4068e546aa5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_thinking_20251015_edit_param.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +from typing import Union +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from .beta_thinking_turns_param import BetaThinkingTurnsParam +from .beta_all_thinking_turns_param import BetaAllThinkingTurnsParam + +__all__ = ["BetaClearThinking20251015EditParam", "Keep"] + +Keep: TypeAlias = Union[BetaThinkingTurnsParam, BetaAllThinkingTurnsParam, Literal["all"]] + + +class BetaClearThinking20251015EditParam(TypedDict, total=False): + type: Required[Literal["clear_thinking_20251015"]] + + keep: Keep + """Number of most recent assistant turns to keep thinking blocks for. + + Older turns will have their thinking blocks removed. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_thinking_20251015_edit_response.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_thinking_20251015_edit_response.py new file mode 100644 index 0000000000000000000000000000000000000000..e2849bf69d849e8ea46549f993a8aad847084f87 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_thinking_20251015_edit_response.py @@ -0,0 +1,16 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaClearThinking20251015EditResponse"] + + +class BetaClearThinking20251015EditResponse(BaseModel): + cleared_input_tokens: int + """Number of input tokens cleared by this edit.""" + + cleared_thinking_turns: int + """Number of thinking turns that were cleared.""" + + type: Literal["clear_thinking_20251015"] + """The type of context management edit applied.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_tool_uses_20250919_edit_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_tool_uses_20250919_edit_param.py new file mode 100644 index 0000000000000000000000000000000000000000..0a38792b272a84d1ef24330a8ef0e77e1f52c8db --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_tool_uses_20250919_edit_param.py @@ -0,0 +1,36 @@ +from __future__ import annotations + +from typing import Union, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from ..._types import SequenceNotStr +from .beta_tool_uses_keep_param import BetaToolUsesKeepParam +from .beta_tool_uses_trigger_param import BetaToolUsesTriggerParam +from .beta_input_tokens_trigger_param import BetaInputTokensTriggerParam +from .beta_input_tokens_clear_at_least_param import BetaInputTokensClearAtLeastParam + +__all__ = ["BetaClearToolUses20250919EditParam", "Trigger"] + +Trigger: TypeAlias = Union[BetaInputTokensTriggerParam, BetaToolUsesTriggerParam] + + +class BetaClearToolUses20250919EditParam(TypedDict, total=False): + type: Required[Literal["clear_tool_uses_20250919"]] + + clear_at_least: Optional[BetaInputTokensClearAtLeastParam] + """Minimum number of tokens that must be cleared when triggered. + + Context will only be modified if at least this many tokens can be removed. + """ + + clear_tool_inputs: Union[bool, SequenceNotStr[str], None] + """Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)""" + + exclude_tools: Optional[SequenceNotStr[str]] + """Tool names whose uses are preserved from clearing""" + + keep: BetaToolUsesKeepParam + """Number of tool uses to retain in the conversation""" + + trigger: Trigger + """Condition that triggers the context management strategy""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_tool_uses_20250919_edit_response.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_tool_uses_20250919_edit_response.py new file mode 100644 index 0000000000000000000000000000000000000000..b2e63acd0222c568421435116ec8131d06f41d2d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_clear_tool_uses_20250919_edit_response.py @@ -0,0 +1,16 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaClearToolUses20250919EditResponse"] + + +class BetaClearToolUses20250919EditResponse(BaseModel): + cleared_input_tokens: int + """Number of input tokens cleared by this edit.""" + + cleared_tool_uses: int + """Number of tool uses that were cleared.""" + + type: Literal["clear_tool_uses_20250919"] + """The type of context management edit applied.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cloud_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cloud_config.py new file mode 100644 index 0000000000000000000000000000000000000000..ce179e98054ad9c41573fbbd2e1dacba072fc657 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cloud_config.py @@ -0,0 +1,24 @@ +from typing import Union +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_packages import BetaPackages +from .beta_limited_network import BetaLimitedNetwork +from .beta_unrestricted_network import BetaUnrestrictedNetwork + +__all__ = ["BetaCloudConfig", "Networking"] + +Networking: TypeAlias = Annotated[Union[BetaUnrestrictedNetwork, BetaLimitedNetwork], UnionDiscriminator("type")] + + +class BetaCloudConfig(BaseModel): + """`cloud` environment configuration.""" + + networking: Networking + """Network configuration policy.""" + + packages: BetaPackages + """Package manager configuration.""" + + type: Literal["cloud"] + """Environment type""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cloud_config_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cloud_config_params.py new file mode 100644 index 0000000000000000000000000000000000000000..71de0a37eab6d90d190e95f75bceeea8d5bbd3f6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_cloud_config_params.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import Union, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from .beta_packages_params import BetaPackagesParams +from .beta_limited_network_params import BetaLimitedNetworkParams +from .beta_unrestricted_network_param import BetaUnrestrictedNetworkParam + +__all__ = ["BetaCloudConfigParams", "Networking"] + +Networking: TypeAlias = Union[BetaUnrestrictedNetworkParam, BetaLimitedNetworkParams] + + +class BetaCloudConfigParams(TypedDict, total=False): + """Request params for `cloud` environment configuration. + + Fields default to null; on update, omitted fields preserve the + existing value. + """ + + type: Required[Literal["cloud"]] + """Environment type""" + + networking: Optional[Networking] + """Network configuration policy. Omit on update to preserve the existing value.""" + + packages: Optional[BetaPackagesParams] + """Package manager configuration. + + Under `limited` networking, requires `networking.allow_package_managers` to be + `true`. Omit on update to preserve the existing value. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_output_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_output_block.py new file mode 100644 index 0000000000000000000000000000000000000000..a83bb9d87e66577de78bf070c49a4b326121977c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_output_block.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCodeExecutionOutputBlock"] + + +class BetaCodeExecutionOutputBlock(BaseModel): + file_id: str + + type: Literal["code_execution_output"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_output_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_output_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..19b50c8668002cb8405459bfba7c1b36447cf993 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_output_block_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCodeExecutionOutputBlockParam"] + + +class BetaCodeExecutionOutputBlockParam(TypedDict, total=False): + file_id: Required[str] + + type: Required[Literal["code_execution_output"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_result_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_result_block.py new file mode 100644 index 0000000000000000000000000000000000000000..c1e4cf8eaee1d80d0fecdfaa75af5c3f4a39a324 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_result_block.py @@ -0,0 +1,19 @@ +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_code_execution_output_block import BetaCodeExecutionOutputBlock + +__all__ = ["BetaCodeExecutionResultBlock"] + + +class BetaCodeExecutionResultBlock(BaseModel): + content: List[BetaCodeExecutionOutputBlock] + + return_code: int + + stderr: str + + stdout: str + + type: Literal["code_execution_result"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_result_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_result_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..9817dddb69eb3e624f5d9b7d4d7facc110011101 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_result_block_param.py @@ -0,0 +1,20 @@ +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Required, TypedDict + +from .beta_code_execution_output_block_param import BetaCodeExecutionOutputBlockParam + +__all__ = ["BetaCodeExecutionResultBlockParam"] + + +class BetaCodeExecutionResultBlockParam(TypedDict, total=False): + content: Required[Iterable[BetaCodeExecutionOutputBlockParam]] + + return_code: Required[int] + + stderr: Required[str] + + stdout: Required[str] + + type: Required[Literal["code_execution_result"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250522.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250522.py new file mode 100644 index 0000000000000000000000000000000000000000..e8ecc02bbe88d546847291197d56a08324d3c006 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250522.py @@ -0,0 +1,33 @@ +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_cache_control_ephemeral import BetaCacheControlEphemeral + +__all__ = ["BetaCodeExecutionTool20250522"] + + +class BetaCodeExecutionTool20250522(BaseModel): + name: Literal["code_execution"] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Literal["code_execution_20250522"] + + allowed_callers: Optional[ + List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]] + ] = None + + cache_control: Optional[BetaCacheControlEphemeral] = None + """Create a cache control breakpoint at this content block.""" + + defer_loading: Optional[bool] = None + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: Optional[bool] = None + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250522_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250522_param.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf2735aa61d23204a0fa845e8f895edca6a6d9a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250522_param.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import List, Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam + +__all__ = ["BetaCodeExecutionTool20250522Param"] + + +class BetaCodeExecutionTool20250522Param(TypedDict, total=False): + name: Required[Literal["code_execution"]] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Required[Literal["code_execution_20250522"]] + + allowed_callers: List[ + Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"] + ] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + defer_loading: bool + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: bool + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250825.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250825.py new file mode 100644 index 0000000000000000000000000000000000000000..84a03a08a48cec09e5c4fc215909fcb47388255f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250825.py @@ -0,0 +1,33 @@ +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_cache_control_ephemeral import BetaCacheControlEphemeral + +__all__ = ["BetaCodeExecutionTool20250825"] + + +class BetaCodeExecutionTool20250825(BaseModel): + name: Literal["code_execution"] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Literal["code_execution_20250825"] + + allowed_callers: Optional[ + List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]] + ] = None + + cache_control: Optional[BetaCacheControlEphemeral] = None + """Create a cache control breakpoint at this content block.""" + + defer_loading: Optional[bool] = None + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: Optional[bool] = None + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250825_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250825_param.py new file mode 100644 index 0000000000000000000000000000000000000000..c18b8b0b93598f40d64c44e93193100e96f2f89a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20250825_param.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import List, Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam + +__all__ = ["BetaCodeExecutionTool20250825Param"] + + +class BetaCodeExecutionTool20250825Param(TypedDict, total=False): + name: Required[Literal["code_execution"]] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Required[Literal["code_execution_20250825"]] + + allowed_callers: List[ + Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"] + ] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + defer_loading: bool + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: bool + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260120.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260120.py new file mode 100644 index 0000000000000000000000000000000000000000..f685657c376c6bc52ce1870ca7682349fe1805a7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260120.py @@ -0,0 +1,42 @@ +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_cache_control_ephemeral import BetaCacheControlEphemeral + +__all__ = ["BetaCodeExecutionTool20260120"] + + +class BetaCodeExecutionTool20260120(BaseModel): + """A `tools` entry for the code execution tool, version `code_execution_20260120`. + + It adds REPL state persistence to version `code_execution_20250825`. + + REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container. + + See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds. + """ + + name: Literal["code_execution"] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Literal["code_execution_20260120"] + + allowed_callers: Optional[ + List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]] + ] = None + + cache_control: Optional[BetaCacheControlEphemeral] = None + """Create a cache control breakpoint at this content block.""" + + defer_loading: Optional[bool] = None + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: Optional[bool] = None + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260120_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260120_param.py new file mode 100644 index 0000000000000000000000000000000000000000..a6ececb66f532d3c63b2a7e49e46290533618ded --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260120_param.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import List, Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam + +__all__ = ["BetaCodeExecutionTool20260120Param"] + + +class BetaCodeExecutionTool20260120Param(TypedDict, total=False): + """A `tools` entry for the code execution tool, version `code_execution_20260120`. + + It adds REPL state persistence to version `code_execution_20250825`. + + REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container. + + See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds. + """ + + name: Required[Literal["code_execution"]] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Required[Literal["code_execution_20260120"]] + + allowed_callers: List[ + Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"] + ] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + defer_loading: bool + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: bool + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260521.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260521.py new file mode 100644 index 0000000000000000000000000000000000000000..abc837619db8e43a49d9b50cf80e4ab33f8cc0cc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260521.py @@ -0,0 +1,35 @@ +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_cache_control_ephemeral import BetaCacheControlEphemeral + +__all__ = ["BetaCodeExecutionTool20260521"] + + +class BetaCodeExecutionTool20260521(BaseModel): + """Code execution tool with REPL state persistence.""" + + name: Literal["code_execution"] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Literal["code_execution_20260521"] + + allowed_callers: Optional[ + List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]] + ] = None + + cache_control: Optional[BetaCacheControlEphemeral] = None + """Create a cache control breakpoint at this content block.""" + + defer_loading: Optional[bool] = None + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: Optional[bool] = None + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260521_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260521_param.py new file mode 100644 index 0000000000000000000000000000000000000000..fa8280b85dadbd45a924494822b8268f64852699 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_20260521_param.py @@ -0,0 +1,36 @@ +from __future__ import annotations + +from typing import List, Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam + +__all__ = ["BetaCodeExecutionTool20260521Param"] + + +class BetaCodeExecutionTool20260521Param(TypedDict, total=False): + """Code execution tool with REPL state persistence.""" + + name: Required[Literal["code_execution"]] + """Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + """ + + type: Required[Literal["code_execution_20260521"]] + + allowed_callers: List[ + Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"] + ] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + defer_loading: bool + """If true, tool will not be included in initial system prompt. + + Only loaded when returned via tool_reference from tool search. + """ + + strict: bool + """When true, guarantees schema validation on tool names and inputs""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block.py new file mode 100644 index 0000000000000000000000000000000000000000..7940b4a5eea5adcd0d67f0d9e842623b020e1071 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_code_execution_tool_result_block_content import BetaCodeExecutionToolResultBlockContent + +__all__ = ["BetaCodeExecutionToolResultBlock"] + + +class BetaCodeExecutionToolResultBlock(BaseModel): + content: BetaCodeExecutionToolResultBlockContent + + tool_use_id: str + + type: Literal["code_execution_tool_result"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_content.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_content.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd1c20f904c50f4d6253370db4c3f9f421e502b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_content.py @@ -0,0 +1,12 @@ +from typing import Union +from typing_extensions import TypeAlias + +from .beta_code_execution_result_block import BetaCodeExecutionResultBlock +from .beta_code_execution_tool_result_error import BetaCodeExecutionToolResultError +from .beta_encrypted_code_execution_result_block import BetaEncryptedCodeExecutionResultBlock + +__all__ = ["BetaCodeExecutionToolResultBlockContent"] + +BetaCodeExecutionToolResultBlockContent: TypeAlias = Union[ + BetaCodeExecutionToolResultError, BetaCodeExecutionResultBlock, BetaEncryptedCodeExecutionResultBlock +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..046b2ae5fb3b6dce320e542bb58489a27b4abd6b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_param.py @@ -0,0 +1,20 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam +from .beta_code_execution_tool_result_block_param_content_param import BetaCodeExecutionToolResultBlockParamContentParam + +__all__ = ["BetaCodeExecutionToolResultBlockParam"] + + +class BetaCodeExecutionToolResultBlockParam(TypedDict, total=False): + content: Required[BetaCodeExecutionToolResultBlockParamContentParam] + + tool_use_id: Required[str] + + type: Required[Literal["code_execution_tool_result"]] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py new file mode 100644 index 0000000000000000000000000000000000000000..8f3e042b2ea77b3b1f1add26e987e42b364998af --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from typing import Union +from typing_extensions import TypeAlias + +from .beta_code_execution_result_block_param import BetaCodeExecutionResultBlockParam +from .beta_code_execution_tool_result_error_param import BetaCodeExecutionToolResultErrorParam +from .beta_encrypted_code_execution_result_block_param import BetaEncryptedCodeExecutionResultBlockParam + +__all__ = ["BetaCodeExecutionToolResultBlockParamContentParam"] + +BetaCodeExecutionToolResultBlockParamContentParam: TypeAlias = Union[ + BetaCodeExecutionToolResultErrorParam, BetaCodeExecutionResultBlockParam, BetaEncryptedCodeExecutionResultBlockParam +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error.py new file mode 100644 index 0000000000000000000000000000000000000000..288bd4a16af17d696921f9448b9d26e30b6f3ed6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error.py @@ -0,0 +1,12 @@ +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_code_execution_tool_result_error_code import BetaCodeExecutionToolResultErrorCode + +__all__ = ["BetaCodeExecutionToolResultError"] + + +class BetaCodeExecutionToolResultError(BaseModel): + error_code: BetaCodeExecutionToolResultErrorCode + + type: Literal["code_execution_tool_result_error"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error_code.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error_code.py new file mode 100644 index 0000000000000000000000000000000000000000..2d977c902b947f079b4feb6dd231a273c2e0baef --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error_code.py @@ -0,0 +1,7 @@ +from typing_extensions import Literal, TypeAlias + +__all__ = ["BetaCodeExecutionToolResultErrorCode"] + +BetaCodeExecutionToolResultErrorCode: TypeAlias = Literal[ + "invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded" +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error_param.py new file mode 100644 index 0000000000000000000000000000000000000000..a698b0f6cebed63b3b7dcd8d95d720dcf50c05f3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_code_execution_tool_result_error_param.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +from .beta_code_execution_tool_result_error_code import BetaCodeExecutionToolResultErrorCode + +__all__ = ["BetaCodeExecutionToolResultErrorParam"] + + +class BetaCodeExecutionToolResultErrorParam(TypedDict, total=False): + error_code: Required[BetaCodeExecutionToolResultErrorCode] + + type: Required[Literal["code_execution_tool_result_error"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compact_20260112_edit_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compact_20260112_edit_param.py new file mode 100644 index 0000000000000000000000000000000000000000..81ce5fd6626b4c6495593f2ccbbf0e63ed1a39e7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compact_20260112_edit_param.py @@ -0,0 +1,25 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_input_tokens_trigger_param import BetaInputTokensTriggerParam + +__all__ = ["BetaCompact20260112EditParam"] + + +class BetaCompact20260112EditParam(TypedDict, total=False): + """ + Automatically compact older context when reaching the configured trigger threshold. + """ + + type: Required[Literal["compact_20260112"]] + + instructions: Optional[str] + """Additional instructions for summarization.""" + + pause_after_compaction: bool + """Whether to pause after compaction and return the compaction block to the user.""" + + trigger: Optional[BetaInputTokensTriggerParam] + """When to trigger compaction. Defaults to 150000 input tokens.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_block.py new file mode 100644 index 0000000000000000000000000000000000000000..3c03b7174987ecec94821a49c0e3b9a95fbb7976 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_block.py @@ -0,0 +1,40 @@ +from typing import List, Union, Optional +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_response_tool_removal_block import BetaResponseToolRemovalBlock +from .beta_response_tool_addition_block import BetaResponseToolAdditionBlock + +__all__ = ["BetaCompactionBlock", "ToolChange"] + +ToolChange: TypeAlias = Annotated[ + Union[BetaResponseToolAdditionBlock, BetaResponseToolRemovalBlock], UnionDiscriminator("type") +] + + +class BetaCompactionBlock(BaseModel): + """A compaction block returned when autocompact is triggered. + + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. + """ + + content: Optional[str] = None + """Summary of compacted content, or null if compaction failed""" + + encrypted_content: Optional[str] = None + """Opaque metadata from prior compaction, to be round-tripped verbatim""" + + type: Literal["compaction"] + + signature: Optional[str] = None + """Signature over the summary, to be sent back with the block verbatim""" + + tool_changes: Optional[List[ToolChange]] = None + """ + The tool changes of the compacted range: the `tool_addition` and `tool_removal` + blocks that take the request's `tools` to the tool set in effect at the end of + the range, or `[]` when the range changed no tool. Absent when the server did + not compute them. Send the block back unchanged. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..35d1af04f2e9c5dd5e43b237d7b68b6b9a7ba66c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_block_param.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from typing import Union, Iterable, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam +from .beta_request_tool_removal_block_param import BetaRequestToolRemovalBlockParam +from .beta_request_tool_addition_block_param import BetaRequestToolAdditionBlockParam + +__all__ = ["BetaCompactionBlockParam", "ToolChange"] + +ToolChange: TypeAlias = Union[BetaRequestToolAdditionBlockParam, BetaRequestToolRemovalBlockParam] + + +class BetaCompactionBlockParam(TypedDict, total=False): + """A compaction block containing summary of previous context. + + Users should round-trip these blocks from responses to subsequent requests + to maintain context across compaction boundaries. + + When content is None, the block represents a failed compaction. The server + treats these as no-ops. Empty string content is not allowed. + """ + + type: Required[Literal["compaction"]] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + content: Optional[str] + """Summary of previously compacted content, or null if compaction failed""" + + encrypted_content: Optional[str] + """Opaque metadata from prior compaction, to be round-tripped verbatim""" + + signature: Optional[str] + """The block's signature as returned, to be sent back verbatim""" + + tool_changes: Optional[Iterable[ToolChange]] + """ + The tool changes of the compacted range, as the server returned them on this + block: the `tool_addition` and `tool_removal` entries that take the request's + `tools` to the tool set in effect at the end of the range. Send them back + unchanged with the block. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_capability.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_capability.py new file mode 100644 index 0000000000000000000000000000000000000000..394c4dd29172cd64d4d85a701bd187d2e2f5d55a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_capability.py @@ -0,0 +1,18 @@ +from ..._models import BaseModel +from .beta_capability_support import BetaCapabilitySupport + +__all__ = ["BetaCompactionCapability"] + + +class BetaCompactionCapability(BaseModel): + """ + Compaction capability details: whether the model accepts the top-level + `compaction` request parameter, with one entry per supported + `compaction.type` value. + """ + + summarize: BetaCapabilitySupport + """Whether the summarize compaction type is supported.""" + + supported: bool + """Whether this capability is supported by the model.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..a1aaf970e4d42e600f267da0eb63c9a203908f04 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_config_param.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaCompactionConfigParam"] + + +class BetaCompactionConfigParam(TypedDict, total=False): + """ + Compact the whole conversation and return a signed `compaction` block, + alone, that a later request sends back first in `messages`, in place of + the messages it summarizes. There is no trigger and no pause flag: sending + the parameter compacts, and nothing is sampled after the block. + + The summarization prompt is the server's own unless `instructions` are + given, which then replace it for this request; a value that is empty or + only whitespace counts as absent. + """ + + type: Required[Literal["summarize"]] + + instructions: Optional[str] + """Replaces the server's default summarization prompt for this request. + + An empty or whitespace-only value counts as absent. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_content_block_delta.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_content_block_delta.py new file mode 100644 index 0000000000000000000000000000000000000000..c3476e0441ecc442e777e27d0154aa0c99407730 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_content_block_delta.py @@ -0,0 +1,15 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaCompactionContentBlockDelta"] + + +class BetaCompactionContentBlockDelta(BaseModel): + content: Optional[str] = None + + encrypted_content: Optional[str] = None + """Opaque metadata from prior compaction, to be round-tripped verbatim""" + + type: Literal["compaction_delta"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_iteration_usage.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_iteration_usage.py new file mode 100644 index 0000000000000000000000000000000000000000..39533a954220c814862e4c3688d365c2f3627373 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_compaction_iteration_usage.py @@ -0,0 +1,29 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_cache_creation import BetaCacheCreation + +__all__ = ["BetaCompactionIterationUsage"] + + +class BetaCompactionIterationUsage(BaseModel): + """Token usage for a compaction iteration.""" + + cache_creation: Optional[BetaCacheCreation] = None + """Breakdown of cached tokens by TTL""" + + cache_creation_input_tokens: int + """The number of input tokens used to create the cache entry.""" + + cache_read_input_tokens: int + """The number of input tokens read from the cache.""" + + input_tokens: int + """The number of input tokens which were used.""" + + output_tokens: int + """The number of output tokens which were used.""" + + type: Literal["compaction"] + """Usage for a compaction iteration""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_config.py new file mode 100644 index 0000000000000000000000000000000000000000..bdc69dd5e37c45c1dd14688c826058abd9fb21ac --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerCursorPositionConfig"] + + +class BetaComputerCursorPositionConfig(BaseModel): + """``cursor_position``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..fd68ed8f800b9af39efbe53fdd2108932360f718 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerCursorPositionConfigParam"] + + +class BetaComputerCursorPositionConfigParam(TypedDict, total=False): + """``cursor_position``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_input.py new file mode 100644 index 0000000000000000000000000000000000000000..d7bf80cefd4fd89db192256130954d97621e3842 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_input.py @@ -0,0 +1,9 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerCursorPositionInput"] + + +class BetaComputerCursorPositionInput(BaseModel): + """Get the current (x, y) pixel coordinate of the cursor.""" + + pass diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..3de432bfde60fc0381c97b73a46b2981eb1f2aa2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_cursor_position_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_cursor_position_input import BetaComputerCursorPositionInput + +__all__ = ["BetaComputerCursorPositionToolUseBlock"] + + +class BetaComputerCursorPositionToolUseBlock(BaseModel): + id: str + + input: BetaComputerCursorPositionInput + """Get the current (x, y) pixel coordinate of the cursor.""" + + name: Literal["cursor_position"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_config.py new file mode 100644 index 0000000000000000000000000000000000000000..40da4fa501d50489aa5605fc9a3e6378253f1f6e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerDoubleClickConfig"] + + +class BetaComputerDoubleClickConfig(BaseModel): + """``double_click``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..d0b430d3054a04fc6108b9881dcc1b2156ae118c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerDoubleClickConfigParam"] + + +class BetaComputerDoubleClickConfigParam(TypedDict, total=False): + """``double_click``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_input.py new file mode 100644 index 0000000000000000000000000000000000000000..889516d9d16ecbe242f5fec8887a095f90470930 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_input.py @@ -0,0 +1,21 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerDoubleClickInput"] + + +class BetaComputerDoubleClickInput(BaseModel): + """ + Double-click the left mouse button at the specified (x, y) pixel coordinate, or + the current cursor position if `coordinate` is omitted. + """ + + coordinate: Optional[List[int]] = None + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..32277568855c55dc0bf7c7f28611f0c45236e333 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_double_click_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_double_click_input import BetaComputerDoubleClickInput + +__all__ = ["BetaComputerDoubleClickToolUseBlock"] + + +class BetaComputerDoubleClickToolUseBlock(BaseModel): + id: str + + input: BetaComputerDoubleClickInput + """ + Double-click the left mouse button at the specified (x, y) pixel coordinate, or + the current cursor position if `coordinate` is omitted. + """ + + name: Literal["double_click"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_config.py new file mode 100644 index 0000000000000000000000000000000000000000..e16268d01559b3b48147c894310627587a550109 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerHoldKeyConfig"] + + +class BetaComputerHoldKeyConfig(BaseModel): + """``hold_key``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..c240ba89d2db76b4f26823102f17497c49d880bf --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerHoldKeyConfigParam"] + + +class BetaComputerHoldKeyConfigParam(TypedDict, total=False): + """``hold_key``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_input.py new file mode 100644 index 0000000000000000000000000000000000000000..59b34218bccc7ce8c357740a1949830641b791ba --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_input.py @@ -0,0 +1,17 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerHoldKeyInput"] + + +class BetaComputerHoldKeyInput(BaseModel): + """Hold down a key or key-combination for a specified duration. + + Uses the same key + syntax as `key`. + """ + + duration: int + """Duration to hold the key, in seconds.""" + + text: str + """The key or key-combination to hold.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..72d09df3f9633bc933f8247ba89c1cdd9440cedd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_hold_key_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_hold_key_input import BetaComputerHoldKeyInput + +__all__ = ["BetaComputerHoldKeyToolUseBlock"] + + +class BetaComputerHoldKeyToolUseBlock(BaseModel): + id: str + + input: BetaComputerHoldKeyInput + """Hold down a key or key-combination for a specified duration. + + Uses the same key syntax as `key`. + """ + + name: Literal["hold_key"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_config.py new file mode 100644 index 0000000000000000000000000000000000000000..8e4930c23d2043bf00469050b547bca4b7a7138c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerKeyConfig"] + + +class BetaComputerKeyConfig(BaseModel): + """``key``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..7619cef3d6ccfbb0d71c6641e059e821d37e47e8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerKeyConfigParam"] + + +class BetaComputerKeyConfigParam(TypedDict, total=False): + """``key``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_input.py new file mode 100644 index 0000000000000000000000000000000000000000..aaaa3dac97838bf2334fa816c4e772f9f963217f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_input.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerKeyInput"] + + +class BetaComputerKeyInput(BaseModel): + """Press a key or key-combination on the keyboard. + + Use "+" to combine modifiers with + a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are + case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down", + "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are + supported. + """ + + text: str + """The key or key-combination to press.""" + + repeat: Optional[int] = None + """Number of times to repeat the key press. Default is 1.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..5a2a737fb0ead8772a3cb69f16783ea3ef2153b8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_key_tool_use_block.py @@ -0,0 +1,33 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_key_input import BetaComputerKeyInput + +__all__ = ["BetaComputerKeyToolUseBlock"] + + +class BetaComputerKeyToolUseBlock(BaseModel): + id: str + + input: BetaComputerKeyInput + """Press a key or key-combination on the keyboard. + + Use "+" to combine modifiers with a key (e.g. "ctrl+s", "alt+Tab", + "ctrl+shift+Escape"). Key names are case-insensitive; common names like + "Return", "Tab", "Escape", "Up", "Down", "Left", "Right", "Home", "End", + "Page_Up", "Page_Down", "Delete", "BackSpace" are supported. + """ + + name: Literal["key"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_config.py new file mode 100644 index 0000000000000000000000000000000000000000..4b8625671addc7f12b7d51f2431fd45003ad68bb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftClickConfig"] + + +class BetaComputerLeftClickConfig(BaseModel): + """``left_click``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..d624eddc1952a489e8de7b692f4d240b01603e5d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerLeftClickConfigParam"] + + +class BetaComputerLeftClickConfigParam(TypedDict, total=False): + """``left_click``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_config.py new file mode 100644 index 0000000000000000000000000000000000000000..290cfaa28277a18f8236f47d883aa3a361e497da --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftClickDragConfig"] + + +class BetaComputerLeftClickDragConfig(BaseModel): + """``left_click_drag``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..f7f2786c3d1219c7586ade1375cecd2e865652a9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerLeftClickDragConfigParam"] + + +class BetaComputerLeftClickDragConfigParam(TypedDict, total=False): + """``left_click_drag``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_input.py new file mode 100644 index 0000000000000000000000000000000000000000..d450e52f66f84d78ff54c1d6011e3283cc0204dc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_input.py @@ -0,0 +1,21 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftClickDragInput"] + + +class BetaComputerLeftClickDragInput(BaseModel): + """Click and drag the cursor from `start_coordinate` to `coordinate`.""" + + coordinate: List[int] + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + start_coordinate: List[int] + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..02511090758142eef3931f48c2c3ba6fe424741b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_drag_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_left_click_drag_input import BetaComputerLeftClickDragInput + +__all__ = ["BetaComputerLeftClickDragToolUseBlock"] + + +class BetaComputerLeftClickDragToolUseBlock(BaseModel): + id: str + + input: BetaComputerLeftClickDragInput + """Click and drag the cursor from `start_coordinate` to `coordinate`.""" + + name: Literal["left_click_drag"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_input.py new file mode 100644 index 0000000000000000000000000000000000000000..36670c2ac12da028f806443191303fd66f86efc6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_input.py @@ -0,0 +1,21 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftClickInput"] + + +class BetaComputerLeftClickInput(BaseModel): + """ + Click the left mouse button at the specified (x, y) pixel coordinate, or the + current cursor position if `coordinate` is omitted. + """ + + coordinate: Optional[List[int]] = None + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..66be7e76978fe44f0012d6553ff99176159b58bc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_click_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_left_click_input import BetaComputerLeftClickInput + +__all__ = ["BetaComputerLeftClickToolUseBlock"] + + +class BetaComputerLeftClickToolUseBlock(BaseModel): + id: str + + input: BetaComputerLeftClickInput + """ + Click the left mouse button at the specified (x, y) pixel coordinate, or the + current cursor position if `coordinate` is omitted. + """ + + name: Literal["left_click"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_config.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f93fae0b149b09db8ad2e6c5ca3008011ccecc --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftMouseDownConfig"] + + +class BetaComputerLeftMouseDownConfig(BaseModel): + """``left_mouse_down``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..5866ab61bd1d5558f4805c79ac9305affe2b0644 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerLeftMouseDownConfigParam"] + + +class BetaComputerLeftMouseDownConfigParam(TypedDict, total=False): + """``left_mouse_down``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_input.py new file mode 100644 index 0000000000000000000000000000000000000000..30aef8728e3ea7f0b52ae3481ccf321723780aa4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_input.py @@ -0,0 +1,9 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftMouseDownInput"] + + +class BetaComputerLeftMouseDownInput(BaseModel): + """Press and hold the left mouse button at the current cursor position.""" + + pass diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..fec44278c34e15ebaac18980b792ff4291cec4ff --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_down_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_left_mouse_down_input import BetaComputerLeftMouseDownInput + +__all__ = ["BetaComputerLeftMouseDownToolUseBlock"] + + +class BetaComputerLeftMouseDownToolUseBlock(BaseModel): + id: str + + input: BetaComputerLeftMouseDownInput + """Press and hold the left mouse button at the current cursor position.""" + + name: Literal["left_mouse_down"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_config.py new file mode 100644 index 0000000000000000000000000000000000000000..588a8c44cc70497541c586a02347550d58aaa7ba --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftMouseUpConfig"] + + +class BetaComputerLeftMouseUpConfig(BaseModel): + """``left_mouse_up``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..d3a8ddafe00cc556d625a77b9823a62e9a0f6e64 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerLeftMouseUpConfigParam"] + + +class BetaComputerLeftMouseUpConfigParam(TypedDict, total=False): + """``left_mouse_up``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_input.py new file mode 100644 index 0000000000000000000000000000000000000000..ef822bdd7ae6e7d624656484bcb344bf7c9003f8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_input.py @@ -0,0 +1,9 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerLeftMouseUpInput"] + + +class BetaComputerLeftMouseUpInput(BaseModel): + """Release the left mouse button.""" + + pass diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..e2888f926f25a7a4c31452f7301cb69b991cd1cb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_left_mouse_up_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_left_mouse_up_input import BetaComputerLeftMouseUpInput + +__all__ = ["BetaComputerLeftMouseUpToolUseBlock"] + + +class BetaComputerLeftMouseUpToolUseBlock(BaseModel): + id: str + + input: BetaComputerLeftMouseUpInput + """Release the left mouse button.""" + + name: Literal["left_mouse_up"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_member_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_member_input.py new file mode 100644 index 0000000000000000000000000000000000000000..faf7c683b565402ee79710e3bfb00c6dacedc2f7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_member_input.py @@ -0,0 +1,42 @@ +from typing import Union +from typing_extensions import TypeAlias + +from .beta_computer_key_input import BetaComputerKeyInput +from .beta_computer_type_input import BetaComputerTypeInput +from .beta_computer_wait_input import BetaComputerWaitInput +from .beta_computer_zoom_input import BetaComputerZoomInput +from .beta_computer_scroll_input import BetaComputerScrollInput +from .beta_computer_hold_key_input import BetaComputerHoldKeyInput +from .beta_computer_left_click_input import BetaComputerLeftClickInput +from .beta_computer_mouse_move_input import BetaComputerMouseMoveInput +from .beta_computer_screenshot_input import BetaComputerScreenshotInput +from .beta_computer_right_click_input import BetaComputerRightClickInput +from .beta_computer_double_click_input import BetaComputerDoubleClickInput +from .beta_computer_middle_click_input import BetaComputerMiddleClickInput +from .beta_computer_triple_click_input import BetaComputerTripleClickInput +from .beta_computer_left_mouse_up_input import BetaComputerLeftMouseUpInput +from .beta_computer_cursor_position_input import BetaComputerCursorPositionInput +from .beta_computer_left_click_drag_input import BetaComputerLeftClickDragInput +from .beta_computer_left_mouse_down_input import BetaComputerLeftMouseDownInput + +__all__ = ["BetaComputerMemberInput"] + +BetaComputerMemberInput: TypeAlias = Union[ + BetaComputerKeyInput, + BetaComputerHoldKeyInput, + BetaComputerTypeInput, + BetaComputerCursorPositionInput, + BetaComputerMouseMoveInput, + BetaComputerLeftMouseDownInput, + BetaComputerLeftMouseUpInput, + BetaComputerLeftClickInput, + BetaComputerLeftClickDragInput, + BetaComputerRightClickInput, + BetaComputerMiddleClickInput, + BetaComputerDoubleClickInput, + BetaComputerTripleClickInput, + BetaComputerScrollInput, + BetaComputerWaitInput, + BetaComputerScreenshotInput, + BetaComputerZoomInput, +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_member_name.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_member_name.py new file mode 100644 index 0000000000000000000000000000000000000000..43b9fa238fc0e3187ebeff607955ddd20f65354a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_member_name.py @@ -0,0 +1,44 @@ +from typing_extensions import Literal, TypeAlias + +__all__ = ["BetaComputerMemberName", "BETA_COMPUTER_MEMBER_NAME_VALUES"] + +BetaComputerMemberName: TypeAlias = Literal[ + "key", + "hold_key", + "type", + "cursor_position", + "mouse_move", + "left_mouse_down", + "left_mouse_up", + "left_click", + "left_click_drag", + "right_click", + "middle_click", + "double_click", + "triple_click", + "scroll", + "wait", + "screenshot", + "zoom", +] + +BETA_COMPUTER_MEMBER_NAME_VALUES: tuple[BetaComputerMemberName, ...] = ( + "key", + "hold_key", + "type", + "cursor_position", + "mouse_move", + "left_mouse_down", + "left_mouse_up", + "left_click", + "left_click_drag", + "right_click", + "middle_click", + "double_click", + "triple_click", + "scroll", + "wait", + "screenshot", + "zoom", +) +"""The values of `BetaComputerMemberName`.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_config.py new file mode 100644 index 0000000000000000000000000000000000000000..a36bb4baa354810a6fb3c5e9cf14253cb34a5795 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerMiddleClickConfig"] + + +class BetaComputerMiddleClickConfig(BaseModel): + """``middle_click``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..7a1dfba61e0c810247f5f42421401e4daf1fb45b --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerMiddleClickConfigParam"] + + +class BetaComputerMiddleClickConfigParam(TypedDict, total=False): + """``middle_click``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_input.py new file mode 100644 index 0000000000000000000000000000000000000000..52b071a8adf534be8fae8f5bf14269012b341fa6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_input.py @@ -0,0 +1,21 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerMiddleClickInput"] + + +class BetaComputerMiddleClickInput(BaseModel): + """ + Click the middle mouse button at the specified (x, y) pixel coordinate, or the + current cursor position if `coordinate` is omitted. + """ + + coordinate: Optional[List[int]] = None + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..e080c2ace7125ee4b6b912537dccb0244c5fcdca --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_middle_click_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_middle_click_input import BetaComputerMiddleClickInput + +__all__ = ["BetaComputerMiddleClickToolUseBlock"] + + +class BetaComputerMiddleClickToolUseBlock(BaseModel): + id: str + + input: BetaComputerMiddleClickInput + """ + Click the middle mouse button at the specified (x, y) pixel coordinate, or the + current cursor position if `coordinate` is omitted. + """ + + name: Literal["middle_click"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_config.py new file mode 100644 index 0000000000000000000000000000000000000000..727e621725b929eab001c3f4768a9c624a620fbb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerMouseMoveConfig"] + + +class BetaComputerMouseMoveConfig(BaseModel): + """``mouse_move``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..36b4d384e2161300af87c6a1ca489ecb5e814cd6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerMouseMoveConfigParam"] + + +class BetaComputerMouseMoveConfigParam(TypedDict, total=False): + """``mouse_move``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_input.py new file mode 100644 index 0000000000000000000000000000000000000000..99dc001de33c65b007d5f9239925af135582c0b1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_input.py @@ -0,0 +1,16 @@ +from typing import List + +from ..._models import BaseModel + +__all__ = ["BetaComputerMouseMoveInput"] + + +class BetaComputerMouseMoveInput(BaseModel): + """Move the cursor to a specified (x, y) pixel coordinate. + + Use this ONLY to hover + without clicking; otherwise use a click action directly. + """ + + coordinate: List[int] + """(x, y): x pixels from the left edge, y pixels from the top edge.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..e9ecaaf836f4631963f60bdf2dcf2634747dfa8c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_mouse_move_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_mouse_move_input import BetaComputerMouseMoveInput + +__all__ = ["BetaComputerMouseMoveToolUseBlock"] + + +class BetaComputerMouseMoveToolUseBlock(BaseModel): + id: str + + input: BetaComputerMouseMoveInput + """Move the cursor to a specified (x, y) pixel coordinate. + + Use this ONLY to hover without clicking; otherwise use a click action directly. + """ + + name: Literal["mouse_move"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_config.py new file mode 100644 index 0000000000000000000000000000000000000000..4d945283c14ab4de48429286efa0a7a4831f6a0d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerRightClickConfig"] + + +class BetaComputerRightClickConfig(BaseModel): + """``right_click``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf1a9e2689db7da028834cae26e8badcbdbee87 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerRightClickConfigParam"] + + +class BetaComputerRightClickConfigParam(TypedDict, total=False): + """``right_click``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_input.py new file mode 100644 index 0000000000000000000000000000000000000000..d3878683ee12d5d5fc0ef2b5a1185a30d236479f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_input.py @@ -0,0 +1,21 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerRightClickInput"] + + +class BetaComputerRightClickInput(BaseModel): + """ + Click the right mouse button at the specified (x, y) pixel coordinate, or the + current cursor position if `coordinate` is omitted. + """ + + coordinate: Optional[List[int]] = None + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..e0403b983c29eab89ecd0bcbabd6705ca1035787 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_right_click_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_right_click_input import BetaComputerRightClickInput + +__all__ = ["BetaComputerRightClickToolUseBlock"] + + +class BetaComputerRightClickToolUseBlock(BaseModel): + id: str + + input: BetaComputerRightClickInput + """ + Click the right mouse button at the specified (x, y) pixel coordinate, or the + current cursor position if `coordinate` is omitted. + """ + + name: Literal["right_click"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_config.py new file mode 100644 index 0000000000000000000000000000000000000000..278a4543514e926e3125850fb120061184c80889 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerScreenshotConfig"] + + +class BetaComputerScreenshotConfig(BaseModel): + """``screenshot``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..bc2adca6b5c15e900d55bc01a53042869acd1f2a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerScreenshotConfigParam"] + + +class BetaComputerScreenshotConfigParam(TypedDict, total=False): + """``screenshot``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_input.py new file mode 100644 index 0000000000000000000000000000000000000000..4ba36b4a96b877a3b09d3738c81783287b5f621f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_input.py @@ -0,0 +1,9 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerScreenshotInput"] + + +class BetaComputerScreenshotInput(BaseModel): + """Take a screenshot of the screen.""" + + pass diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..a123d5ae38f4bd162da93e51626b65a7814bcca1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_screenshot_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_screenshot_input import BetaComputerScreenshotInput + +__all__ = ["BetaComputerScreenshotToolUseBlock"] + + +class BetaComputerScreenshotToolUseBlock(BaseModel): + id: str + + input: BetaComputerScreenshotInput + """Take a screenshot of the screen.""" + + name: Literal["screenshot"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_config.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e48f486fb2e29a4eff8f54a414b0b1eb2f9d08 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerScrollConfig"] + + +class BetaComputerScrollConfig(BaseModel): + """``scroll``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..869b8bce635bc3fb9b0b2c2efed58bb800ad8433 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerScrollConfigParam"] + + +class BetaComputerScrollConfigParam(TypedDict, total=False): + """``scroll``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_direction.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_direction.py new file mode 100644 index 0000000000000000000000000000000000000000..28bc05323b3f11f6b73a0a769a3353a4b388d732 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_direction.py @@ -0,0 +1,5 @@ +from typing_extensions import Literal, TypeAlias + +__all__ = ["BetaComputerScrollDirection"] + +BetaComputerScrollDirection: TypeAlias = Literal["up", "down", "left", "right"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_input.py new file mode 100644 index 0000000000000000000000000000000000000000..f4e8f2cda1d76e8e1372d0fb12ec904e06b2e694 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_input.py @@ -0,0 +1,27 @@ +from typing import List, Optional + +from ..._models import BaseModel +from .beta_computer_scroll_direction import BetaComputerScrollDirection + +__all__ = ["BetaComputerScrollInput"] + + +class BetaComputerScrollInput(BaseModel): + """ + Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor + position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll. + """ + + scroll_amount: int + """Number of 'clicks' of the scroll wheel.""" + + scroll_direction: BetaComputerScrollDirection + + coordinate: Optional[List[int]] = None + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..af399d51a44cae9c8c5f58d2af5a9b0929d55024 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_scroll_tool_use_block.py @@ -0,0 +1,31 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_scroll_input import BetaComputerScrollInput + +__all__ = ["BetaComputerScrollToolUseBlock"] + + +class BetaComputerScrollToolUseBlock(BaseModel): + id: str + + input: BetaComputerScrollInput + """ + Scroll the screen at the specified (x, y) pixel coordinate, or the current + cursor position if `coordinate` is omitted. Do NOT use PageUp/PageDown to + scroll. + """ + + name: Literal["scroll"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..b5cf0d357f31b295b50aec3aa138fc02d48721c4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_tool_use_block.py @@ -0,0 +1,46 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_computer_key_tool_use_block import BetaComputerKeyToolUseBlock +from .beta_computer_type_tool_use_block import BetaComputerTypeToolUseBlock +from .beta_computer_wait_tool_use_block import BetaComputerWaitToolUseBlock +from .beta_computer_zoom_tool_use_block import BetaComputerZoomToolUseBlock +from .beta_computer_scroll_tool_use_block import BetaComputerScrollToolUseBlock +from .beta_computer_hold_key_tool_use_block import BetaComputerHoldKeyToolUseBlock +from .beta_computer_left_click_tool_use_block import BetaComputerLeftClickToolUseBlock +from .beta_computer_mouse_move_tool_use_block import BetaComputerMouseMoveToolUseBlock +from .beta_computer_screenshot_tool_use_block import BetaComputerScreenshotToolUseBlock +from .beta_computer_right_click_tool_use_block import BetaComputerRightClickToolUseBlock +from .beta_computer_double_click_tool_use_block import BetaComputerDoubleClickToolUseBlock +from .beta_computer_middle_click_tool_use_block import BetaComputerMiddleClickToolUseBlock +from .beta_computer_triple_click_tool_use_block import BetaComputerTripleClickToolUseBlock +from .beta_computer_left_mouse_up_tool_use_block import BetaComputerLeftMouseUpToolUseBlock +from .beta_computer_cursor_position_tool_use_block import BetaComputerCursorPositionToolUseBlock +from .beta_computer_left_click_drag_tool_use_block import BetaComputerLeftClickDragToolUseBlock +from .beta_computer_left_mouse_down_tool_use_block import BetaComputerLeftMouseDownToolUseBlock + +__all__ = ["BetaComputerToolUseBlock"] + +BetaComputerToolUseBlock: TypeAlias = Annotated[ + Union[ + BetaComputerKeyToolUseBlock, + BetaComputerHoldKeyToolUseBlock, + BetaComputerTypeToolUseBlock, + BetaComputerCursorPositionToolUseBlock, + BetaComputerMouseMoveToolUseBlock, + BetaComputerLeftMouseDownToolUseBlock, + BetaComputerLeftMouseUpToolUseBlock, + BetaComputerLeftClickToolUseBlock, + BetaComputerLeftClickDragToolUseBlock, + BetaComputerRightClickToolUseBlock, + BetaComputerMiddleClickToolUseBlock, + BetaComputerDoubleClickToolUseBlock, + BetaComputerTripleClickToolUseBlock, + BetaComputerScrollToolUseBlock, + BetaComputerWaitToolUseBlock, + BetaComputerScreenshotToolUseBlock, + BetaComputerZoomToolUseBlock, + ], + UnionDiscriminator("name"), +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_20260801.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_20260801.py new file mode 100644 index 0000000000000000000000000000000000000000..7f4d978ca18bbe5f7cdd4cee5a90933b5de16905 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_20260801.py @@ -0,0 +1,33 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_cache_control_ephemeral import BetaCacheControlEphemeral +from .beta_computer_toolset_configs import BetaComputerToolsetConfigs + +__all__ = ["BetaComputerToolset20260801"] + + +class BetaComputerToolset20260801(BaseModel): + """ + The computer toolset: a single ``tools[]`` entry (carrying no + ``name``) that declares the computer tool family. The model is + served the family's tool with any members disabled via ``configs`` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options ``display_number`` and + ``enable_zoom`` are not fields of a toolset entry — it carries only + ``type``, ``configs``, and ``cache_control``; zoom is controlled + via ``configs.zoom.enabled``. + """ + + type: Literal["computer_toolset_20260801"] + + cache_control: Optional[BetaCacheControlEphemeral] = None + """Create a cache control breakpoint at this content block.""" + + configs: Optional[BetaComputerToolsetConfigs] = None + """Sparse per-member overrides, keyed by member name. + + Absent, null, and {} are equivalent; a member's defaults apply wherever its key + is absent. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_20260801_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_20260801_param.py new file mode 100644 index 0000000000000000000000000000000000000000..987db2b07ed07c3346b54df3797e00919e781071 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_20260801_param.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam +from .beta_computer_toolset_configs_param import BetaComputerToolsetConfigsParam + +__all__ = ["BetaComputerToolset20260801Param"] + + +class BetaComputerToolset20260801Param(TypedDict, total=False): + """ + The computer toolset: a single ``tools[]`` entry (carrying no + ``name``) that declares the computer tool family. The model is + served the family's tool with any members disabled via ``configs`` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options ``display_number`` and + ``enable_zoom`` are not fields of a toolset entry — it carries only + ``type``, ``configs``, and ``cache_control``; zoom is controlled + via ``configs.zoom.enabled``. + """ + + type: Required[Literal["computer_toolset_20260801"]] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + configs: Optional[BetaComputerToolsetConfigsParam] + """Sparse per-member overrides, keyed by member name. + + Absent, null, and {} are equivalent; a member's defaults apply wherever its key + is absent. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_configs.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_configs.py new file mode 100644 index 0000000000000000000000000000000000000000..6bde3661497144cec3e3d94843db22f8db627970 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_configs.py @@ -0,0 +1,84 @@ +from typing import Optional + +from ..._models import BaseModel +from .beta_computer_key_config import BetaComputerKeyConfig +from .beta_computer_type_config import BetaComputerTypeConfig +from .beta_computer_wait_config import BetaComputerWaitConfig +from .beta_computer_zoom_config import BetaComputerZoomConfig +from .beta_computer_scroll_config import BetaComputerScrollConfig +from .beta_computer_hold_key_config import BetaComputerHoldKeyConfig +from .beta_computer_left_click_config import BetaComputerLeftClickConfig +from .beta_computer_mouse_move_config import BetaComputerMouseMoveConfig +from .beta_computer_screenshot_config import BetaComputerScreenshotConfig +from .beta_computer_right_click_config import BetaComputerRightClickConfig +from .beta_computer_double_click_config import BetaComputerDoubleClickConfig +from .beta_computer_middle_click_config import BetaComputerMiddleClickConfig +from .beta_computer_triple_click_config import BetaComputerTripleClickConfig +from .beta_computer_left_mouse_up_config import BetaComputerLeftMouseUpConfig +from .beta_computer_cursor_position_config import BetaComputerCursorPositionConfig +from .beta_computer_left_click_drag_config import BetaComputerLeftClickDragConfig +from .beta_computer_left_mouse_down_config import BetaComputerLeftMouseDownConfig + +__all__ = ["BetaComputerToolsetConfigs"] + + +class BetaComputerToolsetConfigs(BaseModel): + """ + Per-member configuration for ``computer_toolset_20260801``: one + optional field per member tool, keyed by the member name — the same + name the member's ``tool_use`` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + """ + + cursor_position: Optional[BetaComputerCursorPositionConfig] = None + """`cursor_position`'s config overrides.""" + + double_click: Optional[BetaComputerDoubleClickConfig] = None + """`double_click`'s config overrides.""" + + hold_key: Optional[BetaComputerHoldKeyConfig] = None + """`hold_key`'s config overrides.""" + + key: Optional[BetaComputerKeyConfig] = None + """`key`'s config overrides.""" + + left_click: Optional[BetaComputerLeftClickConfig] = None + """`left_click`'s config overrides.""" + + left_click_drag: Optional[BetaComputerLeftClickDragConfig] = None + """`left_click_drag`'s config overrides.""" + + left_mouse_down: Optional[BetaComputerLeftMouseDownConfig] = None + """`left_mouse_down`'s config overrides.""" + + left_mouse_up: Optional[BetaComputerLeftMouseUpConfig] = None + """`left_mouse_up`'s config overrides.""" + + middle_click: Optional[BetaComputerMiddleClickConfig] = None + """`middle_click`'s config overrides.""" + + mouse_move: Optional[BetaComputerMouseMoveConfig] = None + """`mouse_move`'s config overrides.""" + + right_click: Optional[BetaComputerRightClickConfig] = None + """`right_click`'s config overrides.""" + + screenshot: Optional[BetaComputerScreenshotConfig] = None + """`screenshot`'s config overrides.""" + + scroll: Optional[BetaComputerScrollConfig] = None + """`scroll`'s config overrides.""" + + triple_click: Optional[BetaComputerTripleClickConfig] = None + """`triple_click`'s config overrides.""" + + type: Optional[BetaComputerTypeConfig] = None + """`type`'s config overrides.""" + + wait: Optional[BetaComputerWaitConfig] = None + """`wait`'s config overrides.""" + + zoom: Optional[BetaComputerZoomConfig] = None + """`zoom`'s config overrides.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_configs_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_configs_param.py new file mode 100644 index 0000000000000000000000000000000000000000..20c387f90853e5a2e42bd903ebfdb0d396e6a640 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_toolset_configs_param.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +from .beta_computer_key_config_param import BetaComputerKeyConfigParam +from .beta_computer_type_config_param import BetaComputerTypeConfigParam +from .beta_computer_wait_config_param import BetaComputerWaitConfigParam +from .beta_computer_zoom_config_param import BetaComputerZoomConfigParam +from .beta_computer_scroll_config_param import BetaComputerScrollConfigParam +from .beta_computer_hold_key_config_param import BetaComputerHoldKeyConfigParam +from .beta_computer_left_click_config_param import BetaComputerLeftClickConfigParam +from .beta_computer_mouse_move_config_param import BetaComputerMouseMoveConfigParam +from .beta_computer_screenshot_config_param import BetaComputerScreenshotConfigParam +from .beta_computer_right_click_config_param import BetaComputerRightClickConfigParam +from .beta_computer_double_click_config_param import BetaComputerDoubleClickConfigParam +from .beta_computer_middle_click_config_param import BetaComputerMiddleClickConfigParam +from .beta_computer_triple_click_config_param import BetaComputerTripleClickConfigParam +from .beta_computer_left_mouse_up_config_param import BetaComputerLeftMouseUpConfigParam +from .beta_computer_cursor_position_config_param import BetaComputerCursorPositionConfigParam +from .beta_computer_left_click_drag_config_param import BetaComputerLeftClickDragConfigParam +from .beta_computer_left_mouse_down_config_param import BetaComputerLeftMouseDownConfigParam + +__all__ = ["BetaComputerToolsetConfigsParam"] + + +class BetaComputerToolsetConfigsParam(TypedDict, total=False): + """ + Per-member configuration for ``computer_toolset_20260801``: one + optional field per member tool, keyed by the member name — the same + name the member's ``tool_use`` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + """ + + cursor_position: Optional[BetaComputerCursorPositionConfigParam] + """`cursor_position`'s config overrides.""" + + double_click: Optional[BetaComputerDoubleClickConfigParam] + """`double_click`'s config overrides.""" + + hold_key: Optional[BetaComputerHoldKeyConfigParam] + """`hold_key`'s config overrides.""" + + key: Optional[BetaComputerKeyConfigParam] + """`key`'s config overrides.""" + + left_click: Optional[BetaComputerLeftClickConfigParam] + """`left_click`'s config overrides.""" + + left_click_drag: Optional[BetaComputerLeftClickDragConfigParam] + """`left_click_drag`'s config overrides.""" + + left_mouse_down: Optional[BetaComputerLeftMouseDownConfigParam] + """`left_mouse_down`'s config overrides.""" + + left_mouse_up: Optional[BetaComputerLeftMouseUpConfigParam] + """`left_mouse_up`'s config overrides.""" + + middle_click: Optional[BetaComputerMiddleClickConfigParam] + """`middle_click`'s config overrides.""" + + mouse_move: Optional[BetaComputerMouseMoveConfigParam] + """`mouse_move`'s config overrides.""" + + right_click: Optional[BetaComputerRightClickConfigParam] + """`right_click`'s config overrides.""" + + screenshot: Optional[BetaComputerScreenshotConfigParam] + """`screenshot`'s config overrides.""" + + scroll: Optional[BetaComputerScrollConfigParam] + """`scroll`'s config overrides.""" + + triple_click: Optional[BetaComputerTripleClickConfigParam] + """`triple_click`'s config overrides.""" + + type: Optional[BetaComputerTypeConfigParam] + """`type`'s config overrides.""" + + wait: Optional[BetaComputerWaitConfigParam] + """`wait`'s config overrides.""" + + zoom: Optional[BetaComputerZoomConfigParam] + """`zoom`'s config overrides.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_config.py new file mode 100644 index 0000000000000000000000000000000000000000..e1b86bb6ee1b57c2eaf465993e7d4960eb5612ea --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerTripleClickConfig"] + + +class BetaComputerTripleClickConfig(BaseModel): + """``triple_click``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..13759fa20795cec09c0956986092c43927ef6c04 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerTripleClickConfigParam"] + + +class BetaComputerTripleClickConfigParam(TypedDict, total=False): + """``triple_click``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_input.py new file mode 100644 index 0000000000000000000000000000000000000000..6d1614f18265010883a669795b32248ba84a006c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_input.py @@ -0,0 +1,21 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerTripleClickInput"] + + +class BetaComputerTripleClickInput(BaseModel): + """ + Triple-click the left mouse button at the specified (x, y) pixel coordinate, or + the current cursor position if `coordinate` is omitted. + """ + + coordinate: Optional[List[int]] = None + """(x, y): x pixels from the left edge, y pixels from the top edge.""" + + text: Optional[str] = None + """Optional key combination to hold down during this action (e.g. + + "ctrl", "shift", "ctrl+shift"). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee13c18bb30c6b525b1f6020b256951ffc03b3c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_triple_click_tool_use_block.py @@ -0,0 +1,30 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_triple_click_input import BetaComputerTripleClickInput + +__all__ = ["BetaComputerTripleClickToolUseBlock"] + + +class BetaComputerTripleClickToolUseBlock(BaseModel): + id: str + + input: BetaComputerTripleClickInput + """ + Triple-click the left mouse button at the specified (x, y) pixel coordinate, or + the current cursor position if `coordinate` is omitted. + """ + + name: Literal["triple_click"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_config.py new file mode 100644 index 0000000000000000000000000000000000000000..5a5cb620981373535bad0198fcc79de7420cbfce --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerTypeConfig"] + + +class BetaComputerTypeConfig(BaseModel): + """``type``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..5e435d862f48e5d5cec7b96a56e956618b015569 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerTypeConfigParam"] + + +class BetaComputerTypeConfigParam(TypedDict, total=False): + """``type``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_input.py new file mode 100644 index 0000000000000000000000000000000000000000..f171f98dbedd1700db72894adbdf735924ec0c32 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_input.py @@ -0,0 +1,10 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerTypeInput"] + + +class BetaComputerTypeInput(BaseModel): + """Type a string of text on the keyboard.""" + + text: str + """The text to type.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e4e5074664fa1a500a17b761c015833168c95a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_type_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_type_input import BetaComputerTypeInput + +__all__ = ["BetaComputerTypeToolUseBlock"] + + +class BetaComputerTypeToolUseBlock(BaseModel): + id: str + + input: BetaComputerTypeInput + """Type a string of text on the keyboard.""" + + name: Literal["type"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_config.py new file mode 100644 index 0000000000000000000000000000000000000000..7a9cc9fda2673dd0e4783bd6d5fb6790a5c4cf44 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerWaitConfig"] + + +class BetaComputerWaitConfig(BaseModel): + """``wait``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..bd04a98bd85b9da3107da7f06d660826f3a97e10 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerWaitConfigParam"] + + +class BetaComputerWaitConfigParam(TypedDict, total=False): + """``wait``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_input.py new file mode 100644 index 0000000000000000000000000000000000000000..e6c780d1c6cb7847e5a17c2240248b84ebfc740c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_input.py @@ -0,0 +1,10 @@ +from ..._models import BaseModel + +__all__ = ["BetaComputerWaitInput"] + + +class BetaComputerWaitInput(BaseModel): + """Wait for a specified duration.""" + + duration: int + """Duration to wait, in seconds.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..29b1c94c85999d716a55fac975f3c7836bf911f5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_wait_tool_use_block.py @@ -0,0 +1,27 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_wait_input import BetaComputerWaitInput + +__all__ = ["BetaComputerWaitToolUseBlock"] + + +class BetaComputerWaitToolUseBlock(BaseModel): + id: str + + input: BetaComputerWaitInput + """Wait for a specified duration.""" + + name: Literal["wait"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_config.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c1e58eeea81cc63dbb1d050ab72b61a9f28bf6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_config.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaComputerZoomConfig"] + + +class BetaComputerZoomConfig(BaseModel): + """``zoom``'s config overrides.""" + + defer_loading: Optional[bool] = None + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] = None + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..0899864b1a2e94e6dfcc2f3cf313657d24ce681d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_config_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaComputerZoomConfigParam"] + + +class BetaComputerZoomConfigParam(TypedDict, total=False): + """``zoom``'s config overrides.""" + + defer_loading: Optional[bool] + """Defer loading for this member. + + Must resolve to the same value on every enabled member of the toolset. + """ + + enabled: Optional[bool] + """Whether this member is offered to the model. + + Default is per member, per the toolset's documentation. A member whose enabled + resolves false is withheld from the served schema. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_input.py new file mode 100644 index 0000000000000000000000000000000000000000..63838df77efdad589bae25acae8c082e07e8cc10 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_input.py @@ -0,0 +1,17 @@ +from typing import List + +from ..._models import BaseModel + +__all__ = ["BetaComputerZoomInput"] + + +class BetaComputerZoomInput(BaseModel): + """Take a screenshot of a rectangular region. + + Region coordinates are in the + full-screenshot space (not physical display pixels). The crop is scaled up to + fill the image budget so fine details become legible. + """ + + region: List[int] + """(x0, y0, x1, y1): The region to capture.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_tool_use_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_tool_use_block.py new file mode 100644 index 0000000000000000000000000000000000000000..05788b1bc79b90d52f7fa5967dfe8ecf6a9621d1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_computer_zoom_tool_use_block.py @@ -0,0 +1,32 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_tool_use_caller import BetaToolUseCaller +from .beta_computer_zoom_input import BetaComputerZoomInput + +__all__ = ["BetaComputerZoomToolUseBlock"] + + +class BetaComputerZoomToolUseBlock(BaseModel): + id: str + + input: BetaComputerZoomInput + """Take a screenshot of a rectangular region. + + Region coordinates are in the full-screenshot space (not physical display + pixels). The crop is scaled up to fill the image budget so fine details become + legible. + """ + + name: Literal["zoom"] + + toolset_name: Literal["computer"] + + type: Literal["tool_use"] + + caller: Optional[BetaToolUseCaller] = None + """ + Which party invoked the tool call: the model directly, or a server tool on its + behalf. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container.py new file mode 100644 index 0000000000000000000000000000000000000000..826930a8b026b5c5b2da90c3547c97a309dd55c6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container.py @@ -0,0 +1,22 @@ +from typing import List, Optional +from datetime import datetime + +from ..._models import BaseModel +from .beta_container_skill import BetaContainerSkill + +__all__ = ["BetaContainer"] + + +class BetaContainer(BaseModel): + """ + Information about the container used in the request (for the code execution tool) + """ + + id: str + """Identifier for the container used in this request""" + + expires_at: datetime + """The time at which the container will expire.""" + + skills: Optional[List[BetaContainerSkill]] = None + """Skills loaded in the container""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_params.py new file mode 100644 index 0000000000000000000000000000000000000000..161382744773a856ecf6fa03531f86d2ad4ca259 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_params.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from typing import Iterable, Optional +from typing_extensions import TypedDict + +from .beta_skill_params import BetaSkillParams + +__all__ = ["BetaContainerParams"] + + +class BetaContainerParams(TypedDict, total=False): + """Container parameters with skills to be loaded.""" + + id: Optional[str] + """Container id""" + + skills: Optional[Iterable[BetaSkillParams]] + """List of skills to load in the container""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_skill.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_skill.py new file mode 100644 index 0000000000000000000000000000000000000000..627aa96dc888d0c4b8129fde3a721d3fa4e79286 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_skill.py @@ -0,0 +1,18 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaContainerSkill"] + + +class BetaContainerSkill(BaseModel): + """A skill that was loaded in a container (response model).""" + + skill_id: str + """Skill ID""" + + type: Literal["anthropic", "custom"] + """Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)""" + + version: str + """The resolved version: a skill version ID for custom skills.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_upload_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_upload_block.py new file mode 100644 index 0000000000000000000000000000000000000000..88405f57420f3f662a7a9a299f83033af4d47156 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_upload_block.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaContainerUploadBlock"] + + +class BetaContainerUploadBlock(BaseModel): + """Response model for a file uploaded to the container.""" + + file_id: str + + type: Literal["container_upload"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_upload_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_upload_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..d23da2cf5d4fbeac1ffd5b70abbd711ba1d310eb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_container_upload_block_param.py @@ -0,0 +1,22 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam + +__all__ = ["BetaContainerUploadBlockParam"] + + +class BetaContainerUploadBlockParam(TypedDict, total=False): + """ + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. + """ + + file_id: Required[str] + + type: Required[Literal["container_upload"]] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block.py new file mode 100644 index 0000000000000000000000000000000000000000..8034b978b7fdb990faf0e3c9fdb0e1a338817f2d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block.py @@ -0,0 +1,48 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_text_block import BetaTextBlock +from .beta_fallback_block import BetaFallbackBlock +from .beta_thinking_block import BetaThinkingBlock +from .beta_tool_use_block import BetaToolUseBlock +from .beta_compaction_block import BetaCompactionBlock +from .beta_mcp_tool_use_block import BetaMCPToolUseBlock +from .beta_mcp_tool_result_block import BetaMCPToolResultBlock +from .beta_server_tool_use_block import BetaServerToolUseBlock +from .beta_container_upload_block import BetaContainerUploadBlock +from .beta_mcp_tool_listing_block import BetaMCPToolListingBlock +from .beta_redacted_thinking_block import BetaRedactedThinkingBlock +from .beta_advisor_tool_result_block import BetaAdvisorToolResultBlock +from .beta_web_fetch_tool_result_block import BetaWebFetchToolResultBlock +from .beta_web_search_tool_result_block import BetaWebSearchToolResultBlock +from .beta_tool_search_tool_result_block import BetaToolSearchToolResultBlock +from .beta_code_execution_tool_result_block import BetaCodeExecutionToolResultBlock +from .beta_bash_code_execution_tool_result_block import BetaBashCodeExecutionToolResultBlock +from .beta_text_editor_code_execution_tool_result_block import BetaTextEditorCodeExecutionToolResultBlock + +__all__ = ["BetaContentBlock"] + +BetaContentBlock: TypeAlias = Annotated[ + Union[ + BetaTextBlock, + BetaThinkingBlock, + BetaRedactedThinkingBlock, + BetaToolUseBlock, + BetaServerToolUseBlock, + BetaWebSearchToolResultBlock, + BetaWebFetchToolResultBlock, + BetaAdvisorToolResultBlock, + BetaCodeExecutionToolResultBlock, + BetaBashCodeExecutionToolResultBlock, + BetaTextEditorCodeExecutionToolResultBlock, + BetaToolSearchToolResultBlock, + BetaMCPToolUseBlock, + BetaMCPToolResultBlock, + BetaContainerUploadBlock, + BetaCompactionBlock, + BetaFallbackBlock, + BetaMCPToolListingBlock, + ], + UnionDiscriminator("type"), +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..84f0e1466477a278371f88b507ae86ab308ba8d1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_param.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from typing import Union +from typing_extensions import TypeAlias + +from .beta_content_block import BetaContentBlock +from .beta_text_block_param import BetaTextBlockParam +from .beta_image_block_param import BetaImageBlockParam +from .beta_fallback_block_param import BetaFallbackBlockParam +from .beta_thinking_block_param import BetaThinkingBlockParam +from .beta_tool_use_block_param import BetaToolUseBlockParam +from .beta_compaction_block_param import BetaCompactionBlockParam +from .beta_tool_result_block_param import BetaToolResultBlockParam +from .beta_mcp_tool_use_block_param import BetaMCPToolUseBlockParam +from .beta_search_result_block_param import BetaSearchResultBlockParam +from .beta_server_tool_use_block_param import BetaServerToolUseBlockParam +from .beta_container_upload_block_param import BetaContainerUploadBlockParam +from .beta_mcp_tool_listing_block_param import BetaMCPToolListingBlockParam +from .beta_request_document_block_param import BetaRequestDocumentBlockParam +from .beta_redacted_thinking_block_param import BetaRedactedThinkingBlockParam +from .beta_advisor_tool_result_block_param import BetaAdvisorToolResultBlockParam +from .beta_request_tool_removal_block_param import BetaRequestToolRemovalBlockParam +from .beta_request_tool_addition_block_param import BetaRequestToolAdditionBlockParam +from .beta_web_fetch_tool_result_block_param import BetaWebFetchToolResultBlockParam +from .beta_web_search_tool_result_block_param import BetaWebSearchToolResultBlockParam +from .beta_request_mcp_tool_result_block_param import BetaRequestMCPToolResultBlockParam +from .beta_tool_search_tool_result_block_param import BetaToolSearchToolResultBlockParam +from .beta_code_execution_tool_result_block_param import BetaCodeExecutionToolResultBlockParam +from .beta_bash_code_execution_tool_result_block_param import BetaBashCodeExecutionToolResultBlockParam +from .beta_text_editor_code_execution_tool_result_block_param import BetaTextEditorCodeExecutionToolResultBlockParam + +__all__ = ["BetaContentBlockParam"] + +BetaContentBlockParam: TypeAlias = Union[ + BetaTextBlockParam, + BetaImageBlockParam, + BetaRequestDocumentBlockParam, + BetaSearchResultBlockParam, + BetaThinkingBlockParam, + BetaRedactedThinkingBlockParam, + BetaToolUseBlockParam, + BetaToolResultBlockParam, + BetaServerToolUseBlockParam, + BetaWebSearchToolResultBlockParam, + BetaWebFetchToolResultBlockParam, + BetaAdvisorToolResultBlockParam, + BetaCodeExecutionToolResultBlockParam, + BetaBashCodeExecutionToolResultBlockParam, + BetaTextEditorCodeExecutionToolResultBlockParam, + BetaToolSearchToolResultBlockParam, + BetaMCPToolUseBlockParam, + BetaRequestMCPToolResultBlockParam, + BetaContainerUploadBlockParam, + BetaCompactionBlockParam, + BetaRequestToolAdditionBlockParam, + BetaRequestToolRemovalBlockParam, + BetaMCPToolListingBlockParam, + BetaFallbackBlockParam, + BetaContentBlock, +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_source_content_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_source_content_param.py new file mode 100644 index 0000000000000000000000000000000000000000..e48f2fb22ccbff6594b9e776cb6e5c4d2cae6d48 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_source_content_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing import Union +from typing_extensions import TypeAlias + +from .beta_text_block_param import BetaTextBlockParam +from .beta_image_block_param import BetaImageBlockParam + +__all__ = ["BetaContentBlockSourceContentParam"] + +BetaContentBlockSourceContentParam: TypeAlias = Union[BetaTextBlockParam, BetaImageBlockParam] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_source_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_source_param.py new file mode 100644 index 0000000000000000000000000000000000000000..a0ae6669a378dcb3ef7492c900ffe928f886e48a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_content_block_source_param.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from typing import Union, Iterable +from typing_extensions import Literal, Required, TypedDict + +from .beta_content_block_source_content_param import BetaContentBlockSourceContentParam + +__all__ = ["BetaContentBlockSourceParam"] + + +class BetaContentBlockSourceParam(TypedDict, total=False): + content: Required[Union[str, Iterable[BetaContentBlockSourceContentParam]]] + + type: Required[Literal["content"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_capability.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_capability.py new file mode 100644 index 0000000000000000000000000000000000000000..bf59dd4eaa3c869c969d8346b56615704c44c7cd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_capability.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel +from .beta_capability_support import BetaCapabilitySupport + +__all__ = ["BetaContextManagementCapability"] + + +class BetaContextManagementCapability(BaseModel): + """Context management capability details.""" + + clear_thinking_20251015: Optional[BetaCapabilitySupport] = None + """Whether the clear_thinking_20251015 strategy is supported.""" + + clear_tool_uses_20250919: Optional[BetaCapabilitySupport] = None + """Whether the clear_tool_uses_20250919 strategy is supported.""" + + compact_20260112: Optional[BetaCapabilitySupport] = None + """Whether the compact_20260112 strategy is supported.""" + + supported: bool + """Whether this capability is supported by the model.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..938fbd7ef63963a009fbd3a2579ea506fd7b5a30 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_config_param.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing import Union, Iterable +from typing_extensions import TypeAlias, TypedDict + +from .beta_compact_20260112_edit_param import BetaCompact20260112EditParam +from .beta_clear_thinking_20251015_edit_param import BetaClearThinking20251015EditParam +from .beta_clear_tool_uses_20250919_edit_param import BetaClearToolUses20250919EditParam + +__all__ = ["BetaContextManagementConfigParam", "Edit"] + +Edit: TypeAlias = Union[ + BetaClearToolUses20250919EditParam, BetaClearThinking20251015EditParam, BetaCompact20260112EditParam +] + + +class BetaContextManagementConfigParam(TypedDict, total=False): + edits: Iterable[Edit] + """List of context management edits to apply""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_response.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_response.py new file mode 100644 index 0000000000000000000000000000000000000000..f86831222e6b078b0afcd0b112a362e7fc91867e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_context_management_response.py @@ -0,0 +1,17 @@ +from typing import List, Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_clear_thinking_20251015_edit_response import BetaClearThinking20251015EditResponse +from .beta_clear_tool_uses_20250919_edit_response import BetaClearToolUses20250919EditResponse + +__all__ = ["BetaContextManagementResponse", "AppliedEdit"] + +AppliedEdit: TypeAlias = Annotated[ + Union[BetaClearToolUses20250919EditResponse, BetaClearThinking20251015EditResponse], UnionDiscriminator("type") +] + + +class BetaContextManagementResponse(BaseModel): + applied_edits: List[AppliedEdit] + """List of context management edits that were applied.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_count_tokens_context_management_response.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_count_tokens_context_management_response.py new file mode 100644 index 0000000000000000000000000000000000000000..1bddb9aaccd8c0d899b85a0fbda3f18b77201dc5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_count_tokens_context_management_response.py @@ -0,0 +1,8 @@ +from ..._models import BaseModel + +__all__ = ["BetaCountTokensContextManagementResponse"] + + +class BetaCountTokensContextManagementResponse(BaseModel): + original_input_tokens: int + """The original token count before context management was applied""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_file.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_file.py new file mode 100644 index 0000000000000000000000000000000000000000..42c8708fb005c25fbeee14dd82bbc78ee23d9c7f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_file.py @@ -0,0 +1,17 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDeletedFile"] + + +class BetaDeletedFile(BaseModel): + id: str + """ID of the deleted file.""" + + type: Optional[Literal["file_deleted"]] = None + """Deleted object type. + + For file deletion, this is always `"file_deleted"`. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_skill.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_skill.py new file mode 100644 index 0000000000000000000000000000000000000000..3ec0bf72038b6e0d442d48f72a74b26b27c2f6d4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_skill.py @@ -0,0 +1,19 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDeletedSkill"] + + +class BetaDeletedSkill(BaseModel): + id: str + """Unique identifier for the skill. + + The format and length of IDs may change over time. + """ + + type: Literal["skill_deleted"] + """Deleted object type. + + For Skills, this is always `"skill_deleted"`. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_user_profile.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_user_profile.py new file mode 100644 index 0000000000000000000000000000000000000000..003c84a5adce6db13701bfec587553699ab1c91f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_deleted_user_profile.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDeletedUserProfile"] + + +class BetaDeletedUserProfile(BaseModel): + id: str + """Identifier of the deleted user profile, prefixed `uprof_`.""" + + type: Literal["user_profile_deleted"] + """Object type. Always `user_profile_deleted`.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_diagnostics.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_diagnostics.py new file mode 100644 index 0000000000000000000000000000000000000000..b6aa94a987feb763fd61751b3aaec31f2c5a8a46 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_diagnostics.py @@ -0,0 +1,21 @@ +from typing import Optional + +from ..._models import BaseModel +from .beta_cache_miss_reason import BetaCacheMissReason + +__all__ = ["BetaDiagnostics"] + + +class BetaDiagnostics(BaseModel): + """ + Request-level diagnostics: why the prompt cache could not fully reuse + the prefix of the request named by `diagnostics.previous_message_id`. + """ + + cache_miss_reason: Optional[BetaCacheMissReason] = None + """ + Explains why the prompt cache could not fully reuse the prefix from the request + identified by `diagnostics.previous_message_id`. `null` means diagnosis is still + pending — the response was serialized before the background comparison + completed. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_diagnostics_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_diagnostics_param.py new file mode 100644 index 0000000000000000000000000000000000000000..64be259bc2f661812c336f3ef65223b477765b3a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_diagnostics_param.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["BetaDiagnosticsParam"] + + +class BetaDiagnosticsParam(TypedDict, total=False): + """Request-level diagnostics. + + Currently carries the previous response + id for prompt-cache divergence reporting. + """ + + previous_message_id: Optional[str] + """The `id` (`msg_...`) from this client's previous /v1/messages response. + + The server compares that request's prompt fingerprint against this one and + returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not + be reused. Pass `null` on the first turn to opt in without a prior message to + compare. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_direct_caller.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_direct_caller.py new file mode 100644 index 0000000000000000000000000000000000000000..bb16387b37fa78a1712dc953e5693ea834fa6501 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_direct_caller.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDirectCaller"] + + +class BetaDirectCaller(BaseModel): + """Tool invocation directly from the model.""" + + type: Literal["direct"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_direct_caller_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_direct_caller_param.py new file mode 100644 index 0000000000000000000000000000000000000000..d348cee025c0a1c949a55743c23edb23245b9607 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_direct_caller_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaDirectCallerParam"] + + +class BetaDirectCallerParam(TypedDict, total=False): + """Tool invocation directly from the model.""" + + type: Required[Literal["direct"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_document_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_document_block.py new file mode 100644 index 0000000000000000000000000000000000000000..d57b6baa16f6cf7707296191367f6e45f62ba179 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_document_block.py @@ -0,0 +1,23 @@ +from typing import Union, Optional +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_citation_config import BetaCitationConfig +from .beta_base64_pdf_source import BetaBase64PDFSource +from .beta_plain_text_source import BetaPlainTextSource + +__all__ = ["BetaDocumentBlock", "Source"] + +Source: TypeAlias = Annotated[Union[BetaBase64PDFSource, BetaPlainTextSource], UnionDiscriminator("type")] + + +class BetaDocumentBlock(BaseModel): + citations: Optional[BetaCitationConfig] = None + """Citation configuration for the document""" + + source: Source + + title: Optional[str] = None + """The title of the document""" + + type: Literal["document"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream.py new file mode 100644 index 0000000000000000000000000000000000000000..a0f27b6742e9916136c5f13887b1028378521b58 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream.py @@ -0,0 +1,113 @@ +from typing import List, Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_dream_error import BetaDreamError +from .beta_dream_input import BetaDreamInput +from .beta_dream_usage import BetaDreamUsage +from .beta_dream_output import BetaDreamOutput +from .beta_dream_status import BetaDreamStatus +from .beta_output_behavior import BetaOutputBehavior +from .beta_dream_model_config import BetaDreamModelConfig + +__all__ = ["BetaDream"] + + +class BetaDream(BaseModel): + """ + An asynchronous job that reads a memory store and past sessions, then writes a reorganized version of that memory store. + + By default the dream writes its result to a new memory store and doesn't change the input memory store. With `output_behavior` set to `update_existing`, it writes its result into the input memory store instead. + + The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to stable endpoints. + + See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces. + """ + + id: str + """The unique ID of the dream (`drm_...`).""" + + archived_at: Optional[datetime] = None + """When the dream was archived, in RFC 3339, or `null` if it hasn't been archived.""" + + created_at: datetime + """When the dream was created, in RFC 3339. + + Lists of dreams are sorted by this time, newest first. + """ + + ended_at: Optional[datetime] = None + """ + When the dream reached `completed`, `failed`, or `canceled`, in RFC 3339, or + `null` if it is still `pending` or `running`. + """ + + error: Optional[BetaDreamError] = None + """Why the dream failed, or `null` if `status` isn't `failed`.""" + + inputs: List[BetaDreamInput] + """The sources that the dream reads, from the request that created it.""" + + instructions: Optional[str] = None + """The guidance given when the dream was created, or `null` if none was given.""" + + model: BetaDreamModelConfig + """The model that runs a dream, from the request that created it. + + The dream uses this model for all of its work. The response always gives the + model as an object, even if the request gave only a model ID. + """ + + output_behavior: BetaOutputBehavior + """Where the dream writes its result, as set in the request that created the dream. + + If that request left out `output_behavior`, the dream used the `create_new` + behavior. + """ + + outputs: List[BetaDreamOutput] + """ + The memory store that holds the dream's result, as a one-item array, or an empty + array until the dream records that memory store. + + The array is empty while the dream is `pending` and for a short time after it + starts `running`. It can stay empty if the dream fails or is canceled before + then. The memory store holds the complete result only once `status` is + `completed`. + + See the + [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) + for how to review and use the result. + """ + + session_id: Optional[str] = None + """ + The ID of the session that runs the dream (`sesn_...`), or `null` if that + session hasn't started. + + Stream that session's events to follow what the dream reads and writes. + + See the + [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) + for how to watch a running dream. + """ + + status: BetaDreamStatus + """Where a dream is in its lifecycle. + + `completed`, `failed`, and `canceled` are final: once a dream has one of these + statuses, its status doesn't change again. + + See the + [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) + for what each status means. + """ + + type: Literal["dream"] + + usage: BetaDreamUsage + """ + The dream's token counts, which stop changing once its `status` is `completed` + or `failed`. After a cancel, they can keep changing. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_error.py new file mode 100644 index 0000000000000000000000000000000000000000..f02b84f5d49d2a8b37d6d9fea25ffe39d8d923e0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_error.py @@ -0,0 +1,18 @@ +from ..._models import BaseModel + +__all__ = ["BetaDreamError"] + + +class BetaDreamError(BaseModel): + """Failure detail for a Dream whose `status` is `failed`.""" + + message: str + """A human-readable explanation of why the dream failed.""" + + type: str + """A code for why the dream failed, such as `timeout` or `internal_error`. + + The + [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) + lists common error codes and when they occur. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_input.py new file mode 100644 index 0000000000000000000000000000000000000000..a7b183be2a2f3b8b9fb83e92f1eacfd44b3ce061 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_input.py @@ -0,0 +1,12 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_dream_sessions_input import BetaDreamSessionsInput +from .beta_dream_memory_store_input import BetaDreamMemoryStoreInput + +__all__ = ["BetaDreamInput"] + +BetaDreamInput: TypeAlias = Annotated[ + Union[BetaDreamMemoryStoreInput, BetaDreamSessionsInput], UnionDiscriminator("type") +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_input_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_input_param.py new file mode 100644 index 0000000000000000000000000000000000000000..d1504dc0af0f6bcb28b59bed62841660bafa2ab9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_input_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing import Union +from typing_extensions import TypeAlias + +from .beta_dream_sessions_input_param import BetaDreamSessionsInputParam +from .beta_dream_memory_store_input_param import BetaDreamMemoryStoreInputParam + +__all__ = ["BetaDreamInputParam"] + +BetaDreamInputParam: TypeAlias = Union[BetaDreamMemoryStoreInputParam, BetaDreamSessionsInputParam] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_memory_store_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_memory_store_input.py new file mode 100644 index 0000000000000000000000000000000000000000..b11b2a69f76b31ccea95f7d6b977808607017a8e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_memory_store_input.py @@ -0,0 +1,21 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDreamMemoryStoreInput"] + + +class BetaDreamMemoryStoreInput(BaseModel): + """The memory store that a dream reads, given as an entry in `inputs`. + + With `output_behavior` set to `update_existing`, the dream writes its result into this memory store. Otherwise the dream doesn't change it. + """ + + memory_store_id: str + """The ID of the memory store for the dream to read (`memstore_...`). + + The memory store must be in the same workspace as the dream and must not be + archived. + """ + + type: Literal["memory_store"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_memory_store_input_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_memory_store_input_param.py new file mode 100644 index 0000000000000000000000000000000000000000..ce6a83933571066123f5e6ce4e6f7d4fb3830043 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_memory_store_input_param.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaDreamMemoryStoreInputParam"] + + +class BetaDreamMemoryStoreInputParam(TypedDict, total=False): + """The memory store that a dream reads, given as an entry in `inputs`. + + With `output_behavior` set to `update_existing`, the dream writes its result into this memory store. Otherwise the dream doesn't change it. + """ + + memory_store_id: Required[str] + """The ID of the memory store for the dream to read (`memstore_...`). + + The memory store must be in the same workspace as the dream and must not be + archived. + """ + + type: Required[Literal["memory_store"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_model_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_model_config.py new file mode 100644 index 0000000000000000000000000000000000000000..945170679475d8a8f1d111ce72d35472e7978886 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_model_config.py @@ -0,0 +1,22 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDreamModelConfig"] + + +class BetaDreamModelConfig(BaseModel): + """The model that runs a dream, from the request that created it. + + The dream uses this model for all of its work. The response always gives the model as an object, even if the request gave only a model ID. + """ + + id: str + """ + The ID of the model that runs the dream, as given in the request that created + it. + """ + + speed: Optional[Literal["standard", "fast"]] = None + """How fast the model generates output for the dream. Always `standard`.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_model_config_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_model_config_param.py new file mode 100644 index 0000000000000000000000000000000000000000..656514fda4c533d55329d0a06d5f488fadb20c9e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_model_config_param.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaDreamModelConfigParam"] + + +class BetaDreamModelConfigParam(TypedDict, total=False): + """The object form of `model` in a request to create a dream.""" + + id: Required[str] + """The ID of the model to run the dream with. + + The ID can be 1 to 256 characters long. + + The + [Availability section of the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#feature-availability) + lists the supported models. + """ + + speed: Optional[Literal["standard", "fast"]] + """How fast the model generates output for the dream. Defaults to `standard`. + + Dreams accept only `standard`. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_output.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_output.py new file mode 100644 index 0000000000000000000000000000000000000000..1768f9bb8c7e49eb2a3ff690e482e0148a12d126 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_output.py @@ -0,0 +1,20 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDreamOutput"] + + +class BetaDreamOutput(BaseModel): + """ + An entry in a dream's `outputs` that references the memory store holding its result. + """ + + memory_store_id: str + """The ID of the memory store that the dream writes its result to (`memstore_...`). + + With `output_behavior` set to `create_new`, this is a new memory store. With + `update_existing`, it is the input memory store. + """ + + type: Literal["memory_store"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_sessions_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_sessions_input.py new file mode 100644 index 0000000000000000000000000000000000000000..4140173d312f4a18dfa92f006bb52855abca571e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_sessions_input.py @@ -0,0 +1,19 @@ +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaDreamSessionsInput"] + + +class BetaDreamSessionsInput(BaseModel): + """The sessions that a dream reads, given as an entry in `inputs`.""" + + session_ids: List[str] + """The IDs of the sessions whose transcripts the dream reads (`sesn_...`). + + Give 1 to 100 IDs, with no duplicates. Each session must be in the same + workspace as the dream. Responses list the IDs in sorted order. + """ + + type: Literal["sessions"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_sessions_input_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_sessions_input_param.py new file mode 100644 index 0000000000000000000000000000000000000000..32024b5f140e341b4dd4fd791d766aec48de8815 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_sessions_input_param.py @@ -0,0 +1,20 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +from ..._types import SequenceNotStr + +__all__ = ["BetaDreamSessionsInputParam"] + + +class BetaDreamSessionsInputParam(TypedDict, total=False): + """The sessions that a dream reads, given as an entry in `inputs`.""" + + session_ids: Required[SequenceNotStr[str]] + """The IDs of the sessions whose transcripts the dream reads (`sesn_...`). + + Give 1 to 100 IDs, with no duplicates. Each session must be in the same + workspace as the dream. Responses list the IDs in sorted order. + """ + + type: Required[Literal["sessions"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_status.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_status.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5212e543841322ab2fe824f9277378d57fafc5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_status.py @@ -0,0 +1,5 @@ +from typing_extensions import Literal, TypeAlias + +__all__ = ["BetaDreamStatus"] + +BetaDreamStatus: TypeAlias = Literal["pending", "running", "completed", "failed", "canceled"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_usage.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_usage.py new file mode 100644 index 0000000000000000000000000000000000000000..678edb7ebfe416669dc390b2f90fda560d4733ec --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_dream_usage.py @@ -0,0 +1,27 @@ +from ..._models import BaseModel + +__all__ = ["BetaDreamUsage"] + + +class BetaDreamUsage(BaseModel): + """The tokens that a dream has used so far. + + The counts are zero while the dream is `pending` and update while it is `running`. They can keep changing after a cancel. + + See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#billing) for how dreams are billed. See the [prompt caching guide](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#tracking-cache-performance) for how the input token counts add up. + """ + + cache_creation_input_tokens: int + """ + The dream's input tokens that were written to the prompt cache, for both the + 5-minute and 1-hour cache durations. + """ + + cache_read_input_tokens: int + """The dream's input tokens that were read from the prompt cache.""" + + input_tokens: int + """The dream's input tokens that weren't read from or written to the prompt cache.""" + + output_tokens: int + """The tokens that the model generated for the dream.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_effort_capability.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_effort_capability.py new file mode 100644 index 0000000000000000000000000000000000000000..c44866e6b9898669666b368dd1b42acbd088b76a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_effort_capability.py @@ -0,0 +1,28 @@ +from typing import Optional + +from ..._models import BaseModel +from .beta_capability_support import BetaCapabilitySupport + +__all__ = ["BetaEffortCapability"] + + +class BetaEffortCapability(BaseModel): + """Effort (reasoning_effort) capability details.""" + + high: BetaCapabilitySupport + """Whether the model supports high effort level.""" + + low: BetaCapabilitySupport + """Whether the model supports low effort level.""" + + max: BetaCapabilitySupport + """Whether the model supports max effort level.""" + + medium: BetaCapabilitySupport + """Whether the model supports medium effort level.""" + + supported: bool + """Whether this capability is supported by the model.""" + + xhigh: Optional[BetaCapabilitySupport] = None + """Whether the model supports xhigh effort level.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_encrypted_code_execution_result_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_encrypted_code_execution_result_block.py new file mode 100644 index 0000000000000000000000000000000000000000..17a5a00d38711396a46e09a437366863e8b53131 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_encrypted_code_execution_result_block.py @@ -0,0 +1,27 @@ +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_code_execution_output_block import BetaCodeExecutionOutputBlock + +__all__ = ["BetaEncryptedCodeExecutionResultBlock"] + + +class BetaEncryptedCodeExecutionResultBlock(BaseModel): + """ + The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form. + + The API returns this block in place of `code_execution_result` when the code called the web search tool. + + See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) to learn more about programmatic tool calling. + """ + + content: List[BetaCodeExecutionOutputBlock] + + encrypted_stdout: str + + return_code: int + + stderr: str + + type: Literal["encrypted_code_execution_result"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_encrypted_code_execution_result_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_encrypted_code_execution_result_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..053df67833dfe8e5cc8c135855c7bdc4861f3051 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_encrypted_code_execution_result_block_param.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Required, TypedDict + +from .beta_code_execution_output_block_param import BetaCodeExecutionOutputBlockParam + +__all__ = ["BetaEncryptedCodeExecutionResultBlockParam"] + + +class BetaEncryptedCodeExecutionResultBlockParam(TypedDict, total=False): + """ + The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request. + """ + + content: Required[Iterable[BetaCodeExecutionOutputBlockParam]] + + encrypted_stdout: Required[str] + + return_code: Required[int] + + stderr: Required[str] + + type: Required[Literal["encrypted_code_execution_result"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment.py new file mode 100644 index 0000000000000000000000000000000000000000..d07307237a501102ebc6cc35ba6ac0ddaac9367c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment.py @@ -0,0 +1,48 @@ +from typing import Dict, Union, Optional +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_cloud_config import BetaCloudConfig +from .beta_self_hosted_config import BetaSelfHostedConfig + +__all__ = ["BetaEnvironment", "Config"] + +Config: TypeAlias = Annotated[Union[BetaCloudConfig, BetaSelfHostedConfig], UnionDiscriminator("type")] + + +class BetaEnvironment(BaseModel): + """Unified Environment resource for both cloud and self-hosted environments.""" + + id: str + """Environment identifier (e.g., 'env_...')""" + + archived_at: Optional[str] = None + """RFC 3339 timestamp when environment was archived, or null if not archived""" + + config: Config + """Environment configuration (either Anthropic Cloud or self-hosted)""" + + created_at: str + """RFC 3339 timestamp when environment was created""" + + description: Optional[str] = None + """User-provided description for the environment; null when unset""" + + metadata: Dict[str, str] + """User-provided metadata key-value pairs""" + + name: str + """Human-readable name for the environment""" + + type: Literal["environment"] + """The type of object (always 'environment')""" + + updated_at: str + """RFC 3339 timestamp when environment was last updated""" + + scope: Optional[Literal["organization", "account"]] = None + """The visibility scope for this environment. + + 'organization' means visible to all accounts. 'account' means visible only to + the owning account. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_archived_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_archived_error.py new file mode 100644 index 0000000000000000000000000000000000000000..9284b9a920eab111617f6c074af297bccd108f44 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_archived_error.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._exceptions import BadRequestError +from .beta_environment_archived_error_details import BetaEnvironmentArchivedErrorDetails + +__all__ = ["BetaEnvironmentArchivedError"] + + +class BetaEnvironmentArchivedError(BadRequestError): + """The environment is archived, so it cannot be updated.""" + + error_code: Literal["environment_archived"] # pyright: ignore[reportIncompatibleVariableOverride] + details: BetaEnvironmentArchivedErrorDetails # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_archived_error_details.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_archived_error_details.py new file mode 100644 index 0000000000000000000000000000000000000000..bac2c97d57cfede8b3c9a33ee80938de3e066700 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_archived_error_details.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaEnvironmentArchivedErrorDetails"] + + +class BetaEnvironmentArchivedErrorDetails(BaseModel): + """The environment is archived, so it cannot be updated.""" + + error_code: Literal["environment_archived"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_create_disabled_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_create_disabled_error.py new file mode 100644 index 0000000000000000000000000000000000000000..81cdd25631573a60e2288618b5284beeb382b621 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_create_disabled_error.py @@ -0,0 +1,16 @@ +from typing_extensions import Literal + +from ..._exceptions import PermissionDeniedError +from .beta_environment_create_disabled_error_details import BetaEnvironmentCreateDisabledErrorDetails + +__all__ = ["BetaEnvironmentCreateDisabledError"] + + +class BetaEnvironmentCreateDisabledError(PermissionDeniedError): + """Anthropic has turned off creating environments for this organization. + + Existing environments still work. + """ + + error_code: Literal["environment_create_disabled"] # pyright: ignore[reportIncompatibleVariableOverride] + details: BetaEnvironmentCreateDisabledErrorDetails # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_create_disabled_error_details.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_create_disabled_error_details.py new file mode 100644 index 0000000000000000000000000000000000000000..fbcccf551c477ca312b8644348ef2f53054150d6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_create_disabled_error_details.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaEnvironmentCreateDisabledErrorDetails"] + + +class BetaEnvironmentCreateDisabledErrorDetails(BaseModel): + """Anthropic has turned off creating environments for this organization. + + Existing environments still work. + """ + + error_code: Literal["environment_create_disabled"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_delete_response.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_delete_response.py new file mode 100644 index 0000000000000000000000000000000000000000..215943ae90df7e25ffcf57da234a75375496a225 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_delete_response.py @@ -0,0 +1,15 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaEnvironmentDeleteResponse"] + + +class BetaEnvironmentDeleteResponse(BaseModel): + """Response after deleting an environment.""" + + id: str + """Environment identifier""" + + type: Literal["environment_deleted"] + """The type of response""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_not_found_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_not_found_error.py new file mode 100644 index 0000000000000000000000000000000000000000..88cfd34d76b3ce7eecad99f5dede86fb1596ec77 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_not_found_error.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._exceptions import NotFoundError +from .beta_environment_not_found_error_details import BetaEnvironmentNotFoundErrorDetails + +__all__ = ["BetaEnvironmentNotFoundError"] + + +class BetaEnvironmentNotFoundError(NotFoundError): + """`settings.environment_id` names no Environment within the organization's reach.""" + + error_code: Literal["environment_not_found"] # pyright: ignore[reportIncompatibleVariableOverride] + details: BetaEnvironmentNotFoundErrorDetails # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_not_found_error_details.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_not_found_error_details.py new file mode 100644 index 0000000000000000000000000000000000000000..6350190a50c45ce22af344ce6140d47786aae59f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_not_found_error_details.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaEnvironmentNotFoundErrorDetails"] + + +class BetaEnvironmentNotFoundErrorDetails(BaseModel): + """`settings.environment_id` names no Environment within the organization's reach.""" + + error_code: Literal["environment_not_found"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_update_disabled_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_update_disabled_error.py new file mode 100644 index 0000000000000000000000000000000000000000..b25f2750408899266df7d046d162320e6c4684a9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_update_disabled_error.py @@ -0,0 +1,16 @@ +from typing_extensions import Literal + +from ..._exceptions import PermissionDeniedError +from .beta_environment_update_disabled_error_details import BetaEnvironmentUpdateDisabledErrorDetails + +__all__ = ["BetaEnvironmentUpdateDisabledError"] + + +class BetaEnvironmentUpdateDisabledError(PermissionDeniedError): + """Anthropic has turned off updating environments for this organization. + + Existing environments still work as they are. + """ + + error_code: Literal["environment_update_disabled"] # pyright: ignore[reportIncompatibleVariableOverride] + details: BetaEnvironmentUpdateDisabledErrorDetails # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_update_disabled_error_details.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_update_disabled_error_details.py new file mode 100644 index 0000000000000000000000000000000000000000..8c9aadd5499339eb1996ba9b8ff992ad679d7fe8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_environment_update_disabled_error_details.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaEnvironmentUpdateDisabledErrorDetails"] + + +class BetaEnvironmentUpdateDisabledErrorDetails(BaseModel): + """Anthropic has turned off updating environments for this organization. + + Existing environments still work as they are. + """ + + error_code: Literal["environment_update_disabled"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_block.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_block.py new file mode 100644 index 0000000000000000000000000000000000000000..19bb60cf508178c89fabf67907540d9a08a3ff00 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_block.py @@ -0,0 +1,43 @@ +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from .beta_fallback_info import BetaFallbackInfo +from .beta_fallback_refusal_trigger import BetaFallbackRefusalTrigger + +__all__ = ["BetaFallbackBlock"] + + +class BetaFallbackBlock(BaseModel): + """Marks the point in `content` where one model's output gives way to the next. + + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. + + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. + """ + + from_: BetaFallbackInfo = FieldInfo(alias="from") + """The model whose output ends at this point — the model that declined at this hop. + + When the declining hop is the requested model, its `model` echoes the top-level + `model` string the caller sent (alias or canonical); when the declining hop is a + fallback model, its `model` is that model's canonical id. + """ + + to: BetaFallbackInfo + """The fallback model producing the content that follows this block. + + Its `model` is always the canonical id. + """ + + trigger: BetaFallbackRefusalTrigger + """What caused the `from` model to hand over at this hop.""" + + type: Literal["fallback"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..39d65473a1030f4d4d67c5e8083335e76a94ce42 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_block_param.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +from .beta_fallback_info_param import BetaFallbackInfoParam + +__all__ = ["BetaFallbackBlockParam"] + +_BetaFallbackBlockParamReservedKeywords = TypedDict( + "_BetaFallbackBlockParamReservedKeywords", + { + "from": Required[BetaFallbackInfoParam], + }, + total=False, +) + + +class BetaFallbackBlockParam(_BetaFallbackBlockParamReservedKeywords, total=False): + """A `fallback` block echoed back from a prior response. + + Accepted in `messages[].content` and not rendered into the prompt; not + validated against the request's `fallbacks` chain or top-level `model`. + + When you send the assistant turn back, keep this block in its + original position. The block marks the boundary between content produced + before and after a fallback hop, and the server relies on that boundary + to validate the turn: when thinking runs flank the boundary, omitting + the block merges them into one span the server cannot validate (the + request is rejected), and moving it into the middle of a single run is + likewise rejected; between non-thinking blocks the block's placement has + no effect on thinking validation. + + Some blocks from before the turn's final `fallback` block must be left + out when you send the turn back, and no `tool_result` is sent for a + `tool_use` block you left out. + + See the [refusals and fallback guide](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#continuing-the-conversation) to learn which blocks to keep. + """ + + to: Required[BetaFallbackInfoParam] + """Identifies one hop of a fallback transition.""" + + type: Required[Literal["fallback"]] + + trigger: object + """The response block's `trigger`, echoed verbatim. + + Accepted and ignored by the server; any object or `null` is allowed. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_not_applied.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_not_applied.py new file mode 100644 index 0000000000000000000000000000000000000000..6f1c870a24f9e5368e4e9c19c226cd4508949b1e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_not_applied.py @@ -0,0 +1,42 @@ +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaFallbackCreditNotApplied"] + + +class BetaFallbackCreditNotApplied(BaseModel): + """No reprice was applied; ``reason`` says why.""" + + reason: Literal[ + "body_mismatch", + "continuation_excluded", + "continuation_only", + "expired", + "invalid_target_model", + "not_enabled", + "reprice_unavailable", + "temporarily_unavailable", + "variant_fields_present", + "wrong_organization", + "wrong_platform", + "wrong_workspace", + ] + """Why the reprice was not applied. + + A closed enum; additions to the redemption-check vocabulary arrive as deliberate + schema updates. + """ + + type: Literal["not_applied"] + + remove_to_redeem: Optional[List[str]] = None + """Request fields to remove before retrying, so the retry can redeem this token. + + Present exactly when `reason` is `variant_fields_present` — never null, never an + empty array; absent otherwise. Fields are named only from your own request, and + only after the sealed variant hash matched. A served best-effort retry has + already been billed at normal price; nothing redeems retroactively, but a + corrected re-send inside the token's five-minute window can still redeem. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_redeemed.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_redeemed.py new file mode 100644 index 0000000000000000000000000000000000000000..ce92ae5303f12d528dce63c4ef207f8bb21c3ef6 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_redeemed.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaFallbackCreditRedeemed"] + + +class BetaFallbackCreditRedeemed(BaseModel): + """ + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. + """ + + type: Literal["redeemed"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_token_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_token_param.py new file mode 100644 index 0000000000000000000000000000000000000000..63f38b851233ee3ebafd6c3cfd01289d3645a2c0 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_token_param.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaFallbackCreditTokenParam"] + + +class BetaFallbackCreditTokenParam(TypedDict, total=False): + """Object form of ``fallback_credit_token``: the token plus a redemption + mode. + + Requires ``anthropic-beta: fallback-credit-2026-07-01``; without that + header the field accepts the bare string only. The bare string and the + mode-less object are equivalent (both select ``strict``), so wrapping + an existing token changes nothing by itself. + """ + + token: Required[str] + """ + The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the + same string the bare-string form carries. + """ + + mode: Literal["strict", "best_effort"] + """How a failing token affects the retry. + + `strict` (the default, and the bare-string behavior): a failing redemption is a + 400 and the retry is not served. `best_effort`: the retry is served either way — + a token-layer failure no longer rejects the request; the retry proceeds at + normal price and the outcome is reported on the response's + `usage.fallback_credit`. Two failures stay hard in both modes: a malformed + token, and combining `fallback_credit_token` with `fallbacks`. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_usage.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_usage.py new file mode 100644 index 0000000000000000000000000000000000000000..c44b56f9a6a3ea35760379ed2278a7189dd1db17 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_credit_usage.py @@ -0,0 +1,25 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_fallback_credit_redeemed import BetaFallbackCreditRedeemed +from .beta_fallback_credit_not_applied import BetaFallbackCreditNotApplied + +__all__ = ["BetaFallbackCreditUsage", "Status"] + +Status: TypeAlias = Annotated[ + Union[BetaFallbackCreditRedeemed, BetaFallbackCreditNotApplied], UnionDiscriminator("type") +] + + +class BetaFallbackCreditUsage(BaseModel): + """Outcome of the ``fallback_credit_token`` presented on this request.""" + + status: Status + """Whether the fallback-credit reprice was applied to this response's billing. + + A union discriminated on `type`. `redeemed`: the retry is billed as if the + conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: no + reprice was applied; the arm's `reason` says why. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_info.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_info.py new file mode 100644 index 0000000000000000000000000000000000000000..e81bce661b50ba4d6cb72c0527001fcee2166b80 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_info.py @@ -0,0 +1,15 @@ +from ..model import Model +from ..._models import BaseModel + +__all__ = ["BetaFallbackInfo"] + + +class BetaFallbackInfo(BaseModel): + """Identifies one hop of a fallback transition.""" + + model: Model + """The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional + details and options. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_info_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_info_param.py new file mode 100644 index 0000000000000000000000000000000000000000..a026c730168118fda65b31035d32d4b6d5eae7a2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_info_param.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from ..model_param import ModelParam + +__all__ = ["BetaFallbackInfoParam"] + + +class BetaFallbackInfoParam(TypedDict, total=False): + """Identifies one hop of a fallback transition.""" + + model: Required[ModelParam] + """The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional + details and options. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_message_iteration_usage.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_message_iteration_usage.py new file mode 100644 index 0000000000000000000000000000000000000000..28d1c328e167bb16b34eb4cad899d26479cc1e03 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_message_iteration_usage.py @@ -0,0 +1,45 @@ +from typing import Optional +from typing_extensions import Literal + +from ..model import Model +from ..._models import BaseModel +from .beta_cache_creation import BetaCacheCreation + +__all__ = ["BetaFallbackMessageIterationUsage"] + + +class BetaFallbackMessageIterationUsage(BaseModel): + """Token usage for the fallback-model attempt of a server-side fallback request. + + The terminal entry of a fallback-served turn: when a fallback hop's + output is the returned message, the entry for the iteration that + completed it carries this type in place of `message`. A declined hop + and the serving hop's earlier tool-loop iterations produce `message` + entries. Whether a fallback model served the response is signalled by + the presence of this entry in `usage.iterations`. + """ + + cache_creation: Optional[BetaCacheCreation] = None + """Breakdown of cached tokens by TTL""" + + cache_creation_input_tokens: int + """The number of input tokens used to create the cache entry.""" + + cache_read_input_tokens: int + """The number of input tokens read from the cache.""" + + input_tokens: int + """The number of input tokens which were used.""" + + model: Model + """The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional + details and options. + """ + + output_tokens: int + """The number of output tokens which were used.""" + + type: Literal["fallback_message"] + """Usage for the fallback-model attempt that served the response""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_param.py new file mode 100644 index 0000000000000000000000000000000000000000..7dc954ec65e2fff1f622075ff33c91fb7dd1d6db --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_param.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from typing import Union, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from ..model_param import ModelParam +from .beta_output_config_param import BetaOutputConfigParam +from .beta_thinking_config_enabled_param import BetaThinkingConfigEnabledParam +from .beta_thinking_config_adaptive_param import BetaThinkingConfigAdaptiveParam +from .beta_thinking_config_disabled_param import BetaThinkingConfigDisabledParam +from .beta_thinking_config_between_tools_param import BetaThinkingConfigBetweenToolsParam + +__all__ = ["BetaFallbackParam", "Thinking"] + +Thinking: TypeAlias = Union[ + BetaThinkingConfigEnabledParam, + BetaThinkingConfigDisabledParam, + BetaThinkingConfigBetweenToolsParam, + BetaThinkingConfigAdaptiveParam, +] + + +class BetaFallbackParam(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] + """One entry in the `fallbacks` chain on a `/v1/messages` request. + + `model` is required. The override fields (`max_tokens`, `thinking`, + `output_config`, and `speed`) set the corresponding parameter for this + attempt only and are validated as if the request were made to `model`. + Any other key is rejected at parse time. + """ + + model: Required[ModelParam] + """The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional + details and options. + """ + + max_tokens: Optional[int] + """ + The `max_tokens` for the fallback attempt that uses this `fallbacks` entry's + `model`, in place of the request's `max_tokens`. If you leave it out or set it + to `null`, the attempt uses the request's `max_tokens`. + + See the + [refusals and fallback guide](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#naming-your-own-fallback-models) + to learn more about fallback entries. + """ + + output_config: Optional[BetaOutputConfigParam] + """ + Output parameters for the fallback attempt that uses this `fallbacks` entry's + `model`, combined with the request's `output_config` one field at a time. + + - `format`: If you leave it out, the attempt uses the request's `format`. If you + set it to `null`, the attempt runs without a format. + - `effort`: If you leave it out, the attempt uses the request's `effort` when + `model` supports that level with the attempt's `thinking`. If the request + doesn't set `effort`, if `model` doesn't support the level, or if you set + `effort` to `null`, the attempt runs at the default effort of `model`. + - `task_budget`: If you leave it out, the attempt uses the request's + `task_budget` when `model` accepts a task budget of that size. If the request + doesn't set `task_budget`, if `model` doesn't accept it, or if you set + `task_budget` to `null`, the attempt runs without a task budget. + + Set `output_config` to `null` to run the attempt without a format or a task + budget, at the default effort of `model`. + + These rules apply with the `server-side-fallback-2026-07-01` beta header. + """ + + speed: Optional[Literal["standard", "fast"]] + """ + The inference speed mode for the fallback attempt that uses this `fallbacks` + entry's `model`. If you leave it out, the attempt runs at `fast` speed only when + the request sets `speed` to `fast` and your organization can use fast mode on + `model`. + + Otherwise, or when you set this field to `null`, the attempt runs at `standard` + speed. + + These rules apply with the `server-side-fallback-2026-07-01` beta header. + """ + + thinking: Optional[Thinking] + """ + The thinking configuration for the fallback attempt that uses this `fallbacks` + entry's `model`. If you leave it out, the attempt uses the request's `thinking` + when `model` supports that thinking `type`. + + If you leave it out and the request's thinking `type` is `between_tools` but + `model` doesn't support `between_tools`, the attempt uses `disabled` if `model` + supports it. Otherwise, if `model` doesn't support the request's thinking + `type`, if the request doesn't set `thinking`, or if you set this field to + `null`, the attempt uses the thinking `type` that `model` uses when a request + leaves out `thinking`. The request's `thinking.display` still applies where + `model` allows it. + + These rules apply with the `server-side-fallback-2026-07-01` beta header. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_refusal_trigger.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_refusal_trigger.py new file mode 100644 index 0000000000000000000000000000000000000000..6412c239a39e7c31965d612fc397d80f71c9ccea --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallback_refusal_trigger.py @@ -0,0 +1,34 @@ +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaFallbackRefusalTrigger"] + + +class BetaFallbackRefusalTrigger(BaseModel): + """The `from` model declined for policy reasons.""" + + category: Optional[Literal["cyber", "bio", "frontier_llm", "reasoning_extraction", "general_harms"]] = None + """The policy category that triggered the `from` model's refusal at this hop. + + `null` when the refusal doesn't map to a named category. Same vocabulary as + `stop_details.category`. + + - `cyber` - The request could enable cyber harm, such as malware or exploit + development. Benign cybersecurity work can also trigger this category. + - `bio` - The request could enable biological harm, such as dangerous lab + methods. Beneficial life sciences work can also trigger this category. + - `frontier_llm` - The request could assist the development of competing AI + models, which is restricted under + [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). + Benign machine learning work can also trigger this category. + - `reasoning_extraction` - The request asks the model to reproduce its internal + reasoning in the response text. To get reasoning in a structured form instead, + use + [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + - `general_harms` - The request could be related to an area that was determined + as harmful. Benign work might sometimes trigger this category. + """ + + type: Literal["refusal"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallbacks_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallbacks_param.py new file mode 100644 index 0000000000000000000000000000000000000000..1961c3cd2d68c4751bd094ed219a8d56fca3d797 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_fallbacks_param.py @@ -0,0 +1,10 @@ +from __future__ import annotations + +from typing import Union, Iterable +from typing_extensions import Literal, TypeAlias + +from .beta_fallback_param import BetaFallbackParam + +__all__ = ["BetaFallbacksParam"] + +BetaFallbacksParam: TypeAlias = Union[Iterable[BetaFallbackParam], Literal["default"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_document_source_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_document_source_param.py new file mode 100644 index 0000000000000000000000000000000000000000..a107bc07cdf60f129450a0435f58e881aff7c72d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_document_source_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaFileDocumentSourceParam"] + + +class BetaFileDocumentSourceParam(TypedDict, total=False): + file_id: Required[str] + + type: Required[Literal["file"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_image_source_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_image_source_param.py new file mode 100644 index 0000000000000000000000000000000000000000..8a373d630012c7a35bfa05fbcede5acd0d76232f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_image_source_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaFileImageSourceParam"] + + +class BetaFileImageSourceParam(TypedDict, total=False): + file_id: Required[str] + + type: Required[Literal["file"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_metadata.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..9c18f3da316064a77fcf0de8a66ee15413c63d92 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_metadata.py @@ -0,0 +1,50 @@ +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_file_scope import BetaFileScope + +__all__ = ["BetaFileMetadata"] + + +class BetaFileMetadata(BaseModel): + id: str + """Unique object identifier. + + The format and length of IDs may change over time. + """ + + created_at: datetime + """RFC 3339 datetime string representing when the file was created.""" + + filename: str + """Original filename of the uploaded file.""" + + mime_type: str + """MIME type of the file.""" + + size_bytes: int + """Size of the file in bytes.""" + + type: Literal["file"] + """Object type. + + For files, this is always `"file"`. + """ + + downloadable: Optional[bool] = None + """Whether the file can be downloaded.""" + + expires_at: Optional[datetime] = None + """ + RFC 3339 datetime string representing when the file will expire and become + unavailable for download. Null if the file does not expire. For files uploaded + with `expires_in_seconds`, this is the upload time plus that value. + """ + + scope: Optional[BetaFileScope] = None + """ + The scope of this file, indicating the context in which it was created (e.g., a + session). + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_scope.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_scope.py new file mode 100644 index 0000000000000000000000000000000000000000..ec5adef7126165b33f3671652d35b9d736f172a5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_file_scope.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaFileScope"] + + +class BetaFileScope(BaseModel): + id: str + """The ID of the scoping resource (e.g., the session ID).""" + + type: Literal["session"] + """The type of scope (e.g., `"session"`).""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_image_block_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_image_block_param.py new file mode 100644 index 0000000000000000000000000000000000000000..88fadca3b119ee88b4c8a106a3fe2dddb12178f5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_image_block_param.py @@ -0,0 +1,31 @@ +from __future__ import annotations + +from typing import Union, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from .beta_url_image_source_param import BetaURLImageSourceParam +from .beta_file_image_source_param import BetaFileImageSourceParam +from .beta_base64_image_source_param import BetaBase64ImageSourceParam +from .beta_image_transformations_param import BetaImageTransformationsParam +from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam + +__all__ = ["BetaImageBlockParam", "Source"] + +Source: TypeAlias = Union[BetaBase64ImageSourceParam, BetaURLImageSourceParam, BetaFileImageSourceParam] + + +class BetaImageBlockParam(TypedDict, total=False): + source: Required[Source] + + type: Required[Literal["image"]] + + cache_control: Optional[BetaCacheControlEphemeralParam] + """Create a cache control breakpoint at this content block.""" + + transformations: Optional[BetaImageTransformationsParam] + """ + Configures the transformations the server applies to this image before the model + observes it. Each key names a condition the server transforms images for; its + value selects the transformation applied. Omitted keys keep their default + behavior, and an empty object is equivalent to omitting the field. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_image_transformations_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_image_transformations_param.py new file mode 100644 index 0000000000000000000000000000000000000000..e796196476da26ac03280e2ddf1b86e64ddba9c3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_image_transformations_param.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["BetaImageTransformationsParam"] + + +class BetaImageTransformationsParam(TypedDict, total=False): + """ + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + """ + + oversized_image: Literal["downsize", "error"] + """What the server does when this image exceeds the model's maximum image size. + + `"downsize"` (the default) scales the image down to fit, which changes the + dimensions the model observes without telling you. `"error"` instead rejects the + request with a 400 error naming the image's dimensions and the largest + dimensions that fit, so you can scale the image deliberately — your image is + never silently scaled down. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_json_delta.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_json_delta.py new file mode 100644 index 0000000000000000000000000000000000000000..ae35794bf2f06b8a075b523f19475d88dbdb3470 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_json_delta.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaInputJSONDelta"] + + +class BetaInputJSONDelta(BaseModel): + partial_json: str + + type: Literal["input_json_delta"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_tokens_clear_at_least_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_tokens_clear_at_least_param.py new file mode 100644 index 0000000000000000000000000000000000000000..bbf8f27031ebafe4d4c9b19ab6753ed597c78ec5 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_tokens_clear_at_least_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaInputTokensClearAtLeastParam"] + + +class BetaInputTokensClearAtLeastParam(TypedDict, total=False): + type: Required[Literal["input_tokens"]] + + value: Required[int] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_tokens_trigger_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_tokens_trigger_param.py new file mode 100644 index 0000000000000000000000000000000000000000..79a7f7e067c411b23691d17baff881e884b298a3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_tokens_trigger_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaInputTokensTriggerParam"] + + +class BetaInputTokensTriggerParam(TypedDict, total=False): + type: Required[Literal["input_tokens"]] + + value: Required[int] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_transformation.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_transformation.py new file mode 100644 index 0000000000000000000000000000000000000000..73356bf2564bbe5ef6464aef372fb0b6387a142a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_input_transformation.py @@ -0,0 +1,13 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_thinking_dropped_input_transformation import BetaThinkingDroppedInputTransformation +from .beta_thinking_mismatch_allowed_input_transformation import BetaThinkingMismatchAllowedInputTransformation + +__all__ = ["BetaInputTransformation"] + +BetaInputTransformation: TypeAlias = Annotated[ + Union[BetaThinkingDroppedInputTransformation, BetaThinkingMismatchAllowedInputTransformation], + UnionDiscriminator("type"), +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_config_type_change_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_config_type_change_error.py new file mode 100644 index 0000000000000000000000000000000000000000..592ef21dd1c0adf35c8931dda80c830101c44301 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_config_type_change_error.py @@ -0,0 +1,15 @@ +from typing_extensions import Literal + +from ..._exceptions import BadRequestError +from .beta_invalid_config_type_change_error_details import BetaInvalidConfigTypeChangeErrorDetails + +__all__ = ["BetaInvalidConfigTypeChangeError"] + + +class BetaInvalidConfigTypeChangeError(BadRequestError): + """ + `config.type` differs from the environment's stored type, which cannot change after creation. + """ + + error_code: Literal["invalid_config_type_change"] # pyright: ignore[reportIncompatibleVariableOverride] + details: BetaInvalidConfigTypeChangeErrorDetails # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_config_type_change_error_details.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_config_type_change_error_details.py new file mode 100644 index 0000000000000000000000000000000000000000..740ed8af6fcbd6539a4431c9ba742d2db0942672 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_config_type_change_error_details.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaInvalidConfigTypeChangeErrorDetails"] + + +class BetaInvalidConfigTypeChangeErrorDetails(BaseModel): + """ + `config.type` differs from the environment's stored type, which cannot change after creation. + """ + + error_code: Literal["invalid_config_type_change"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_metadata_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_metadata_error.py new file mode 100644 index 0000000000000000000000000000000000000000..0c84f6c58cea819ad09a29a58bdd60c067eb5954 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_metadata_error.py @@ -0,0 +1,16 @@ +from typing_extensions import Literal + +from ..._exceptions import BadRequestError +from .beta_invalid_metadata_error_details import BetaInvalidMetadataErrorDetails + +__all__ = ["BetaInvalidMetadataError"] + + +class BetaInvalidMetadataError(BadRequestError): + """`metadata` has too many keys, a key or value that is too long, or a reserved key. + + The message names each problem. + """ + + error_code: Literal["invalid_metadata"] # pyright: ignore[reportIncompatibleVariableOverride] + details: BetaInvalidMetadataErrorDetails # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_metadata_error_details.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_metadata_error_details.py new file mode 100644 index 0000000000000000000000000000000000000000..2e0102758e80e6bcc15756f9fc0085e71bfa8d91 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_invalid_metadata_error_details.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaInvalidMetadataErrorDetails"] + + +class BetaInvalidMetadataErrorDetails(BaseModel): + """`metadata` has too many keys, a key or value that is too long, or a reserved key. + + The message names each problem. + """ + + error_code: Literal["invalid_metadata"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_iterations_usage.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_iterations_usage.py new file mode 100644 index 0000000000000000000000000000000000000000..2a6ce5df50a14aad375b7f2625d6ba9d4b0e1df8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_iterations_usage.py @@ -0,0 +1,22 @@ +from typing import List, Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_message_iteration_usage import BetaMessageIterationUsage +from .beta_compaction_iteration_usage import BetaCompactionIterationUsage +from .beta_advisor_message_iteration_usage import BetaAdvisorMessageIterationUsage +from .beta_fallback_message_iteration_usage import BetaFallbackMessageIterationUsage + +__all__ = ["BetaIterationsUsage", "BetaIterationsUsageItem"] + +BetaIterationsUsageItem: TypeAlias = Annotated[ + Union[ + BetaMessageIterationUsage, + BetaCompactionIterationUsage, + BetaAdvisorMessageIterationUsage, + BetaFallbackMessageIterationUsage, + ], + UnionDiscriminator("type"), +] + +BetaIterationsUsage: TypeAlias = List[BetaIterationsUsageItem] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_json_output_format_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_json_output_format_param.py new file mode 100644 index 0000000000000000000000000000000000000000..1d43a083567d4959a0a03ab10480c881f190a0ec --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_json_output_format_param.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from typing import Dict +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaJSONOutputFormatParam"] + + +class BetaJSONOutputFormatParam(TypedDict, total=False): + schema: Required[Dict[str, object]] + """The JSON schema of the format""" + + type: Required[Literal["json_schema"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_limited_network.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_limited_network.py new file mode 100644 index 0000000000000000000000000000000000000000..ab1f75ad19be6cd51e86a829795778aa695f84a7 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_limited_network.py @@ -0,0 +1,28 @@ +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaLimitedNetwork"] + + +class BetaLimitedNetwork(BaseModel): + """Limited network access.""" + + allow_mcp_servers: bool + """ + Permits outbound access to MCP server endpoints configured on the agent, beyond + those listed in the `allowed_hosts` array. + """ + + allow_package_managers: bool + """ + Permits outbound access to public package registries (PyPI, npm, etc.) beyond + those listed in the `allowed_hosts` array. + """ + + allowed_hosts: List[str] + """Specifies domains the container can reach.""" + + type: Literal["limited"] + """Network policy type""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_limited_network_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_limited_network_params.py new file mode 100644 index 0000000000000000000000000000000000000000..e9b23886f16c2ced0713bae0ef5366d9ea7ff853 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_limited_network_params.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +from ..._types import SequenceNotStr + +__all__ = ["BetaLimitedNetworkParams"] + + +class BetaLimitedNetworkParams(TypedDict, total=False): + """Limited network request params. + + Fields default to null; on update, omitted fields preserve the + existing value. + """ + + type: Required[Literal["limited"]] + """Network policy type""" + + allow_mcp_servers: Optional[bool] + """ + Permits outbound access to MCP server endpoints configured on the agent, beyond + those listed in the `allowed_hosts` array. Defaults to `false`. + """ + + allow_package_managers: Optional[bool] + """ + Permits outbound access to public package registries (PyPI, npm, etc.) beyond + those listed in the `allowed_hosts` array. Defaults to `false` on creation. Must + be `true` when `packages` are specified. + """ + + allowed_hosts: Optional[SequenceNotStr[str]] + """Specifies domains the container can reach.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_advisor.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_advisor.py new file mode 100644 index 0000000000000000000000000000000000000000..ca846eed190bc7041719329dbda715bbcd6900d8 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_advisor.py @@ -0,0 +1,16 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAdvisor"] + + +class BetaManagedAgentsAdvisor(BaseModel): + """ + Platform advisor roster entry: a model the session's primary thread may consult mid-turn. + """ + + model: str + """The advisor model id.""" + + type: Literal["advisor"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_advisor_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_advisor_params.py new file mode 100644 index 0000000000000000000000000000000000000000..092cc27bd606f54ec96f4abb9ff60af5803b0082 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_advisor_params.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAdvisorParams"] + + +class BetaManagedAgentsAdvisorParams(TypedDict, total=False): + """ + Platform advisor roster entry: a model the session's primary thread may consult mid-turn. At most one per roster; the entry occupies the roster name `anthropic.advisor`. + """ + + model: Required[str] + """A Claude model id. + + The model must be permitted as an advisor for this agent's model. + """ + + type: Required[Literal["advisor"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent.py new file mode 100644 index 0000000000000000000000000000000000000000..c417a55a17e4f644253a7e99a7bfb7db6c505bfb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent.py @@ -0,0 +1,75 @@ +from typing import Dict, List, Union, Optional +from datetime import datetime +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_managed_agents_multiagent import BetaManagedAgentsMultiagent +from .beta_managed_agents_custom_tool import BetaManagedAgentsCustomTool +from .beta_managed_agents_mcp_toolset import BetaManagedAgentsMCPToolset +from .beta_managed_agents_custom_skill import BetaManagedAgentsCustomSkill +from .beta_managed_agents_model_config import BetaManagedAgentsModelConfig +from .beta_managed_agents_anthropic_skill import BetaManagedAgentsAnthropicSkill +from .beta_managed_agents_execution_identity import BetaManagedAgentsExecutionIdentity +from .beta_managed_agents_agent_toolset20260401 import BetaManagedAgentsAgentToolset20260401 +from .beta_managed_agents_mcp_server_url_definition import BetaManagedAgentsMCPServerURLDefinition + +__all__ = ["BetaManagedAgentsAgent", "Skill", "Tool"] + +Skill: TypeAlias = Annotated[ + Union[BetaManagedAgentsAnthropicSkill, BetaManagedAgentsCustomSkill], UnionDiscriminator("type") +] + +Tool: TypeAlias = Annotated[ + Union[BetaManagedAgentsAgentToolset20260401, BetaManagedAgentsMCPToolset, BetaManagedAgentsCustomTool], + UnionDiscriminator("type"), +] + + +class BetaManagedAgentsAgent(BaseModel): + """A Managed Agents `agent`.""" + + id: str + + archived_at: Optional[datetime] = None + """When the agent was archived. Null if not archived.""" + + created_at: datetime + """A timestamp in RFC 3339 format""" + + description: Optional[str] = None + + execution_identity: BetaManagedAgentsExecutionIdentity + """Execution principal for runs of this agent. + + Always present; `{"type": "service_account"}` when runs carry no customer-named + principal. + """ + + mcp_servers: List[BetaManagedAgentsMCPServerURLDefinition] + + metadata: Dict[str, str] + + model: BetaManagedAgentsModelConfig + """Model identifier and configuration.""" + + multiagent: Optional[BetaManagedAgentsMultiagent] = None + """Multiagent orchestration configuration. Null when the agent is single-threaded.""" + + name: str + + skills: List[Skill] + + system: Optional[str] = None + + tools: List[Tool] + + type: Literal["agent"] + + updated_at: datetime + """A timestamp in RFC 3339 format""" + + version: int + """The agent's current version. + + Starts at 1 and increments when the agent is modified. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_archived_deployment_paused_reason_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_archived_deployment_paused_reason_error.py new file mode 100644 index 0000000000000000000000000000000000000000..83c32105aa2a223c35c3ddb3231063cee63fcb4a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_archived_deployment_paused_reason_error.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentArchivedDeploymentPausedReasonError"] + + +class BetaManagedAgentsAgentArchivedDeploymentPausedReasonError(BaseModel): + """The deployment's agent was archived.""" + + type: Literal["agent_archived_error"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_archived_run_error.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_archived_run_error.py new file mode 100644 index 0000000000000000000000000000000000000000..519b2a16d73c7ee81c7d3b9e68c4c9bb9dfe4ce3 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_archived_run_error.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentArchivedRunError"] + + +class BetaManagedAgentsAgentArchivedRunError(BaseModel): + """The deployment's agent was archived.""" + + message: str + """Human-readable error description.""" + + type: Literal["agent_archived_error"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_message_preview.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_message_preview.py new file mode 100644 index 0000000000000000000000000000000000000000..d311f68c1787599fa95d174f154bf5f3c7fedf78 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_message_preview.py @@ -0,0 +1,15 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentMessagePreview"] + + +class BetaManagedAgentsAgentMessagePreview(BaseModel): + id: str + """The id the buffered agent.message will carry if it is emitted. + + Matches the event_id on this preview's event_delta events. + """ + + type: Literal["agent.message"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_params.py new file mode 100644 index 0000000000000000000000000000000000000000..2eb32bbd0c080c2009577bf389e5a0566d69b420 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_params.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAgentParams"] + + +class BetaManagedAgentsAgentParams(TypedDict, total=False): + """Specification for an Agent. + + Provide a specific `version` or use the short-form `agent="agent_id"` for the most recent version + """ + + id: Required[str] + """The `agent` ID.""" + + type: Required[Literal["agent"]] + + version: int + """The specific `agent` version to use. + + Omit to use the latest version. Must be at least 1 if specified. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_reference.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_reference.py new file mode 100644 index 0000000000000000000000000000000000000000..709f3f30f5bb7264ddd9cb6d55fc3f9a184e1bd9 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_reference.py @@ -0,0 +1,15 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentReference"] + + +class BetaManagedAgentsAgentReference(BaseModel): + """A resolved agent reference with a concrete version.""" + + id: str + + type: Literal["agent"] + + version: int diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_thinking_preview.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_thinking_preview.py new file mode 100644 index 0000000000000000000000000000000000000000..7d63b5312d8540d63de481857643238a8d6cc7eb --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_thinking_preview.py @@ -0,0 +1,15 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentThinkingPreview"] + + +class BetaManagedAgentsAgentThinkingPreview(BaseModel): + id: str + """The id the buffered agent.thinking will carry if it is emitted. + + Start-only — no event_delta events follow. + """ + + type: Literal["agent.thinking"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_tool_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_tool_config.py new file mode 100644 index 0000000000000000000000000000000000000000..43fb04e7e520fa9983c189ef83e0745187824295 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_tool_config.py @@ -0,0 +1,28 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import UnionDiscriminator +from .beta_managed_agents_bash_tool_config import BetaManagedAgentsBashToolConfig +from .beta_managed_agents_edit_tool_config import BetaManagedAgentsEditToolConfig +from .beta_managed_agents_glob_tool_config import BetaManagedAgentsGlobToolConfig +from .beta_managed_agents_grep_tool_config import BetaManagedAgentsGrepToolConfig +from .beta_managed_agents_read_tool_config import BetaManagedAgentsReadToolConfig +from .beta_managed_agents_write_tool_config import BetaManagedAgentsWriteToolConfig +from .beta_managed_agents_web_fetch_tool_config import BetaManagedAgentsWebFetchToolConfig +from .beta_managed_agents_web_search_tool_config import BetaManagedAgentsWebSearchToolConfig + +__all__ = ["BetaManagedAgentsAgentToolConfig"] + +BetaManagedAgentsAgentToolConfig: TypeAlias = Annotated[ + Union[ + BetaManagedAgentsBashToolConfig, + BetaManagedAgentsEditToolConfig, + BetaManagedAgentsReadToolConfig, + BetaManagedAgentsWriteToolConfig, + BetaManagedAgentsGlobToolConfig, + BetaManagedAgentsGrepToolConfig, + BetaManagedAgentsWebFetchToolConfig, + BetaManagedAgentsWebSearchToolConfig, + ], + UnionDiscriminator("type"), +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_tool_config_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_tool_config_params.py new file mode 100644 index 0000000000000000000000000000000000000000..8a3358fe83efaa7931eabba2b981e4f967919c06 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_tool_config_params.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import Union +from typing_extensions import TypeAlias + +from .beta_managed_agents_bash_tool_config_params import BetaManagedAgentsBashToolConfigParams +from .beta_managed_agents_edit_tool_config_params import BetaManagedAgentsEditToolConfigParams +from .beta_managed_agents_glob_tool_config_params import BetaManagedAgentsGlobToolConfigParams +from .beta_managed_agents_grep_tool_config_params import BetaManagedAgentsGrepToolConfigParams +from .beta_managed_agents_read_tool_config_params import BetaManagedAgentsReadToolConfigParams +from .beta_managed_agents_write_tool_config_params import BetaManagedAgentsWriteToolConfigParams +from .beta_managed_agents_web_fetch_tool_config_params import BetaManagedAgentsWebFetchToolConfigParams +from .beta_managed_agents_web_search_tool_config_params import BetaManagedAgentsWebSearchToolConfigParams + +__all__ = ["BetaManagedAgentsAgentToolConfigParams"] + +BetaManagedAgentsAgentToolConfigParams: TypeAlias = Union[ + BetaManagedAgentsBashToolConfigParams, + BetaManagedAgentsEditToolConfigParams, + BetaManagedAgentsReadToolConfigParams, + BetaManagedAgentsWriteToolConfigParams, + BetaManagedAgentsGlobToolConfigParams, + BetaManagedAgentsGrepToolConfigParams, + BetaManagedAgentsWebFetchToolConfigParams, + BetaManagedAgentsWebSearchToolConfigParams, +] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401.py new file mode 100644 index 0000000000000000000000000000000000000000..9ba35af81e9e30bba3e8c49a88d790c4f0fb36f1 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401.py @@ -0,0 +1,17 @@ +from typing import List +from typing_extensions import Literal + +from ..._models import BaseModel +from .beta_managed_agents_agent_tool_config import BetaManagedAgentsAgentToolConfig +from .beta_managed_agents_agent_toolset_default_config import BetaManagedAgentsAgentToolsetDefaultConfig + +__all__ = ["BetaManagedAgentsAgentToolset20260401"] + + +class BetaManagedAgentsAgentToolset20260401(BaseModel): + configs: List[BetaManagedAgentsAgentToolConfig] + + default_config: BetaManagedAgentsAgentToolsetDefaultConfig + """Resolved default configuration for agent tools.""" + + type: Literal["agent_toolset_20260401"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_bash_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_bash_input.py new file mode 100644 index 0000000000000000000000000000000000000000..75866e928aa06244364a385342b97e7b0db61dbe --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_bash_input.py @@ -0,0 +1,30 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentToolset20260401BashInput"] + + +class BetaManagedAgentsAgentToolset20260401BashInput(BaseModel): + """Input payload for the `bash` tool of the + `agent_toolset_20260401` toolset. + + All fields are optional; + a normal invocation supplies `command`, while `restart=true` + (with no `command`) reboots the runner-side bash session. + """ + + command: Optional[str] = None + """Shell command to execute. Omit only when `restart` is true.""" + + restart: Optional[bool] = None + """When true, restart the persistent bash session instead of running a command. + + Subsequent calls without `restart` will run against the fresh session. + """ + + timeout_ms: Optional[int] = None + """Per-call timeout in milliseconds. + + Defaults to the runner-wide tool timeout when omitted or zero. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_edit_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_edit_input.py new file mode 100644 index 0000000000000000000000000000000000000000..dd1e6d43f9658d6fdd79f202559692ff79fb3d81 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_edit_input.py @@ -0,0 +1,29 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentToolset20260401EditInput"] + + +class BetaManagedAgentsAgentToolset20260401EditInput(BaseModel): + """Input payload for the `edit` tool. + + Performs a string + replacement in the named file; by default `old_string` must + occur exactly once. + """ + + file_path: str + """Path of the file to edit.""" + + new_string: str + """Replacement text.""" + + old_string: str + """Substring to find and replace.""" + + replace_all: Optional[bool] = None + """ + When true, replace every occurrence of `old_string` instead of requiring a + unique match. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_glob_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_glob_input.py new file mode 100644 index 0000000000000000000000000000000000000000..f878c843c4c6c535a46b732042f3872fb29164ba --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_glob_input.py @@ -0,0 +1,26 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentToolset20260401GlobInput"] + + +class BetaManagedAgentsAgentToolset20260401GlobInput(BaseModel): + """Input payload for the `glob` tool. + + Returns paths matching a + doublestar glob pattern, newest first. + """ + + pattern: str + """Doublestar glob pattern (e.g. + + `**/*.go`). Absolute patterns are only permitted when the runner is configured + to allow them. + """ + + path: Optional[str] = None + """Optional directory root to search under. + + Defaults to the runner's working directory. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_grep_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_grep_input.py new file mode 100644 index 0000000000000000000000000000000000000000..0382b2542807b20f0facbb0b75c87c94a53bf513 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_grep_input.py @@ -0,0 +1,22 @@ +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentToolset20260401GrepInput"] + + +class BetaManagedAgentsAgentToolset20260401GrepInput(BaseModel): + """Input payload for the `grep` tool. + + Searches file contents for + a regular expression, returning matching lines. + """ + + pattern: str + """Regular expression to search for.""" + + path: Optional[str] = None + """Optional directory root to search under. + + Defaults to the runner's working directory. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_params.py new file mode 100644 index 0000000000000000000000000000000000000000..43337d85ebe7f7efa902b9a3d59011806e3047dd --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_params.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from typing import Iterable, Optional +from typing_extensions import Literal, Required, TypedDict + +from .beta_managed_agents_agent_tool_config_params import BetaManagedAgentsAgentToolConfigParams +from .beta_managed_agents_agent_toolset_default_config_params import BetaManagedAgentsAgentToolsetDefaultConfigParams + +__all__ = ["BetaManagedAgentsAgentToolset20260401Params"] + + +class BetaManagedAgentsAgentToolset20260401Params(TypedDict, total=False): + """Configuration for built-in agent tools. + + Use this to enable or disable groups of tools available to the agent. + """ + + type: Required[Literal["agent_toolset_20260401"]] + + configs: Iterable[BetaManagedAgentsAgentToolConfigParams] + """Per-tool configuration overrides.""" + + default_config: Optional[BetaManagedAgentsAgentToolsetDefaultConfigParams] + """Default configuration applied to all tools in this set.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_read_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_read_input.py new file mode 100644 index 0000000000000000000000000000000000000000..adf8d806e01b348d502eae11950407246f179fff --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_read_input.py @@ -0,0 +1,24 @@ +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentToolset20260401ReadInput"] + + +class BetaManagedAgentsAgentToolset20260401ReadInput(BaseModel): + """Input payload for the `read` tool. + + Reads file contents + relative to the runner's working directory (or absolute when + the runner permits). + """ + + file_path: str + """Path of the file to read.""" + + view_range: Optional[List[int]] = None + """Optional `[start_line, end_line]` 1-indexed inclusive range. + + When omitted the entire file is returned. `end_line` of 0 or negative means "to + end of file". + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_write_input.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_write_input.py new file mode 100644 index 0000000000000000000000000000000000000000..8cbde7b69cca8089b53ae3382a9861e6c5325f23 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset20260401_write_input.py @@ -0,0 +1,17 @@ +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAgentToolset20260401WriteInput"] + + +class BetaManagedAgentsAgentToolset20260401WriteInput(BaseModel): + """Input payload for the `write` tool. + + Writes (overwriting) the + entire file contents. + """ + + content: str + """Full file contents to write.""" + + file_path: str + """Path of the file to write.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset_default_config.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset_default_config.py new file mode 100644 index 0000000000000000000000000000000000000000..9bd8270d48c4709c17f4ad20fcd77079042af8ee --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset_default_config.py @@ -0,0 +1,23 @@ +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._models import BaseModel, UnionDiscriminator +from .beta_managed_agents_auto_policy import BetaManagedAgentsAutoPolicy +from .beta_managed_agents_always_ask_policy import BetaManagedAgentsAlwaysAskPolicy +from .beta_managed_agents_always_allow_policy import BetaManagedAgentsAlwaysAllowPolicy + +__all__ = ["BetaManagedAgentsAgentToolsetDefaultConfig", "PermissionPolicy"] + +PermissionPolicy: TypeAlias = Annotated[ + Union[BetaManagedAgentsAlwaysAllowPolicy, BetaManagedAgentsAlwaysAskPolicy, BetaManagedAgentsAutoPolicy], + UnionDiscriminator("type"), +] + + +class BetaManagedAgentsAgentToolsetDefaultConfig(BaseModel): + """Resolved default configuration for agent tools.""" + + enabled: bool + + permission_policy: PermissionPolicy + """Permission policy for tool execution.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset_default_config_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset_default_config_params.py new file mode 100644 index 0000000000000000000000000000000000000000..5c92e7fcbc8b771a647095575a24070d4c1d1bf4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_toolset_default_config_params.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from typing import Union, Optional +from typing_extensions import TypeAlias, TypedDict + +from .beta_managed_agents_auto_policy_param import BetaManagedAgentsAutoPolicyParam +from .beta_managed_agents_always_ask_policy_param import BetaManagedAgentsAlwaysAskPolicyParam +from .beta_managed_agents_always_allow_policy_param import BetaManagedAgentsAlwaysAllowPolicyParam + +__all__ = ["BetaManagedAgentsAgentToolsetDefaultConfigParams", "PermissionPolicy"] + +PermissionPolicy: TypeAlias = Union[ + BetaManagedAgentsAlwaysAllowPolicyParam, BetaManagedAgentsAlwaysAskPolicyParam, BetaManagedAgentsAutoPolicyParam +] + + +class BetaManagedAgentsAgentToolsetDefaultConfigParams(TypedDict, total=False): + """Default configuration for all tools in a toolset.""" + + enabled: Optional[bool] + """Whether tools are enabled and available to Claude by default. + + Defaults to true if not specified. + """ + + permission_policy: Optional[PermissionPolicy] + """Default permission policy for tools. + + Controls whether tool calls are auto-approved or require confirmation. + """ diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_with_overrides_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_with_overrides_params.py new file mode 100644 index 0000000000000000000000000000000000000000..45b178321af851967692b437b9f90de0c1b3912e --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_agent_with_overrides_params.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from typing import Union, Iterable, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from .beta_managed_agents_model_param import BetaManagedAgentsModelParam +from .beta_managed_agents_skill_params import BetaManagedAgentsSkillParams +from .beta_managed_agents_custom_tool_params import BetaManagedAgentsCustomToolParams +from .beta_managed_agents_mcp_toolset_params import BetaManagedAgentsMCPToolsetParams +from .beta_managed_agents_model_config_params import BetaManagedAgentsModelConfigParams +from .beta_managed_agents_url_mcp_server_params import BetaManagedAgentsURLMCPServerParams +from .beta_managed_agents_agent_toolset20260401_params import BetaManagedAgentsAgentToolset20260401Params + +__all__ = ["BetaManagedAgentsAgentWithOverridesParams", "Model", "Tool"] + +Model: TypeAlias = Union[BetaManagedAgentsModelParam, BetaManagedAgentsModelConfigParams] + +Tool: TypeAlias = Union[ + BetaManagedAgentsAgentToolset20260401Params, BetaManagedAgentsMCPToolsetParams, BetaManagedAgentsCustomToolParams +] + + +class BetaManagedAgentsAgentWithOverridesParams(TypedDict, total=False): + """Reference to an `agent` plus optional configuration overrides. + + Each provided field replaces the agent's value for the caller's use; the agent resource is unchanged. + """ + + id: Required[str] + """The `agent` ID.""" + + type: Required[Literal["agent_with_overrides"]] + + mcp_servers: Iterable[BetaManagedAgentsURLMCPServerParams] + """Replacement MCP server list. + + Full replacement: the provided array becomes the MCP servers. Send an empty + array to clear; omit to preserve the agent's servers. + """ + + model: Model + """Replacement model. + + Accepts the model string, e.g. `claude-opus-5-5`, or a `model_config` object. + Omit to use the agent's model. + """ + + skills: Iterable[BetaManagedAgentsSkillParams] + """Replacement skill list. + + Full replacement: the provided array becomes the skills. Send an empty array to + clear; omit to preserve the agent's skills. + """ + + system: Optional[str] + """Replacement system prompt. + + Up to 100,000 characters. Set to null to clear the agent's system prompt; omit + to preserve it. + """ + + tools: Iterable[Tool] + """Replacement tool list. + + Full replacement: the provided array becomes the tool configuration. Send an + empty array to clear; omit to preserve the agent's tools. + """ + + version: int + """The specific `agent` version to use. Omit to use the latest version.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_allow_policy.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_allow_policy.py new file mode 100644 index 0000000000000000000000000000000000000000..6bb8cf115837dcc81c71786e0c46bf4eb8a9dca4 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_allow_policy.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAlwaysAllowPolicy"] + + +class BetaManagedAgentsAlwaysAllowPolicy(BaseModel): + """Tool calls are automatically approved without user confirmation.""" + + type: Literal["always_allow"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_allow_policy_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_allow_policy_param.py new file mode 100644 index 0000000000000000000000000000000000000000..af68660d7195c4fec964d94fec70a7d06d439e1d --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_allow_policy_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAlwaysAllowPolicyParam"] + + +class BetaManagedAgentsAlwaysAllowPolicyParam(TypedDict, total=False): + """Tool calls are automatically approved without user confirmation.""" + + type: Required[Literal["always_allow"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_ask_policy.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_ask_policy.py new file mode 100644 index 0000000000000000000000000000000000000000..f9e822d24a462ca8aa403bb96af1a074bb354ab2 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_ask_policy.py @@ -0,0 +1,11 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAlwaysAskPolicy"] + + +class BetaManagedAgentsAlwaysAskPolicy(BaseModel): + """Tool calls require user confirmation before execution.""" + + type: Literal["always_ask"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_ask_policy_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_ask_policy_param.py new file mode 100644 index 0000000000000000000000000000000000000000..91b4f42213c10c22254b18afc65035b80fd3599a --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_always_ask_policy_param.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAlwaysAskPolicyParam"] + + +class BetaManagedAgentsAlwaysAskPolicyParam(TypedDict, total=False): + """Tool calls require user confirmation before execution.""" + + type: Required[Literal["always_ask"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_anthropic_skill.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_anthropic_skill.py new file mode 100644 index 0000000000000000000000000000000000000000..be795b393f1b16cfc23f266f658e6fbd9b730347 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_anthropic_skill.py @@ -0,0 +1,15 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAnthropicSkill"] + + +class BetaManagedAgentsAnthropicSkill(BaseModel): + """A resolved Anthropic-managed skill.""" + + skill_id: str + + type: Literal["anthropic"] + + version: str diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_anthropic_skill_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_anthropic_skill_params.py new file mode 100644 index 0000000000000000000000000000000000000000..2218e64580678acdbc05ca2efdc74e0e2ec4c273 --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_anthropic_skill_params.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAnthropicSkillParams"] + + +class BetaManagedAgentsAnthropicSkillParams(TypedDict, total=False): + """An Anthropic-managed skill.""" + + skill_id: Required[str] + """Identifier of the Anthropic skill (e.g., "xlsx").""" + + type: Required[Literal["anthropic"]] + + version: Optional[str] + """Version to pin. Defaults to latest if omitted.""" diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_auto_policy.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_auto_policy.py new file mode 100644 index 0000000000000000000000000000000000000000..76e11ec2f74a86b593c202baabe6403f7af939ca --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_auto_policy.py @@ -0,0 +1,13 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAutoPolicy"] + + +class BetaManagedAgentsAutoPolicy(BaseModel): + """ + The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask. + """ + + type: Literal["auto"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_auto_policy_param.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_auto_policy_param.py new file mode 100644 index 0000000000000000000000000000000000000000..17ff82caf654c6302f14832b06921ac2c919ab3f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_auto_policy_param.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAutoPolicyParam"] + + +class BetaManagedAgentsAutoPolicyParam(TypedDict, total=False): + """ + The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask. + """ + + type: Required[Literal["auto"]] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_aws_role_execution_identity.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_aws_role_execution_identity.py new file mode 100644 index 0000000000000000000000000000000000000000..23ae7bbfbd337fb25b851e928ff67862bcdc244f --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_aws_role_execution_identity.py @@ -0,0 +1,14 @@ +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["BetaManagedAgentsAWSRoleExecutionIdentity"] + + +class BetaManagedAgentsAWSRoleExecutionIdentity(BaseModel): + """An AWS IAM role principal as returned in API responses.""" + + role_arn: str + """The IAM role's ARN.""" + + type: Literal["aws_role"] diff --git a/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_aws_role_execution_identity_params.py b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_aws_role_execution_identity_params.py new file mode 100644 index 0000000000000000000000000000000000000000..bab7ced07330cbe5358e576ae19c4866fc9a386c --- /dev/null +++ b/.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_managed_agents_aws_role_execution_identity_params.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["BetaManagedAgentsAWSRoleExecutionIdentityParams"] + + +class BetaManagedAgentsAWSRoleExecutionIdentityParams(TypedDict, total=False): + """An AWS IAM role principal.""" + + role_arn: Required[str] + """The IAM role's ARN, e.g. + + "arn:aws:iam::123456789012:role/my-agent-runner". Maximum 2048 characters. + """ + + type: Required[Literal["aws_role"]]