@browserbasehq/sdk 2.14.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +11 -7
- package/_shims/README.md +5 -2
- package/_shims/auto/runtime-node.d.ts +2 -4
- package/_shims/auto/runtime-node.d.ts.map +1 -1
- package/_shims/auto/runtime-node.js +43 -15
- package/_shims/auto/runtime-node.js.map +1 -1
- package/_shims/auto/runtime-node.mjs +42 -1
- package/_shims/auto/runtime-node.mjs.map +1 -1
- package/_shims/index.d.ts +4 -0
- package/_shims/node-types.d.ts +3 -0
- package/index.d.mts +9 -4
- package/index.d.ts +9 -4
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +3 -0
- package/index.mjs.map +1 -1
- package/package.json +2 -1
- package/resources/agents/agents.d.ts +240 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +85 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +48 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/index.d.ts +3 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +9 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +4 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/runs.d.ts +441 -0
- package/resources/agents/runs.d.ts.map +1 -0
- package/resources/agents/runs.js +38 -0
- package/resources/agents/runs.js.map +1 -0
- package/resources/agents/runs.mjs +34 -0
- package/resources/agents/runs.mjs.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +19 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/sessions/sessions.d.ts +11 -0
- package/resources/sessions/sessions.d.ts.map +1 -1
- package/resources/sessions/sessions.js.map +1 -1
- package/resources/sessions/sessions.mjs.map +1 -1
- package/src/_shims/README.md +5 -2
- package/src/_shims/auto/runtime-node.ts +60 -1
- package/src/_shims/index.d.ts +4 -0
- package/src/_shims/node-types.d.ts +3 -0
- package/src/index.ts +29 -4
- package/src/resources/agents/agents.ts +335 -0
- package/src/resources/agents/index.ts +22 -0
- package/src/resources/agents/runs.ts +553 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/index.ts +10 -0
- package/src/resources/sessions/sessions.ts +12 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
export declare class Runs extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Run a browser agent to complete the `task` by using web search and browser
|
|
6
|
+
* tooling. Optionally pass `agentId` to run a
|
|
7
|
+
* [custom agent](/reference/api/create-an-agent) you've created.
|
|
8
|
+
*/
|
|
9
|
+
create(body: RunCreateParams, options?: Core.RequestOptions): Core.APIPromise<RunCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve the current status and details of a run, including its result and
|
|
12
|
+
* associated session information. To fetch the run's messages, use
|
|
13
|
+
* [List Run Messages](/reference/api/list-run-messages).
|
|
14
|
+
*/
|
|
15
|
+
retrieve(runId: string, options?: Core.RequestOptions): Core.APIPromise<RunRetrieveResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* List runs across your account. Supports filtering by status, by the agent they
|
|
18
|
+
* reference, and by creation time.
|
|
19
|
+
*/
|
|
20
|
+
list(query?: RunListParams, options?: Core.RequestOptions): Core.APIPromise<RunListResponse>;
|
|
21
|
+
list(options?: Core.RequestOptions): Core.APIPromise<RunListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns a paginated list of messages produced by a run, in chronological order,
|
|
24
|
+
* with the oldest messages first.
|
|
25
|
+
*
|
|
26
|
+
* Messages conform to the
|
|
27
|
+
* [AI SDK UIMessage format](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message).
|
|
28
|
+
*/
|
|
29
|
+
listMessages(runId: string, query?: RunListMessagesParams, options?: Core.RequestOptions): Core.APIPromise<RunListMessagesResponse>;
|
|
30
|
+
listMessages(runId: string, options?: Core.RequestOptions): Core.APIPromise<RunListMessagesResponse>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One execution of an agent against a task. Created in `pending` and transitioned
|
|
34
|
+
* through `running` → `completed`/`failed` by the runner.
|
|
35
|
+
*/
|
|
36
|
+
export interface RunCreateResponse {
|
|
37
|
+
createdAt: string;
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for the run.
|
|
40
|
+
*/
|
|
41
|
+
runId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Current status of the run.
|
|
44
|
+
*
|
|
45
|
+
* - `PENDING` - agent will run soon
|
|
46
|
+
* - `RUNNING` - agent is currently running
|
|
47
|
+
* - `COMPLETED` - agent has finished running
|
|
48
|
+
* - `FAILED` - agent has failed the run
|
|
49
|
+
* - `STOPPED` - run was stopped by the user
|
|
50
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
51
|
+
*/
|
|
52
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
53
|
+
/**
|
|
54
|
+
* The original task description.
|
|
55
|
+
*/
|
|
56
|
+
task: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
/**
|
|
59
|
+
* The ID of the agent applied to this run, if any. Omitted for ad-hoc runs.
|
|
60
|
+
*/
|
|
61
|
+
agentId?: string;
|
|
62
|
+
cause?: RunCreateResponse.Cause;
|
|
63
|
+
endedAt?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The agent's structured result for the run. Only present when the run has
|
|
66
|
+
* finished and output is available. The result conforms to the provided
|
|
67
|
+
* [JSON Schema](https://json-schema.org/specification) when one is set.
|
|
68
|
+
*/
|
|
69
|
+
result?: {
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Per-run [JSON Schema](https://json-schema.org/specification) override for the
|
|
74
|
+
* result shape. When unset, the agent's default `resultSchema` applies.
|
|
75
|
+
*/
|
|
76
|
+
resultSchema?: {
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* External sandbox identifier assigned by the runner. Optional.
|
|
81
|
+
*/
|
|
82
|
+
sandboxId?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The Browserbase session ID powering this run.
|
|
85
|
+
*/
|
|
86
|
+
sessionId?: string;
|
|
87
|
+
startedAt?: string;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace RunCreateResponse {
|
|
90
|
+
interface Cause {
|
|
91
|
+
/**
|
|
92
|
+
* Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
|
|
93
|
+
*/
|
|
94
|
+
code: string;
|
|
95
|
+
/**
|
|
96
|
+
* Human-readable failure detail.
|
|
97
|
+
*/
|
|
98
|
+
message?: string;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* One execution of an agent against a task. Created in `pending` and transitioned
|
|
103
|
+
* through `running` → `completed`/`failed` by the runner.
|
|
104
|
+
*/
|
|
105
|
+
export interface RunRetrieveResponse {
|
|
106
|
+
createdAt: string;
|
|
107
|
+
/**
|
|
108
|
+
* Unique identifier for the run.
|
|
109
|
+
*/
|
|
110
|
+
runId: string;
|
|
111
|
+
/**
|
|
112
|
+
* Current status of the run.
|
|
113
|
+
*
|
|
114
|
+
* - `PENDING` - agent will run soon
|
|
115
|
+
* - `RUNNING` - agent is currently running
|
|
116
|
+
* - `COMPLETED` - agent has finished running
|
|
117
|
+
* - `FAILED` - agent has failed the run
|
|
118
|
+
* - `STOPPED` - run was stopped by the user
|
|
119
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
120
|
+
*/
|
|
121
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
122
|
+
/**
|
|
123
|
+
* The original task description.
|
|
124
|
+
*/
|
|
125
|
+
task: string;
|
|
126
|
+
updatedAt: string;
|
|
127
|
+
/**
|
|
128
|
+
* The ID of the agent applied to this run, if any. Omitted for ad-hoc runs.
|
|
129
|
+
*/
|
|
130
|
+
agentId?: string;
|
|
131
|
+
cause?: RunRetrieveResponse.Cause;
|
|
132
|
+
endedAt?: string;
|
|
133
|
+
/**
|
|
134
|
+
* The agent's structured result for the run. Only present when the run has
|
|
135
|
+
* finished and output is available. The result conforms to the provided
|
|
136
|
+
* [JSON Schema](https://json-schema.org/specification) when one is set.
|
|
137
|
+
*/
|
|
138
|
+
result?: {
|
|
139
|
+
[key: string]: unknown;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Per-run [JSON Schema](https://json-schema.org/specification) override for the
|
|
143
|
+
* result shape. When unset, the agent's default `resultSchema` applies.
|
|
144
|
+
*/
|
|
145
|
+
resultSchema?: {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* External sandbox identifier assigned by the runner. Optional.
|
|
150
|
+
*/
|
|
151
|
+
sandboxId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* The Browserbase session ID powering this run.
|
|
154
|
+
*/
|
|
155
|
+
sessionId?: string;
|
|
156
|
+
startedAt?: string;
|
|
157
|
+
}
|
|
158
|
+
export declare namespace RunRetrieveResponse {
|
|
159
|
+
interface Cause {
|
|
160
|
+
/**
|
|
161
|
+
* Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
|
|
162
|
+
*/
|
|
163
|
+
code: string;
|
|
164
|
+
/**
|
|
165
|
+
* Human-readable failure detail.
|
|
166
|
+
*/
|
|
167
|
+
message?: string;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* A page of agent runs.
|
|
172
|
+
*/
|
|
173
|
+
export interface RunListResponse {
|
|
174
|
+
/**
|
|
175
|
+
* The page of matching agent runs.
|
|
176
|
+
*/
|
|
177
|
+
data: Array<RunListResponse.Data>;
|
|
178
|
+
/**
|
|
179
|
+
* The maximum number of results returned in this page.
|
|
180
|
+
*/
|
|
181
|
+
limit: number;
|
|
182
|
+
/**
|
|
183
|
+
* Cursor for the next page. Pass it back as `cursor` on the next request to
|
|
184
|
+
* continue paging. null when there are no more results.
|
|
185
|
+
*/
|
|
186
|
+
nextCursor: string | null;
|
|
187
|
+
}
|
|
188
|
+
export declare namespace RunListResponse {
|
|
189
|
+
/**
|
|
190
|
+
* One execution of an agent against a task. Created in `pending` and transitioned
|
|
191
|
+
* through `running` → `completed`/`failed` by the runner.
|
|
192
|
+
*/
|
|
193
|
+
interface Data {
|
|
194
|
+
createdAt: string;
|
|
195
|
+
/**
|
|
196
|
+
* Unique identifier for the run.
|
|
197
|
+
*/
|
|
198
|
+
runId: string;
|
|
199
|
+
/**
|
|
200
|
+
* Current status of the run.
|
|
201
|
+
*
|
|
202
|
+
* - `PENDING` - agent will run soon
|
|
203
|
+
* - `RUNNING` - agent is currently running
|
|
204
|
+
* - `COMPLETED` - agent has finished running
|
|
205
|
+
* - `FAILED` - agent has failed the run
|
|
206
|
+
* - `STOPPED` - run was stopped by the user
|
|
207
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
208
|
+
*/
|
|
209
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
210
|
+
/**
|
|
211
|
+
* The original task description.
|
|
212
|
+
*/
|
|
213
|
+
task: string;
|
|
214
|
+
updatedAt: string;
|
|
215
|
+
/**
|
|
216
|
+
* The ID of the agent applied to this run, if any. Omitted for ad-hoc runs.
|
|
217
|
+
*/
|
|
218
|
+
agentId?: string;
|
|
219
|
+
cause?: Data.Cause;
|
|
220
|
+
endedAt?: string;
|
|
221
|
+
/**
|
|
222
|
+
* The agent's structured result for the run. Only present when the run has
|
|
223
|
+
* finished and output is available. The result conforms to the provided
|
|
224
|
+
* [JSON Schema](https://json-schema.org/specification) when one is set.
|
|
225
|
+
*/
|
|
226
|
+
result?: {
|
|
227
|
+
[key: string]: unknown;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Per-run [JSON Schema](https://json-schema.org/specification) override for the
|
|
231
|
+
* result shape. When unset, the agent's default `resultSchema` applies.
|
|
232
|
+
*/
|
|
233
|
+
resultSchema?: {
|
|
234
|
+
[key: string]: unknown;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* External sandbox identifier assigned by the runner. Optional.
|
|
238
|
+
*/
|
|
239
|
+
sandboxId?: string;
|
|
240
|
+
/**
|
|
241
|
+
* The Browserbase session ID powering this run.
|
|
242
|
+
*/
|
|
243
|
+
sessionId?: string;
|
|
244
|
+
startedAt?: string;
|
|
245
|
+
}
|
|
246
|
+
namespace Data {
|
|
247
|
+
interface Cause {
|
|
248
|
+
/**
|
|
249
|
+
* Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
|
|
250
|
+
*/
|
|
251
|
+
code: string;
|
|
252
|
+
/**
|
|
253
|
+
* Human-readable failure detail.
|
|
254
|
+
*/
|
|
255
|
+
message?: string;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
export interface RunListMessagesResponse {
|
|
260
|
+
/**
|
|
261
|
+
* The page of messages, in chronological order, with the oldest messages first.
|
|
262
|
+
*/
|
|
263
|
+
data: Array<RunListMessagesResponse.Data>;
|
|
264
|
+
/**
|
|
265
|
+
* The `id` of the last message in `data`. Pass it back as `since` on the next
|
|
266
|
+
* request to continue paging, or to poll for new messages. `null` only when the
|
|
267
|
+
* run has no messages yet; in that case, omit `since` and retry.
|
|
268
|
+
*/
|
|
269
|
+
nextSince: string | null;
|
|
270
|
+
}
|
|
271
|
+
export declare namespace RunListMessagesResponse {
|
|
272
|
+
interface Data {
|
|
273
|
+
id: string;
|
|
274
|
+
createdAt: string;
|
|
275
|
+
/**
|
|
276
|
+
* An AI SDK response message (assistant or tool).
|
|
277
|
+
*/
|
|
278
|
+
message: Data.Message;
|
|
279
|
+
}
|
|
280
|
+
namespace Data {
|
|
281
|
+
/**
|
|
282
|
+
* An AI SDK response message (assistant or tool).
|
|
283
|
+
*/
|
|
284
|
+
interface Message {
|
|
285
|
+
/**
|
|
286
|
+
* Plain string (assistant text) or an array of typed parts.
|
|
287
|
+
*/
|
|
288
|
+
content: string | Array<Message.UnionMember1>;
|
|
289
|
+
role: 'assistant' | 'tool';
|
|
290
|
+
[k: string]: unknown;
|
|
291
|
+
}
|
|
292
|
+
namespace Message {
|
|
293
|
+
interface UnionMember1 {
|
|
294
|
+
/**
|
|
295
|
+
* text | reasoning | file | tool-call | tool-result
|
|
296
|
+
*/
|
|
297
|
+
type: string;
|
|
298
|
+
data?: string;
|
|
299
|
+
input?: unknown;
|
|
300
|
+
mediaType?: string;
|
|
301
|
+
output?: unknown;
|
|
302
|
+
text?: string;
|
|
303
|
+
toolCallId?: string;
|
|
304
|
+
toolName?: string;
|
|
305
|
+
[k: string]: unknown;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
export interface RunCreateParams {
|
|
311
|
+
/**
|
|
312
|
+
* A natural language description of the task the agent should accomplish.
|
|
313
|
+
*/
|
|
314
|
+
task: string;
|
|
315
|
+
/**
|
|
316
|
+
* Optionally run a specific [custom agent](/reference/api/create-an-agent) you've
|
|
317
|
+
* created by ID. The run will use the agent's `systemPrompt` and `resultSchema`
|
|
318
|
+
* unless overridden.
|
|
319
|
+
*/
|
|
320
|
+
agentId?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Browser configuration for the agent's session. When omitted, runner defaults
|
|
323
|
+
* apply.
|
|
324
|
+
*/
|
|
325
|
+
browserSettings?: RunCreateParams.BrowserSettings;
|
|
326
|
+
/**
|
|
327
|
+
* An optional [JSON Schema](https://json-schema.org/specification) object. If
|
|
328
|
+
* provided, the agent will aim to return a `result` that conforms to this schema
|
|
329
|
+
* when the run completes. Overrides the referenced agent's default `resultSchema`
|
|
330
|
+
* for this run only.
|
|
331
|
+
*/
|
|
332
|
+
resultSchema?: {
|
|
333
|
+
[key: string]: unknown;
|
|
334
|
+
};
|
|
335
|
+
/**
|
|
336
|
+
* Optional named variables the agent can reference as placeholders, i.e.
|
|
337
|
+
* `%variable%`. Each entry pairs a `value` the placeholder resolves to with an
|
|
338
|
+
* optional `description` that hints to the agent when it should be used. Values
|
|
339
|
+
* are not persisted.
|
|
340
|
+
*/
|
|
341
|
+
variables?: {
|
|
342
|
+
[key: string]: RunCreateParams.Variables;
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
export declare namespace RunCreateParams {
|
|
346
|
+
/**
|
|
347
|
+
* Browser configuration for the agent's session. When omitted, runner defaults
|
|
348
|
+
* apply.
|
|
349
|
+
*/
|
|
350
|
+
interface BrowserSettings {
|
|
351
|
+
context?: BrowserSettings.Context;
|
|
352
|
+
/**
|
|
353
|
+
* Set true to route the agent's browser session through the default proxy.
|
|
354
|
+
*/
|
|
355
|
+
proxies?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Set true to enable Browserbase Verified for the session.
|
|
358
|
+
*/
|
|
359
|
+
verified?: boolean;
|
|
360
|
+
}
|
|
361
|
+
namespace BrowserSettings {
|
|
362
|
+
interface Context {
|
|
363
|
+
/**
|
|
364
|
+
* The Context ID.
|
|
365
|
+
*/
|
|
366
|
+
id: string;
|
|
367
|
+
/**
|
|
368
|
+
* Whether to persist the context after browsing. Defaults to false.
|
|
369
|
+
*/
|
|
370
|
+
persist?: boolean;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
interface Variables {
|
|
374
|
+
/**
|
|
375
|
+
* The value the placeholder resolves to when the agent uses it.
|
|
376
|
+
*/
|
|
377
|
+
value: string;
|
|
378
|
+
/**
|
|
379
|
+
* Optional hint to the agent describing what this variable represents and when to
|
|
380
|
+
* use it.
|
|
381
|
+
*/
|
|
382
|
+
description?: string;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
export interface RunListParams {
|
|
386
|
+
/**
|
|
387
|
+
* Only return runs that reference this agent ID.
|
|
388
|
+
*/
|
|
389
|
+
agentId?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Pagination cursor. Pass the nextCursor from the previous response to fetch the
|
|
392
|
+
* next page. Omit to start from the first page.
|
|
393
|
+
*/
|
|
394
|
+
cursor?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Only return runs created on or before this timestamp (inclusive). ISO 8601 / RFC
|
|
397
|
+
* 3339, e.g. 2026-01-20T00:00:00Z.
|
|
398
|
+
*/
|
|
399
|
+
endAt?: string;
|
|
400
|
+
/**
|
|
401
|
+
* Maximum number of results to return.
|
|
402
|
+
*/
|
|
403
|
+
limit?: number;
|
|
404
|
+
/**
|
|
405
|
+
* Only return runs created on or after this timestamp (inclusive). ISO 8601 / RFC
|
|
406
|
+
* 3339, e.g. 2026-01-19T00:00:00Z.
|
|
407
|
+
*/
|
|
408
|
+
startAt?: string;
|
|
409
|
+
/**
|
|
410
|
+
* Current status of the run.
|
|
411
|
+
*
|
|
412
|
+
* - `PENDING` - agent will run soon
|
|
413
|
+
* - `RUNNING` - agent is currently running
|
|
414
|
+
* - `COMPLETED` - agent has finished running
|
|
415
|
+
* - `FAILED` - agent has failed the run
|
|
416
|
+
* - `STOPPED` - run was stopped by the user
|
|
417
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
418
|
+
*/
|
|
419
|
+
status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
420
|
+
}
|
|
421
|
+
export interface RunListMessagesParams {
|
|
422
|
+
/**
|
|
423
|
+
* Return every message after `since` in one response, ignoring `limit`.
|
|
424
|
+
*/
|
|
425
|
+
all?: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* Maximum number of messages to return.
|
|
428
|
+
*/
|
|
429
|
+
limit?: number;
|
|
430
|
+
/**
|
|
431
|
+
* The `id` of the last message you've already received. The response will contain
|
|
432
|
+
* messages produced after that one, in chronological order. Omit on the first
|
|
433
|
+
* call. Pass the previous response's `nextSince` value to continue paging or to
|
|
434
|
+
* poll for new messages.
|
|
435
|
+
*/
|
|
436
|
+
since?: string;
|
|
437
|
+
}
|
|
438
|
+
export declare namespace Runs {
|
|
439
|
+
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, };
|
|
440
|
+
}
|
|
441
|
+
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/resources/agents/runs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAIhG;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAI5F;;;OAGG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,OAAO,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AAa,EACnC,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Runs = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
const core_1 = require("../../core.js");
|
|
7
|
+
class Runs extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Run a browser agent to complete the `task` by using web search and browser
|
|
10
|
+
* tooling. Optionally pass `agentId` to run a
|
|
11
|
+
* [custom agent](/reference/api/create-an-agent) you've created.
|
|
12
|
+
*/
|
|
13
|
+
create(body, options) {
|
|
14
|
+
return this._client.post('/v1/agents/runs', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve the current status and details of a run, including its result and
|
|
18
|
+
* associated session information. To fetch the run's messages, use
|
|
19
|
+
* [List Run Messages](/reference/api/list-run-messages).
|
|
20
|
+
*/
|
|
21
|
+
retrieve(runId, options) {
|
|
22
|
+
return this._client.get(`/v1/agents/runs/${runId}`, options);
|
|
23
|
+
}
|
|
24
|
+
list(query = {}, options) {
|
|
25
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
26
|
+
return this.list({}, query);
|
|
27
|
+
}
|
|
28
|
+
return this._client.get('/v1/agents/runs', { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
listMessages(runId, query = {}, options) {
|
|
31
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
32
|
+
return this.listMessages(runId, {}, query);
|
|
33
|
+
}
|
|
34
|
+
return this._client.get(`/v1/agents/runs/${runId}/messages`, { query, ...options });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Runs = Runs;
|
|
38
|
+
//# sourceMappingURL=runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/resources/agents/runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAG9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;OAIG;IACH,MAAM,CAAC,IAAqB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAQD,IAAI,CACF,QAA6C,EAAE,EAC/C,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAeD,YAAY,CACV,KAAa,EACb,QAAqD,EAAE,EACvD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AA1DD,oBA0DC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import { isRequestOptions } from "../../core.mjs";
|
|
4
|
+
export class Runs extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Run a browser agent to complete the `task` by using web search and browser
|
|
7
|
+
* tooling. Optionally pass `agentId` to run a
|
|
8
|
+
* [custom agent](/reference/api/create-an-agent) you've created.
|
|
9
|
+
*/
|
|
10
|
+
create(body, options) {
|
|
11
|
+
return this._client.post('/v1/agents/runs', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve the current status and details of a run, including its result and
|
|
15
|
+
* associated session information. To fetch the run's messages, use
|
|
16
|
+
* [List Run Messages](/reference/api/list-run-messages).
|
|
17
|
+
*/
|
|
18
|
+
retrieve(runId, options) {
|
|
19
|
+
return this._client.get(`/v1/agents/runs/${runId}`, options);
|
|
20
|
+
}
|
|
21
|
+
list(query = {}, options) {
|
|
22
|
+
if (isRequestOptions(query)) {
|
|
23
|
+
return this.list({}, query);
|
|
24
|
+
}
|
|
25
|
+
return this._client.get('/v1/agents/runs', { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
listMessages(runId, query = {}, options) {
|
|
28
|
+
if (isRequestOptions(query)) {
|
|
29
|
+
return this.listMessages(runId, {}, query);
|
|
30
|
+
}
|
|
31
|
+
return this._client.get(`/v1/agents/runs/${runId}/messages`, { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=runs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.mjs","sourceRoot":"","sources":["../../src/resources/agents/runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;OAIG;IACH,MAAM,CAAC,IAAqB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAQD,IAAI,CACF,QAA6C,EAAE,EAC/C,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAeD,YAAY,CACV,KAAa,EACb,QAAqD,EAAE,EACvD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./agents/index.js"), exports);
|
|
19
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,oDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Agents, type AgentCreateResponse, type AgentRetrieveResponse, type AgentUpdateResponse, type AgentListResponse, type AgentCreateParams, type AgentUpdateParams, type AgentListParams, } from "./agents/agents.js";
|
|
1
2
|
export { Certificates, type Certificate, type CertificateListResponse, type CertificateCreateParams, } from "./certificates.js";
|
|
2
3
|
export { Contexts, type Context, type ContextCreateResponse, type ContextUpdateResponse, type ContextCreateParams, } from "./contexts.js";
|
|
3
4
|
export { Extensions, type Extension, type ExtensionCreateParams } from "./extensions.js";
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC"}
|
package/resources/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Sessions = exports.Search = exports.Projects = exports.FetchAPI = exports.Extensions = exports.Contexts = exports.Certificates = void 0;
|
|
4
|
+
exports.Sessions = exports.Search = exports.Projects = exports.FetchAPI = exports.Extensions = exports.Contexts = exports.Certificates = exports.Agents = void 0;
|
|
5
|
+
var agents_1 = require("./agents/agents.js");
|
|
6
|
+
Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
|
|
5
7
|
var certificates_1 = require("./certificates.js");
|
|
6
8
|
Object.defineProperty(exports, "Certificates", { enumerable: true, get: function () { return certificates_1.Certificates; } });
|
|
7
9
|
var contexts_1 = require("./contexts.js");
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAKwB;AAJtB,4GAAA,YAAY,OAAA;AAKd,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,8CAAsF;AAA7E,wGAAA,UAAU,OAAA;AACnB,4CAA+F;AAAtF,qGAAA,QAAQ,OAAA;AACjB,0CAAiG;AAAxF,oGAAA,QAAQ,OAAA;AACjB,sCAAgF;AAAvE,gGAAA,MAAM,OAAA;AACf,mDAU6B;AAT3B,oGAAA,QAAQ,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CASyB;AARvB,gGAAA,MAAM,OAAA;AASR,kDAKwB;AAJtB,4GAAA,YAAY,OAAA;AAKd,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,8CAAsF;AAA7E,wGAAA,UAAU,OAAA;AACnB,4CAA+F;AAAtF,qGAAA,QAAQ,OAAA;AACjB,0CAAiG;AAAxF,oGAAA,QAAQ,OAAA;AACjB,sCAAgF;AAAvE,gGAAA,MAAM,OAAA;AACf,mDAU6B;AAT3B,oGAAA,QAAQ,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { Agents, } from "./agents/agents.mjs";
|
|
2
3
|
export { Certificates, } from "./certificates.mjs";
|
|
3
4
|
export { Contexts, } from "./contexts.mjs";
|
|
4
5
|
export { Extensions } from "./extensions.mjs";
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,YAAY,GAIb;OACM,EACL,QAAQ,GAKT;OACM,EAAE,UAAU,EAA8C;OAC1D,EAAE,QAAQ,EAA0D;OACpE,EAAE,QAAQ,EAA6D;OACvE,EAAE,MAAM,EAAgD;OACxD,EACL,QAAQ,GAST"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAQP;OACM,EACL,YAAY,GAIb;OACM,EACL,QAAQ,GAKT;OACM,EAAE,UAAU,EAA8C;OAC1D,EAAE,QAAQ,EAA0D;OACpE,EAAE,QAAQ,EAA6D;OACvE,EAAE,MAAM,EAAgD;OACxD,EACL,QAAQ,GAST"}
|
|
@@ -170,6 +170,17 @@ export declare namespace SessionCreateParams {
|
|
|
170
170
|
* Advanced Browser Stealth Mode
|
|
171
171
|
*/
|
|
172
172
|
advancedStealth?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* An optional list of allowed domains for the session. If you pass one or more
|
|
175
|
+
* domains, Browserbase restricts top-level (main-frame) page navigations to the
|
|
176
|
+
* listed domains and their subdomains. For example, `example.com` also permits
|
|
177
|
+
* `www.example.com` and `a.b.example.com`, but not `notexample.com`. Matching is
|
|
178
|
+
* domain-based, not full-URL. An empty list (the default) disables the restriction
|
|
179
|
+
* entirely. Browserbase enforces only main-frame navigations; it does not block
|
|
180
|
+
* iframe/subframe loads or other in-page resource requests (images, scripts, XHR,
|
|
181
|
+
* etc.).
|
|
182
|
+
*/
|
|
183
|
+
allowedDomains?: Array<string>;
|
|
173
184
|
/**
|
|
174
185
|
* Enable or disable ad blocking in the browser. Defaults to `false`.
|
|
175
186
|
*/
|