chrome-devtools-mcp 0.24.0 → 0.26.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/README.md +23 -6
- package/build/src/McpPage.js +4 -4
- package/build/src/McpResponse.js +18 -16
- package/build/src/TextSnapshot.js +2 -2
- package/build/src/ToolHandler.js +188 -0
- package/build/src/bin/chrome-devtools-cli-options.js +28 -5
- package/build/src/bin/chrome-devtools-mcp-cli-options.js +8 -5
- package/build/src/bin/chrome-devtools-mcp-main.js +4 -8
- package/build/src/bin/chrome-devtools.js +0 -2
- package/build/src/index.js +9 -164
- package/build/src/telemetry/ClearcutLogger.js +27 -0
- package/build/src/telemetry/errors.js +14 -0
- package/build/src/telemetry/types.js +0 -8
- package/build/src/third_party/THIRD_PARTY_NOTICES +12 -14
- package/build/src/third_party/bundled-packages.json +3 -3
- package/build/src/third_party/devtools-formatter-worker.js +49 -33
- package/build/src/third_party/devtools-heap-snapshot-worker.js +60 -44
- package/build/src/third_party/index.js +2138 -1352
- package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
- package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +4236 -4219
- package/build/src/tools/categories.js +6 -3
- package/build/src/tools/input.js +72 -7
- package/build/src/tools/lighthouse.js +7 -7
- package/build/src/tools/pages.js +5 -5
- package/build/src/tools/{inPage.js → thirdPartyDeveloper.js} +15 -15
- package/build/src/tools/tools.js +2 -2
- package/build/src/tools/webmcp.js +2 -4
- package/build/src/version.js +1 -1
- package/package.json +7 -8
|
@@ -125,6 +125,15 @@ const HOST_RUNTIME$2 = {
|
|
|
125
125
|
return new WebWorker(url);
|
|
126
126
|
},
|
|
127
127
|
workerScope: new WebWorkerScope(),
|
|
128
|
+
getOnLine() {
|
|
129
|
+
return navigator.onLine;
|
|
130
|
+
},
|
|
131
|
+
getUserAgent() {
|
|
132
|
+
return navigator.userAgent;
|
|
133
|
+
},
|
|
134
|
+
getLocalStorage() {
|
|
135
|
+
return 'localStorage' in globalThis ? globalThis.localStorage : undefined;
|
|
136
|
+
},
|
|
128
137
|
};
|
|
129
138
|
|
|
130
139
|
var HostRuntime$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -207,6 +216,15 @@ const HOST_RUNTIME$1 = {
|
|
|
207
216
|
return new NodeWorker(url);
|
|
208
217
|
},
|
|
209
218
|
workerScope: new NodeWorkerScope(),
|
|
219
|
+
getOnLine() {
|
|
220
|
+
return true;
|
|
221
|
+
},
|
|
222
|
+
getUserAgent() {
|
|
223
|
+
return 'Node.js';
|
|
224
|
+
},
|
|
225
|
+
getLocalStorage() {
|
|
226
|
+
return undefined;
|
|
227
|
+
},
|
|
210
228
|
};
|
|
211
229
|
|
|
212
230
|
var HostRuntime = /*#__PURE__*/Object.freeze({
|
|
@@ -743,50 +761,6 @@ var HeapSnapshotModel$1 = /*#__PURE__*/Object.freeze({
|
|
|
743
761
|
baseUnreachableDistance: baseUnreachableDistance
|
|
744
762
|
});
|
|
745
763
|
|
|
746
|
-
// Copyright 2025 The Chromium Authors
|
|
747
|
-
class WritableDevToolsContext {
|
|
748
|
-
#instances = new Map();
|
|
749
|
-
get(ctor) {
|
|
750
|
-
const instance = this.#instances.get(ctor);
|
|
751
|
-
if (!instance) {
|
|
752
|
-
throw new Error(`No instance for ${ctor.name}. Ensure the bootstrapper creates it.`);
|
|
753
|
-
}
|
|
754
|
-
return instance;
|
|
755
|
-
}
|
|
756
|
-
has(ctor) {
|
|
757
|
-
return this.#instances.has(ctor);
|
|
758
|
-
}
|
|
759
|
-
set(ctor, instance) {
|
|
760
|
-
this.#instances.set(ctor, instance);
|
|
761
|
-
}
|
|
762
|
-
delete(ctor) {
|
|
763
|
-
this.#instances.delete(ctor);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
let gInstance = null;
|
|
767
|
-
function globalInstance() {
|
|
768
|
-
if (!gInstance) {
|
|
769
|
-
gInstance = new WritableDevToolsContext();
|
|
770
|
-
}
|
|
771
|
-
return gInstance;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
// Copyright 2026 The Chromium Authors
|
|
775
|
-
var ExperimentName;
|
|
776
|
-
(function (ExperimentName) {
|
|
777
|
-
ExperimentName["ALL"] = "*";
|
|
778
|
-
ExperimentName["CAPTURE_NODE_CREATION_STACKS"] = "capture-node-creation-stacks";
|
|
779
|
-
ExperimentName["LIVE_HEAP_PROFILE"] = "live-heap-profile";
|
|
780
|
-
ExperimentName["PROTOCOL_MONITOR"] = "protocol-monitor";
|
|
781
|
-
ExperimentName["TIMELINE_INVALIDATION_TRACKING"] = "timeline-invalidation-tracking";
|
|
782
|
-
ExperimentName["FONT_EDITOR"] = "font-editor";
|
|
783
|
-
ExperimentName["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints";
|
|
784
|
-
ExperimentName["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes";
|
|
785
|
-
ExperimentName["TIMELINE_DEBUG_MODE"] = "timeline-debug-mode";
|
|
786
|
-
ExperimentName["DURABLE_MESSAGES"] = "durable-messages";
|
|
787
|
-
ExperimentName["JPEG_XL"] = "jpeg-xl";
|
|
788
|
-
})(ExperimentName || (ExperimentName = {}));
|
|
789
|
-
|
|
790
764
|
// Copyright 2020 The Chromium Authors
|
|
791
765
|
const BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
792
766
|
const BASE64_CODES = new Uint8Array(123);
|
|
@@ -2832,6 +2806,48 @@ const LAYOUT_LINES_HIGHLIGHT_COLOR = [127, 32, 210];
|
|
|
2832
2806
|
Mask: Legacy.fromRGBA([248, 249, 249, 1]),
|
|
2833
2807
|
});
|
|
2834
2808
|
|
|
2809
|
+
// Copyright 2025 The Chromium Authors
|
|
2810
|
+
class WritableDevToolsContext {
|
|
2811
|
+
#instances = new Map();
|
|
2812
|
+
get(ctor) {
|
|
2813
|
+
const instance = this.#instances.get(ctor);
|
|
2814
|
+
if (!instance) {
|
|
2815
|
+
throw new Error(`No instance for ${ctor.name}. Ensure the bootstrapper creates it.`);
|
|
2816
|
+
}
|
|
2817
|
+
return instance;
|
|
2818
|
+
}
|
|
2819
|
+
has(ctor) {
|
|
2820
|
+
return this.#instances.has(ctor);
|
|
2821
|
+
}
|
|
2822
|
+
set(ctor, instance) {
|
|
2823
|
+
this.#instances.set(ctor, instance);
|
|
2824
|
+
}
|
|
2825
|
+
delete(ctor) {
|
|
2826
|
+
this.#instances.delete(ctor);
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
let gInstance = null;
|
|
2830
|
+
function globalInstance() {
|
|
2831
|
+
if (!gInstance) {
|
|
2832
|
+
gInstance = new WritableDevToolsContext();
|
|
2833
|
+
}
|
|
2834
|
+
return gInstance;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
// Copyright 2026 The Chromium Authors
|
|
2838
|
+
var ExperimentName;
|
|
2839
|
+
(function (ExperimentName) {
|
|
2840
|
+
ExperimentName["ALL"] = "*";
|
|
2841
|
+
ExperimentName["CAPTURE_NODE_CREATION_STACKS"] = "capture-node-creation-stacks";
|
|
2842
|
+
ExperimentName["PROTOCOL_MONITOR"] = "protocol-monitor";
|
|
2843
|
+
ExperimentName["TIMELINE_INVALIDATION_TRACKING"] = "timeline-invalidation-tracking";
|
|
2844
|
+
ExperimentName["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints";
|
|
2845
|
+
ExperimentName["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes";
|
|
2846
|
+
ExperimentName["TIMELINE_DEBUG_MODE"] = "timeline-debug-mode";
|
|
2847
|
+
ExperimentName["DURABLE_MESSAGES"] = "durable-messages";
|
|
2848
|
+
ExperimentName["JPEG_XL"] = "jpeg-xl";
|
|
2849
|
+
})(ExperimentName || (ExperimentName = {}));
|
|
2850
|
+
|
|
2835
2851
|
// Copyright 2021 The Chromium Authors
|
|
2836
2852
|
class ObjectWrapper {
|
|
2837
2853
|
listeners;
|