@nuanu-ai/agentbrowse 0.2.21 → 0.2.22

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.
Files changed (90) hide show
  1. package/README.md +42 -9
  2. package/dist/commands/act.d.ts.map +1 -1
  3. package/dist/commands/act.js +100 -73
  4. package/dist/commands/action-acceptance.d.ts +4 -1
  5. package/dist/commands/action-acceptance.d.ts.map +1 -1
  6. package/dist/commands/action-acceptance.js +127 -37
  7. package/dist/commands/action-executor-helpers.d.ts.map +1 -1
  8. package/dist/commands/action-executor-helpers.js +12 -4
  9. package/dist/commands/action-fallbacks.d.ts.map +1 -1
  10. package/dist/commands/action-result-resolution.d.ts.map +1 -1
  11. package/dist/commands/action-result-resolution.js +1 -1
  12. package/dist/commands/action-value-projection.d.ts.map +1 -1
  13. package/dist/commands/datepicker-action-executor.d.ts.map +1 -1
  14. package/dist/commands/datepicker-action-executor.js +1 -1
  15. package/dist/commands/descriptor-validation.d.ts.map +1 -1
  16. package/dist/commands/descriptor-validation.js +13 -172
  17. package/dist/commands/extract-scoped-dialog-text.d.ts.map +1 -1
  18. package/dist/commands/extract-scoped-dialog-text.js +1 -4
  19. package/dist/commands/extract-snapshot-sanitizer.d.ts.map +1 -1
  20. package/dist/commands/extract-stagehand-executor.d.ts.map +1 -1
  21. package/dist/commands/extract.d.ts.map +1 -1
  22. package/dist/commands/extract.js +23 -4
  23. package/dist/commands/observe-accessibility.d.ts +22 -0
  24. package/dist/commands/observe-accessibility.d.ts.map +1 -0
  25. package/dist/commands/observe-accessibility.js +497 -0
  26. package/dist/commands/observe-display-label.d.ts +4 -0
  27. package/dist/commands/observe-display-label.d.ts.map +1 -0
  28. package/dist/commands/observe-display-label.js +26 -0
  29. package/dist/commands/observe-dom-label-contract.d.ts +2 -0
  30. package/dist/commands/observe-dom-label-contract.d.ts.map +1 -0
  31. package/dist/commands/observe-dom-label-contract.js +521 -0
  32. package/dist/commands/observe-fallback-semantics.d.ts +6 -0
  33. package/dist/commands/observe-fallback-semantics.d.ts.map +1 -0
  34. package/dist/commands/observe-fallback-semantics.js +86 -0
  35. package/dist/commands/observe-inventory.d.ts +23 -18
  36. package/dist/commands/observe-inventory.d.ts.map +1 -1
  37. package/dist/commands/observe-inventory.js +172 -719
  38. package/dist/commands/observe-label-policy.d.ts +8 -0
  39. package/dist/commands/observe-label-policy.d.ts.map +1 -0
  40. package/dist/commands/observe-label-policy.js +21 -0
  41. package/dist/commands/observe-page-state.d.ts +1 -1
  42. package/dist/commands/observe-page-state.d.ts.map +1 -1
  43. package/dist/commands/observe-persistence.d.ts.map +1 -1
  44. package/dist/commands/observe-persistence.js +10 -3
  45. package/dist/commands/observe-projection.d.ts +2 -1
  46. package/dist/commands/observe-projection.d.ts.map +1 -1
  47. package/dist/commands/observe-projection.js +5 -2
  48. package/dist/commands/observe-semantics.d.ts.map +1 -1
  49. package/dist/commands/observe-semantics.js +18 -1
  50. package/dist/commands/observe-signals.d.ts +48 -0
  51. package/dist/commands/observe-signals.d.ts.map +1 -0
  52. package/dist/commands/observe-signals.js +461 -0
  53. package/dist/commands/observe-stagehand.d.ts.map +1 -1
  54. package/dist/commands/observe-stagehand.js +5 -18
  55. package/dist/commands/observe-surfaces.d.ts.map +1 -1
  56. package/dist/commands/observe-surfaces.js +5 -4
  57. package/dist/commands/observe.d.ts +0 -6
  58. package/dist/commands/observe.d.ts.map +1 -1
  59. package/dist/commands/observe.js +30 -6
  60. package/dist/commands/observe.test-harness.d.ts +0 -6
  61. package/dist/commands/observe.test-harness.d.ts.map +1 -1
  62. package/dist/commands/screenshot.d.ts.map +1 -1
  63. package/dist/commands/select-action-executor.d.ts.map +1 -1
  64. package/dist/commands/select-action-executor.js +1 -1
  65. package/dist/commands/semantic-observe.d.ts.map +1 -1
  66. package/dist/commands/semantic-observe.js +1 -4
  67. package/dist/commands/status.d.ts.map +1 -1
  68. package/dist/commands/text-input-action-executor.d.ts.map +1 -1
  69. package/dist/commands/text-input-action-executor.js +1 -1
  70. package/dist/control-semantics.d.ts.map +1 -1
  71. package/dist/control-semantics.js +2 -6
  72. package/dist/playwright-runtime.d.ts.map +1 -1
  73. package/dist/playwright-runtime.js +3 -4
  74. package/dist/runtime-state.d.ts +3 -0
  75. package/dist/runtime-state.d.ts.map +1 -1
  76. package/dist/runtime-state.js +3 -0
  77. package/dist/secrets/catalog-applicability.d.ts.map +1 -1
  78. package/dist/secrets/form-matcher.d.ts.map +1 -1
  79. package/dist/secrets/form-matcher.js +2 -1
  80. package/dist/secrets/mock-agentpay-backend.d.ts +1 -1
  81. package/dist/secrets/mock-agentpay-backend.d.ts.map +1 -1
  82. package/dist/secrets/mock-agentpay-backend.js +2 -4
  83. package/dist/secrets/mock-agentpay-cabinet.d.ts.map +1 -1
  84. package/dist/secrets/mock-agentpay-cabinet.js +6 -1
  85. package/dist/secrets/protected-field-values.d.ts.map +1 -1
  86. package/dist/secrets/protected-field-values.js +1 -1
  87. package/dist/secrets/protected-fill.d.ts.map +1 -1
  88. package/dist/secrets/protected-fill.js +16 -4
  89. package/dist/solver/captcha-detector.d.ts.map +1 -1
  90. package/package.json +3 -3
