anchorbrowser 1.0.0-dev.0 → 1.0.0-dev.2
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 +28 -0
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/sessions/sessions.d.mts +2 -2
- package/resources/sessions/sessions.d.mts.map +1 -1
- package/resources/sessions/sessions.d.ts +2 -2
- package/resources/sessions/sessions.d.ts.map +1 -1
- package/resources/tasks/generations.d.mts +42 -0
- package/resources/tasks/generations.d.mts.map +1 -0
- package/resources/tasks/generations.d.ts +42 -0
- package/resources/tasks/generations.d.ts.map +1 -0
- package/resources/tasks/generations.js +24 -0
- package/resources/tasks/generations.js.map +1 -0
- package/resources/tasks/generations.mjs +20 -0
- package/resources/tasks/generations.mjs.map +1 -0
- package/resources/tasks/index.d.mts +4 -0
- package/resources/tasks/index.d.mts.map +1 -0
- package/resources/tasks/index.d.ts +4 -0
- package/resources/tasks/index.d.ts.map +1 -0
- package/resources/tasks/index.js +11 -0
- package/resources/tasks/index.js.map +1 -0
- package/resources/tasks/index.mjs +5 -0
- package/resources/tasks/index.mjs.map +1 -0
- package/resources/tasks/runs.d.mts +42 -0
- package/resources/tasks/runs.d.mts.map +1 -0
- package/resources/tasks/runs.d.ts +42 -0
- package/resources/tasks/runs.d.ts.map +1 -0
- package/resources/tasks/runs.js +21 -0
- package/resources/tasks/runs.js.map +1 -0
- package/resources/tasks/runs.mjs +17 -0
- package/resources/tasks/runs.mjs.map +1 -0
- package/resources/tasks/tasks.d.mts +310 -0
- package/resources/tasks/tasks.d.mts.map +1 -0
- package/resources/tasks/tasks.d.ts +310 -0
- package/resources/tasks/tasks.d.ts.map +1 -0
- package/resources/tasks/tasks.js +80 -0
- package/resources/tasks/tasks.js.map +1 -0
- package/resources/tasks/tasks.mjs +75 -0
- package/resources/tasks/tasks.mjs.map +1 -0
- package/resources/tasks.d.mts +2 -0
- package/resources/tasks.d.mts.map +1 -0
- package/resources/tasks.d.ts +2 -0
- package/resources/tasks.d.ts.map +1 -0
- package/resources/tasks.js +6 -0
- package/resources/tasks.js.map +1 -0
- package/resources/tasks.mjs +3 -0
- package/resources/tasks.mjs.map +1 -0
- package/resources/tools.d.mts +1 -1
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +1 -1
- package/resources/tools.d.ts.map +1 -1
- package/src/client.ts +16 -4
- package/src/resources/index.ts +7 -1
- package/src/resources/sessions/sessions.ts +2 -2
- package/src/resources/tasks/generations.ts +52 -0
- package/src/resources/tasks/index.ts +11 -0
- package/src/resources/tasks/runs.ts +51 -0
- package/src/resources/tasks/tasks.ts +518 -0
- package/src/resources/tasks.ts +3 -0
- package/src/resources/tools.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/task.d.mts +0 -4
- package/resources/task.d.mts.map +0 -1
- package/resources/task.d.ts +0 -4
- package/resources/task.d.ts.map +0 -1
- package/resources/task.js +0 -9
- package/resources/task.js.map +0 -1
- package/resources/task.mjs +0 -5
- package/resources/task.mjs.map +0 -1
- package/src/resources/task.ts +0 -5
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as GenerationsAPI from './generations';
|
|
5
|
+
import { GenerationGetStatusResponse, Generations } from './generations';
|
|
6
|
+
import * as RunsAPI from './runs';
|
|
7
|
+
import { RunGetStatusResponse, Runs } from './runs';
|
|
8
|
+
import { APIPromise } from '../../core/api-promise';
|
|
9
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
10
|
+
import { path } from '../../internal/utils/path';
|
|
11
|
+
|
|
12
|
+
export class Tasks extends APIResource {
|
|
13
|
+
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
14
|
+
generations: GenerationsAPI.Generations = new GenerationsAPI.Generations(this._client);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Initiates asynchronous task generation. Use the returned task ID to poll for
|
|
18
|
+
* completion, then execute the task.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response = await client.tasks.generate({
|
|
23
|
+
* description: 'Download a specific file from a URL',
|
|
24
|
+
* name: 'file-downloader',
|
|
25
|
+
* user_task: 'Create a task that downloads a specific file from a given URL.',
|
|
26
|
+
* input_schema: [
|
|
27
|
+
* {
|
|
28
|
+
* display_name: 'URL',
|
|
29
|
+
* type: 'string',
|
|
30
|
+
* required: true,
|
|
31
|
+
* description: 'URL of the file to download',
|
|
32
|
+
* },
|
|
33
|
+
* {
|
|
34
|
+
* display_name: 'File Name',
|
|
35
|
+
* type: 'string',
|
|
36
|
+
* required: true,
|
|
37
|
+
* description: 'Name of the file to download',
|
|
38
|
+
* },
|
|
39
|
+
* ],
|
|
40
|
+
* output_schema: [
|
|
41
|
+
* {
|
|
42
|
+
* display_name: 'Success',
|
|
43
|
+
* type: 'boolean',
|
|
44
|
+
* description: 'Whether the download succeeded',
|
|
45
|
+
* },
|
|
46
|
+
* {
|
|
47
|
+
* display_name: 'Message',
|
|
48
|
+
* type: 'string',
|
|
49
|
+
* description: 'Status or error message',
|
|
50
|
+
* },
|
|
51
|
+
* ],
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
generate(body: TaskGenerateParams, options?: RequestOptions): APIPromise<TaskGenerateResponse> {
|
|
56
|
+
return this._client.post('/v2/tasks/generate', { body, ...options });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Triggers execution of a task by ID using the V2 tasks API.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const response = await client.tasks.run('taskId', {
|
|
65
|
+
* input_params: {
|
|
66
|
+
* 'File Name': 'invoice-2026-02.pdf',
|
|
67
|
+
* Operation: 'extract_text',
|
|
68
|
+
* },
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
run(taskID: string, body: TaskRunParams, options?: RequestOptions): APIPromise<TaskRunResponse> {
|
|
73
|
+
return this._client.post(path`/v2/tasks/${taskID}/run`, { body, ...options });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Response when task generation has been started (generation is asynchronous).
|
|
79
|
+
*/
|
|
80
|
+
export interface TaskGenerateResponse {
|
|
81
|
+
/**
|
|
82
|
+
* The ID of the created task (use with generation-status and run endpoints)
|
|
83
|
+
*/
|
|
84
|
+
id: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Whether the task is still generating, ready to run, or failed.
|
|
88
|
+
*/
|
|
89
|
+
status: 'generating';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface TaskRunResponse {
|
|
93
|
+
/**
|
|
94
|
+
* The ID of the task run
|
|
95
|
+
*/
|
|
96
|
+
run_id: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Current task run status
|
|
100
|
+
*/
|
|
101
|
+
status: 'queued' | 'running' | 'success' | 'failure' | 'timeout' | 'cancelled';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Error message when the run fails
|
|
105
|
+
*/
|
|
106
|
+
error?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Task output when available
|
|
110
|
+
*/
|
|
111
|
+
result?: { [key: string]: unknown };
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Session ID used for this task run
|
|
115
|
+
*/
|
|
116
|
+
session_id?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface TaskGenerateParams {
|
|
120
|
+
/**
|
|
121
|
+
* Description of the task
|
|
122
|
+
*/
|
|
123
|
+
description: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Name of the task
|
|
127
|
+
*/
|
|
128
|
+
name: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Natural language description of what the task should do (used for AI generation)
|
|
132
|
+
*/
|
|
133
|
+
user_task: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Optional application (connection) ID to associate with the task
|
|
137
|
+
*/
|
|
138
|
+
application_id?: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Optional list of input parameters for the task. Defaults to empty array.
|
|
142
|
+
*/
|
|
143
|
+
input_schema?: Array<TaskGenerateParams.InputSchema>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Optional list of output parameters for the task. Defaults to empty array.
|
|
147
|
+
*/
|
|
148
|
+
output_schema?: Array<TaskGenerateParams.OutputSchema>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Optional default browser/session configuration when running this task
|
|
152
|
+
*/
|
|
153
|
+
task_browser_default_configuration?: TaskGenerateParams.TaskBrowserDefaultConfiguration;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export namespace TaskGenerateParams {
|
|
157
|
+
/**
|
|
158
|
+
* A single input or output parameter for a generated task.
|
|
159
|
+
*/
|
|
160
|
+
export interface InputSchema {
|
|
161
|
+
/**
|
|
162
|
+
* Human-readable name for the parameter
|
|
163
|
+
*/
|
|
164
|
+
display_name: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Data type of the parameter
|
|
168
|
+
*/
|
|
169
|
+
type: 'string' | 'number' | 'boolean' | 'date';
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Optional default value as a string
|
|
173
|
+
*/
|
|
174
|
+
default_value?: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Optional description of the parameter
|
|
178
|
+
*/
|
|
179
|
+
description?: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Whether the parameter is required
|
|
183
|
+
*/
|
|
184
|
+
required?: boolean;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* A single input or output parameter for a generated task.
|
|
189
|
+
*/
|
|
190
|
+
export interface OutputSchema {
|
|
191
|
+
/**
|
|
192
|
+
* Human-readable name for the parameter
|
|
193
|
+
*/
|
|
194
|
+
display_name: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Data type of the parameter
|
|
198
|
+
*/
|
|
199
|
+
type: 'string' | 'number' | 'boolean' | 'date';
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Optional default value as a string
|
|
203
|
+
*/
|
|
204
|
+
default_value?: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Optional description of the parameter
|
|
208
|
+
*/
|
|
209
|
+
description?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Whether the parameter is required
|
|
213
|
+
*/
|
|
214
|
+
required?: boolean;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Optional default browser/session configuration when running this task
|
|
219
|
+
*/
|
|
220
|
+
export interface TaskBrowserDefaultConfiguration {
|
|
221
|
+
/**
|
|
222
|
+
* The URL to navigate to when the browser session starts. If not provided, the
|
|
223
|
+
* browser will load an empty page.
|
|
224
|
+
*/
|
|
225
|
+
initial_url?: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Configuration for live viewing the browser session.
|
|
229
|
+
*/
|
|
230
|
+
live_view?: TaskBrowserDefaultConfiguration.LiveView;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Proxy Documentation available at [Proxy Documentation](/advanced/proxy)
|
|
234
|
+
*/
|
|
235
|
+
proxy?: TaskBrowserDefaultConfiguration.AnchorProxy | TaskBrowserDefaultConfiguration.CustomProxy;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Configuration for session recording.
|
|
239
|
+
*/
|
|
240
|
+
recording?: TaskBrowserDefaultConfiguration.Recording;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Timeout configurations for the browser session.
|
|
244
|
+
*/
|
|
245
|
+
timeout?: TaskBrowserDefaultConfiguration.Timeout;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export namespace TaskBrowserDefaultConfiguration {
|
|
249
|
+
/**
|
|
250
|
+
* Configuration for live viewing the browser session.
|
|
251
|
+
*/
|
|
252
|
+
export interface LiveView {
|
|
253
|
+
/**
|
|
254
|
+
* Enable or disable read-only mode for live viewing. Defaults to `false`.
|
|
255
|
+
*/
|
|
256
|
+
read_only?: boolean;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface AnchorProxy {
|
|
260
|
+
active: boolean;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* City name for precise geographic targeting. Supported for anchor_proxy only. Can
|
|
264
|
+
* only be used when region is also provided.
|
|
265
|
+
*/
|
|
266
|
+
city?: string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Supported country codes ISO 2 lowercase
|
|
270
|
+
*/
|
|
271
|
+
country_code?:
|
|
272
|
+
| 'af'
|
|
273
|
+
| 'al'
|
|
274
|
+
| 'dz'
|
|
275
|
+
| 'ad'
|
|
276
|
+
| 'ao'
|
|
277
|
+
| 'as'
|
|
278
|
+
| 'ag'
|
|
279
|
+
| 'ar'
|
|
280
|
+
| 'am'
|
|
281
|
+
| 'aw'
|
|
282
|
+
| 'au'
|
|
283
|
+
| 'at'
|
|
284
|
+
| 'az'
|
|
285
|
+
| 'bs'
|
|
286
|
+
| 'bh'
|
|
287
|
+
| 'bb'
|
|
288
|
+
| 'by'
|
|
289
|
+
| 'be'
|
|
290
|
+
| 'bz'
|
|
291
|
+
| 'bj'
|
|
292
|
+
| 'bm'
|
|
293
|
+
| 'bo'
|
|
294
|
+
| 'ba'
|
|
295
|
+
| 'br'
|
|
296
|
+
| 'bg'
|
|
297
|
+
| 'bf'
|
|
298
|
+
| 'cm'
|
|
299
|
+
| 'ca'
|
|
300
|
+
| 'cv'
|
|
301
|
+
| 'td'
|
|
302
|
+
| 'cl'
|
|
303
|
+
| 'co'
|
|
304
|
+
| 'cg'
|
|
305
|
+
| 'cr'
|
|
306
|
+
| 'ci'
|
|
307
|
+
| 'hr'
|
|
308
|
+
| 'cu'
|
|
309
|
+
| 'cy'
|
|
310
|
+
| 'cz'
|
|
311
|
+
| 'dk'
|
|
312
|
+
| 'dm'
|
|
313
|
+
| 'do'
|
|
314
|
+
| 'ec'
|
|
315
|
+
| 'eg'
|
|
316
|
+
| 'sv'
|
|
317
|
+
| 'ee'
|
|
318
|
+
| 'et'
|
|
319
|
+
| 'fo'
|
|
320
|
+
| 'fi'
|
|
321
|
+
| 'fr'
|
|
322
|
+
| 'gf'
|
|
323
|
+
| 'pf'
|
|
324
|
+
| 'ga'
|
|
325
|
+
| 'gm'
|
|
326
|
+
| 'ge'
|
|
327
|
+
| 'de'
|
|
328
|
+
| 'gh'
|
|
329
|
+
| 'gi'
|
|
330
|
+
| 'gr'
|
|
331
|
+
| 'gd'
|
|
332
|
+
| 'gp'
|
|
333
|
+
| 'gt'
|
|
334
|
+
| 'gg'
|
|
335
|
+
| 'gn'
|
|
336
|
+
| 'gw'
|
|
337
|
+
| 'gy'
|
|
338
|
+
| 'ht'
|
|
339
|
+
| 'hn'
|
|
340
|
+
| 'hu'
|
|
341
|
+
| 'is'
|
|
342
|
+
| 'in'
|
|
343
|
+
| 'ir'
|
|
344
|
+
| 'iq'
|
|
345
|
+
| 'ie'
|
|
346
|
+
| 'il'
|
|
347
|
+
| 'it'
|
|
348
|
+
| 'jm'
|
|
349
|
+
| 'jp'
|
|
350
|
+
| 'jo'
|
|
351
|
+
| 'kz'
|
|
352
|
+
| 'kw'
|
|
353
|
+
| 'kg'
|
|
354
|
+
| 'lv'
|
|
355
|
+
| 'lb'
|
|
356
|
+
| 'ly'
|
|
357
|
+
| 'li'
|
|
358
|
+
| 'lt'
|
|
359
|
+
| 'lu'
|
|
360
|
+
| 'mk'
|
|
361
|
+
| 'ml'
|
|
362
|
+
| 'mt'
|
|
363
|
+
| 'mq'
|
|
364
|
+
| 'mr'
|
|
365
|
+
| 'mx'
|
|
366
|
+
| 'md'
|
|
367
|
+
| 'mc'
|
|
368
|
+
| 'me'
|
|
369
|
+
| 'ma'
|
|
370
|
+
| 'nl'
|
|
371
|
+
| 'nz'
|
|
372
|
+
| 'ni'
|
|
373
|
+
| 'ng'
|
|
374
|
+
| 'no'
|
|
375
|
+
| 'pk'
|
|
376
|
+
| 'pa'
|
|
377
|
+
| 'py'
|
|
378
|
+
| 'pe'
|
|
379
|
+
| 'ph'
|
|
380
|
+
| 'pl'
|
|
381
|
+
| 'pt'
|
|
382
|
+
| 'pr'
|
|
383
|
+
| 'qa'
|
|
384
|
+
| 'ro'
|
|
385
|
+
| 'lc'
|
|
386
|
+
| 'sm'
|
|
387
|
+
| 'sa'
|
|
388
|
+
| 'sn'
|
|
389
|
+
| 'rs'
|
|
390
|
+
| 'sc'
|
|
391
|
+
| 'sl'
|
|
392
|
+
| 'sk'
|
|
393
|
+
| 'si'
|
|
394
|
+
| 'so'
|
|
395
|
+
| 'za'
|
|
396
|
+
| 'kr'
|
|
397
|
+
| 'es'
|
|
398
|
+
| 'sr'
|
|
399
|
+
| 'se'
|
|
400
|
+
| 'ch'
|
|
401
|
+
| 'sy'
|
|
402
|
+
| 'st'
|
|
403
|
+
| 'tw'
|
|
404
|
+
| 'tj'
|
|
405
|
+
| 'tg'
|
|
406
|
+
| 'tt'
|
|
407
|
+
| 'tn'
|
|
408
|
+
| 'tr'
|
|
409
|
+
| 'tc'
|
|
410
|
+
| 'ua'
|
|
411
|
+
| 'ae'
|
|
412
|
+
| 'us'
|
|
413
|
+
| 'uy'
|
|
414
|
+
| 'uz'
|
|
415
|
+
| 've'
|
|
416
|
+
| 'ye';
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Region code for more specific geographic targeting. The city parameter can only
|
|
420
|
+
* be used when region is also provided.
|
|
421
|
+
*/
|
|
422
|
+
region?: string;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Create a session with a proxy to access websites as if you're browsing from a
|
|
426
|
+
* computer in that country.
|
|
427
|
+
*/
|
|
428
|
+
type?: 'anchor_proxy';
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export interface CustomProxy {
|
|
432
|
+
active: boolean;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Proxy password
|
|
436
|
+
*/
|
|
437
|
+
password: string;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Proxy address in **PROTOCOL://HOST:PORT** format (e.g.,
|
|
441
|
+
* https://proxy.example.com:443). See [proxy page](/advanced/proxy#custom-proxy).
|
|
442
|
+
*/
|
|
443
|
+
server: string;
|
|
444
|
+
|
|
445
|
+
type: 'custom';
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Proxy username
|
|
449
|
+
*/
|
|
450
|
+
username: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Configuration for session recording.
|
|
455
|
+
*/
|
|
456
|
+
export interface Recording {
|
|
457
|
+
/**
|
|
458
|
+
* Enable or disable video recording of the browser session. Defaults to `true`.
|
|
459
|
+
*/
|
|
460
|
+
active?: boolean;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Timeout configurations for the browser session.
|
|
465
|
+
*/
|
|
466
|
+
export interface Timeout {
|
|
467
|
+
/**
|
|
468
|
+
* The amount of time (in minutes) the browser session waits for new connections
|
|
469
|
+
* after all others are closed before stopping. Defaults to `5`.
|
|
470
|
+
*/
|
|
471
|
+
idle_timeout?: number;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Maximum amount of time (in minutes) for the browser to run before terminating.
|
|
475
|
+
* Defaults to `20`.
|
|
476
|
+
*/
|
|
477
|
+
max_duration?: number;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export interface TaskRunParams {
|
|
483
|
+
/**
|
|
484
|
+
* Key-value pairs of input parameters for the task
|
|
485
|
+
*/
|
|
486
|
+
input_params: { [key: string]: string };
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Whether to clean up sessions after execution
|
|
490
|
+
*/
|
|
491
|
+
cleanup_sessions?: boolean;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Optional identity ID to use for the task
|
|
495
|
+
*/
|
|
496
|
+
identity_id?: string;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Optional session ID to run the task in
|
|
500
|
+
*/
|
|
501
|
+
session_id?: string;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
Tasks.Runs = Runs;
|
|
505
|
+
Tasks.Generations = Generations;
|
|
506
|
+
|
|
507
|
+
export declare namespace Tasks {
|
|
508
|
+
export {
|
|
509
|
+
type TaskGenerateResponse as TaskGenerateResponse,
|
|
510
|
+
type TaskRunResponse as TaskRunResponse,
|
|
511
|
+
type TaskGenerateParams as TaskGenerateParams,
|
|
512
|
+
type TaskRunParams as TaskRunParams,
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
export { Runs as Runs, type RunGetStatusResponse as RunGetStatusResponse };
|
|
516
|
+
|
|
517
|
+
export { Generations as Generations, type GenerationGetStatusResponse as GenerationGetStatusResponse };
|
|
518
|
+
}
|
package/src/resources/tools.ts
CHANGED
|
@@ -174,7 +174,7 @@ export interface ToolPerformWebTaskParams {
|
|
|
174
174
|
/**
|
|
175
175
|
* Body param: The AI agent to use for task completion. Defaults to browser-use.
|
|
176
176
|
*/
|
|
177
|
-
agent?: 'browser-use' | 'openai-cua';
|
|
177
|
+
agent?: 'browser-use' | 'openai-cua' | 'yutori';
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Body param: Enable element detection for better interaction accuracy. Improves
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.0.0-dev.
|
|
1
|
+
export const VERSION = '1.0.0-dev.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.0-dev.
|
|
1
|
+
export declare const VERSION = "1.0.0-dev.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.0-dev.
|
|
1
|
+
export declare const VERSION = "1.0.0-dev.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '1.0.0-dev.
|
|
4
|
+
exports.VERSION = '1.0.0-dev.2'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.0.0-dev.
|
|
1
|
+
export const VERSION = '1.0.0-dev.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/resources/task.d.mts
DELETED
package/resources/task.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.mts","sourceRoot":"","sources":["../src/resources/task.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,IAAK,SAAQ,WAAW;CAAG"}
|
package/resources/task.d.ts
DELETED
package/resources/task.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../src/resources/task.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,IAAK,SAAQ,WAAW;CAAG"}
|
package/resources/task.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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.Task = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
class Task extends resource_1.APIResource {
|
|
7
|
-
}
|
|
8
|
-
exports.Task = Task;
|
|
9
|
-
//# sourceMappingURL=task.js.map
|
package/resources/task.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../src/resources/task.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,MAAa,IAAK,SAAQ,sBAAW;CAAG;AAAxC,oBAAwC"}
|
package/resources/task.mjs
DELETED
package/resources/task.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.mjs","sourceRoot":"","sources":["../src/resources/task.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,IAAK,SAAQ,WAAW;CAAG"}
|