From fc1091702d854249701f754c16dc6911b3eba667 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 17:53:38 +0000 Subject: [PATCH 1/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1ef2a27..b6b58cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-f39b852755134d01a440f7c37701f6c5397f43d13740d9ba08739cae488382a7.yml -openapi_spec_hash: de6c25eebe5026d0fb9a4d7a93ec7718 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-eaca39f859613c4a3a96aaaaadf8bd92e845dc7245eb78617988e14e14d6a554.yml +openapi_spec_hash: e66a466a5446a2d85781786768e6b257 config_hash: d4b0c534eaf7665ea25168e0e824c9d3 From 3402f5903448f7a7df8304c1f9e585117e166d3c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 04:54:56 +0000 Subject: [PATCH 2/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b6b58cb..1b5592f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-eaca39f859613c4a3a96aaaaadf8bd92e845dc7245eb78617988e14e14d6a554.yml -openapi_spec_hash: e66a466a5446a2d85781786768e6b257 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-a896c28015c625eaa4efd6319489dc91c932a6ab17780c5e1bf3648bd4bed9c7.yml +openapi_spec_hash: a1ee972826c5331971d4d9b437f9e6d5 config_hash: d4b0c534eaf7665ea25168e0e824c9d3 From d18989f3085093d85cf8e52825c8920ce753e7b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 19:28:48 +0000 Subject: [PATCH 3/9] docs: document and un-gate allowedDomains session setting --- .stats.yml | 4 ++-- src/resources/sessions/sessions.ts | 12 ++++++++++++ tests/api-resources/sessions/sessions.test.ts | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1b5592f..2fef781 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-a896c28015c625eaa4efd6319489dc91c932a6ab17780c5e1bf3648bd4bed9c7.yml -openapi_spec_hash: a1ee972826c5331971d4d9b437f9e6d5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-325727e382d1635cdcff3d81e93432c314290a644a5252095fc9d23350e8fbae.yml +openapi_spec_hash: 1c0874c5d6253bdf144e617203d788c7 config_hash: d4b0c534eaf7665ea25168e0e824c9d3 diff --git a/src/resources/sessions/sessions.ts b/src/resources/sessions/sessions.ts index 0dc62c6..64aec7b 100644 --- a/src/resources/sessions/sessions.ts +++ b/src/resources/sessions/sessions.ts @@ -246,6 +246,18 @@ export namespace SessionCreateParams { */ advancedStealth?: boolean; + /** + * An optional list of allowed domains for the session. If you pass one or more + * domains, Browserbase restricts top-level (main-frame) page navigations to the + * listed domains and their subdomains. For example, `example.com` also permits + * `www.example.com` and `a.b.example.com`, but not `notexample.com`. Matching is + * domain-based, not full-URL. An empty list (the default) disables the restriction + * entirely. Browserbase enforces only main-frame navigations; it does not block + * iframe/subframe loads or other in-page resource requests (images, scripts, XHR, + * etc.). + */ + allowedDomains?: Array; + /** * Enable or disable ad blocking in the browser. Defaults to `false`. */ diff --git a/tests/api-resources/sessions/sessions.test.ts b/tests/api-resources/sessions/sessions.test.ts index 137f03d..3f0d171 100644 --- a/tests/api-resources/sessions/sessions.test.ts +++ b/tests/api-resources/sessions/sessions.test.ts @@ -34,6 +34,7 @@ describe('resource sessions', () => { { browserSettings: { advancedStealth: true, + allowedDomains: ['string'], blockAds: true, captchaImageSelector: 'captchaImageSelector', captchaInputSelector: 'captchaInputSelector', From 749767df07018b7dada9537d3cd0cecc6e7918c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 17:58:52 +0000 Subject: [PATCH 4/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2fef781..794cad2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-325727e382d1635cdcff3d81e93432c314290a644a5252095fc9d23350e8fbae.yml -openapi_spec_hash: 1c0874c5d6253bdf144e617203d788c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-e2a07a0599ab06b1a961e9aea89d73986a2bae8e6ad942a4f8c223f97ea1634e.yml +openapi_spec_hash: 24a300b03dc458bee0787397795b4fba config_hash: d4b0c534eaf7665ea25168e0e824c9d3 From b30be85393c91215519ed88135e49ab9330059c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 00:58:08 +0000 Subject: [PATCH 5/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 794cad2..bf003c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-e2a07a0599ab06b1a961e9aea89d73986a2bae8e6ad942a4f8c223f97ea1634e.yml -openapi_spec_hash: 24a300b03dc458bee0787397795b4fba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-2d7e6d469fabaa60c27cb2c9c986b5bc2cd5d33fe13d9bd4e9b8ccaafa5b04c3.yml +openapi_spec_hash: 473121b283812a3dfd866afe9b61dc7d config_hash: d4b0c534eaf7665ea25168e0e824c9d3 From 1f1fb26aaa11928cdc6b26baa7452c8577ea206c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 22:00:41 +0000 Subject: [PATCH 6/9] feat: [CORE-000][apps/sdk] Add agents to SDK --- .stats.yml | 6 +- api.md | 33 ++ src/index.ts | 23 + src/resources/agents.ts | 3 + src/resources/agents/agents.ts | 335 +++++++++++++ src/resources/agents/index.ts | 22 + src/resources/agents/runs.ts | 553 ++++++++++++++++++++++ src/resources/index.ts | 10 + tests/api-resources/agents/agents.test.ts | 132 ++++++ tests/api-resources/agents/runs.test.ts | 124 +++++ 10 files changed, 1238 insertions(+), 3 deletions(-) create mode 100644 src/resources/agents.ts create mode 100644 src/resources/agents/agents.ts create mode 100644 src/resources/agents/index.ts create mode 100644 src/resources/agents/runs.ts create mode 100644 tests/api-resources/agents/agents.test.ts create mode 100644 tests/api-resources/agents/runs.test.ts diff --git a/.stats.yml b/.stats.yml index bf003c7..b4d46dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-2d7e6d469fabaa60c27cb2c9c986b5bc2cd5d33fe13d9bd4e9b8ccaafa5b04c3.yml +configured_endpoints: 36 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-e82c289d3d3aabd936a476cf81630587ffe46ab9e9bdebced4b31b8c2f9bc08f.yml openapi_spec_hash: 473121b283812a3dfd866afe9b61dc7d -config_hash: d4b0c534eaf7665ea25168e0e824c9d3 +config_hash: 1b24ea9fa13645b16b74aa794dbc8190 diff --git a/api.md b/api.md index 04af9b4..bd75c9d 100644 --- a/api.md +++ b/api.md @@ -139,3 +139,36 @@ Methods: - client.sessions.replays.retrieve(id) -> ReplayRetrieveResponse - client.sessions.replays.retrievePage(id, pageId) -> Response + +# Agents + +Types: + +- AgentCreateResponse +- AgentRetrieveResponse +- AgentUpdateResponse +- AgentListResponse + +Methods: + +- client.agents.create({ ...params }) -> AgentCreateResponse +- client.agents.retrieve(agentId) -> AgentRetrieveResponse +- client.agents.update(agentId, { ...params }) -> AgentUpdateResponse +- client.agents.list({ ...params }) -> AgentListResponse +- client.agents.delete(agentId) -> void + +## Runs + +Types: + +- RunCreateResponse +- RunRetrieveResponse +- RunListResponse +- RunListMessagesResponse + +Methods: + +- client.agents.runs.create({ ...params }) -> RunCreateResponse +- client.agents.runs.retrieve(runId) -> RunRetrieveResponse +- client.agents.runs.list({ ...params }) -> RunListResponse +- client.agents.runs.listMessages(runId, { ...params }) -> RunListMessagesResponse diff --git a/src/index.ts b/src/index.ts index af75d1a..b2edbc7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,6 +22,16 @@ import { Extension, ExtensionCreateParams, Extensions } from './resources/extens import { FetchAPI, FetchAPICreateParams, FetchAPICreateResponse } from './resources/fetch-api'; import { Project, ProjectListResponse, ProjectUsage, Projects } from './resources/projects'; import { Search, SearchWebParams, SearchWebResponse } from './resources/search'; +import { + AgentCreateParams, + AgentCreateResponse, + AgentListParams, + AgentListResponse, + AgentRetrieveResponse, + AgentUpdateParams, + AgentUpdateResponse, + Agents, +} from './resources/agents/agents'; import { Session, SessionCreateParams, @@ -171,6 +181,7 @@ export class Browserbase extends Core.APIClient { projects: API.Projects = new API.Projects(this); search: API.Search = new API.Search(this); sessions: API.Sessions = new API.Sessions(this); + agents: API.Agents = new API.Agents(this); /** * Check whether the base URL is set to its default. @@ -222,6 +233,7 @@ Browserbase.FetchAPI = FetchAPI; Browserbase.Projects = Projects; Browserbase.Search = Search; Browserbase.Sessions = Sessions; +Browserbase.Agents = Agents; export declare namespace Browserbase { export type RequestOptions = Core.RequestOptions; @@ -277,6 +289,17 @@ export declare namespace Browserbase { type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, }; + + export { + Agents as Agents, + type AgentCreateResponse as AgentCreateResponse, + type AgentRetrieveResponse as AgentRetrieveResponse, + type AgentUpdateResponse as AgentUpdateResponse, + type AgentListResponse as AgentListResponse, + type AgentCreateParams as AgentCreateParams, + type AgentUpdateParams as AgentUpdateParams, + type AgentListParams as AgentListParams, + }; } export { toFile, fileFromPath } from './uploads'; diff --git a/src/resources/agents.ts b/src/resources/agents.ts new file mode 100644 index 0000000..0c43db0 --- /dev/null +++ b/src/resources/agents.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './agents/index'; diff --git a/src/resources/agents/agents.ts b/src/resources/agents/agents.ts new file mode 100644 index 0000000..9e2ed0c --- /dev/null +++ b/src/resources/agents/agents.ts @@ -0,0 +1,335 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as Core from '../../core'; +import * as RunsAPI from './runs'; +import { + RunCreateParams, + RunCreateResponse, + RunListMessagesParams, + RunListMessagesResponse, + RunListParams, + RunListResponse, + RunRetrieveResponse, + Runs, +} from './runs'; + +export class Agents extends APIResource { + runs: RunsAPI.Runs = new RunsAPI.Runs(this._client); + + /** + * Create a reusable agent. An agent defines a `systemPrompt` and `resultSchema` + * that guide its behavior for every run. Only `name` is required; an agent created + * with no `systemPrompt` behaves like an unconfigured run. + */ + create(body: AgentCreateParams, options?: Core.RequestOptions): Core.APIPromise { + return this._client.post('/v1/agents', { body, ...options }); + } + + /** + * Retrieve an agent by ID. + */ + retrieve(agentId: string, options?: Core.RequestOptions): Core.APIPromise { + return this._client.get(`/v1/agents/${agentId}`, options); + } + + /** + * Update an existing agent. Only the fields provided in the body are modified; + * omitted fields are left unchanged. + */ + update( + agentId: string, + body?: AgentUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + update(agentId: string, options?: Core.RequestOptions): Core.APIPromise; + update( + agentId: string, + body: AgentUpdateParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(body)) { + return this.update(agentId, {}, body); + } + return this._client.patch(`/v1/agents/${agentId}`, { body, ...options }); + } + + /** + * List agents across your account. Supports filtering by creation time. + */ + list(query?: AgentListParams, options?: Core.RequestOptions): Core.APIPromise; + list(options?: Core.RequestOptions): Core.APIPromise; + list( + query: AgentListParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.list({}, query); + } + return this._client.get('/v1/agents', { query, ...options }); + } + + /** + * Delete an agent. Runs that already referenced this agent are unaffected. + */ + delete(agentId: string, options?: Core.RequestOptions): Core.APIPromise { + return this._client.delete(`/v1/agents/${agentId}`, { + ...options, + headers: { Accept: '*/*', ...options?.headers }, + }); + } +} + +/** + * A reusable agent. Referenced by `agentId` to apply a system prompt to every run + * that uses the agent. + */ +export interface AgentCreateResponse { + /** + * Unique identifier for the agent. Use this value as `agentId` when creating an + * agent run. + */ + agentId: string; + + createdAt: string; + + /** + * Human-readable name for the agent. Used to identify the agent in the dashboard + * and API responses. + */ + name: string; + + updatedAt: string; + + /** + * [JSON Schema](https://json-schema.org/specification) that runs referencing this + * agent will aim to conform their `result` to. Can be overridden per run by + * passing `resultSchema` on the run request. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * System prompt applied to every run that uses this agent. + */ + systemPrompt?: string; +} + +/** + * A reusable agent. Referenced by `agentId` to apply a system prompt to every run + * that uses the agent. + */ +export interface AgentRetrieveResponse { + /** + * Unique identifier for the agent. Use this value as `agentId` when creating an + * agent run. + */ + agentId: string; + + createdAt: string; + + /** + * Human-readable name for the agent. Used to identify the agent in the dashboard + * and API responses. + */ + name: string; + + updatedAt: string; + + /** + * [JSON Schema](https://json-schema.org/specification) that runs referencing this + * agent will aim to conform their `result` to. Can be overridden per run by + * passing `resultSchema` on the run request. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * System prompt applied to every run that uses this agent. + */ + systemPrompt?: string; +} + +/** + * A reusable agent. Referenced by `agentId` to apply a system prompt to every run + * that uses the agent. + */ +export interface AgentUpdateResponse { + /** + * Unique identifier for the agent. Use this value as `agentId` when creating an + * agent run. + */ + agentId: string; + + createdAt: string; + + /** + * Human-readable name for the agent. Used to identify the agent in the dashboard + * and API responses. + */ + name: string; + + updatedAt: string; + + /** + * [JSON Schema](https://json-schema.org/specification) that runs referencing this + * agent will aim to conform their `result` to. Can be overridden per run by + * passing `resultSchema` on the run request. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * System prompt applied to every run that uses this agent. + */ + systemPrompt?: string; +} + +/** + * A page of agents. + */ +export interface AgentListResponse { + /** + * The page of matching agents. + */ + data: Array; + + /** + * The maximum number of results returned in this page. + */ + limit: number; + + /** + * Cursor for the next page. Pass it back as `cursor` on the next request to + * continue paging. null when there are no more results. + */ + nextCursor: string | null; +} + +export namespace AgentListResponse { + /** + * A reusable agent. Referenced by `agentId` to apply a system prompt to every run + * that uses the agent. + */ + export interface Data { + /** + * Unique identifier for the agent. Use this value as `agentId` when creating an + * agent run. + */ + agentId: string; + + createdAt: string; + + /** + * Human-readable name for the agent. Used to identify the agent in the dashboard + * and API responses. + */ + name: string; + + updatedAt: string; + + /** + * [JSON Schema](https://json-schema.org/specification) that runs referencing this + * agent will aim to conform their `result` to. Can be overridden per run by + * passing `resultSchema` on the run request. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * System prompt applied to every run that uses this agent. + */ + systemPrompt?: string; + } +} + +export interface AgentCreateParams { + /** + * Human-readable name for the agent. Used to identify the agent in the dashboard + * and API responses. + */ + name: string; + + /** + * An optional [JSON Schema](https://json-schema.org/specification) object. If + * provided, runs that reference this agent will aim to return a `result` that + * conforms to this schema when they complete. Can be overridden per run by passing + * `resultSchema` on the run request. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * System prompt that steers the agent's behavior on every run that uses this + * agent. + */ + systemPrompt?: string; +} + +export interface AgentUpdateParams { + /** + * Human-readable name for the agent. Used to identify the agent in the dashboard + * and API responses. + */ + name?: string; + + /** + * An optional [JSON Schema](https://json-schema.org/specification) object. If + * provided, runs that reference this agent will aim to return a `result` that + * conforms to this schema when they complete. Can be overridden per run by passing + * `resultSchema` on the run request. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * New system prompt that steers the agent's behavior on every run that uses this + * agent. + */ + systemPrompt?: string; +} + +export interface AgentListParams { + /** + * Pagination cursor. Pass the nextCursor from the previous response to fetch the + * next page. Omit to start from the first page. + */ + cursor?: string; + + /** + * Only return agents created on or before this timestamp (inclusive). ISO 8601 / + * RFC 3339, e.g. 2026-01-20T00:00:00Z. + */ + endAt?: string; + + /** + * Maximum number of results to return. + */ + limit?: number; + + /** + * Only return agents created on or after this timestamp (inclusive). ISO 8601 / + * RFC 3339, e.g. 2026-01-19T00:00:00Z. + */ + startAt?: string; +} + +Agents.Runs = Runs; + +export declare namespace Agents { + export { + type AgentCreateResponse as AgentCreateResponse, + type AgentRetrieveResponse as AgentRetrieveResponse, + type AgentUpdateResponse as AgentUpdateResponse, + type AgentListResponse as AgentListResponse, + type AgentCreateParams as AgentCreateParams, + type AgentUpdateParams as AgentUpdateParams, + type AgentListParams as AgentListParams, + }; + + export { + Runs as Runs, + type RunCreateResponse as RunCreateResponse, + type RunRetrieveResponse as RunRetrieveResponse, + type RunListResponse as RunListResponse, + type RunListMessagesResponse as RunListMessagesResponse, + type RunCreateParams as RunCreateParams, + type RunListParams as RunListParams, + type RunListMessagesParams as RunListMessagesParams, + }; +} diff --git a/src/resources/agents/index.ts b/src/resources/agents/index.ts new file mode 100644 index 0000000..47ed229 --- /dev/null +++ b/src/resources/agents/index.ts @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { + Agents, + type AgentCreateResponse, + type AgentRetrieveResponse, + type AgentUpdateResponse, + type AgentListResponse, + type AgentCreateParams, + type AgentUpdateParams, + type AgentListParams, +} from './agents'; +export { + Runs, + type RunCreateResponse, + type RunRetrieveResponse, + type RunListResponse, + type RunListMessagesResponse, + type RunCreateParams, + type RunListParams, + type RunListMessagesParams, +} from './runs'; diff --git a/src/resources/agents/runs.ts b/src/resources/agents/runs.ts new file mode 100644 index 0000000..f01d793 --- /dev/null +++ b/src/resources/agents/runs.ts @@ -0,0 +1,553 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import { isRequestOptions } from '../../core'; +import * as Core from '../../core'; + +export class Runs extends APIResource { + /** + * Run a browser agent to complete the `task` by using web search and browser + * tooling. Optionally pass `agentId` to run a + * [custom agent](/reference/api/create-an-agent) you've created. + */ + create(body: RunCreateParams, options?: Core.RequestOptions): Core.APIPromise { + return this._client.post('/v1/agents/runs', { body, ...options }); + } + + /** + * Retrieve the current status and details of a run, including its result and + * associated session information. To fetch the run's messages, use + * [List Run Messages](/reference/api/list-run-messages). + */ + retrieve(runId: string, options?: Core.RequestOptions): Core.APIPromise { + return this._client.get(`/v1/agents/runs/${runId}`, options); + } + + /** + * List runs across your account. Supports filtering by status, by the agent they + * reference, and by creation time. + */ + list(query?: RunListParams, options?: Core.RequestOptions): Core.APIPromise; + list(options?: Core.RequestOptions): Core.APIPromise; + list( + query: RunListParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.list({}, query); + } + return this._client.get('/v1/agents/runs', { query, ...options }); + } + + /** + * Returns a paginated list of messages produced by a run, in chronological order, + * with the oldest messages first. + * + * Messages conform to the + * [AI SDK UIMessage format](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message). + */ + listMessages( + runId: string, + query?: RunListMessagesParams, + options?: Core.RequestOptions, + ): Core.APIPromise; + listMessages(runId: string, options?: Core.RequestOptions): Core.APIPromise; + listMessages( + runId: string, + query: RunListMessagesParams | Core.RequestOptions = {}, + options?: Core.RequestOptions, + ): Core.APIPromise { + if (isRequestOptions(query)) { + return this.listMessages(runId, {}, query); + } + return this._client.get(`/v1/agents/runs/${runId}/messages`, { query, ...options }); + } +} + +/** + * One execution of an agent against a task. Created in `pending` and transitioned + * through `running` → `completed`/`failed` by the runner. + */ +export interface RunCreateResponse { + createdAt: string; + + /** + * Unique identifier for the run. + */ + runId: string; + + /** + * Current status of the run. + * + * - `PENDING` - agent will run soon + * - `RUNNING` - agent is currently running + * - `COMPLETED` - agent has finished running + * - `FAILED` - agent has failed the run + * - `STOPPED` - run was stopped by the user + * - `TIMED_OUT` - run exceeded maximum time + */ + status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT'; + + /** + * The original task description. + */ + task: string; + + updatedAt: string; + + /** + * The ID of the agent applied to this run, if any. Omitted for ad-hoc runs. + */ + agentId?: string; + + cause?: RunCreateResponse.Cause; + + endedAt?: string; + + /** + * The agent's structured result for the run. Only present when the run has + * finished and output is available. The result conforms to the provided + * [JSON Schema](https://json-schema.org/specification) when one is set. + */ + result?: { [key: string]: unknown }; + + /** + * Per-run [JSON Schema](https://json-schema.org/specification) override for the + * result shape. When unset, the agent's default `resultSchema` applies. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * External sandbox identifier assigned by the runner. Optional. + */ + sandboxId?: string; + + /** + * The Browserbase session ID powering this run. + */ + sessionId?: string; + + startedAt?: string; +} + +export namespace RunCreateResponse { + export interface Cause { + /** + * Structured failure code (e.g., RUNNER_HEARTBEAT_LOST). + */ + code: string; + + /** + * Human-readable failure detail. + */ + message?: string; + } +} + +/** + * One execution of an agent against a task. Created in `pending` and transitioned + * through `running` → `completed`/`failed` by the runner. + */ +export interface RunRetrieveResponse { + createdAt: string; + + /** + * Unique identifier for the run. + */ + runId: string; + + /** + * Current status of the run. + * + * - `PENDING` - agent will run soon + * - `RUNNING` - agent is currently running + * - `COMPLETED` - agent has finished running + * - `FAILED` - agent has failed the run + * - `STOPPED` - run was stopped by the user + * - `TIMED_OUT` - run exceeded maximum time + */ + status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT'; + + /** + * The original task description. + */ + task: string; + + updatedAt: string; + + /** + * The ID of the agent applied to this run, if any. Omitted for ad-hoc runs. + */ + agentId?: string; + + cause?: RunRetrieveResponse.Cause; + + endedAt?: string; + + /** + * The agent's structured result for the run. Only present when the run has + * finished and output is available. The result conforms to the provided + * [JSON Schema](https://json-schema.org/specification) when one is set. + */ + result?: { [key: string]: unknown }; + + /** + * Per-run [JSON Schema](https://json-schema.org/specification) override for the + * result shape. When unset, the agent's default `resultSchema` applies. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * External sandbox identifier assigned by the runner. Optional. + */ + sandboxId?: string; + + /** + * The Browserbase session ID powering this run. + */ + sessionId?: string; + + startedAt?: string; +} + +export namespace RunRetrieveResponse { + export interface Cause { + /** + * Structured failure code (e.g., RUNNER_HEARTBEAT_LOST). + */ + code: string; + + /** + * Human-readable failure detail. + */ + message?: string; + } +} + +/** + * A page of agent runs. + */ +export interface RunListResponse { + /** + * The page of matching agent runs. + */ + data: Array; + + /** + * The maximum number of results returned in this page. + */ + limit: number; + + /** + * Cursor for the next page. Pass it back as `cursor` on the next request to + * continue paging. null when there are no more results. + */ + nextCursor: string | null; +} + +export namespace RunListResponse { + /** + * One execution of an agent against a task. Created in `pending` and transitioned + * through `running` → `completed`/`failed` by the runner. + */ + export interface Data { + createdAt: string; + + /** + * Unique identifier for the run. + */ + runId: string; + + /** + * Current status of the run. + * + * - `PENDING` - agent will run soon + * - `RUNNING` - agent is currently running + * - `COMPLETED` - agent has finished running + * - `FAILED` - agent has failed the run + * - `STOPPED` - run was stopped by the user + * - `TIMED_OUT` - run exceeded maximum time + */ + status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT'; + + /** + * The original task description. + */ + task: string; + + updatedAt: string; + + /** + * The ID of the agent applied to this run, if any. Omitted for ad-hoc runs. + */ + agentId?: string; + + cause?: Data.Cause; + + endedAt?: string; + + /** + * The agent's structured result for the run. Only present when the run has + * finished and output is available. The result conforms to the provided + * [JSON Schema](https://json-schema.org/specification) when one is set. + */ + result?: { [key: string]: unknown }; + + /** + * Per-run [JSON Schema](https://json-schema.org/specification) override for the + * result shape. When unset, the agent's default `resultSchema` applies. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * External sandbox identifier assigned by the runner. Optional. + */ + sandboxId?: string; + + /** + * The Browserbase session ID powering this run. + */ + sessionId?: string; + + startedAt?: string; + } + + export namespace Data { + export interface Cause { + /** + * Structured failure code (e.g., RUNNER_HEARTBEAT_LOST). + */ + code: string; + + /** + * Human-readable failure detail. + */ + message?: string; + } + } +} + +export interface RunListMessagesResponse { + /** + * The page of messages, in chronological order, with the oldest messages first. + */ + data: Array; + + /** + * The `id` of the last message in `data`. Pass it back as `since` on the next + * request to continue paging, or to poll for new messages. `null` only when the + * run has no messages yet; in that case, omit `since` and retry. + */ + nextSince: string | null; +} + +export namespace RunListMessagesResponse { + export interface Data { + id: string; + + createdAt: string; + + /** + * An AI SDK response message (assistant or tool). + */ + message: Data.Message; + } + + export namespace Data { + /** + * An AI SDK response message (assistant or tool). + */ + export interface Message { + /** + * Plain string (assistant text) or an array of typed parts. + */ + content: string | Array; + + role: 'assistant' | 'tool'; + + [k: string]: unknown; + } + + export namespace Message { + export interface UnionMember1 { + /** + * text | reasoning | file | tool-call | tool-result + */ + type: string; + + data?: string; + + input?: unknown; + + mediaType?: string; + + output?: unknown; + + text?: string; + + toolCallId?: string; + + toolName?: string; + + [k: string]: unknown; + } + } + } +} + +export interface RunCreateParams { + /** + * A natural language description of the task the agent should accomplish. + */ + task: string; + + /** + * Optionally run a specific [custom agent](/reference/api/create-an-agent) you've + * created by ID. The run will use the agent's `systemPrompt` and `resultSchema` + * unless overridden. + */ + agentId?: string; + + /** + * Browser configuration for the agent's session. When omitted, runner defaults + * apply. + */ + browserSettings?: RunCreateParams.BrowserSettings; + + /** + * An optional [JSON Schema](https://json-schema.org/specification) object. If + * provided, the agent will aim to return a `result` that conforms to this schema + * when the run completes. Overrides the referenced agent's default `resultSchema` + * for this run only. + */ + resultSchema?: { [key: string]: unknown }; + + /** + * Optional named variables the agent can reference as placeholders, i.e. + * `%variable%`. Each entry pairs a `value` the placeholder resolves to with an + * optional `description` that hints to the agent when it should be used. Values + * are not persisted. + */ + variables?: { [key: string]: RunCreateParams.Variables }; +} + +export namespace RunCreateParams { + /** + * Browser configuration for the agent's session. When omitted, runner defaults + * apply. + */ + export interface BrowserSettings { + context?: BrowserSettings.Context; + + /** + * Set true to route the agent's browser session through the default proxy. + */ + proxies?: boolean; + + /** + * Set true to enable Browserbase Verified for the session. + */ + verified?: boolean; + } + + export namespace BrowserSettings { + export interface Context { + /** + * The Context ID. + */ + id: string; + + /** + * Whether to persist the context after browsing. Defaults to false. + */ + persist?: boolean; + } + } + + export interface Variables { + /** + * The value the placeholder resolves to when the agent uses it. + */ + value: string; + + /** + * Optional hint to the agent describing what this variable represents and when to + * use it. + */ + description?: string; + } +} + +export interface RunListParams { + /** + * Only return runs that reference this agent ID. + */ + agentId?: string; + + /** + * Pagination cursor. Pass the nextCursor from the previous response to fetch the + * next page. Omit to start from the first page. + */ + cursor?: string; + + /** + * Only return runs created on or before this timestamp (inclusive). ISO 8601 / RFC + * 3339, e.g. 2026-01-20T00:00:00Z. + */ + endAt?: string; + + /** + * Maximum number of results to return. + */ + limit?: number; + + /** + * Only return runs created on or after this timestamp (inclusive). ISO 8601 / RFC + * 3339, e.g. 2026-01-19T00:00:00Z. + */ + startAt?: string; + + /** + * Current status of the run. + * + * - `PENDING` - agent will run soon + * - `RUNNING` - agent is currently running + * - `COMPLETED` - agent has finished running + * - `FAILED` - agent has failed the run + * - `STOPPED` - run was stopped by the user + * - `TIMED_OUT` - run exceeded maximum time + */ + status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT'; +} + +export interface RunListMessagesParams { + /** + * Return every message after `since` in one response, ignoring `limit`. + */ + all?: boolean; + + /** + * Maximum number of messages to return. + */ + limit?: number; + + /** + * The `id` of the last message you've already received. The response will contain + * messages produced after that one, in chronological order. Omit on the first + * call. Pass the previous response's `nextSince` value to continue paging or to + * poll for new messages. + */ + since?: string; +} + +export declare namespace Runs { + export { + type RunCreateResponse as RunCreateResponse, + type RunRetrieveResponse as RunRetrieveResponse, + type RunListResponse as RunListResponse, + type RunListMessagesResponse as RunListMessagesResponse, + type RunCreateParams as RunCreateParams, + type RunListParams as RunListParams, + type RunListMessagesParams as RunListMessagesParams, + }; +} diff --git a/src/resources/index.ts b/src/resources/index.ts index 7192b67..d81452f 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,5 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { + Agents, + type AgentCreateResponse, + type AgentRetrieveResponse, + type AgentUpdateResponse, + type AgentListResponse, + type AgentCreateParams, + type AgentUpdateParams, + type AgentListParams, +} from './agents/agents'; export { Certificates, type Certificate, diff --git a/tests/api-resources/agents/agents.test.ts b/tests/api-resources/agents/agents.test.ts new file mode 100644 index 0000000..e6ef718 --- /dev/null +++ b/tests/api-resources/agents/agents.test.ts @@ -0,0 +1,132 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Browserbase from '@browserbasehq/sdk'; +import { Response } from 'node-fetch'; + +const client = new Browserbase({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource agents', () => { + test('create: only required params', async () => { + const responsePromise = client.agents.create({ name: 'x' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.agents.create({ + name: 'x', + resultSchema: { foo: 'bar' }, + systemPrompt: 'x', + }); + }); + + test('retrieve', async () => { + const responsePromise = client.agents.retrieve('agentId'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('retrieve: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.retrieve('agentId', { path: '/_stainless_unknown_path' })).rejects.toThrow( + Browserbase.NotFoundError, + ); + }); + + test('update', async () => { + const responsePromise = client.agents.update('agentId'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('update: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.update('agentId', { path: '/_stainless_unknown_path' })).rejects.toThrow( + Browserbase.NotFoundError, + ); + }); + + test('update: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.agents.update( + 'agentId', + { + name: 'x', + resultSchema: { foo: 'bar' }, + systemPrompt: 'x', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Browserbase.NotFoundError); + }); + + test('list', async () => { + const responsePromise = client.agents.list(); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('list: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.list({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Browserbase.NotFoundError, + ); + }); + + test('list: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.agents.list( + { + cursor: 'cursor', + endAt: '2019-12-27T18:11:19.117Z', + limit: 1, + startAt: '2019-12-27T18:11:19.117Z', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Browserbase.NotFoundError); + }); + + test('delete', async () => { + const responsePromise = client.agents.delete('agentId'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('delete: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.delete('agentId', { path: '/_stainless_unknown_path' })).rejects.toThrow( + Browserbase.NotFoundError, + ); + }); +}); diff --git a/tests/api-resources/agents/runs.test.ts b/tests/api-resources/agents/runs.test.ts new file mode 100644 index 0000000..8722637 --- /dev/null +++ b/tests/api-resources/agents/runs.test.ts @@ -0,0 +1,124 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Browserbase from '@browserbasehq/sdk'; +import { Response } from 'node-fetch'; + +const client = new Browserbase({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource runs', () => { + test('create: only required params', async () => { + const responsePromise = client.agents.runs.create({ task: 'x' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.agents.runs.create({ + task: 'x', + agentId: 'agentId', + browserSettings: { + context: { id: 'id', persist: true }, + proxies: true, + verified: true, + }, + resultSchema: { foo: 'bar' }, + variables: { foo: { value: 'value', description: 'description' } }, + }); + }); + + test('retrieve', async () => { + const responsePromise = client.agents.runs.retrieve('runId'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('retrieve: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.runs.retrieve('runId', { path: '/_stainless_unknown_path' })).rejects.toThrow( + Browserbase.NotFoundError, + ); + }); + + test('list', async () => { + const responsePromise = client.agents.runs.list(); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('list: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.runs.list({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Browserbase.NotFoundError, + ); + }); + + test('list: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.agents.runs.list( + { + agentId: 'agentId', + cursor: 'cursor', + endAt: '2019-12-27T18:11:19.117Z', + limit: 1, + startAt: '2019-12-27T18:11:19.117Z', + status: 'PENDING', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Browserbase.NotFoundError); + }); + + test('listMessages', async () => { + const responsePromise = client.agents.runs.listMessages('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('listMessages: request options instead of params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.agents.runs.listMessages('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + path: '/_stainless_unknown_path', + }), + ).rejects.toThrow(Browserbase.NotFoundError); + }); + + test('listMessages: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect( + client.agents.runs.listMessages( + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + { + all: true, + limit: 1, + since: 'since', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(Browserbase.NotFoundError); + }); +}); From 221fce4b4f9a31ded1160a0d184b5ce94c87483a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 22:01:19 +0000 Subject: [PATCH 7/9] release: 2.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- src/version.ts | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 288ee47..96a8c91 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.14.1" + ".": "2.15.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index cc782ff..a8d8d44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 2.15.0 (2026-07-02) + +Full Changelog: [v2.14.1...v2.15.0](https://github.com/browserbase/sdk-node/compare/v2.14.1...v2.15.0) + +### Features + +* [CORE-000][apps/sdk] Add agents to SDK ([1f1fb26](https://github.com/browserbase/sdk-node/commit/1f1fb26aaa11928cdc6b26baa7452c8577ea206c)) + + +### Documentation + +* document and un-gate allowedDomains session setting ([d18989f](https://github.com/browserbase/sdk-node/commit/d18989f3085093d85cf8e52825c8920ce753e7b9)) + ## 2.14.1 (2026-06-18) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index 473e3ae..d5d0060 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@browserbasehq/sdk", - "version": "2.14.1", + "version": "2.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@browserbasehq/sdk", - "version": "2.14.1", + "version": "2.15.0", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", diff --git a/package.json b/package.json index c3d9724..d3e4474 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@browserbasehq/sdk", - "version": "2.14.1", + "version": "2.15.0", "description": "The official Node.js library for the Browserbase API", "author": "Browserbase ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 1732631..ba989f0 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '2.14.1'; // x-release-please-version +export const VERSION = '2.15.0'; // x-release-please-version From ff7045fec37064bb05fccdec24148aa483fea0e2 Mon Sep 17 00:00:00 2001 From: dom Date: Thu, 2 Jul 2026 15:19:58 -0700 Subject: [PATCH 8/9] fix shims --- tests/api-resources/agents/agents.test.ts | 2 +- tests/api-resources/agents/runs.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/api-resources/agents/agents.test.ts b/tests/api-resources/agents/agents.test.ts index e6ef718..633bd42 100644 --- a/tests/api-resources/agents/agents.test.ts +++ b/tests/api-resources/agents/agents.test.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import Browserbase from '@browserbasehq/sdk'; -import { Response } from 'node-fetch'; +import { Response } from '@browserbasehq/sdk/_shims/index'; const client = new Browserbase({ apiKey: 'My API Key', diff --git a/tests/api-resources/agents/runs.test.ts b/tests/api-resources/agents/runs.test.ts index 8722637..e5e9f05 100644 --- a/tests/api-resources/agents/runs.test.ts +++ b/tests/api-resources/agents/runs.test.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import Browserbase from '@browserbasehq/sdk'; -import { Response } from 'node-fetch'; +import { Response } from '@browserbasehq/sdk/_shims/index'; const client = new Browserbase({ apiKey: 'My API Key', From d4949f2871eae7f98f0da76e18bb99a859c02330 Mon Sep 17 00:00:00 2001 From: dom Date: Thu, 2 Jul 2026 17:00:06 -0700 Subject: [PATCH 9/9] Add package license metadata --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d3e4474..b3d0ff2 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.15.0", "description": "The official Node.js library for the Browserbase API", "author": "Browserbase ", + "license": "Apache-2.0", "types": "dist/index.d.ts", "main": "dist/index.js", "type": "commonjs",