diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fac1407..7c31fce 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.20" + ".": "0.1.0-alpha.21" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index bab7aeb..5ccf547 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-f9a2ce0fd0addc365614ef8c4bb1746f5ba14bc92f3d01f4cd85fb3b33a8d975.yml -openapi_spec_hash: c58dec8e5250d41f216cded6afb763af -config_hash: b7f3d9742335715c458494988498b183 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-186e713234760e9f755b35c78809f89378e4f778a451cd5e30649f41489e0bfd.yml +openapi_spec_hash: 5fb2ce9d8055253d597567a8a3293e73 +config_hash: a8441af7cb2db855d79fd372ee3b9fb1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9420e1a..2281cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.21 (2025-07-17) + +Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/sst/opencode-sdk-python/compare/v0.1.0-alpha.20...v0.1.0-alpha.21) + +### Features + +* **api:** api update ([71211e8](https://github.com/sst/opencode-sdk-python/commit/71211e888ecd5e848ac4de5ed058e4756025f694)) + ## 0.1.0-alpha.20 (2025-07-17) Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/sst/opencode-sdk-python/compare/v0.1.0-alpha.19...v0.1.0-alpha.20) diff --git a/api.md b/api.md index 8ba2145..917b959 100644 --- a/api.md +++ b/api.md @@ -102,6 +102,7 @@ Types: from opencode_ai.types import ( AssistantMessage, FilePart, + FilePartInput, Message, Part, Session, @@ -109,6 +110,7 @@ from opencode_ai.types import ( StepFinishPart, StepStartPart, TextPart, + TextPartInput, ToolPart, ToolStateCompleted, ToolStateError, diff --git a/pyproject.toml b/pyproject.toml index 420f74f..06248ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "opencode-ai" -version = "0.1.0-alpha.20" +version = "0.1.0-alpha.21" description = "The official Python library for the opencode API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/opencode_ai/_version.py b/src/opencode_ai/_version.py index ac3c99b..2d60c92 100644 --- a/src/opencode_ai/_version.py +++ b/src/opencode_ai/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "opencode_ai" -__version__ = "0.1.0-alpha.20" # x-release-please-version +__version__ = "0.1.0-alpha.21" # x-release-please-version diff --git a/src/opencode_ai/types/__init__.py b/src/opencode_ai/types/__init__.py index 801de7d..58c00ae 100644 --- a/src/opencode_ai/types/__init__.py +++ b/src/opencode_ai/types/__init__.py @@ -51,9 +51,11 @@ from .session_init_params import SessionInitParams as SessionInitParams from .file_status_response import FileStatusResponse as FileStatusResponse from .tool_state_completed import ToolStateCompleted as ToolStateCompleted +from .file_part_input_param import FilePartInputParam as FilePartInputParam from .find_symbols_response import FindSymbolsResponse as FindSymbolsResponse from .session_init_response import SessionInitResponse as SessionInitResponse from .session_list_response import SessionListResponse as SessionListResponse +from .text_part_input_param import TextPartInputParam as TextPartInputParam from .app_providers_response import AppProvidersResponse as AppProvidersResponse from .session_abort_response import SessionAbortResponse as SessionAbortResponse from .session_delete_response import SessionDeleteResponse as SessionDeleteResponse diff --git a/src/opencode_ai/types/file_part_input_param.py b/src/opencode_ai/types/file_part_input_param.py new file mode 100644 index 0000000..53002cc --- /dev/null +++ b/src/opencode_ai/types/file_part_input_param.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["FilePartInputParam"] + + +class FilePartInputParam(TypedDict, total=False): + mime: Required[str] + + type: Required[Literal["file"]] + + url: Required[str] + + id: str + + filename: str diff --git a/src/opencode_ai/types/session_chat_params.py b/src/opencode_ai/types/session_chat_params.py index 7475317..1d2bc4b 100644 --- a/src/opencode_ai/types/session_chat_params.py +++ b/src/opencode_ai/types/session_chat_params.py @@ -3,11 +3,13 @@ from __future__ import annotations from typing import Union, Iterable -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Required, Annotated, TypeAlias, TypedDict from .._utils import PropertyInfo +from .file_part_input_param import FilePartInputParam +from .text_part_input_param import TextPartInputParam -__all__ = ["SessionChatParams", "Part", "PartUnionMember0", "PartUnionMember0Time", "PartUnionMember1"] +__all__ = ["SessionChatParams", "Part"] class SessionChatParams(TypedDict, total=False): @@ -24,34 +26,4 @@ class SessionChatParams(TypedDict, total=False): mode: str -class PartUnionMember0Time(TypedDict, total=False): - start: Required[float] - - end: float - - -class PartUnionMember0(TypedDict, total=False): - text: Required[str] - - type: Required[Literal["text"]] - - id: str - - synthetic: bool - - time: PartUnionMember0Time - - -class PartUnionMember1(TypedDict, total=False): - mime: Required[str] - - type: Required[Literal["file"]] - - url: Required[str] - - id: str - - filename: str - - -Part: TypeAlias = Union[PartUnionMember0, PartUnionMember1] +Part: TypeAlias = Union[TextPartInputParam, FilePartInputParam] diff --git a/src/opencode_ai/types/text_part_input_param.py b/src/opencode_ai/types/text_part_input_param.py new file mode 100644 index 0000000..2850484 --- /dev/null +++ b/src/opencode_ai/types/text_part_input_param.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["TextPartInputParam", "Time"] + + +class Time(TypedDict, total=False): + start: Required[float] + + end: float + + +class TextPartInputParam(TypedDict, total=False): + text: Required[str] + + type: Required[Literal["text"]] + + id: str + + synthetic: bool + + time: Time