pagebolt-mcp 1.9.0 → 1.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pagebolt-mcp",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "MCP server for PageBolt — take screenshots, generate PDFs, create OG images, inspect pages, record demo videos with Audio Guide narration, from AI coding assistants like Claude, Cursor, and Windsurf.",
5
5
  "main": "src/index.mjs",
6
6
  "module": "src/index.mjs",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/Custodia-Admin/pagebolt-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.9.0",
9
+ "version": "1.9.1",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "pagebolt-mcp",
14
- "version": "1.9.0",
14
+ "version": "1.9.1",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },
package/src/index.mjs CHANGED
@@ -61,7 +61,7 @@ async function callApi(endpoint, options = {}) {
61
61
  const method = options.method || 'GET';
62
62
  const headers = {
63
63
  'x-api-key': API_KEY,
64
- 'user-agent': 'pagebolt-mcp/1.9.0',
64
+ 'user-agent': 'pagebolt-mcp/1.9.1',
65
65
  ...(options.body ? { 'Content-Type': 'application/json' } : {}),
66
66
  };
67
67
  const body = options.body ? JSON.stringify(options.body) : undefined;
@@ -191,6 +191,29 @@ When building sequences or videos, ALWAYS use inspect_page first to discover rel
191
191
 
192
192
  This avoids guessing selectors like "#submit" when the actual element is "#submitBtn".
193
193
 
194
+ ## Handling Dynamic UI: Dropdowns, Popovers, and Modals
195
+
196
+ Clicking menus, avatars, profile icons, "⋯" buttons, hamburger toggles, or anything that opens a dropdown/popover/modal creates an overlay that floats ABOVE the page. This is the #1 cause of broken multi-step automations:
197
+ - Subsequent steps get visually obscured by the still-open overlay.
198
+ - A click intended for the underlying page lands on the overlay (or its backdrop) and navigates somewhere unexpected.
199
+
200
+ Rules:
201
+ 1. **Don't open menus you don't need.** For a high-level tour, navigate directly to the destination URL (from inspect_page / observe_page) instead of clicking through a dropdown.
202
+ 2. **If you open an overlay, the very next step must commit to it** — either interact with an element INSIDE the overlay, or explicitly close it before continuing. There is no "press_key" action, so close an overlay with an evaluate step (note: max 2 evaluate steps per sequence):
203
+ { "action": "evaluate", "script": "document.activeElement&&document.activeElement.blur&&document.activeElement.blur();document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));" }
204
+ (Clicking a blank area can also work, but may hit the overlay backdrop and navigate — prefer the evaluate approach or click a known-safe element.)
205
+ 3. **Never chain clicks across a state change you haven't re-perceived.** Selectors gathered before a menu opened or a route changed may now point at the wrong (or covered) element.
206
+
207
+ ## Re-perceive Between Actions (avoid getting lost)
208
+
209
+ run_sequence and record_video execute a FIXED, pre-planned list of steps — they do NOT re-check the page between steps. For anything beyond a short, predictable flow, work iteratively instead of blind-batching:
210
+ 1. observe_page (or take_screenshot) to see the CURRENT state.
211
+ 2. Perform ONE meaningful action (a short run_sequence, or a single click/fill).
212
+ 3. observe_page / take_screenshot AGAIN, then choose the next action from the fresh result.
213
+ Repeat. This is how an agent recovers from unexpected popovers, redirects, or layout shifts. Use session_id (create_session, Starter+) on run_sequence to keep cookies/auth/scroll state across these iterations.
214
+
215
+ For record_video specifically (one continuous capture, no mid-recording re-perception): keep the flow short and predictable, use ONLY selectors verified via inspect_page/observe_page, and add a dismiss step after anything that could open an overlay.
216
+
194
217
  ## Visual Diff
195
218
 
196
219
  Use visual_diff to compare two pages pixel-by-pixel. Returns a diff image with changed pixels highlighted in red.
@@ -261,7 +284,7 @@ Use blockBanners on almost every request to get clean captures. Combine blockAds
261
284
  function createConfiguredServer() {
262
285
  const srv = new McpServer({
263
286
  name: 'pagebolt',
264
- version: '1.9.0',
287
+ version: '1.9.1',
265
288
  }, {
266
289
  instructions: SERVER_INSTRUCTIONS,
267
290
  });
@@ -1454,6 +1477,9 @@ Based on the inspection and the description, plan 5–12 action steps. Rules:
1454
1477
  { "action": "wait", "ms": 1500, "live": true }
1455
1478
  - Do NOT pad with wait steps between steps that don't need load time — pace handles inter-step timing automatically.
1456
1479
  - Do NOT use zoom unless the user explicitly asked for it.
1480
+ - **Avoid opening dropdowns/menus/popovers** unless the demo is specifically about their contents — they stay open and obscure or misdirect later steps. Prefer navigating directly to the target URL (from the inspection) over clicking through a menu. The recording cannot re-check the page between steps, so a stuck-open overlay will break everything after it.
1481
+ - If a step DOES open an overlay, the next step must either act on an element inside it or close it. There is no key-press action; close with an evaluate step (max 2 per video):
1482
+ { "action": "evaluate", "script": "document.activeElement&&document.activeElement.blur&&document.activeElement.blur();document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));" }
1457
1483
 
1458
1484
  **Step 3 — Write the narration script**
1459
1485
  Write an audioGuide.script that matches the step count. Format: