Removes `--experimental-page-id-routing` making it the default behavior.
To go back to the previous behavior, pass `--pageIdRouting=false` when
starting the server.
---------
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
Co-authored-by: Samiya Caur <samiyac@google.com>
This changes the internal responsibility: validatePath is the only place
that is expected to follow symlinks if it can. It then returns a
resolved path for all consumers in the MCP server who are expected not
to follow symlinks.
This is to be combined with the followSymlinks=false setting in
https://github.com/puppeteer/puppeteer/pull/15335
I noticed that we validate file paths locally that are handled by
potentially remote browsers. This PR extends `verifyFilesSchema` to
validate file paths for local or remote browsers or both + test
coverage.
---------
Co-authored-by: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com>
This puts relevant logs fields into the `ToolInvocationContext` object,
and moves construction logic all into `src/telemetry/transformation.ts`.
Objects are only logged if they have at least one attribute, following
existing convention.
Tests are refactored accordingly.
- remove obsolete devtools page detection step
- move isolated context processing out of the browser pages fetching
- move filtering of pages out of getPages(). That should just be a
getter.
## Summary
- register tool input schemas as passthrough so extra named arguments
reach ToolHandler validation
- report unknown arguments with an explicit error that names the unknown
and expected arguments
- stop before invoking tool handlers when unknown arguments are present
- add ToolHandler coverage for reporting an extra argument
Fixes#1940
## Tests
- `npm run check-format`
- `npx tsc --noEmitOnError false` *(emits build artifacts but still
reports the existing `chrome-devtools-frontend` type conflict in
`ModelImpl.ts`)*
- `node --experimental-strip-types --no-warnings=ExperimentalWarning
scripts/post-build.ts`
- `NODE_TEST_REPORTER=spec npm run test:no-build --
tests/ToolHandler.test.ts`