browser-use-sdk 2.0.12 → 2.0.13
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/dist/cjs/BaseClient.d.ts +1 -1
- package/dist/cjs/Client.d.ts +1 -1
- package/dist/cjs/Client.js +3 -3
- package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -2
- package/dist/cjs/api/resources/billing/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/billing/client/Client.js +2 -2
- package/dist/cjs/api/resources/browsers/client/Client.d.ts +9 -7
- package/dist/cjs/api/resources/browsers/client/Client.js +9 -7
- package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/Client.js +1 -1
- package/dist/cjs/api/resources/profiles/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/profiles/client/Client.js +1 -1
- package/dist/cjs/api/resources/sessions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/sessions/client/Client.js +1 -1
- package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +2 -0
- package/dist/cjs/api/resources/skills/client/Client.d.ts +6 -4
- package/dist/cjs/api/resources/skills/client/Client.js +12 -5
- package/dist/cjs/api/resources/skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.d.ts +12 -0
- package/dist/cjs/api/resources/skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.js +3 -0
- package/dist/cjs/api/resources/skills/client/requests/ListSkillsSkillsGetRequest.d.ts +2 -0
- package/dist/cjs/api/resources/skills/client/requests/UpdateSkillRequest.d.ts +5 -2
- package/dist/cjs/api/resources/skills/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/skillsMarketplace/client/Client.d.ts +24 -5
- package/dist/cjs/api/resources/skillsMarketplace/client/Client.js +87 -7
- package/dist/cjs/api/resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.d.ts +12 -0
- package/dist/cjs/api/resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.js +3 -0
- package/dist/cjs/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.js +3 -0
- package/dist/cjs/api/resources/skillsMarketplace/client/requests/ListSkillsMarketplaceSkillsGetRequest.d.ts +2 -0
- package/dist/cjs/api/resources/skillsMarketplace/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/resources/tasks/client/Client.d.ts +9 -3
- package/dist/cjs/api/resources/tasks/client/Client.js +9 -3
- package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +2 -0
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +29 -1
- package/dist/cjs/api/resources/workflows/client/Client.js +85 -1
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowCreateFromTaskRequest.d.ts +18 -0
- package/dist/cjs/api/resources/workflows/client/requests/WorkflowCreateFromTaskRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/AccountNotFoundError.d.ts +1 -1
- package/dist/cjs/api/types/AccountView.d.ts +5 -5
- package/dist/cjs/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.d.ts +6 -0
- package/dist/cjs/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.js +3 -0
- package/dist/cjs/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.d.ts +6 -0
- package/dist/cjs/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.js +3 -0
- package/dist/cjs/api/types/CommonUtilsErrorsInsufficientCreditsError.d.ts +6 -0
- package/dist/cjs/api/types/CommonUtilsErrorsInsufficientCreditsError.js +3 -0
- package/dist/cjs/api/types/EnabledSkillsLimitExceededError.d.ts +6 -0
- package/dist/cjs/api/types/EnabledSkillsLimitExceededError.js +3 -0
- package/dist/cjs/api/types/ExecuteSkillRequest.d.ts +7 -0
- package/dist/cjs/api/types/ExecuteSkillRequest.js +3 -0
- package/dist/cjs/api/types/MarketplaceSkillResponse.d.ts +14 -0
- package/dist/cjs/api/types/SessionItemView.d.ts +2 -0
- package/dist/cjs/api/types/SessionStatus.d.ts +3 -3
- package/dist/cjs/api/types/SessionStatus.js +3 -3
- package/dist/cjs/api/types/SessionTimeoutLimitExceededError.d.ts +1 -1
- package/dist/cjs/api/types/SessionView.d.ts +2 -0
- package/dist/cjs/api/types/SkillCategory.d.ts +20 -0
- package/dist/cjs/api/types/SkillCategory.js +23 -0
- package/dist/cjs/api/types/SkillResponse.d.ts +14 -2
- package/dist/cjs/api/types/SkillsGenerationStatus.d.ts +1 -0
- package/dist/cjs/api/types/SkillsGenerationStatus.js +1 -0
- package/dist/cjs/api/types/WorkflowCreateFromTaskResponse.d.ts +11 -0
- package/dist/cjs/api/types/WorkflowCreateFromTaskResponse.js +3 -0
- package/dist/cjs/api/types/WorkflowExecutionResponse.d.ts +4 -0
- package/dist/cjs/api/types/WorkflowExecutionStateView.d.ts +4 -0
- package/dist/cjs/api/types/WorkflowExecutionStepView.d.ts +4 -4
- package/dist/cjs/api/types/WorkflowGenerationStateView.d.ts +6 -0
- package/dist/cjs/api/types/WorkflowItemView.d.ts +7 -0
- package/dist/cjs/api/types/WorkflowResponse.d.ts +2 -0
- package/dist/cjs/api/types/index.d.ts +7 -2
- package/dist/cjs/api/types/index.js +7 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +1 -1
- package/dist/esm/Client.d.mts +1 -1
- package/dist/esm/Client.mjs +3 -3
- package/dist/esm/api/errors/ForbiddenError.d.mts +1 -2
- package/dist/esm/api/resources/billing/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/billing/client/Client.mjs +2 -2
- package/dist/esm/api/resources/browsers/client/Client.d.mts +9 -7
- package/dist/esm/api/resources/browsers/client/Client.mjs +9 -7
- package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.mts +1 -1
- package/dist/esm/api/resources/files/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/files/client/Client.mjs +1 -1
- package/dist/esm/api/resources/profiles/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/profiles/client/Client.mjs +1 -1
- package/dist/esm/api/resources/sessions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/sessions/client/Client.mjs +1 -1
- package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +2 -0
- package/dist/esm/api/resources/skills/client/Client.d.mts +6 -4
- package/dist/esm/api/resources/skills/client/Client.mjs +12 -5
- package/dist/esm/api/resources/skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.d.mts +12 -0
- package/dist/esm/api/resources/skills/client/requests/ExecuteSkillSkillsSkillIdExecutePostRequest.mjs +2 -0
- package/dist/esm/api/resources/skills/client/requests/ListSkillsSkillsGetRequest.d.mts +2 -0
- package/dist/esm/api/resources/skills/client/requests/UpdateSkillRequest.d.mts +5 -2
- package/dist/esm/api/resources/skills/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/skillsMarketplace/client/Client.d.mts +24 -5
- package/dist/esm/api/resources/skillsMarketplace/client/Client.mjs +87 -7
- package/dist/esm/api/resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.d.mts +12 -0
- package/dist/esm/api/resources/skillsMarketplace/client/requests/ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.mjs +2 -0
- package/dist/esm/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/skillsMarketplace/client/requests/GetSkillMarketplaceSkillsSkillSlugGetRequest.mjs +2 -0
- package/dist/esm/api/resources/skillsMarketplace/client/requests/ListSkillsMarketplaceSkillsGetRequest.d.mts +2 -0
- package/dist/esm/api/resources/skillsMarketplace/client/requests/index.d.mts +2 -1
- package/dist/esm/api/resources/tasks/client/Client.d.mts +9 -3
- package/dist/esm/api/resources/tasks/client/Client.mjs +9 -3
- package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +2 -0
- package/dist/esm/api/resources/workflows/client/Client.d.mts +29 -1
- package/dist/esm/api/resources/workflows/client/Client.mjs +85 -1
- package/dist/esm/api/resources/workflows/client/requests/WorkflowCreateFromTaskRequest.d.mts +18 -0
- package/dist/esm/api/resources/workflows/client/requests/WorkflowCreateFromTaskRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/AccountNotFoundError.d.mts +1 -1
- package/dist/esm/api/types/AccountView.d.mts +5 -5
- package/dist/esm/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.d.mts +6 -0
- package/dist/esm/api/types/AppEndpointsApiV2MarketplaceSkillsViewsInsufficientCreditsError.mjs +2 -0
- package/dist/esm/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.d.mts +6 -0
- package/dist/esm/api/types/AppEndpointsApiV2SkillsViewsInsufficientCreditsError.mjs +2 -0
- package/dist/esm/api/types/CommonUtilsErrorsInsufficientCreditsError.d.mts +6 -0
- package/dist/esm/api/types/CommonUtilsErrorsInsufficientCreditsError.mjs +2 -0
- package/dist/esm/api/types/EnabledSkillsLimitExceededError.d.mts +6 -0
- package/dist/esm/api/types/EnabledSkillsLimitExceededError.mjs +2 -0
- package/dist/esm/api/types/ExecuteSkillRequest.d.mts +7 -0
- package/dist/esm/api/types/ExecuteSkillRequest.mjs +2 -0
- package/dist/esm/api/types/MarketplaceSkillResponse.d.mts +14 -0
- package/dist/esm/api/types/SessionItemView.d.mts +2 -0
- package/dist/esm/api/types/SessionStatus.d.mts +3 -3
- package/dist/esm/api/types/SessionStatus.mjs +3 -3
- package/dist/esm/api/types/SessionTimeoutLimitExceededError.d.mts +1 -1
- package/dist/esm/api/types/SessionView.d.mts +2 -0
- package/dist/esm/api/types/SkillCategory.d.mts +20 -0
- package/dist/esm/api/types/SkillCategory.mjs +20 -0
- package/dist/esm/api/types/SkillResponse.d.mts +14 -2
- package/dist/esm/api/types/SkillsGenerationStatus.d.mts +1 -0
- package/dist/esm/api/types/SkillsGenerationStatus.mjs +1 -0
- package/dist/esm/api/types/WorkflowCreateFromTaskResponse.d.mts +11 -0
- package/dist/esm/api/types/WorkflowCreateFromTaskResponse.mjs +2 -0
- package/dist/esm/api/types/WorkflowExecutionResponse.d.mts +4 -0
- package/dist/esm/api/types/WorkflowExecutionStateView.d.mts +4 -0
- package/dist/esm/api/types/WorkflowExecutionStepView.d.mts +4 -4
- package/dist/esm/api/types/WorkflowGenerationStateView.d.mts +6 -0
- package/dist/esm/api/types/WorkflowItemView.d.mts +7 -0
- package/dist/esm/api/types/WorkflowResponse.d.mts +2 -0
- package/dist/esm/api/types/index.d.mts +7 -2
- package/dist/esm/api/types/index.mjs +7 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +83 -82
- package/reference.md +166 -14
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as BrowserUse from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {}
|
|
@@ -6,6 +7,7 @@ export interface ListSkillsMarketplaceSkillsGetRequest {
|
|
|
6
7
|
pageSize?: number;
|
|
7
8
|
pageNumber?: number;
|
|
8
9
|
query?: string | null;
|
|
10
|
+
category?: BrowserUse.SkillCategory | null;
|
|
9
11
|
fromDate?: string | null;
|
|
10
12
|
toDate?: string | null;
|
|
11
13
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type { CloneSkillMarketplaceSkillsSkillIdClonePostRequest } from "./CloneSkillMarketplaceSkillsSkillIdClonePostRequest.js";
|
|
2
|
-
export type {
|
|
2
|
+
export type { ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest } from "./ExecuteSkillMarketplaceSkillsSkillIdExecutePostRequest.js";
|
|
3
|
+
export type { GetSkillMarketplaceSkillsSkillSlugGetRequest } from "./GetSkillMarketplaceSkillsSkillSlugGetRequest.js";
|
|
3
4
|
export type { ListSkillsMarketplaceSkillsGetRequest } from "./ListSkillsMarketplaceSkillsGetRequest.js";
|
|
@@ -9,7 +9,7 @@ export declare namespace Tasks {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class Tasks {
|
|
11
11
|
protected readonly _options: Tasks.Options;
|
|
12
|
-
constructor(_options
|
|
12
|
+
constructor(_options?: Tasks.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Get paginated list of AI agent tasks with optional filtering by session and status.
|
|
15
15
|
*
|
|
@@ -24,9 +24,15 @@ export declare class Tasks {
|
|
|
24
24
|
listTasks(request?: BrowserUse.ListTasksTasksGetRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<BrowserUse.TaskListResponse>;
|
|
25
25
|
private __listTasks;
|
|
26
26
|
/**
|
|
27
|
+
* Create and start a new task.
|
|
28
|
+
*
|
|
27
29
|
* You can either:
|
|
28
|
-
* 1. Start a new task (auto
|
|
29
|
-
* 2. Start a new task in an existing session (
|
|
30
|
+
* 1. Start a new task without a sessionId (auto-creates a session with US proxy by default)
|
|
31
|
+
* 2. Start a new task in an existing session (reuse for follow-up tasks or custom configuration)
|
|
32
|
+
*
|
|
33
|
+
* Important: Proxy configuration (proxyCountryCode) is a session-level setting, not a task-level setting.
|
|
34
|
+
* To use a custom proxy location, create a session first via POST /sessions with your desired proxyCountryCode,
|
|
35
|
+
* then pass that sessionId when creating tasks.
|
|
30
36
|
*
|
|
31
37
|
* @param {BrowserUse.CreateTaskRequest} request
|
|
32
38
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -61,7 +61,7 @@ const environments = __importStar(require("../../../../environments.js"));
|
|
|
61
61
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
62
62
|
const BrowserUse = __importStar(require("../../../index.js"));
|
|
63
63
|
class Tasks {
|
|
64
|
-
constructor(_options) {
|
|
64
|
+
constructor(_options = {}) {
|
|
65
65
|
this._options = _options;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
@@ -146,9 +146,15 @@ class Tasks {
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
+
* Create and start a new task.
|
|
150
|
+
*
|
|
149
151
|
* You can either:
|
|
150
|
-
* 1. Start a new task (auto
|
|
151
|
-
* 2. Start a new task in an existing session (
|
|
152
|
+
* 1. Start a new task without a sessionId (auto-creates a session with US proxy by default)
|
|
153
|
+
* 2. Start a new task in an existing session (reuse for follow-up tasks or custom configuration)
|
|
154
|
+
*
|
|
155
|
+
* Important: Proxy configuration (proxyCountryCode) is a session-level setting, not a task-level setting.
|
|
156
|
+
* To use a custom proxy location, create a session first via POST /sessions with your desired proxyCountryCode,
|
|
157
|
+
* then pass that sessionId when creating tasks.
|
|
152
158
|
*
|
|
153
159
|
* @param {BrowserUse.CreateTaskRequest} request
|
|
154
160
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -42,6 +42,8 @@ export interface CreateTaskRequest {
|
|
|
42
42
|
judgeGroundTruth?: string | null;
|
|
43
43
|
/** The LLM model to use for judging. If not provided, uses the default judge LLM. */
|
|
44
44
|
judgeLlm?: BrowserUse.SupportedLlMs | null;
|
|
45
|
+
/** List of skill IDs to enable for this task. Use ['*'] to enable all available skills for the project. */
|
|
46
|
+
skillIds?: string[] | null;
|
|
45
47
|
}
|
|
46
48
|
export declare namespace CreateTaskRequest {
|
|
47
49
|
/**
|
|
@@ -9,7 +9,7 @@ export declare namespace Workflows {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class Workflows {
|
|
11
11
|
protected readonly _options: Workflows.Options;
|
|
12
|
-
constructor(_options
|
|
12
|
+
constructor(_options?: Workflows.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Get paginated list of workflows with optional filtering.
|
|
15
15
|
*
|
|
@@ -102,6 +102,34 @@ export declare class Workflows {
|
|
|
102
102
|
*/
|
|
103
103
|
getWorkflowGenerationState(request: BrowserUse.GetWorkflowGenerationStateWorkflowsWorkflowIdGenerationStateGetRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<BrowserUse.WorkflowGenerationStateView>;
|
|
104
104
|
private __getWorkflowGenerationState;
|
|
105
|
+
/**
|
|
106
|
+
* Create a workflow from an existing agent task's recorded history.
|
|
107
|
+
*
|
|
108
|
+
* This endpoint creates a workflow by using the browser-use rerun history
|
|
109
|
+
* feature. The task must have completed with history stored in S3.
|
|
110
|
+
*
|
|
111
|
+
* The workflow creation process:
|
|
112
|
+
* 1. Creates a new workflow record in pending state
|
|
113
|
+
* 2. Triggers an Inngest event to process the task history
|
|
114
|
+
* 3. The Inngest handler downloads history, detects variables, and updates the workflow
|
|
115
|
+
*
|
|
116
|
+
* Use GET /workflows/{workflow_id} to poll for creation completion.
|
|
117
|
+
*
|
|
118
|
+
* @param {BrowserUse.WorkflowCreateFromTaskRequest} request
|
|
119
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
122
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* await client.workflows.createWorkflowFromTask({
|
|
126
|
+
* name: "name",
|
|
127
|
+
* taskId: "taskId",
|
|
128
|
+
* sessionId: "sessionId"
|
|
129
|
+
* })
|
|
130
|
+
*/
|
|
131
|
+
createWorkflowFromTask(request: BrowserUse.WorkflowCreateFromTaskRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<BrowserUse.WorkflowCreateFromTaskResponse>;
|
|
132
|
+
private __createWorkflowFromTask;
|
|
105
133
|
/**
|
|
106
134
|
* Get a presigned URL to upload workflow YAML directly to S3 from the browser.
|
|
107
135
|
*
|
|
@@ -61,7 +61,7 @@ const environments = __importStar(require("../../../../environments.js"));
|
|
|
61
61
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
62
62
|
const BrowserUse = __importStar(require("../../../index.js"));
|
|
63
63
|
class Workflows {
|
|
64
|
-
constructor(_options) {
|
|
64
|
+
constructor(_options = {}) {
|
|
65
65
|
this._options = _options;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
@@ -471,6 +471,90 @@ class Workflows {
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* Create a workflow from an existing agent task's recorded history.
|
|
476
|
+
*
|
|
477
|
+
* This endpoint creates a workflow by using the browser-use rerun history
|
|
478
|
+
* feature. The task must have completed with history stored in S3.
|
|
479
|
+
*
|
|
480
|
+
* The workflow creation process:
|
|
481
|
+
* 1. Creates a new workflow record in pending state
|
|
482
|
+
* 2. Triggers an Inngest event to process the task history
|
|
483
|
+
* 3. The Inngest handler downloads history, detects variables, and updates the workflow
|
|
484
|
+
*
|
|
485
|
+
* Use GET /workflows/{workflow_id} to poll for creation completion.
|
|
486
|
+
*
|
|
487
|
+
* @param {BrowserUse.WorkflowCreateFromTaskRequest} request
|
|
488
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
489
|
+
*
|
|
490
|
+
* @throws {@link BrowserUse.NotFoundError}
|
|
491
|
+
* @throws {@link BrowserUse.UnprocessableEntityError}
|
|
492
|
+
*
|
|
493
|
+
* @example
|
|
494
|
+
* await client.workflows.createWorkflowFromTask({
|
|
495
|
+
* name: "name",
|
|
496
|
+
* taskId: "taskId",
|
|
497
|
+
* sessionId: "sessionId"
|
|
498
|
+
* })
|
|
499
|
+
*/
|
|
500
|
+
createWorkflowFromTask(request, requestOptions) {
|
|
501
|
+
return core.HttpResponsePromise.fromPromise(this.__createWorkflowFromTask(request, requestOptions));
|
|
502
|
+
}
|
|
503
|
+
__createWorkflowFromTask(request, requestOptions) {
|
|
504
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
505
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
506
|
+
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
507
|
+
const _response = yield core.fetcher({
|
|
508
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, "workflows/from-task"),
|
|
509
|
+
method: "POST",
|
|
510
|
+
headers: _headers,
|
|
511
|
+
contentType: "application/json",
|
|
512
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
513
|
+
requestType: "json",
|
|
514
|
+
body: request,
|
|
515
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
516
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
517
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
518
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
519
|
+
logging: this._options.logging,
|
|
520
|
+
});
|
|
521
|
+
if (_response.ok) {
|
|
522
|
+
return {
|
|
523
|
+
data: _response.body,
|
|
524
|
+
rawResponse: _response.rawResponse,
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
if (_response.error.reason === "status-code") {
|
|
528
|
+
switch (_response.error.statusCode) {
|
|
529
|
+
case 404:
|
|
530
|
+
throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
|
|
531
|
+
case 422:
|
|
532
|
+
throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
533
|
+
default:
|
|
534
|
+
throw new errors.BrowserUseError({
|
|
535
|
+
statusCode: _response.error.statusCode,
|
|
536
|
+
body: _response.error.body,
|
|
537
|
+
rawResponse: _response.rawResponse,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
switch (_response.error.reason) {
|
|
542
|
+
case "non-json":
|
|
543
|
+
throw new errors.BrowserUseError({
|
|
544
|
+
statusCode: _response.error.statusCode,
|
|
545
|
+
body: _response.error.rawBody,
|
|
546
|
+
rawResponse: _response.rawResponse,
|
|
547
|
+
});
|
|
548
|
+
case "timeout":
|
|
549
|
+
throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling POST /workflows/from-task.");
|
|
550
|
+
case "unknown":
|
|
551
|
+
throw new errors.BrowserUseError({
|
|
552
|
+
message: _response.error.errorMessage,
|
|
553
|
+
rawResponse: _response.rawResponse,
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
}
|
|
474
558
|
/**
|
|
475
559
|
* Get a presigned URL to upload workflow YAML directly to S3 from the browser.
|
|
476
560
|
*
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* name: "name",
|
|
5
|
+
* taskId: "taskId",
|
|
6
|
+
* sessionId: "sessionId"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface WorkflowCreateFromTaskRequest {
|
|
10
|
+
/** Name for the new workflow */
|
|
11
|
+
name: string;
|
|
12
|
+
/** ID of the agent task to create workflow from */
|
|
13
|
+
taskId: string;
|
|
14
|
+
/** ID of the agent session containing the task */
|
|
15
|
+
sessionId: string;
|
|
16
|
+
/** Optional description for the workflow */
|
|
17
|
+
description?: string | null;
|
|
18
|
+
}
|
|
@@ -9,6 +9,7 @@ export type { GetWorkflowWorkflowsWorkflowIdGetRequest } from "./GetWorkflowWork
|
|
|
9
9
|
export type { ListAllExecutionsWorkflowsExecutionsGetRequest } from "./ListAllExecutionsWorkflowsExecutionsGetRequest.js";
|
|
10
10
|
export type { ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest } from "./ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.js";
|
|
11
11
|
export type { ListWorkflowsWorkflowsGetRequest } from "./ListWorkflowsWorkflowsGetRequest.js";
|
|
12
|
+
export type { WorkflowCreateFromTaskRequest } from "./WorkflowCreateFromTaskRequest.js";
|
|
12
13
|
export type { WorkflowCreateRequest } from "./WorkflowCreateRequest.js";
|
|
13
14
|
export type { WorkflowExecuteRequest } from "./WorkflowExecuteRequest.js";
|
|
14
15
|
export type { WorkflowGenerateRequest } from "./WorkflowGenerateRequest.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type * as BrowserUse from "../index.js";
|
|
2
2
|
/**
|
|
3
|
-
* View model for account information
|
|
3
|
+
* View model for account information.
|
|
4
4
|
*/
|
|
5
5
|
export interface AccountView {
|
|
6
6
|
/** The name of the user */
|
|
7
7
|
name?: string | null;
|
|
8
|
-
/** The monthly credits balance in USD */
|
|
9
|
-
monthlyCreditsBalanceUsd: number;
|
|
10
|
-
/** The additional credits balance in USD */
|
|
11
|
-
additionalCreditsBalanceUsd: number;
|
|
12
8
|
/** The total credits balance in USD */
|
|
13
9
|
totalCreditsBalanceUsd: number;
|
|
10
|
+
/** Monthly subscription credits balance in USD */
|
|
11
|
+
monthlyCreditsBalanceUsd: number;
|
|
12
|
+
/** Additional top-up credits balance in USD */
|
|
13
|
+
additionalCreditsBalanceUsd: number;
|
|
14
14
|
/** The rate limit for the account */
|
|
15
15
|
rateLimit: number;
|
|
16
16
|
/** The plan information */
|
|
@@ -5,10 +5,16 @@ import type * as BrowserUse from "../index.js";
|
|
|
5
5
|
export interface MarketplaceSkillResponse {
|
|
6
6
|
/** Unique identifier for the skill */
|
|
7
7
|
id: string;
|
|
8
|
+
/** URL-friendly slug for the skill */
|
|
9
|
+
slug: string;
|
|
8
10
|
/** Title of the skill (shows up in the public view) */
|
|
9
11
|
title: string;
|
|
10
12
|
/** Description of the skill (shows up in the public view) */
|
|
11
13
|
description: string;
|
|
14
|
+
/** Categories of the skill */
|
|
15
|
+
categories: BrowserUse.SkillCategory[];
|
|
16
|
+
/** Domains/websites this skill interacts with */
|
|
17
|
+
domains: string[];
|
|
12
18
|
/** Input parameters of the skill */
|
|
13
19
|
parameters: BrowserUse.ParameterSchema[];
|
|
14
20
|
/** Output schema of the skill */
|
|
@@ -17,6 +23,14 @@ export interface MarketplaceSkillResponse {
|
|
|
17
23
|
currentVersion: number | null;
|
|
18
24
|
/** Whether the skill is official (verified by Browser Use) */
|
|
19
25
|
isOfficial: boolean;
|
|
26
|
+
/** Number of times this skill has been cloned */
|
|
27
|
+
cloneCount: number;
|
|
28
|
+
/** URL of the custom skill icon */
|
|
29
|
+
iconUrl?: string | null;
|
|
30
|
+
/** When the skill was first published */
|
|
31
|
+
firstPublishedAt: string;
|
|
32
|
+
/** When the skill was last published */
|
|
33
|
+
lastPublishedAt: string;
|
|
20
34
|
/** Creation timestamp */
|
|
21
35
|
createdAt: string;
|
|
22
36
|
/** Last update timestamp */
|
|
@@ -13,4 +13,6 @@ export interface SessionItemView {
|
|
|
13
13
|
startedAt: string;
|
|
14
14
|
/** Timestamp when the session was stopped (None if still active) */
|
|
15
15
|
finishedAt?: string | null;
|
|
16
|
+
/** Whether tasks in this session share memory and history with each other */
|
|
17
|
+
persistMemory: boolean;
|
|
16
18
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Enumeration of possible
|
|
2
|
+
* Enumeration of possible agent session states
|
|
3
3
|
*
|
|
4
4
|
* Attributes:
|
|
5
|
-
* ACTIVE:
|
|
6
|
-
* STOPPED:
|
|
5
|
+
* ACTIVE: Agent session is currently active and running
|
|
6
|
+
* STOPPED: Agent session has been stopped and is no longer active
|
|
7
7
|
*/
|
|
8
8
|
export declare const SessionStatus: {
|
|
9
9
|
readonly Active: "active";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SessionStatus = void 0;
|
|
5
5
|
/**
|
|
6
|
-
* Enumeration of possible
|
|
6
|
+
* Enumeration of possible agent session states
|
|
7
7
|
*
|
|
8
8
|
* Attributes:
|
|
9
|
-
* ACTIVE:
|
|
10
|
-
* STOPPED:
|
|
9
|
+
* ACTIVE: Agent session is currently active and running
|
|
10
|
+
* STOPPED: Agent session has been stopped and is no longer active
|
|
11
11
|
*/
|
|
12
12
|
exports.SessionStatus = {
|
|
13
13
|
Active: "active",
|
|
@@ -17,4 +17,6 @@ export interface SessionView {
|
|
|
17
17
|
tasks: BrowserUse.TaskItemView[];
|
|
18
18
|
/** Optional URL to access the public share of the session */
|
|
19
19
|
publicShareUrl?: string | null;
|
|
20
|
+
/** Whether tasks in this session share memory and history with each other */
|
|
21
|
+
persistMemory?: boolean;
|
|
20
22
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Skill category. */
|
|
2
|
+
export declare const SkillCategory: {
|
|
3
|
+
readonly Search: "search";
|
|
4
|
+
readonly ECommerce: "e_commerce";
|
|
5
|
+
readonly Financial: "financial";
|
|
6
|
+
readonly News: "news";
|
|
7
|
+
readonly RealEstate: "real_estate";
|
|
8
|
+
readonly SocialMedia: "social_media";
|
|
9
|
+
readonly Travel: "travel";
|
|
10
|
+
readonly Marketplace: "marketplace";
|
|
11
|
+
readonly LeadGeneration: "lead_generation";
|
|
12
|
+
readonly Seo: "seo";
|
|
13
|
+
readonly Jobs: "jobs";
|
|
14
|
+
readonly Developer: "developer";
|
|
15
|
+
readonly Media: "media";
|
|
16
|
+
readonly Automation: "automation";
|
|
17
|
+
readonly Integration: "integration";
|
|
18
|
+
readonly Other: "other";
|
|
19
|
+
};
|
|
20
|
+
export type SkillCategory = (typeof SkillCategory)[keyof typeof SkillCategory];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SkillCategory = void 0;
|
|
5
|
+
/** Skill category. */
|
|
6
|
+
exports.SkillCategory = {
|
|
7
|
+
Search: "search",
|
|
8
|
+
ECommerce: "e_commerce",
|
|
9
|
+
Financial: "financial",
|
|
10
|
+
News: "news",
|
|
11
|
+
RealEstate: "real_estate",
|
|
12
|
+
SocialMedia: "social_media",
|
|
13
|
+
Travel: "travel",
|
|
14
|
+
Marketplace: "marketplace",
|
|
15
|
+
LeadGeneration: "lead_generation",
|
|
16
|
+
Seo: "seo",
|
|
17
|
+
Jobs: "jobs",
|
|
18
|
+
Developer: "developer",
|
|
19
|
+
Media: "media",
|
|
20
|
+
Automation: "automation",
|
|
21
|
+
Integration: "integration",
|
|
22
|
+
Other: "other",
|
|
23
|
+
};
|
|
@@ -5,10 +5,16 @@ import type * as BrowserUse from "../index.js";
|
|
|
5
5
|
export interface SkillResponse {
|
|
6
6
|
/** Unique identifier for the skill */
|
|
7
7
|
id: string;
|
|
8
|
+
/** URL-friendly slug for the skill */
|
|
9
|
+
slug?: string | null;
|
|
8
10
|
/** Title of the skill (shows up in the public view) */
|
|
9
11
|
title: string;
|
|
10
12
|
/** Description of the skill (shows up in the public view) */
|
|
11
13
|
description: string;
|
|
14
|
+
/** Categories of the skill */
|
|
15
|
+
categories: BrowserUse.SkillCategory[];
|
|
16
|
+
/** Domains/websites this skill interacts with */
|
|
17
|
+
domains: string[];
|
|
12
18
|
/** Goal of the skill (not shown in the public view) */
|
|
13
19
|
goal?: string | null;
|
|
14
20
|
/** Prompt for the agent to use when generating the skill automatically (not shown in the public view) */
|
|
@@ -23,8 +29,12 @@ export interface SkillResponse {
|
|
|
23
29
|
isEnabled: boolean;
|
|
24
30
|
/** Whether the skill is publicly available */
|
|
25
31
|
isPublic: boolean;
|
|
26
|
-
/**
|
|
27
|
-
|
|
32
|
+
/** URL of the custom skill icon */
|
|
33
|
+
iconUrl?: string | null;
|
|
34
|
+
/** When the skill was first published */
|
|
35
|
+
firstPublishedAt?: string | null;
|
|
36
|
+
/** When the skill was last published */
|
|
37
|
+
lastPublishedAt?: string | null;
|
|
28
38
|
/** Current version of the skill */
|
|
29
39
|
currentVersion: number | null;
|
|
30
40
|
/** When the current version started generating */
|
|
@@ -33,6 +43,8 @@ export interface SkillResponse {
|
|
|
33
43
|
currentVersionFinishedAt?: string | null;
|
|
34
44
|
/** Base64 encoded generated code (contact support@browser-use.com to get access) - ENTERPRISE ONLY */
|
|
35
45
|
code?: string | null;
|
|
46
|
+
/** Unique identifier for the skill this skill was cloned from */
|
|
47
|
+
clonedFromSkillId?: string | null;
|
|
36
48
|
/** Creation timestamp */
|
|
37
49
|
createdAt: string;
|
|
38
50
|
/** Last update timestamp */
|
|
@@ -5,5 +5,6 @@ export declare const SkillsGenerationStatus: {
|
|
|
5
5
|
readonly Failed: "failed";
|
|
6
6
|
readonly Finished: "finished";
|
|
7
7
|
readonly Cancelled: "cancelled";
|
|
8
|
+
readonly TimedOut: "timed_out";
|
|
8
9
|
};
|
|
9
10
|
export type SkillsGenerationStatus = (typeof SkillsGenerationStatus)[keyof typeof SkillsGenerationStatus];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response model for workflow created from an agent task.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkflowCreateFromTaskResponse {
|
|
5
|
+
/** ID of the newly created workflow */
|
|
6
|
+
workflowId: string;
|
|
7
|
+
/** Status of the workflow creation (pending, completed) */
|
|
8
|
+
status?: string;
|
|
9
|
+
/** Human-readable message about the creation */
|
|
10
|
+
message?: string;
|
|
11
|
+
}
|
|
@@ -33,6 +33,10 @@ export interface WorkflowExecutionResponse {
|
|
|
33
33
|
executionMetadata?: Record<string, unknown> | null;
|
|
34
34
|
/** Presigned URL to download execution logs */
|
|
35
35
|
logsDownloadUrl?: string | null;
|
|
36
|
+
/** AI-generated summary of the execution result */
|
|
37
|
+
aiSummary?: string | null;
|
|
38
|
+
/** AI's determination of whether execution succeeded */
|
|
39
|
+
aiSuccess?: boolean | null;
|
|
36
40
|
/** Naive UTC timestamp when execution was created */
|
|
37
41
|
createdAt: string;
|
|
38
42
|
}
|
|
@@ -25,4 +25,8 @@ export interface WorkflowExecutionStateView {
|
|
|
25
25
|
createdAt: string;
|
|
26
26
|
/** Live browser view URL (available during and up to 60s after execution) */
|
|
27
27
|
liveUrl?: string | null;
|
|
28
|
+
/** AI-generated summary of the execution result */
|
|
29
|
+
aiSummary?: string | null;
|
|
30
|
+
/** AI's determination of whether execution succeeded */
|
|
31
|
+
aiSuccess?: boolean | null;
|
|
28
32
|
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface WorkflowExecutionStepView {
|
|
5
5
|
/** Unique identifier for the step (execution_id-step-N) */
|
|
6
|
-
id
|
|
6
|
+
id?: string;
|
|
7
7
|
/** Sequential step number (1-indexed) */
|
|
8
|
-
stepNumber
|
|
8
|
+
stepNumber?: number;
|
|
9
9
|
/** Name of the step from workflow definition */
|
|
10
10
|
stepName?: string | null;
|
|
11
11
|
/** Description of what this step is doing */
|
|
12
|
-
nextGoal
|
|
12
|
+
nextGoal?: string;
|
|
13
13
|
/** Whether the step has completed */
|
|
14
14
|
isDone?: boolean;
|
|
15
15
|
/** Whether the step succeeded (None if in progress) */
|
|
@@ -25,5 +25,5 @@ export interface WorkflowExecutionStepView {
|
|
|
25
25
|
/** Error message if step failed */
|
|
26
26
|
error?: string | null;
|
|
27
27
|
/** ISO 8601 timestamp when step was executed */
|
|
28
|
-
createdAt
|
|
28
|
+
createdAt?: string;
|
|
29
29
|
}
|
|
@@ -9,10 +9,16 @@ export interface WorkflowGenerationStateView {
|
|
|
9
9
|
name: string;
|
|
10
10
|
/** Current status of workflow generation */
|
|
11
11
|
generationStatus: BrowserUse.WorkflowGenerationStatus;
|
|
12
|
+
/** Error message if generation failed */
|
|
13
|
+
generationError?: string | null;
|
|
14
|
+
/** Current progress step (e.g., "downloading_history", "detecting_variables") */
|
|
15
|
+
generationProgress?: string | null;
|
|
12
16
|
/** Live browser view URL (available only during generation) */
|
|
13
17
|
liveUrl?: string | null;
|
|
14
18
|
/** List of generated workflow steps (available after completion) */
|
|
15
19
|
steps?: BrowserUse.WorkflowGenerationStepView[];
|
|
16
20
|
/** When workflow was created */
|
|
17
21
|
createdAt: string;
|
|
22
|
+
/** When workflow was last updated */
|
|
23
|
+
updatedAt?: string | null;
|
|
18
24
|
}
|