@roll-agent/browser-use-agent 0.14.0 → 0.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/SKILL.md +22 -1
- package/dist/browser-instance-pool.d.ts +10 -0
- package/dist/index.js +1 -1
- package/dist/runtime-config.d.ts +14 -0
- package/dist/tools/browser-stop.d.ts +80 -0
- package/package.json +2 -2
- package/references/env.yaml +5 -2
package/dist/runtime-config.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const BrowserInstanceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13
13
|
sessionsDir: z.ZodOptional<z.ZodString>;
|
|
14
14
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
15
|
profileName: z.ZodOptional<z.ZodString>;
|
|
16
|
+
profileColor: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
16
17
|
windowBounds: z.ZodOptional<z.ZodObject<{
|
|
17
18
|
x: z.ZodOptional<z.ZodNumber>;
|
|
18
19
|
y: z.ZodOptional<z.ZodNumber>;
|
|
@@ -37,6 +38,7 @@ export declare const BrowserInstanceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
37
38
|
userDataDir: string;
|
|
38
39
|
headless?: boolean | undefined;
|
|
39
40
|
profileName?: string | undefined;
|
|
41
|
+
profileColor?: string | undefined;
|
|
40
42
|
cdpUrl?: string | undefined;
|
|
41
43
|
cdpPort?: number | undefined;
|
|
42
44
|
executablePath?: string | undefined;
|
|
@@ -55,6 +57,7 @@ export declare const BrowserInstanceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
55
57
|
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
56
58
|
headless?: boolean | undefined;
|
|
57
59
|
profileName?: string | undefined;
|
|
60
|
+
profileColor?: string | undefined;
|
|
58
61
|
cdpUrl?: string | undefined;
|
|
59
62
|
cdpHost?: string | undefined;
|
|
60
63
|
cdpPort?: number | undefined;
|
|
@@ -77,6 +80,7 @@ export declare const BrowserInstanceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
77
80
|
userDataDir: string;
|
|
78
81
|
headless?: boolean | undefined;
|
|
79
82
|
profileName?: string | undefined;
|
|
83
|
+
profileColor?: string | undefined;
|
|
80
84
|
cdpUrl?: string | undefined;
|
|
81
85
|
cdpPort?: number | undefined;
|
|
82
86
|
executablePath?: string | undefined;
|
|
@@ -95,6 +99,7 @@ export declare const BrowserInstanceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
95
99
|
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
96
100
|
headless?: boolean | undefined;
|
|
97
101
|
profileName?: string | undefined;
|
|
102
|
+
profileColor?: string | undefined;
|
|
98
103
|
cdpUrl?: string | undefined;
|
|
99
104
|
cdpHost?: string | undefined;
|
|
100
105
|
cdpPort?: number | undefined;
|
|
@@ -126,6 +131,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
126
131
|
sessionsDir: z.ZodOptional<z.ZodString>;
|
|
127
132
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
128
133
|
profileName: z.ZodOptional<z.ZodString>;
|
|
134
|
+
profileColor: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
129
135
|
windowBounds: z.ZodOptional<z.ZodObject<{
|
|
130
136
|
x: z.ZodOptional<z.ZodNumber>;
|
|
131
137
|
y: z.ZodOptional<z.ZodNumber>;
|
|
@@ -150,6 +156,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
150
156
|
userDataDir: string;
|
|
151
157
|
headless?: boolean | undefined;
|
|
152
158
|
profileName?: string | undefined;
|
|
159
|
+
profileColor?: string | undefined;
|
|
153
160
|
cdpUrl?: string | undefined;
|
|
154
161
|
cdpPort?: number | undefined;
|
|
155
162
|
executablePath?: string | undefined;
|
|
@@ -168,6 +175,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
168
175
|
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
169
176
|
headless?: boolean | undefined;
|
|
170
177
|
profileName?: string | undefined;
|
|
178
|
+
profileColor?: string | undefined;
|
|
171
179
|
cdpUrl?: string | undefined;
|
|
172
180
|
cdpHost?: string | undefined;
|
|
173
181
|
cdpPort?: number | undefined;
|
|
@@ -190,6 +198,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
190
198
|
userDataDir: string;
|
|
191
199
|
headless?: boolean | undefined;
|
|
192
200
|
profileName?: string | undefined;
|
|
201
|
+
profileColor?: string | undefined;
|
|
193
202
|
cdpUrl?: string | undefined;
|
|
194
203
|
cdpPort?: number | undefined;
|
|
195
204
|
executablePath?: string | undefined;
|
|
@@ -208,6 +217,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
208
217
|
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
209
218
|
headless?: boolean | undefined;
|
|
210
219
|
profileName?: string | undefined;
|
|
220
|
+
profileColor?: string | undefined;
|
|
211
221
|
cdpUrl?: string | undefined;
|
|
212
222
|
cdpHost?: string | undefined;
|
|
213
223
|
cdpPort?: number | undefined;
|
|
@@ -232,6 +242,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
232
242
|
userDataDir: string;
|
|
233
243
|
headless?: boolean | undefined;
|
|
234
244
|
profileName?: string | undefined;
|
|
245
|
+
profileColor?: string | undefined;
|
|
235
246
|
cdpUrl?: string | undefined;
|
|
236
247
|
cdpPort?: number | undefined;
|
|
237
248
|
executablePath?: string | undefined;
|
|
@@ -253,6 +264,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
253
264
|
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
254
265
|
headless?: boolean | undefined;
|
|
255
266
|
profileName?: string | undefined;
|
|
267
|
+
profileColor?: string | undefined;
|
|
256
268
|
cdpUrl?: string | undefined;
|
|
257
269
|
cdpHost?: string | undefined;
|
|
258
270
|
cdpPort?: number | undefined;
|
|
@@ -278,6 +290,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
278
290
|
userDataDir: string;
|
|
279
291
|
headless?: boolean | undefined;
|
|
280
292
|
profileName?: string | undefined;
|
|
293
|
+
profileColor?: string | undefined;
|
|
281
294
|
cdpUrl?: string | undefined;
|
|
282
295
|
cdpPort?: number | undefined;
|
|
283
296
|
executablePath?: string | undefined;
|
|
@@ -299,6 +312,7 @@ export declare const BrowserInstancesConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
299
312
|
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
300
313
|
headless?: boolean | undefined;
|
|
301
314
|
profileName?: string | undefined;
|
|
315
|
+
profileColor?: string | undefined;
|
|
302
316
|
cdpUrl?: string | undefined;
|
|
303
317
|
cdpHost?: string | undefined;
|
|
304
318
|
cdpPort?: number | undefined;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type BrowserInstanceStopResult } from "../browser-instance-pool.ts";
|
|
3
|
+
declare const BrowserStopInputSchema: z.ZodEffects<z.ZodObject<{
|
|
4
|
+
browserInstance: z.ZodOptional<z.ZodString>;
|
|
5
|
+
browserInstances: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
all: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
browserInstance?: string | undefined;
|
|
9
|
+
browserInstances?: string[] | undefined;
|
|
10
|
+
all?: boolean | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
browserInstance?: string | undefined;
|
|
13
|
+
browserInstances?: string[] | undefined;
|
|
14
|
+
all?: boolean | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
browserInstance?: string | undefined;
|
|
17
|
+
browserInstances?: string[] | undefined;
|
|
18
|
+
all?: boolean | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
browserInstance?: string | undefined;
|
|
21
|
+
browserInstances?: string[] | undefined;
|
|
22
|
+
all?: boolean | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
declare const BrowserStopOutputSchema: z.ZodObject<{
|
|
25
|
+
ok: z.ZodBoolean;
|
|
26
|
+
stopped: z.ZodNumber;
|
|
27
|
+
results: z.ZodArray<z.ZodObject<{
|
|
28
|
+
browserInstance: z.ZodString;
|
|
29
|
+
status: z.ZodEnum<["stopped", "not_running", "not_found", "failed"]>;
|
|
30
|
+
mode: z.ZodOptional<z.ZodEnum<["managed-cdp", "remote-cdp", "existing-session"]>>;
|
|
31
|
+
message: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
status: "not_found" | "failed" | "stopped" | "not_running";
|
|
34
|
+
browserInstance: string;
|
|
35
|
+
message?: string | undefined;
|
|
36
|
+
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
status: "not_found" | "failed" | "stopped" | "not_running";
|
|
39
|
+
browserInstance: string;
|
|
40
|
+
message?: string | undefined;
|
|
41
|
+
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
42
|
+
}>, "many">;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
stopped: number;
|
|
45
|
+
ok: boolean;
|
|
46
|
+
results: {
|
|
47
|
+
status: "not_found" | "failed" | "stopped" | "not_running";
|
|
48
|
+
browserInstance: string;
|
|
49
|
+
message?: string | undefined;
|
|
50
|
+
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
}, {
|
|
53
|
+
stopped: number;
|
|
54
|
+
ok: boolean;
|
|
55
|
+
results: {
|
|
56
|
+
status: "not_found" | "failed" | "stopped" | "not_running";
|
|
57
|
+
browserInstance: string;
|
|
58
|
+
message?: string | undefined;
|
|
59
|
+
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
60
|
+
}[];
|
|
61
|
+
}>;
|
|
62
|
+
type BrowserStopInput = z.infer<typeof BrowserStopInputSchema>;
|
|
63
|
+
type BrowserStopOutput = z.infer<typeof BrowserStopOutputSchema>;
|
|
64
|
+
export declare const browserStop: import("@roll-agent/sdk").ToolDefinition<{
|
|
65
|
+
browserInstance?: string | undefined;
|
|
66
|
+
browserInstances?: string[] | undefined;
|
|
67
|
+
all?: boolean | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
stopped: number;
|
|
70
|
+
ok: boolean;
|
|
71
|
+
results: {
|
|
72
|
+
status: "not_found" | "failed" | "stopped" | "not_running";
|
|
73
|
+
browserInstance: string;
|
|
74
|
+
message?: string | undefined;
|
|
75
|
+
mode?: "managed-cdp" | "remote-cdp" | "existing-session" | undefined;
|
|
76
|
+
}[];
|
|
77
|
+
}>;
|
|
78
|
+
export declare function resolveBrowserStopTargets(input: BrowserStopInput, availableInstances: readonly string[]): readonly string[];
|
|
79
|
+
export declare function createBrowserStopOutput(results: readonly BrowserInstanceStopResult[]): BrowserStopOutput;
|
|
80
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roll-agent/browser-use-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"zod": "^3.25.76",
|
|
48
48
|
"@roll-agent/reply-authority-client": "0.1.2",
|
|
49
49
|
"@roll-agent/sdk": "0.2.0",
|
|
50
|
-
"@roll-agent/browser": "0.
|
|
50
|
+
"@roll-agent/browser": "0.8.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.0.0"
|
package/references/env.yaml
CHANGED
|
@@ -31,9 +31,12 @@ optional:
|
|
|
31
31
|
purpose: browser-use 工具级业务策略 JSON;可按 exact tool name 配置 log、deny、confirm
|
|
32
32
|
default: '{"approvalTtlMs":300000,"tools":{}}'
|
|
33
33
|
example: '{"approvalTtlMs":300000,"tools":{"zhipin_send_prepared_reply":{"policy":"confirm"}}}'
|
|
34
|
+
- name: BROWSER_PROFILE_COLOR
|
|
35
|
+
purpose: legacy 单浏览器运行时的 Chrome profile 颜色,格式为 `#RRGGBB`;配置了 `browser.instances` 时由每个实例的 profileColor 接管,此 env 会被忽略
|
|
36
|
+
example: "#2563EB"
|
|
34
37
|
- name: BROWSER_INSTANCES_JSON
|
|
35
|
-
purpose: Roll core 注入的多浏览器实例声明 JSON;由 `browser.instances` 派生,包含每个实例的 profile、CDP 端口、session 目录、可选 profileName/windowBounds 和招聘事件归因 ID;orchestrator 不应手工拼接,手工配置时必须保持 cdpPort/userDataDir 唯一
|
|
36
|
-
example: '{"defaultInstance":"boss-a","instances":{"boss-a":{"platform":"zhipin","mode":"managed-cdp","cdpPort":9222,"userDataDir":"/tmp/roll-browser/profiles/boss-a","profileName":"boss-a","windowBounds":{"x":0,"y":0,"width":680,"height":1000},"trackingAgentId":"zhipin-boss-a"}}}'
|
|
38
|
+
purpose: Roll core 注入的多浏览器实例声明 JSON;由 `browser.instances` 派生,包含每个实例的 profile、CDP 端口、session 目录、可选 profileName/profileColor/windowBounds 和招聘事件归因 ID;orchestrator 不应手工拼接,手工配置时必须保持 cdpPort/userDataDir 唯一
|
|
39
|
+
example: '{"defaultInstance":"boss-a","instances":{"boss-a":{"platform":"zhipin","mode":"managed-cdp","cdpPort":9222,"userDataDir":"/tmp/roll-browser/profiles/boss-a","profileName":"boss-a","profileColor":"#2563EB","windowBounds":{"x":0,"y":0,"width":680,"height":1000},"trackingAgentId":"zhipin-boss-a"}}}'
|
|
37
40
|
- name: BROWSER_VISUAL_CURSOR
|
|
38
41
|
purpose: 在可见浏览器页面内显示 browser-use 的页内虚拟指针和点击波纹;默认开启,设为 `"false"` 可关闭
|
|
39
42
|
default: "true"
|