diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4dedeae..511dd51 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.5.0" + ".": "2.6.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3bd5bc6..93a1821 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 6 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mozilla%2Ftabstack-d2de12285899c7d33692a21cca765f609d32e53a5c53703506b08fe0a5dc3060.yml -openapi_spec_hash: 07993ec20b4cbce1adac94c5cf9e0312 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mozilla%2Ftabstack-5e6e6508dca15391d72cbea74ec33838c511cbc17e046699142f97d1573b069a.yml +openapi_spec_hash: b73b5922a495fd375736896912815d18 config_hash: 57c64e5e8fe99c1bd7af536d82af4ad9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4e795..7bfb6c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 2.6.0 (2026-04-24) + +Full Changelog: [v2.5.0...v2.6.0](https://github.com/Mozilla-Ocho/tabstack-python/compare/v2.5.0...v2.6.0) + +### Features + +* **api:** api update ([6b2a7ab](https://github.com/Mozilla-Ocho/tabstack-python/commit/6b2a7ab3c60534f7347f7e5da4a9dc8c4fa6047e)) +* **codegen:** consume Pilo's AutomateStreamEvent as the /automate SSE root ([3615e2d](https://github.com/Mozilla-Ocho/tabstack-python/commit/3615e2dbc4f934ae5b9763b110affc39d04bdce8)) + ## 2.5.0 (2026-04-22) Full Changelog: [v2.4.0...v2.5.0](https://github.com/Mozilla-Ocho/tabstack-python/compare/v2.4.0...v2.5.0) diff --git a/pyproject.toml b/pyproject.toml index 10687dd..3050875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "tabstack" -version = "2.5.0" +version = "2.6.0" description = "The official Python library for the tabstack API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/tabstack/_version.py b/src/tabstack/_version.py index 448caed..5187085 100644 --- a/src/tabstack/_version.py +++ b/src/tabstack/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "tabstack" -__version__ = "2.5.0" # x-release-please-version +__version__ = "2.6.0" # x-release-please-version diff --git a/src/tabstack/resources/agent.py b/src/tabstack/resources/agent.py index 12486ed..01a80cb 100644 --- a/src/tabstack/resources/agent.py +++ b/src/tabstack/resources/agent.py @@ -234,7 +234,7 @@ def research( - Fact-checking and verification tasks Args: - query: The research query or question to answer + query: The research query or question to answer. Maximum 10,000 characters. fetch_timeout: Timeout in seconds for fetching web pages @@ -482,7 +482,7 @@ async def research( - Fact-checking and verification tasks Args: - query: The research query or question to answer + query: The research query or question to answer. Maximum 10,000 characters. fetch_timeout: Timeout in seconds for fetching web pages diff --git a/src/tabstack/types/agent_research_params.py b/src/tabstack/types/agent_research_params.py index bd015b3..b73a4c9 100644 --- a/src/tabstack/types/agent_research_params.py +++ b/src/tabstack/types/agent_research_params.py @@ -9,7 +9,7 @@ class AgentResearchParams(TypedDict, total=False): query: Required[str] - """The research query or question to answer""" + """The research query or question to answer. Maximum 10,000 characters.""" fetch_timeout: int """Timeout in seconds for fetching web pages""" diff --git a/src/tabstack/types/automate_event.py b/src/tabstack/types/automate_event.py index ce961d2..388dba2 100644 --- a/src/tabstack/types/automate_event.py +++ b/src/tabstack/types/automate_event.py @@ -117,6 +117,14 @@ "V1AutomateEventCdpEndpointConnectedData", "V1AutomateEventCdpEndpointCycle", "V1AutomateEventCdpEndpointCycleData", + "V1AutomateEventComplete", + "V1AutomateEventCompleteData", + "V1AutomateEventCompleteDataStats", + "V1AutomateEventCompleteDataError", + "V1AutomateEventDone", + "V1AutomateEventError", + "V1AutomateEventErrorData", + "V1AutomateEventErrorDataError", "V1AutomateEventInteractiveFormDataError", "V1AutomateEventInteractiveFormDataErrorData", "V1AutomateEventInteractiveFormDataErrorDataField", @@ -2108,6 +2116,111 @@ class V1AutomateEventCdpEndpointCycle(BaseModel): event: Literal["cdp:endpoint_cycle"] +class V1AutomateEventCompleteDataStats(BaseModel): + """Execution statistics""" + + actions: float + + duration_ms: float = FieldInfo(alias="durationMs") + + end_time: float = FieldInfo(alias="endTime") + + iterations: float + + start_time: float = FieldInfo(alias="startTime") + + +class V1AutomateEventCompleteDataError(BaseModel): + """Structured error information for failed tasks""" + + code: Literal["TASK_ABORTED", "MAX_ITERATIONS", "MAX_ERRORS", "TASK_FAILED"] + """Error codes for task failures""" + + message: str + """Human-readable error message""" + + +class V1AutomateEventCompleteData(BaseModel): + """Payload for the `complete` stream event. + + Structurally identical to TaskExecutionResult from webAgent.ts — the `complete` event's data is the agent's final TaskExecutionResult, stringified onto the SSE stream. + """ + + final_answer: Optional[str] = FieldInfo(alias="finalAnswer", default=None) + """Final answer or result from the agent""" + + stats: V1AutomateEventCompleteDataStats + """Execution statistics""" + + success: bool + """Whether the task completed successfully""" + + error: Optional[V1AutomateEventCompleteDataError] = None + """Structured error information for failed tasks""" + + +class V1AutomateEventComplete(BaseModel): + """Envelope for the "complete" event from /v1/automate.""" + + data: V1AutomateEventCompleteData + """Payload for the `complete` stream event. + + Structurally identical to TaskExecutionResult from webAgent.ts — the `complete` + event's data is the agent's final TaskExecutionResult, stringified onto the SSE + stream. + """ + + event: Literal["complete"] + + +class V1AutomateEventDone(BaseModel): + """Envelope for the "done" event from /v1/automate.""" + + data: Dict[str, object] + """Payload for the `done` stream terminator event. + + Empty today; reserved for future metadata. + """ + + event: Literal["done"] + + +class V1AutomateEventErrorDataError(BaseModel): + code: str + + message: str + + timestamp: str + """ISO-8601 timestamp""" + + +class V1AutomateEventErrorData(BaseModel): + """Payload for the top-level `error` stream event. + + Emitted when an uncaught error escapes the task runner. Mirrors `ErrorResponse` from the server package's `taskRunner.ts` — kept structurally aligned so schema and runtime stay consistent. Distinct from agent-level error events like `ai:generation:error` and `task:validation_error`, which are emitted through the normal event emitter during the agent loop. + """ + + error: V1AutomateEventErrorDataError + + success: Literal[False] + + +class V1AutomateEventError(BaseModel): + """Envelope for the "error" event from /v1/automate.""" + + data: V1AutomateEventErrorData + """Payload for the top-level `error` stream event. + + Emitted when an uncaught error escapes the task runner. Mirrors `ErrorResponse` + from the server package's `taskRunner.ts` — kept structurally aligned so schema + and runtime stay consistent. Distinct from agent-level error events like + `ai:generation:error` and `task:validation_error`, which are emitted through the + normal event emitter during the agent loop. + """ + + event: Literal["error"] + + class V1AutomateEventInteractiveFormDataErrorDataField(BaseModel): """A single form field the agent needs data for.""" @@ -2504,6 +2617,9 @@ class V1AutomateEventTaskValidationError(BaseModel): V1AutomateEventBrowserScreenshotCapturedImage, V1AutomateEventCdpEndpointConnected, V1AutomateEventCdpEndpointCycle, + V1AutomateEventComplete, + V1AutomateEventDone, + V1AutomateEventError, V1AutomateEventInteractiveFormDataError, V1AutomateEventInteractiveFormDataRequest, V1AutomateEventSystemDebugCompression,