@@ -0,0 +1,461 @@
1
+ import { readFrameHostDescriptor } from './observe-inventory.js';
2
+ const DOM_SIGNAL_COLLECTION_LIMIT = 24;
3
+ function normalizeObservedSignalTextValue(value) {
4
+ return (value ?? '').replace(/\s+/g, ' ').trim();
5
+ }
6
+ export function inferObservedSignalKindFromFacts(facts) {
7
+ const role = (facts.role ?? '').trim().toLowerCase();
8
+ const ariaLive = (facts.ariaLive ?? '').trim().toLowerCase();
9
+ const classBlob = (facts.classBlob ?? '').toLowerCase();
10
+ if (role === 'dialog' || facts.ariaModal === true) {
11
+ return 'dialog';
12
+ }
13
+ if (role === 'alert' || ariaLive === 'assertive') {
14
+ return 'alert';
15
+ }
16
+ if (role === 'status' ||
17
+ ariaLive === 'polite' ||
18
+ facts.ariaBusy === true ||
19
+ facts.progressLike === true) {
20
+ return 'status';
21
+ }
22
+ if (/toast|snackbar|banner|notice|warning|error|success/.test(classBlob)) {
23
+ return 'notice';
24
+ }
25
+ return 'notice';
26
+ }
27
+ export function isObservedSignalOutcomeText(text) {
28
+ const normalized = normalizeObservedSignalTextValue(text);
29
+ return (normalized.length > 0 &&
30
+ /(?:thanks|thank you|success(?:ful|fully)?|receipt|order\s+(?:confirmed|complete(?:d)?|successful)|payment\s+(?:successful|complete(?:d)?|confirmed)|purchase\s+(?:complete(?:d)?|successful)|declin(?:e|ed)|fail(?:ed|ure)|error|unable|try again|verification|verify|challenge|captcha|processing|pending|approved|denied)/i.test(normalized));
31
+ }
32
+ export function shouldUseObservedDecoratedNoticeSurface(facts) {
33
+ if (facts.hasVisibleInteractiveDescendant === true) {
34
+ return false;
35
+ }
36
+ if ((facts.directSemanticTextCount ?? 0) > 0) {
37
+ return false;
38
+ }
39
+ return true;
40
+ }
41
+ export function shouldUseStandaloneOutcomeCandidate(facts) {
42
+ const normalized = normalizeObservedSignalTextValue(facts.text);
43
+ const maxLength = Math.max(24, facts.maxLength ?? 160);
44
+ if (!normalized || normalized.length < 12 || normalized.length > maxLength) {
45
+ return false;
46
+ }
47
+ if (!isObservedSignalOutcomeText(normalized)) {
48
+ return false;
49
+ }
50
+ if (facts.withinKnownSignalSurface === true) {
51
+ return false;
52
+ }
53
+ if (facts.hasVisibleInteractiveDescendant === true) {
54
+ return false;
55
+ }
56
+ if (facts.hasNestedOutcomeCandidate === true) {
57
+ return false;
58
+ }
59
+ return true;
60
+ }
61
+ const OBSERVE_SIGNAL_HELPER_SCRIPT = `
62
+ const normalizeObservedSignalTextValue = ${normalizeObservedSignalTextValue.toString()};
63
+ const inferObservedSignalKindFromFacts = ${inferObservedSignalKindFromFacts.toString()};
64
+ const isObservedSignalOutcomeText = ${isObservedSignalOutcomeText.toString()};
65
+ const shouldUseObservedDecoratedNoticeSurface = ${shouldUseObservedDecoratedNoticeSurface.toString()};
66
+ const shouldUseStandaloneOutcomeCandidate = ${shouldUseStandaloneOutcomeCandidate.toString()};
67
+ `;
68
+ function normalizeInheritedFramePath(framePath) {
69
+ return Array.isArray(framePath) && framePath.length > 0 ? [...framePath] : undefined;
70
+ }
71
+ function normalizeInheritedFrameUrl(frameUrl) {
72
+ return typeof frameUrl === 'string' && frameUrl.trim().length > 0 ? frameUrl : undefined;
73
+ }
74
+ function applyInheritedSignalMetadata(signal, options) {
75
+ const normalizedFramePath = normalizeInheritedFramePath(options?.framePath) ??
76
+ normalizeInheritedFramePath(signal.framePath);
77
+ const normalizedFrameUrl = normalizeInheritedFrameUrl(options?.frameUrl) ?? signal.frameUrl;
78
+ return {
79
+ ...signal,
80
+ framePath: normalizedFramePath,
81
+ frameUrl: normalizedFrameUrl,
82
+ };
83
+ }
84
+ async function collectPageSignalsFromDocument(context, options) {
85
+ const inheritedFramePath = JSON.stringify(options?.framePath ?? []);
86
+ const inheritedFrameUrl = JSON.stringify(options?.frameUrl ?? '');
87
+ const observedSignals = await context.evaluate(String.raw `(() => {
88
+ const inheritedFramePath = ${inheritedFramePath};
89
+ const inheritedFrameUrl = ${inheritedFrameUrl};
90
+ const limit = ${DOM_SIGNAL_COLLECTION_LIMIT};
91
+ ${OBSERVE_SIGNAL_HELPER_SCRIPT}
92
+ const interactiveSelector =
93
+ 'button, a[href], input:not([type="hidden"]), textarea, select, [role="button"], [role="link"], [role="textbox"], [role="combobox"], [role="option"], [role="gridcell"], [contenteditable="true"], [tabindex]:not([tabindex="-1"])';
94
+ const semanticSurfaceSelector = [
95
+ '[role="alert"]',
96
+ '[role="status"]',
97
+ '[aria-live="assertive"]',
98
+ '[aria-live="polite"]',
99
+ '[role="dialog"]',
100
+ '[aria-modal="true"]',
101
+ '[aria-busy="true"]',
102
+ '[role="progressbar"]',
103
+ ].join(', ');
104
+ const decoratedNoticeSelector = [
105
+ '[class*="toast"]',
106
+ '[class*="snackbar"]',
107
+ '[class*="banner"]',
108
+ '[class*="notice"]',
109
+ '[class*="success"]',
110
+ '[class*="error"]',
111
+ '[class*="warning"]',
112
+ '[data-testid*="toast"]',
113
+ '[data-testid*="banner"]',
114
+ '[data-testid*="alert"]',
115
+ '[data-testid*="success"]',
116
+ '[data-testid*="error"]',
117
+ ].join(', ');
118
+ const directSemanticTextSelector =
119
+ 'h1, h2, h3, h4, h5, h6, [role="heading"], legend, p, [role="alert"], [role="status"]';
120
+ const standaloneOutcomeSelector = 'h1, h2, h3, [role="heading"], p';
121
+
122
+ const normalizeText = (value) => (value ?? '').replace(/\s+/g, ' ').trim();
123
+ const sampleText = (value, maxLength) => {
124
+ const normalized = normalizeText(value);
125
+ if (!normalized) {
126
+ return '';
127
+ }
128
+ if (normalized.length <= maxLength) {
129
+ return normalized;
130
+ }
131
+ return normalized.slice(0, maxLength - 1).trimEnd() + '…';
132
+ };
133
+ const joinUniqueText = (values, maxLength = 240) => {
134
+ const seen = new Set();
135
+ const accepted = [];
136
+ for (const value of values) {
137
+ const normalized = sampleText(value, maxLength);
138
+ if (!normalized) {
139
+ continue;
140
+ }
141
+ const key = normalized.toLowerCase();
142
+ if (seen.has(key)) {
143
+ continue;
144
+ }
145
+ seen.add(key);
146
+ accepted.push(normalized);
147
+ }
148
+ return sampleText(accepted.join(' '), maxLength);
149
+ };
150
+ const visibleTextOf = (element, maxLength = 160) => {
151
+ if (!(element instanceof HTMLElement)) {
152
+ return '';
153
+ }
154
+ const rawInnerText = typeof element.innerText === 'string' ? element.innerText : undefined;
155
+ const preferredText = rawInnerText !== undefined ? rawInnerText : element.textContent || '';
156
+ return sampleText(preferredText, maxLength);
157
+ };
158
+ const isVisible = (element) => {
159
+ if (!(element instanceof HTMLElement)) {
160
+ return false;
161
+ }
162
+ const style = element.ownerDocument?.defaultView?.getComputedStyle(element);
163
+ if (!style || style.display === 'none' || style.visibility === 'hidden') {
164
+ return false;
165
+ }
166
+ const rect = element.getBoundingClientRect();
167
+ return rect.width > 0 && rect.height > 0;
168
+ };
169
+ const relationTextOf = (element, attribute) => {
170
+ if (!(element instanceof HTMLElement)) {
171
+ return '';
172
+ }
173
+ const relation = element.getAttribute(attribute)?.trim();
174
+ if (!relation) {
175
+ return '';
176
+ }
177
+ return sampleText(
178
+ relation
179
+ .split(/\s+/)
180
+ .map((id) => {
181
+ const relatedElement = document.getElementById(id);
182
+ return relatedElement instanceof HTMLElement
183
+ ? relatedElement.innerText || relatedElement.textContent || ''
184
+ : '';
185
+ })
186
+ .join(' '),
187
+ 240
188
+ );
189
+ };
190
+ const hasVisibleInteractiveDescendant = (element) => {
191
+ if (!(element instanceof HTMLElement)) {
192
+ return false;
193
+ }
194
+ return Array.from(element.querySelectorAll(interactiveSelector)).some(
195
+ (candidate) => candidate !== element && candidate instanceof HTMLElement && isVisible(candidate)
196
+ );
197
+ };
198
+ const textOf = (element) => visibleTextOf(element, 160);
199
+ const directSemanticTextsOf = (element) => {
200
+ if (!(element instanceof HTMLElement)) {
201
+ return [];
202
+ }
203
+
204
+ if (element.matches(directSemanticTextSelector)) {
205
+ return [textOf(element)];
206
+ }
207
+
208
+ const directChildren = Array.from(element.children)
209
+ .filter(
210
+ (candidate) =>
211
+ candidate instanceof HTMLElement &&
212
+ candidate.matches(directSemanticTextSelector) &&
213
+ isVisible(candidate)
214
+ )
215
+ .slice(0, 3);
216
+
217
+ return directChildren.map((candidate) => textOf(candidate));
218
+ };
219
+ const nonInteractiveSurfaceTextOf = (element) => {
220
+ if (!(element instanceof HTMLElement)) {
221
+ return '';
222
+ }
223
+
224
+ const clone = element.cloneNode(true);
225
+ if (!(clone instanceof HTMLElement)) {
226
+ return '';
227
+ }
228
+
229
+ for (const nested of Array.from(
230
+ clone.querySelectorAll(
231
+ [
232
+ interactiveSelector,
233
+ semanticSurfaceSelector,
234
+ decoratedNoticeSelector,
235
+ '[hidden]',
236
+ '[aria-hidden="true"]',
237
+ ].join(', ')
238
+ )
239
+ )) {
240
+ if (nested instanceof HTMLElement) {
241
+ nested.remove();
242
+ }
243
+ }
244
+
245
+ return visibleTextOf(clone, 160);
246
+ };
247
+ const signalTextOf = (element) => {
248
+ if (!(element instanceof HTMLElement)) {
249
+ return '';
250
+ }
251
+
252
+ return (
253
+ joinUniqueText(
254
+ [
255
+ element.getAttribute('aria-label'),
256
+ relationTextOf(element, 'aria-labelledby'),
257
+ element.getAttribute('title'),
258
+ relationTextOf(element, 'aria-describedby'),
259
+ ...directSemanticTextsOf(element),
260
+ nonInteractiveSurfaceTextOf(element),
261
+ ],
262
+ 240
263
+ ) || ''
264
+ );
265
+ };
266
+ const isKnownDecoratedNoticeSurface = (element) => {
267
+ if (!(element instanceof HTMLElement) || !element.matches(decoratedNoticeSelector) || !isVisible(element)) {
268
+ return false;
269
+ }
270
+ return shouldUseObservedDecoratedNoticeSurface({
271
+ hasVisibleInteractiveDescendant: hasVisibleInteractiveDescendant(element),
272
+ directSemanticTextCount: directSemanticTextsOf(element).length,
273
+ });
274
+ };
275
+ const isWithinKnownSignalSurface = (element) => {
276
+ if (!(element instanceof HTMLElement)) {
277
+ return false;
278
+ }
279
+ let current = element.parentElement;
280
+ while (current instanceof HTMLElement) {
281
+ if (current.matches(semanticSurfaceSelector) && isVisible(current)) {
282
+ return true;
283
+ }
284
+ if (isKnownDecoratedNoticeSurface(current)) {
285
+ return true;
286
+ }
287
+ current = current.parentElement;
288
+ }
289
+ return false;
290
+ };
291
+
292
+ const seen = new Set();
293
+ const signals = [];
294
+ const pushSignal = (kind, text) => {
295
+ const normalized = sampleText(text, 240);
296
+ if (!normalized) {
297
+ return;
298
+ }
299
+ const key = kind + '|' + normalized.toLowerCase();
300
+ if (seen.has(key)) {
301
+ return;
302
+ }
303
+ seen.add(key);
304
+ signals.push({
305
+ kind,
306
+ text: normalized,
307
+ framePath: inheritedFramePath.length > 0 ? inheritedFramePath : undefined,
308
+ frameUrl: inheritedFrameUrl || undefined,
309
+ source: 'dom',
310
+ });
311
+ if (signals.length > limit) {
312
+ signals.length = limit;
313
+ }
314
+ };
315
+
316
+ for (const element of Array.from(document.querySelectorAll(semanticSurfaceSelector))) {
317
+ if (!(element instanceof HTMLElement) || !isVisible(element)) {
318
+ continue;
319
+ }
320
+ const text = signalTextOf(element);
321
+ if (!text) {
322
+ continue;
323
+ }
324
+ const classBlob =
325
+ ((element.getAttribute('class') || '') + ' ' + Object.values(element.dataset || {}).join(' ')).toLowerCase();
326
+ pushSignal(
327
+ inferObservedSignalKindFromFacts({
328
+ role: element.getAttribute('role') || undefined,
329
+ ariaLive: element.getAttribute('aria-live') || undefined,
330
+ ariaModal: element.getAttribute('aria-modal') === 'true',
331
+ ariaBusy: element.hasAttribute('aria-busy'),
332
+ progressLike: element.matches('[role="progressbar"]'),
333
+ classBlob,
334
+ }),
335
+ text
336
+ );
337
+ if (signals.length >= limit) {
338
+ return signals;
339
+ }
340
+ }
341
+
342
+ for (const element of Array.from(document.querySelectorAll(decoratedNoticeSelector))) {
343
+ if (!(element instanceof HTMLElement) || !isVisible(element)) {
344
+ continue;
345
+ }
346
+ if (element.matches(semanticSurfaceSelector)) {
347
+ continue;
348
+ }
349
+ if (
350
+ !shouldUseObservedDecoratedNoticeSurface({
351
+ hasVisibleInteractiveDescendant: hasVisibleInteractiveDescendant(element),
352
+ directSemanticTextCount: directSemanticTextsOf(element).length,
353
+ })
354
+ ) {
355
+ continue;
356
+ }
357
+ const text = signalTextOf(element);
358
+ if (!text) {
359
+ continue;
360
+ }
361
+ pushSignal('notice', text);
362
+ if (signals.length >= limit) {
363
+ break;
364
+ }
365
+ }
366
+
367
+ for (const element of Array.from(document.querySelectorAll(standaloneOutcomeSelector))) {
368
+ if (!(element instanceof HTMLElement) || !isVisible(element)) {
369
+ continue;
370
+ }
371
+ const text = signalTextOf(element);
372
+ if (
373
+ !shouldUseStandaloneOutcomeCandidate({
374
+ text,
375
+ withinKnownSignalSurface: isWithinKnownSignalSurface(element),
376
+ hasVisibleInteractiveDescendant: hasVisibleInteractiveDescendant(element),
377
+ hasNestedOutcomeCandidate: false,
378
+ maxLength: 160,
379
+ })
380
+ ) {
381
+ continue;
382
+ }
383
+ pushSignal('notice', text);
384
+ if (signals.length >= limit) {
385
+ break;
386
+ }
387
+ }
388
+
389
+ return signals;
390
+ })()`);
391
+ if (!Array.isArray(observedSignals)) {
392
+ return [];
393
+ }
394
+ return observedSignals
395
+ .filter((signal) => Boolean(signal &&
396
+ typeof signal === 'object' &&
397
+ typeof signal.kind === 'string' &&
398
+ typeof signal.text === 'string' &&
399
+ signal.text.length > 0))
400
+ .map((signal) => applyInheritedSignalMetadata(signal, {
401
+ framePath: options?.framePath,
402
+ frameUrl: options?.frameUrl,
403
+ }));
404
+ }
405
+ export async function collectPageSignals(page) {
406
+ if (typeof page.mainFrame !== 'function') {
407
+ return collectPageSignalsFromDocument(page);
408
+ }
409
+ const collected = [];
410
+ const seen = new Set();
411
+ const pushSignals = (signals) => {
412
+ for (const signal of signals) {
413
+ const key = [
414
+ signal.kind,
415
+ signal.text.toLowerCase(),
416
+ signal.framePath?.join('>') ?? 'top',
417
+ ].join('|');
418
+ if (seen.has(key)) {
419
+ continue;
420
+ }
421
+ seen.add(key);
422
+ collected.push(signal);
423
+ if (collected.length >= DOM_SIGNAL_COLLECTION_LIMIT) {
424
+ break;
425
+ }
426
+ }
427
+ };
428
+ const walk = async (frame, framePath) => {
429
+ if (collected.length >= DOM_SIGNAL_COLLECTION_LIMIT) {
430
+ return;
431
+ }
432
+ const frameUrl = frame.url().trim() || undefined;
433
+ const signals = await collectPageSignalsFromDocument(frame, {
434
+ framePath,
435
+ frameUrl,
436
+ }).catch(() => []);
437
+ pushSignals(signals);
438
+ if (collected.length >= DOM_SIGNAL_COLLECTION_LIMIT) {
439
+ return;
440
+ }
441
+ for (const childFrame of frame.childFrames().slice(0, 20)) {
442
+ if (collected.length >= DOM_SIGNAL_COLLECTION_LIMIT) {
443
+ break;
444
+ }
445
+ const frameHost = await readFrameHostDescriptor(childFrame);
446
+ if (!frameHost?.selector || !frameHost.userVisible) {
447
+ continue;
448
+ }
449
+ await walk(childFrame, [...(framePath ?? []), frameHost.selector]);
450
+ }
451
+ };
452
+ await walk(page.mainFrame());
453
+ return collected;
454
+ }
455
+ export const __testObserveSignals = {
456
+ collectPageSignalsFromDocument,
457
+ inferObservedSignalKindFromFacts,
458
+ isObservedSignalOutcomeText,
459
+ shouldUseObservedDecoratedNoticeSurface,
460
+ shouldUseStandaloneOutcomeCandidate,
461
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"observe-stagehand.d.ts","sourceRoot":"","sources":["../../src/commands/observe-stagehand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAElG,KAAK,sBAAsB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB,CAAC;AAgBF,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,IAAI,EACV,aAAa,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FvB;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC"}
1
+ {"version":3,"file":"observe-stagehand.d.ts","sourceRoot":"","sources":["../../src/commands/observe-stagehand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAS5C,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAElG,KAAK,sBAAsB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,IAAI,EACV,aAAa,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FvB;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC"}
@@ -1,18 +1,7 @@
1
1
  import { inferAcceptancePolicyFromFacts, inferAllowedActionsFromFacts, inferAvailabilityFromFacts, inferControlFamilyFromFacts, } from '../control-semantics.js';
2
2
  import { buildLocator, resolveLocatorRoot } from './action-fallbacks.js';
3
+ import { buildObserveDisplayLabel, normalizeObserveLiveValue } from './observe-display-label.js';
3
4
  import { normalizeStagehandSelector, readStagehandLocatorSnapshot } from './observe-inventory.js';
4
- function normalizeStagehandLiveValue(value) {
5
- const normalized = value?.replace(/\s+/g, ' ').trim();
6
- if (!normalized || normalized.length > 80) {
7
- return undefined;
8
- }
9
- return normalized;
10
- }
11
- function stagehandLabelIncludesValue(label, value) {
12
- const normalizedLabel = label.replace(/\s+/g, ' ').trim().toLowerCase();
13
- const normalizedValue = value.replace(/\s+/g, ' ').trim().toLowerCase();
14
- return Boolean(normalizedValue) && normalizedLabel.includes(normalizedValue);
15
- }
16
5
  export async function toStagehandDescriptor(pageRef, action, page, pageSignature) {
17
6
  const normalizedSelector = normalizeStagehandSelector(typeof action.selector === 'string' ? action.selector.trim() : '');
18
7
  const selector = normalizedSelector.selector;
@@ -54,13 +43,11 @@ export async function toStagehandDescriptor(pageRef, action, page, pageSignature
54
43
  const allowedActions = inferAllowedActionsFromFacts(facts);
55
44
  const acceptancePolicy = inferAcceptancePolicyFromFacts(facts, allowedActions);
56
45
  const controlFamily = inferControlFamilyFromFacts(facts, allowedActions);
57
- const liveValue = normalizeStagehandLiveValue(domFacts?.currentValue) ??
58
- normalizeStagehandLiveValue(domFacts?.value) ??
59
- normalizeStagehandLiveValue(domFacts?.text);
46
+ const liveValue = normalizeObserveLiveValue(domFacts?.currentValue) ??
47
+ normalizeObserveLiveValue(domFacts?.value) ??
48
+ normalizeObserveLiveValue(domFacts?.text);
60
49
  const baseLabel = action.description ?? action.method ?? 'observed target';
61
- const displayLabel = liveValue && !stagehandLabelIncludesValue(baseLabel, liveValue)
62
- ? `${baseLabel} — ${liveValue}`
63
- : undefined;
50
+ const displayLabel = buildObserveDisplayLabel(baseLabel, liveValue);
64
51
  const actionable = !shadowOrUnsupported && locatorCandidates.length > 0 && allowedActions.length > 0;
65
52
  const availability = inferAvailabilityFromFacts(domFacts?.states, undefined, {
66
53
  readonlyInteractive: controlFamily === 'select' ||
@@ -1 +1 @@
1
- {"version":3,"file":"observe-surfaces.d.ts","sourceRoot":"","sources":["../../src/commands/observe-surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAgBhE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACxC,OAAO,EAAE,aAAa,CACpB,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,gBAAgB,GAAG,kBAAkB,CAAC,CAC7E,EACD,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACvC,iBAAiB,EAAE,CA+CrB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAa7E;AAyBD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,CAAC,GACvG,MAAM,GAAG,SAAS,CAiBpB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,GAC7F,MAAM,CAMR;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA4CvF;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,gBAAgB,EAAE,EACvB,SAAS,EAAE,gBAAgB,GAAG,SAAS,GACtC,IAAI,CAON;AAwDD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,oCAoE1C"}
1
+ {"version":3,"file":"observe-surfaces.d.ts","sourceRoot":"","sources":["../../src/commands/observe-surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAgBhE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACxC,OAAO,EAAE,aAAa,CACpB,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,gBAAgB,GAAG,kBAAkB,CAAC,CAC7E,EACD,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACvC,iBAAiB,EAAE,CAiDrB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAa7E;AAyBD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,IAAI,CACV,iBAAiB,EACjB,eAAe,GAAG,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,CACxE,GACA,MAAM,GAAG,SAAS,CAkBpB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,GAC7F,MAAM,CAMR;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA4CvF;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,gBAAgB,EAAE,EACvB,SAAS,EAAE,gBAAgB,GAAG,SAAS,GACtC,IAAI,CAON;AAwDD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,oCAoE1C"}
@@ -90,13 +90,14 @@ export function buildSyntheticFormSurfaceId(target) {
90
90
  if (!pageKey) {
91
91
  return undefined;
92
92
  }
93
- const formKey = normalizeSurfaceText(target.formSelector) ??
94
- semanticFormContextLabel(target)?.toLowerCase();
93
+ const formKey = normalizeSurfaceText(target.formSelector) ?? semanticFormContextLabel(target)?.toLowerCase();
95
94
  if (!formKey) {
96
95
  return undefined;
97
96
  }
98
97
  const frameKey = target.framePath?.join('>') ??
99
- (normalizeSurfaceText(target.frameUrl) ? `url:${normalizeSurfaceText(target.frameUrl)}` : 'top');
98
+ (normalizeSurfaceText(target.frameUrl)
99
+ ? `url:${normalizeSurfaceText(target.frameUrl)}`
100
+ : 'top');
100
101
  return `${pageKey}|${frameKey}|form|${formKey}`;
101
102
  }
102
103
  export function surfaceReplacementKey(surface) {
@@ -219,7 +220,7 @@ export function collectSurfaceDescriptors(pageRef, targets) {
219
220
  kind: existing?.kind ?? target.surfaceKind ?? 'surface',
220
221
  label: existing?.label && existing.label !== 'Active surface'
221
222
  ? existing.label
222
- : target.surfaceLabel ?? target.surfaceKind ?? existing?.label ?? 'Active surface',
223
+ : (target.surfaceLabel ?? target.surfaceKind ?? existing?.label ?? 'Active surface'),
223
224
  lifecycle: 'live',
224
225
  availability: { state: 'available' },
225
226
  locatorCandidates,
@@ -10,12 +10,6 @@ export declare const __testDomTargetCollection: {
10
10
  framePath?: string[];
11
11
  frameUrl?: string;
12
12
  }) => Promise<import("./observe-inventory.js").DomObservedTarget[]>;
13
- collectPageSignalsFromDocument: (context: {
14
- evaluate<T>(pageFunction: string): Promise<T>;
15
- }, options?: {
16
- framePath?: string[];
17
- frameUrl?: string;
18
- }) => Promise<import("./observe-inventory.js").ObservedPageSignal[]>;
19
13
  inferStructuredCellVariantFromEvidence: typeof import("./observe-inventory.js").inferStructuredCellVariantFromEvidence;
20
14
  locatorDomSignatureScript: string;
21
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/commands/observe.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAoDnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAU/D,eAAO,MAAM,yBAAyB;;;;iBA+Ri2G,CAAC;gBAAwB,CAAC;;;;;iBAAg1mF,CAAC;gBAAwB,CAAC;;;;CA/RtstF,CAAC;AACtE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGrC,CAAC;AAEF,wBAAsB,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwRzF"}
1
+ {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/commands/observe.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAqDnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAU/D,eAAO,MAAM,yBAAyB;;;;iBA4TwQ,CAAC;gBAAwB,CAAC;;;;CA5TnQ,CAAC;AACtE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGrC,CAAC;AAEF,wBAAsB,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqTzF"}
@@ -8,7 +8,9 @@ import { outputContractFailure, outputJSON } from '../output.js';
8
8
  import { domRuntimeResolution, stagehandRuntimeResolution } from '../runtime-resolution.js';
9
9
  import { withStagehand } from '../stagehand-runtime.js';
10
10
  import { normalizePageSignature } from './descriptor-validation.js';
11
- import { collectDomTargets, collectPageSignals, __testDomTargetCollection as inventoryDomTargetCollection, __testStagehandDescriptor as inventoryStagehandDescriptor, } from './observe-inventory.js';
11
+ import { collectDomTargets, __testDomTargetCollection as inventoryDomTargetCollection, __testStagehandDescriptor as inventoryStagehandDescriptor, } from './observe-inventory.js';
12
+ import { enrichDomTargetsWithAccessibility } from './observe-accessibility.js';
13
+ import { collectPageSignals } from './observe-signals.js';
12
14
  import { attachObservedTargetOwners, linkObservedSurfaceGraph, reconcileObservedTargetsForPage, persistObservedSurfacesForPage, toDomDescriptor, } from './observe-persistence.js';
13
15
  import { clearProtectedFillableFormsForPage, persistProtectedFillableFormsForPage, } from './observe-protected.js';
14
16
  import { classifyObservePageState, shouldSuppressFillableFormsForObserve, } from './observe-page-state.js';
@@ -34,7 +36,18 @@ export async function observe(session, instruction) {
34
36
  browser = await connectPlaywright(session.cdpUrl);
35
37
  const page = await resolvePageByRef(browser, session, pageRef);
36
38
  const { url, title } = await syncSessionPage(session, pageRef, page);
37
- const domTargets = compressSemanticallyDuplicateTargets(orderBySurfaceCompetition(annotateDomTargets(await collectDomTargets(page))));
39
+ const collectedTargets = await collectDomTargets(page);
40
+ let observeAccessibilityStats;
41
+ const domTargets = compressSemanticallyDuplicateTargets(orderBySurfaceCompetition(annotateDomTargets(await enrichDomTargetsWithAccessibility(page, collectedTargets, {
42
+ onStats: (stats) => {
43
+ observeAccessibilityStats = stats;
44
+ },
45
+ }))));
46
+ if (observeAccessibilityStats) {
47
+ incrementMetric(session, 'observeAxAttempts', observeAccessibilityStats.axAttempts);
48
+ incrementMetric(session, 'observeAxHits', observeAccessibilityStats.axHits);
49
+ incrementMetric(session, 'observeFallbackUses', observeAccessibilityStats.fallbackUses);
50
+ }
38
51
  const signals = compactSignals(await collectPageSignals(page).catch(() => []));
39
52
  const pageState = classifyObservePageState(signals);
40
53
  const persisted = persistObservedSurfacesForPage(session, pageRef, domTargets);
@@ -85,7 +98,20 @@ export async function observe(session, instruction) {
85
98
  }
86
99
  const page = await resolvePageByRef(browser, session, pageRef);
87
100
  const { url, title } = await syncSessionPage(session, pageRef, page);
88
- const domTargets = compressSemanticallyDuplicateTargets(orderBySurfaceCompetition(annotateDomTargets(await collectDomTargets(page, { includeActivationAffordances: true }))));
101
+ const collectedTargets = await collectDomTargets(page, {
102
+ includeActivationAffordances: true,
103
+ });
104
+ let observeAccessibilityStats;
105
+ const domTargets = compressSemanticallyDuplicateTargets(orderBySurfaceCompetition(annotateDomTargets(await enrichDomTargetsWithAccessibility(page, collectedTargets, {
106
+ onStats: (stats) => {
107
+ observeAccessibilityStats = stats;
108
+ },
109
+ }))));
110
+ if (observeAccessibilityStats) {
111
+ incrementMetric(session, 'observeAxAttempts', observeAccessibilityStats.axAttempts);
112
+ incrementMetric(session, 'observeAxHits', observeAccessibilityStats.axHits);
113
+ incrementMetric(session, 'observeFallbackUses', observeAccessibilityStats.fallbackUses);
114
+ }
89
115
  const signals = compactSignals(await collectPageSignals(page).catch(() => []));
90
116
  const pageState = classifyObservePageState(signals);
91
117
  const surfaceInputs = collectSurfaceDescriptors(pageRef, domTargets);
@@ -149,9 +175,7 @@ export async function observe(session, instruction) {
149
175
  });
150
176
  return;
151
177
  }
152
- else {
153
- stagehandFallbackReason = 'deterministic-observe-empty';
154
- }
178
+ stagehandFallbackReason = 'deterministic-observe-empty';
155
179
  }
156
180
  catch (err) {
157
181
  domPassError = err instanceof Error ? err.message : String(err);
@@ -17,12 +17,6 @@ export declare const observe: typeof import("./observe.js").observe, __testDomTa
17
17
  framePath?: string[];
18
18
  frameUrl?: string;
19
19
  }) => Promise<import("./observe-inventory.js").DomObservedTarget[]>;
20
- collectPageSignalsFromDocument: (context: {
21
- evaluate<T>(pageFunction: string): Promise<T>;
22
- }, options?: {
23
- framePath?: string[];
24
- frameUrl?: string;
25
- }) => Promise<import("./observe-inventory.js").ObservedPageSignal[]>;
26
20
  inferStructuredCellVariantFromEvidence: typeof import("./observe-inventory.js").inferStructuredCellVariantFromEvidence;
27
21
  locatorDomSignatureScript: string;
28
22
  }, __testStagehandDescriptor: {
@@ -1 +1 @@
1
- {"version":3,"file":"observe.test-harness.d.ts","sourceRoot":"","sources":["../../src/commands/observe.test-harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AA0EvC,eAAO,MAAM,kBAAkB,EAAE,MAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,EAAE,MAAmC,CAAC;AACvE,eAAO,MAAM,yBAAyB,EAAE,MAAwC,CAAC;AACjF,eAAO,MAAM,eAAe,EAAE,MAA8B,CAAC;AAC7D,eAAO,MAAM,iBAAiB,EAAE,MAAgC,CAAC;AACjE,eAAO,MAAM,cAAc,EAAE,MAA6B,CAAC;AAC3D,eAAO,MAAM,2BAA2B,EAAE,MAA0C,CAAC;AACrF,eAAO,MAAM,eAAe,EAAE,MAA8B,CAAC;AAC7D,eAAO,MAAM,qBAAqB,EAAE,OAAO,EAAgC,CAAC;AA+B5E,eAAO,MAAQ,OAAO,yCAAE,yBAAyB;;;;iBAqE0kT,CAAC;gBAAwB,CAAC;;;;;iBAAg1mF,CAAC;gBAAwB,CAAC;;;;GArE585F,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE3E,CAAC;AACF,eAAO,MAAQ,0BAA0B;;;;;CAA+C,CAAC;AAMzF,wBAAgB,WAAW,IAAI,aAAa,CAW3C;AAYD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,IAAI,EAAE,CAAC,EACP,YAAY,SAAkC,GAC7C,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAM3C;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAyB9C"}
1
+ {"version":3,"file":"observe.test-harness.d.ts","sourceRoot":"","sources":["../../src/commands/observe.test-harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AA0EvC,eAAO,MAAM,kBAAkB,EAAE,MAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,EAAE,MAAmC,CAAC;AACvE,eAAO,MAAM,yBAAyB,EAAE,MAAwC,CAAC;AACjF,eAAO,MAAM,eAAe,EAAE,MAA8B,CAAC;AAC7D,eAAO,MAAM,iBAAiB,EAAE,MAAgC,CAAC;AACjE,eAAO,MAAM,cAAc,EAAE,MAA6B,CAAC;AAC3D,eAAO,MAAM,2BAA2B,EAAE,MAA0C,CAAC;AACrF,eAAO,MAAM,eAAe,EAAE,MAA8B,CAAC;AAC7D,eAAO,MAAM,qBAAqB,EAAE,OAAO,EAAgC,CAAC;AA+B5E,eAAO,MAAQ,OAAO,yCAAE,yBAAyB;;;;iBAqEw7P,CAAC;gBAAwB,CAAC;;;;GArEh9P,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE3E,CAAC;AACF,eAAO,MAAQ,0BAA0B;;;;;CAA+C,CAAC;AAMzF,wBAAgB,WAAW,IAAI,aAAa,CAW3C;AAYD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,IAAI,EAAE,CAAC,EACP,YAAY,SAAkC,GAC7C,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAM3C;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAyB9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/commands/screenshot.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAYnD,wBAAsB,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDzF"}
1
+ {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/commands/screenshot.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAYnD,wBAAsB,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-action-executor.d.ts","sourceRoot":"","sources":["../../src/commands/select-action-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,KAAK,WAAW,GAAG,IAAI,GAAG,YAAY,GAAG,OAAO,CAAC;AAMjD,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,0BAA0B,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrF,CAAC;AAoFF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE,mBAAmB,EAC5B,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CA0BlB"}
1
+ {"version":3,"file":"select-action-executor.d.ts","sourceRoot":"","sources":["../../src/commands/select-action-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAEnG,KAAK,WAAW,GAAG,IAAI,GAAG,YAAY,GAAG,OAAO,CAAC;AAMjD,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,0BAA0B,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrF,CAAC;AAoFF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE,mBAAmB,EAC5B,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CA0BlB"}
@@ -1,4 +1,4 @@
1
- import { runActionExecutionGuard, } from './action-execution-guards.js';
1
+ import { runActionExecutionGuard } from './action-execution-guards.js';
2
2
  const OPTION_RESOLVE_TIMEOUT_MS = 250;
3
3
  const ASYNC_OPTION_WAIT_MS = 1_000;
4
4
  const OPTION_POLL_INTERVAL_MS = 100;