chrome-devtools-frontend 1.0.1548870 → 1.0.1549484
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/docs/contributing/settings-experiments-features.md +35 -0
- package/docs/styleguide/ux/patterns.md +27 -0
- package/eslint.config.mjs +1 -0
- package/front_end/Tests.js +2 -0
- package/front_end/core/host/InspectorFrontendHost.ts +26 -558
- package/front_end/core/host/InspectorFrontendHostAPI.ts +6 -3
- package/front_end/core/host/InspectorFrontendHostStub.ts +558 -0
- package/front_end/core/host/ResourceLoader.ts +9 -23
- package/front_end/core/host/UserMetrics.ts +4 -4
- package/front_end/core/root/DevToolsContext.ts +4 -0
- package/front_end/core/root/Runtime.ts +10 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +24 -24
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -11
- package/front_end/core/sdk/CSSQuery.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +2 -2
- package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +3 -0
- package/front_end/core/sdk/NetworkManager.ts +29 -31
- package/front_end/core/sdk/NetworkRequest.ts +4 -0
- package/front_end/core/sdk/OverlayModel.ts +2 -2
- package/front_end/core/sdk/PageResourceLoader.ts +63 -37
- package/front_end/core/sdk/SourceMap.ts +6 -0
- package/front_end/core/sdk/SourceMapCache.ts +21 -0
- package/front_end/core/sdk/SourceMapManager.ts +7 -6
- package/front_end/core/sdk/SourceMapScopesInfo.ts +6 -2
- package/front_end/core/sdk/TargetManager.ts +14 -2
- package/front_end/core/sdk/sdk-meta.ts +13 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +13 -3
- package/front_end/foundation/Universe.ts +1 -1
- package/front_end/generated/Deprecation.ts +18 -4
- package/front_end/generated/InspectorBackendCommands.ts +33 -31
- package/front_end/generated/SupportedCSSProperties.js +41 -41
- package/front_end/generated/protocol-mapping.d.ts +12 -0
- package/front_end/generated/protocol-proxy-api.d.ts +11 -0
- package/front_end/generated/protocol.ts +70 -35
- package/front_end/models/ai_assistance/AiConversation.ts +5 -4
- package/front_end/models/ai_assistance/ChangeManager.ts +4 -4
- package/front_end/models/ai_assistance/ConversationHandler.ts +0 -15
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -6
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +135 -3
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +24 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +43 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +19 -0
- package/front_end/models/bindings/ResourceMapping.ts +73 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +50 -0
- package/front_end/models/issues_manager/GenericIssue.ts +17 -0
- package/front_end/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -3
- package/front_end/models/source_map_scopes/FunctionCodeResolver.snapshot.txt +98 -0
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +270 -0
- package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +51 -44
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +76 -34
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +23 -11
- package/front_end/panels/application/AppManifestView.ts +3 -2
- package/front_end/panels/application/FrameDetailsView.ts +5 -6
- package/front_end/panels/application/ServiceWorkersView.ts +2 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -6
- package/front_end/panels/application/components/PermissionsPolicySection.ts +201 -157
- package/front_end/panels/application/components/ProtocolHandlersView.ts +117 -80
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +47 -41
- package/front_end/panels/application/components/StorageMetadataView.ts +31 -34
- package/front_end/panels/application/components/TrustTokensView.ts +76 -68
- package/front_end/panels/console/ConsoleView.ts +3 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +6 -4
- package/front_end/panels/console/console-meta.ts +0 -13
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +7 -7
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +2 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +16 -13
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -1
- package/front_end/panels/elements/LayoutPane.ts +12 -10
- package/front_end/panels/elements/StylePropertyTreeElement.ts +12 -12
- package/front_end/panels/elements/components/AdornerManager.ts +3 -3
- package/front_end/panels/elements/components/StylePropertyEditor.ts +6 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +27 -49
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +15 -11
- package/front_end/panels/media/PlayerListView.ts +100 -73
- package/front_end/panels/media/playerListView.css +5 -0
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +3 -3
- package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +17 -0
- package/front_end/panels/network/resourceChunkView.css +4 -0
- package/front_end/panels/security/CookieControlsView.ts +1 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +6 -6
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -1
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +4 -2
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +13 -5
- package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -2
- package/front_end/panels/sources/NavigatorView.ts +2 -2
- package/front_end/panels/sources/OpenFileQuickOpen.ts +7 -8
- package/front_end/panels/sources/OutlineQuickOpen.ts +6 -3
- package/front_end/panels/sources/ProfilePlugin.ts +21 -12
- package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
- package/front_end/panels/sources/filteredUISourceCodeListProvider.css +41 -0
- package/front_end/panels/timeline/TimelinePanel.ts +17 -18
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +3 -3
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/docs/flame_chart_migration.md +11 -16
- package/front_end/panels/utils/utils.ts +17 -3
- package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -20
- package/front_end/panels/whats_new/resources/WNDT.md +8 -8
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/third_party/mitt/README.chromium +1 -0
- package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -0
- package/front_end/third_party/puppeteer/third_party/rxjs/README.chromium +1 -0
- package/front_end/ui/components/adorners/Adorner.ts +1 -1
- package/front_end/ui/components/annotations/AnnotationRepository.ts +98 -0
- package/front_end/ui/components/annotations/AnnotationType.ts +10 -0
- package/front_end/ui/components/annotations/annotations.ts +6 -0
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/chrome_link/ChromeLink.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.ts +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -0
- package/front_end/ui/components/diff_view/DiffView.ts +1 -1
- package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +1 -0
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +162 -0
- package/front_end/ui/components/highlighting/highlighting.ts +7 -0
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
- package/front_end/ui/components/icon_button/Icon.ts +4 -2
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +1 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
- package/front_end/ui/components/list/List.ts +184 -0
- package/front_end/ui/components/list/list.css +90 -0
- package/front_end/ui/components/{cards/cards.ts → list/lists.ts} +3 -3
- package/front_end/ui/components/markdown_view/CodeBlock.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
- package/front_end/ui/components/menus/Menu.ts +1 -1
- package/front_end/ui/components/menus/SelectMenu.ts +1 -1
- package/front_end/ui/components/node_text/NodeText.ts +1 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +1 -1
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -0
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/switch/SwitchImpl.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
- package/front_end/ui/kit/kit.ts +5 -0
- package/front_end/ui/legacy/TabbedPane.ts +98 -0
- package/front_end/ui/legacy/UIUtils.ts +0 -184
- package/front_end/ui/legacy/ViewManager.ts +23 -8
- package/front_end/ui/legacy/ViewRegistration.ts +21 -22
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -4
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +73 -35
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +11 -2
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +12 -13
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +7 -16
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +5 -6
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +18 -65
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -1
- package/front_end/ui/legacy/tabbedPane.css +10 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/inspector_overlay/README.md +3 -3
- package/mcp/HostBindings.ts +310 -0
- package/mcp/mcp.ts +17 -0
- package/mcp/tsconfig.json +6 -1
- package/package.json +26 -24
- /package/front_end/ui/{components → kit}/cards/Card.ts +0 -0
- /package/front_end/ui/{components → kit}/cards/card.css +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import {readFile} from 'node:fs/promises';
|
|
6
|
+
import {URL} from 'node:url';
|
|
7
|
+
|
|
8
|
+
import type * as Common from '../front_end/core/common/common.js';
|
|
9
|
+
import type * as Host from '../front_end/core/host/host.js';
|
|
10
|
+
import {streamWrite} from '../front_end/core/host/ResourceLoader.js';
|
|
11
|
+
|
|
12
|
+
export class McpHostBindings implements Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI {
|
|
13
|
+
declare events: Common.EventTarget.EventTarget<Host.InspectorFrontendHostAPI.EventTypes>;
|
|
14
|
+
|
|
15
|
+
connectAutomaticFileSystem(): void {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
disconnectAutomaticFileSystem(): void {
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
addFileSystem(): void {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
loadCompleted(): void {
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
indexPath(): void {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
setInspectedPageBounds(): void {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
showCertificateViewer(): void {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
setWhitelistedShortcuts(): void {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
setEyeDropperActive(): void {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
inspectElementCompleted(): void {
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
openInNewTab(): void {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
openSearchResultsInNewTab(): void {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
showItemInFolder(): void {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
removeFileSystem(): void {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
requestFileSystems(): void {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
save(): void {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
append(): void {
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
close(): void {
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
searchInPath(): void {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
stopIndexing(): void {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
bringToFront(): void {
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
closeWindow(): void {
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
copyText(): void {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
inspectedURLChanged(): void {
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
isolatedFileSystem(): null {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
loadNetworkResource(
|
|
92
|
+
urlString: string, _headers: string, streamId: number,
|
|
93
|
+
callback: (arg0: Host.InspectorFrontendHostAPI.LoadNetworkResourceResult) => void): void {
|
|
94
|
+
let url: URL;
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
url = new URL(urlString);
|
|
98
|
+
} catch {
|
|
99
|
+
callback({
|
|
100
|
+
statusCode: 404,
|
|
101
|
+
urlValid: false,
|
|
102
|
+
});
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
let contentPromise: Promise<string>;
|
|
107
|
+
if (url.protocol === 'file:') {
|
|
108
|
+
contentPromise = readFile(url, {encoding: 'utf8'});
|
|
109
|
+
} else if (url.protocol === 'http:' || url.protocol === 'https:') {
|
|
110
|
+
// We skip parsing headers. DevTools only sets cache and user agent, which is probably fine to not forward.
|
|
111
|
+
contentPromise = fetch(url).then(response => {
|
|
112
|
+
if (!response.ok) {
|
|
113
|
+
throw new Error('Fetch failed');
|
|
114
|
+
}
|
|
115
|
+
return response.text();
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
// Unknown protocol.
|
|
119
|
+
callback({
|
|
120
|
+
statusCode: 404,
|
|
121
|
+
urlValid: false,
|
|
122
|
+
});
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
contentPromise
|
|
127
|
+
.then(content => {
|
|
128
|
+
streamWrite(streamId, content);
|
|
129
|
+
callback({statusCode: 200});
|
|
130
|
+
})
|
|
131
|
+
.catch(() => {
|
|
132
|
+
callback({statusCode: 404});
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
registerPreference(): void {
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
getPreferences(): void {
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
getPreference(): void {
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
setPreference(): void {
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
removePreference(): void {
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
clearPreferences(): void {
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
getSyncInformation(): void {
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
getHostConfig(): void {
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
upgradeDraggedFileSystemPermissions(): void {
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
platform(): string {
|
|
164
|
+
switch (process.platform) {
|
|
165
|
+
case 'darwin':
|
|
166
|
+
return 'mac';
|
|
167
|
+
case 'win32':
|
|
168
|
+
return 'windows';
|
|
169
|
+
default:
|
|
170
|
+
return 'linux';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
recordCountHistogram(): void {
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
recordEnumeratedHistogram(): void {
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
recordPerformanceHistogram(): void {
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
recordUserMetricsAction(): void {
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
recordNewBadgeUsage(): void {
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
sendMessageToBackend(): void {
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
setDevicesDiscoveryConfig(): void {
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
setDevicesUpdatesEnabled(): void {
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
openRemotePage(): void {
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
openNodeFrontend(): void {
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
setInjectedScriptForOrigin(): void {
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
setIsDocked(): void {
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
showSurvey(): void {
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
canShowSurvey(): void {
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
zoomFactor(): number {
|
|
217
|
+
return 1;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
zoomIn(): void {
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
zoomOut(): void {
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
resetZoom(): void {
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
showContextMenuAtPoint(): void {
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
reattach(): void {
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
readyForTest(): void {
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
connectionReady(): void {
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
setOpenNewWindowForPopups(): void {
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
isHostedMode(): boolean {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
setAddExtensionCallback(): void {
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
initialTargetId(): Promise<string|null> {
|
|
252
|
+
return Promise.resolve(null);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
doAidaConversation(
|
|
256
|
+
_request: string, _streamId: number,
|
|
257
|
+
cb: (result: Host.InspectorFrontendHostAPI.DoAidaConversationResult) => void): void {
|
|
258
|
+
cb({
|
|
259
|
+
error: 'Not implemented',
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
registerAidaClientEvent(_request: string, cb: (result: Host.InspectorFrontendHostAPI.AidaClientResult) => void):
|
|
264
|
+
void {
|
|
265
|
+
cb({
|
|
266
|
+
error: 'Not implemented',
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
aidaCodeComplete(_request: string, cb: (result: Host.InspectorFrontendHostAPI.AidaCodeCompleteResult) => void): void {
|
|
271
|
+
cb({
|
|
272
|
+
error: 'Not implemented',
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
dispatchHttpRequest(
|
|
277
|
+
_request: Host.InspectorFrontendHostAPI.DispatchHttpRequestRequest,
|
|
278
|
+
cb: (result: Host.InspectorFrontendHostAPI.DispatchHttpRequestResult) => void): void {
|
|
279
|
+
cb({
|
|
280
|
+
error: 'Not implemented',
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
recordImpression(): void {
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
recordResize(): void {
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
recordClick(): void {
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
recordHover(): void {
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
recordDrag(): void {
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
recordChange(): void {
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
recordKeyDown(): void {
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
recordSettingAccess(): void {
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
recordFunctionCall(): void {
|
|
309
|
+
}
|
|
310
|
+
}
|
package/mcp/mcp.ts
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
// Instantiating a DevTools universe requires settings from these meta files.
|
|
6
|
+
// Until settings registration is handled differently, the easiest solution is to
|
|
7
|
+
// just import relevant meta files (as long as they don't contain any UI related code)
|
|
8
|
+
import '../front_end/core/sdk/sdk-meta.js';
|
|
9
|
+
import '../front_end/models/workspace/workspace-meta.js';
|
|
10
|
+
|
|
11
|
+
import {installInspectorFrontendHost} from '../front_end/core/host/InspectorFrontendHost.js';
|
|
12
|
+
|
|
13
|
+
import {McpHostBindings} from './HostBindings.js';
|
|
14
|
+
|
|
5
15
|
/**
|
|
6
16
|
* IMPORTANT! Make sure that any class that is exported here has related unit
|
|
7
17
|
* tests added to foundation_unittests. See front_end/core/i18n/BUILD.gn as an
|
|
@@ -11,6 +21,10 @@ export * as Common from '../front_end/core/common/common.js';
|
|
|
11
21
|
export * as I18n from '../front_end/core/i18n/i18n.js';
|
|
12
22
|
export type * as CDPConnection from '../front_end/core/protocol_client/CDPConnection.js';
|
|
13
23
|
export {ConnectionTransport} from '../front_end/core/protocol_client/ConnectionTransport.js';
|
|
24
|
+
export * as ProtocolClient from '../front_end/core/protocol_client/protocol_client.js';
|
|
25
|
+
export {DebuggerModel} from '../front_end/core/sdk/DebuggerModel.js';
|
|
26
|
+
export {Target} from '../front_end/core/sdk/Target.js';
|
|
27
|
+
export {TargetManager} from '../front_end/core/sdk/TargetManager.js';
|
|
14
28
|
export * as Foundation from '../front_end/foundation/foundation.js';
|
|
15
29
|
export {
|
|
16
30
|
PerformanceInsightFormatter
|
|
@@ -19,6 +33,7 @@ export {
|
|
|
19
33
|
PerformanceTraceFormatter
|
|
20
34
|
} from '../front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.js';
|
|
21
35
|
export {AgentFocus} from '../front_end/models/ai_assistance/performance/AIContext.js';
|
|
36
|
+
export {DebuggerWorkspaceBinding} from '../front_end/models/bindings/DebuggerWorkspaceBinding.js';
|
|
22
37
|
export {Issue} from '../front_end/models/issues_manager/Issue.js';
|
|
23
38
|
export {
|
|
24
39
|
AggregatedIssue,
|
|
@@ -34,3 +49,5 @@ export {
|
|
|
34
49
|
export * as MarkdownIssueDescription from '../front_end/models/issues_manager/MarkdownIssueDescription.js';
|
|
35
50
|
export * as TraceEngine from '../front_end/models/trace/trace.js';
|
|
36
51
|
export * as Marked from '../front_end/third_party/marked/marked.js';
|
|
52
|
+
|
|
53
|
+
installInspectorFrontendHost(new McpHostBindings());
|
package/mcp/tsconfig.json
CHANGED
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
"ESNext.Iterator",
|
|
11
11
|
"ESNext.Collection",
|
|
12
12
|
"ESNext.Array"
|
|
13
|
-
]
|
|
13
|
+
],
|
|
14
|
+
"typeRoots": [
|
|
15
|
+
"../node_modules/@types",
|
|
16
|
+
"../node_modules",
|
|
17
|
+
],
|
|
18
|
+
"types": ["node", "undici-types"]
|
|
14
19
|
},
|
|
15
20
|
"references": [{ "path": "../front_end/tsconfig.json" }]
|
|
16
21
|
}
|
package/package.json
CHANGED
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"test": "vpython3 third_party/node/node.py --output scripts/run_on_target.mjs gen/test/run.js"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@rollup/plugin-node-resolve": "16.0.
|
|
36
|
+
"@rollup/plugin-node-resolve": "16.0.3",
|
|
37
37
|
"@rollup/plugin-terser": "0.4.4",
|
|
38
|
-
"@rollup/wasm-node": "4.
|
|
39
|
-
"@stylistic/eslint-plugin": "5.
|
|
38
|
+
"@rollup/wasm-node": "4.53.2",
|
|
39
|
+
"@stylistic/eslint-plugin": "5.5.0",
|
|
40
40
|
"@types/chai": "4.3.15",
|
|
41
|
-
"@types/codemirror": "5.60.
|
|
41
|
+
"@types/codemirror": "5.60.17",
|
|
42
42
|
"@types/emscripten": "1.39.4",
|
|
43
43
|
"@types/estree": "1.0.8",
|
|
44
44
|
"@types/filesystem": "0.0.36",
|
|
@@ -46,26 +46,26 @@
|
|
|
46
46
|
"@types/karma-chai-sinon": "0.1.20",
|
|
47
47
|
"@types/mocha": "10.0.10",
|
|
48
48
|
"@types/node": "24.10.0",
|
|
49
|
-
"@types/sinon": "
|
|
49
|
+
"@types/sinon": "21.0.0",
|
|
50
50
|
"@types/webidl2": "24.4.3",
|
|
51
|
-
"@types/yargs": "17.0.
|
|
51
|
+
"@types/yargs": "17.0.35",
|
|
52
52
|
"@types/yargs-unparser": "2.0.3",
|
|
53
|
-
"@typescript-eslint/rule-tester": "8.
|
|
54
|
-
"@typescript-eslint/utils": "8.
|
|
53
|
+
"@typescript-eslint/rule-tester": "8.47.0",
|
|
54
|
+
"@typescript-eslint/utils": "8.47.0",
|
|
55
55
|
"@web/rollup-plugin-import-meta-assets": "2.3.0",
|
|
56
56
|
"chai": "4.3.4",
|
|
57
|
-
"cssnano": "7.1.
|
|
57
|
+
"cssnano": "7.1.2",
|
|
58
58
|
"cssnano-preset-lite": "4.0.4",
|
|
59
59
|
"esbuild": "0.25.1",
|
|
60
|
-
"eslint": "9.
|
|
61
|
-
"eslint-plugin-eslint-plugin": "7.
|
|
60
|
+
"eslint": "9.39.1",
|
|
61
|
+
"eslint-plugin-eslint-plugin": "7.2.0",
|
|
62
62
|
"eslint-plugin-import": "2.32.0",
|
|
63
|
-
"eslint-plugin-jsdoc": "
|
|
63
|
+
"eslint-plugin-jsdoc": "61.2.1",
|
|
64
64
|
"eslint-plugin-lit": "2.1.1",
|
|
65
65
|
"eslint-plugin-mocha": "10.5.0",
|
|
66
66
|
"glob": "7.1.7",
|
|
67
|
-
"globals": "16.
|
|
68
|
-
"js-yaml": "4.1.
|
|
67
|
+
"globals": "16.5.0",
|
|
68
|
+
"js-yaml": "4.1.1",
|
|
69
69
|
"karma": "6.4.4",
|
|
70
70
|
"karma-chai": "0.1.0",
|
|
71
71
|
"karma-chrome-launcher": "3.2.0",
|
|
@@ -77,30 +77,32 @@
|
|
|
77
77
|
"karma-spec-reporter": "0.0.36",
|
|
78
78
|
"license-checker": "25.0.1",
|
|
79
79
|
"lit-analyzer": "2.0.3",
|
|
80
|
-
"mocha": "11.7.
|
|
80
|
+
"mocha": "11.7.5",
|
|
81
81
|
"ora": "9.0.0",
|
|
82
82
|
"postcss": "8.5.6",
|
|
83
|
-
"puppeteer-core": "24.
|
|
83
|
+
"puppeteer-core": "24.30.0",
|
|
84
84
|
"rollup-plugin-sourcemaps2": "0.5.4",
|
|
85
85
|
"sinon": "21.0.0",
|
|
86
86
|
"source-map-support": "0.5.21",
|
|
87
|
-
"stylelint": "16.
|
|
88
|
-
"stylelint-config-standard": "39.0.
|
|
87
|
+
"stylelint": "16.25.0",
|
|
88
|
+
"stylelint-config-standard": "39.0.1",
|
|
89
89
|
"svgo": "3.3.2",
|
|
90
|
-
"terser": "5.44.
|
|
90
|
+
"terser": "5.44.1",
|
|
91
91
|
"ts-lit-plugin": "2.0.2",
|
|
92
|
-
"typescript": "5.9.
|
|
93
|
-
"typescript-eslint": "8.
|
|
92
|
+
"typescript": "5.9.3",
|
|
93
|
+
"typescript-eslint": "8.47.0",
|
|
94
94
|
"uuid": "13.0.0",
|
|
95
95
|
"webidl2": "24.5.0",
|
|
96
96
|
"yargs": "17.7.2"
|
|
97
97
|
},
|
|
98
98
|
"overrides": {
|
|
99
|
-
"@typescript-eslint/types": "8.
|
|
100
|
-
"
|
|
99
|
+
"@typescript-eslint/types": "8.47.0",
|
|
100
|
+
"baseline-browser-mapping": "2.8.25",
|
|
101
|
+
"electron-to-chromium": "1.5.248",
|
|
102
|
+
"caniuse-lite": "1.0.30001754",
|
|
101
103
|
"stylelint": {
|
|
102
104
|
"flat-cache": "6.1.12"
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
|
-
"version": "1.0.
|
|
107
|
+
"version": "1.0.1549484"
|
|
106
108
|
}
|
|
File without changes
|
|
File without changes
|