@browserbasehq/sdk 2.14.1 → 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 +13 -0
- package/index.d.mts +3 -0
- package/index.d.ts +3 -0
- 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/index.ts +23 -0
- 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,553 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
|
|
7
|
+
export class Runs extends 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: RunCreateParams, options?: Core.RequestOptions): Core.APIPromise<RunCreateResponse> {
|
|
14
|
+
return this._client.post('/v1/agents/runs', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Retrieve the current status and details of a run, including its result and
|
|
19
|
+
* associated session information. To fetch the run's messages, use
|
|
20
|
+
* [List Run Messages](/reference/api/list-run-messages).
|
|
21
|
+
*/
|
|
22
|
+
retrieve(runId: string, options?: Core.RequestOptions): Core.APIPromise<RunRetrieveResponse> {
|
|
23
|
+
return this._client.get(`/v1/agents/runs/${runId}`, options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* List runs across your account. Supports filtering by status, by the agent they
|
|
28
|
+
* reference, and by creation time.
|
|
29
|
+
*/
|
|
30
|
+
list(query?: RunListParams, options?: Core.RequestOptions): Core.APIPromise<RunListResponse>;
|
|
31
|
+
list(options?: Core.RequestOptions): Core.APIPromise<RunListResponse>;
|
|
32
|
+
list(
|
|
33
|
+
query: RunListParams | Core.RequestOptions = {},
|
|
34
|
+
options?: Core.RequestOptions,
|
|
35
|
+
): Core.APIPromise<RunListResponse> {
|
|
36
|
+
if (isRequestOptions(query)) {
|
|
37
|
+
return this.list({}, query);
|
|
38
|
+
}
|
|
39
|
+
return this._client.get('/v1/agents/runs', { query, ...options });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns a paginated list of messages produced by a run, in chronological order,
|
|
44
|
+
* with the oldest messages first.
|
|
45
|
+
*
|
|
46
|
+
* Messages conform to the
|
|
47
|
+
* [AI SDK UIMessage format](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message).
|
|
48
|
+
*/
|
|
49
|
+
listMessages(
|
|
50
|
+
runId: string,
|
|
51
|
+
query?: RunListMessagesParams,
|
|
52
|
+
options?: Core.RequestOptions,
|
|
53
|
+
): Core.APIPromise<RunListMessagesResponse>;
|
|
54
|
+
listMessages(runId: string, options?: Core.RequestOptions): Core.APIPromise<RunListMessagesResponse>;
|
|
55
|
+
listMessages(
|
|
56
|
+
runId: string,
|
|
57
|
+
query: RunListMessagesParams | Core.RequestOptions = {},
|
|
58
|
+
options?: Core.RequestOptions,
|
|
59
|
+
): Core.APIPromise<RunListMessagesResponse> {
|
|
60
|
+
if (isRequestOptions(query)) {
|
|
61
|
+
return this.listMessages(runId, {}, query);
|
|
62
|
+
}
|
|
63
|
+
return this._client.get(`/v1/agents/runs/${runId}/messages`, { query, ...options });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* One execution of an agent against a task. Created in `pending` and transitioned
|
|
69
|
+
* through `running` → `completed`/`failed` by the runner.
|
|
70
|
+
*/
|
|
71
|
+
export interface RunCreateResponse {
|
|
72
|
+
createdAt: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Unique identifier for the run.
|
|
76
|
+
*/
|
|
77
|
+
runId: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Current status of the run.
|
|
81
|
+
*
|
|
82
|
+
* - `PENDING` - agent will run soon
|
|
83
|
+
* - `RUNNING` - agent is currently running
|
|
84
|
+
* - `COMPLETED` - agent has finished running
|
|
85
|
+
* - `FAILED` - agent has failed the run
|
|
86
|
+
* - `STOPPED` - run was stopped by the user
|
|
87
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
88
|
+
*/
|
|
89
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The original task description.
|
|
93
|
+
*/
|
|
94
|
+
task: string;
|
|
95
|
+
|
|
96
|
+
updatedAt: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The ID of the agent applied to this run, if any. Omitted for ad-hoc runs.
|
|
100
|
+
*/
|
|
101
|
+
agentId?: string;
|
|
102
|
+
|
|
103
|
+
cause?: RunCreateResponse.Cause;
|
|
104
|
+
|
|
105
|
+
endedAt?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The agent's structured result for the run. Only present when the run has
|
|
109
|
+
* finished and output is available. The result conforms to the provided
|
|
110
|
+
* [JSON Schema](https://json-schema.org/specification) when one is set.
|
|
111
|
+
*/
|
|
112
|
+
result?: { [key: string]: unknown };
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Per-run [JSON Schema](https://json-schema.org/specification) override for the
|
|
116
|
+
* result shape. When unset, the agent's default `resultSchema` applies.
|
|
117
|
+
*/
|
|
118
|
+
resultSchema?: { [key: string]: unknown };
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* External sandbox identifier assigned by the runner. Optional.
|
|
122
|
+
*/
|
|
123
|
+
sandboxId?: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The Browserbase session ID powering this run.
|
|
127
|
+
*/
|
|
128
|
+
sessionId?: string;
|
|
129
|
+
|
|
130
|
+
startedAt?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export namespace RunCreateResponse {
|
|
134
|
+
export interface Cause {
|
|
135
|
+
/**
|
|
136
|
+
* Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
|
|
137
|
+
*/
|
|
138
|
+
code: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Human-readable failure detail.
|
|
142
|
+
*/
|
|
143
|
+
message?: string;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* One execution of an agent against a task. Created in `pending` and transitioned
|
|
149
|
+
* through `running` → `completed`/`failed` by the runner.
|
|
150
|
+
*/
|
|
151
|
+
export interface RunRetrieveResponse {
|
|
152
|
+
createdAt: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Unique identifier for the run.
|
|
156
|
+
*/
|
|
157
|
+
runId: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Current status of the run.
|
|
161
|
+
*
|
|
162
|
+
* - `PENDING` - agent will run soon
|
|
163
|
+
* - `RUNNING` - agent is currently running
|
|
164
|
+
* - `COMPLETED` - agent has finished running
|
|
165
|
+
* - `FAILED` - agent has failed the run
|
|
166
|
+
* - `STOPPED` - run was stopped by the user
|
|
167
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
168
|
+
*/
|
|
169
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The original task description.
|
|
173
|
+
*/
|
|
174
|
+
task: string;
|
|
175
|
+
|
|
176
|
+
updatedAt: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The ID of the agent applied to this run, if any. Omitted for ad-hoc runs.
|
|
180
|
+
*/
|
|
181
|
+
agentId?: string;
|
|
182
|
+
|
|
183
|
+
cause?: RunRetrieveResponse.Cause;
|
|
184
|
+
|
|
185
|
+
endedAt?: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The agent's structured result for the run. Only present when the run has
|
|
189
|
+
* finished and output is available. The result conforms to the provided
|
|
190
|
+
* [JSON Schema](https://json-schema.org/specification) when one is set.
|
|
191
|
+
*/
|
|
192
|
+
result?: { [key: string]: unknown };
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Per-run [JSON Schema](https://json-schema.org/specification) override for the
|
|
196
|
+
* result shape. When unset, the agent's default `resultSchema` applies.
|
|
197
|
+
*/
|
|
198
|
+
resultSchema?: { [key: string]: unknown };
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* External sandbox identifier assigned by the runner. Optional.
|
|
202
|
+
*/
|
|
203
|
+
sandboxId?: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The Browserbase session ID powering this run.
|
|
207
|
+
*/
|
|
208
|
+
sessionId?: string;
|
|
209
|
+
|
|
210
|
+
startedAt?: string;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export namespace RunRetrieveResponse {
|
|
214
|
+
export interface Cause {
|
|
215
|
+
/**
|
|
216
|
+
* Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
|
|
217
|
+
*/
|
|
218
|
+
code: string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Human-readable failure detail.
|
|
222
|
+
*/
|
|
223
|
+
message?: string;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* A page of agent runs.
|
|
229
|
+
*/
|
|
230
|
+
export interface RunListResponse {
|
|
231
|
+
/**
|
|
232
|
+
* The page of matching agent runs.
|
|
233
|
+
*/
|
|
234
|
+
data: Array<RunListResponse.Data>;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The maximum number of results returned in this page.
|
|
238
|
+
*/
|
|
239
|
+
limit: number;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Cursor for the next page. Pass it back as `cursor` on the next request to
|
|
243
|
+
* continue paging. null when there are no more results.
|
|
244
|
+
*/
|
|
245
|
+
nextCursor: string | null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export namespace RunListResponse {
|
|
249
|
+
/**
|
|
250
|
+
* One execution of an agent against a task. Created in `pending` and transitioned
|
|
251
|
+
* through `running` → `completed`/`failed` by the runner.
|
|
252
|
+
*/
|
|
253
|
+
export interface Data {
|
|
254
|
+
createdAt: string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Unique identifier for the run.
|
|
258
|
+
*/
|
|
259
|
+
runId: string;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Current status of the run.
|
|
263
|
+
*
|
|
264
|
+
* - `PENDING` - agent will run soon
|
|
265
|
+
* - `RUNNING` - agent is currently running
|
|
266
|
+
* - `COMPLETED` - agent has finished running
|
|
267
|
+
* - `FAILED` - agent has failed the run
|
|
268
|
+
* - `STOPPED` - run was stopped by the user
|
|
269
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
270
|
+
*/
|
|
271
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The original task description.
|
|
275
|
+
*/
|
|
276
|
+
task: string;
|
|
277
|
+
|
|
278
|
+
updatedAt: string;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* The ID of the agent applied to this run, if any. Omitted for ad-hoc runs.
|
|
282
|
+
*/
|
|
283
|
+
agentId?: string;
|
|
284
|
+
|
|
285
|
+
cause?: Data.Cause;
|
|
286
|
+
|
|
287
|
+
endedAt?: string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* The agent's structured result for the run. Only present when the run has
|
|
291
|
+
* finished and output is available. The result conforms to the provided
|
|
292
|
+
* [JSON Schema](https://json-schema.org/specification) when one is set.
|
|
293
|
+
*/
|
|
294
|
+
result?: { [key: string]: unknown };
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Per-run [JSON Schema](https://json-schema.org/specification) override for the
|
|
298
|
+
* result shape. When unset, the agent's default `resultSchema` applies.
|
|
299
|
+
*/
|
|
300
|
+
resultSchema?: { [key: string]: unknown };
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* External sandbox identifier assigned by the runner. Optional.
|
|
304
|
+
*/
|
|
305
|
+
sandboxId?: string;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The Browserbase session ID powering this run.
|
|
309
|
+
*/
|
|
310
|
+
sessionId?: string;
|
|
311
|
+
|
|
312
|
+
startedAt?: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export namespace Data {
|
|
316
|
+
export interface Cause {
|
|
317
|
+
/**
|
|
318
|
+
* Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
|
|
319
|
+
*/
|
|
320
|
+
code: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Human-readable failure detail.
|
|
324
|
+
*/
|
|
325
|
+
message?: string;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export interface RunListMessagesResponse {
|
|
331
|
+
/**
|
|
332
|
+
* The page of messages, in chronological order, with the oldest messages first.
|
|
333
|
+
*/
|
|
334
|
+
data: Array<RunListMessagesResponse.Data>;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* The `id` of the last message in `data`. Pass it back as `since` on the next
|
|
338
|
+
* request to continue paging, or to poll for new messages. `null` only when the
|
|
339
|
+
* run has no messages yet; in that case, omit `since` and retry.
|
|
340
|
+
*/
|
|
341
|
+
nextSince: string | null;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export namespace RunListMessagesResponse {
|
|
345
|
+
export interface Data {
|
|
346
|
+
id: string;
|
|
347
|
+
|
|
348
|
+
createdAt: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* An AI SDK response message (assistant or tool).
|
|
352
|
+
*/
|
|
353
|
+
message: Data.Message;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export namespace Data {
|
|
357
|
+
/**
|
|
358
|
+
* An AI SDK response message (assistant or tool).
|
|
359
|
+
*/
|
|
360
|
+
export interface Message {
|
|
361
|
+
/**
|
|
362
|
+
* Plain string (assistant text) or an array of typed parts.
|
|
363
|
+
*/
|
|
364
|
+
content: string | Array<Message.UnionMember1>;
|
|
365
|
+
|
|
366
|
+
role: 'assistant' | 'tool';
|
|
367
|
+
|
|
368
|
+
[k: string]: unknown;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export namespace Message {
|
|
372
|
+
export interface UnionMember1 {
|
|
373
|
+
/**
|
|
374
|
+
* text | reasoning | file | tool-call | tool-result
|
|
375
|
+
*/
|
|
376
|
+
type: string;
|
|
377
|
+
|
|
378
|
+
data?: string;
|
|
379
|
+
|
|
380
|
+
input?: unknown;
|
|
381
|
+
|
|
382
|
+
mediaType?: string;
|
|
383
|
+
|
|
384
|
+
output?: unknown;
|
|
385
|
+
|
|
386
|
+
text?: string;
|
|
387
|
+
|
|
388
|
+
toolCallId?: string;
|
|
389
|
+
|
|
390
|
+
toolName?: string;
|
|
391
|
+
|
|
392
|
+
[k: string]: unknown;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface RunCreateParams {
|
|
399
|
+
/**
|
|
400
|
+
* A natural language description of the task the agent should accomplish.
|
|
401
|
+
*/
|
|
402
|
+
task: string;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Optionally run a specific [custom agent](/reference/api/create-an-agent) you've
|
|
406
|
+
* created by ID. The run will use the agent's `systemPrompt` and `resultSchema`
|
|
407
|
+
* unless overridden.
|
|
408
|
+
*/
|
|
409
|
+
agentId?: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Browser configuration for the agent's session. When omitted, runner defaults
|
|
413
|
+
* apply.
|
|
414
|
+
*/
|
|
415
|
+
browserSettings?: RunCreateParams.BrowserSettings;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* An optional [JSON Schema](https://json-schema.org/specification) object. If
|
|
419
|
+
* provided, the agent will aim to return a `result` that conforms to this schema
|
|
420
|
+
* when the run completes. Overrides the referenced agent's default `resultSchema`
|
|
421
|
+
* for this run only.
|
|
422
|
+
*/
|
|
423
|
+
resultSchema?: { [key: string]: unknown };
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Optional named variables the agent can reference as placeholders, i.e.
|
|
427
|
+
* `%variable%`. Each entry pairs a `value` the placeholder resolves to with an
|
|
428
|
+
* optional `description` that hints to the agent when it should be used. Values
|
|
429
|
+
* are not persisted.
|
|
430
|
+
*/
|
|
431
|
+
variables?: { [key: string]: RunCreateParams.Variables };
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export namespace RunCreateParams {
|
|
435
|
+
/**
|
|
436
|
+
* Browser configuration for the agent's session. When omitted, runner defaults
|
|
437
|
+
* apply.
|
|
438
|
+
*/
|
|
439
|
+
export interface BrowserSettings {
|
|
440
|
+
context?: BrowserSettings.Context;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Set true to route the agent's browser session through the default proxy.
|
|
444
|
+
*/
|
|
445
|
+
proxies?: boolean;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Set true to enable Browserbase Verified for the session.
|
|
449
|
+
*/
|
|
450
|
+
verified?: boolean;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export namespace BrowserSettings {
|
|
454
|
+
export interface Context {
|
|
455
|
+
/**
|
|
456
|
+
* The Context ID.
|
|
457
|
+
*/
|
|
458
|
+
id: string;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Whether to persist the context after browsing. Defaults to false.
|
|
462
|
+
*/
|
|
463
|
+
persist?: boolean;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export interface Variables {
|
|
468
|
+
/**
|
|
469
|
+
* The value the placeholder resolves to when the agent uses it.
|
|
470
|
+
*/
|
|
471
|
+
value: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Optional hint to the agent describing what this variable represents and when to
|
|
475
|
+
* use it.
|
|
476
|
+
*/
|
|
477
|
+
description?: string;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export interface RunListParams {
|
|
482
|
+
/**
|
|
483
|
+
* Only return runs that reference this agent ID.
|
|
484
|
+
*/
|
|
485
|
+
agentId?: string;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Pagination cursor. Pass the nextCursor from the previous response to fetch the
|
|
489
|
+
* next page. Omit to start from the first page.
|
|
490
|
+
*/
|
|
491
|
+
cursor?: string;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Only return runs created on or before this timestamp (inclusive). ISO 8601 / RFC
|
|
495
|
+
* 3339, e.g. 2026-01-20T00:00:00Z.
|
|
496
|
+
*/
|
|
497
|
+
endAt?: string;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Maximum number of results to return.
|
|
501
|
+
*/
|
|
502
|
+
limit?: number;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Only return runs created on or after this timestamp (inclusive). ISO 8601 / RFC
|
|
506
|
+
* 3339, e.g. 2026-01-19T00:00:00Z.
|
|
507
|
+
*/
|
|
508
|
+
startAt?: string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Current status of the run.
|
|
512
|
+
*
|
|
513
|
+
* - `PENDING` - agent will run soon
|
|
514
|
+
* - `RUNNING` - agent is currently running
|
|
515
|
+
* - `COMPLETED` - agent has finished running
|
|
516
|
+
* - `FAILED` - agent has failed the run
|
|
517
|
+
* - `STOPPED` - run was stopped by the user
|
|
518
|
+
* - `TIMED_OUT` - run exceeded maximum time
|
|
519
|
+
*/
|
|
520
|
+
status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface RunListMessagesParams {
|
|
524
|
+
/**
|
|
525
|
+
* Return every message after `since` in one response, ignoring `limit`.
|
|
526
|
+
*/
|
|
527
|
+
all?: boolean;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Maximum number of messages to return.
|
|
531
|
+
*/
|
|
532
|
+
limit?: number;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* The `id` of the last message you've already received. The response will contain
|
|
536
|
+
* messages produced after that one, in chronological order. Omit on the first
|
|
537
|
+
* call. Pass the previous response's `nextSince` value to continue paging or to
|
|
538
|
+
* poll for new messages.
|
|
539
|
+
*/
|
|
540
|
+
since?: string;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export declare namespace Runs {
|
|
544
|
+
export {
|
|
545
|
+
type RunCreateResponse as RunCreateResponse,
|
|
546
|
+
type RunRetrieveResponse as RunRetrieveResponse,
|
|
547
|
+
type RunListResponse as RunListResponse,
|
|
548
|
+
type RunListMessagesResponse as RunListMessagesResponse,
|
|
549
|
+
type RunCreateParams as RunCreateParams,
|
|
550
|
+
type RunListParams as RunListParams,
|
|
551
|
+
type RunListMessagesParams as RunListMessagesParams,
|
|
552
|
+
};
|
|
553
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Agents,
|
|
5
|
+
type AgentCreateResponse,
|
|
6
|
+
type AgentRetrieveResponse,
|
|
7
|
+
type AgentUpdateResponse,
|
|
8
|
+
type AgentListResponse,
|
|
9
|
+
type AgentCreateParams,
|
|
10
|
+
type AgentUpdateParams,
|
|
11
|
+
type AgentListParams,
|
|
12
|
+
} from './agents/agents';
|
|
3
13
|
export {
|
|
4
14
|
Certificates,
|
|
5
15
|
type Certificate,
|
|
@@ -246,6 +246,18 @@ export namespace SessionCreateParams {
|
|
|
246
246
|
*/
|
|
247
247
|
advancedStealth?: boolean;
|
|
248
248
|
|
|
249
|
+
/**
|
|
250
|
+
* An optional list of allowed domains for the session. If you pass one or more
|
|
251
|
+
* domains, Browserbase restricts top-level (main-frame) page navigations to the
|
|
252
|
+
* listed domains and their subdomains. For example, `example.com` also permits
|
|
253
|
+
* `www.example.com` and `a.b.example.com`, but not `notexample.com`. Matching is
|
|
254
|
+
* domain-based, not full-URL. An empty list (the default) disables the restriction
|
|
255
|
+
* entirely. Browserbase enforces only main-frame navigations; it does not block
|
|
256
|
+
* iframe/subframe loads or other in-page resource requests (images, scripts, XHR,
|
|
257
|
+
* etc.).
|
|
258
|
+
*/
|
|
259
|
+
allowedDomains?: Array<string>;
|
|
260
|
+
|
|
249
261
|
/**
|
|
250
262
|
* Enable or disable ad blocking in the browser. Defaults to `false`.
|
|
251
263
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.15.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.15.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.15.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|