chrome-devtools-frontend 1.0.1732697 → 1.0.1735750
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/.agents/rules/tests/test-view-and-presenter-isolation.md +4 -4
- package/.agents/rules/ui-and-widgets/ui-declarative-tree-and-prompt-patterns.md +61 -0
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +11 -7
- package/.agents/rules/ui-and-widgets/ui-modern-component-and-encapsulation-standards.md +13 -4
- package/.agents/rules/ui-and-widgets/ui-pure-view-and-presenter-separation.md +31 -2
- package/.agents/rules/ui-and-widgets/ui-reactive-widget-update-lifecycle.md +23 -4
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +34 -3
- package/.agents/skills/code-review/SKILL.md +26 -0
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +27 -1
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +100 -0
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +16 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +13 -2
- package/.agents/skills/ui-widgets/SKILL.md +25 -25
- package/DIR_METADATA +2 -1
- package/docs/ui_engineering.md +24 -0
- package/front_end/core/host/AidaClientTypes.ts +5 -1
- package/front_end/core/host/AidaGcaTranslation.ts +29 -1
- package/front_end/core/platform/browser/HostRuntime.ts +5 -1
- package/front_end/core/sdk/CPUThrottlingManager.ts +3 -0
- package/front_end/core/sdk/EnhancedTracesParser.ts +8 -4
- package/front_end/core/sdk/PreloadingModel.ts +30 -13
- package/front_end/design_system_tokens.css +5 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +4 -2
- package/front_end/generated/InspectorBackendCommands.ts +5 -5
- package/front_end/generated/SupportedCSSProperties.ts +6 -0
- package/front_end/generated/protocol.ts +30 -7
- package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/ChangeManager.ts +3 -1
- package/front_end/models/ai_assistance/DOMHelpers.ts +114 -2
- package/front_end/models/ai_assistance/ExtensionScope.ts +22 -24
- package/front_end/models/ai_assistance/agents/AiAgent.ts +65 -6
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/skills/lighthouse.md +1 -1
- package/front_end/models/comment_manager/CD4ABridge.ts +12 -2
- package/front_end/models/comment_manager/CommentManager.ts +24 -4
- package/front_end/models/javascript_metadata/NativeFunctions.ts +40 -0
- package/front_end/models/project_settings/ProjectSettingsModel.ts +1 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -2
- package/front_end/models/trace/types/TraceEvents.ts +21 -22
- package/front_end/models/web_mcp/WebMCPModel.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +35 -17
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +9 -1
- package/front_end/panels/ai_assistance/components/chatMessage.css +1 -1
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -1
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
- package/front_end/panels/application/frameDetailsReportView.css +0 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -0
- package/front_end/panels/application/resourcesPanel.css +0 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +346 -286
- package/front_end/panels/comments/CommentsPane.ts +12 -7
- package/front_end/panels/comments/commentsPane.css +16 -2
- package/front_end/panels/common/CommentsOverlayWidget.ts +17 -11
- package/front_end/panels/common/CommentsStatusBarPill.ts +12 -5
- package/front_end/panels/common/commentsOverlay.css +7 -1
- package/front_end/panels/common/commentsStatusBarPill.css +30 -0
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/DOMTreeWidget.ts +28 -9
- package/front_end/panels/elements/components/cssPropertyDocsView.css +1 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +2 -2
- package/front_end/panels/elements/components/stylePropertyEditor.css +1 -5
- package/front_end/panels/elements/domTreeWidget.css +6 -1
- package/front_end/panels/elements/layoutPane.css +2 -2
- package/front_end/panels/elements/metricsSidebarPane.css +1 -1
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylesSidebarPane.css +3 -12
- package/front_end/panels/emulation/deviceModeView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +3 -3
- package/front_end/panels/issues/issuesTree.css +4 -28
- package/front_end/panels/lighthouse/LighthousePanel.ts +16 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +10 -6
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +1 -26
- package/front_end/panels/media/TickingFlameChart.ts +20 -3
- package/front_end/panels/media/playerListView.css +3 -4
- package/front_end/panels/media/playerMessagesView.css +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +24 -5
- package/front_end/panels/network/networkTimingTable.css +1 -5
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +114 -18
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/recorder/recorderPanel.css +3 -3
- package/front_end/panels/recorder/stepEditor.css +1 -1
- package/front_end/panels/search/searchResultsPane.css +1 -1
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/sensors/locationsSettingsTab.css +1 -1
- package/front_end/panels/settings/AISettingsTab.ts +1 -0
- package/front_end/panels/settings/EditFileSystemView.ts +159 -104
- package/front_end/panels/settings/editFileSystemView.css +30 -4
- package/front_end/panels/sources/CallStackSidebarPane.ts +339 -221
- package/front_end/panels/sources/NavigatorView.ts +208 -50
- package/front_end/panels/sources/ThreadsSidebarPane.ts +8 -4
- package/front_end/panels/sources/breakpointsView.css +1 -1
- package/front_end/panels/sources/callStackSidebarPane.css +4 -0
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/timeline/CountersGraph.ts +0 -4
- package/front_end/panels/timeline/TimelinePanel.ts +37 -13
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +2 -1
- package/front_end/panels/timeline/components/metricCard.css +2 -2
- package/front_end/panels/timeline/timelineFlameChartView.css +1 -1
- package/front_end/panels/timeline/timelineMiniMap.css +1 -1
- package/front_end/panels/web_audio/WebAudioModel.ts +14 -5
- package/front_end/panels/web_audio/WebAudioView.ts +34 -1
- package/front_end/panels/web_audio/webAudio.css +17 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +13 -14
- package/front_end/panels/webauthn/webauthnPane.css +3 -5
- package/front_end/panels/whats_new/ReleaseNoteText.ts +19 -1
- package/front_end/panels/whats_new/ReleaseNoteView.ts +15 -1
- package/front_end/panels/whats_new/releaseNoteView.css +49 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer-replay/README.chromium +9 -1
- package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +2 -2
- package/front_end/ui/comments/CommentOverlayManager.ts +34 -18
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +6 -0
- package/front_end/ui/components/markdown_view/codeBlock.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -5
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +7 -5
- package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
- package/front_end/ui/components/switch/switch.css +2 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationTeaser.ts +14 -2
- package/front_end/ui/legacy/DockController.ts +16 -3
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +13 -5
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +2 -2
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +2 -2
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +5 -4
- package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -2
- package/front_end/ui/legacy/listWidget.css +1 -19
- package/front_end/ui/legacy/reportView.css +1 -1
- package/front_end/ui/legacy/searchableView.css +2 -1
- package/front_end/ui/legacy/suggestBox.css +2 -1
- package/front_end/ui/legacy/tabbedPane.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/package.json +1 -1
|
@@ -21,9 +21,9 @@ Adhere strictly to the Model-View-Presenter (MVP) architecture.
|
|
|
21
21
|
* Constructor MUST call `super()`. If taking `element?: HTMLElement`, pass it to `super(element)`. `super(true)` is forbidden. Do not pass `classes` or `jslog` in `WidgetOptions` (`super(..., {classes: [...], jslog: ...})`); instead, pass container CSS classes and `jslog` via the third parameter of `render(template, target, {container: {classes: [...], attributes: {jslog: ...}}})` in the view function (and if the widget uses shadow DOM, pass `useShadowDom: 'pure'` and extend `Widget<ShadowRoot>` / `VBox<ShadowRoot>` with `target: HTMLElement|DocumentFragment` so `render()` applies `container.classes` and `container.attributes` to the shadow host `this.element`).
|
|
22
22
|
* Dependencies from `Universe` SHOULD be requested via static `INJECT`: `static override readonly INJECT = [...] as const;` and received as constructor parameter #2 (`[dep1, dep2]: UI.Widget.WidgetDependencies<typeof MyWidget>`).
|
|
23
23
|
* Styling MUST be handled within the View. `this.registerCSSFiles()` is forbidden.
|
|
24
|
-
* Initial render MUST be triggered in `override wasShown(): void` by calling `this.requestUpdate()`.
|
|
24
|
+
* Initial render MUST be triggered in `override wasShown(): void` by calling `this.requestUpdate()`. External model, workspace, and setting subscriptions SHOULD be attached in `wasShown()` and detached symmetrically in `willHide()`, reconciling incremental state changes that occurred while hidden rather than unconditionally calling `reset()` and wiping populated presenter state (such as open tree folders or selection) on every re-show.
|
|
25
25
|
* MUST hold all UI state as private class fields (e.g., `#counter`).
|
|
26
|
-
* To schedule a UI update, MUST call `this.requestUpdate()
|
|
26
|
+
* To schedule a UI update, MUST call `this.requestUpdate()` asynchronously across all presenter methods, property setters, and event handlers. `performUpdate()` MUST NOT be called directly (except in `UI.Panel`/`UI.Dialog` subclasses where `requestUpdate()` is unavailable or when synchronous layout measurement is documented as strictly required). Presenter and presenter-node classes MUST NOT expose imperative view-refresh methods (e.g., `updateTrailingIcons()`, `updateIcon()`); all visual output should be derived declaratively in the view function.
|
|
27
27
|
|
|
28
28
|
### View (`function`) Rules
|
|
29
29
|
|
|
@@ -119,6 +119,22 @@ render(html`
|
|
|
119
119
|
* **Raw Elements:** Use `Directives.ref` (from `ui/lit/lit.js`) to obtain a reference to a raw `HTMLElement` if needed for imperative APIs (e.g., `splitWidget.installResizer(element)`).
|
|
120
120
|
* **Child Widgets:** Use `UI.Widget.widgetRef` to obtain the class instance of a child widget inside the view function if you need to call imperative methods on it. **Do NOT store child widget instances on `ViewOutput` as a final result** (doing so is only acceptable temporarily in intermediate migration CLs). Instead, either supply all needed configuration declaratively through setters/inputs on the child widget, or if imperative calls are strictly necessary, expose narrow action functions on `ViewOutput` (e.g., `output.doLayout = () => splitWidget.doLayout()`, `output.revealPosition = pos => childWidget.revealPosition(pos)`). Do not keep `get*ForTest()` methods that return child widget instances via `ViewOutput`; tests should query rendered `<devtools-widget>` elements via `.getWidget()` or assert on `ViewInput` via `createViewFunctionStub`.
|
|
121
121
|
|
|
122
|
+
### Visibility (`?hidden` Attribute Only)
|
|
123
|
+
Toggle element visibility declaratively using the HTML `?hidden` attribute:
|
|
124
|
+
```ts
|
|
125
|
+
html`<div ?hidden=${!input.isVisible}>...</div>`
|
|
126
|
+
```
|
|
127
|
+
Never combine a `.hidden` CSS class (`classMap({hidden: ...})` or `classList.toggle('hidden', ...)`) with `?hidden` (`inspectorCommon.css` already defines `[hidden] { display: none !important; }`).
|
|
128
|
+
|
|
129
|
+
### Declarative Default Focus (`autofocus` / `?autofocus`)
|
|
130
|
+
`UI.Widget.prototype.focus()` natively queries `[autofocus]` via `getDefaultFocusedElement()` across both plain HTML elements (e.g. `<devtools-tree autofocus>`) and child widgets. Mark the default focus target with `autofocus` or `?autofocus=${...}` (ensuring at most one element has `autofocus` in any render state) instead of overriding `focus()`, calling `this.setDefaultFocusedElement(...)`, or plumbing focus closures through `ViewOutput`.
|
|
131
|
+
|
|
132
|
+
### `<devtools-tree>` & Editable `<devtools-prompt ?editing>` Rows
|
|
133
|
+
* Keep `<devtools-tree>` (`ui/kit/kit.js`) contracts intact without widening `front_end/ui/legacy/Treeoutline.ts` (`TreeViewElement`/`TreeViewTreeElement`). Drive selection and expansion purely via `?selected`, `?open`, `@select`, and `@expand`.
|
|
134
|
+
* Keep `<devtools-prompt ?editing>` persistently mounted in the DOM and toggle `?editing` declaratively; do not duplicate `aria-label` on inner prompts when the `<li role="treeitem">` already labels the row.
|
|
135
|
+
* **Child widget isolation for editable tree rows:** Because `<devtools-tree>` clones light DOM into shadow DOM and re-clones an `<li role="treeitem">` whenever any descendant attribute mutates, place editable prompts inside a small child `UI.Widget` (`${widget(RowPromptWidget, {...})}`) so toggling `?editing` updates the child widget in place without triggering a tree re-clone and blurring the active input.
|
|
136
|
+
* Custom elements inside `<devtools-tree>` templates whose state is passed via JS properties (`.data`) must override `cloneNode(deep)` to copy `.data` and reflect dynamic state via DOM attributes so shadow clones update reliably.
|
|
137
|
+
|
|
122
138
|
### Dependencies
|
|
123
139
|
|
|
124
140
|
* **View Dependencies:** The `DEFAULT_VIEW` is typically a module-level function. Ensure all dependencies (enums, constants, other components) are imported at the top of the file so they are available in the function scope.
|
|
@@ -163,13 +179,11 @@ Example: `front_end/panels/my_example/MyExampleWidget.ts`.
|
|
|
163
179
|
```ts
|
|
164
180
|
// front_end/panels/my_example/MyExampleWidget.ts
|
|
165
181
|
|
|
166
|
-
import {
|
|
182
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
167
183
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
168
184
|
|
|
169
185
|
import myExampleWidgetStyles from './myExampleWidget.css.js';
|
|
170
186
|
|
|
171
|
-
const {ref} = Directives;
|
|
172
|
-
|
|
173
187
|
// 1. Define Input data shape. (Assuming Child Widget configuration for completeness)
|
|
174
188
|
export interface ViewInput {
|
|
175
189
|
title: string;
|
|
@@ -177,33 +191,24 @@ export interface ViewInput {
|
|
|
177
191
|
onButtonClick: () => void;
|
|
178
192
|
}
|
|
179
193
|
|
|
180
|
-
// 2. Define
|
|
181
|
-
export interface ViewOutput {
|
|
182
|
-
focusButton?: () => void;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// 3. Define the View function.
|
|
194
|
+
// 2. Define the View function (output is undefined when no imperative actions exist).
|
|
186
195
|
// clang-format off
|
|
187
|
-
const DEFAULT_VIEW = (input: ViewInput,
|
|
196
|
+
const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
188
197
|
render(html`
|
|
189
198
|
<style>${myExampleWidgetStyles}</style>
|
|
190
199
|
<div class="child-widget">
|
|
191
200
|
<h3>${input.title}</h3>
|
|
192
201
|
<p>Counter: ${input.counter}</p>
|
|
193
|
-
<button @click=${input.onButtonClick}
|
|
194
|
-
if (el) {
|
|
195
|
-
output.focusButton = () => el.focus();
|
|
196
|
-
}
|
|
197
|
-
})}>Increment</button>
|
|
202
|
+
<button autofocus @click=${input.onButtonClick}>Increment</button>
|
|
198
203
|
</div>
|
|
199
204
|
`, target);
|
|
200
205
|
};
|
|
201
206
|
// clang-format on
|
|
202
207
|
|
|
203
|
-
//
|
|
208
|
+
// 3. Type alias for the view.
|
|
204
209
|
type View = typeof DEFAULT_VIEW;
|
|
205
210
|
|
|
206
|
-
//
|
|
211
|
+
// 4. Define the Presenter.
|
|
207
212
|
export class MyExampleWidget extends UI.Widget.Widget {
|
|
208
213
|
#counter: number = 0;
|
|
209
214
|
|
|
@@ -211,7 +216,6 @@ export class MyExampleWidget extends UI.Widget.Widget {
|
|
|
211
216
|
title: string = 'Default Title';
|
|
212
217
|
|
|
213
218
|
#view: View;
|
|
214
|
-
#viewOutput: ViewOutput = {};
|
|
215
219
|
|
|
216
220
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
217
221
|
super(element);
|
|
@@ -224,10 +228,6 @@ export class MyExampleWidget extends UI.Widget.Widget {
|
|
|
224
228
|
this.requestUpdate();
|
|
225
229
|
}
|
|
226
230
|
|
|
227
|
-
focus(): void {
|
|
228
|
-
this.#viewOutput.focusButton?.();
|
|
229
|
-
}
|
|
230
|
-
|
|
231
231
|
#handleButtonClick = (): void => {
|
|
232
232
|
this.#counter++;
|
|
233
233
|
this.requestUpdate();
|
|
@@ -239,7 +239,7 @@ export class MyExampleWidget extends UI.Widget.Widget {
|
|
|
239
239
|
counter: this.#counter,
|
|
240
240
|
onButtonClick: this.#handleButtonClick,
|
|
241
241
|
};
|
|
242
|
-
this.#view(viewInput,
|
|
242
|
+
this.#view(viewInput, undefined, this.contentElement);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
```
|
package/DIR_METADATA
CHANGED
|
@@ -60,7 +60,8 @@ agentic_review: {
|
|
|
60
60
|
".agents/rules/ui-and-widgets/ui-weak-dom-references-and-observer-cleanup.md",
|
|
61
61
|
".agents/rules/ui-and-widgets/ui-security-and-output-sanitization.md",
|
|
62
62
|
".agents/rules/ui-and-widgets/ui-declarative-child-widget-composition.md",
|
|
63
|
-
".agents/rules/ui-and-widgets/ui-await-update-complete-post-render.md"
|
|
63
|
+
".agents/rules/ui-and-widgets/ui-await-update-complete-post-render.md",
|
|
64
|
+
".agents/rules/ui-and-widgets/ui-declarative-tree-and-prompt-patterns.md"
|
|
64
65
|
]
|
|
65
66
|
}
|
|
66
67
|
capability_groups: {
|
package/docs/ui_engineering.md
CHANGED
|
@@ -1499,6 +1499,30 @@ the user.
|
|
|
1499
1499
|
`ifExpanded` is a lit directive provided on `UI.TreeOutline` and it makes its
|
|
1500
1500
|
argument render only if the current tree node is expanded.
|
|
1501
1501
|
|
|
1502
|
+
### TreeOutline Migration Guidelines
|
|
1503
|
+
|
|
1504
|
+
1. **Keep `Treeoutline.ts` contracts intact**: Do not widen `front_end/ui/legacy/Treeoutline.ts`
|
|
1505
|
+
(`TreeViewElement` or `TreeViewTreeElement`) or add public getters (such as `get scriptsTree()`)
|
|
1506
|
+
on presenters. Render leading icons, labels, tooltips, and trailing actions inline inside
|
|
1507
|
+
`<li role="treeitem">` and drive selection, expansion, and default focus declaratively via
|
|
1508
|
+
`?selected`, `?open`, `@select`, `@expand`, and `autofocus`. Return `nothing` rather than an
|
|
1509
|
+
empty container for trailing icons when none exist, and do not duplicate `class="tree-element-title"`
|
|
1510
|
+
on inner spans (which compounds opacity styling).
|
|
1511
|
+
2. **Persistent prompt & child widget isolation for editable rows**:
|
|
1512
|
+
Always keep `<devtools-prompt value=${...} ?editing=${...}>` persistently mounted in the row
|
|
1513
|
+
template and toggle `?editing` declaratively. Do not duplicate `aria-label` on inner prompts
|
|
1514
|
+
when the enclosing `<li role="treeitem">` already provides the accessible name. Furthermore,
|
|
1515
|
+
because `<devtools-tree>` clones light DOM into shadow DOM and re-clones an entire `<li role="treeitem">`
|
|
1516
|
+
on light-DOM attribute mutations, wrap editable prompts inside a small child `UI.Widget`
|
|
1517
|
+
(`${widget(WatchExpressionPromptWidget, {...})}`, as in `WatchExpressionsSidebarPane.ts`). This allows
|
|
1518
|
+
toggling `?editing` to update the child widget in place without triggering a tree re-clone that
|
|
1519
|
+
steals focus and blurs the active input.
|
|
1520
|
+
3. **Custom elements with JavaScript property state**:
|
|
1521
|
+
Custom elements rendered inside `<devtools-tree>` whose state is set via JS properties (`.data`)
|
|
1522
|
+
must override `cloneNode(deep)` to copy `.data` and reflect dynamic state via a DOM attribute
|
|
1523
|
+
(such as `data-badge=${...}`) so `<devtools-tree>`'s `MutationObserver` detects changes and
|
|
1524
|
+
refreshes shadow clones.
|
|
1525
|
+
|
|
1502
1526
|
## Refactoring UI.Toolbar.Provider
|
|
1503
1527
|
|
|
1504
1528
|
As part of the migration, sometimes classes need to be broken up into smaller pieces. Classes implementing
|
|
@@ -199,7 +199,11 @@ export interface DoConversationRequest {
|
|
|
199
199
|
options?: ConversationOptions;
|
|
200
200
|
metadata: RequestMetadata;
|
|
201
201
|
functionality_type?: FunctionalityType;
|
|
202
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Identifies the DevTools agent or feature making the request so GCA can resolve
|
|
204
|
+
* the corresponding server-side experience configuration.
|
|
205
|
+
*/
|
|
206
|
+
client_feature: ClientFeature;
|
|
203
207
|
}
|
|
204
208
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
205
209
|
|
|
@@ -23,6 +23,33 @@ function createBaseGcaRequest(
|
|
|
23
23
|
return gcaRequest;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Maps to experiences defined in g3; search for chrome_devtools/mapping_rules.gcl to find it.
|
|
27
|
+
const CLIENT_FEATURE_TO_EXPERIENCE:
|
|
28
|
+
Record<Exclude<AIDA.ClientFeature, AIDA.ClientFeature.CLIENT_FEATURE_UNSPECIFIED>, string> = {
|
|
29
|
+
[AIDA.ClientFeature.CHROME_CONSOLE_INSIGHTS]: 'chat_console_insights',
|
|
30
|
+
[AIDA.ClientFeature.CHROME_STYLING_AGENT]: 'chat_freestyler',
|
|
31
|
+
[AIDA.ClientFeature.CHROME_NETWORK_AGENT]: 'chat_drjones_network_agent',
|
|
32
|
+
[AIDA.ClientFeature.CHROME_FILE_AGENT]: 'chat_drjones_file_agent',
|
|
33
|
+
[AIDA.ClientFeature.CHROME_PATCH_AGENT]: 'chat_patch_agent',
|
|
34
|
+
[AIDA.ClientFeature.CHROME_PERFORMANCE_ANNOTATIONS_AGENT]: 'chat_performance_annotations_agent',
|
|
35
|
+
[AIDA.ClientFeature.CHROME_PERFORMANCE_FULL_AGENT]: 'chat_performance_full_agent',
|
|
36
|
+
[AIDA.ClientFeature.CHROME_CONTEXT_SELECTION_AGENT]: 'chat_context_selection_agent',
|
|
37
|
+
[AIDA.ClientFeature.CHROME_ACCESSIBILITY_AGENT]: 'chat_accessibility_agent',
|
|
38
|
+
[AIDA.ClientFeature.CHROME_CONVERSATION_SUMMARY_AGENT]: 'chat_conversation_summary_agent',
|
|
39
|
+
[AIDA.ClientFeature.CHROME_STORAGE_AGENT]: 'chat_storage_agent',
|
|
40
|
+
[AIDA.ClientFeature.CHROME_DEVTOOLS_V2_AGENT]: 'chat_devtools_v2_agent',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function getConversationExperience(clientFeature: AIDA.ClientFeature): string {
|
|
44
|
+
// A specific client feature is required to resolve the corresponding server-side
|
|
45
|
+
// GCA experience configuration for the conversation request.
|
|
46
|
+
if (clientFeature === AIDA.ClientFeature.CLIENT_FEATURE_UNSPECIFIED ||
|
|
47
|
+
!Object.hasOwn(CLIENT_FEATURE_TO_EXPERIENCE, clientFeature)) {
|
|
48
|
+
throw new Error(`Unsupported client feature for GCA conversation: ${clientFeature}`);
|
|
49
|
+
}
|
|
50
|
+
return CLIENT_FEATURE_TO_EXPERIENCE[clientFeature];
|
|
51
|
+
}
|
|
52
|
+
|
|
26
53
|
export function aidaDoConversationRequestToGcaRequest(request: AIDA.DoConversationRequest): GCA.GenerateContentRequest {
|
|
27
54
|
try {
|
|
28
55
|
const contents: GCA.Content[] = [];
|
|
@@ -36,7 +63,8 @@ export function aidaDoConversationRequestToGcaRequest(request: AIDA.DoConversati
|
|
|
36
63
|
}
|
|
37
64
|
contents.push(convertAidaContentToGcaContent(request.current_message));
|
|
38
65
|
|
|
39
|
-
const
|
|
66
|
+
const experience = getConversationExperience(request.client_feature);
|
|
67
|
+
const gcaRequest = createBaseGcaRequest(request, contents, experience);
|
|
40
68
|
|
|
41
69
|
if (request.function_declarations) {
|
|
42
70
|
gcaRequest.tools = [{
|
|
@@ -154,7 +154,11 @@ export const HOST_RUNTIME: Api.HostRuntime.HostRuntime = {
|
|
|
154
154
|
},
|
|
155
155
|
getLocalStorage(): Storage |
|
|
156
156
|
undefined {
|
|
157
|
-
|
|
157
|
+
try {
|
|
158
|
+
return 'localStorage' in globalThis ? globalThis.localStorage : undefined;
|
|
159
|
+
} catch {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
158
162
|
},
|
|
159
163
|
getCacheStorage(): Api.HostRuntime.CacheStorageLike |
|
|
160
164
|
undefined {
|
|
@@ -237,6 +237,9 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
setHardwareConcurrency(concurrency: number): void {
|
|
240
|
+
if (concurrency < 1 || Number.isNaN(concurrency)) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
240
243
|
this.#hardwareConcurrency = concurrency;
|
|
241
244
|
for (const emulationModel of this.#targetManager.models(EmulationModel)) {
|
|
242
245
|
void emulationModel.setHardwareConcurrency(concurrency);
|
|
@@ -36,7 +36,7 @@ export interface RundownScriptCompiled extends EventBase {
|
|
|
36
36
|
url: string,
|
|
37
37
|
/**
|
|
38
38
|
* Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
|
|
39
|
-
* New traces use string instead. See https://crbug.com/447654178.
|
|
39
|
+
* New traces (since M142, Sep 2025, crrev.com/c/6990800) use string instead. See https://crbug.com/447654178.
|
|
40
40
|
*/
|
|
41
41
|
isolate: string|number,
|
|
42
42
|
/** AKA V8ContextToken. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/inspector/inspector_trace_events.cc;l=1229;drc=3c88f61e18b043e70c225d8d57c77832a85e7f58 */
|
|
@@ -61,7 +61,7 @@ export interface RundownScript extends EventBase {
|
|
|
61
61
|
data: {
|
|
62
62
|
/**
|
|
63
63
|
* Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
|
|
64
|
-
* New traces use string instead. See https://crbug.com/447654178.
|
|
64
|
+
* New traces (since M142, Sep 2025, crrev.com/c/6990800) use string instead. See https://crbug.com/447654178.
|
|
65
65
|
*/
|
|
66
66
|
isolate: string|number,
|
|
67
67
|
executionContextId: Protocol.Runtime.ExecutionContextId,
|
|
@@ -91,7 +91,11 @@ export interface RundownScriptSource extends EventBase {
|
|
|
91
91
|
name: 'ScriptCatchup'|'LargeScriptCatchup'|'TooLargeScriptCatchup';
|
|
92
92
|
args: {
|
|
93
93
|
data: {
|
|
94
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
|
|
96
|
+
* New traces (since M142, Sep 2025, crrev.com/c/6990800) use string instead. See https://crbug.com/447654178.
|
|
97
|
+
*/
|
|
98
|
+
isolate: string|number,
|
|
95
99
|
scriptId: number,
|
|
96
100
|
length?: number,
|
|
97
101
|
sourceText?: string,
|
|
@@ -124,7 +128,7 @@ interface FunctionCall extends EventBase {
|
|
|
124
128
|
scriptId: Protocol.Runtime.ScriptId,
|
|
125
129
|
/**
|
|
126
130
|
* Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
|
|
127
|
-
* New traces use string instead. See https://crbug.com/447654178.
|
|
131
|
+
* New traces (since M142, Sep 2025, crrev.com/c/6990800) use string instead. See https://crbug.com/447654178.
|
|
128
132
|
*/
|
|
129
133
|
isolate?: string|number,
|
|
130
134
|
},
|
|
@@ -482,6 +482,7 @@ function convertPreloadingStatus(status: Protocol.Preload.PreloadingStatus): Pre
|
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
export type PreloadingAttemptId = string;
|
|
485
|
+
export type PreloadingSourceId = string;
|
|
485
486
|
|
|
486
487
|
export type PreloadingAttempt = PrefetchAttempt|PrerenderAttempt|PrerenderUntilScriptAttempt;
|
|
487
488
|
|
|
@@ -552,7 +553,7 @@ export interface PrerenderUntilScriptAttemptInternal {
|
|
|
552
553
|
mismatchedHeaders: Protocol.Preload.PrerenderMismatchedHeaders[]|null;
|
|
553
554
|
}
|
|
554
555
|
|
|
555
|
-
function
|
|
556
|
+
function makePreloadingSourceId(key: Protocol.Preload.PreloadingAttemptKey): PreloadingSourceId {
|
|
556
557
|
let action;
|
|
557
558
|
switch (key.action) {
|
|
558
559
|
case Protocol.Preload.SpeculationAction.Prefetch:
|
|
@@ -582,6 +583,15 @@ function makePreloadingAttemptId(key: Protocol.Preload.PreloadingAttemptKey): Pr
|
|
|
582
583
|
return `${key.loaderId}:${action}:${key.url}:${targetHint}:${key.formSubmission ? 'formSubmission' : 'undefined'}`;
|
|
583
584
|
}
|
|
584
585
|
|
|
586
|
+
function makePreloadingAttemptId(key: Protocol.Preload.PreloadingAttemptKey,
|
|
587
|
+
pipelineId?: Protocol.Preload.PreloadPipelineId|null): PreloadingAttemptId {
|
|
588
|
+
const baseId = makePreloadingSourceId(key);
|
|
589
|
+
if (pipelineId) {
|
|
590
|
+
return `${baseId}:${pipelineId}`;
|
|
591
|
+
}
|
|
592
|
+
return baseId;
|
|
593
|
+
}
|
|
594
|
+
|
|
585
595
|
export class PreloadPipeline {
|
|
586
596
|
private inner: Map<Protocol.Preload.SpeculationAction, PreloadingAttempt>;
|
|
587
597
|
|
|
@@ -724,7 +734,7 @@ class PreloadingAttemptRegistry {
|
|
|
724
734
|
return null;
|
|
725
735
|
}
|
|
726
736
|
|
|
727
|
-
return this.enrich(attempt, sources.
|
|
737
|
+
return this.enrich(attempt, sources.getByKey(attempt.key));
|
|
728
738
|
}
|
|
729
739
|
|
|
730
740
|
// Returns representative preloading attempts that triggered by the rule set with `ruleSetId`.
|
|
@@ -739,7 +749,7 @@ class PreloadingAttemptRegistry {
|
|
|
739
749
|
return [...this.map.entries()]
|
|
740
750
|
.map(([id, value]) => ({
|
|
741
751
|
id,
|
|
742
|
-
value: this.enrich(value, sources.
|
|
752
|
+
value: this.enrich(value, sources.getByKey(value.key)),
|
|
743
753
|
}))
|
|
744
754
|
.filter(({value}) => !ruleSetId || value.ruleSetIds.includes(ruleSetId))
|
|
745
755
|
.filter(({value}) => this.isAttemptRepresentative(value));
|
|
@@ -769,7 +779,12 @@ class PreloadingAttemptRegistry {
|
|
|
769
779
|
}
|
|
770
780
|
|
|
771
781
|
upsert(attempt: PreloadingAttemptInternal): void {
|
|
772
|
-
const
|
|
782
|
+
const baseId = makePreloadingSourceId(attempt.key);
|
|
783
|
+
let id: PreloadingAttemptId = baseId;
|
|
784
|
+
const existing = this.map.get(baseId);
|
|
785
|
+
if (existing?.pipelineId && attempt.pipelineId && existing.pipelineId !== attempt.pipelineId) {
|
|
786
|
+
id = makePreloadingAttemptId(attempt.key, attempt.pipelineId);
|
|
787
|
+
}
|
|
773
788
|
|
|
774
789
|
this.map.set(id, attempt);
|
|
775
790
|
|
|
@@ -849,10 +864,8 @@ class PreloadingAttemptRegistry {
|
|
|
849
864
|
// Removes keys in `this.map` that are not in `sources`. This is used to
|
|
850
865
|
// remove attempts that no longer have a matching speculation rule.
|
|
851
866
|
cleanUpRemovedAttempts(sources: SourceRegistry): void {
|
|
852
|
-
const keysToRemove =
|
|
853
|
-
|
|
854
|
-
key => !sources.getById(key),
|
|
855
|
-
);
|
|
867
|
+
const keysToRemove =
|
|
868
|
+
Array.from(this.map.entries()).filter(([, attempt]) => !sources.getByKey(attempt.key)).map(([id]) => id);
|
|
856
869
|
for (const key of keysToRemove) {
|
|
857
870
|
this.map.delete(key);
|
|
858
871
|
}
|
|
@@ -872,10 +885,10 @@ class PreloadingAttemptRegistry {
|
|
|
872
885
|
}
|
|
873
886
|
|
|
874
887
|
class SourceRegistry {
|
|
875
|
-
private map: Map<
|
|
876
|
-
new Map<
|
|
888
|
+
private map: Map<PreloadingSourceId, Protocol.Preload.PreloadingAttemptSource> =
|
|
889
|
+
new Map<PreloadingSourceId, Protocol.Preload.PreloadingAttemptSource>();
|
|
877
890
|
|
|
878
|
-
entries(): IterableIterator<[
|
|
891
|
+
entries(): IterableIterator<[PreloadingSourceId, Protocol.Preload.PreloadingAttemptSource]> {
|
|
879
892
|
return this.map.entries();
|
|
880
893
|
}
|
|
881
894
|
|
|
@@ -883,11 +896,15 @@ class SourceRegistry {
|
|
|
883
896
|
return this.map.size === 0;
|
|
884
897
|
}
|
|
885
898
|
|
|
886
|
-
getById(id:
|
|
899
|
+
getById(id: PreloadingSourceId): Protocol.Preload.PreloadingAttemptSource|null {
|
|
887
900
|
return this.map.get(id) || null;
|
|
888
901
|
}
|
|
889
902
|
|
|
903
|
+
getByKey(key: Protocol.Preload.PreloadingAttemptKey): Protocol.Preload.PreloadingAttemptSource|null {
|
|
904
|
+
return this.getById(makePreloadingSourceId(key));
|
|
905
|
+
}
|
|
906
|
+
|
|
890
907
|
update(sources: Protocol.Preload.PreloadingAttemptSource[]): void {
|
|
891
|
-
this.map = new Map(sources.map(s => [
|
|
908
|
+
this.map = new Map(sources.map(s => [makePreloadingSourceId(s.key), s]));
|
|
892
909
|
}
|
|
893
910
|
}
|
|
@@ -708,6 +708,9 @@
|
|
|
708
708
|
--sys-typescale-body5-bold: var(--ref-typeface-weight-bold)
|
|
709
709
|
var(--sys-typescale-body5-size) / var(--sys-typescale-body5-line-height)
|
|
710
710
|
var(--default-font-family);
|
|
711
|
+
--sys-typescale-label: var(--ref-typeface-weight-bold)
|
|
712
|
+
var(--sys-typescale-label-size) / var(--sys-typescale-label-line-height)
|
|
713
|
+
var(--default-font-family);
|
|
711
714
|
--sys-typescale-monospace-regular: var(--ref-typeface-weight-regular)
|
|
712
715
|
var(--sys-typescale-monospace-size) /
|
|
713
716
|
var(--sys-typescale-monospace-line-height) var(--monospace-font-family);
|
|
@@ -724,6 +727,7 @@
|
|
|
724
727
|
--sys-typescale-body3-size: 13px;
|
|
725
728
|
--sys-typescale-body4-size: 12px;
|
|
726
729
|
--sys-typescale-body5-size: 11px;
|
|
730
|
+
--sys-typescale-label-size: 9px;
|
|
727
731
|
--sys-typescale-monospace-size: 11px;
|
|
728
732
|
--sys-typescale-headline1-line-height: 32px;
|
|
729
733
|
--sys-typescale-headline2-line-height: 24px;
|
|
@@ -735,6 +739,7 @@
|
|
|
735
739
|
--sys-typescale-body3-line-height: 20px;
|
|
736
740
|
--sys-typescale-body4-line-height: 16px;
|
|
737
741
|
--sys-typescale-body5-line-height: 16px;
|
|
742
|
+
--sys-typescale-label-line-height: 9px;
|
|
738
743
|
--sys-typescale-monospace-line-height: 1.2;
|
|
739
744
|
|
|
740
745
|
/* Typography end */
|
|
@@ -114,8 +114,10 @@ export class Scope {
|
|
|
114
114
|
}
|
|
115
115
|
variable.uses.push(...defUses.uses);
|
|
116
116
|
if (defUses.definitionKind === DefinitionKind.VAR) {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// A `var` declaration inside a `catch` block can redeclare the catch
|
|
118
|
+
// parameter; promote it to `VAR` so it hoists to the enclosing function or
|
|
119
|
+
// global scope.
|
|
120
|
+
if (variable.definitionKind === DefinitionKind.NONE || variable.definitionKind === DefinitionKind.LET) {
|
|
119
121
|
variable.definitionKind = defUses.definitionKind;
|
|
120
122
|
}
|
|
121
123
|
} else {
|
|
@@ -204,7 +204,7 @@ inspectorBackend.registerType("BluetoothEmulation.CharacteristicProperties", [{"
|
|
|
204
204
|
|
|
205
205
|
// Browser.
|
|
206
206
|
inspectorBackend.registerEnum("Browser.WindowState", {Normal: "normal", Minimized: "minimized", Maximized: "maximized", Fullscreen: "fullscreen"});
|
|
207
|
-
inspectorBackend.registerEnum("Browser.PermissionType", {Ar: "ar", AudioCapture: "audioCapture", AutomaticFullscreen: "automaticFullscreen", BackgroundFetch: "backgroundFetch", BackgroundSync: "backgroundSync", CameraPanTiltZoom: "cameraPanTiltZoom", CapturedSurfaceControl: "capturedSurfaceControl", ClipboardReadWrite: "clipboardReadWrite", ClipboardSanitizedWrite: "clipboardSanitizedWrite", DisplayCapture: "displayCapture", DurableStorage: "durableStorage", Geolocation: "geolocation", HandTracking: "handTracking", IdleDetection: "idleDetection", KeyboardLock: "keyboardLock", LocalFonts: "localFonts", LocalNetwork: "localNetwork", LocalNetworkAccess: "localNetworkAccess", LoopbackNetwork: "loopbackNetwork", Midi: "midi", MidiSysex: "midiSysex", Nfc: "nfc", Notifications: "notifications", PaymentHandler: "paymentHandler", PeriodicBackgroundSync: "periodicBackgroundSync", PointerLock: "pointerLock", ProtectedMediaIdentifier: "protectedMediaIdentifier", Sensors: "sensors", SmartCard: "smartCard", SpeakerSelection: "speakerSelection", StorageAccess: "storageAccess",
|
|
207
|
+
inspectorBackend.registerEnum("Browser.PermissionType", {Ar: "ar", AudioCapture: "audioCapture", AutomaticFullscreen: "automaticFullscreen", BackgroundFetch: "backgroundFetch", BackgroundSync: "backgroundSync", CameraPanTiltZoom: "cameraPanTiltZoom", CapturedSurfaceControl: "capturedSurfaceControl", ClipboardReadWrite: "clipboardReadWrite", ClipboardSanitizedWrite: "clipboardSanitizedWrite", DisplayCapture: "displayCapture", DurableStorage: "durableStorage", Geolocation: "geolocation", HandTracking: "handTracking", IdleDetection: "idleDetection", KeyboardLock: "keyboardLock", LocalFonts: "localFonts", LocalNetwork: "localNetwork", LocalNetworkAccess: "localNetworkAccess", LoopbackNetwork: "loopbackNetwork", Midi: "midi", MidiSysex: "midiSysex", Nfc: "nfc", Notifications: "notifications", PaymentHandler: "paymentHandler", PeriodicBackgroundSync: "periodicBackgroundSync", PointerLock: "pointerLock", ProtectedMediaIdentifier: "protectedMediaIdentifier", Sensors: "sensors", SmartCard: "smartCard", SpeakerSelection: "speakerSelection", StorageAccess: "storageAccess", VideoCapture: "videoCapture", Vr: "vr", WakeLockScreen: "wakeLockScreen", WakeLockSystem: "wakeLockSystem", WebAppInstallation: "webAppInstallation", WebPrinting: "webPrinting", WindowManagement: "windowManagement"});
|
|
208
208
|
inspectorBackend.registerEnum("Browser.PermissionSetting", {Granted: "granted", Denied: "denied", Prompt: "prompt"});
|
|
209
209
|
inspectorBackend.registerEnum("Browser.BrowserCommandId", {OpenTabSearch: "openTabSearch", CloseTabSearch: "closeTabSearch", OpenGlic: "openGlic"});
|
|
210
210
|
inspectorBackend.registerEvent("Browser.downloadWillBegin", ["frameId", "guid", "url", "suggestedFilename"]);
|
|
@@ -1059,7 +1059,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
|
|
|
1059
1059
|
inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
|
|
1060
1060
|
inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
|
|
1061
1061
|
inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
|
|
1062
|
-
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth",
|
|
1062
|
+
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Haptics: "haptics", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", PublickeyCredentialsRemoteClientDataJson: "publickey-credentials-remote-client-data-json", Rewriter: "rewriter", ScreenWakeLock: "screen-wake-lock", SemanticEmbedder: "semantic-embedder", Serial: "serial", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", UnboundedElement: "unbounded-element", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
|
|
1063
1063
|
inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
|
|
1064
1064
|
inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
|
|
1065
1065
|
inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
|
|
@@ -1512,15 +1512,15 @@ inspectorBackend.registerType("WebAuthn.Credential", [{"name": "credentialId", "
|
|
|
1512
1512
|
inspectorBackend.registerEnum("WebMCP.InvocationStatus", {Completed: "Completed", Canceled: "Canceled", Error: "Error"});
|
|
1513
1513
|
inspectorBackend.registerEvent("WebMCP.toolsAdded", ["tools"]);
|
|
1514
1514
|
inspectorBackend.registerEvent("WebMCP.toolsRemoved", ["tools"]);
|
|
1515
|
-
inspectorBackend.registerEvent("WebMCP.toolInvoked", ["
|
|
1515
|
+
inspectorBackend.registerEvent("WebMCP.toolInvoked", ["frameId", "invocationId", "input", "toolName", "toolId"]);
|
|
1516
1516
|
inspectorBackend.registerEvent("WebMCP.toolResponded", ["invocationId", "status", "output", "errorText", "exception"]);
|
|
1517
1517
|
inspectorBackend.registerCommand("WebMCP.enable", [], [], "Enables the WebMCP domain, allowing events to be sent. Enabling the domain will trigger a toolsAdded event for all currently registered tools.");
|
|
1518
1518
|
inspectorBackend.registerCommand("WebMCP.disable", [], [], "Disables the WebMCP domain.");
|
|
1519
1519
|
inspectorBackend.registerCommand("WebMCP.invokeTool", [{"name": "frameId", "type": "string", "optional": false, "description": "Frame in which to invoke the tool.", "typeRef": "Page.FrameId"}, {"name": "toolName", "type": "string", "optional": false, "description": "Name of the tool to invoke.", "typeRef": null}, {"name": "input", "type": "object", "optional": false, "description": "Input parameters for the tool, matching the tool's inputSchema.", "typeRef": null}], ["invocationId"], "Invokes a registered tool.");
|
|
1520
1520
|
inspectorBackend.registerCommand("WebMCP.cancelInvocation", [{"name": "invocationId", "type": "string", "optional": false, "description": "Invocation identifier to cancel.", "typeRef": null}], [], "Cancels a pending tool invocation.");
|
|
1521
1521
|
inspectorBackend.registerType("WebMCP.Annotation", [{"name": "readOnly", "type": "boolean", "optional": true, "description": "A hint indicating that the tool does not modify any state.", "typeRef": null}, {"name": "untrustedContent", "type": "boolean", "optional": true, "description": "A hint indicating that the tool output may contain untrusted content, ex: UGC, 3rd party data.", "typeRef": null}, {"name": "consequential", "type": "boolean", "optional": true, "description": "A hint indicating that executing the tool will result in consequential actions, ex: booking a flight, transferring money.", "typeRef": null}, {"name": "debugging", "type": "boolean", "optional": true, "description": "If true, indicates that the tool is intended for debugging and developer tooling rather than end-user interactions.", "typeRef": null}, {"name": "autosubmit", "type": "boolean", "optional": true, "description": "If the declarative tool was declared with the autosubmit attribute.", "typeRef": null}]);
|
|
1522
|
-
inspectorBackend.registerType("WebMCP.Tool", [{"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "description", "type": "string", "optional": false, "description": "Tool description.", "typeRef": null}, {"name": "inputSchema", "type": "object", "optional": true, "description": "Schema for the tool's input parameters.", "typeRef": null}, {"name": "annotations", "type": "object", "optional": true, "description": "Optional annotations for the tool.", "typeRef": "WebMCP.Annotation"}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}, {"name": "backendNodeId", "type": "number", "optional": true, "description": "Optional node ID for declarative tools.", "typeRef": "DOM.BackendNodeId"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the registration.", "typeRef": "Runtime.StackTrace"}]);
|
|
1523
|
-
inspectorBackend.registerType("WebMCP.RemovedTool", [{"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}]);
|
|
1522
|
+
inspectorBackend.registerType("WebMCP.Tool", [{"name": "toolId", "type": "string", "optional": false, "description": "Tool identifier.", "typeRef": "WebMCP.ToolId"}, {"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "description", "type": "string", "optional": false, "description": "Tool description.", "typeRef": null}, {"name": "inputSchema", "type": "object", "optional": true, "description": "Schema for the tool's input parameters.", "typeRef": null}, {"name": "outputSchema", "type": "object", "optional": true, "description": "Schema for the tool's output structure.", "typeRef": null}, {"name": "annotations", "type": "object", "optional": true, "description": "Optional annotations for the tool.", "typeRef": "WebMCP.Annotation"}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}, {"name": "backendNodeId", "type": "number", "optional": true, "description": "Optional node ID for declarative tools.", "typeRef": "DOM.BackendNodeId"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the registration.", "typeRef": "Runtime.StackTrace"}]);
|
|
1523
|
+
inspectorBackend.registerType("WebMCP.RemovedTool", [{"name": "toolId", "type": "string", "optional": false, "description": "Identifier of the removed tool.", "typeRef": "WebMCP.ToolId"}, {"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}]);
|
|
1524
1524
|
|
|
1525
1525
|
// Debugger.
|
|
1526
1526
|
inspectorBackend.registerEnum("Debugger.ScopeType", {Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch", Block: "block", Script: "script", Eval: "eval", Module: "module", WasmExpressionStack: "wasm-expression-stack"});
|
|
@@ -4732,6 +4732,9 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
4732
4732
|
"grid-rows",
|
|
4733
4733
|
"grid-columns",
|
|
4734
4734
|
"grid-order",
|
|
4735
|
+
"grid-lanes-flow",
|
|
4736
|
+
"grid-lanes-track",
|
|
4737
|
+
"grid-lanes-order",
|
|
4735
4738
|
"source-order"
|
|
4736
4739
|
],
|
|
4737
4740
|
"name": "reading-flow"
|
|
@@ -8587,6 +8590,9 @@ export const generatedPropertyValues: Record<string, CSSPropertyValue> = {
|
|
|
8587
8590
|
"grid-rows",
|
|
8588
8591
|
"grid-columns",
|
|
8589
8592
|
"grid-order",
|
|
8593
|
+
"grid-lanes-flow",
|
|
8594
|
+
"grid-lanes-track",
|
|
8595
|
+
"grid-lanes-order",
|
|
8590
8596
|
"source-order"
|
|
8591
8597
|
]
|
|
8592
8598
|
},
|
|
@@ -2465,7 +2465,6 @@ export namespace Browser {
|
|
|
2465
2465
|
SmartCard = 'smartCard',
|
|
2466
2466
|
SpeakerSelection = 'speakerSelection',
|
|
2467
2467
|
StorageAccess = 'storageAccess',
|
|
2468
|
-
TopLevelStorageAccess = 'topLevelStorageAccess',
|
|
2469
2468
|
VideoCapture = 'videoCapture',
|
|
2470
2469
|
Vr = 'vr',
|
|
2471
2470
|
WakeLockScreen = 'wakeLockScreen',
|
|
@@ -14780,7 +14779,6 @@ export namespace Page {
|
|
|
14780
14779
|
Autofill = 'autofill',
|
|
14781
14780
|
Autoplay = 'autoplay',
|
|
14782
14781
|
Bluetooth = 'bluetooth',
|
|
14783
|
-
BrowsingTopics = 'browsing-topics',
|
|
14784
14782
|
Camera = 'camera',
|
|
14785
14783
|
CapturedSurfaceControl = 'captured-surface-control',
|
|
14786
14784
|
ChDpr = 'ch-dpr',
|
|
@@ -14834,7 +14832,6 @@ export namespace Page {
|
|
|
14834
14832
|
Hid = 'hid',
|
|
14835
14833
|
IdentityCredentialsGet = 'identity-credentials-get',
|
|
14836
14834
|
IdleDetection = 'idle-detection',
|
|
14837
|
-
InterestCohort = 'interest-cohort',
|
|
14838
14835
|
KeyboardMap = 'keyboard-map',
|
|
14839
14836
|
LanguageDetector = 'language-detector',
|
|
14840
14837
|
LanguageModel = 'language-model',
|
|
@@ -14858,6 +14855,7 @@ export namespace Page {
|
|
|
14858
14855
|
PublickeyCredentialsRemoteClientDataJson = 'publickey-credentials-remote-client-data-json',
|
|
14859
14856
|
Rewriter = 'rewriter',
|
|
14860
14857
|
ScreenWakeLock = 'screen-wake-lock',
|
|
14858
|
+
SemanticEmbedder = 'semantic-embedder',
|
|
14861
14859
|
Serial = 'serial',
|
|
14862
14860
|
SmartCard = 'smart-card',
|
|
14863
14861
|
SpeakerSelection = 'speaker-selection',
|
|
@@ -20533,10 +20531,21 @@ export namespace WebMCP {
|
|
|
20533
20531
|
Error = 'Error',
|
|
20534
20532
|
}
|
|
20535
20533
|
|
|
20534
|
+
/**
|
|
20535
|
+
* Unique identifier of a registered tool. A new identifier is created every time a tool is registered, so a tool that
|
|
20536
|
+
* is unregistered and then registered again under the same name gets a different identifier. Clients should treat it
|
|
20537
|
+
* as an opaque string.
|
|
20538
|
+
*/
|
|
20539
|
+
export type ToolId = OpaqueIdentifier<string, 'Protocol.WebMCP.ToolId'>;
|
|
20540
|
+
|
|
20536
20541
|
/**
|
|
20537
20542
|
* Definition of a tool that can be invoked.
|
|
20538
20543
|
*/
|
|
20539
20544
|
export interface Tool {
|
|
20545
|
+
/**
|
|
20546
|
+
* Tool identifier.
|
|
20547
|
+
*/
|
|
20548
|
+
toolId: ToolId;
|
|
20540
20549
|
/**
|
|
20541
20550
|
* Tool name.
|
|
20542
20551
|
*/
|
|
@@ -20549,6 +20558,10 @@ export namespace WebMCP {
|
|
|
20549
20558
|
* Schema for the tool's input parameters.
|
|
20550
20559
|
*/
|
|
20551
20560
|
inputSchema?: any;
|
|
20561
|
+
/**
|
|
20562
|
+
* Schema for the tool's output structure.
|
|
20563
|
+
*/
|
|
20564
|
+
outputSchema?: any;
|
|
20552
20565
|
/**
|
|
20553
20566
|
* Optional annotations for the tool.
|
|
20554
20567
|
*/
|
|
@@ -20571,6 +20584,10 @@ export namespace WebMCP {
|
|
|
20571
20584
|
* Definition of a tool that was removed.
|
|
20572
20585
|
*/
|
|
20573
20586
|
export interface RemovedTool {
|
|
20587
|
+
/**
|
|
20588
|
+
* Identifier of the removed tool.
|
|
20589
|
+
*/
|
|
20590
|
+
toolId: ToolId;
|
|
20574
20591
|
/**
|
|
20575
20592
|
* Tool name.
|
|
20576
20593
|
*/
|
|
@@ -20634,10 +20651,6 @@ export namespace WebMCP {
|
|
|
20634
20651
|
* Event fired when a tool invocation starts.
|
|
20635
20652
|
*/
|
|
20636
20653
|
export interface ToolInvokedEvent {
|
|
20637
|
-
/**
|
|
20638
|
-
* Name of the tool to invoke.
|
|
20639
|
-
*/
|
|
20640
|
-
toolName: string;
|
|
20641
20654
|
/**
|
|
20642
20655
|
* Frame id
|
|
20643
20656
|
*/
|
|
@@ -20650,6 +20663,16 @@ export namespace WebMCP {
|
|
|
20650
20663
|
* The input parameters used for the invocation.
|
|
20651
20664
|
*/
|
|
20652
20665
|
input: string;
|
|
20666
|
+
/**
|
|
20667
|
+
* Name of the tool to invoke. Missing if the tool was invoked by its identifier, but could not be found (e.g.,
|
|
20668
|
+
* it was already unregistered), so its name could not be recovered.
|
|
20669
|
+
*/
|
|
20670
|
+
toolName?: string;
|
|
20671
|
+
/**
|
|
20672
|
+
* Identifier of the tool to invoke. Missing if the tool was invoked by name, but could not be found, so its
|
|
20673
|
+
* identifier could not be recovered.
|
|
20674
|
+
*/
|
|
20675
|
+
toolId?: ToolId;
|
|
20653
20676
|
}
|
|
20654
20677
|
|
|
20655
20678
|
/**
|