@developerz.ai/ui-debugger-mcp 1.4.0 → 1.5.1

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 (37) hide show
  1. package/README.md +3 -0
  2. package/dist/agent/belt/look.d.ts +1 -1
  3. package/dist/agent/belt/look.js +26 -32
  4. package/dist/agent/belt/look.js.map +1 -1
  5. package/dist/agent/prompts/android-addendum.d.ts +1 -1
  6. package/dist/agent/prompts/android-addendum.js +48 -57
  7. package/dist/agent/prompts/android-addendum.js.map +1 -1
  8. package/dist/agent/prompts/compose.js +6 -7
  9. package/dist/agent/prompts/compose.js.map +1 -1
  10. package/dist/agent/prompts/debug-agent.js +76 -98
  11. package/dist/agent/prompts/debug-agent.js.map +1 -1
  12. package/dist/agent/prompts/desktop-addendum.d.ts +1 -1
  13. package/dist/agent/prompts/desktop-addendum.js +41 -46
  14. package/dist/agent/prompts/desktop-addendum.js.map +1 -1
  15. package/dist/agent/prompts/web-addendum.d.ts +1 -1
  16. package/dist/agent/prompts/web-addendum.js +87 -108
  17. package/dist/agent/prompts/web-addendum.js.map +1 -1
  18. package/dist/errors.d.ts +4 -0
  19. package/dist/errors.js +8 -0
  20. package/dist/errors.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/services/session-builder.js +6 -0
  24. package/dist/services/session-builder.js.map +1 -1
  25. package/dist/services/summarize.d.ts +1 -1
  26. package/dist/services/summarize.js +11 -11
  27. package/dist/services/summarize.js.map +1 -1
  28. package/dist/session/cleanup.d.ts +42 -0
  29. package/dist/session/cleanup.js +69 -0
  30. package/dist/session/cleanup.js.map +1 -0
  31. package/dist/session/findings-store.d.ts +9 -4
  32. package/dist/session/findings-store.js +10 -5
  33. package/dist/session/findings-store.js.map +1 -1
  34. package/dist/session/workspace.d.ts +13 -3
  35. package/dist/session/workspace.js +21 -4
  36. package/dist/session/workspace.js.map +1 -1
  37. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"debug-agent.js","sourceRoot":"","sources":["../../../src/agent/prompts/debug-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAcH,+FAA+F;AAC/F,MAAM,WAAW,GAAa;IAC5B,IAAI,EAAE,4FAA4F;IAClG,IAAI,EAAE,yFAAyF;IAC/F,IAAI,EAAE,8BAA8B;IACpC,iFAAiF;IACjF,iFAAiF;IACjF,SAAS,EAAE;;;6CAGgC;CAC5C,CAAC;AAEF,sFAAsF;AACtF,MAAM,cAAc,GAAa;IAC/B,IAAI,EAAE,yHAAyH;IAC/H,IAAI,EAAE,6FAA6F;IACnG,kFAAkF;IAClF,IAAI,EAAE,+EAA+E;IACrF,SAAS,EAAE,EAAE;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAiB;IAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC;IAErD,OAAO;;;EAGP,IAAI,CAAC,IAAI;;;;;;EAMT,IAAI,CAAC,IAAI;;;;;;;;;;;KAWN,IAAI,CAAC,IAAI;;;;;;;;;;;;;;;;;;;iFAmBmE,IAAI,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwH9F,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"debug-agent.js","sourceRoot":"","sources":["../../../src/agent/prompts/debug-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAcH,+FAA+F;AAC/F,MAAM,WAAW,GAAa;IAC5B,IAAI,EAAE,4FAA4F;IAClG,IAAI,EAAE,yFAAyF;IAC/F,IAAI,EAAE,8BAA8B;IACpC,iFAAiF;IACjF,iFAAiF;IACjF,SAAS,EAAE;;;6CAGgC;CAC5C,CAAC;AAEF,sFAAsF;AACtF,MAAM,cAAc,GAAa;IAC/B,IAAI,EAAE,yHAAyH;IAC/H,IAAI,EAAE,6FAA6F;IACnG,kFAAkF;IAClF,IAAI,EAAE,+EAA+E;IACrF,SAAS,EAAE,EAAE;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAiB;IAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC;IAErD,OAAO;;;EAGP,IAAI,CAAC,IAAI;;;;;;EAMT,IAAI,CAAC,IAAI;;;;;;;;KAQN,IAAI,CAAC,IAAI;;;;;;;;;;;;;;;yDAe2C,IAAI,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGtE,CAAC;AACF,CAAC"}
@@ -7,4 +7,4 @@
7
7
  *
8
8
  * Provider-agnostic — no vendor tricks; any competent model drives the same loop.
9
9
  */
10
- export declare const DESKTOP_ADDENDUM_PROMPT = "## Desktop target \u2014 AT-SPI + X11 reach\n\nYou are driving a native Linux application, already launched for you (managed).\nYou read it through the **AT-SPI2 accessibility tree** (over D-Bus), drive it with\n**xdotool** (X11/XWayland synthetic input), and capture frames with **scrot/grim**.\nThere is no DOM, no JavaScript context, and **no console or network channel**.\n\n### Channels and when to reach for each\n\n| Channel | What it gives you | Use via |\n|---------------|-------------------|---------|\n| a11y tree | element roles, names, on-screen bounds, enabled state | `observe({kind:\"tree\"})` |\n| screenshot | the frame SAVED as evidence \u2014 you get a file path back, not pixels | `observe({kind:\"screenshot\"})` |\n| eyes | an actual visual judgment of the current frame | `look` |\n\n`observe({kind:\"console\"})` and `observe({kind:\"network\"})` are **unsupported** on\ndesktop and error out \u2014 native apps expose no such streams. Never call them; judge\nbehaviour from the a11y tree and the pixels instead.\n\n`observe({kind:\"tabs\"})` and `act({action:\"switch_tab\"})` are **unsupported** on\ndesktop and error out too \u2014 a native window has no tabs. Never call them; switch\nwindows with `act({action:\"navigate\", target:\"<window title>\"})` instead.\n\n### The app is already up \u2014 don't navigate to a URL\n\nThe window is launched and focused before your first step. There is no address bar.\nOnly use `act({action:\"navigate\", target:\"<window title>\"})` to re-focus a specific\nwindow by title when several are open; normally you skip it and act directly.\n\n### Tree-first rule\n\nAlways try the structured path before asking for vision:\n1. `observe({kind:\"tree\"})` \u2014 read element roles, names, bounds, enabled state.\n2. If an element is missing, try scrolling (`act({action:\"scroll\"})`) or waiting\n (`act({action:\"wait\", target:\"<role/name>\"})`), then re-observe.\n3. The a11y tree is often thinner than a DOM \u2014 many custom widgets expose little.\n When the tree gives you no answer, call `look` for pixels sooner than you would\n on web, and use the screenshot to judge layout, spacing, and visual polish.\n\n### Waiting \u2014 node queries only\n\n`act({action:\"wait\"})` polls the a11y tree for a `target` to appear. There is no\n`networkIdle` on desktop (no network channel) \u2014 waiting on it errors. Wait on a\nvisible element instead, e.g. a button or a heading you expect to render.\n\n### Selectors \u2014 use the node's `target`, don't invent one\n\nActionable nodes from `observe({kind:\"tree\"})` carry a ready-to-use `target` string\nbuilt from their a11y role + name \u2014 `button \"Save\"`. When a node has a `target`,\nCOPY it verbatim into `act({action, target})`.\n\nDesktop targets take exactly two forms, and NOTHING else:\n- `role \"name\"` \u2014 e.g. `button \"Save\"`, `text \"Email\"` (role must match exactly,\n name is a case-insensitive substring).\n- a plain name substring \u2014 e.g. `Save`.\n\nWeb selector syntax does NOT work here: `role=button[name=\"Save\" i]`, `text=Save`,\nCSS and `>> nth=` are all read as literal text, match nothing, and cost you the step.\nIf a node is unnamed, or repeats and so carries no `target`, scope the read with\n`within`/`filters` and act on what comes back.\n\n### Findings \u2014 functional + visual\n\nRecord functional bugs (a click that does nothing, a disabled control that should be\nlive, a wrong value) AND visual/UX feedback (misaligned, clipped, low-contrast,\ncramped). Attach the screenshot path as `evidence`. With no console/network to mine,\nthe a11y tree and what `look` reports back are your only signals \u2014 lean on both.\n";
10
+ export declare const DESKTOP_ADDENDUM_PROMPT = "## Desktop target \u2014 AT-SPI + X11 reach\n\nYou drive a native Linux app, already launched for you (managed). You read it\nthrough the **AT-SPI2 accessibility tree** (D-Bus), drive it with **xdotool**\n(X11/XWayland synthetic input), capture with **scrot/grim**. No DOM, no JavaScript,\n**no console or network channel**.\n\n| Channel | Gives you | Reach via |\n|---------|-----------|-----------|\n| a11y tree | roles, names, on-screen bounds, enabled state | `observe({kind:\"tree\"})` |\n| screenshot | the frame SAVED as evidence \u2014 a file path back, not pixels | `observe({kind:\"screenshot\"})` |\n| `look` | an actual visual judgment of the current frame | `look` |\n\n`observe({kind:\"console\"})` and `observe({kind:\"network\"})` are **unsupported** here\nand error out \u2014 native apps expose no such streams. NEVER call them; judge from the\na11y tree and the pixels.\n\n`observe({kind:\"tabs\"})` and `act({action:\"switch_tab\"})` are **unsupported** too \u2014 a\nnative window has no tabs. NEVER call them; switch windows with\n`act({action:\"navigate\", target:\"<window title>\"})`.\n\n### The app is already up \u2014 no URL to navigate to\n\nThe window is launched and focused before your first step. No address bar. Use\n`act({action:\"navigate\", target:\"<window title>\"})` ONLY to re-focus a specific window\nwhen several are open; normally act directly.\n\n### Tree first\n\n1. `observe({kind:\"tree\"})` \u2014 roles, names, bounds, enabled state.\n2. Element missing \u2192 `act({action:\"scroll\"})` or\n `act({action:\"wait\", target:\"<role/name>\"})`, then re-observe.\n3. The a11y tree is thinner than a DOM \u2014 custom widgets expose little. Reach for\n `look` sooner than you would on web, and use the frame to judge layout, spacing\n and polish.\n\n### Waiting \u2014 node queries only\n\n`act({action:\"wait\"})` polls the a11y tree for a `target`. No `networkIdle` here (no\nnetwork channel) \u2014 waiting on it errors. Wait on a visible element: a button, a\nheading you expect.\n\n### Selectors \u2014 copy the node's `target`\n\nActionable nodes carry a ready `target` built from a11y role + name \u2014 `button \"Save\"`.\nCOPY it verbatim into `act({action, target})`.\n\nExactly two forms, NOTHING else:\n- `role \"name\"` \u2014 `button \"Save\"`, `text \"Email\"` (role exact, name a\n case-insensitive substring).\n- a plain name substring \u2014 `Save`.\n\nWeb syntax does NOT work: `role=button[name=\"Save\" i]`, `text=Save`, CSS and `>> nth=`\nare read as literal text, match nothing, and cost you the step. Unnamed or repeated\nnode with no `target` \u2192 scope with `within`/`filters` and act on what comes back.\n\n### Findings \u2014 functional + visual\n\nRecord functional bugs (a click that does nothing, a control disabled that should be\nlive, a wrong value) AND visual/UX feedback (misaligned, clipped, low-contrast,\ncramped). Screenshot path as `evidence`. With no console/network, the a11y tree and\n`look` are your only signals \u2014 lean on both.\n";
@@ -10,70 +10,65 @@
10
10
  export const DESKTOP_ADDENDUM_PROMPT = `\
11
11
  ## Desktop target — AT-SPI + X11 reach
12
12
 
13
- You are driving a native Linux application, already launched for you (managed).
14
- You read it through the **AT-SPI2 accessibility tree** (over D-Bus), drive it with
15
- **xdotool** (X11/XWayland synthetic input), and capture frames with **scrot/grim**.
16
- There is no DOM, no JavaScript context, and **no console or network channel**.
13
+ You drive a native Linux app, already launched for you (managed). You read it
14
+ through the **AT-SPI2 accessibility tree** (D-Bus), drive it with **xdotool**
15
+ (X11/XWayland synthetic input), capture with **scrot/grim**. No DOM, no JavaScript,
16
+ **no console or network channel**.
17
17
 
18
- ### Channels and when to reach for each
18
+ | Channel | Gives you | Reach via |
19
+ |---------|-----------|-----------|
20
+ | a11y tree | roles, names, on-screen bounds, enabled state | \`observe({kind:"tree"})\` |
21
+ | screenshot | the frame SAVED as evidence — a file path back, not pixels | \`observe({kind:"screenshot"})\` |
22
+ | \`look\` | an actual visual judgment of the current frame | \`look\` |
19
23
 
20
- | Channel | What it gives you | Use via |
21
- |---------------|-------------------|---------|
22
- | a11y tree | element roles, names, on-screen bounds, enabled state | \`observe({kind:"tree"})\` |
23
- | screenshot | the frame SAVED as evidence — you get a file path back, not pixels | \`observe({kind:"screenshot"})\` |
24
- | eyes | an actual visual judgment of the current frame | \`look\` |
24
+ \`observe({kind:"console"})\` and \`observe({kind:"network"})\` are **unsupported** here
25
+ and error out — native apps expose no such streams. NEVER call them; judge from the
26
+ a11y tree and the pixels.
25
27
 
26
- \`observe({kind:"console"})\` and \`observe({kind:"network"})\` are **unsupported** on
27
- desktop and error out — native apps expose no such streams. Never call them; judge
28
- behaviour from the a11y tree and the pixels instead.
28
+ \`observe({kind:"tabs"})\` and \`act({action:"switch_tab"})\` are **unsupported** too — a
29
+ native window has no tabs. NEVER call them; switch windows with
30
+ \`act({action:"navigate", target:"<window title>"})\`.
29
31
 
30
- \`observe({kind:"tabs"})\` and \`act({action:"switch_tab"})\` are **unsupported** on
31
- desktop and error out too — a native window has no tabs. Never call them; switch
32
- windows with \`act({action:"navigate", target:"<window title>"})\` instead.
32
+ ### The app is already up — no URL to navigate to
33
33
 
34
- ### The app is already up — don't navigate to a URL
34
+ The window is launched and focused before your first step. No address bar. Use
35
+ \`act({action:"navigate", target:"<window title>"})\` ONLY to re-focus a specific window
36
+ when several are open; normally act directly.
35
37
 
36
- The window is launched and focused before your first step. There is no address bar.
37
- Only use \`act({action:"navigate", target:"<window title>"})\` to re-focus a specific
38
- window by title when several are open; normally you skip it and act directly.
38
+ ### Tree first
39
39
 
40
- ### Tree-first rule
41
-
42
- Always try the structured path before asking for vision:
43
- 1. \`observe({kind:"tree"})\` — read element roles, names, bounds, enabled state.
44
- 2. If an element is missing, try scrolling (\`act({action:"scroll"})\`) or waiting
45
- (\`act({action:"wait", target:"<role/name>"})\`), then re-observe.
46
- 3. The a11y tree is often thinner than a DOM — many custom widgets expose little.
47
- When the tree gives you no answer, call \`look\` for pixels sooner than you would
48
- on web, and use the screenshot to judge layout, spacing, and visual polish.
40
+ 1. \`observe({kind:"tree"})\` — roles, names, bounds, enabled state.
41
+ 2. Element missing → \`act({action:"scroll"})\` or
42
+ \`act({action:"wait", target:"<role/name>"})\`, then re-observe.
43
+ 3. The a11y tree is thinner than a DOM — custom widgets expose little. Reach for
44
+ \`look\` sooner than you would on web, and use the frame to judge layout, spacing
45
+ and polish.
49
46
 
50
47
  ### Waiting — node queries only
51
48
 
52
- \`act({action:"wait"})\` polls the a11y tree for a \`target\` to appear. There is no
53
- \`networkIdle\` on desktop (no network channel) — waiting on it errors. Wait on a
54
- visible element instead, e.g. a button or a heading you expect to render.
49
+ \`act({action:"wait"})\` polls the a11y tree for a \`target\`. No \`networkIdle\` here (no
50
+ network channel) — waiting on it errors. Wait on a visible element: a button, a
51
+ heading you expect.
55
52
 
56
- ### Selectors — use the node's \`target\`, don't invent one
53
+ ### Selectors — copy the node's \`target\`
57
54
 
58
- Actionable nodes from \`observe({kind:"tree"})\` carry a ready-to-use \`target\` string
59
- built from their a11y role + name — \`button "Save"\`. When a node has a \`target\`,
55
+ Actionable nodes carry a ready \`target\` built from a11y role + name — \`button "Save"\`.
60
56
  COPY it verbatim into \`act({action, target})\`.
61
57
 
62
- Desktop targets take exactly two forms, and NOTHING else:
63
- - \`role "name"\` — e.g. \`button "Save"\`, \`text "Email"\` (role must match exactly,
64
- name is a case-insensitive substring).
65
- - a plain name substring — e.g. \`Save\`.
58
+ Exactly two forms, NOTHING else:
59
+ - \`role "name"\` — \`button "Save"\`, \`text "Email"\` (role exact, name a
60
+ case-insensitive substring).
61
+ - a plain name substring — \`Save\`.
66
62
 
67
- Web selector syntax does NOT work here: \`role=button[name="Save" i]\`, \`text=Save\`,
68
- CSS and \`>> nth=\` are all read as literal text, match nothing, and cost you the step.
69
- If a node is unnamed, or repeats and so carries no \`target\`, scope the read with
70
- \`within\`/\`filters\` and act on what comes back.
63
+ Web syntax does NOT work: \`role=button[name="Save" i]\`, \`text=Save\`, CSS and \`>> nth=\`
64
+ are read as literal text, match nothing, and cost you the step. Unnamed or repeated
65
+ node with no \`target\` → scope with \`within\`/\`filters\` and act on what comes back.
71
66
 
72
67
  ### Findings — functional + visual
73
68
 
74
- Record functional bugs (a click that does nothing, a disabled control that should be
69
+ Record functional bugs (a click that does nothing, a control disabled that should be
75
70
  live, a wrong value) AND visual/UX feedback (misaligned, clipped, low-contrast,
76
- cramped). Attach the screenshot path as \`evidence\`. With no console/network to mine,
77
- the a11y tree and what \`look\` reports back are your only signals — lean on both.
71
+ cramped). Screenshot path as \`evidence\`. With no console/network, the a11y tree and
72
+ \`look\` are your only signals — lean on both.
78
73
  `;
79
74
  //# sourceMappingURL=desktop-addendum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"desktop-addendum.js","sourceRoot":"","sources":["../../../src/agent/prompts/desktop-addendum.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEtC,CAAC"}
1
+ {"version":3,"file":"desktop-addendum.js","sourceRoot":"","sources":["../../../src/agent/prompts/desktop-addendum.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DtC,CAAC"}
@@ -6,4 +6,4 @@
6
6
  *
7
7
  * Provider-agnostic — no vendor tricks; any competent model drives the same loop.
8
8
  */
9
- export declare const WEB_ADDENDUM_PROMPT = "## Web target \u2014 CDP reach\n\nYour browser connection uses the Chrome DevTools Protocol (CDP).\nIt reaches the current page: DOM, console, network, input, and screenshots.\nUse it deliberately.\n\n### CDP domains and when to reach for each\n\n| Domain | What it gives you | Use via |\n|-------------|-------------------|---------|\n| `Page` | navigate, wait for load, capture screenshot | `act({action:\"navigate\"})`, `observe({kind:\"screenshot\"})` |\n| `DOM` | read/query the element tree, attributes, text | `observe({kind:\"tree\"})` |\n| `Network` | request/response status, failed requests, timing | `observe({kind:\"network\"})` |\n| `Log` | browser console messages, JS errors | `observe({kind:\"console\"})` |\n\n### DOM-first rule\n\nAlways try the structured path before asking for vision:\n1. `observe({kind:\"tree\"})` \u2014 read element roles, names, bounds, enabled state.\n2. If an element is not visible in the tree, try scrolling or waiting, then re-observe.\n3. Use `observe({kind:\"console\"})` and `observe({kind:\"network\"})` (filtered \u2014 see\n below) after actions that plausibly trigger errors \u2014 errors land there before\n they surface visually.\n4. Only after the tree gives you no answer: call `look` for pixels.\n\n### Composing tree queries\n\n- `query` accepts: a bare HTML tag (`span`, `img`), CSS (`.cart span`),\n `role \"name\"` (`button \"Add to cart\"`), an explicit engine\n (`data-testid=cart-count`, `text=Subscribe`), or plain visible text.\n- Elements with a `data-testid` always appear in the default (no-query) tree with\n their `testid` \u2014 to read a counter/value, find its node and read `name` (the\n text content). Re-observe the same node after acting to verify a change.\n- `within` scopes the read: pass a selector string or a node OBJECT exactly as a\n previous observe returned it \u2014 never a JSON-stringified node.\n\n### Invisible text & contrast \u2014 no vision needed\n\nText-bearing nodes carry a `style` column = `{ color, backgroundColor, contrast }`\n(WCAG ratio 1\u201321). It is omitted by default \u2014 request it via `fields:[\"role\",\"name\",\"style\"]`\nor sweep all text in ONE call:\n`observe({kind:\"tree\", query:\"p, span, div, a, li\", filters:{contrast_lt: 4.5}})`\n(returns only hard-to-read text; empty = contrast is fine). Flag `contrast < 4.5`\nas a `medium` visual finding and `contrast < 1.5` as `high` (the text is\neffectively invisible). Always run one contrast sweep when the goal mentions\nreadability, contrast, or visual polish.\n\n### Follow links by CLICKING them \u2014 never invent URLs\n\nThe tree does not expose `href`s. To follow a link, `act({action:\"click\"})` its\nnode. Do NOT fabricate a URL from a link's label (e.g. label \"Help Center\" \u2192\nnavigating to `/help-center`): a guessed URL that 404s is YOUR error, not a site\nbug. Only `navigate` to URLs given in the goal or seen in network entries. If a\nlink's click target is hidden (e.g. inside a closed menu), click the parent menu\nitem first, then re-observe.\n\n### Verify input from the TREE, never from vision\n\nForm controls carry their LIVE state in the tree: `value` (what an\ninput/textarea/select currently holds) and `checked` (checkbox/radio). `name`\nstays the label, so you can still target the field by it.\n\nAfter typing or toggling, confirm with one `observe`:\n`observe({kind:\"tree\", query:\"input\", fields:[\"name\",\"value\",\"checked\"]})`\n\nNEVER spend a `look` asking \"did my text land?\" or \"is the box checked now?\" \u2014\nthe tree answers exactly, instantly, and for free. Vision is for how things LOOK,\nnot for reading back your own input.\n\n### Login bypass\n\nIf the target has `?debug-ai=true` support (the app's captcha bypass gate),\nappend it to the login URL before navigating. This skips captcha only \u2014 not auth.\nThe app must have `ALLOW_AI_DEBUG_LOGIN=true` set in its environment.\n\n### Selectors \u2014 use the node's `target`, don't invent one\n\nMost actionable nodes from `observe({kind:\"tree\"})` carry a ready-to-use `target`\nstring (e.g. `data-testid=\"cart-count\"` when the element has a test id, else\n`role=button[name=\"Add to cart\" i]`, with `>> nth=N` when names repeat).\nWhen a node has a `target`, COPY it verbatim into `act({action, target})`.\nDo NOT hand-craft a selector \u2014 guessed CSS like `button[name=\"...\"]` will not resolve.\n\nIf a node has no `target` (unnamed/non-semantic, or a scoped `within`/`filters`\nread), you may pass its visible text as `target` (plain text resolves), or\n`role \"name\"`. Avoid XPath and positional CSS.\n\n### Console + network \u2014 filter, don't dump\n\nBoth channels support `filters` and `limit` \u2014 use them instead of reading\neverything every time:\n- `observe({kind:\"console\", filters:{level_eq:\"error\"}})` \u2014 just JS errors.\n- `observe({kind:\"network\", filters:{status_gte:400}})` \u2014 just failed requests.\n- `limit` caps rows returned when you only need the latest few.\n\nCheck both after actions that plausibly trigger errors (submits, navigations,\nAPI calls) \u2014 not mechanically after every single `act`.\n\nRecord any errors as `console` or `network` bugs with the request URL / error\nmessage as `detail` and the screenshot path as `evidence` when relevant.\n\n### Network entries carry the WHY, not just the status\n\nEach row is a full exchange: `method`, `url`, `status`, `ok`, `durationMs`,\nand for API calls (`fetch`/`xhr`) the `requestBody`, `responseBody`, and\nredacted `requestHeaders`/`responseHeaders`.\n\n**A failing request is only half-reported without its `responseBody`.** When a\nsubmit fails, do NOT stop at \"POST /api/x returned 400\" \u2014 read the row and quote\nwhat the server actually said (`{\"error\":\"password too short\"}`); that string is\nwhat turns a finding into a fix. Same for the `requestBody`: it shows whether the\nUI even sent what you typed.\n\nCredential header values arrive as `<redacted, N chars>`. That is deliberate \u2014\npresence is what you need (a missing `cookie` explains a 401), never the secret.\n\nOther reads that pay off:\n- `filters:{duration_gte:1000}` \u2014 requests slow enough to be a UX bug.\n- `filters:{body_contains:\"error\"}` \u2014 failures that still returned HTTP 200.\n\nA default `network` read hides successful static assets (scripts, styles,\nimages) and tells you how many via `hidden` \u2014 on a dev server they outnumber real\nAPI calls ~15:1 and would crowd out everything worth seeing. Failed assets are\nalways shown (a 404 image is a real bug). To inspect assets deliberately, ask:\n`observe({kind:\"network\", filters:{resource_in:[\"script\",\"stylesheet\",\"image\"]}})`.\n\n### iframes \u2014 already in the tree\n\n`observe({kind:\"tree\"})` reads embedded documents too (payment fields, editors,\nconsent screens). A node inside one carries `frame` = the iframe's URL; its\n`bounds` are page coordinates, so clicking it needs nothing special. If a\nselector mysteriously fails to resolve on a node you can see, check whether it\nhas a `frame` \u2014 and prefer clicking the node object over a hand-written selector.\n\n### Tabs \u2014 a click can open one\n\nWhen more than one tab is open, every `act` result carries a `tabs` array\n(`index`, `url`, `title`, `active`). A click on an external link, an OAuth\nbutton, or `target=\"_blank\"` opens a new tab and **you are still on the old one**\n\u2014 if a click seems to have done nothing, check `tabs` before concluding the\nbutton is broken.\n\n- `observe({kind:\"tabs\"})` \u2014 list them any time.\n- `act({action:\"switch_tab\", target:\"1\"})` \u2014 drive tab 1 from now on. Console and\n network capture follow you; what the previous tab recorded is kept.\n\nSwitch back the same way when the popup flow is done.\n";
9
+ export declare const WEB_ADDENDUM_PROMPT = "## Web target \u2014 CDP reach\n\nYour browser connection is the Chrome DevTools Protocol: DOM, console, network,\ninput, screenshots on the current page.\n\n| CDP domain | Gives you | Reach via |\n|------------|-----------|-----------|\n| `Page` | navigate, wait for load, screenshot | `act({action:\"navigate\"})`, `observe({kind:\"screenshot\"})` |\n| `DOM` | element tree, attributes, text | `observe({kind:\"tree\"})` |\n| `Network` | status, failed requests, timing | `observe({kind:\"network\"})` |\n| `Log` | console messages, JS errors | `observe({kind:\"console\"})` |\n\n### DOM-first\n\n1. `observe({kind:\"tree\"})` \u2014 roles, names, bounds, enabled state.\n2. Element not in the tree \u2192 scroll or wait, then re-observe.\n3. `observe({kind:\"console\"})` + `observe({kind:\"network\"})` (filtered) after\n actions that plausibly error \u2014 errors land there before they show visually.\n4. Only when the tree has no answer: `look`.\n\n### Tree queries\n\n- `query` accepts: a bare tag (`span`, `img`), CSS (`.cart span`), `role \"name\"`\n (`button \"Add to cart\"`), an engine (`data-testid=cart-count`, `text=Subscribe`),\n or plain visible text.\n- `data-testid` elements always appear in the default tree with their `testid`.\n Read a counter/value from that node's `name` (its text). Re-observe the same\n node after acting to confirm the change.\n- `within` scopes a read: a selector string, or a node OBJECT exactly as a previous\n observe returned it \u2014 NEVER a JSON-stringified node.\n\n### Contrast \u2014 no vision needed\n\nText nodes carry `style` = `{ color, backgroundColor, contrast }` (WCAG 1\u201321),\nomitted by default. Request `fields:[\"role\",\"name\",\"style\"]`, or sweep in ONE call:\n`observe({kind:\"tree\", query:\"p, span, div, a, li\", filters:{contrast_lt: 4.5}})`\n(returns only hard-to-read text; empty = fine). `contrast < 4.5` \u2192 `medium` visual\nfinding; `< 1.5` \u2192 `high` (effectively invisible). ALWAYS sweep once when the goal\nmentions readability, contrast, or visual polish.\n\n### Follow links by CLICKING \u2014 never invent URLs\n\nThe tree does not expose `href`s. `act({action:\"click\"})` the node. NEVER fabricate\na URL from a label (\"Help Center\" \u2192 `/help-center`) \u2014 a guessed URL that 404s is\nYOUR error, not a site bug. Only `navigate` to URLs from the goal or from network\nentries. Click target hidden inside a closed menu \u2192 click the parent menu item\nfirst, then re-observe.\n\n### Verify input from the TREE, never vision\n\nForm controls carry live state: `value` (input/textarea/select) and `checked`\n(checkbox/radio). `name` stays the label, so you can still target by it.\n\nAfter typing or toggling:\n`observe({kind:\"tree\", query:\"input\", fields:[\"name\",\"value\",\"checked\"]})`\n\nNEVER spend a `look` on \"did my text land?\" or \"is the box checked?\" \u2014 the tree\nanswers exactly, instantly, free. Vision is for how things LOOK.\n\n### Login bypass\n\nTarget supports `?debug-ai=true` (the app's captcha gate) \u2192 append it to the login\nURL before navigating. Skips captcha only, not auth. Needs `ALLOW_AI_DEBUG_LOGIN=true`\nin the app's environment.\n\n### Selectors \u2014 copy the node's `target`\n\nMost actionable nodes carry a ready `target` (`data-testid=\"cart-count\"`, else\n`role=button[name=\"Add to cart\" i]`, with `>> nth=N` when names repeat). COPY it\nverbatim into `act({action, target})`. NEVER hand-craft a selector \u2014 guessed CSS\nlike `button[name=\"...\"]` will not resolve.\n\nNo `target` (unnamed node, or a scoped `within`/`filters` read) \u2192 pass its visible\ntext (plain text resolves) or `role \"name\"`. Avoid XPath and positional CSS.\n\n### Console + network \u2014 filter, don't dump\n\n- `observe({kind:\"console\", filters:{level_eq:\"error\"}})` \u2014 just JS errors.\n- `observe({kind:\"network\", filters:{status_gte:400}})` \u2014 just failed requests.\n- `limit` caps rows when you need only the latest few.\n\nCheck both after actions that plausibly error (submits, navigations, API calls) \u2014\nnot mechanically after every `act`. Record what you find as `console`/`network`\nbugs: request URL or error message as `detail`, screenshot path as `evidence`.\n\n### Network rows carry the WHY\n\nEach row is a full exchange: `method`, `url`, `status`, `ok`, `durationMs`, plus\n`requestBody`, `responseBody` and redacted `requestHeaders`/`responseHeaders` for\n`fetch`/`xhr`.\n\n**A failing request is half-reported without its `responseBody`.** NEVER stop at\n\"POST /api/x returned 400\" \u2014 quote what the server said\n(`{\"error\":\"password too short\"}`); that string turns a finding into a fix. The\n`requestBody` shows whether the UI even sent what you typed.\n\nCredential header values arrive as `<redacted, N chars>` \u2014 deliberate. Presence is\nwhat you need (a missing `cookie` explains a 401), never the secret.\n\n- `filters:{duration_gte:1000}` \u2014 slow enough to be a UX bug.\n- `filters:{body_contains:\"error\"}` \u2014 failures that still returned 200.\n\nA default `network` read hides SUCCESSFUL static assets and reports the count as\n`hidden` \u2014 on a dev server they outnumber API calls ~15:1. Failed assets are always\nshown (a 404 image is a real bug). Inspect assets deliberately:\n`observe({kind:\"network\", filters:{resource_in:[\"script\",\"stylesheet\",\"image\"]}})`.\n\n### iframes \u2014 already in the tree\n\n`observe({kind:\"tree\"})` reads embedded documents (payment fields, editors, consent\nscreens). A node inside one carries `frame` = the iframe URL; its `bounds` are page\ncoordinates, so clicking needs nothing special. A selector that mysteriously fails\non a node you can see \u2192 check for `frame`, and prefer clicking the node object.\n\n### Tabs \u2014 a click can open one\n\nWith more than one tab open, every `act` result carries `tabs`\n(`index`, `url`, `title`, `active`). A click on an external link, an OAuth button\nor `target=\"_blank\"` opens a new tab and **you stay on the old one** \u2014 a click that\nseems to have done nothing means check `tabs` before calling the button broken.\n\n- `observe({kind:\"tabs\"})` \u2014 list them.\n- `act({action:\"switch_tab\", target:\"1\"})` \u2014 drive tab 1 from now on. Console and\n network capture follow you; the previous tab's records are kept.\n\nSwitch back the same way when the popup flow is done.\n";
@@ -9,149 +9,128 @@
9
9
  export const WEB_ADDENDUM_PROMPT = `\
10
10
  ## Web target — CDP reach
11
11
 
12
- Your browser connection uses the Chrome DevTools Protocol (CDP).
13
- It reaches the current page: DOM, console, network, input, and screenshots.
14
- Use it deliberately.
15
-
16
- ### CDP domains and when to reach for each
17
-
18
- | Domain | What it gives you | Use via |
19
- |-------------|-------------------|---------|
20
- | \`Page\` | navigate, wait for load, capture screenshot | \`act({action:"navigate"})\`, \`observe({kind:"screenshot"})\` |
21
- | \`DOM\` | read/query the element tree, attributes, text | \`observe({kind:"tree"})\` |
22
- | \`Network\` | request/response status, failed requests, timing | \`observe({kind:"network"})\` |
23
- | \`Log\` | browser console messages, JS errors | \`observe({kind:"console"})\` |
24
-
25
- ### DOM-first rule
26
-
27
- Always try the structured path before asking for vision:
28
- 1. \`observe({kind:"tree"})\` — read element roles, names, bounds, enabled state.
29
- 2. If an element is not visible in the tree, try scrolling or waiting, then re-observe.
30
- 3. Use \`observe({kind:"console"})\` and \`observe({kind:"network"})\` (filtered — see
31
- below) after actions that plausibly trigger errors — errors land there before
32
- they surface visually.
33
- 4. Only after the tree gives you no answer: call \`look\` for pixels.
34
-
35
- ### Composing tree queries
36
-
37
- - \`query\` accepts: a bare HTML tag (\`span\`, \`img\`), CSS (\`.cart span\`),
38
- \`role "name"\` (\`button "Add to cart"\`), an explicit engine
39
- (\`data-testid=cart-count\`, \`text=Subscribe\`), or plain visible text.
40
- - Elements with a \`data-testid\` always appear in the default (no-query) tree with
41
- their \`testid\` — to read a counter/value, find its node and read \`name\` (the
42
- text content). Re-observe the same node after acting to verify a change.
43
- - \`within\` scopes the read: pass a selector string or a node OBJECT exactly as a
44
- previous observe returned it — never a JSON-stringified node.
45
-
46
- ### Invisible text & contrast — no vision needed
47
-
48
- Text-bearing nodes carry a \`style\` column = \`{ color, backgroundColor, contrast }\`
49
- (WCAG ratio 1–21). It is omitted by default — request it via \`fields:["role","name","style"]\`
50
- or sweep all text in ONE call:
12
+ Your browser connection is the Chrome DevTools Protocol: DOM, console, network,
13
+ input, screenshots on the current page.
14
+
15
+ | CDP domain | Gives you | Reach via |
16
+ |------------|-----------|-----------|
17
+ | \`Page\` | navigate, wait for load, screenshot | \`act({action:"navigate"})\`, \`observe({kind:"screenshot"})\` |
18
+ | \`DOM\` | element tree, attributes, text | \`observe({kind:"tree"})\` |
19
+ | \`Network\` | status, failed requests, timing | \`observe({kind:"network"})\` |
20
+ | \`Log\` | console messages, JS errors | \`observe({kind:"console"})\` |
21
+
22
+ ### DOM-first
23
+
24
+ 1. \`observe({kind:"tree"})\` — roles, names, bounds, enabled state.
25
+ 2. Element not in the tree → scroll or wait, then re-observe.
26
+ 3. \`observe({kind:"console"})\` + \`observe({kind:"network"})\` (filtered) after
27
+ actions that plausibly error — errors land there before they show visually.
28
+ 4. Only when the tree has no answer: \`look\`.
29
+
30
+ ### Tree queries
31
+
32
+ - \`query\` accepts: a bare tag (\`span\`, \`img\`), CSS (\`.cart span\`), \`role "name"\`
33
+ (\`button "Add to cart"\`), an engine (\`data-testid=cart-count\`, \`text=Subscribe\`),
34
+ or plain visible text.
35
+ - \`data-testid\` elements always appear in the default tree with their \`testid\`.
36
+ Read a counter/value from that node's \`name\` (its text). Re-observe the same
37
+ node after acting to confirm the change.
38
+ - \`within\` scopes a read: a selector string, or a node OBJECT exactly as a previous
39
+ observe returned it — NEVER a JSON-stringified node.
40
+
41
+ ### Contrast — no vision needed
42
+
43
+ Text nodes carry \`style\` = \`{ color, backgroundColor, contrast }\` (WCAG 1–21),
44
+ omitted by default. Request \`fields:["role","name","style"]\`, or sweep in ONE call:
51
45
  \`observe({kind:"tree", query:"p, span, div, a, li", filters:{contrast_lt: 4.5}})\`
52
- (returns only hard-to-read text; empty = contrast is fine). Flag \`contrast < 4.5\`
53
- as a \`medium\` visual finding and \`contrast < 1.5\` as \`high\` (the text is
54
- effectively invisible). Always run one contrast sweep when the goal mentions
55
- readability, contrast, or visual polish.
46
+ (returns only hard-to-read text; empty = fine). \`contrast < 4.5\` → \`medium\` visual
47
+ finding; \`< 1.5\` → \`high\` (effectively invisible). ALWAYS sweep once when the goal
48
+ mentions readability, contrast, or visual polish.
56
49
 
57
- ### Follow links by CLICKING them — never invent URLs
50
+ ### Follow links by CLICKING — never invent URLs
58
51
 
59
- The tree does not expose \`href\`s. To follow a link, \`act({action:"click"})\` its
60
- node. Do NOT fabricate a URL from a link's label (e.g. label "Help Center" →
61
- navigating to \`/help-center\`): a guessed URL that 404s is YOUR error, not a site
62
- bug. Only \`navigate\` to URLs given in the goal or seen in network entries. If a
63
- link's click target is hidden (e.g. inside a closed menu), click the parent menu
64
- item first, then re-observe.
52
+ The tree does not expose \`href\`s. \`act({action:"click"})\` the node. NEVER fabricate
53
+ a URL from a label ("Help Center" → \`/help-center\`) — a guessed URL that 404s is
54
+ YOUR error, not a site bug. Only \`navigate\` to URLs from the goal or from network
55
+ entries. Click target hidden inside a closed menu → click the parent menu item
56
+ first, then re-observe.
65
57
 
66
- ### Verify input from the TREE, never from vision
58
+ ### Verify input from the TREE, never vision
67
59
 
68
- Form controls carry their LIVE state in the tree: \`value\` (what an
69
- input/textarea/select currently holds) and \`checked\` (checkbox/radio). \`name\`
70
- stays the label, so you can still target the field by it.
60
+ Form controls carry live state: \`value\` (input/textarea/select) and \`checked\`
61
+ (checkbox/radio). \`name\` stays the label, so you can still target by it.
71
62
 
72
- After typing or toggling, confirm with one \`observe\`:
63
+ After typing or toggling:
73
64
  \`observe({kind:"tree", query:"input", fields:["name","value","checked"]})\`
74
65
 
75
- NEVER spend a \`look\` asking "did my text land?" or "is the box checked now?" —
76
- the tree answers exactly, instantly, and for free. Vision is for how things LOOK,
77
- not for reading back your own input.
66
+ NEVER spend a \`look\` on "did my text land?" or "is the box checked?" — the tree
67
+ answers exactly, instantly, free. Vision is for how things LOOK.
78
68
 
79
69
  ### Login bypass
80
70
 
81
- If the target has \`?debug-ai=true\` support (the app's captcha bypass gate),
82
- append it to the login URL before navigating. This skips captcha only — not auth.
83
- The app must have \`ALLOW_AI_DEBUG_LOGIN=true\` set in its environment.
71
+ Target supports \`?debug-ai=true\` (the app's captcha gate) → append it to the login
72
+ URL before navigating. Skips captcha only, not auth. Needs \`ALLOW_AI_DEBUG_LOGIN=true\`
73
+ in the app's environment.
84
74
 
85
- ### Selectors — use the node's \`target\`, don't invent one
75
+ ### Selectors — copy the node's \`target\`
86
76
 
87
- Most actionable nodes from \`observe({kind:"tree"})\` carry a ready-to-use \`target\`
88
- string (e.g. \`data-testid="cart-count"\` when the element has a test id, else
89
- \`role=button[name="Add to cart" i]\`, with \`>> nth=N\` when names repeat).
90
- When a node has a \`target\`, COPY it verbatim into \`act({action, target})\`.
91
- Do NOT hand-craft a selector — guessed CSS like \`button[name="..."]\` will not resolve.
77
+ Most actionable nodes carry a ready \`target\` (\`data-testid="cart-count"\`, else
78
+ \`role=button[name="Add to cart" i]\`, with \`>> nth=N\` when names repeat). COPY it
79
+ verbatim into \`act({action, target})\`. NEVER hand-craft a selector — guessed CSS
80
+ like \`button[name="..."]\` will not resolve.
92
81
 
93
- If a node has no \`target\` (unnamed/non-semantic, or a scoped \`within\`/\`filters\`
94
- read), you may pass its visible text as \`target\` (plain text resolves), or
95
- \`role "name"\`. Avoid XPath and positional CSS.
82
+ No \`target\` (unnamed node, or a scoped \`within\`/\`filters\` read) → pass its visible
83
+ text (plain text resolves) or \`role "name"\`. Avoid XPath and positional CSS.
96
84
 
97
85
  ### Console + network — filter, don't dump
98
86
 
99
- Both channels support \`filters\` and \`limit\` — use them instead of reading
100
- everything every time:
101
87
  - \`observe({kind:"console", filters:{level_eq:"error"}})\` — just JS errors.
102
88
  - \`observe({kind:"network", filters:{status_gte:400}})\` — just failed requests.
103
- - \`limit\` caps rows returned when you only need the latest few.
89
+ - \`limit\` caps rows when you need only the latest few.
104
90
 
105
- Check both after actions that plausibly trigger errors (submits, navigations,
106
- API calls) — not mechanically after every single \`act\`.
91
+ Check both after actions that plausibly error (submits, navigations, API calls) —
92
+ not mechanically after every \`act\`. Record what you find as \`console\`/\`network\`
93
+ bugs: request URL or error message as \`detail\`, screenshot path as \`evidence\`.
107
94
 
108
- Record any errors as \`console\` or \`network\` bugs with the request URL / error
109
- message as \`detail\` and the screenshot path as \`evidence\` when relevant.
95
+ ### Network rows carry the WHY
110
96
 
111
- ### Network entries carry the WHY, not just the status
97
+ Each row is a full exchange: \`method\`, \`url\`, \`status\`, \`ok\`, \`durationMs\`, plus
98
+ \`requestBody\`, \`responseBody\` and redacted \`requestHeaders\`/\`responseHeaders\` for
99
+ \`fetch\`/\`xhr\`.
112
100
 
113
- Each row is a full exchange: \`method\`, \`url\`, \`status\`, \`ok\`, \`durationMs\`,
114
- and for API calls (\`fetch\`/\`xhr\`) the \`requestBody\`, \`responseBody\`, and
115
- redacted \`requestHeaders\`/\`responseHeaders\`.
101
+ **A failing request is half-reported without its \`responseBody\`.** NEVER stop at
102
+ "POST /api/x returned 400" — quote what the server said
103
+ (\`{"error":"password too short"}\`); that string turns a finding into a fix. The
104
+ \`requestBody\` shows whether the UI even sent what you typed.
116
105
 
117
- **A failing request is only half-reported without its \`responseBody\`.** When a
118
- submit fails, do NOT stop at "POST /api/x returned 400" — read the row and quote
119
- what the server actually said (\`{"error":"password too short"}\`); that string is
120
- what turns a finding into a fix. Same for the \`requestBody\`: it shows whether the
121
- UI even sent what you typed.
106
+ Credential header values arrive as \`<redacted, N chars>\` — deliberate. Presence is
107
+ what you need (a missing \`cookie\` explains a 401), never the secret.
122
108
 
123
- Credential header values arrive as \`<redacted, N chars>\`. That is deliberate —
124
- presence is what you need (a missing \`cookie\` explains a 401), never the secret.
109
+ - \`filters:{duration_gte:1000}\` — slow enough to be a UX bug.
110
+ - \`filters:{body_contains:"error"}\` — failures that still returned 200.
125
111
 
126
- Other reads that pay off:
127
- - \`filters:{duration_gte:1000}\` — requests slow enough to be a UX bug.
128
- - \`filters:{body_contains:"error"}\` — failures that still returned HTTP 200.
129
-
130
- A default \`network\` read hides successful static assets (scripts, styles,
131
- images) and tells you how many via \`hidden\` — on a dev server they outnumber real
132
- API calls ~15:1 and would crowd out everything worth seeing. Failed assets are
133
- always shown (a 404 image is a real bug). To inspect assets deliberately, ask:
112
+ A default \`network\` read hides SUCCESSFUL static assets and reports the count as
113
+ \`hidden\` — on a dev server they outnumber API calls ~15:1. Failed assets are always
114
+ shown (a 404 image is a real bug). Inspect assets deliberately:
134
115
  \`observe({kind:"network", filters:{resource_in:["script","stylesheet","image"]}})\`.
135
116
 
136
117
  ### iframes — already in the tree
137
118
 
138
- \`observe({kind:"tree"})\` reads embedded documents too (payment fields, editors,
139
- consent screens). A node inside one carries \`frame\` = the iframe's URL; its
140
- \`bounds\` are page coordinates, so clicking it needs nothing special. If a
141
- selector mysteriously fails to resolve on a node you can see, check whether it
142
- has a \`frame\` — and prefer clicking the node object over a hand-written selector.
119
+ \`observe({kind:"tree"})\` reads embedded documents (payment fields, editors, consent
120
+ screens). A node inside one carries \`frame\` = the iframe URL; its \`bounds\` are page
121
+ coordinates, so clicking needs nothing special. A selector that mysteriously fails
122
+ on a node you can see → check for \`frame\`, and prefer clicking the node object.
143
123
 
144
124
  ### Tabs — a click can open one
145
125
 
146
- When more than one tab is open, every \`act\` result carries a \`tabs\` array
147
- (\`index\`, \`url\`, \`title\`, \`active\`). A click on an external link, an OAuth
148
- button, or \`target="_blank"\` opens a new tab and **you are still on the old one**
149
- — if a click seems to have done nothing, check \`tabs\` before concluding the
150
- button is broken.
126
+ With more than one tab open, every \`act\` result carries \`tabs\`
127
+ (\`index\`, \`url\`, \`title\`, \`active\`). A click on an external link, an OAuth button
128
+ or \`target="_blank"\` opens a new tab and **you stay on the old one** — a click that
129
+ seems to have done nothing means check \`tabs\` before calling the button broken.
151
130
 
152
- - \`observe({kind:"tabs"})\` — list them any time.
131
+ - \`observe({kind:"tabs"})\` — list them.
153
132
  - \`act({action:"switch_tab", target:"1"})\` — drive tab 1 from now on. Console and
154
- network capture follow you; what the previous tab recorded is kept.
133
+ network capture follow you; the previous tab's records are kept.
155
134
 
156
135
  Switch back the same way when the popup flow is done.
157
136
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"web-addendum.js","sourceRoot":"","sources":["../../../src/agent/prompts/web-addendum.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJlC,CAAC"}
1
+ {"version":3,"file":"web-addendum.js","sourceRoot":"","sources":["../../../src/agent/prompts/web-addendum.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HlC,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -36,6 +36,10 @@ export declare class ExecTimeoutError extends AdapterError {
36
36
  export declare class AdbError extends AdapterError {
37
37
  constructor(message: string);
38
38
  }
39
+ /** The per-project workspace could not be managed — e.g. old session dirs that refuse to prune. */
40
+ export declare class WorkspaceError extends UiDebuggerError {
41
+ constructor(message: string);
42
+ }
39
43
  export declare class AgentError extends UiDebuggerError {
40
44
  constructor(message: string);
41
45
  }
package/dist/errors.js CHANGED
@@ -72,6 +72,14 @@ export class AdbError extends AdapterError {
72
72
  Object.setPrototypeOf(this, AdbError.prototype);
73
73
  }
74
74
  }
75
+ /** The per-project workspace could not be managed — e.g. old session dirs that refuse to prune. */
76
+ export class WorkspaceError extends UiDebuggerError {
77
+ constructor(message) {
78
+ super(message);
79
+ this.name = 'WorkspaceError';
80
+ Object.setPrototypeOf(this, WorkspaceError.prototype);
81
+ }
82
+ }
75
83
  export class AgentError extends UiDebuggerError {
76
84
  constructor(message) {
77
85
  super(message);
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe,EAAE,OAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,eAAe;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,G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AAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare const NAME = "ui-debugger-mcp";
2
- export declare const VERSION = "1.4.0";
2
+ export declare const VERSION = "1.5.1";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Public package surface. Implementation lands incrementally — see idea/ for design.
2
2
  export const NAME = 'ui-debugger-mcp';
3
- export const VERSION = '1.4.0';
3
+ export const VERSION = '1.5.1';
4
4
  //# sourceMappingURL=index.js.map
@@ -23,6 +23,7 @@ import { createActTrail } from '../agent/belt/trail.js';
23
23
  import { createDebugAgent, runDebugLoop } from '../agent/loop.js';
24
24
  import { composeSystemPrompt } from '../agent/prompts/compose.js';
25
25
  import { ConfigError, TargetNotFoundError } from '../errors.js';
26
+ import { pruneSessions, SESSION_RETENTION } from '../session/cleanup.js';
26
27
  import { FindingsStore } from '../session/findings-store.js';
27
28
  import { Session } from '../session/session.js';
28
29
  import { ensureSession, resolveProfileDir, sessionPaths, } from '../session/workspace.js';
@@ -172,6 +173,11 @@ export async function buildSession(deps, params) {
172
173
  const addendum = addendumTarget(targetConfig.adapter);
173
174
  const paths = sessionPaths(workspace, id);
174
175
  await ensureSession(paths);
176
+ // Housekeeping, before a browser is launched and before this run writes a byte:
177
+ // keep the newest `SESSION_RETENTION` runs (this one included — it sorts newest)
178
+ // and drop the rest, so the workspace stops growing forever. `protect` pins this
179
+ // run's dir even if the clock moved backwards since the previous one.
180
+ await pruneSessions(workspace, { keep: SESSION_RETENTION, protect: id });
175
181
  const criteriaLines = splitCriteria(criteria);
176
182
  const address = openAddress(targetConfig);
177
183
  const origin = runOrigin(targetConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"session-builder.js","sourceRoot":"","sources":["../../src/services/session-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MA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;KACJ,CAAC;AACJ,CAAC"}
@@ -41,7 +41,7 @@ export type SummaryGenerate = (req: SummaryRequest) => Promise<{
41
41
  * reply to one tight, actionable paragraph so any competent text model behaves the
42
42
  * same (never relies on a 3rd-party default).
43
43
  */
44
- export declare const SUMMARY_SYSTEM_PROMPT = "You are the summary guy \u2014 you condense a UI debug run into one paragraph for the\nsmart agent that will fix the code.\nYou are given the run's verdict plus every functional bug and visual issue it found.\nWrite ONE plain-text paragraph (no markdown, no lists, no headings, no preamble) that\nstates the verdict, then what broke, where, and what to fix \u2014 concrete and ordered by\nseverity. If nothing broke, say so plainly. Output only the paragraph.\n\nReport ONLY what the findings below contain. Never infer or invent a cause that is not\nthere: no crashes, exceptions, missing dependencies or build problems unless a bug or\nconsole error in the input actually says so. A \"failed\" verdict with no bugs listed\nmeans the run did not reach a conclusion \u2014 say exactly that, and do not diagnose it.\nSpeculation here is worse than silence: it sends the smart agent chasing a bug that\ndoes not exist.";
44
+ export declare const SUMMARY_SYSTEM_PROMPT = "You are the summary guy \u2014 you condense a UI debug run into one paragraph for the\nsmart agent that will fix the code. You get the verdict plus every functional bug\nand visual issue found.\n\nWrite ONE plain-text paragraph \u2014 no markdown, no lists, no headings, no preamble.\nState the verdict, then what broke, where, and what to fix: concrete, ordered by\nseverity. Nothing broke \u2192 say so plainly. Output only the paragraph.\n\nReport ONLY what the findings contain. NEVER infer a cause that is not there \u2014 no\ncrashes, exceptions, missing dependencies or build problems unless a bug or console\nerror says so. A \"failed\" verdict with no bugs listed means the run reached no\nconclusion: say exactly that, do not diagnose it. Speculation is worse than silence\n\u2014 it sends the smart agent chasing a bug that does not exist.";
45
45
  /**
46
46
  * Render the findings into the compact, plain-text digest the summary model reasons
47
47
  * over: the verdict, then the functional bugs and visual issues (or "none").