Skip to content
Merged
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.1.0"
".": "0.2.0"
}
6 changes: 3 additions & 3 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-2c88c6d890406ff8a5f1bca692264fb9af4bc4fe64df0986e06d3386fc6d6fcb.yml
openapi_spec_hash: dc6ea17f8152708dc0a390c7f86b1a5d
config_hash: a17b6052ac65237b7b8e145f4f692d3c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-705638ac8966569986bd9ebb7c9761bf0016909e9f2753e77ceabb12c8049511.yml
openapi_spec_hash: a8fbbcaa38e91c7f97313620b42d8d62
config_hash: a35b56eb05306a0f02e83c11d57f975f
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.2.0 (2025-12-16)

Full Changelog: [v0.1.0...v0.2.0](https://github.com/browserbase/stagehand-php/compare/v0.1.0...v0.2.0)

### Features

* **api:** manual updates ([45ddfc2](https://github.com/browserbase/stagehand-php/commit/45ddfc23d06b22d47fe85f6d55dbe6f78f32d782))
* **api:** manual updates ([77aeeea](https://github.com/browserbase/stagehand-php/commit/77aeeea5ae9c63e4239c9f37026f33e20dd8a5d7))

## 0.1.0 (2025-12-16)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/browserbase/stagehand-php/compare/v0.0.1...v0.1.0)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ use Stagehand\Core\Exceptions\APIConnectionException;

try {
$response = $client->sessions->start(
browserbaseAPIKey: '<your API key here>',
browserbaseProjectID: '<your project ID here>',
browserbaseAPIKey: 'your Browserbase API key',
browserbaseProjectID: 'your Browserbase Project ID',
);
} catch (APIConnectionException $e) {
echo "The server could not be reached", PHP_EOL;
Expand Down Expand Up @@ -130,8 +130,8 @@ $client = new Client(maxRetries: 0);

// Or, configure per-request:
$result = $client->sessions->start(
browserbaseAPIKey: '<your API key here>',
browserbaseProjectID: '<your project ID here>',
browserbaseAPIKey: 'your Browserbase API key',
browserbaseProjectID: 'your Browserbase Project ID',
requestOptions: RequestOptions::with(maxRetries: 5),
);
```
Expand All @@ -152,8 +152,8 @@ Note: the `extra*` parameters of the same name overrides the documented paramete
use Stagehand\RequestOptions;

$response = $client->sessions->start(
browserbaseAPIKey: '<your API key here>',
browserbaseProjectID: '<your project ID here>',
browserbaseAPIKey: 'your Browserbase API key',
browserbaseProjectID: 'your Browserbase Project ID',
requestOptions: RequestOptions::with(
extraQueryParams: ['my_query_parameter' => 'value'],
extraBodyParams: ['my_body_parameter' => 'value'],
Expand Down
34 changes: 3 additions & 31 deletions src/Sessions/SessionExecuteAgentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
use Stagehand\Core\Contracts\BaseModel;

/**
* @phpstan-type SessionExecuteAgentResponseShape = array{
* message?: string|null, steps?: list<mixed>|null
* }
* @phpstan-type SessionExecuteAgentResponseShape = array{message?: string|null}
*/
final class SessionExecuteAgentResponse implements BaseModel
{
Expand All @@ -24,14 +22,6 @@ final class SessionExecuteAgentResponse implements BaseModel
#[Optional]
public ?string $message;

/**
* Steps taken by the agent.
*
* @var list<mixed>|null $steps
*/
#[Optional(list: 'mixed')]
public ?array $steps;

public function __construct()
{
$this->initialize();
Expand All @@ -41,17 +31,12 @@ public function __construct()
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param list<mixed> $steps
*/
public static function with(
?string $message = null,
?array $steps = null
): self {
public static function with(?string $message = null): self
{
$self = new self;

null !== $message && $self['message'] = $message;
null !== $steps && $self['steps'] = $steps;

return $self;
}
Expand All @@ -66,17 +51,4 @@ public function withMessage(string $message): self

return $self;
}

/**
* Steps taken by the agent.
*
* @param list<mixed> $steps
*/
public function withSteps(array $steps): self
{
$self = clone $this;
$self['steps'] = $steps;

return $self;
}
}
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
namespace Stagehand;

// x-release-please-start-version
const VERSION = '0.1.0';
const VERSION = '0.2.0';
// x-release-please-end
Loading