pagebolt-mcp 1.11.0 → 1.12.0
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 +1 -1
- package/server.json +2 -2
- package/src/index.mjs +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pagebolt-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
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
|
+
"version": "1.12.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "pagebolt-mcp",
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.12.0",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
package/src/index.mjs
CHANGED
|
@@ -615,6 +615,7 @@ server.tool(
|
|
|
615
615
|
blockTrackers: z.boolean().optional().describe('Block tracking scripts'),
|
|
616
616
|
deviceScaleFactor: z.number().min(1).max(3).optional().describe('Device pixel ratio (default: 1)'),
|
|
617
617
|
session_id: z.string().optional().describe('Persistent session ID (Starter+ only). Reuse a live browser page created with create_session — browser state (cookies, localStorage, auth) carries over from previous requests in this session.'),
|
|
618
|
+
observeAfterEachStep: z.boolean().optional().describe('FREE (no extra request charged). After every step, attach a compact, token-budgeted state snapshot — page type + the top interactive elements (id/role/name/selector) + suggested actions, NO screenshot. Use this when a step might open a dropdown/popover/modal or navigate: read the trace to confirm what is now on screen and pick the right selector for the NEXT call, instead of blind-batching. Hidden/off-screen elements are filtered out.'),
|
|
618
619
|
},
|
|
619
620
|
async (params) => {
|
|
620
621
|
if (!params.steps || params.steps.length === 0) {
|
|
@@ -680,6 +681,22 @@ server.tool(
|
|
|
680
681
|
}
|
|
681
682
|
summary += `\nUsage: ${data.usage.outputs_charged} request(s) charged, ${data.usage.remaining} remaining.`;
|
|
682
683
|
|
|
684
|
+
// Phase 3: render the compact per-step state trace (free) so the agent can
|
|
685
|
+
// course-correct on its NEXT call — e.g. notice a popover opened.
|
|
686
|
+
const traced = (data.step_results || []).filter(s => s && s.state);
|
|
687
|
+
if (traced.length > 0) {
|
|
688
|
+
const lines = traced.map(s => {
|
|
689
|
+
const st = s.state;
|
|
690
|
+
if (st.error) return ` • step ${s.step_index} (${s.action}): [state unavailable]`;
|
|
691
|
+
const els = (st.elements || []).slice(0, 6)
|
|
692
|
+
.map(e => `${e.id}:${e.role}${e.name ? ` "${e.name}"` : ''}`).join(', ');
|
|
693
|
+
const acts = (st.actions || []).map(a => a.intent).join(', ');
|
|
694
|
+
return ` • step ${s.step_index} (${s.action}) → ${st.pageType} @ ${st.url}\n` +
|
|
695
|
+
` elements: ${els || '(none)'}` + (acts ? `\n actions: ${acts}` : '');
|
|
696
|
+
});
|
|
697
|
+
summary += `\n\nState trace (observeAfterEachStep — free):\n${lines.join('\n')}`;
|
|
698
|
+
}
|
|
699
|
+
|
|
683
700
|
content.push({ type: 'text', text: summary });
|
|
684
701
|
return { content };
|
|
685
702
|
} catch (err) {
|