Repository navigation
feat: add --watchConfig to apply config file changes without restarting - #2878
Closed
Lightning00Blade wants to merge 6 commits into
Closed
Lightning00Blade wants to merge 6 commits into
Lightning00Blade wants to merge 6 commits into
Conversation
Lightning00Blade
force-pushed
the
cd4a-config/4-apply-config
branch
from
September 30, 2026 08:13
221225b to
16470e0
Compare
Lightning00Blade
force-pushed
the
cd4a-config/5-watch-config
branch
from
September 30, 2026 08:13
832c986 to
14955c8
Compare
Lightning00Blade
force-pushed
the
cd4a-config/4-apply-config
branch
from
September 30, 2026 08:23
16470e0 to
b86222b
Compare
Lightning00Blade
force-pushed
the
cd4a-config/5-watch-config
branch
2 times, most recently
from
September 30, 2026 08:28
9401679 to
eb63f21
Compare
Lightning00Blade
force-pushed
the
cd4a-config/4-apply-config
branch
from
September 30, 2026 08:28
b86222b to
07e645f
Compare
Prepares the server for applying configuration changes at runtime. - createTools() always returns every tool. The DevTools comments tools are gated by their `devtoolsComments` condition like other tools, instead of not being created. - Slim tools are marked with `slim: true`. Slim mode selects which set of tools is registered, so slim tools may reuse the names of regular tools and other tools do not need a "not slim" condition. - McpServer keeps the registered tool handles so tools can be updated in place, and declares the `tools.listChanged` capability with debounced `notifications/tools/list_changed`. - The docs, CLI and metrics scripts use the single tool list. The DevTools comments tools are now tracked in the tool call metrics.
Moves the options passed to Puppeteer (viewport, acceptInsecureCerts, blockedUrlPattern, allowedUrlPattern) to `puppeteer-options.ts` and the options that change the default behavior of tools (screenshot*) to `tool-options.ts`. This makes it possible to tell which options require a restart when they change.
The config file is searched for in the following locations, the first
existing file wins and files are not merged:
1. `--config`
2. `${CWD}/cd4a.config.json`
3. `${PLUGIN_DATA}/cd4a.config.json`
4. `$XDG_CONFIG_HOME/cd4a/config.json` on macOS and Linux,
`%LOCALAPPDATA%/Google/cd4a/config.json` on Windows, with a fallback to
`~/.config/cd4a/config.json`.
Discovery is only enabled when a ConfigLocator is passed to ConfigParser,
which the entry points do. Setting `CHROME_DEVTOOLS_MCP_NO_CONFIG_DISCOVERY`
turns it off, the test runner sets it so tests never pick up a developer's
config file.
fix
Adds McpServer.applyConfig(), which updates all registered tools in place (resulting in a single `tools/list_changed` notification) and applies the live options to the existing McpContext. Options that are only read on startup, such as the browser and Puppeteer options, are listed in RESTART_REQUIRED_OPTIONS. Slim mode is kept as started.
When `--watchConfig` is passed, the config file is watched and changes are applied via applyConfig(). Watching is off by default. - The directory of the real file is watched, so symlinks and atomic saves are handled. - Changes are debounced with the DevTools debouncer. - An invalid config file is logged to stderr and the previous configuration is kept. - Changes to options that require a restart are logged to stderr.
Lightning00Blade
force-pushed
the
cd4a-config/4-apply-config
branch
from
September 30, 2026 09:55
07e645f to
6936b16
Compare
Lightning00Blade
force-pushed
the
cd4a-config/5-watch-config
branch
from
September 30, 2026 09:56
eb63f21 to
cdd92e7
Compare
Lightning00Blade
force-pushed
the
cd4a-config/4-apply-config
branch
2 times, most recently
from
September 30, 2026 15:59
106a591 to
4a9209b
Compare
This was referenced Oct 6, 2026
Lightning00Blade
force-pushed
the
cd4a-config/4-apply-config
branch
from
October 8, 2026 13:38
343f4c7 to
d5f7388
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
--watchConfigis passed, the config file is watched and changes areapplied via applyConfig(). Watching is off by default.
are handled.
is kept.
Stack created with GitHub Stacks CLI • Give Feedback 💬