/** * Parse chrome-devtools-mcp `list_pages` output for display, and identify * page-scoped tools. * * MCP 1.8+ requires `pageId` on page-scoped tools by default (`pageIdRouting`). * Routing injects AXI's last `select_page` / `new_page` id from session * state (`src/selected-page.ts`); this parser is display-only for the CLI * `pages` command. Do not feed `parseSelectedPageId` or `parsePagesList` * into `callTool` injection. */ export type PageListEntry = { id: number; url: string; selected: boolean; }; /** * MCP tools AXI wraps that are page-scoped. chrome-devtools-mcp 1.8+ requires * `pageId` on these when `--pageIdRouting` is on (the default). Browser-scoped * tools (`list_pages`, `new_page`, `select_page`, `close_page`) are omitted: * they either take no page, create one, or take a caller-supplied target id. * * Keep this in sync with AXI call sites in `src/cli.ts` / `src/run.ts` and * the upstream page-scoped set. Adding a tool AXI does not call is harmless; * omitting one AXI does call reintroduces `Required at pageId`. */ export declare const PAGE_SCOPED_TOOLS: ReadonlySet; /** * True when AXI must supply `pageId` before forwarding `name` to MCP. * * Skips tools that already carry a numeric `pageId`, and `evaluate_script` * aimed at a service worker (`serviceWorkerId` replaces `pageId` when * `--categoryExtensions` is on). */ export declare function needsPageId(name: string, args?: Record): boolean; /** * Parse MCP `list_pages` markdown into structured rows. * * Upstream formats each page as: * `: ` * `: (<url>)` * optionally followed by ` [selected]` and ` isolatedContext=<name>` * (`isolatedContext` is a free-form zod string and may contain spaces). * `[selected]` here is display-only; routing never reads this parse. */ export declare function parsePagesList(text: string): PageListEntry[]; /** Display helper: first `[selected]` id in `list_pages` text, or null. */ export declare function parseSelectedPageId(text: string): number | null;