Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.4"
".": "0.3.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-39cd9547d16412cf0568f6ce2ad8d43805dffe65bde830beeff630b903ae3b38.yml
openapi_spec_hash: 9cd7c9fefa686f9711392782d948470f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-1705ff86e7ec80d6be2ddbb0e3cbee821f3e95d68fa6a48c790f586e3470e678.yml
openapi_spec_hash: cf0d4dad078a7f7c1256b437e349b911
config_hash: 3c21550e2c94cad4339d3093d794beb0
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.3.0 (2026-01-11)

Full Changelog: [v0.2.4...v0.3.0](https://github.com/browserbase/stagehand-python/compare/v0.2.4...v0.3.0)

### Features

* Removed requiring x-language and x-sdk-version from openapi spec ([def55e8](https://github.com/browserbase/stagehand-python/commit/def55e83803ac125ab73dd764997b3b682800112))

## 0.2.4 (2026-01-07)

Full Changelog: [v0.2.3...v0.2.4](https://github.com/browserbase/stagehand-python/compare/v0.2.3...v0.2.4)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "stagehand-alpha"
version = "0.2.4"
version = "0.3.0"
description = "The official Python library for the stagehand API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/stagehand/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "stagehand"
__version__ = "0.2.4" # x-release-please-version
__version__ = "0.3.0" # x-release-please-version
254 changes: 16 additions & 238 deletions src/stagehand/resources/sessions.py

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/stagehand/types/session_act_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ class SessionActParamsBase(TypedDict, total=False):

options: Options

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
6 changes: 0 additions & 6 deletions src/stagehand/types/session_end_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
class SessionEndParams(TypedDict, total=False):
_force_body: Annotated[object, PropertyInfo(alias="_forceBody")]

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
6 changes: 0 additions & 6 deletions src/stagehand/types/session_execute_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ class SessionExecuteParamsBase(TypedDict, total=False):
frame_id: Annotated[str, PropertyInfo(alias="frameId")]
"""Target frame ID for the agent"""

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
6 changes: 0 additions & 6 deletions src/stagehand/types/session_extract_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ class SessionExtractParamsBase(TypedDict, total=False):
schema: Dict[str, object]
"""JSON Schema defining the structure of data to extract"""

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
6 changes: 0 additions & 6 deletions src/stagehand/types/session_navigate_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ class SessionNavigateParams(TypedDict, total=False):
stream_response: Annotated[bool, PropertyInfo(alias="streamResponse")]
"""Whether to stream the response via SSE"""

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
6 changes: 0 additions & 6 deletions src/stagehand/types/session_observe_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ class SessionObserveParamsBase(TypedDict, total=False):

options: Options

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
6 changes: 0 additions & 6 deletions src/stagehand/types/session_start_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ class SessionStartParams(TypedDict, total=False):
wait_for_captcha_solves: Annotated[bool, PropertyInfo(alias="waitForCaptchaSolves")]
"""Wait for captcha solves (deprecated, v2 only)"""

x_language: Annotated[Literal["typescript", "python", "playground"], PropertyInfo(alias="x-language")]
"""Client SDK language"""

x_sdk_version: Annotated[str, PropertyInfo(alias="x-sdk-version")]
"""Version of the Stagehand SDK"""

x_sent_at: Annotated[Union[str, datetime], PropertyInfo(alias="x-sent-at", format="iso8601")]
"""ISO timestamp when request was sent"""

Expand Down
46 changes: 2 additions & 44 deletions tests/api_resources/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def test_method_act_with_all_params_overload_1(self, client: Stagehand) -> None:
"variables": {"username": "john_doe"},
},
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -115,8 +113,6 @@ def test_method_act_with_all_params_overload_2(self, client: Stagehand) -> None:
"timeout": 30000,
"variables": {"username": "john_doe"},
},
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -174,8 +170,7 @@ def test_method_end(self, client: Stagehand) -> None:
def test_method_end_with_all_params(self, client: Stagehand) -> None:
session = client.sessions.end(
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
x_language="typescript",
x_sdk_version="3.0.6",
_force_body={},
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -245,8 +240,6 @@ def test_method_execute_with_all_params_overload_1(self, client: Stagehand) -> N
},
frame_id="frameId",
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -329,8 +322,6 @@ def test_method_execute_with_all_params_overload_2(self, client: Stagehand) -> N
},
stream_response=True,
frame_id="frameId",
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -406,8 +397,6 @@ def test_method_extract_with_all_params_overload_1(self, client: Stagehand) -> N
},
schema={"foo": "bar"},
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -470,8 +459,6 @@ def test_method_extract_with_all_params_overload_2(self, client: Stagehand) -> N
"timeout": 30000,
},
schema={"foo": "bar"},
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -535,8 +522,6 @@ def test_method_navigate_with_all_params(self, client: Stagehand) -> None:
"wait_until": "networkidle",
},
stream_response=True,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -600,8 +585,6 @@ def test_method_observe_with_all_params_overload_1(self, client: Stagehand) -> N
"timeout": 30000,
},
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -663,8 +646,6 @@ def test_method_observe_with_all_params_overload_2(self, client: Stagehand) -> N
"selector": "nav",
"timeout": 30000,
},
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -797,8 +778,6 @@ def test_method_start_with_all_params(self, client: Stagehand) -> None:
system_prompt="systemPrompt",
verbose=1,
wait_for_captcha_solves=True,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -858,8 +837,6 @@ async def test_method_act_with_all_params_overload_1(self, async_client: AsyncSt
"variables": {"username": "john_doe"},
},
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -925,8 +902,6 @@ async def test_method_act_with_all_params_overload_2(self, async_client: AsyncSt
"timeout": 30000,
"variables": {"username": "john_doe"},
},
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -984,8 +959,7 @@ async def test_method_end(self, async_client: AsyncStagehand) -> None:
async def test_method_end_with_all_params(self, async_client: AsyncStagehand) -> None:
session = await async_client.sessions.end(
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
x_language="typescript",
x_sdk_version="3.0.6",
_force_body={},
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1055,8 +1029,6 @@ async def test_method_execute_with_all_params_overload_1(self, async_client: Asy
},
frame_id="frameId",
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1139,8 +1111,6 @@ async def test_method_execute_with_all_params_overload_2(self, async_client: Asy
},
stream_response=True,
frame_id="frameId",
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1216,8 +1186,6 @@ async def test_method_extract_with_all_params_overload_1(self, async_client: Asy
},
schema={"foo": "bar"},
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1280,8 +1248,6 @@ async def test_method_extract_with_all_params_overload_2(self, async_client: Asy
"timeout": 30000,
},
schema={"foo": "bar"},
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1345,8 +1311,6 @@ async def test_method_navigate_with_all_params(self, async_client: AsyncStagehan
"wait_until": "networkidle",
},
stream_response=True,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1410,8 +1374,6 @@ async def test_method_observe_with_all_params_overload_1(self, async_client: Asy
"timeout": 30000,
},
stream_response=False,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1473,8 +1435,6 @@ async def test_method_observe_with_all_params_overload_2(self, async_client: Asy
"selector": "nav",
"timeout": 30000,
},
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down Expand Up @@ -1607,8 +1567,6 @@ async def test_method_start_with_all_params(self, async_client: AsyncStagehand)
system_prompt="systemPrompt",
verbose=1,
wait_for_captcha_solves=True,
x_language="typescript",
x_sdk_version="3.0.6",
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
x_stream_response="true",
)
Expand Down
Loading