diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da59f99e..2aca35ae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0" + ".": "0.5.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b602d17..7c38f750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [0.5.0](https://github.com/tembo/sdk-python/compare/v0.4.0...v0.5.0) (2026-10-23) + + +### ⚠ BREAKING CHANGES + +* **api:** Schema `agent_options_input` shape changed. + +### Features + +* **api:** update schema agent_options_input (+7 more changes) ([1284046](https://github.com/tembo/sdk-python/commit/1284046585d20374b6f94c05393ed468bf45a5b4)) + ## [0.4.0](https://github.com/tembo/sdk-python/compare/v0.3.0...v0.4.0) (2026-10-21) diff --git a/VERSIONING.md b/VERSIONING.md index f9cf7dda..dcde77a5 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -36,12 +36,13 @@ not have picked — **edit the release PR title** to the version you want: release: 1.0.0 ``` -The `Release PR version` check turns red as soon as you save, because the version in the +The `Release PR version` check goes pending as soon as you save, because the version in the title no longer matches the version committed in the PR. The Scalar platform then re-renders the release PR at your version (changelog, manifest, and every version-bearing file), the title comes back as `release: 1.0.0`, and the check turns green. **Wait for it to be green before merging** — merging in between would tag a release whose own files still carry the -old version. +old version. The check only turns red if the title is not a full semver version, or if the +re-render has not arrived within 10 minutes. The git-native equivalent, if you would rather not touch the PR: push an empty commit with a `Release-As` footer to `scalar-next`. This is exactly what the title edit does for you. @@ -95,6 +96,6 @@ Releases work without this; it closes a window where one can go out at the wrong - **If this repository uses auto-merge, make the `Release PR version` check a required status check.** Auto-merge merges as soon as the checks that are *required* go green, with no - human present — so a check that is not required but still red at that moment stops + human present — so a check that is not required but still pending at that moment stops nothing, which is exactly the window between retitling a release PR and the platform re-rendering it. diff --git a/pyproject.toml b/pyproject.toml index 35c250fc..092b954c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "tembo-sdk-python" -version = "0.4.0" # x-release-please-version +version = "0.5.0" # x-release-please-version description = "Manage agents, sessions, repositories, and organization resources with the Tembo API." readme = "README.md" license = "Apache-2.0" diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json index c8a80a45..8ea464b3 100644 --- a/scalar-sdk.manifest.json +++ b/scalar-sdk.manifest.json @@ -1,7 +1,7 @@ { "name": "TemboSdk", "slug": "temboSdk", - "generatorVersion": "0.36.8", + "generatorVersion": "0.36.9", "servers": [ "https://api.tembo.io/" ], @@ -848,6 +848,16 @@ ], "additionalProperties": false } + }, + { + "name": "ultracode", + "publicName": "ultracode", + "required": false, + "deprecated": false, + "type": { + "kind": "primitive", + "type": "boolean" + } } ], "additionalProperties": { @@ -966,6 +976,16 @@ ], "additionalProperties": false } + }, + { + "name": "ultracode", + "publicName": "ultracode", + "required": false, + "deprecated": false, + "type": { + "kind": "primitive", + "type": "boolean" + } } ], "additionalProperties": false @@ -22144,6 +22164,7 @@ "hasTemboSession", "includeAuthors", "includeTotal", + "includeStacks", "repositoryIds", "reviewerIds", "mergedAfter", @@ -22164,6 +22185,7 @@ "hasTemboSession", "includeAuthors", "includeTotal", + "includeStacks", "repositoryIds", "reviewerIds", "mergedAfter", @@ -22246,6 +22268,12 @@ "style": "form", "explode": true }, + { + "name": "includeStacks", + "required": false, + "style": "form", + "explode": true + }, { "name": "repositoryIds", "required": false, @@ -29503,12 +29531,20 @@ "queryParams": [ "cursor", "limit", - "sessionId" + "sessionId", + "createdAfter", + "createdBefore", + "createdBy", + "models" ], "publicQueryParams": [ "cursor", "limit", - "sessionId" + "sessionId", + "createdAfter", + "createdBefore", + "createdBy", + "models" ], "headerParams": [], "publicHeaderParams": [], @@ -29535,6 +29571,30 @@ "required": false, "style": "form", "explode": true + }, + { + "name": "createdAfter", + "required": false, + "style": "form", + "explode": true + }, + { + "name": "createdBefore", + "required": false, + "style": "form", + "explode": true + }, + { + "name": "createdBy", + "required": false, + "style": "form", + "explode": true + }, + { + "name": "models", + "required": false, + "style": "form", + "explode": true } ], "headerParamDetails": [], diff --git a/src/tembo/_version.py b/src/tembo/_version.py index 3e9326a7..17fb69dc 100644 --- a/src/tembo/_version.py +++ b/src/tembo/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Scalar. See README.md for details. __title__ = "temboSdk" -__version__ = "0.4.0" # x-release-please-version +__version__ = "0.5.0" # x-release-please-version diff --git a/src/tembo/resources/billing.py b/src/tembo/resources/billing.py index 29cc97c2..89745354 100644 --- a/src/tembo/resources/billing.py +++ b/src/tembo/resources/billing.py @@ -4,6 +4,10 @@ import httpx +from typing import Union +from datetime import datetime +from .._types import SequenceNotStr + from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -72,6 +76,10 @@ def list_usage( cursor: str | Omit = omit, limit: int | Omit = omit, session_id: str | Omit = omit, + created_after: Union[str, datetime] | Omit = omit, + created_before: Union[str, datetime] | Omit = omit, + created_by: SequenceNotStr[str] | Omit = omit, + models: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -86,6 +94,10 @@ def list_usage( cursor: Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages. limit: Maximum number of items to return in one page. Use nextCursor from the response to fetch more items. session_id: Filter billing usage to this session. + created_after: Only sessions created at or after this ISO 8601 timestamp. + created_before: Only sessions created before this ISO 8601 timestamp. + created_by: Filter by creator IDs, supplied as a comma-separated list. + models: Filter by model names, supplied as a comma-separated list. extra_headers: Send extra headers with the request. extra_query: Send extra query parameters with the request. extra_body: Send extra JSON properties with the request. @@ -109,7 +121,15 @@ def list_usage( extra_body=extra_body, timeout=timeout, query=maybe_transform( - {"cursor": cursor, "limit": limit, "session_id": session_id}, + { + "cursor": cursor, + "limit": limit, + "session_id": session_id, + "created_after": created_after, + "created_before": created_before, + "created_by": created_by, + "models": models, + }, billing_list_usage_params.BillingListUsageParams, ), ), @@ -167,6 +187,10 @@ async def list_usage( cursor: str | Omit = omit, limit: int | Omit = omit, session_id: str | Omit = omit, + created_after: Union[str, datetime] | Omit = omit, + created_before: Union[str, datetime] | Omit = omit, + created_by: SequenceNotStr[str] | Omit = omit, + models: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -181,6 +205,10 @@ async def list_usage( cursor: Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages. limit: Maximum number of items to return in one page. Use nextCursor from the response to fetch more items. session_id: Filter billing usage to this session. + created_after: Only sessions created at or after this ISO 8601 timestamp. + created_before: Only sessions created before this ISO 8601 timestamp. + created_by: Filter by creator IDs, supplied as a comma-separated list. + models: Filter by model names, supplied as a comma-separated list. extra_headers: Send extra headers with the request. extra_query: Send extra query parameters with the request. extra_body: Send extra JSON properties with the request. @@ -204,7 +232,15 @@ async def list_usage( extra_body=extra_body, timeout=timeout, query=await async_maybe_transform( - {"cursor": cursor, "limit": limit, "session_id": session_id}, + { + "cursor": cursor, + "limit": limit, + "session_id": session_id, + "created_after": created_after, + "created_before": created_before, + "created_by": created_by, + "models": models, + }, billing_list_usage_params.BillingListUsageParams, ), ), diff --git a/src/tembo/resources/pull_requests.py b/src/tembo/resources/pull_requests.py index 1cdad3da..8012209b 100644 --- a/src/tembo/resources/pull_requests.py +++ b/src/tembo/resources/pull_requests.py @@ -50,6 +50,7 @@ def list( has_tembo_session: bool | Omit = omit, include_authors: bool | Omit = omit, include_total: bool | Omit = omit, + include_stacks: bool | Omit = omit, repository_ids: SequenceNotStr[str] | Omit = omit, reviewer_ids: SequenceNotStr[str] | Omit = omit, merged_after: Union[str, datetime] | Omit = omit, @@ -79,6 +80,7 @@ def list( has_tembo_session: When true, only return pull requests with a linked Tembo session. include_authors: Request author filter options. Public responses do not include organization-wide author options. include_total: Include the total count of matching pull requests. + include_stacks: Include each open pull request's position in its stack of dependent pull requests. Public responses do not include stacks. repository_ids: Filter by repository IDs, supplied as a comma-separated list. reviewer_ids: Filter by assigned reviewer identifiers, supplied as a comma-separated list. merged_after: Only pull requests merged after this ISO 8601 timestamp. @@ -121,6 +123,7 @@ def list( "has_tembo_session": has_tembo_session, "include_authors": include_authors, "include_total": include_total, + "include_stacks": include_stacks, "repository_ids": repository_ids, "reviewer_ids": reviewer_ids, "merged_after": merged_after, @@ -200,6 +203,7 @@ async def list( has_tembo_session: bool | Omit = omit, include_authors: bool | Omit = omit, include_total: bool | Omit = omit, + include_stacks: bool | Omit = omit, repository_ids: SequenceNotStr[str] | Omit = omit, reviewer_ids: SequenceNotStr[str] | Omit = omit, merged_after: Union[str, datetime] | Omit = omit, @@ -229,6 +233,7 @@ async def list( has_tembo_session: When true, only return pull requests with a linked Tembo session. include_authors: Request author filter options. Public responses do not include organization-wide author options. include_total: Include the total count of matching pull requests. + include_stacks: Include each open pull request's position in its stack of dependent pull requests. Public responses do not include stacks. repository_ids: Filter by repository IDs, supplied as a comma-separated list. reviewer_ids: Filter by assigned reviewer identifiers, supplied as a comma-separated list. merged_after: Only pull requests merged after this ISO 8601 timestamp. @@ -271,6 +276,7 @@ async def list( "has_tembo_session": has_tembo_session, "include_authors": include_authors, "include_total": include_total, + "include_stacks": include_stacks, "repository_ids": repository_ids, "reviewer_ids": reviewer_ids, "merged_after": merged_after, diff --git a/src/tembo/types/agent_options_input.py b/src/tembo/types/agent_options_input.py index 9a779462..a80c3910 100644 --- a/src/tembo/types/agent_options_input.py +++ b/src/tembo/types/agent_options_input.py @@ -29,6 +29,9 @@ class AgentOptionsInput2(BaseModel): goal: Optional[AgentOptionsInput2Goal] = None + ultracode: Optional[bool] = None + """Whether the agent orchestrates multi-agent workflows for every task when supported by the selected runtime and model.""" + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/tembo/types/agent_options_input_param.py b/src/tembo/types/agent_options_input_param.py index 63643ae6..5af9bc39 100644 --- a/src/tembo/types/agent_options_input_param.py +++ b/src/tembo/types/agent_options_input_param.py @@ -27,5 +27,8 @@ class Variant(TypedDict, total=False): goal: VariantGoal + ultracode: bool + """Whether the agent orchestrates multi-agent workflows for every task when supported by the selected runtime and model.""" + AgentOptionsInputParam: TypeAlias = Union[Variant, Dict[str, object]] diff --git a/src/tembo/types/billing_list_usage_params.py b/src/tembo/types/billing_list_usage_params.py index 0afef5be..60cf6b3f 100644 --- a/src/tembo/types/billing_list_usage_params.py +++ b/src/tembo/types/billing_list_usage_params.py @@ -2,7 +2,10 @@ from __future__ import annotations +from typing import Union +from datetime import datetime from typing_extensions import Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo @@ -18,3 +21,15 @@ class BillingListUsageParams(TypedDict, total=False): session_id: Annotated[str, PropertyInfo(alias="sessionId")] """Filter billing usage to this session.""" + + created_after: Annotated[Union[str, datetime], PropertyInfo(alias="createdAfter", format="iso8601")] + """Only sessions created at or after this ISO 8601 timestamp.""" + + created_before: Annotated[Union[str, datetime], PropertyInfo(alias="createdBefore", format="iso8601")] + """Only sessions created before this ISO 8601 timestamp.""" + + created_by: Annotated[SequenceNotStr[str], PropertyInfo(alias="createdBy")] + """Filter by creator IDs, supplied as a comma-separated list.""" + + models: SequenceNotStr[str] + """Filter by model names, supplied as a comma-separated list.""" diff --git a/src/tembo/types/pull_request_list_params.py b/src/tembo/types/pull_request_list_params.py index d13ea342..71b980da 100644 --- a/src/tembo/types/pull_request_list_params.py +++ b/src/tembo/types/pull_request_list_params.py @@ -46,6 +46,9 @@ class PullRequestListParams(TypedDict, total=False): include_total: Annotated[bool, PropertyInfo(alias="includeTotal")] """Include the total count of matching pull requests.""" + include_stacks: Annotated[bool, PropertyInfo(alias="includeStacks")] + """Include each open pull request's position in its stack of dependent pull requests. Public responses do not include stacks.""" + repository_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="repositoryIds")] """Filter by repository IDs, supplied as a comma-separated list.""" diff --git a/src/tembo/types/runtime_list_response.py b/src/tembo/types/runtime_list_response.py index 291bb114..1cabaaef 100644 --- a/src/tembo/types/runtime_list_response.py +++ b/src/tembo/types/runtime_list_response.py @@ -130,6 +130,9 @@ class ItemRunCapabilities(BaseModel): supports_goals: bool = FieldInfo(alias="supportsGoals") + ultracode_models: List[str] = FieldInfo(alias="ultracodeModels") + """Models that support ultracode workflow orchestration.""" + class Item(BaseModel): name: Literal["claudeCode", "codex", "opencode", "cursor", "amp", "fx", "pi"] diff --git a/src/tembo/types/session_create_params.py b/src/tembo/types/session_create_params.py index 9528d781..705d3f48 100644 --- a/src/tembo/types/session_create_params.py +++ b/src/tembo/types/session_create_params.py @@ -103,6 +103,9 @@ class AgentOptions(TypedDict, total=False): goal: AgentOptionsGoal + ultracode: bool + """Whether the agent orchestrates multi-agent workflows for every task when supported by the selected runtime and model.""" + from .session_document_node_param import SessionDocumentNodeParam from .tip_tap_document_param import TipTapDocumentParam diff --git a/src/tembo/types/session_update_params.py b/src/tembo/types/session_update_params.py index b9368cdf..a1c7a02c 100644 --- a/src/tembo/types/session_update_params.py +++ b/src/tembo/types/session_update_params.py @@ -93,6 +93,9 @@ class AgentOptions(TypedDict, total=False): goal: AgentOptionsGoal + ultracode: bool + """Whether the agent orchestrates multi-agent workflows for every task when supported by the selected runtime and model.""" + from .session_document_node_param import SessionDocumentNodeParam from .tip_tap_document_param import TipTapDocumentParam diff --git a/tests/smoke-test.py b/tests/smoke-test.py index 8053cbbe..df794265 100644 --- a/tests/smoke-test.py +++ b/tests/smoke-test.py @@ -586,7 +586,7 @@ def _smoke_case_67() -> None: mcp_servers=["x"], pull_request_id="7c9e6679-7425-40de-944b-e07fc1f90ae7", session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7", - agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}}, + agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}, "ultracode": False}, delivery_mode="queue", rich_content={ "type": "doc", @@ -866,7 +866,7 @@ def _smoke_case_96() -> None: sandbox_size="nano", target_branch="main", visibility="private", - agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}}, + agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}, "ultracode": False}, branch_name="x", code_repository_ids=["123e4567-e89b-12d3-a456-426614174000"], description="Fix the authentication bug in the login component", @@ -895,7 +895,7 @@ def _smoke_case_99() -> None: session = client.sessions.update( session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7", agent="x", - agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}}, + agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}, "ultracode": False}, base_branch="x", branch_name="x", description="x", @@ -1361,6 +1361,7 @@ def _smoke_case_157() -> None: has_tembo_session=True, include_authors=True, include_total=True, + include_stacks=True, repository_ids=["repository_id"], reviewer_ids=["reviewer_id"], merged_after="2024-01-01T00:00:00.000Z", @@ -1410,7 +1411,7 @@ def _smoke_case_162() -> None: }, mcp_servers=["x"], agent="x", - agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}}, + agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}, "ultracode": False}, sandbox_size="nano", project_id="7c9e6679-7425-40de-944b-e07fc1f90ae7", artifact_type="PullRequest", @@ -1446,7 +1447,7 @@ def _smoke_case_165() -> None: }, mcp_servers=["x"], agent="x", - agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}}, + agent_options={"reasoning_level": "x", "mode": "normal", "speed": "normal", "goal": {}, "ultracode": False}, user_state={}, sandbox_size="nano", project_id="7c9e6679-7425-40de-944b-e07fc1f90ae7", @@ -1940,6 +1941,10 @@ def _smoke_case_228() -> None: cursor="cursor", limit=50, session_id="session_id", + created_after="2024-01-01T00:00:00.000Z", + created_before="2024-01-01T00:00:00.000Z", + created_by=["created_by"], + models=["model"], )