agentpath 0.0.0-stage → 0.1.0-alpha.2
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/LICENSE.md +105 -0
- package/README.md +101 -2
- package/THIRD_PARTY_NOTICES +12 -0
- package/apps/demo-site/dist/site.js +92 -0
- package/apps/studio/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/apps/studio/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/apps/studio/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/apps/studio/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/apps/studio/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/apps/studio/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/apps/studio/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/apps/studio/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/apps/studio/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/apps/studio/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/apps/studio/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/apps/studio/dist/assets/index-DH4wJPHm.js +67 -0
- package/apps/studio/dist/assets/index-DrnNh2ip.css +1 -0
- package/apps/studio/dist/index.html +14 -0
- package/audit.md +173 -0
- package/autonomous-mode.md +104 -0
- package/ci.md +118 -0
- package/coding-agents.md +143 -0
- package/concepts.md +145 -0
- package/contracts.md +356 -0
- package/examples/tasks/ambiguous.json +98 -0
- package/examples/tasks/assertion-failure.json +98 -0
- package/examples/tasks/broken.json +98 -0
- package/examples/tasks/fixed.json +98 -0
- package/examples/tasks/recovery.json +19 -0
- package/images/compare-recovery-desktop.jpg +0 -0
- package/images/compare-variants-desktop.jpg +0 -0
- package/images/overview-desktop.jpg +0 -0
- package/images/run-autonomous-passed-desktop.jpg +0 -0
- package/images/run-failed-desktop.jpg +0 -0
- package/images/run-failed-mobile.jpg +0 -0
- package/images/run-missing-artifact-desktop.jpg +0 -0
- package/images/task-editor-laptop.jpg +0 -0
- package/installation.md +102 -0
- package/ledger.md +62 -0
- package/licenses/-fontsource-variable-geist-mono.txt +93 -0
- package/licenses/-fontsource-variable-geist.txt +93 -0
- package/licenses/lucide-react.txt +43 -0
- package/licenses/react-dom.txt +21 -0
- package/licenses/react.txt +21 -0
- package/licenses/scheduler.txt +21 -0
- package/licenses/tailwindcss.txt +21 -0
- package/licenses/zod.txt +21 -0
- package/package.json +165 -4
- package/packages/cli/bin/agentpath.js +39 -0
- package/packages/cli/dist/audit-rerun.js +384 -0
- package/packages/cli/dist/audit.js +387 -0
- package/packages/cli/dist/change-summaries.js +87 -0
- package/packages/cli/dist/ci-report.js +88 -0
- package/packages/cli/dist/demo.js +88 -0
- package/packages/cli/dist/doctor.js +265 -0
- package/packages/cli/dist/explain.js +89 -0
- package/packages/cli/dist/git.js +7 -0
- package/packages/cli/dist/inspect.js +118 -0
- package/packages/cli/dist/ledger.js +509 -0
- package/packages/cli/dist/local.js +102 -0
- package/packages/cli/dist/main.js +708 -0
- package/packages/cli/dist/mcp.js +231 -0
- package/packages/cli/dist/paths.js +6 -0
- package/packages/cli/dist/playwright-fixture.js +185 -0
- package/packages/cli/dist/playwright-reporter.js +49 -0
- package/packages/cli/dist/tasks.js +37 -0
- package/packages/cli/dist/test-source.js +283 -0
- package/packages/cli/dist/watch.js +96 -0
- package/packages/contracts/dist/agent-settings.js +18 -0
- package/packages/contracts/dist/agent.js +175 -0
- package/packages/contracts/dist/audit.js +115 -0
- package/packages/contracts/dist/guidance.js +339 -0
- package/packages/contracts/dist/index.js +14 -0
- package/packages/contracts/dist/inspect.js +63 -0
- package/packages/contracts/dist/ledger.js +80 -0
- package/packages/contracts/dist/local.js +171 -0
- package/packages/contracts/dist/outcomes.js +94 -0
- package/packages/contracts/dist/platform.js +105 -0
- package/packages/contracts/dist/playwright-live.js +76 -0
- package/packages/contracts/dist/policy.js +93 -0
- package/packages/contracts/dist/run.js +178 -0
- package/packages/contracts/dist/task-issues.js +39 -0
- package/packages/contracts/dist/task.js +185 -0
- package/packages/contracts/dist/watch.js +57 -0
- package/packages/core/dist/action-feedback.js +103 -0
- package/packages/core/dist/actions.js +160 -0
- package/packages/core/dist/agent-loop.js +122 -0
- package/packages/core/dist/artifacts.js +156 -0
- package/packages/core/dist/assertions.js +120 -0
- package/packages/core/dist/autonomous.js +1 -0
- package/packages/core/dist/browser.js +196 -0
- package/packages/core/dist/compare.js +141 -0
- package/packages/core/dist/control-state.js +62 -0
- package/packages/core/dist/diagnostics.js +134 -0
- package/packages/core/dist/evidence-diff.js +93 -0
- package/packages/core/dist/evidence.js +203 -0
- package/packages/core/dist/index.js +22 -0
- package/packages/core/dist/inspect.js +257 -0
- package/packages/core/dist/integrity.js +176 -0
- package/packages/core/dist/liveness.js +114 -0
- package/packages/core/dist/local-files.js +61 -0
- package/packages/core/dist/locators.js +214 -0
- package/packages/core/dist/model-provider.js +88 -0
- package/packages/core/dist/observation.js +257 -0
- package/packages/core/dist/playwright-live.js +519 -0
- package/packages/core/dist/playwright-results.js +543 -0
- package/packages/core/dist/policy.js +182 -0
- package/packages/core/dist/privacy.js +93 -0
- package/packages/core/dist/recovery.js +54 -0
- package/packages/core/dist/retention.js +204 -0
- package/packages/core/dist/run-index.js +177 -0
- package/packages/core/dist/run-plan.js +28 -0
- package/packages/core/dist/run-repository.js +518 -0
- package/packages/core/dist/runner.js +913 -0
- package/packages/core/dist/storage.js +63 -0
- package/packages/core/dist/task-fingerprint.js +36 -0
- package/packages/core/dist/test-change-rerun.js +84 -0
- package/packages/core/dist/test-changes.js +896 -0
- package/packages/core/dist/timing.js +41 -0
- package/packages/core/dist/watch.js +165 -0
- package/packages/server/dist/index.js +265 -0
- package/packages/server/dist/task-store.js +103 -0
- package/quickstart.md +85 -0
- package/security.md +136 -0
- package/try-on-your-repo.md +54 -0
- package/understanding-results.md +159 -0
- package/writing-tasks.md +196 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { OBSERVATION_LIMITS } from "#agentpath/contracts";
|
|
2
|
+
import { inspectControlFacts } from "./control-state.js";
|
|
3
|
+
import { RunFailure } from "./diagnostics.js";
|
|
4
|
+
const candidateRoles = new Set(["combobox", "listbox", "textbox", "searchbox", "spinbutton", "checkbox", "radio"]);
|
|
5
|
+
const actionableRoles = new Set(["button", "link", "checkbox", "combobox", "listbox", "menuitem",
|
|
6
|
+
"option", "radio", "searchbox", "slider", "spinbutton", "switch", "tab", "textbox"]);
|
|
7
|
+
const property = (node, name) => node.properties?.find((entry) => entry.name === name)?.value?.value;
|
|
8
|
+
const text = (value) => typeof value === "string" ? value : "";
|
|
9
|
+
const attributes = (node) => {
|
|
10
|
+
const map = new Map();
|
|
11
|
+
const list = node.attributes ?? [];
|
|
12
|
+
for (let index = 0; index + 1 < list.length; index += 2)
|
|
13
|
+
map.set(list[index], list[index + 1]);
|
|
14
|
+
return map;
|
|
15
|
+
};
|
|
16
|
+
const textContent = (node) => node.nodeName === "#text" ? node.nodeValue ?? ""
|
|
17
|
+
: (node.children ?? []).map(textContent).join("");
|
|
18
|
+
/**
|
|
19
|
+
* Collects a bounded, control-aware observation. Relationships come from Chromium's accessibility tree and
|
|
20
|
+
* read-only DOM descriptions: a native select's choices are its own option elements, never inferred from
|
|
21
|
+
* nearby text. Custom comboboxes are reported with the click/press affordances they actually support.
|
|
22
|
+
*/
|
|
23
|
+
export async function collectObservation(session, deadline, options) {
|
|
24
|
+
const { nodes } = await deadline.observe(() => session.send("Accessibility.getFullAXTree"));
|
|
25
|
+
const byId = new Map(nodes.map((node) => [node.nodeId, node]));
|
|
26
|
+
const byBackend = new Map(nodes.flatMap((node) => node.backendDOMNodeId === undefined ? [] : [[node.backendDOMNodeId, node]]));
|
|
27
|
+
const skip = new Set();
|
|
28
|
+
const exclude = (node, depth = 0) => {
|
|
29
|
+
if (skip.size > 5000 || depth > 6)
|
|
30
|
+
return;
|
|
31
|
+
skip.add(node.nodeId);
|
|
32
|
+
for (const id of node.childIds ?? []) {
|
|
33
|
+
const child = byId.get(id);
|
|
34
|
+
if (child)
|
|
35
|
+
exclude(child, depth + 1);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const controls = [];
|
|
39
|
+
const refs = new Map();
|
|
40
|
+
let truncated = false;
|
|
41
|
+
let described = 0;
|
|
42
|
+
let staticTextWithheld = options.suppressStaticText;
|
|
43
|
+
const inspect = inspectControlFacts(session, deadline, OBSERVATION_LIMITS.choices);
|
|
44
|
+
for (const node of nodes) {
|
|
45
|
+
const role = text(node.role?.value);
|
|
46
|
+
if (node.ignored || skip.has(node.nodeId) || !candidateRoles.has(role) || node.backendDOMNodeId === undefined)
|
|
47
|
+
continue;
|
|
48
|
+
if (controls.length >= OBSERVATION_LIMITS.controls || described >= OBSERVATION_LIMITS.controls * 2) {
|
|
49
|
+
truncated = true;
|
|
50
|
+
staticTextWithheld = true;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
described++;
|
|
54
|
+
const facts = await inspect(node.backendDOMNodeId);
|
|
55
|
+
if (!facts) {
|
|
56
|
+
truncated = true;
|
|
57
|
+
staticTextWithheld = true;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
staticTextWithheld ||= facts.omitStaticText === true;
|
|
61
|
+
const native = facts.nativeSelect === true;
|
|
62
|
+
const kind = native ? "native-select"
|
|
63
|
+
: role === "combobox" ? "custom-combobox"
|
|
64
|
+
: facts.checkable ? "checkable" : facts.textInput ? "text-input" : undefined;
|
|
65
|
+
// A custom listbox and its options remain ordinary click targets in the flat list.
|
|
66
|
+
const locatorName = text(node.name?.value).trim();
|
|
67
|
+
if (!kind || !locatorName || locatorName.length > 512)
|
|
68
|
+
continue;
|
|
69
|
+
const enabled = property(node, "disabled") !== true;
|
|
70
|
+
const readonly = property(node, "readonly") === true;
|
|
71
|
+
const supports = !enabled ? [] : kind === "native-select" ? ["select"]
|
|
72
|
+
: kind === "custom-combobox" || kind === "checkable" ? ["click", "press"] : readonly ? [] : ["fill", "press"];
|
|
73
|
+
const ref = options.nextRef();
|
|
74
|
+
const control = {
|
|
75
|
+
ref, role, name: options.redact(locatorName).slice(0, OBSERVATION_LIMITS.controlNameLength), kind, enabled, supports,
|
|
76
|
+
...(kind === "custom-combobox" && typeof property(node, "expanded") === "boolean" ? { expanded: property(node, "expanded") } : {}),
|
|
77
|
+
...(facts.multiple ? { multiple: true } : {}),
|
|
78
|
+
...(facts.hasValue === undefined ? {} : { hasValue: facts.hasValue }),
|
|
79
|
+
...(facts.hasValue !== undefined && options.agentChanged.has(node.backendDOMNodeId) ? { wasChangedByAgent: true } : {}),
|
|
80
|
+
...(facts.isChecked === undefined ? {} : { isChecked: facts.isChecked }),
|
|
81
|
+
};
|
|
82
|
+
const binding = { ...control, backendNodeId: node.backendDOMNodeId, locatorName, choices: [], choicesComplete: true };
|
|
83
|
+
if (native) {
|
|
84
|
+
let dom;
|
|
85
|
+
try {
|
|
86
|
+
dom = (await deadline.observe(() => session.send("DOM.describeNode", { backendNodeId: node.backendDOMNodeId, depth: 3 }))).node;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
truncated = true;
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const all = [];
|
|
93
|
+
for (const child of dom.children ?? []) {
|
|
94
|
+
const entries = child.nodeName === "OPTGROUP" ? (child.children ?? []).map((option) => [option, attributes(child).get("label")])
|
|
95
|
+
: [[child, undefined]];
|
|
96
|
+
for (const [option, group] of entries) {
|
|
97
|
+
if (option.nodeName !== "OPTION")
|
|
98
|
+
continue;
|
|
99
|
+
const optionAttrs = attributes(option);
|
|
100
|
+
const ax = byBackend.get(option.backendNodeId);
|
|
101
|
+
const label = text(ax?.name?.value) || optionAttrs.get("label") || textContent(option).replace(/\s+/g, " ").trim();
|
|
102
|
+
all.push({
|
|
103
|
+
label, value: optionAttrs.get("value") ?? label, group,
|
|
104
|
+
disabled: facts.disabledOptions?.[all.length] ?? (ax ? property(ax, "disabled") === true : optionAttrs.has("disabled")),
|
|
105
|
+
selected: facts.selected?.[all.length] ?? (ax ? property(ax, "selected") === true : false),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const shown = all.slice(0, OBSERVATION_LIMITS.choices);
|
|
110
|
+
control.choices = shown.map((choice) => {
|
|
111
|
+
const label = options.redact(choice.label).slice(0, OBSERVATION_LIMITS.choiceLength);
|
|
112
|
+
const value = options.redact(choice.value);
|
|
113
|
+
return {
|
|
114
|
+
label,
|
|
115
|
+
...(choice.value !== choice.label && value.length <= OBSERVATION_LIMITS.choiceLength ? { value } : {}),
|
|
116
|
+
...(choice.group ? { group: options.redact(choice.group).slice(0, OBSERVATION_LIMITS.choiceLength) } : {}),
|
|
117
|
+
...(choice.selected ? { selected: true } : {}),
|
|
118
|
+
...(choice.disabled ? { disabled: true } : {}),
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
if (all.length > shown.length)
|
|
122
|
+
control.choiceCount = all.length;
|
|
123
|
+
binding.choices = shown.map(({ label, value, disabled }) => ({ label, value, disabled }));
|
|
124
|
+
binding.choicesComplete = all.length === shown.length;
|
|
125
|
+
binding.selectedOptions = facts.selected?.slice(0, shown.length);
|
|
126
|
+
}
|
|
127
|
+
controls.push(control);
|
|
128
|
+
refs.set(ref, binding);
|
|
129
|
+
exclude(node);
|
|
130
|
+
}
|
|
131
|
+
const hidden = new Set(["InlineTextBox", "generic", ...(staticTextWithheld ? ["StaticText"] : [])]);
|
|
132
|
+
const flat = nodes.filter((node) => !node.ignored && !skip.has(node.nodeId) && node.role?.value && !hidden.has(text(node.role.value)));
|
|
133
|
+
if (flat.length > OBSERVATION_LIMITS.nodes)
|
|
134
|
+
truncated = true;
|
|
135
|
+
const label = (node) => ({
|
|
136
|
+
role: text(node.role?.value).slice(0, 100),
|
|
137
|
+
name: staticTextWithheld && ["status", "alert", "paragraph"].includes(text(node.role?.value))
|
|
138
|
+
? "" : options.redact(text(node.name?.value)).slice(0, OBSERVATION_LIMITS.nameLength),
|
|
139
|
+
});
|
|
140
|
+
const observation = {
|
|
141
|
+
url: options.url,
|
|
142
|
+
accessibility: flat.slice(0, OBSERVATION_LIMITS.nodes).map(label),
|
|
143
|
+
...(controls.length ? { controls } : {}),
|
|
144
|
+
};
|
|
145
|
+
// Bound the whole observation so the decision request fits the model's context window. Trim in a fixed order:
|
|
146
|
+
// flat nodes down to a floor, then long choice lists, then the remaining flat nodes, then trailing controls.
|
|
147
|
+
const size = () => Buffer.byteLength(JSON.stringify(observation));
|
|
148
|
+
const over = () => size() > OBSERVATION_LIMITS.bytes - 1024; // Reserve room for the bounded post-action feedback.
|
|
149
|
+
const trimNodes = (floor) => {
|
|
150
|
+
while (over() && observation.accessibility.length > floor) {
|
|
151
|
+
observation.accessibility = observation.accessibility.slice(0, Math.max(floor, observation.accessibility.length - 10));
|
|
152
|
+
truncated = true;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
trimNodes(50);
|
|
156
|
+
for (const control of observation.controls ?? []) {
|
|
157
|
+
if (!over())
|
|
158
|
+
break;
|
|
159
|
+
if (control.choices && control.choices.length > 5) {
|
|
160
|
+
control.choiceCount ??= control.choices.length;
|
|
161
|
+
control.choices = control.choices.slice(0, 5);
|
|
162
|
+
const binding = refs.get(control.ref);
|
|
163
|
+
binding.choices = binding.choices.slice(0, 5);
|
|
164
|
+
binding.selectedOptions = binding.selectedOptions?.slice(0, 5);
|
|
165
|
+
binding.choicesComplete = false;
|
|
166
|
+
truncated = true;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
trimNodes(0);
|
|
170
|
+
while (over() && observation.controls?.length) {
|
|
171
|
+
// A dropped control's reference is withdrawn too, so it can never be used without being observed.
|
|
172
|
+
refs.delete(observation.controls.pop().ref);
|
|
173
|
+
truncated = true;
|
|
174
|
+
}
|
|
175
|
+
if (observation.controls && !observation.controls.length)
|
|
176
|
+
delete observation.controls;
|
|
177
|
+
if (truncated)
|
|
178
|
+
observation.truncated = true;
|
|
179
|
+
const visible = flat.slice(0, observation.accessibility.length);
|
|
180
|
+
const targets = [...refs.values()].map((control) => ({
|
|
181
|
+
id: control.backendNodeId, role: control.role, name: control.name, locatorName: control.locatorName, enabled: control.enabled,
|
|
182
|
+
}));
|
|
183
|
+
for (const [index, node] of visible.entries()) {
|
|
184
|
+
const safe = observation.accessibility[index];
|
|
185
|
+
const locatorName = text(node.name?.value).trim();
|
|
186
|
+
if (node.backendDOMNodeId !== undefined && actionableRoles.has(safe.role) && locatorName && locatorName.length <= 512) {
|
|
187
|
+
targets.push({ id: node.backendDOMNodeId, ...safe, locatorName, enabled: property(node, "disabled") !== true });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const statuses = new Map();
|
|
191
|
+
let statusesLimited = false;
|
|
192
|
+
for (const node of visible) {
|
|
193
|
+
if (!["status", "alert"].includes(text(node.role?.value)) || node.backendDOMNodeId === undefined)
|
|
194
|
+
continue;
|
|
195
|
+
if (statuses.size >= OBSERVATION_LIMITS.feedbackStatuses) {
|
|
196
|
+
statusesLimited = true;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
const queue = [node];
|
|
200
|
+
const pieces = [];
|
|
201
|
+
let complete = !staticTextWithheld;
|
|
202
|
+
for (let index = 0; complete && index < queue.length; index++) {
|
|
203
|
+
const child = queue[index];
|
|
204
|
+
if (!child.ignored && child.role?.value === "StaticText")
|
|
205
|
+
pieces.push(label(child).name);
|
|
206
|
+
const ids = (child.childIds ?? []).filter((id) => byId.get(id)?.role?.value !== "InlineTextBox");
|
|
207
|
+
if (ids.length + queue.length > 24) {
|
|
208
|
+
complete = false;
|
|
209
|
+
statusesLimited = true;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
for (const id of ids) {
|
|
213
|
+
const descendant = byId.get(id);
|
|
214
|
+
if (descendant)
|
|
215
|
+
queue.push(descendant);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const message = pieces.join(" ").replace(/\s+/g, " ").trim();
|
|
219
|
+
if (message.length >= OBSERVATION_LIMITS.nameLength) {
|
|
220
|
+
complete = false;
|
|
221
|
+
statusesLimited = true;
|
|
222
|
+
}
|
|
223
|
+
statuses.set(node.backendDOMNodeId, {
|
|
224
|
+
...label(node), ...(complete ? { text: message } : {}),
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
return { observation, refs, targets, statuses, statusesLimited, staticTextWithheld, navigation: options.navigation };
|
|
228
|
+
}
|
|
229
|
+
export function staleReference(ref, state = "node-changed") {
|
|
230
|
+
const observed = state === "never-issued"
|
|
231
|
+
? `The latest observation listed no control with reference ${ref}. That reference was never issued.`
|
|
232
|
+
: state === "expired" ? `Control reference ${ref} was issued for an earlier observation and has expired.`
|
|
233
|
+
: "The referenced control is no longer present with the observed role and name.";
|
|
234
|
+
return new RunFailure({
|
|
235
|
+
category: "TARGET_STALE",
|
|
236
|
+
expected: `Control reference ${ref} identifies a control listed in the latest observation.`,
|
|
237
|
+
observed,
|
|
238
|
+
investigation: "Use a reference from the current observation or an exact semantic target.",
|
|
239
|
+
observation: { errorKind: "stale_reference", referenceState: state },
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/** Confirms the observed AX node, excluding detached, hidden or renamed nodes. */
|
|
243
|
+
export async function confirmTarget(session, target, deadline) {
|
|
244
|
+
const { nodes } = await deadline.observe(() => session.send("Accessibility.getPartialAXTree", {
|
|
245
|
+
backendNodeId: target.id, fetchRelatives: false,
|
|
246
|
+
}));
|
|
247
|
+
const node = nodes.find((entry) => entry.backendDOMNodeId === target.id);
|
|
248
|
+
if (!node || node.ignored || text(node.role?.value) !== target.role || text(node.name?.value).trim() !== target.locatorName)
|
|
249
|
+
return undefined;
|
|
250
|
+
return property(node, "disabled") !== true;
|
|
251
|
+
}
|
|
252
|
+
export async function confirmControl(session, binding, deadline) {
|
|
253
|
+
const enabled = await confirmTarget(session, { ...binding, id: binding.backendNodeId }, deadline).catch(() => undefined);
|
|
254
|
+
if (enabled === undefined)
|
|
255
|
+
throw staleReference(binding.ref);
|
|
256
|
+
return enabled;
|
|
257
|
+
}
|