@roll-agent/browser-use-agent 0.27.2 → 0.27.4
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/browser-use-policy.d.ts +18 -26
- package/dist/diagnostics/effective-env.d.ts +2 -14
- package/dist/goal/contracts.d.ts +173 -1537
- package/dist/goal/decisions.d.ts +1 -9
- package/dist/goal/execution-context.d.ts +83 -457
- package/dist/goal/form-context.d.ts +104 -480
- package/dist/goal/form-handoff.d.ts +12 -138
- package/dist/goal/interaction-feedback.d.ts +10 -36
- package/dist/goal/observation.d.ts +122 -827
- package/dist/goal/picker-observation.d.ts +26 -41
- package/dist/goal/picker-state.d.ts +33 -70
- package/dist/goal/task-evidence.d.ts +3 -3
- package/dist/goal/task-freshness.d.ts +8 -48
- package/dist/goal/task-policy.d.ts +10 -10
- package/dist/goal/task-progress.d.ts +25 -271
- package/dist/goal/task-sources.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/reply-authority/prepared-reply-decision.d.ts +22 -25
- package/dist/reply-authority/prepared-reply-judge-context.d.ts +9 -64
- package/dist/reply-authority/schemas.d.ts +6 -100
- package/dist/runtime-config.d.ts +40 -302
- package/dist/tool-action-approval.d.ts +1 -5
- package/dist/tools/attach-browser-session.d.ts +2 -2
- package/dist/tools/browser-execute.d.ts +19 -19
- package/dist/tools/browser-operate.d.ts +113 -113
- package/dist/tools/browser-ref-schemas.d.ts +19 -77
- package/dist/tools/browser-snapshot.d.ts +7 -7
- package/dist/tools/browser-status.d.ts +34 -34
- package/dist/tools/browser-stop.d.ts +19 -54
- package/dist/tools/browser-workflows.d.ts +87 -454
- package/dist/tools/click-ref.d.ts +7 -7
- package/dist/tools/type-ref.d.ts +8 -8
- package/dist/tools/yupao-send-reply.d.ts +1 -1
- package/dist/tools/zhipin-capture-resume.d.ts +7 -7
- package/dist/tools/zhipin-close-resume.d.ts +2 -2
- package/dist/tools/zhipin-diagnose-browser-state.d.ts +76 -156
- package/dist/tools/zhipin-exchange-wechat.d.ts +2 -2
- package/dist/tools/zhipin-filter-recommend-candidates.d.ts +15 -15
- package/dist/tools/zhipin-generate-reply-preview.d.ts +14 -14
- package/dist/tools/zhipin-get-candidate-info.d.ts +16 -16
- package/dist/tools/zhipin-get-candidate-list.d.ts +7 -7
- package/dist/tools/zhipin-get-username.d.ts +3 -3
- package/dist/tools/zhipin-judge-prepared-reply.d.ts +5 -5
- package/dist/tools/zhipin-list-recommend-jobs.d.ts +7 -7
- package/dist/tools/zhipin-open-chat-page.d.ts +4 -4
- package/dist/tools/zhipin-open-chat.d.ts +3 -3
- package/dist/tools/zhipin-open-recommend-page.d.ts +3 -3
- package/dist/tools/zhipin-open-resume.d.ts +2 -2
- package/dist/tools/zhipin-read-messages.d.ts +4 -4
- package/dist/tools/zhipin-say-hello.d.ts +3 -3
- package/dist/tools/zhipin-scroll-view.d.ts +13 -13
- package/dist/tools/zhipin-select-recommend-job.d.ts +16 -16
- package/dist/tools/zhipin-send-prepared-reply.d.ts +6 -6
- package/dist/tools/zhipin-send-reply.d.ts +2 -10
- package/dist/workflows/store.d.ts +46 -253
- package/package.json +5 -5
|
@@ -1,56 +1,41 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const PickerEvidenceSchema: z.ZodObject<{
|
|
3
|
-
part: z.ZodEnum<
|
|
4
|
-
|
|
3
|
+
part: z.ZodEnum<{
|
|
4
|
+
option: "option";
|
|
5
|
+
trigger: "trigger";
|
|
6
|
+
}>;
|
|
7
|
+
relationship: z.ZodEnum<{
|
|
8
|
+
unknown: "unknown";
|
|
9
|
+
aria: "aria";
|
|
10
|
+
"local-dom": "local-dom";
|
|
11
|
+
}>;
|
|
5
12
|
triggerPath: z.ZodOptional<z.ZodString>;
|
|
6
|
-
panelPaths: z.ZodArray<z.ZodString
|
|
13
|
+
panelPaths: z.ZodArray<z.ZodString>;
|
|
7
14
|
label: z.ZodOptional<z.ZodString>;
|
|
8
|
-
labelSource: z.ZodOptional<z.ZodEnum<
|
|
15
|
+
labelSource: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
label: "label";
|
|
17
|
+
placeholder: "placeholder";
|
|
18
|
+
"empty-display": "empty-display";
|
|
19
|
+
}>>;
|
|
9
20
|
expanded: z.ZodOptional<z.ZodBoolean>;
|
|
10
21
|
panelVisible: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
selection: z.ZodEnum<
|
|
12
|
-
|
|
22
|
+
selection: z.ZodEnum<{
|
|
23
|
+
value: "value";
|
|
24
|
+
unknown: "unknown";
|
|
25
|
+
empty: "empty";
|
|
26
|
+
}>;
|
|
27
|
+
selectionEvidence: z.ZodEnum<{
|
|
28
|
+
unknown: "unknown";
|
|
29
|
+
"native-select": "native-select";
|
|
30
|
+
"backing-input": "backing-input";
|
|
31
|
+
}>;
|
|
13
32
|
committedText: z.ZodOptional<z.ZodString>;
|
|
14
33
|
queryText: z.ZodOptional<z.ZodString>;
|
|
15
34
|
optionText: z.ZodOptional<z.ZodString>;
|
|
16
35
|
optionLabel: z.ZodOptional<z.ZodString>;
|
|
17
36
|
optionPath: z.ZodOptional<z.ZodString>;
|
|
18
37
|
optionSelected: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
},
|
|
20
|
-
selection: "value" | "unknown" | "empty";
|
|
21
|
-
part: "option" | "trigger";
|
|
22
|
-
relationship: "unknown" | "aria" | "local-dom";
|
|
23
|
-
panelPaths: string[];
|
|
24
|
-
selectionEvidence: "unknown" | "native-select" | "backing-input";
|
|
25
|
-
label?: string | undefined;
|
|
26
|
-
expanded?: boolean | undefined;
|
|
27
|
-
triggerPath?: string | undefined;
|
|
28
|
-
labelSource?: "label" | "placeholder" | "empty-display" | undefined;
|
|
29
|
-
panelVisible?: boolean | undefined;
|
|
30
|
-
committedText?: string | undefined;
|
|
31
|
-
queryText?: string | undefined;
|
|
32
|
-
optionText?: string | undefined;
|
|
33
|
-
optionLabel?: string | undefined;
|
|
34
|
-
optionPath?: string | undefined;
|
|
35
|
-
optionSelected?: boolean | undefined;
|
|
36
|
-
}, {
|
|
37
|
-
selection: "value" | "unknown" | "empty";
|
|
38
|
-
part: "option" | "trigger";
|
|
39
|
-
relationship: "unknown" | "aria" | "local-dom";
|
|
40
|
-
panelPaths: string[];
|
|
41
|
-
selectionEvidence: "unknown" | "native-select" | "backing-input";
|
|
42
|
-
label?: string | undefined;
|
|
43
|
-
expanded?: boolean | undefined;
|
|
44
|
-
triggerPath?: string | undefined;
|
|
45
|
-
labelSource?: "label" | "placeholder" | "empty-display" | undefined;
|
|
46
|
-
panelVisible?: boolean | undefined;
|
|
47
|
-
committedText?: string | undefined;
|
|
48
|
-
queryText?: string | undefined;
|
|
49
|
-
optionText?: string | undefined;
|
|
50
|
-
optionLabel?: string | undefined;
|
|
51
|
-
optionPath?: string | undefined;
|
|
52
|
-
optionSelected?: boolean | undefined;
|
|
53
|
-
}>;
|
|
38
|
+
}, z.core.$strip>;
|
|
54
39
|
export type PickerEvidence = z.infer<typeof PickerEvidenceSchema>;
|
|
55
40
|
/** Fixed read-only DOM code. No class names, site labels, coordinates or desired values. */
|
|
56
41
|
export declare const INSPECT_PICKER = "function(pathFor) {\n const el=this, doc=el.ownerDocument, view=doc.defaultView;\n if(el.getRootNode()!==doc)return undefined;\n const clean=s=>String(s||'').replace(/[\\uE000-\\uF8FF]/g,'').replace(/\\s+/g,' ').trim();\n const panelSelector='ul,ol,[role=\"listbox\"],[role=\"menu\"],[role=\"tree\"],[role=\"grid\"],[role=\"dialog\"],dialog';\n const optionSelector='li,option,[role=\"option\"],[role=\"menuitem\"],[role=\"treeitem\"]';\n const triggerSelector='input,select,button,[tabindex],[role=\"combobox\"],[aria-haspopup],[aria-controls],[aria-owns]';\n const ids=node=>[...(node.getAttribute('aria-controls')||'').split(/\\s+/),...(node.getAttribute('aria-owns')||'').split(/\\s+/)].filter(Boolean);\n const explicitPanels=node=>ids(node).map(id=>doc.getElementById(id)).filter(p=>p && p!==node);\n const hiddenValue=node=>{\n const inputs=[...node.querySelectorAll('input[type=\"hidden\"]')];\n return inputs.length===1?inputs[0]:undefined;\n };\n // A unique visible text input paired with one hidden selection token is a\n // grounded autocomplete even when the application omits ARIA combobox markup.\n const inputBacking=node=>{\n if(node.tagName!=='INPUT' || !['text','search',''].includes(node.getAttribute('type')||''))return undefined;\n for(let p=node.parentElement,depth=0;p && p!==doc.body && p.tagName!=='FORM' && depth<2;p=p.parentElement,depth++){\n const fields=[...p.querySelectorAll('input:not([type=\"hidden\"]),textarea,select')];\n if(fields.length>1)return undefined;\n const hidden=[...p.querySelectorAll('input[type=\"hidden\"]')];\n if(fields.length===1 && fields[0]===node && hidden.length===1)return hidden[0];\n }\n return undefined;\n };\n const triggerLike=node=>Boolean(inputBacking(node)) ||node.tagName==='SELECT' || node.getAttribute('role')==='combobox' ||\n Boolean(node.getAttribute('aria-haspopup') && node.getAttribute('aria-haspopup')!=='false') ||\n explicitPanels(node).some(p=>p.matches(panelSelector)||p.querySelector('[role=\"listbox\"],[role=\"menu\"],[role=\"tree\"]')) ||\n (node.tabIndex>=0 && hiddenValue(node));\n const triggersWithin=node=>{\n const all=[...node.querySelectorAll(triggerSelector)].filter(triggerLike);\n return all.filter(t=>!all.some(other=>other!==t && other.contains(t)));\n };\n const visible=node=>{\n if(!node.isConnected || !node.getClientRects().length)return false;\n for(let p=node;p;p=p.parentElement){const s=view.getComputedStyle(p);if(p.hidden || p.getAttribute('aria-hidden')==='true' || s.display==='none' || s.visibility!=='visible' || s.opacity==='0')return false;}\n return true;\n };\n const localPanels=trigger=>{\n if(trigger.tagName==='SELECT')return [];\n const nested=[...trigger.querySelectorAll(panelSelector)].filter(p=>p.querySelector(optionSelector));\n if(nested.length && !triggersWithin(trigger).length)return nested.filter(p=>!nested.some(other=>other!==p && other.contains(p)));\n for(let parent=trigger.parentElement,depth=0;parent && parent!==doc.body && depth<5;parent=parent.parentElement,depth++){\n const triggers=triggersWithin(parent);\n if(triggers.length>1)return [];\n if(triggers.length!==1 || triggers[0]!==trigger)continue;\n const panels=[...parent.querySelectorAll(panelSelector)].filter(p=>!trigger.contains(p) && p.querySelector(optionSelector));\n if(panels.length)return panels.filter(p=>!panels.some(other=>other!==p && other.contains(p)));\n }\n return [];\n };\n const option=el.closest(optionSelector);\n const ownRole=option && option.getAttribute('role');\n let trigger,panels=[],relationship='unknown',part;\n if(triggerLike(el) && !option){\n trigger=el;part='trigger';panels=explicitPanels(el);\n if(panels.length)relationship='aria';else {panels=localPanels(el);if(panels.length)relationship='local-dom';}\n if(el.tagName!=='SELECT' && !panels.length && !el.hasAttribute('aria-haspopup') && el.getAttribute('role')!=='combobox' && !inputBacking(el))return undefined;\n }else if(option){\n part='option';const panel=option.closest(panelSelector);\n if(!panel && option.tagName!=='OPTION')return undefined;\n const all=[...doc.querySelectorAll('[aria-controls],[aria-owns]')];\n const explicit=all.length<=512 ? all.filter(t=>triggerLike(t) && explicitPanels(t).some(p=>p.contains(option))) : [];\n let ambiguous=explicit.length>1 || all.length>512;\n if(explicit.length===1){trigger=explicit[0];panels=explicitPanels(trigger);relationship='aria';}\n if(!trigger && !ambiguous && panel){\n for(let parent=panel.parentElement,depth=0;parent && parent!==doc.body && depth<5;parent=parent.parentElement,depth++){\n const triggers=triggersWithin(parent).filter(t=>!panel.contains(t));\n if(triggers.length>1){ambiguous=true;break;}\n if(triggers.length===1){\n const candidate=triggers[0],owned=explicitPanels(candidate).length?explicitPanels(candidate):localPanels(candidate);\n if(owned.some(p=>p.contains(option))){trigger=candidate;panels=owned;relationship='local-dom';break;}\n }\n }\n }\n if(!trigger && !ambiguous && !['option','menuitem','treeitem'].includes(ownRole))return undefined;\n }else return undefined;\n const result={part,relationship,panelPaths:panels.map(pathFor).filter(Boolean),selection:'unknown',selectionEvidence:'unknown'};\n if(option && part==='option'){\n result.optionText=clean(option.innerText||option.textContent).slice(0,2000);\n result.optionLabel=clean(option.getAttribute('aria-label') || (option.innerText||option.textContent||'').split(/\\n/).find(line=>line.trim()) || '').slice(0,2000);\n const optionPath=pathFor(option);if(optionPath)result.optionPath=optionPath;\n if(option.hasAttribute('aria-selected'))result.optionSelected=option.getAttribute('aria-selected')==='true';\n else if(option.tagName==='OPTION')result.optionSelected=option.selected;\n }\n if(!trigger)return result;\n const path=pathFor(trigger);if(path)result.triggerPath=path;else result.relationship='unknown';\n const label=clean(trigger.getAttribute('aria-label') || [...(trigger.labels||[])].map(l=>l.textContent).join(' ') ||\n (trigger.getAttribute('aria-labelledby')||'').split(/\\s+/).map(id=>doc.getElementById(id)?.textContent||'').join(' '));\n if(label){result.label=label.slice(0,200);result.labelSource='label';}\n const backing=inputBacking(trigger);\n const hidden=hiddenValue(trigger)||backing,display=[];\n const walker=doc.createTreeWalker(trigger,4);let node;\n while((node=walker.nextNode())){\n const parent=node.parentElement;\n if(parent && visible(parent) && !parent.closest('script,style') && !panels.some(p=>p.contains(parent)))display.push(node.textContent||'');\n }\n const text=backing?clean(trigger.value):clean(display.join(''));\n if(trigger.tagName==='SELECT'){\n result.selection=trigger.selectedIndex<0 || (trigger.required && trigger.value==='')?'empty':'value';result.selectionEvidence='native-select';\n if(result.selection==='value')result.committedText=[...trigger.selectedOptions].map(o=>o.label).join(', ');\n }else if(hidden){\n result.selection=hidden.value!==''?'value':hidden.hasAttribute('value')?'unknown':'empty';result.selectionEvidence='backing-input';\n if(result.selection==='value' && text)result.committedText=text.slice(0,2000);\n if(!label && result.selection==='empty' && text){result.label=text.slice(0,200);result.labelSource='empty-display';}\n }\n if(['INPUT','TEXTAREA'].includes(trigger.tagName) && trigger.type!=='hidden'){\n if(!backing || !hidden.value || panels.some(visible))result.queryText=trigger.value;\n if(!label && trigger.placeholder){result.label=clean(trigger.placeholder).slice(0,200);result.labelSource='placeholder';}\n }\n if(panels.length)result.panelVisible=panels.some(visible);\n if(trigger.hasAttribute('aria-expanded'))result.expanded=trigger.getAttribute('aria-expanded')==='true';\n else if(panels.length)result.expanded=result.panelVisible;\n return result;\n}";
|
|
@@ -1,87 +1,50 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { BrowserElementRef } from "@roll-agent/browser";
|
|
3
3
|
import type { GoalSnapshot } from "./observation.ts";
|
|
4
|
-
declare const FieldSchema: z.ZodObject<
|
|
5
|
-
part: z.ZodEnum<["trigger", "option"]>;
|
|
6
|
-
relationship: z.ZodEnum<["aria", "local-dom", "unknown"]>;
|
|
7
|
-
triggerPath: z.ZodOptional<z.ZodString>;
|
|
8
|
-
panelPaths: z.ZodArray<z.ZodString, "many">;
|
|
4
|
+
declare const FieldSchema: z.ZodObject<{
|
|
9
5
|
label: z.ZodOptional<z.ZodString>;
|
|
10
|
-
labelSource: z.ZodOptional<z.ZodEnum<["label", "placeholder", "empty-display"]>>;
|
|
11
6
|
expanded: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
selection: z.ZodEnum<{
|
|
8
|
+
value: "value";
|
|
9
|
+
unknown: "unknown";
|
|
10
|
+
empty: "empty";
|
|
11
|
+
}>;
|
|
12
|
+
relationship: z.ZodEnum<{
|
|
13
|
+
unknown: "unknown";
|
|
14
|
+
aria: "aria";
|
|
15
|
+
"local-dom": "local-dom";
|
|
16
|
+
}>;
|
|
12
17
|
panelVisible: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
selectionEvidence: z.ZodEnum<{
|
|
19
|
+
unknown: "unknown";
|
|
20
|
+
"native-select": "native-select";
|
|
21
|
+
"backing-input": "backing-input";
|
|
22
|
+
}>;
|
|
15
23
|
committedText: z.ZodOptional<z.ZodString>;
|
|
16
24
|
queryText: z.ZodOptional<z.ZodString>;
|
|
17
|
-
optionText: z.ZodOptional<z.ZodString>;
|
|
18
|
-
optionLabel: z.ZodOptional<z.ZodString>;
|
|
19
|
-
optionPath: z.ZodOptional<z.ZodString>;
|
|
20
|
-
optionSelected: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
}, "label" | "expanded" | "selection" | "relationship" | "panelVisible" | "selectionEvidence" | "committedText" | "queryText"> & {
|
|
22
25
|
id: z.ZodString;
|
|
23
26
|
triggerRef: z.ZodOptional<z.ZodString>;
|
|
24
|
-
labelOrigin: z.ZodEnum<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
id: string;
|
|
41
|
-
selection: "value" | "unknown" | "empty";
|
|
42
|
-
relationship: "unknown" | "aria" | "local-dom";
|
|
43
|
-
selectionEvidence: "unknown" | "native-select" | "backing-input";
|
|
44
|
-
labelOrigin: "unknown" | "dom-label" | "dom-placeholder" | "dom-empty-display" | "earlier-dom-label" | "earlier-dom-placeholder" | "earlier-dom-empty-display";
|
|
45
|
-
optionRefs: string[];
|
|
46
|
-
label?: string | undefined;
|
|
47
|
-
expanded?: boolean | undefined;
|
|
48
|
-
panelVisible?: boolean | undefined;
|
|
49
|
-
committedText?: string | undefined;
|
|
50
|
-
queryText?: string | undefined;
|
|
51
|
-
triggerRef?: string | undefined;
|
|
52
|
-
}>;
|
|
53
|
-
declare const PartSchema: z.ZodObject<Pick<{
|
|
54
|
-
part: z.ZodEnum<["trigger", "option"]>;
|
|
55
|
-
relationship: z.ZodEnum<["aria", "local-dom", "unknown"]>;
|
|
56
|
-
triggerPath: z.ZodOptional<z.ZodString>;
|
|
57
|
-
panelPaths: z.ZodArray<z.ZodString, "many">;
|
|
58
|
-
label: z.ZodOptional<z.ZodString>;
|
|
59
|
-
labelSource: z.ZodOptional<z.ZodEnum<["label", "placeholder", "empty-display"]>>;
|
|
60
|
-
expanded: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
-
panelVisible: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
-
selection: z.ZodEnum<["empty", "value", "unknown"]>;
|
|
63
|
-
selectionEvidence: z.ZodEnum<["native-select", "backing-input", "unknown"]>;
|
|
64
|
-
committedText: z.ZodOptional<z.ZodString>;
|
|
65
|
-
queryText: z.ZodOptional<z.ZodString>;
|
|
27
|
+
labelOrigin: z.ZodEnum<{
|
|
28
|
+
unknown: "unknown";
|
|
29
|
+
"dom-label": "dom-label";
|
|
30
|
+
"dom-placeholder": "dom-placeholder";
|
|
31
|
+
"dom-empty-display": "dom-empty-display";
|
|
32
|
+
"earlier-dom-label": "earlier-dom-label";
|
|
33
|
+
"earlier-dom-placeholder": "earlier-dom-placeholder";
|
|
34
|
+
"earlier-dom-empty-display": "earlier-dom-empty-display";
|
|
35
|
+
}>;
|
|
36
|
+
optionRefs: z.ZodArray<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
declare const PartSchema: z.ZodObject<{
|
|
39
|
+
part: z.ZodEnum<{
|
|
40
|
+
option: "option";
|
|
41
|
+
trigger: "trigger";
|
|
42
|
+
}>;
|
|
66
43
|
optionText: z.ZodOptional<z.ZodString>;
|
|
67
44
|
optionLabel: z.ZodOptional<z.ZodString>;
|
|
68
|
-
optionPath: z.ZodOptional<z.ZodString>;
|
|
69
45
|
optionSelected: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
-
}, "part" | "optionText" | "optionLabel" | "optionSelected"> & {
|
|
71
46
|
fieldId: z.ZodOptional<z.ZodString>;
|
|
72
|
-
},
|
|
73
|
-
part: "option" | "trigger";
|
|
74
|
-
optionText?: string | undefined;
|
|
75
|
-
optionLabel?: string | undefined;
|
|
76
|
-
optionSelected?: boolean | undefined;
|
|
77
|
-
fieldId?: string | undefined;
|
|
78
|
-
}, {
|
|
79
|
-
part: "option" | "trigger";
|
|
80
|
-
optionText?: string | undefined;
|
|
81
|
-
optionLabel?: string | undefined;
|
|
82
|
-
optionSelected?: boolean | undefined;
|
|
83
|
-
fieldId?: string | undefined;
|
|
84
|
-
}>;
|
|
47
|
+
}, z.core.$strip>;
|
|
85
48
|
export type PickerField = z.infer<typeof FieldSchema>;
|
|
86
49
|
export type PickerPart = z.infer<typeof PartSchema>;
|
|
87
50
|
export type PickerState = {
|
|
@@ -2,24 +2,24 @@ import type { ReadDocument, ReadTask, TaskProgress } from "./task-progress.ts";
|
|
|
2
2
|
export declare function evidenceCandidates(documents: readonly ReadDocument[]): {
|
|
3
3
|
key: string;
|
|
4
4
|
doc: {
|
|
5
|
-
url: string;
|
|
6
5
|
frameId: string;
|
|
6
|
+
url: string;
|
|
7
7
|
panelsComplete: boolean;
|
|
8
8
|
observedAt: string;
|
|
9
9
|
regions: {
|
|
10
10
|
id: string;
|
|
11
|
-
truncated: boolean;
|
|
12
11
|
name: string;
|
|
13
12
|
text: string;
|
|
14
13
|
kind: "content" | "panel";
|
|
14
|
+
truncated: boolean;
|
|
15
15
|
}[];
|
|
16
16
|
};
|
|
17
17
|
region: {
|
|
18
18
|
id: string;
|
|
19
|
-
truncated: boolean;
|
|
20
19
|
name: string;
|
|
21
20
|
text: string;
|
|
22
21
|
kind: "content" | "panel";
|
|
22
|
+
truncated: boolean;
|
|
23
23
|
};
|
|
24
24
|
spans: {
|
|
25
25
|
id: string;
|
|
@@ -6,32 +6,12 @@ export declare const ActionDependenciesSchema: z.ZodObject<{
|
|
|
6
6
|
browserInstance: z.ZodNullable<z.ZodString>;
|
|
7
7
|
pageId: z.ZodNullable<z.ZodString>;
|
|
8
8
|
targetIdentity: z.ZodString;
|
|
9
|
-
relatedIdentities: z.ZodArray<z.ZodString
|
|
9
|
+
relatedIdentities: z.ZodArray<z.ZodString>;
|
|
10
10
|
reusable: z.ZodBoolean;
|
|
11
|
-
unavailableReasons: z.ZodArray<z.ZodString
|
|
12
|
-
notedCoverageWarnings: z.ZodArray<z.ZodString
|
|
11
|
+
unavailableReasons: z.ZodArray<z.ZodString>;
|
|
12
|
+
notedCoverageWarnings: z.ZodArray<z.ZodString>;
|
|
13
13
|
fingerprint: z.ZodString;
|
|
14
|
-
},
|
|
15
|
-
browserInstance: string | null;
|
|
16
|
-
pageId: string | null;
|
|
17
|
-
documentId: string | null;
|
|
18
|
-
fingerprint: string;
|
|
19
|
-
targetIdentity: string;
|
|
20
|
-
relatedIdentities: string[];
|
|
21
|
-
reusable: boolean;
|
|
22
|
-
unavailableReasons: string[];
|
|
23
|
-
notedCoverageWarnings: string[];
|
|
24
|
-
}, {
|
|
25
|
-
browserInstance: string | null;
|
|
26
|
-
pageId: string | null;
|
|
27
|
-
documentId: string | null;
|
|
28
|
-
fingerprint: string;
|
|
29
|
-
targetIdentity: string;
|
|
30
|
-
relatedIdentities: string[];
|
|
31
|
-
reusable: boolean;
|
|
32
|
-
unavailableReasons: string[];
|
|
33
|
-
notedCoverageWarnings: string[];
|
|
34
|
-
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
35
15
|
export type ActionDependencies = z.infer<typeof ActionDependenciesSchema>;
|
|
36
16
|
/** Position guides visual ordering, but movement alone is not a semantic change.
|
|
37
17
|
* Availability includes live hit testing and must remain part of every guard.
|
|
@@ -48,33 +28,13 @@ export declare const FormCompletionDependenciesSchema: z.ZodObject<{
|
|
|
48
28
|
documentId: z.ZodNullable<z.ZodString>;
|
|
49
29
|
browserInstance: z.ZodNullable<z.ZodString>;
|
|
50
30
|
pageId: z.ZodNullable<z.ZodString>;
|
|
51
|
-
controlIdentities: z.ZodArray<z.ZodString
|
|
31
|
+
controlIdentities: z.ZodArray<z.ZodString>;
|
|
52
32
|
fieldCount: z.ZodNumber;
|
|
53
33
|
reusable: z.ZodBoolean;
|
|
54
|
-
unavailableReasons: z.ZodArray<z.ZodString
|
|
55
|
-
notedCoverageWarnings: z.ZodArray<z.ZodString
|
|
34
|
+
unavailableReasons: z.ZodArray<z.ZodString>;
|
|
35
|
+
notedCoverageWarnings: z.ZodArray<z.ZodString>;
|
|
56
36
|
fingerprint: z.ZodString;
|
|
57
|
-
},
|
|
58
|
-
browserInstance: string | null;
|
|
59
|
-
pageId: string | null;
|
|
60
|
-
documentId: string | null;
|
|
61
|
-
fingerprint: string;
|
|
62
|
-
reusable: boolean;
|
|
63
|
-
unavailableReasons: string[];
|
|
64
|
-
notedCoverageWarnings: string[];
|
|
65
|
-
controlIdentities: string[];
|
|
66
|
-
fieldCount: number;
|
|
67
|
-
}, {
|
|
68
|
-
browserInstance: string | null;
|
|
69
|
-
pageId: string | null;
|
|
70
|
-
documentId: string | null;
|
|
71
|
-
fingerprint: string;
|
|
72
|
-
reusable: boolean;
|
|
73
|
-
unavailableReasons: string[];
|
|
74
|
-
notedCoverageWarnings: string[];
|
|
75
|
-
controlIdentities: string[];
|
|
76
|
-
fieldCount: number;
|
|
77
|
-
}>;
|
|
37
|
+
}, z.core.$strip>;
|
|
78
38
|
export type FormCompletionDependencies = z.infer<typeof FormCompletionDependenciesSchema>;
|
|
79
39
|
/** For a prepared form's final review only. This is an observation-change guard,
|
|
80
40
|
* not a completion oracle. Preserve every observed control and AX/context error;
|
|
@@ -23,9 +23,9 @@ export declare function taskElements(snapshot: GoalSnapshot): {
|
|
|
23
23
|
pickerIdentity: string | undefined;
|
|
24
24
|
readable: boolean | undefined;
|
|
25
25
|
peerGroup: {
|
|
26
|
-
count: number;
|
|
27
26
|
key: string;
|
|
28
27
|
position: number;
|
|
28
|
+
count: number;
|
|
29
29
|
} | undefined;
|
|
30
30
|
pickerOwnerPath: string | undefined;
|
|
31
31
|
pickerOptionPath: string | undefined;
|
|
@@ -33,17 +33,17 @@ export declare function taskElements(snapshot: GoalSnapshot): {
|
|
|
33
33
|
required: boolean | undefined;
|
|
34
34
|
requiredSource: "html" | "aria" | "label-required" | "label-optional" | undefined;
|
|
35
35
|
constraints: {
|
|
36
|
-
multiple?: boolean | undefined;
|
|
37
|
-
pattern?: string | undefined;
|
|
38
36
|
min?: string | undefined;
|
|
39
37
|
max?: string | undefined;
|
|
40
38
|
step?: string | undefined;
|
|
41
39
|
minlength?: string | undefined;
|
|
42
40
|
maxlength?: string | undefined;
|
|
41
|
+
pattern?: string | undefined;
|
|
42
|
+
multiple?: boolean | undefined;
|
|
43
43
|
} | undefined;
|
|
44
44
|
position: {
|
|
45
|
-
left: number;
|
|
46
45
|
top: number;
|
|
46
|
+
left: number;
|
|
47
47
|
} | undefined;
|
|
48
48
|
scrollContainerPaths: string[] | undefined;
|
|
49
49
|
revealViaScroll: boolean | undefined;
|
|
@@ -58,10 +58,10 @@ export declare function taskElements(snapshot: GoalSnapshot): {
|
|
|
58
58
|
modal: boolean | undefined;
|
|
59
59
|
nativeSelect: boolean | undefined;
|
|
60
60
|
options: {
|
|
61
|
-
value: string;
|
|
62
61
|
label: string;
|
|
63
|
-
|
|
62
|
+
value: string;
|
|
64
63
|
selected: boolean;
|
|
64
|
+
disabled: boolean;
|
|
65
65
|
}[] | undefined;
|
|
66
66
|
optionsTruncated: boolean | undefined;
|
|
67
67
|
}[];
|
|
@@ -69,10 +69,10 @@ export declare function taskFingerprint(snapshot: GoalSnapshot): string;
|
|
|
69
69
|
export declare function taskState(input: BrowserOperateInput, snapshot: GoalSnapshot, history: BrowserOperateOutput["steps"], guidance?: string, resolvedValues?: NonNullable<BrowserOperateOutput["resolvedValues"]>, pickers?: PickerState): {
|
|
70
70
|
originalGoal: string;
|
|
71
71
|
pickerFields: {
|
|
72
|
-
id: string;
|
|
73
72
|
selection: "value" | "unknown" | "empty";
|
|
74
73
|
relationship: "unknown" | "aria" | "local-dom";
|
|
75
74
|
selectionEvidence: "unknown" | "native-select" | "backing-input";
|
|
75
|
+
id: string;
|
|
76
76
|
labelOrigin: "unknown" | "dom-label" | "dom-placeholder" | "dom-empty-display" | "earlier-dom-label" | "earlier-dom-placeholder" | "earlier-dom-empty-display";
|
|
77
77
|
optionRefs: string[];
|
|
78
78
|
label?: string | undefined;
|
|
@@ -124,17 +124,17 @@ export declare function taskState(input: BrowserOperateInput, snapshot: GoalSnap
|
|
|
124
124
|
expanded?: string | number | boolean;
|
|
125
125
|
inputType?: string;
|
|
126
126
|
position?: {
|
|
127
|
-
left: number;
|
|
128
127
|
top: number;
|
|
128
|
+
left: number;
|
|
129
129
|
};
|
|
130
130
|
constraints?: {
|
|
131
|
-
multiple?: boolean | undefined;
|
|
132
|
-
pattern?: string | undefined;
|
|
133
131
|
min?: string | undefined;
|
|
134
132
|
max?: string | undefined;
|
|
135
133
|
step?: string | undefined;
|
|
136
134
|
minlength?: string | undefined;
|
|
137
135
|
maxlength?: string | undefined;
|
|
136
|
+
pattern?: string | undefined;
|
|
137
|
+
multiple?: boolean | undefined;
|
|
138
138
|
};
|
|
139
139
|
requiredSource?: "html" | "aria" | "label-required" | "label-optional";
|
|
140
140
|
required?: boolean;
|