teamshare-bridge 0.26.14 → 0.26.17

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 (82) hide show
  1. package/dist/bridge/daemon.js +13 -3
  2. package/dist/bridge/daemon.js.map +1 -1
  3. package/dist/bridge/local-server.d.ts +52 -8
  4. package/dist/bridge/local-server.js +449 -50
  5. package/dist/bridge/local-server.js.map +1 -1
  6. package/dist/cli/commands/blog.js +3 -0
  7. package/dist/cli/commands/blog.js.map +1 -1
  8. package/dist/cli/commands/harness.d.ts +1 -1
  9. package/dist/cli/commands/harness.js +2 -1
  10. package/dist/cli/commands/harness.js.map +1 -1
  11. package/dist/cli/commands/research.js +33 -3
  12. package/dist/cli/commands/research.js.map +1 -1
  13. package/dist/cli/commands/run.js +0 -21
  14. package/dist/cli/commands/run.js.map +1 -1
  15. package/dist/lib/agent-scope.d.ts +21 -0
  16. package/dist/lib/agent-scope.js +35 -0
  17. package/dist/lib/agent-scope.js.map +1 -0
  18. package/dist/lib/brief.js +4 -0
  19. package/dist/lib/brief.js.map +1 -1
  20. package/dist/lib/browser/batch.d.ts +62 -1
  21. package/dist/lib/browser/batch.js +109 -3
  22. package/dist/lib/browser/batch.js.map +1 -1
  23. package/dist/lib/browser/cdp.d.ts +52 -2
  24. package/dist/lib/browser/cdp.js +207 -14
  25. package/dist/lib/browser/cdp.js.map +1 -1
  26. package/dist/lib/browser/index.d.ts +2 -2
  27. package/dist/lib/browser/index.js +4 -1
  28. package/dist/lib/browser/index.js.map +1 -1
  29. package/dist/lib/browser/login.d.ts +20 -2
  30. package/dist/lib/browser/login.js +125 -88
  31. package/dist/lib/browser/login.js.map +1 -1
  32. package/dist/lib/browser/network-log.d.ts +33 -0
  33. package/dist/lib/browser/network-log.js +58 -11
  34. package/dist/lib/browser/network-log.js.map +1 -1
  35. package/dist/lib/browser/page-context.d.ts +40 -1
  36. package/dist/lib/browser/page-context.js +117 -1
  37. package/dist/lib/browser/page-context.js.map +1 -1
  38. package/dist/lib/browser/refs.d.ts +104 -0
  39. package/dist/lib/browser/refs.js +430 -0
  40. package/dist/lib/browser/refs.js.map +1 -0
  41. package/dist/lib/browser/session.d.ts +129 -4
  42. package/dist/lib/browser/session.js +262 -3
  43. package/dist/lib/browser/session.js.map +1 -1
  44. package/dist/lib/chat/board-reply.js +2 -0
  45. package/dist/lib/chat/board-reply.js.map +1 -1
  46. package/dist/lib/chat/chat-reply.js +2 -0
  47. package/dist/lib/chat/chat-reply.js.map +1 -1
  48. package/dist/lib/chat/doc-reply.js +2 -0
  49. package/dist/lib/chat/doc-reply.js.map +1 -1
  50. package/dist/lib/chat/workflow-author-reply.js +2 -0
  51. package/dist/lib/chat/workflow-author-reply.js.map +1 -1
  52. package/dist/lib/diagnostics.d.ts +2 -0
  53. package/dist/lib/diagnostics.js +9 -6
  54. package/dist/lib/diagnostics.js.map +1 -1
  55. package/dist/lib/git/git-finalize.js +17 -2
  56. package/dist/lib/git/git-finalize.js.map +1 -1
  57. package/dist/lib/harness/harness-adapter.d.ts +17 -13
  58. package/dist/lib/harness/harness-adapter.js +33 -7
  59. package/dist/lib/harness/harness-adapter.js.map +1 -1
  60. package/dist/lib/harness/opencode-control.d.ts +73 -0
  61. package/dist/lib/harness/opencode-control.js +318 -0
  62. package/dist/lib/harness/opencode-control.js.map +1 -1
  63. package/dist/lib/harness/opencode-outcome.d.ts +16 -2
  64. package/dist/lib/harness/opencode-outcome.js +36 -7
  65. package/dist/lib/harness/opencode-outcome.js.map +1 -1
  66. package/dist/lib/harness/relay-key.d.ts +23 -0
  67. package/dist/lib/harness/relay-key.js +36 -0
  68. package/dist/lib/harness/relay-key.js.map +1 -0
  69. package/dist/lib/harness/spawn.d.ts +23 -5
  70. package/dist/lib/harness/spawn.js +264 -69
  71. package/dist/lib/harness/spawn.js.map +1 -1
  72. package/dist/lib/orchestrator/handlers/browser.js +375 -30
  73. package/dist/lib/orchestrator/handlers/browser.js.map +1 -1
  74. package/dist/lib/scope-guard.d.ts +54 -0
  75. package/dist/lib/scope-guard.js +246 -0
  76. package/dist/lib/scope-guard.js.map +1 -0
  77. package/dist/lib/tools/browser-tool.js +24 -3
  78. package/dist/lib/tools/browser-tool.js.map +1 -1
  79. package/dist/lib/workspace/repo-lock.d.ts +5 -1
  80. package/dist/lib/workspace/repo-lock.js +5 -3
  81. package/dist/lib/workspace/repo-lock.js.map +1 -1
  82. package/package.json +1 -1
