@roll-agent/browser-use-agent 0.26.1 → 0.27.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 +36 -8
- package/dist/browser-observation.d.ts +1 -0
- package/dist/execution-visual-feedback.d.ts +61 -0
- package/dist/goal/compact-request.d.ts +5 -0
- package/dist/goal/contracts.d.ts +1732 -0
- package/dist/goal/decisions.d.ts +55 -0
- package/dist/goal/dependency-observation.d.ts +7 -0
- package/dist/goal/execution-context.d.ts +593 -0
- package/dist/goal/form-context.d.ts +639 -0
- package/dist/goal/form-handoff.d.ts +152 -0
- package/dist/goal/form-loop-progress.d.ts +9 -0
- package/dist/goal/form-policy.d.ts +13 -0
- package/dist/goal/host.d.ts +6 -0
- package/dist/goal/interaction-feedback.d.ts +82 -0
- package/dist/goal/loop.d.ts +12 -0
- package/dist/goal/observation-retry.d.ts +3 -0
- package/dist/goal/observation.d.ts +981 -0
- package/dist/goal/operate-handoff.d.ts +3 -0
- package/dist/goal/picker-observation.d.ts +56 -0
- package/dist/goal/picker-state.d.ts +96 -0
- package/dist/goal/reachability.d.ts +2 -0
- package/dist/goal/task-evidence.d.ts +33 -0
- package/dist/goal/task-freshness.d.ts +86 -0
- package/dist/goal/task-loop.d.ts +5 -0
- package/dist/goal/task-observation.d.ts +5 -0
- package/dist/goal/task-policy.d.ts +174 -0
- package/dist/goal/task-progress-policy.d.ts +25 -0
- package/dist/goal/task-progress.d.ts +353 -0
- package/dist/goal/task-sources.d.ts +13 -0
- package/dist/index.js +1 -1
- package/dist/native-visual-activity-session.d.ts +38 -1
- package/dist/tools/browser-operate.d.ts +252 -0
- package/dist/tools/zhipin-diagnose-browser-state.d.ts +4 -4
- package/dist/tools/zhipin-generate-reply-preview.d.ts +1 -1
- package/dist/tools/zhipin-get-candidate-info.d.ts +1 -1
- package/dist/tools/zhipin-scroll-view.d.ts +5 -5
- package/package.json +3 -3
- package/references/browser-exploration.md +52 -0
- package/references/env.yaml +11 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ReadTaskSchema: z.ZodObject<{
|
|
3
|
+
target: z.ZodString;
|
|
4
|
+
captureView: z.ZodString;
|
|
5
|
+
outputs: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
6
|
+
terminal: z.ZodObject<{
|
|
7
|
+
view: z.ZodString;
|
|
8
|
+
selectedTab: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strict", z.ZodTypeAny, {
|
|
10
|
+
view: string;
|
|
11
|
+
selectedTab?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
view: string;
|
|
14
|
+
selectedTab?: string | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
}, "strict", z.ZodTypeAny, {
|
|
17
|
+
target: string;
|
|
18
|
+
captureView: string;
|
|
19
|
+
outputs: string[];
|
|
20
|
+
terminal: {
|
|
21
|
+
view: string;
|
|
22
|
+
selectedTab?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
target: string;
|
|
26
|
+
captureView: string;
|
|
27
|
+
outputs: string[];
|
|
28
|
+
terminal: {
|
|
29
|
+
view: string;
|
|
30
|
+
selectedTab?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
export type ReadTask = z.infer<typeof ReadTaskSchema>;
|
|
34
|
+
export declare const ReadRegionSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
text: z.ZodString;
|
|
38
|
+
kind: z.ZodEnum<["panel", "content"]>;
|
|
39
|
+
truncated: z.ZodBoolean;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
id: string;
|
|
42
|
+
truncated: boolean;
|
|
43
|
+
name: string;
|
|
44
|
+
text: string;
|
|
45
|
+
kind: "content" | "panel";
|
|
46
|
+
}, {
|
|
47
|
+
id: string;
|
|
48
|
+
truncated: boolean;
|
|
49
|
+
name: string;
|
|
50
|
+
text: string;
|
|
51
|
+
kind: "content" | "panel";
|
|
52
|
+
}>;
|
|
53
|
+
export declare const ReadDocumentSchema: z.ZodObject<{
|
|
54
|
+
frameId: z.ZodString;
|
|
55
|
+
url: z.ZodString;
|
|
56
|
+
panelsComplete: z.ZodBoolean;
|
|
57
|
+
observedAt: z.ZodString;
|
|
58
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
text: z.ZodString;
|
|
62
|
+
kind: z.ZodEnum<["panel", "content"]>;
|
|
63
|
+
truncated: z.ZodBoolean;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
id: string;
|
|
66
|
+
truncated: boolean;
|
|
67
|
+
name: string;
|
|
68
|
+
text: string;
|
|
69
|
+
kind: "content" | "panel";
|
|
70
|
+
}, {
|
|
71
|
+
id: string;
|
|
72
|
+
truncated: boolean;
|
|
73
|
+
name: string;
|
|
74
|
+
text: string;
|
|
75
|
+
kind: "content" | "panel";
|
|
76
|
+
}>, "many">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
url: string;
|
|
79
|
+
frameId: string;
|
|
80
|
+
panelsComplete: boolean;
|
|
81
|
+
observedAt: string;
|
|
82
|
+
regions: {
|
|
83
|
+
id: string;
|
|
84
|
+
truncated: boolean;
|
|
85
|
+
name: string;
|
|
86
|
+
text: string;
|
|
87
|
+
kind: "content" | "panel";
|
|
88
|
+
}[];
|
|
89
|
+
}, {
|
|
90
|
+
url: string;
|
|
91
|
+
frameId: string;
|
|
92
|
+
panelsComplete: boolean;
|
|
93
|
+
observedAt: string;
|
|
94
|
+
regions: {
|
|
95
|
+
id: string;
|
|
96
|
+
truncated: boolean;
|
|
97
|
+
name: string;
|
|
98
|
+
text: string;
|
|
99
|
+
kind: "content" | "panel";
|
|
100
|
+
}[];
|
|
101
|
+
}>;
|
|
102
|
+
export type ReadDocument = z.infer<typeof ReadDocumentSchema>;
|
|
103
|
+
export declare const CapturedEvidenceSchema: z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
field: z.ZodString;
|
|
106
|
+
text: z.ZodString;
|
|
107
|
+
observationId: z.ZodString;
|
|
108
|
+
documentId: z.ZodString;
|
|
109
|
+
frameId: z.ZodString;
|
|
110
|
+
url: z.ZodString;
|
|
111
|
+
regionId: z.ZodString;
|
|
112
|
+
regionName: z.ZodString;
|
|
113
|
+
start: z.ZodNumber;
|
|
114
|
+
end: z.ZodNumber;
|
|
115
|
+
observedAt: z.ZodString;
|
|
116
|
+
attribution: z.ZodLiteral<"model-selected-observed-text">;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
id: string;
|
|
119
|
+
url: string;
|
|
120
|
+
frameId: string;
|
|
121
|
+
documentId: string;
|
|
122
|
+
text: string;
|
|
123
|
+
field: string;
|
|
124
|
+
end: number;
|
|
125
|
+
observedAt: string;
|
|
126
|
+
observationId: string;
|
|
127
|
+
regionId: string;
|
|
128
|
+
regionName: string;
|
|
129
|
+
start: number;
|
|
130
|
+
attribution: "model-selected-observed-text";
|
|
131
|
+
}, {
|
|
132
|
+
id: string;
|
|
133
|
+
url: string;
|
|
134
|
+
frameId: string;
|
|
135
|
+
documentId: string;
|
|
136
|
+
text: string;
|
|
137
|
+
field: string;
|
|
138
|
+
end: number;
|
|
139
|
+
observedAt: string;
|
|
140
|
+
observationId: string;
|
|
141
|
+
regionId: string;
|
|
142
|
+
regionName: string;
|
|
143
|
+
start: number;
|
|
144
|
+
attribution: "model-selected-observed-text";
|
|
145
|
+
}>;
|
|
146
|
+
export declare const TaskProgressSchema: z.ZodObject<{
|
|
147
|
+
taskRunId: z.ZodString;
|
|
148
|
+
contractDigest: z.ZodString;
|
|
149
|
+
phase: z.ZodEnum<["collect", "return", "done"]>;
|
|
150
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
field: z.ZodString;
|
|
153
|
+
text: z.ZodString;
|
|
154
|
+
observationId: z.ZodString;
|
|
155
|
+
documentId: z.ZodString;
|
|
156
|
+
frameId: z.ZodString;
|
|
157
|
+
url: z.ZodString;
|
|
158
|
+
regionId: z.ZodString;
|
|
159
|
+
regionName: z.ZodString;
|
|
160
|
+
start: z.ZodNumber;
|
|
161
|
+
end: z.ZodNumber;
|
|
162
|
+
observedAt: z.ZodString;
|
|
163
|
+
attribution: z.ZodLiteral<"model-selected-observed-text">;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
id: string;
|
|
166
|
+
url: string;
|
|
167
|
+
frameId: string;
|
|
168
|
+
documentId: string;
|
|
169
|
+
text: string;
|
|
170
|
+
field: string;
|
|
171
|
+
end: number;
|
|
172
|
+
observedAt: string;
|
|
173
|
+
observationId: string;
|
|
174
|
+
regionId: string;
|
|
175
|
+
regionName: string;
|
|
176
|
+
start: number;
|
|
177
|
+
attribution: "model-selected-observed-text";
|
|
178
|
+
}, {
|
|
179
|
+
id: string;
|
|
180
|
+
url: string;
|
|
181
|
+
frameId: string;
|
|
182
|
+
documentId: string;
|
|
183
|
+
text: string;
|
|
184
|
+
field: string;
|
|
185
|
+
end: number;
|
|
186
|
+
observedAt: string;
|
|
187
|
+
observationId: string;
|
|
188
|
+
regionId: string;
|
|
189
|
+
regionName: string;
|
|
190
|
+
start: number;
|
|
191
|
+
attribution: "model-selected-observed-text";
|
|
192
|
+
}>, "many">;
|
|
193
|
+
invalidatedEvidence: z.ZodArray<z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
field: z.ZodString;
|
|
196
|
+
text: z.ZodString;
|
|
197
|
+
observationId: z.ZodString;
|
|
198
|
+
documentId: z.ZodString;
|
|
199
|
+
frameId: z.ZodString;
|
|
200
|
+
url: z.ZodString;
|
|
201
|
+
regionId: z.ZodString;
|
|
202
|
+
regionName: z.ZodString;
|
|
203
|
+
start: z.ZodNumber;
|
|
204
|
+
end: z.ZodNumber;
|
|
205
|
+
observedAt: z.ZodString;
|
|
206
|
+
attribution: z.ZodLiteral<"model-selected-observed-text">;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
id: string;
|
|
209
|
+
url: string;
|
|
210
|
+
frameId: string;
|
|
211
|
+
documentId: string;
|
|
212
|
+
text: string;
|
|
213
|
+
field: string;
|
|
214
|
+
end: number;
|
|
215
|
+
observedAt: string;
|
|
216
|
+
observationId: string;
|
|
217
|
+
regionId: string;
|
|
218
|
+
regionName: string;
|
|
219
|
+
start: number;
|
|
220
|
+
attribution: "model-selected-observed-text";
|
|
221
|
+
}, {
|
|
222
|
+
id: string;
|
|
223
|
+
url: string;
|
|
224
|
+
frameId: string;
|
|
225
|
+
documentId: string;
|
|
226
|
+
text: string;
|
|
227
|
+
field: string;
|
|
228
|
+
end: number;
|
|
229
|
+
observedAt: string;
|
|
230
|
+
observationId: string;
|
|
231
|
+
regionId: string;
|
|
232
|
+
regionName: string;
|
|
233
|
+
start: number;
|
|
234
|
+
attribution: "model-selected-observed-text";
|
|
235
|
+
}>, "many">;
|
|
236
|
+
missing: z.ZodArray<z.ZodString, "many">;
|
|
237
|
+
capturedRegion: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
documentId: z.ZodString;
|
|
239
|
+
frameId: z.ZodString;
|
|
240
|
+
url: z.ZodString;
|
|
241
|
+
id: z.ZodString;
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
digest: z.ZodString;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
id: string;
|
|
246
|
+
url: string;
|
|
247
|
+
name: string;
|
|
248
|
+
frameId: string;
|
|
249
|
+
documentId: string;
|
|
250
|
+
digest: string;
|
|
251
|
+
}, {
|
|
252
|
+
id: string;
|
|
253
|
+
url: string;
|
|
254
|
+
name: string;
|
|
255
|
+
frameId: string;
|
|
256
|
+
documentId: string;
|
|
257
|
+
digest: string;
|
|
258
|
+
}>>;
|
|
259
|
+
conflicts: z.ZodNumber;
|
|
260
|
+
}, "strip", z.ZodTypeAny, {
|
|
261
|
+
missing: string[];
|
|
262
|
+
taskRunId: string;
|
|
263
|
+
contractDigest: string;
|
|
264
|
+
phase: "collect" | "return" | "done";
|
|
265
|
+
evidence: {
|
|
266
|
+
id: string;
|
|
267
|
+
url: string;
|
|
268
|
+
frameId: string;
|
|
269
|
+
documentId: string;
|
|
270
|
+
text: string;
|
|
271
|
+
field: string;
|
|
272
|
+
end: number;
|
|
273
|
+
observedAt: string;
|
|
274
|
+
observationId: string;
|
|
275
|
+
regionId: string;
|
|
276
|
+
regionName: string;
|
|
277
|
+
start: number;
|
|
278
|
+
attribution: "model-selected-observed-text";
|
|
279
|
+
}[];
|
|
280
|
+
invalidatedEvidence: {
|
|
281
|
+
id: string;
|
|
282
|
+
url: string;
|
|
283
|
+
frameId: string;
|
|
284
|
+
documentId: string;
|
|
285
|
+
text: string;
|
|
286
|
+
field: string;
|
|
287
|
+
end: number;
|
|
288
|
+
observedAt: string;
|
|
289
|
+
observationId: string;
|
|
290
|
+
regionId: string;
|
|
291
|
+
regionName: string;
|
|
292
|
+
start: number;
|
|
293
|
+
attribution: "model-selected-observed-text";
|
|
294
|
+
}[];
|
|
295
|
+
conflicts: number;
|
|
296
|
+
capturedRegion?: {
|
|
297
|
+
id: string;
|
|
298
|
+
url: string;
|
|
299
|
+
name: string;
|
|
300
|
+
frameId: string;
|
|
301
|
+
documentId: string;
|
|
302
|
+
digest: string;
|
|
303
|
+
} | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
missing: string[];
|
|
306
|
+
taskRunId: string;
|
|
307
|
+
contractDigest: string;
|
|
308
|
+
phase: "collect" | "return" | "done";
|
|
309
|
+
evidence: {
|
|
310
|
+
id: string;
|
|
311
|
+
url: string;
|
|
312
|
+
frameId: string;
|
|
313
|
+
documentId: string;
|
|
314
|
+
text: string;
|
|
315
|
+
field: string;
|
|
316
|
+
end: number;
|
|
317
|
+
observedAt: string;
|
|
318
|
+
observationId: string;
|
|
319
|
+
regionId: string;
|
|
320
|
+
regionName: string;
|
|
321
|
+
start: number;
|
|
322
|
+
attribution: "model-selected-observed-text";
|
|
323
|
+
}[];
|
|
324
|
+
invalidatedEvidence: {
|
|
325
|
+
id: string;
|
|
326
|
+
url: string;
|
|
327
|
+
frameId: string;
|
|
328
|
+
documentId: string;
|
|
329
|
+
text: string;
|
|
330
|
+
field: string;
|
|
331
|
+
end: number;
|
|
332
|
+
observedAt: string;
|
|
333
|
+
observationId: string;
|
|
334
|
+
regionId: string;
|
|
335
|
+
regionName: string;
|
|
336
|
+
start: number;
|
|
337
|
+
attribution: "model-selected-observed-text";
|
|
338
|
+
}[];
|
|
339
|
+
conflicts: number;
|
|
340
|
+
capturedRegion?: {
|
|
341
|
+
id: string;
|
|
342
|
+
url: string;
|
|
343
|
+
name: string;
|
|
344
|
+
frameId: string;
|
|
345
|
+
documentId: string;
|
|
346
|
+
digest: string;
|
|
347
|
+
} | undefined;
|
|
348
|
+
}>;
|
|
349
|
+
export type TaskProgress = z.infer<typeof TaskProgressSchema>;
|
|
350
|
+
export declare const digestText: (text: string) => string;
|
|
351
|
+
export declare function createTaskProgress(contract: ReadTask): TaskProgress;
|
|
352
|
+
/** Historical quotes survive closing a region. A changed, still-present region must be recaptured. */
|
|
353
|
+
export declare function reconcileTaskProgress(progress: TaskProgress, contract: ReadTask, documentId: string, documents: readonly ReadDocument[]): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BrowserOperateInput } from "./contracts.ts";
|
|
2
|
+
/** Caller data only. These are candidates, not inferred facts or field bindings. */
|
|
3
|
+
export declare function taskSources(input: BrowserOperateInput): {
|
|
4
|
+
values: Record<string, {
|
|
5
|
+
source: "selected" | "supplied" | "derived" | "generated";
|
|
6
|
+
text: string;
|
|
7
|
+
evidence: string;
|
|
8
|
+
sourceIds: string[];
|
|
9
|
+
} & {
|
|
10
|
+
name: string;
|
|
11
|
+
}>;
|
|
12
|
+
truncated: boolean;
|
|
13
|
+
};
|