@roll-agent/browser-use-agent 0.10.0 → 0.11.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 +27 -24
- package/dist/browser-action-approval.d.ts +14 -0
- package/dist/browser-security.d.ts +20 -0
- package/dist/browser-use-policy.d.ts +56 -0
- package/dist/diagnostics/effective-env.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/platform-page.d.ts +2 -2
- package/dist/pages/yupao/chat.d.ts +2 -2
- package/dist/pages/yupao/navigation.d.ts +4 -4
- package/dist/reply-authority/prepared-reply-store.d.ts +2 -0
- package/dist/reply-authority/schemas.d.ts +2 -2
- package/dist/runtime-config.d.ts +2 -0
- package/dist/tool-action-approval.d.ts +35 -0
- package/dist/tools/browser-status.d.ts +19 -3
- package/dist/tools/list-pages.d.ts +1 -1
- package/dist/tools/navigate-active-tab.d.ts +4 -1
- package/dist/tools/open-platform.d.ts +4 -1
- package/dist/tools/select-page.d.ts +1 -1
- package/dist/tools/yupao-send-reply.d.ts +3 -0
- package/dist/tools/zhipin-diagnose-browser-state.d.ts +7 -7
- package/dist/tools/zhipin-generate-reply-preview.d.ts +5 -0
- package/dist/tools/zhipin-get-candidate-info.d.ts +1 -1
- package/dist/tools/zhipin-get-candidate-list.d.ts +1 -1
- package/dist/tools/zhipin-open-chat-page.d.ts +1 -1
- package/dist/tools/zhipin-open-recommend-page.d.ts +1 -1
- package/dist/tools/zhipin-send-prepared-reply.d.ts +12 -0
- package/package.json +4 -4
- package/references/env.yaml +8 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BrowserContextManager, BrowserInspectablePage, BrowserRuntime, Page, Platform } from "@roll-agent/browser";
|
|
1
|
+
import type { BrowserContextManager, BrowserInspectablePage, BrowserRuntime, BrowserActionPolicyOptions, Page, Platform } from "@roll-agent/browser";
|
|
2
2
|
export declare function findTrackedPlatformPage(ctxManager: BrowserContextManager, platform: Platform): Promise<Page | undefined>;
|
|
3
3
|
export declare function findOpenPlatformTarget(runtime: BrowserRuntime, platform: Platform): Promise<BrowserInspectablePage | undefined>;
|
|
4
|
-
export declare function openPlatformHomeTarget(runtime: BrowserRuntime, platform: Platform): Promise<{
|
|
4
|
+
export declare function openPlatformHomeTarget(runtime: BrowserRuntime, platform: Platform, options?: BrowserActionPolicyOptions): Promise<{
|
|
5
5
|
page: BrowserInspectablePage;
|
|
6
6
|
reusedExistingPage: boolean;
|
|
7
7
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BrowserActionPolicyOptions, type Page } from "@roll-agent/browser";
|
|
2
2
|
/** 在指定对话中发送回复消息 */
|
|
3
|
-
export declare function sendReply(page: Page, conversationId: string, message: string): Promise<{
|
|
3
|
+
export declare function sendReply(page: Page, conversationId: string, message: string, options?: BrowserActionPolicyOptions): Promise<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
error?: string;
|
|
6
6
|
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BrowserActionPolicyOptions, type Page } from "@roll-agent/browser";
|
|
2
2
|
/** 导航到消息列表页 */
|
|
3
|
-
export declare function ensureOnMessageList(page: Page): Promise<void>;
|
|
3
|
+
export declare function ensureOnMessageList(page: Page, options?: BrowserActionPolicyOptions): Promise<void>;
|
|
4
4
|
/** 导航到登录页 */
|
|
5
|
-
export declare function goToLoginPage(page: Page): Promise<void>;
|
|
5
|
+
export declare function goToLoginPage(page: Page, options?: BrowserActionPolicyOptions): Promise<void>;
|
|
6
6
|
/** 导航到指定对话 */
|
|
7
|
-
export declare function goToConversation(page: Page, conversationId: string): Promise<void>;
|
|
7
|
+
export declare function goToConversation(page: Page, conversationId: string, options?: BrowserActionPolicyOptions): Promise<void>;
|
|
8
8
|
/** 检测是否已登录 */
|
|
9
9
|
export declare function isLoggedIn(page: Page): Promise<boolean>;
|
|
@@ -14,6 +14,8 @@ export type PreparedReplyConsumeResult = {
|
|
|
14
14
|
readonly ok: false;
|
|
15
15
|
readonly reason: "not_found" | "expired" | "consumed";
|
|
16
16
|
};
|
|
17
|
+
export type PreparedReplyInspectResult = PreparedReplyConsumeResult;
|
|
17
18
|
export declare function savePreparedReply(input: Omit<PreparedReplyRecord, "preparedReplyId">, nowSeconds?: number): PreparedReplyRecord;
|
|
18
19
|
export declare function consumePreparedReply(preparedReplyId: string, nowSeconds?: number): PreparedReplyConsumeResult;
|
|
20
|
+
export declare function inspectPreparedReply(preparedReplyId: string, nowSeconds?: number): PreparedReplyInspectResult;
|
|
19
21
|
export declare function resetPreparedReplyStoreForTests(): void;
|
|
@@ -47,6 +47,7 @@ export declare const ReplyAuthorityEnvelopePayloadSchema: z.ZodObject<{
|
|
|
47
47
|
platform: "zhipin";
|
|
48
48
|
conversationId: string;
|
|
49
49
|
candidateId: string;
|
|
50
|
+
reply: string;
|
|
50
51
|
tenantId: string;
|
|
51
52
|
recruiterBinding: {
|
|
52
53
|
platform: "zhipin";
|
|
@@ -60,12 +61,12 @@ export declare const ReplyAuthorityEnvelopePayloadSchema: z.ZodObject<{
|
|
|
60
61
|
iat: number;
|
|
61
62
|
exp: number;
|
|
62
63
|
aud: "browser-use-agent/zhipin_send_reply";
|
|
63
|
-
reply: string;
|
|
64
64
|
policyVersion: string;
|
|
65
65
|
}, {
|
|
66
66
|
platform: "zhipin";
|
|
67
67
|
conversationId: string;
|
|
68
68
|
candidateId: string;
|
|
69
|
+
reply: string;
|
|
69
70
|
tenantId: string;
|
|
70
71
|
recruiterBinding: {
|
|
71
72
|
platform: "zhipin";
|
|
@@ -79,7 +80,6 @@ export declare const ReplyAuthorityEnvelopePayloadSchema: z.ZodObject<{
|
|
|
79
80
|
iat: number;
|
|
80
81
|
exp: number;
|
|
81
82
|
aud: "browser-use-agent/zhipin_send_reply";
|
|
82
|
-
reply: string;
|
|
83
83
|
policyVersion: string;
|
|
84
84
|
}>;
|
|
85
85
|
export declare const ReplyAuthorityPublicKeySchema: z.ZodObject<{
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ToolActionApprovalSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
id: string;
|
|
6
|
+
}, {
|
|
7
|
+
id: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type ToolActionApproval = z.infer<typeof ToolActionApprovalSchema>;
|
|
10
|
+
export type ToolActionApprovalSubject = {
|
|
11
|
+
readonly tool: string;
|
|
12
|
+
readonly target: string;
|
|
13
|
+
readonly digest: string;
|
|
14
|
+
readonly summary?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ToolActionApprovalRequest = {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly expiresAt: string;
|
|
19
|
+
readonly tool: string;
|
|
20
|
+
readonly target: string;
|
|
21
|
+
readonly summary?: string;
|
|
22
|
+
readonly retryInput: {
|
|
23
|
+
readonly toolActionApproval: ToolActionApproval;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare function createToolActionApprovalRequest(subject: ToolActionApprovalSubject, ttlMs: number, nowMs?: number): ToolActionApprovalRequest;
|
|
27
|
+
export declare function approveToolAction(input: {
|
|
28
|
+
readonly approval: ToolActionApproval;
|
|
29
|
+
readonly subject: ToolActionApprovalSubject;
|
|
30
|
+
}): boolean;
|
|
31
|
+
export declare function isToolActionApprovalValid(input: {
|
|
32
|
+
readonly approval: ToolActionApproval;
|
|
33
|
+
readonly subject: ToolActionApprovalSubject;
|
|
34
|
+
}): boolean;
|
|
35
|
+
export declare function resetToolActionApprovalsForTests(): void;
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
export declare const browserStatus: import("@roll-agent/sdk").ToolDefinition<{}, {
|
|
2
|
-
running: boolean;
|
|
3
|
-
headless: boolean;
|
|
4
2
|
mode: "managed-cdp" | "remote-cdp" | "existing-session";
|
|
3
|
+
headless: boolean;
|
|
4
|
+
security: {
|
|
5
|
+
domainAllowlist?: string[] | undefined;
|
|
6
|
+
maxPageContentBytes?: number | undefined;
|
|
7
|
+
maxSnapshotNodes?: number | undefined;
|
|
8
|
+
actionPolicy?: "log" | "deny" | "confirm" | undefined;
|
|
9
|
+
};
|
|
10
|
+
running: boolean;
|
|
5
11
|
activeSessions: {
|
|
6
12
|
platform: "zhipin" | "yupao";
|
|
7
13
|
pagesOpen: number;
|
|
8
14
|
hasLoginState: boolean | null;
|
|
9
|
-
loginStateSource: "
|
|
15
|
+
loginStateSource: "snapshot" | "profile" | "none" | "unknown";
|
|
10
16
|
currentUrl?: string | undefined;
|
|
11
17
|
}[];
|
|
12
18
|
replyAuthorityKeysLoaded: boolean;
|
|
13
19
|
visualCursorEnabled: boolean;
|
|
14
20
|
visualActivityEnabled: boolean;
|
|
21
|
+
toolPolicy: {
|
|
22
|
+
tools?: Record<string, {
|
|
23
|
+
policy: "log" | "deny" | "confirm";
|
|
24
|
+
}> | undefined;
|
|
25
|
+
approvalTtlMs?: number | undefined;
|
|
26
|
+
};
|
|
27
|
+
policyWarnings: {
|
|
28
|
+
code: "unknown_tool_policy" | "double_confirmation" | "browser_action_policy_not_recommended";
|
|
29
|
+
message: string;
|
|
30
|
+
}[];
|
|
15
31
|
effectiveEnvSources: Record<string, {
|
|
16
32
|
present: boolean;
|
|
17
33
|
fingerprint?: string | undefined;
|
|
@@ -2,9 +2,9 @@ export declare const listPages: import("@roll-agent/sdk").ToolDefinition<{
|
|
|
2
2
|
platform?: "zhipin" | "yupao" | undefined;
|
|
3
3
|
}, {
|
|
4
4
|
pages: {
|
|
5
|
+
pageId: string;
|
|
5
6
|
url: string;
|
|
6
7
|
title: string;
|
|
7
|
-
pageId: string;
|
|
8
8
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
9
9
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
10
10
|
isSelectedForPlatform: boolean;
|
|
@@ -13,12 +13,15 @@ type NavigateActiveTabDeps = {
|
|
|
13
13
|
export declare function setNavigateActiveTabDepsForTests(override: Partial<NavigateActiveTabDeps> | undefined): void;
|
|
14
14
|
export declare const navigateActiveTab: import("@roll-agent/sdk").ToolDefinition<{
|
|
15
15
|
url: string;
|
|
16
|
+
browserActionApproval?: {
|
|
17
|
+
id: string;
|
|
18
|
+
} | undefined;
|
|
16
19
|
}, {
|
|
17
20
|
success: boolean;
|
|
18
21
|
page: {
|
|
22
|
+
pageId: string;
|
|
19
23
|
url: string;
|
|
20
24
|
title: string;
|
|
21
|
-
pageId: string;
|
|
22
25
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
23
26
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
24
27
|
isSelectedForPlatform: boolean;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export declare const openPlatform: import("@roll-agent/sdk").ToolDefinition<{
|
|
2
2
|
platform: "zhipin" | "yupao";
|
|
3
|
+
browserActionApproval?: {
|
|
4
|
+
id: string;
|
|
5
|
+
} | undefined;
|
|
3
6
|
}, {
|
|
4
7
|
success: boolean;
|
|
5
8
|
page: {
|
|
9
|
+
pageId: string;
|
|
6
10
|
url: string;
|
|
7
11
|
title: string;
|
|
8
|
-
pageId: string;
|
|
9
12
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
10
13
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
11
14
|
isSelectedForPlatform: boolean;
|
|
@@ -4,9 +4,9 @@ export declare const selectPage: import("@roll-agent/sdk").ToolDefinition<{
|
|
|
4
4
|
}, {
|
|
5
5
|
success: boolean;
|
|
6
6
|
page: {
|
|
7
|
+
pageId: string;
|
|
7
8
|
url: string;
|
|
8
9
|
title: string;
|
|
9
|
-
pageId: string;
|
|
10
10
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
11
11
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
12
12
|
isSelectedForPlatform: boolean;
|
|
@@ -16,7 +16,7 @@ declare const StorageEntrySummarySchema: z.ZodObject<{
|
|
|
16
16
|
area: "localStorage" | "sessionStorage";
|
|
17
17
|
valueLength: number;
|
|
18
18
|
valueKind: "string" | "empty" | "json";
|
|
19
|
-
jsonKind?: "string" | "number" | "boolean" | "object" | "
|
|
19
|
+
jsonKind?: "string" | "number" | "boolean" | "object" | "null" | "array" | undefined;
|
|
20
20
|
jsonTopLevelKeys?: string[] | undefined;
|
|
21
21
|
jsonArrayLength?: number | undefined;
|
|
22
22
|
numericFields?: Record<string, number> | undefined;
|
|
@@ -27,7 +27,7 @@ declare const StorageEntrySummarySchema: z.ZodObject<{
|
|
|
27
27
|
area: "localStorage" | "sessionStorage";
|
|
28
28
|
valueLength: number;
|
|
29
29
|
valueKind: "string" | "empty" | "json";
|
|
30
|
-
jsonKind?: "string" | "number" | "boolean" | "object" | "
|
|
30
|
+
jsonKind?: "string" | "number" | "boolean" | "object" | "null" | "array" | undefined;
|
|
31
31
|
jsonTopLevelKeys?: string[] | undefined;
|
|
32
32
|
jsonArrayLength?: number | undefined;
|
|
33
33
|
numericFields?: Record<string, number> | undefined;
|
|
@@ -172,9 +172,9 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
172
172
|
success: boolean;
|
|
173
173
|
requestedPhase: "native" | "native-watch" | "native-ws-connect" | "native-page-bring-front" | "native-evaluate-url-no-runtime-enable" | "native-dom-read-no-runtime-enable" | "native-input-move-no-runtime-enable" | "native-runtime-enable" | "native-evaluate-url" | "native-dom-read" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary";
|
|
174
174
|
nativePages: {
|
|
175
|
+
pageId: string;
|
|
175
176
|
url: string;
|
|
176
177
|
title: string;
|
|
177
|
-
pageId: string;
|
|
178
178
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
179
179
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
180
180
|
isSelectedForPlatform: boolean;
|
|
@@ -189,9 +189,9 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
189
189
|
titleChangedFromPrevious: boolean;
|
|
190
190
|
currentUrl?: string | undefined;
|
|
191
191
|
page?: {
|
|
192
|
+
pageId: string;
|
|
192
193
|
url: string;
|
|
193
194
|
title: string;
|
|
194
|
-
pageId: string;
|
|
195
195
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
196
196
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
197
197
|
isSelectedForPlatform: boolean;
|
|
@@ -214,9 +214,9 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
214
214
|
hasFocus: boolean;
|
|
215
215
|
} | undefined;
|
|
216
216
|
targetPage?: {
|
|
217
|
+
pageId: string;
|
|
217
218
|
url: string;
|
|
218
219
|
title: string;
|
|
219
|
-
pageId: string;
|
|
220
220
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
221
221
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
222
222
|
isSelectedForPlatform: boolean;
|
|
@@ -288,7 +288,7 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
288
288
|
area: "localStorage" | "sessionStorage";
|
|
289
289
|
valueLength: number;
|
|
290
290
|
valueKind: "string" | "empty" | "json";
|
|
291
|
-
jsonKind?: "string" | "number" | "boolean" | "object" | "
|
|
291
|
+
jsonKind?: "string" | "number" | "boolean" | "object" | "null" | "array" | undefined;
|
|
292
292
|
jsonTopLevelKeys?: string[] | undefined;
|
|
293
293
|
jsonArrayLength?: number | undefined;
|
|
294
294
|
numericFields?: Record<string, number> | undefined;
|
|
@@ -300,7 +300,7 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
300
300
|
area: "localStorage" | "sessionStorage";
|
|
301
301
|
valueLength: number;
|
|
302
302
|
valueKind: "string" | "empty" | "json";
|
|
303
|
-
jsonKind?: "string" | "number" | "boolean" | "object" | "
|
|
303
|
+
jsonKind?: "string" | "number" | "boolean" | "object" | "null" | "array" | undefined;
|
|
304
304
|
jsonTopLevelKeys?: string[] | undefined;
|
|
305
305
|
jsonArrayLength?: number | undefined;
|
|
306
306
|
numericFields?: Record<string, number> | undefined;
|
|
@@ -19,6 +19,11 @@ export declare const zhipinGenerateReplyPreview: import("@roll-agent/sdk").ToolD
|
|
|
19
19
|
conversationId?: string | undefined;
|
|
20
20
|
candidateName?: string | undefined;
|
|
21
21
|
maxMessages?: number | undefined;
|
|
22
|
+
reasoning?: {
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
effort?: "high" | "low" | "medium" | undefined;
|
|
25
|
+
scope?: "all" | "reply" | undefined;
|
|
26
|
+
} | undefined;
|
|
22
27
|
}, {
|
|
23
28
|
success: boolean;
|
|
24
29
|
error?: string | undefined;
|
|
@@ -34,9 +34,9 @@ export declare const zhipinGetCandidateInfo: import("@roll-agent/sdk").ToolDefin
|
|
|
34
34
|
systemMessages: number;
|
|
35
35
|
};
|
|
36
36
|
chatMessages: {
|
|
37
|
+
index: number;
|
|
37
38
|
time: string;
|
|
38
39
|
content: string;
|
|
39
|
-
index: number;
|
|
40
40
|
sender: "candidate" | "recruiter" | "system";
|
|
41
41
|
messageType: "text" | "resume" | "system" | "wechat-exchange";
|
|
42
42
|
}[];
|
|
@@ -16,9 +16,9 @@ export declare const zhipinOpenChatPage: import("@roll-agent/sdk").ToolDefinitio
|
|
|
16
16
|
chatReady: boolean;
|
|
17
17
|
error?: string | undefined;
|
|
18
18
|
page?: {
|
|
19
|
+
pageId: string;
|
|
19
20
|
url: string;
|
|
20
21
|
title: string;
|
|
21
|
-
pageId: string;
|
|
22
22
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
23
23
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
24
24
|
isSelectedForPlatform: boolean;
|
|
@@ -16,9 +16,9 @@ export declare const zhipinOpenRecommendPage: import("@roll-agent/sdk").ToolDefi
|
|
|
16
16
|
recommendReady: boolean;
|
|
17
17
|
error?: string | undefined;
|
|
18
18
|
page?: {
|
|
19
|
+
pageId: string;
|
|
19
20
|
url: string;
|
|
20
21
|
title: string;
|
|
21
|
-
pageId: string;
|
|
22
22
|
boundPlatform: "zhipin" | "yupao" | null;
|
|
23
23
|
detectedPlatform: "zhipin" | "yupao" | null;
|
|
24
24
|
isSelectedForPlatform: boolean;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { sendSignedZhipinReply } from "./zhipin-send-reply.ts";
|
|
2
|
+
type ZhipinSendPreparedReplyDeps = {
|
|
3
|
+
readonly sendSignedZhipinReply: typeof sendSignedZhipinReply;
|
|
4
|
+
};
|
|
5
|
+
export declare function setZhipinSendPreparedReplyDepsForTests(override: Partial<ZhipinSendPreparedReplyDeps> | undefined): void;
|
|
1
6
|
export declare const zhipinSendPreparedReply: import("@roll-agent/sdk").ToolDefinition<{
|
|
2
7
|
preparedReplyId: string;
|
|
8
|
+
browserActionApproval?: {
|
|
9
|
+
id: string;
|
|
10
|
+
} | undefined;
|
|
11
|
+
toolActionApproval?: {
|
|
12
|
+
id: string;
|
|
13
|
+
} | undefined;
|
|
3
14
|
}, {
|
|
4
15
|
success: boolean;
|
|
5
16
|
sentMessage: string;
|
|
6
17
|
error?: string | undefined;
|
|
7
18
|
}>;
|
|
19
|
+
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.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"zod": "^3.25.76",
|
|
48
|
-
"@roll-agent/reply-authority-client": "0.1.
|
|
49
|
-
"@roll-agent/sdk": "0.
|
|
50
|
-
"@roll-agent/browser": "0.
|
|
48
|
+
"@roll-agent/reply-authority-client": "0.1.2",
|
|
49
|
+
"@roll-agent/sdk": "0.2.0",
|
|
50
|
+
"@roll-agent/browser": "0.4.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.0.0"
|
package/references/env.yaml
CHANGED
|
@@ -23,6 +23,14 @@ optional:
|
|
|
23
23
|
purpose: 招聘事件 Open API base URL;工具成功后会调用 `/api/v1/recruitment-events`
|
|
24
24
|
default: https://huajune.duliday.com
|
|
25
25
|
example: https://example.com
|
|
26
|
+
- name: BROWSER_SECURITY_JSON
|
|
27
|
+
purpose: 浏览器安全策略 JSON;可配置 domainAllowlist、maxPageContentBytes、maxSnapshotNodes、actionPolicy
|
|
28
|
+
default: '{"domainAllowlist":[],"maxPageContentBytes":102400,"maxSnapshotNodes":500,"actionPolicy":"log"}'
|
|
29
|
+
example: '{"domainAllowlist":["zhipin.com"],"maxPageContentBytes":102400,"maxSnapshotNodes":500,"actionPolicy":"log"}'
|
|
30
|
+
- name: BROWSER_USE_POLICY_JSON
|
|
31
|
+
purpose: browser-use 工具级业务策略 JSON;可按 exact tool name 配置 log、deny、confirm
|
|
32
|
+
default: '{"approvalTtlMs":300000,"tools":{}}'
|
|
33
|
+
example: '{"approvalTtlMs":300000,"tools":{"zhipin_send_prepared_reply":{"policy":"confirm"}}}'
|
|
26
34
|
- name: BROWSER_VISUAL_CURSOR
|
|
27
35
|
purpose: 在可见浏览器页面内显示 browser-use 的页内虚拟指针和点击波纹;默认开启,设为 `"false"` 可关闭
|
|
28
36
|
default: "true"
|