@@ -91,12 +91,38 @@ export interface PagePaginationState {
91
91
  pageSizeOptions: number[];
92
92
  controls: PagePaginationControl[];
93
93
  }
94
+ export interface PageMenuItemState {
95
+ text: string;
96
+ role: string;
97
+ disabled: boolean;
98
+ x: number;
99
+ y: number;
100
+ }
101
+ /**
102
+ * An OPEN menu / popover / listbox (2026-10).
103
+ *
104
+ * Radix renders these into a portal at the end of `<body>`, not inside the
105
+ * card that owns them, so the old dialog-only state never saw a kebab menu or
106
+ * a combobox list at all. A `...` menu was effectively invisible to the agent
107
+ * even while it was open on screen.
108
+ */
109
+ export interface PageMenuState {
110
+ role: string;
111
+ label: string;
112
+ text: string;
113
+ inDialog: boolean;
114
+ x: number;
115
+ y: number;
116
+ items: PageMenuItemState[];
117
+ }
94
118
  export interface PageState {
95
119
  url: string;
96
120
  title: string;
97
121
  readyState: string;
98
122
  headings: string[];
99
123
  dialogs: PageDialogState[];
124
+ /** Open menus/popovers/listboxes, including portalled ones. */
125
+ menus: PageMenuState[];
100
126
  modal: boolean;
101
127
  fields: PageFieldState[];
102
128
  focused: PageFocusState | null;
@@ -107,6 +133,12 @@ export interface PageState {
107
133
  x: number;
108
134
  y: number;
109
135
  };
136
+ /** CSS viewport + device scale (click coords are CSS pixels, screenshots are device-scale). */
137
+ viewport: {
138
+ width: number;
139
+ height: number;
140
+ dpr: number;
141
+ };
110
142
  pagination: PagePaginationState;
111
143
  text: string;
112
144
  textTruncated: boolean;
@@ -137,6 +169,13 @@ declare const MAX_FIELDS = 40;
137
169
  declare const MAX_DIALOGS = 8;
138
170
  declare const MAX_ERRORS = 8;
139
171
  declare const MAX_TOASTS = 10;
172
+ /**
173
+ * Selectors that identify an OPEN layer living outside the dialog tree
174
+ * (2026-10): Radix popper wrappers, portals, and any exposed menu/listbox role.
175
+ * Shared with the `waitFor:"popover"` condition, so "is a menu open?" is one
176
+ * definition - never an inline guess in two places that can disagree.
177
+ */
178
+ export declare const POPOVER_SELECTOR = "[data-radix-popper-content-wrapper],[data-radix-portal],[data-floating-ui-portal],[role=\"menu\"],[role=\"listbox\"]";
140
179
  /**
141
180
  * Selectors that surface user-visible errors/alerts/validation messages.
142
181
  * Deliberately broad (sites use every naming scheme) but every match is
@@ -169,7 +208,7 @@ export declare function buildCompactStateScript(): string;
169
208
  export declare function readCompactState(page: CdpPage): Promise<Record<string, unknown> | null>;
170
209
  /** Human/LLM-readable rendering of a state (used in `snapshot.summary`). */
171
210
  export declare function renderPageStateText(state: PageState): string;
172
- export type WaitForKind = 'selector' | 'text' | 'dialog' | 'toast' | 'url' | 'networkIdle' | 'loginStep' | 'change';
211
+ export type WaitForKind = 'selector' | 'text' | 'dialog' | 'popover' | 'toast' | 'url' | 'networkIdle' | 'loginStep' | 'change';
173
212
  export declare const WAIT_FOR_VALUES: readonly WaitForKind[];
174
213
  export interface WaitForOptions {
175
214
  for: WaitForKind;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_TEXT_CAP = exports.MAX_TOASTS = exports.MAX_ERRORS = exports.MAX_DIALOGS = exports.MAX_FIELDS = exports.WAIT_FOR_VALUES = exports.PAGE_ERROR_SELECTORS = void 0;
3
+ exports.DEFAULT_TEXT_CAP = exports.MAX_TOASTS = exports.MAX_ERRORS = exports.MAX_DIALOGS = exports.MAX_FIELDS = exports.WAIT_FOR_VALUES = exports.PAGE_ERROR_SELECTORS = exports.POPOVER_SELECTOR = void 0;
4
4
  exports.buildPageStateScript = buildPageStateScript;
5
5
  exports.readPageState = readPageState;
6
6
  exports.compactPageState = compactPageState;
@@ -43,6 +43,83 @@ const MAX_ERRORS = 8;
43
43
  exports.MAX_ERRORS = MAX_ERRORS;
44
44
  const MAX_TOASTS = 10;
45
45
  exports.MAX_TOASTS = MAX_TOASTS;
46
+ /**
47
+ * Selectors that identify an OPEN layer living outside the dialog tree
48
+ * (2026-10): Radix popper wrappers, portals, and any exposed menu/listbox role.
49
+ * Shared with the `waitFor:"popover"` condition, so "is a menu open?" is one
50
+ * definition - never an inline guess in two places that can disagree.
51
+ */
52
+ exports.POPOVER_SELECTOR = '[data-radix-popper-content-wrapper],[data-radix-portal],[data-floating-ui-portal],[role="menu"],[role="listbox"]';
53
+ /**
54
+ * In-page menu/popover detector (2026-10), shared by the full and compact
55
+ * state scripts. Keeps only the OUTERMOST matching node per layer (a Radix
56
+ * popper wrapper CONTAINS the `role="menu"`), reports the layer role/label and
57
+ * its items with coordinates, so an open kebab menu is a first-class part of
58
+ * the screen instead of an invisible portal.
59
+ */
60
+ function menuDetectSource() {
61
+ return `
62
+ function detectMenus(maxMenus, maxItems) {
63
+ const clean = (v, cap) => String(v == null ? '' : v)
64
+ .replace(/\\s+/g, ' ').trim().slice(0, cap || 120);
65
+ const vis = (el) => {
66
+ if (!el || el.nodeType !== 1) return false;
67
+ const r = el.getBoundingClientRect();
68
+ if (r.width === 0 || r.height === 0) return false;
69
+ const cs = getComputedStyle(el);
70
+ return cs.visibility !== 'hidden' && cs.display !== 'none' && cs.opacity !== '0';
71
+ };
72
+ const rect = (el) => {
73
+ const r = el.getBoundingClientRect();
74
+ return { x: Math.round(r.x + r.width / 2), y: Math.round(r.y + r.height / 2) };
75
+ };
76
+ const SEL = ${JSON.stringify(exports.POPOVER_SELECTOR)};
77
+ const DIALOG = 'dialog[open],[role="dialog"],[aria-modal="true"]';
78
+ const menus = [];
79
+ const roots = [...document.querySelectorAll(SEL)].filter(vis);
80
+ for (const el of roots) {
81
+ if (menus.length >= maxMenus) break;
82
+ let nested = false;
83
+ let anc = el.parentElement;
84
+ while (anc && anc !== document.body) {
85
+ if (anc.matches && anc.matches(SEL) && vis(anc)) { nested = true; break; }
86
+ anc = anc.parentElement;
87
+ }
88
+ if (nested) continue;
89
+ const inner = el.querySelector('[role="menu"],[role="listbox"]');
90
+ const role = clean(
91
+ el.getAttribute('role') ||
92
+ (inner && inner.getAttribute('role')) ||
93
+ (el.hasAttribute('data-radix-popper-content-wrapper') ? 'popover' : ''),
94
+ 24,
95
+ ) || 'popover';
96
+ const items = [...el.querySelectorAll('[role="menuitem"],[role="menuitemcheckbox"],[role="menuitemradio"],[role="option"],[role="tab"],button,a[href]')]
97
+ .filter(vis)
98
+ .slice(0, maxItems)
99
+ .map((it) => ({
100
+ text: clean(
101
+ it.innerText || it.textContent || it.getAttribute('aria-label') || it.value || '',
102
+ 80,
103
+ ),
104
+ role: clean(it.getAttribute('role') || 'button', 20),
105
+ disabled: it.disabled === true || it.getAttribute('aria-disabled') === 'true',
106
+ ...rect(it),
107
+ }));
108
+ const r = rect(el);
109
+ menus.push({
110
+ role,
111
+ label: clean(el.getAttribute('aria-label') || (inner && inner.getAttribute('aria-label')) || '', 80),
112
+ text: clean(el.innerText || el.textContent || '', 400),
113
+ inDialog: !!(el.closest && el.closest(DIALOG)),
114
+ x: r.x,
115
+ y: r.y,
116
+ items,
117
+ });
118
+ }
119
+ return menus;
120
+ }
121
+ `;
122
+ }
46
123
  /**
47
124
  * In-page pagination detector (2026-10), shared by the full and compact state
48
125
  * scripts. It reads the pager controls, page-size selector, page indicator,
@@ -238,6 +315,7 @@ function buildPageStateScript(opts = {}) {
238
315
  const INCLUDE_TEXT = ${includeText ? 'true' : 'false'};
239
316
  const ERROR_SEL = ${errorSelectors};
240
317
  const detectPagination = ${paginationDetectSource()};
318
+ const detectMenus = ${menuDetectSource()};
241
319
 
242
320
  const clean = (v, cap) => String(v == null ? '' : v)
243
321
  .replace(/\\s+/g, ' ')
@@ -385,6 +463,7 @@ function buildPageStateScript(opts = {}) {
385
463
  const topEl = dialogEls[top ? top.index : -1] || null;
386
464
  const scope = topEl || document;
387
465
  const pagination = detectPagination(scope);
466
+ const menus = detectMenus(3, 12);
388
467
 
389
468
  const fields = (top ? top.fields : [...document.querySelectorAll('input,textarea,select')]
390
469
  .slice(0, 200)
@@ -453,6 +532,7 @@ function buildPageStateScript(opts = {}) {
453
532
  readyState: document.readyState || 'unknown',
454
533
  headings: headings,
455
534
  dialogs: dialogs,
535
+ menus: menus,
456
536
  modal: !!top,
457
537
  fields: fields,
458
538
  focused: focused,
@@ -460,6 +540,7 @@ function buildPageStateScript(opts = {}) {
460
540
  toasts: toasts,
461
541
  busy: busy,
462
542
  scroll: { x: Math.round(window.scrollX || 0), y: Math.round(window.scrollY || 0) },
543
+ viewport: { width: Math.round(window.innerWidth || 0), height: Math.round(window.innerHeight || 0), dpr: window.devicePixelRatio || 1 },
463
544
  pagination: pagination,
464
545
  text: text,
465
546
  textTruncated: textTruncated,
@@ -475,6 +556,7 @@ function emptyState() {
475
556
  readyState: 'unknown',
476
557
  headings: [],
477
558
  dialogs: [],
559
+ menus: [],
478
560
  modal: false,
479
561
  fields: [],
480
562
  focused: null,
@@ -482,6 +564,7 @@ function emptyState() {
482
564
  toasts: [],
483
565
  busy: false,
484
566
  scroll: { x: 0, y: 0 },
567
+ viewport: { width: 0, height: 0, dpr: 1 },
485
568
  pagination: {
486
569
  kind: 'none',
487
570
  hasNext: false,
@@ -505,6 +588,7 @@ async function readPageState(page, opts = {}) {
505
588
  ...emptyState(),
506
589
  ...r,
507
590
  dialogs: Array.isArray(r.dialogs) ? r.dialogs : [],
591
+ menus: Array.isArray(r.menus) ? r.menus : [],
508
592
  fields: Array.isArray(r.fields) ? r.fields : [],
509
593
  errors: Array.isArray(r.errors) ? r.errors : [],
510
594
  toasts: Array.isArray(r.toasts) ? r.toasts : [],
@@ -530,12 +614,22 @@ function compactPageState(state) {
530
614
  readyState: state.readyState,
531
615
  modal: state.modal,
532
616
  dialogs: dialogs,
617
+ menus: state.menus.slice(-2).map((m) => ({
618
+ role: m.role,
619
+ label: m.label,
620
+ text: m.text.slice(0, 300),
621
+ inDialog: m.inDialog,
622
+ x: m.x,
623
+ y: m.y,
624
+ items: m.items.slice(0, 8),
625
+ })),
533
626
  fields: state.fields.slice(0, 12),
534
627
  focused: state.focused,
535
628
  errors: state.errors.slice(0, 4),
536
629
  toasts: state.toasts.slice(-4),
537
630
  busy: state.busy,
538
631
  scroll: state.scroll,
632
+ viewport: state.viewport,
539
633
  pagination: state.pagination,
540
634
  };
541
635
  }
@@ -552,6 +646,7 @@ function buildCompactStateScript() {
552
646
  return `
553
647
  (() => {
554
648
  const detectPagination = ${paginationDetectSource()};
649
+ const detectMenus = ${menuDetectSource()};
555
650
  const clean = (v, cap) => String(v == null ? '' : v).replace(/\\s+/g, ' ').trim().slice(0, cap || 200);
556
651
  const vis = (el) => {
557
652
  if (!el || el.nodeType !== 1) return false;
@@ -654,6 +749,7 @@ function buildCompactStateScript() {
654
749
  readyState: document.readyState || 'unknown',
655
750
  modal: !!topEl,
656
751
  dialogs: top ? [top] : [],
752
+ menus: detectMenus(2, 8),
657
753
  fields: top ? top.fields : [...document.querySelectorAll('input,textarea,select')]
658
754
  .slice(0, 120)
659
755
  .filter(vis)
@@ -665,6 +761,7 @@ function buildCompactStateScript() {
665
761
  toasts: (window.__tsPageEvents || []).slice(-4),
666
762
  busy: [...document.querySelectorAll('[aria-busy="true"],[data-loading="true"],[class*="loading"],[class*="spinner"]')].some(vis),
667
763
  scroll: { x: Math.round(window.scrollX || 0), y: Math.round(window.scrollY || 0) },
764
+ viewport: { width: Math.round(window.innerWidth || 0), height: Math.round(window.innerHeight || 0), dpr: window.devicePixelRatio || 1 },
668
765
  pagination: detectPagination(topEl || document),
669
766
  };
670
767
  })()
@@ -708,6 +805,13 @@ function renderPageStateText(state) {
708
805
  .map((f) => `${f.label || f.name || f.type} (${f.type}, ${f.valueLength} chars${f.invalid ? ', INVALID' : ''})`)
709
806
  .join(' | ')}`);
710
807
  }
808
+ if (state.menus.length) {
809
+ lines.push(`Open menus/popovers: ${state.menus
810
+ .map((m) => `[${m.role}${m.label ? ` ${m.label}` : ''}] ${m.items
811
+ .map((i) => `${i.text || i.role}${i.disabled ? ' (disabled)' : ''} (${i.x},${i.y})`)
812
+ .join(' | ')}`)
813
+ .join(' || ')}`);
814
+ }
711
815
  if (state.focused) {
712
816
  lines.push(`Focused: ${state.focused.label || state.focused.type} (${state.focused.valueLength} chars)`);
713
817
  }
@@ -733,6 +837,7 @@ exports.WAIT_FOR_VALUES = [
733
837
  'selector',
734
838
  'text',
735
839
  'dialog',
840
+ 'popover',
736
841
  'toast',
737
842
  'url',
738
843
  'networkIdle',
@@ -770,6 +875,17 @@ function buildWaitProbeScript(opts) {
770
875
  const vis = (el) => { if (!el) return false; const r = el.getBoundingClientRect(); if (r.width === 0 || r.height === 0) return false; const cs = getComputedStyle(el); return cs.visibility !== 'hidden' && cs.display !== 'none'; };
771
876
  const n = [...document.querySelectorAll('dialog[open],[role="dialog"],[aria-modal="true"]')].filter(vis).length;
772
877
  return ${wantClosed ? 'n === 0' : 'n > 0'};
878
+ })()`;
879
+ }
880
+ case 'popover': {
881
+ // A menu/popover/listbox (Radix portals included) is open. `state:
882
+ // "closed"` waits for the layer to disappear - the check after choosing
883
+ // a menu item, where a still-open menu usually means the click missed.
884
+ const wantClosed = opts.state === 'closed';
885
+ return `(() => {
886
+ const vis = (el) => { if (!el) return false; const r = el.getBoundingClientRect(); if (r.width === 0 || r.height === 0) return false; const cs = getComputedStyle(el); return cs.visibility !== 'hidden' && cs.display !== 'none'; };
887
+ const n = [...document.querySelectorAll(${JSON.stringify(exports.POPOVER_SELECTOR)})].filter(vis).length;
888
+ return ${wantClosed ? 'n === 0' : 'n > 0'};
773
889
  })()`;
774
890
  }
775
891
  case 'toast': {
@@ -1 +1 @@
1
- {"version":3,"file":"page-context.js","sourceRoot":"","sources":["../../../src/lib/browser/page-context.ts"],"names":[],"mappings":";;;AAuUA,oDA0P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S,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;YACtD,OAAO,iCAAiC,MAAM,MAAM,CAAC;QACvD,CAAC;QACD,KAAK,QAAQ;YACX,OAAO,qEAAqE,KAAK,MAAM,CAAC;QAC1F;YACE,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,uEAAuE;AACvE,SAAgB,iBAAiB,CAC/B,YAAsC,EACtC,eAAuB,EACvB,gBAAoE,EAAE;IAEtE,OAAO;QACL,GAAG,UAAU,EAAE;QACf,YAAY;QACZ,eAAe;QACf,aAAa;KACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Element references for the debug/MCP browser (2026-10).
3
+ *
4
+ * WHY THIS EXISTS: the QA agent used to identify controls with raw CSS
5
+ * selectors, `getElements` indexes or x/y coordinates. On TeamShare's own
6
+ * shadcn/Radix UI that failed constantly: a dropdown, popover or kebab menu
7
+ * renders into a PORTAL at the end of `<body>`, the selector the model guessed
8
+ * matched nothing, and a coordinate read from a screenshot was device-scale.
9
+ * Most of a QA run was spent re-guessing selectors.
10
+ *
11
+ * A ref is a short opaque handle (`e1`, `e2`, ...) minted by ONE in-page scan:
12
+ *
13
+ * - the scanner walks every interactive element in the document, INCLUDING
14
+ * portalled menus/popovers/dialogs (they are still in the DOM, just not
15
+ * where the markup suggests), filters to what is actually visible, and
16
+ * records role/name/coords plus a direct reference to the live node in
17
+ * `window.__tsRefs.nodes`;
18
+ * - actions resolve a ref to the live node first and its centre point second,
19
+ * so an action is never sent to a coordinate that a re-render invalidated;
20
+ * - the live node is checked with `isConnected` before every use. A dead ref
21
+ * is refused with `REF_STALE` AND, when a unique same-role/same-name match
22
+ * exists in the fresh scan, transparently re-pointed at it.
23
+ *
24
+ * A ref list is invalidated by navigating or by a re-render, exactly like a
25
+ * Playwright locator; the session keeps the last list so it can explain what
26
+ * happened instead of failing mute.
27
+ *
28
+ * The scan deliberately runs in the page (one `Runtime.evaluate`) instead of
29
+ * joining `Accessibility.getFullAXTree` with `DOMSnapshot.captureSnapshot`:
30
+ * the DOM scan gives portal content AND geometry in one round trip, and it is
31
+ * the same document the actions operate on. Roles/names are computed from the
32
+ * explicit ARIA attributes first, then the implicit HTML semantics.
33
+ */
34
+ import { type CdpPage } from './cdp';
35
+ /** A JSON-safe description of one interactive element. */
36
+ export interface RefElement {
37
+ ref: string;
38
+ tag: string;
39
+ role: string;
40
+ name: string;
41
+ disabled: boolean;
42
+ inDialog: boolean;
43
+ inPortal: boolean;
44
+ /** Length only - a field VALUE must never travel through a tool result. */
45
+ valueLength?: number;
46
+ x: number;
47
+ y: number;
48
+ width: number;
49
+ height: number;
50
+ }
51
+ /** Hard cap on refs per scan: keeps the tool result readable and bounded. */
52
+ export declare const MAX_REFS = 300;
53
+ /**
54
+ * The one scan. Returns `{ at, list }` and stores the live nodes on
55
+ * `window.__tsRefs.nodes` for later `isConnected` checks / focus calls.
56
+ */
57
+ export declare function buildRefScanScript(): string;
58
+ /**
59
+ * Human/LLM-readable ref lines. One line per element:
60
+ * `e7 button "Publish draft" (640,412) [in menu]`
61
+ */
62
+ export declare function formatRefs(list: RefElement[], maxLines?: number): string[];
63
+ /** Run a fresh scan and return it (the caller keeps the list). */
64
+ export declare function scanRefs(page: CdpPage): Promise<{
65
+ at: number;
66
+ list: RefElement[];
67
+ }>;
68
+ /** Liveness + geometry of one ref, from the node the scan stored. */
69
+ export declare function buildRefInfoScript(ref: string): string;
70
+ /**
71
+ * Focus a ref'd element, scrolling it to the middle first. Returns whether the
72
+ * element actually took focus plus its tag/role, so `focus` is never a silent
73
+ * no-op: a div without `tabindex` cannot be focused and says so.
74
+ */
75
+ export declare function buildRefFocusScript(ref: string): string;
76
+ /**
77
+ * Dispatch the FULL pointer sequence on a ref'd element, in-page.
78
+ *
79
+ * This is the fallback for controls that ignore a coordinate click: the
80
+ * frontend tours (`frontend/src/modules/tour/utils/acts.ts`) taught us that a
81
+ * bare `.click()` is a SILENT no-op on Radix tabs/menus, which activate on
82
+ * `pointerdown`/`mousedown`. Same recipe, one copy per side of the wire.
83
+ */
84
+ export declare function buildRefPointerScript(ref: string): string;
85
+ /**
86
+ * Draw ref labels over the live page (2026-10).
87
+ *
88
+ * A plain screenshot shows WHAT is on screen; the model still has to guess
89
+ * which button is `e7`. The overlay draws a numbered box on every ref'd
90
+ * element so ONE image both shows the page and names the targets. Removed
91
+ * immediately after the capture - the page is never left modified.
92
+ */
93
+ export declare function buildAnnotateScript(): string;
94
+ /** Remove the ref overlay (always called, even when the capture failed). */
95
+ export declare function buildClearAnnotationScript(): string;
96
+ /** How many popovers/menus are currently open (used by closePopup). */
97
+ export declare function buildPopoverCountScript(): string;
98
+ /**
99
+ * Click OUTSIDE every open layer (the Radix DismissableLayer listens for a
100
+ * document-level `pointerdown`). Coordinate clicks can land on something
101
+ * dangerous in a corner, so this dispatches the pointer sequence on `<body>`
102
+ * at the layer's own outside point instead.
103
+ */
104
+ export declare function buildOutsidePointerScript(): string;