You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: make pageId routing always-on and fix waitForEventsAfterAction page isolation
Remove the experimental-page-id-routing gate so pageId is always exposed
on page-scoped tools. This prevents race conditions in multi-agent
workflows where concurrent select_page calls can cause tools to operate
on the wrong page.
Key changes:
- Remove experimentalPageIdRouting gate from schema injection and page
resolution in index.ts
- Add explicit page parameter to waitForEventsAfterAction so it uses the
correct page's emulation settings instead of the global selected page
- Update all page-scoped tool handlers (input, pages, script) to pass
the explicit page to waitForEventsAfterAction
- Unify evaluate_script's pageId handling with the standard pattern
- Deprecate --experimental-page-id-routing CLI flag (now always enabled)
- Add E2E tests for pageId routing, race condition simulation, and
per-page emulation isolation
**Description:** Select a page as a context for future tool calls.
196
+
**Description:** Select a page as a context for future tool calls. For multi-agent workflows, prefer passing pageId directly to each tool instead of using [`select_page`](#select_page).
197
197
198
198
**Parameters:**
199
199
@@ -333,6 +333,7 @@ so returned values have to be JSON-serializable.
333
333
}`
334
334
335
335
-**args** (array) _(optional)_: An optional list of arguments to pass to the function.
336
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
"Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode.",
136
150
required: false,
137
151
},
152
+
pageId: {
153
+
name: 'pageId',
154
+
type: 'number',
155
+
description:
156
+
'Targets a specific page by ID. Use list_pages to get available page IDs. If omitted, operates on the most recently selected page.',
'The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).',
506
612
required: false,
507
613
},
614
+
pageId: {
615
+
name: 'pageId',
616
+
type: 'number',
617
+
description:
618
+
'Targets a specific page by ID. Use list_pages to get available page IDs. If omitted, operates on the most recently selected page.',
'The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).',
520
633
required: false,
521
634
},
635
+
pageId: {
636
+
name: 'pageId',
637
+
type: 'number',
638
+
description:
639
+
'Targets a specific page by ID. Use list_pages to get available page IDs. If omitted, operates on the most recently selected page.',
'Targets a specific page by ID. Use list_pages to get available page IDs. If omitted, operates on the most recently selected page.',
694
+
required: false,
695
+
},
562
696
},
563
697
},
564
698
select_page: {
565
-
description: 'Select a page as a context for future tool calls.',
699
+
description:
700
+
'Select a page as a context for future tool calls. For multi-agent workflows, prefer passing pageId directly to each tool instead of using select_page.',
0 commit comments