chrome-devtools-frontend 1.0.1638082 → 1.0.1640418
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/front_end/core/host/AidaClientTypes.ts +8 -6
- package/front_end/core/sdk/DOMStorageModel.ts +1 -1
- package/front_end/core/sdk/TargetManager.ts +14 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +147 -0
- package/front_end/generated/ARIAProperties.js +0 -4
- package/front_end/generated/InspectorBackendCommands.ts +7 -3
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +14 -0
- package/front_end/generated/protocol.ts +80 -0
- package/front_end/global_typings/global_defs.d.ts +13 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +116 -0
- package/front_end/models/ai_assistance/AiConversation.ts +22 -28
- package/front_end/models/ai_assistance/AiOrigins.ts +46 -0
- package/front_end/models/ai_assistance/README.md +16 -0
- package/front_end/models/ai_assistance/StorageItem.ts +30 -26
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +73 -36
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +25 -10
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/FileAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +3 -4
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +41 -12
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +442 -122
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/performance/AIContext.ts +7 -8
- package/front_end/models/ai_assistance/skills/README.md +40 -0
- package/front_end/models/ai_assistance/skills/Skill.ts +13 -0
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +10 -0
- package/front_end/models/ai_assistance/skills/styling.md +6 -0
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +20 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +5 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -1
- package/front_end/models/stack_trace/StackTraceImpl.ts +29 -9
- package/front_end/models/stack_trace/StackTraceModel.ts +23 -11
- package/front_end/models/stack_trace/Trie.ts +11 -1
- package/front_end/models/trace/extras/TraceTree.ts +20 -1
- package/front_end/models/trace/insights/Common.ts +9 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +8 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +114 -2
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +2 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +27 -0
- package/front_end/panels/application/CookieItemsView.ts +24 -0
- package/front_end/panels/application/DOMStorageItemsView.ts +9 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +6 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +13 -12
- package/front_end/panels/elements/StandaloneStylesContainer.ts +10 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +30 -1
- package/front_end/panels/elements/StylesContainer.ts +3 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +45 -4
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +4 -4
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -0
- package/front_end/panels/network/NetworkLogViewColumns.ts +2 -2
- package/front_end/panels/network/networkTimingTable.css +2 -4
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +169 -106
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/marked/README.chromium +3 -6
- package/front_end/third_party/marked/package/README.md +5 -5
- package/front_end/third_party/marked/package/bin/main.js +27 -22
- package/front_end/third_party/marked/package/bin/marked.js +2 -1
- package/front_end/third_party/marked/package/lib/marked.esm.d.ts +346 -256
- package/front_end/third_party/marked/package/lib/marked.esm.js +67 -2698
- package/front_end/third_party/marked/package/lib/marked.esm.js.map +7 -1
- package/front_end/third_party/marked/package/lib/marked.umd.js +69 -2722
- package/front_end/third_party/marked/package/lib/marked.umd.js.map +7 -1
- package/front_end/third_party/marked/package/man/marked.1 +4 -2
- package/front_end/third_party/marked/package/man/marked.1.md +2 -1
- package/front_end/third_party/marked/package/package.json +49 -57
- package/front_end/tsconfig.json +1 -1
- package/front_end/ui/components/markdown_view/CodeBlock.ts +17 -6
- package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -3
- package/front_end/ui/components/markdown_view/codeBlock.css +11 -0
- package/front_end/ui/components/markdown_view/markdownView.css +17 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +0 -79
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +16 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +2 -0
- package/mcp/mcp.ts +1 -1
- package/package.json +7 -9
- package/front_end/third_party/marked/package/bin/marked +0 -215
- package/front_end/third_party/marked/package/lib/marked.cjs +0 -2726
- package/front_end/third_party/marked/package/lib/marked.cjs.map +0 -1
- package/front_end/third_party/marked/package/lib/marked.d.cts +0 -670
- package/front_end/third_party/marked/package/lib/marked.js +0 -2780
- package/front_end/third_party/marked/package/man/marked.1.txt +0 -86
- package/front_end/third_party/marked/package/marked.min.js +0 -6
- package/front_end/third_party/marked/package/src/Lexer.js +0 -492
- package/front_end/third_party/marked/package/src/Parser.js +0 -286
- package/front_end/third_party/marked/package/src/Renderer.js +0 -166
- package/front_end/third_party/marked/package/src/Slugger.js +0 -49
- package/front_end/third_party/marked/package/src/TextRenderer.js +0 -42
- package/front_end/third_party/marked/package/src/Tokenizer.js +0 -755
- package/front_end/third_party/marked/package/src/defaults.js +0 -29
- package/front_end/third_party/marked/package/src/helpers.js +0 -249
- package/front_end/third_party/marked/package/src/marked.js +0 -350
- package/front_end/third_party/marked/package/src/rules.js +0 -285
- /package/front_end/third_party/marked/package/{LICENSE.md → LICENSE} +0 -0
|
@@ -29,16 +29,18 @@ export interface Content {
|
|
|
29
29
|
role: Role;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export
|
|
33
|
-
text: string,
|
|
34
|
-
}|{
|
|
35
|
-
functionCall: AidaFunctionCall,
|
|
36
|
-
}|{
|
|
32
|
+
export interface FunctionResponsePart {
|
|
37
33
|
functionResponse: {
|
|
38
34
|
name: string,
|
|
39
35
|
response: Record<string, unknown>,
|
|
40
|
-
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type Part = {
|
|
40
|
+
text: string,
|
|
41
41
|
}|{
|
|
42
|
+
functionCall: AidaFunctionCall,
|
|
43
|
+
}|FunctionResponsePart|{
|
|
42
44
|
/** Inline media bytes. */
|
|
43
45
|
inlineData: MediaBlob,
|
|
44
46
|
};
|
|
@@ -59,7 +59,7 @@ export class DOMStorage extends Common.ObjectWrapper.ObjectWrapper<DOMStorage.Ev
|
|
|
59
59
|
return DOMStorage.storageId(this.#storageKey, this.#isLocalStorage);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
get storageKey(): string
|
|
62
|
+
get storageKey(): string {
|
|
63
63
|
return this.#storageKey;
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -105,13 +105,26 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
105
105
|
await Promise.all(suspendPromises);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
async #waitForPromiseWithTimeout(promise: Promise<void>, timeoutMessage: string): Promise<void> {
|
|
109
|
+
const {promise: timeoutPromise, resolve: timeoutResolve} = Promise.withResolvers<void>();
|
|
110
|
+
const timeoutId = globalThis.setTimeout(() => {
|
|
111
|
+
Common.Console.Console.instance().warn(timeoutMessage);
|
|
112
|
+
timeoutResolve();
|
|
113
|
+
}, 2000);
|
|
114
|
+
await Promise.race([promise, timeoutPromise]);
|
|
115
|
+
globalThis.clearTimeout(timeoutId);
|
|
116
|
+
timeoutResolve(); // avoids "pending async operations" error from test harness.
|
|
117
|
+
}
|
|
118
|
+
|
|
108
119
|
async resumeAllTargets(): Promise<void> {
|
|
109
120
|
if (!this.#isSuspended) {
|
|
110
121
|
return;
|
|
111
122
|
}
|
|
112
123
|
this.#isSuspended = false;
|
|
113
124
|
this.dispatchEventToListeners(Events.SUSPEND_STATE_CHANGED);
|
|
114
|
-
const resumePromises = Array.from(this.#targets.values(), target =>
|
|
125
|
+
const resumePromises = Array.from(this.#targets.values(), async target => {
|
|
126
|
+
await this.#waitForPromiseWithTimeout(target.resume(), `Timeout waiting for target ${target.name()} to resume`);
|
|
127
|
+
});
|
|
115
128
|
await Promise.all(resumePromises);
|
|
116
129
|
}
|
|
117
130
|
|
|
@@ -2818,6 +2818,153 @@ export abstract class HeapSnapshot {
|
|
|
2818
2818
|
return new HeapSnapshotEdgesProvider(this, filter, node.retainers(), indexProvider);
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
2821
|
+
getRetainingPaths(
|
|
2822
|
+
nodeIndex: number,
|
|
2823
|
+
maxDepth = 30,
|
|
2824
|
+
maxNodes = 5000,
|
|
2825
|
+
maxSiblings = 100,
|
|
2826
|
+
): HeapSnapshotModel.HeapSnapshotModel.RetainingPaths {
|
|
2827
|
+
const {
|
|
2828
|
+
nodeFieldCount,
|
|
2829
|
+
firstRetainerIndex,
|
|
2830
|
+
retainingNodes,
|
|
2831
|
+
retainingEdges,
|
|
2832
|
+
edgeTypeOffset,
|
|
2833
|
+
edgeWeakType,
|
|
2834
|
+
containmentEdges
|
|
2835
|
+
} = this;
|
|
2836
|
+
const distances = this.#nodeDistancesForRetainersView ?? this.nodeDistances;
|
|
2837
|
+
let traversedNodesCount = 0;
|
|
2838
|
+
const visiting = new Set<number>();
|
|
2839
|
+
const visited = new Map<number, number>();
|
|
2840
|
+
// Distance 0: Synthetic root, Distance 1: (GC roots), Distance 2: e.g. (Stack roots) or (Handle scope)
|
|
2841
|
+
const rootDistance = 2;
|
|
2842
|
+
const limitsReached: {depth?: boolean, nodes?: boolean, siblings?: boolean} = {};
|
|
2843
|
+
|
|
2844
|
+
const buildForest =
|
|
2845
|
+
(currentIndex: number, currentDepth: number): HeapSnapshotModel.HeapSnapshotModel.RetainingEdge[] => {
|
|
2846
|
+
traversedNodesCount++;
|
|
2847
|
+
|
|
2848
|
+
if (traversedNodesCount > maxNodes) {
|
|
2849
|
+
limitsReached.nodes = true;
|
|
2850
|
+
return [];
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
if (currentDepth >= maxDepth) {
|
|
2854
|
+
limitsReached.depth = true;
|
|
2855
|
+
return [];
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
const ordinal = currentIndex / nodeFieldCount;
|
|
2859
|
+
const currentDistance = distances[ordinal];
|
|
2860
|
+
|
|
2861
|
+
if (currentDistance <= rootDistance) {
|
|
2862
|
+
return [];
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
if (visiting.has(currentIndex)) {
|
|
2866
|
+
return [];
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
const cachedDepth = visited.get(currentIndex);
|
|
2870
|
+
if (cachedDepth !== undefined) {
|
|
2871
|
+
// Only revisit the node if the current depth is less than the cached depth. In that case we might now find a path to the root.
|
|
2872
|
+
if (currentDepth >= cachedDepth) {
|
|
2873
|
+
return [];
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
visiting.add(currentIndex);
|
|
2878
|
+
|
|
2879
|
+
const beginRetainerIndex = firstRetainerIndex[ordinal];
|
|
2880
|
+
const endRetainerIndex = firstRetainerIndex[ordinal + 1];
|
|
2881
|
+
|
|
2882
|
+
const retainers: Array<{retainerIndex: number, dist: number, nodeIndex: number}> = [];
|
|
2883
|
+
|
|
2884
|
+
for (let retainerIndex = beginRetainerIndex; retainerIndex < endRetainerIndex; ++retainerIndex) {
|
|
2885
|
+
const retainerNodeIndex = retainingNodes[retainerIndex];
|
|
2886
|
+
const retainerNodeOrdinal = retainerNodeIndex / nodeFieldCount;
|
|
2887
|
+
const dist = distances[retainerNodeOrdinal];
|
|
2888
|
+
|
|
2889
|
+
const globalEdgeIndex = retainingEdges[retainerIndex];
|
|
2890
|
+
if (this.isEdgeIgnoredInRetainersView(globalEdgeIndex)) {
|
|
2891
|
+
continue;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
// Skip weak edges
|
|
2895
|
+
const edgeType = containmentEdges.getValue(globalEdgeIndex + edgeTypeOffset);
|
|
2896
|
+
if (edgeType === edgeWeakType) {
|
|
2897
|
+
continue;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
if (dist >= 0) {
|
|
2901
|
+
const remainingDepth = maxDepth - currentDepth;
|
|
2902
|
+
// Since recursion halts at rootDistance, the remaining edges to path termination is exactly dist - rootDistance.
|
|
2903
|
+
const neededDepth = dist - rootDistance;
|
|
2904
|
+
if (neededDepth < remainingDepth) {
|
|
2905
|
+
retainers.push({retainerIndex, dist, nodeIndex: retainerNodeIndex});
|
|
2906
|
+
} else {
|
|
2907
|
+
limitsReached.depth = true;
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
// Sort retainers by distance (shortest to GC roots first).
|
|
2913
|
+
retainers.sort((a, b) => a.dist - b.dist);
|
|
2914
|
+
|
|
2915
|
+
// Limit number of traversed retainers.
|
|
2916
|
+
const length = Math.min(retainers.length, maxSiblings);
|
|
2917
|
+
if (retainers.length > maxSiblings) {
|
|
2918
|
+
limitsReached.siblings = true;
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
const forest: HeapSnapshotModel.HeapSnapshotModel.RetainingEdge[] = [];
|
|
2922
|
+
|
|
2923
|
+
for (let i = 0; i < length; i++) {
|
|
2924
|
+
const retainer = retainers[i];
|
|
2925
|
+
const edge = this.createRetainingEdge(retainer.retainerIndex);
|
|
2926
|
+
const globalEdgeIndex = retainingEdges[retainer.retainerIndex];
|
|
2927
|
+
|
|
2928
|
+
const isRoot = retainer.dist === rootDistance;
|
|
2929
|
+
let children: HeapSnapshotModel.HeapSnapshotModel.RetainingEdge[] = [];
|
|
2930
|
+
|
|
2931
|
+
if (isRoot) {
|
|
2932
|
+
traversedNodesCount++;
|
|
2933
|
+
|
|
2934
|
+
if (traversedNodesCount > maxNodes) {
|
|
2935
|
+
limitsReached.nodes = true;
|
|
2936
|
+
break;
|
|
2937
|
+
}
|
|
2938
|
+
} else {
|
|
2939
|
+
children = buildForest(retainer.nodeIndex, currentDepth + 1);
|
|
2940
|
+
if (children.length === 0) {
|
|
2941
|
+
continue;
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
const retainerNode = this.createNode(retainer.nodeIndex);
|
|
2946
|
+
forest.push({
|
|
2947
|
+
edgeIndex: globalEdgeIndex,
|
|
2948
|
+
edgeName: edge.name(),
|
|
2949
|
+
edgeType: edge.type(),
|
|
2950
|
+
nodeId: retainerNode.id(),
|
|
2951
|
+
nodeIndex: retainer.nodeIndex,
|
|
2952
|
+
nodeName: retainerNode.name(),
|
|
2953
|
+
distance: retainer.dist,
|
|
2954
|
+
children,
|
|
2955
|
+
});
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
visiting.delete(currentIndex);
|
|
2959
|
+
visited.set(currentIndex, currentDepth);
|
|
2960
|
+
|
|
2961
|
+
return forest;
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
const paths = buildForest(nodeIndex, 0);
|
|
2965
|
+
return {paths, limitsReached};
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2821
2968
|
createAddedNodesProvider(baseSnapshotId: string, classKey: string): HeapSnapshotNodesProvider {
|
|
2822
2969
|
const snapshotDiff = this.#snapshotDiffs[baseSnapshotId];
|
|
2823
2970
|
const diffForClass = snapshotDiff[classKey];
|
|
@@ -43,6 +43,10 @@ inspectorBackend.registerType("Accessibility.AXProperty", [{"name": "name", "typ
|
|
|
43
43
|
inspectorBackend.registerType("Accessibility.AXValue", [{"name": "type", "type": "string", "optional": false, "description": "The type of this value.", "typeRef": "Accessibility.AXValueType"}, {"name": "value", "type": "any", "optional": true, "description": "The computed value of this property.", "typeRef": null}, {"name": "relatedNodes", "type": "array", "optional": true, "description": "One or more related nodes, if applicable.", "typeRef": "Accessibility.AXRelatedNode"}, {"name": "sources", "type": "array", "optional": true, "description": "The sources which contributed to the computation of this property.", "typeRef": "Accessibility.AXValueSource"}]);
|
|
44
44
|
inspectorBackend.registerType("Accessibility.AXNode", [{"name": "nodeId", "type": "string", "optional": false, "description": "Unique identifier for this node.", "typeRef": "Accessibility.AXNodeId"}, {"name": "ignored", "type": "boolean", "optional": false, "description": "Whether this node is ignored for accessibility", "typeRef": null}, {"name": "ignoredReasons", "type": "array", "optional": true, "description": "Collection of reasons why this node is hidden.", "typeRef": "Accessibility.AXProperty"}, {"name": "role", "type": "object", "optional": true, "description": "This `Node`'s role, whether explicit or implicit.", "typeRef": "Accessibility.AXValue"}, {"name": "chromeRole", "type": "object", "optional": true, "description": "This `Node`'s Chrome raw role.", "typeRef": "Accessibility.AXValue"}, {"name": "name", "type": "object", "optional": true, "description": "The accessible name for this `Node`.", "typeRef": "Accessibility.AXValue"}, {"name": "description", "type": "object", "optional": true, "description": "The accessible description for this `Node`.", "typeRef": "Accessibility.AXValue"}, {"name": "value", "type": "object", "optional": true, "description": "The value for this `Node`.", "typeRef": "Accessibility.AXValue"}, {"name": "properties", "type": "array", "optional": true, "description": "All other properties", "typeRef": "Accessibility.AXProperty"}, {"name": "parentId", "type": "string", "optional": true, "description": "ID for this node's parent.", "typeRef": "Accessibility.AXNodeId"}, {"name": "childIds", "type": "array", "optional": true, "description": "IDs for each of this node's child nodes.", "typeRef": "Accessibility.AXNodeId"}, {"name": "backendDOMNodeId", "type": "number", "optional": true, "description": "The backend ID for the associated DOM node, if any.", "typeRef": "DOM.BackendNodeId"}, {"name": "frameId", "type": "string", "optional": true, "description": "The frame ID for the frame associated with this nodes document.", "typeRef": "Page.FrameId"}]);
|
|
45
45
|
|
|
46
|
+
// Ads.
|
|
47
|
+
inspectorBackend.registerCommand("Ads.getAdMetrics", [], ["metrics"], "Retrieves ad metrics for the current page.");
|
|
48
|
+
inspectorBackend.registerType("Ads.AdMetrics", [{"name": "viewportAdDensityByArea", "type": "number", "optional": false, "description": "The viewport ad density by area, represented as a percentage (an integer between 0 and 100).", "typeRef": null}, {"name": "averageViewportAdDensityByArea", "type": "number", "optional": false, "description": "The time-weighted average of the viewport ad density by area, measured across the duration of the page.", "typeRef": null}, {"name": "viewportAdCount", "type": "number", "optional": false, "description": "The number of ads currently visible within the viewport.", "typeRef": null}, {"name": "averageViewportAdCount", "type": "number", "optional": false, "description": "The time-weighted average of the viewport ad count, measured across the duration of the page.", "typeRef": null}, {"name": "totalAdCpuTime", "type": "number", "optional": false, "description": "The total ad CPU usage, in milliseconds.", "typeRef": null}, {"name": "totalAdNetworkBytes", "type": "number", "optional": false, "description": "The total ad network bytes.", "typeRef": null}]);
|
|
49
|
+
|
|
46
50
|
// Animation.
|
|
47
51
|
inspectorBackend.registerEnum("Animation.AnimationType", {CSSTransition: "CSSTransition", CSSAnimation: "CSSAnimation", WebAnimation: "WebAnimation"});
|
|
48
52
|
inspectorBackend.registerEvent("Animation.animationCanceled", ["id"]);
|
|
@@ -87,7 +91,7 @@ inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {FormLabelForNameE
|
|
|
87
91
|
inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
|
|
88
92
|
inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", {ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform"});
|
|
89
93
|
inspectorBackend.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", {NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts"});
|
|
90
|
-
inspectorBackend.registerEnum("Audits.EmailVerificationRequestIssueReason", {InvalidEmail: "InvalidEmail", DnsFetchFailed: "DnsFetchFailed", DnsInvalidRecord: "DnsInvalidRecord", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", WellKnownMissingIssuanceEndpoint: "WellKnownMissingIssuanceEndpoint", WellKnownIssuanceEndpointCrossOrigin: "WellKnownIssuanceEndpointCrossOrigin", WellKnownUnsupportedSigningAlgorithm: "WellKnownUnsupportedSigningAlgorithm", TokenHttpNotFound: "TokenHttpNotFound", TokenNoResponse: "TokenNoResponse", TokenInvalidResponse: "TokenInvalidResponse", TokenInvalidContentType: "TokenInvalidContentType", TokenMalformedSdJwt: "TokenMalformedSdJwt", TokenInvalidSdJwt: "TokenInvalidSdJwt", KeyBindingSigningFailed: "KeyBindingSigningFailed", RpOriginIsOpaque: "RpOriginIsOpaque", WellKnownMissingAccountsEndpoint: "WellKnownMissingAccountsEndpoint", UserLoggedOut: "UserLoggedOut", WellKnownAccountsEndpointCrossOrigin: "WellKnownAccountsEndpointCrossOrigin"});
|
|
94
|
+
inspectorBackend.registerEnum("Audits.EmailVerificationRequestIssueReason", {InvalidEmail: "InvalidEmail", DnsFetchFailed: "DnsFetchFailed", DnsInvalidRecord: "DnsInvalidRecord", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", WellKnownMissingIssuanceEndpoint: "WellKnownMissingIssuanceEndpoint", WellKnownIssuanceEndpointCrossOrigin: "WellKnownIssuanceEndpointCrossOrigin", WellKnownUnsupportedSigningAlgorithm: "WellKnownUnsupportedSigningAlgorithm", TokenHttpNotFound: "TokenHttpNotFound", TokenNoResponse: "TokenNoResponse", TokenInvalidResponse: "TokenInvalidResponse", TokenInvalidContentType: "TokenInvalidContentType", TokenMalformedSdJwt: "TokenMalformedSdJwt", TokenInvalidSdJwt: "TokenInvalidSdJwt", KeyBindingSigningFailed: "KeyBindingSigningFailed", RpOriginIsOpaque: "RpOriginIsOpaque", WellKnownMissingAccountsEndpoint: "WellKnownMissingAccountsEndpoint", UserLoggedOut: "UserLoggedOut", WellKnownAccountsEndpointCrossOrigin: "WellKnownAccountsEndpointCrossOrigin", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsInvalidContentType: "AccountsInvalidContentType", AccountsEmptyList: "AccountsEmptyList", EmailVerificationWellKnownHttpNotFound: "EmailVerificationWellKnownHttpNotFound", EmailVerificationWellKnownNoResponse: "EmailVerificationWellKnownNoResponse", EmailVerificationWellKnownInvalidResponse: "EmailVerificationWellKnownInvalidResponse", EmailVerificationWellKnownInvalidContentType: "EmailVerificationWellKnownInvalidContentType", JwksHttpNotFound: "JwksHttpNotFound", JwksInvalidResponse: "JwksInvalidResponse", TokenVerificationSdJwtUnsupportedHeaderAlg: "TokenVerificationSdJwtUnsupportedHeaderAlg", TokenVerificationSdJwtMissingIss: "TokenVerificationSdJwtMissingIss", TokenVerificationSdJwtMissingIat: "TokenVerificationSdJwtMissingIat", TokenVerificationSdJwtMissingCnf: "TokenVerificationSdJwtMissingCnf", TokenVerificationSdJwtMissingEmail: "TokenVerificationSdJwtMissingEmail", TokenVerificationSdJwtInvalidIssuedAt: "TokenVerificationSdJwtInvalidIssuedAt", TokenVerificationSdJwtInvalidIssuer: "TokenVerificationSdJwtInvalidIssuer", TokenVerificationSdJwtJwksMissingKeys: "TokenVerificationSdJwtJwksMissingKeys", TokenVerificationSdJwtSignatureFailed: "TokenVerificationSdJwtSignatureFailed", TokenVerificationSdJwtInvalidEmailVerified: "TokenVerificationSdJwtInvalidEmailVerified", TokenVerificationSdJwtInvalidEmail: "TokenVerificationSdJwtInvalidEmail", TokenVerificationSdJwtInvalidHolderKey: "TokenVerificationSdJwtInvalidHolderKey", TokenVerificationKbInvalidTyp: "TokenVerificationKbInvalidTyp", TokenVerificationKbMissingAud: "TokenVerificationKbMissingAud", TokenVerificationKbMissingNonce: "TokenVerificationKbMissingNonce", TokenVerificationKbMissingIat: "TokenVerificationKbMissingIat", TokenVerificationKbMissingSdHash: "TokenVerificationKbMissingSdHash", TokenVerificationKbInvalidIssuedAt: "TokenVerificationKbInvalidIssuedAt", TokenVerificationKbInvalidAudience: "TokenVerificationKbInvalidAudience", TokenVerificationKbInvalidNonce: "TokenVerificationKbInvalidNonce", TokenVerificationKbInvalidSdHash: "TokenVerificationKbInvalidSdHash", TokenVerificationKbMissingCnf: "TokenVerificationKbMissingCnf", TokenVerificationKbSignatureFailed: "TokenVerificationKbSignatureFailed"});
|
|
91
95
|
inspectorBackend.registerEnum("Audits.PartitioningBlobURLInfo", {BlockedCrossPartitionFetching: "BlockedCrossPartitionFetching", EnforceNoopenerForNavigation: "EnforceNoopenerForNavigation"});
|
|
92
96
|
inspectorBackend.registerEnum("Audits.ElementAccessibilityIssueReason", {DisallowedSelectChild: "DisallowedSelectChild", DisallowedOptGroupChild: "DisallowedOptGroupChild", NonPhrasingContentOptionChild: "NonPhrasingContentOptionChild", InteractiveContentOptionChild: "InteractiveContentOptionChild", InteractiveContentLegendChild: "InteractiveContentLegendChild", InteractiveContentSummaryDescendant: "InteractiveContentSummaryDescendant"});
|
|
93
97
|
inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImportRule: "LateImportRule", RequestFailed: "RequestFailed"});
|
|
@@ -352,7 +356,7 @@ inspectorBackend.registerCommand("CrashReportContext.getEntries", [], ["entries"
|
|
|
352
356
|
inspectorBackend.registerType("CrashReportContext.CrashReportContextEntry", [{"name": "key", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "The ID of the frame where the key-value pair was set.", "typeRef": "Page.FrameId"}]);
|
|
353
357
|
|
|
354
358
|
// DOM.
|
|
355
|
-
inspectorBackend.registerEnum("DOM.PseudoType", {FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", ExpandIcon: "expand-icon", PickerIcon: "picker-icon", InterestButton: "interest-button", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", PermissionIcon: "permission-icon", OverscrollAreaParent: "overscroll-area-parent"});
|
|
359
|
+
inspectorBackend.registerEnum("DOM.PseudoType", {FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", ExpandIcon: "expand-icon", PickerIcon: "picker-icon", InterestButton: "interest-button", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", PermissionIcon: "permission-icon", OverscrollAreaParent: "overscroll-area-parent", Skeleton: "skeleton"});
|
|
356
360
|
inspectorBackend.registerEnum("DOM.ShadowRootType", {UserAgent: "user-agent", Open: "open", Closed: "closed"});
|
|
357
361
|
inspectorBackend.registerEnum("DOM.CompatibilityMode", {QuirksMode: "QuirksMode", LimitedQuirksMode: "LimitedQuirksMode", NoQuirksMode: "NoQuirksMode"});
|
|
358
362
|
inspectorBackend.registerEnum("DOM.PhysicalAxes", {Horizontal: "Horizontal", Vertical: "Vertical", Both: "Both"});
|
|
@@ -1213,7 +1217,7 @@ inspectorBackend.registerEnum("Preload.SpeculationAction", {Prefetch: "Prefetch"
|
|
|
1213
1217
|
inspectorBackend.registerEnum("Preload.SpeculationTargetHint", {Blank: "Blank", Self: "Self"});
|
|
1214
1218
|
inspectorBackend.registerEnum("Preload.PrerenderFinalStatus", {Activated: "Activated", Destroyed: "Destroyed", LowEndDevice: "LowEndDevice", InvalidSchemeRedirect: "InvalidSchemeRedirect", InvalidSchemeNavigation: "InvalidSchemeNavigation", NavigationRequestBlockedByCsp: "NavigationRequestBlockedByCsp", MojoBinderPolicy: "MojoBinderPolicy", RendererProcessCrashed: "RendererProcessCrashed", RendererProcessKilled: "RendererProcessKilled", Download: "Download", TriggerDestroyed: "TriggerDestroyed", NavigationNotCommitted: "NavigationNotCommitted", NavigationBadHttpStatus: "NavigationBadHttpStatus", ClientCertRequested: "ClientCertRequested", NavigationRequestNetworkError: "NavigationRequestNetworkError", CancelAllHostsForTesting: "CancelAllHostsForTesting", DidFailLoad: "DidFailLoad", Stop: "Stop", SslCertificateError: "SslCertificateError", LoginAuthRequested: "LoginAuthRequested", UaChangeRequiresReload: "UaChangeRequiresReload", BlockedByClient: "BlockedByClient", AudioOutputDeviceRequested: "AudioOutputDeviceRequested", MixedContent: "MixedContent", TriggerBackgrounded: "TriggerBackgrounded", MemoryLimitExceeded: "MemoryLimitExceeded", DataSaverEnabled: "DataSaverEnabled", TriggerUrlHasEffectiveUrl: "TriggerUrlHasEffectiveUrl", ActivatedBeforeStarted: "ActivatedBeforeStarted", InactivePageRestriction: "InactivePageRestriction", StartFailed: "StartFailed", TimeoutBackgrounded: "TimeoutBackgrounded", CrossSiteRedirectInInitialNavigation: "CrossSiteRedirectInInitialNavigation", CrossSiteNavigationInInitialNavigation: "CrossSiteNavigationInInitialNavigation", SameSiteCrossOriginRedirectNotOptInInInitialNavigation: "SameSiteCrossOriginRedirectNotOptInInInitialNavigation", SameSiteCrossOriginNavigationNotOptInInInitialNavigation: "SameSiteCrossOriginNavigationNotOptInInInitialNavigation", ActivationNavigationParameterMismatch: "ActivationNavigationParameterMismatch", ActivatedInBackground: "ActivatedInBackground", EmbedderHostDisallowed: "EmbedderHostDisallowed", ActivationNavigationDestroyedBeforeSuccess: "ActivationNavigationDestroyedBeforeSuccess", TabClosedByUserGesture: "TabClosedByUserGesture", TabClosedWithoutUserGesture: "TabClosedWithoutUserGesture", PrimaryMainFrameRendererProcessCrashed: "PrimaryMainFrameRendererProcessCrashed", PrimaryMainFrameRendererProcessKilled: "PrimaryMainFrameRendererProcessKilled", ActivationFramePolicyNotCompatible: "ActivationFramePolicyNotCompatible", PreloadingDisabled: "PreloadingDisabled", BatterySaverEnabled: "BatterySaverEnabled", ActivatedDuringMainFrameNavigation: "ActivatedDuringMainFrameNavigation", PreloadingUnsupportedByWebContents: "PreloadingUnsupportedByWebContents", CrossSiteRedirectInMainFrameNavigation: "CrossSiteRedirectInMainFrameNavigation", CrossSiteNavigationInMainFrameNavigation: "CrossSiteNavigationInMainFrameNavigation", SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation: "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation", SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation: "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation", MemoryPressureOnTrigger: "MemoryPressureOnTrigger", MemoryPressureAfterTriggered: "MemoryPressureAfterTriggered", PrerenderingDisabledByDevTools: "PrerenderingDisabledByDevTools", SpeculationRuleRemoved: "SpeculationRuleRemoved", ActivatedWithAuxiliaryBrowsingContexts: "ActivatedWithAuxiliaryBrowsingContexts", MaxNumOfRunningEagerPrerendersExceeded: "MaxNumOfRunningEagerPrerendersExceeded", MaxNumOfRunningNonEagerPrerendersExceeded: "MaxNumOfRunningNonEagerPrerendersExceeded", MaxNumOfRunningEmbedderPrerendersExceeded: "MaxNumOfRunningEmbedderPrerendersExceeded", PrerenderingUrlHasEffectiveUrl: "PrerenderingUrlHasEffectiveUrl", RedirectedPrerenderingUrlHasEffectiveUrl: "RedirectedPrerenderingUrlHasEffectiveUrl", ActivationUrlHasEffectiveUrl: "ActivationUrlHasEffectiveUrl", JavaScriptInterfaceAdded: "JavaScriptInterfaceAdded", JavaScriptInterfaceRemoved: "JavaScriptInterfaceRemoved", AllPrerenderingCanceled: "AllPrerenderingCanceled", WindowClosed: "WindowClosed", SlowNetwork: "SlowNetwork", OtherPrerenderedPageActivated: "OtherPrerenderedPageActivated", V8OptimizerDisabled: "V8OptimizerDisabled", PrerenderFailedDuringPrefetch: "PrerenderFailedDuringPrefetch", BrowsingDataRemoved: "BrowsingDataRemoved", PrerenderHostReused: "PrerenderHostReused", FormSubmitWhenPrerendering: "FormSubmitWhenPrerendering", CrossDocumentRestart: "CrossDocumentRestart"});
|
|
1215
1219
|
inspectorBackend.registerEnum("Preload.PreloadingStatus", {Pending: "Pending", Running: "Running", Ready: "Ready", Success: "Success", Failure: "Failure", NotSupported: "NotSupported"});
|
|
1216
|
-
inspectorBackend.registerEnum("Preload.PrefetchStatus", {PrefetchAllowed: "PrefetchAllowed", PrefetchFailedIneligibleRedirect: "PrefetchFailedIneligibleRedirect", PrefetchFailedInvalidRedirect: "PrefetchFailedInvalidRedirect", PrefetchFailedMIMENotSupported: "PrefetchFailedMIMENotSupported", PrefetchFailedNetError: "PrefetchFailedNetError", PrefetchFailedNon2XX: "PrefetchFailedNon2XX", PrefetchEvictedAfterBrowsingDataRemoved: "PrefetchEvictedAfterBrowsingDataRemoved", PrefetchEvictedAfterCandidateRemoved: "PrefetchEvictedAfterCandidateRemoved", PrefetchEvictedForNewerPrefetch: "PrefetchEvictedForNewerPrefetch", PrefetchHeldback: "PrefetchHeldback", PrefetchIneligibleRetryAfter: "PrefetchIneligibleRetryAfter", PrefetchIsPrivacyDecoy: "PrefetchIsPrivacyDecoy", PrefetchIsStale: "PrefetchIsStale", PrefetchNotEligibleBrowserContextOffTheRecord: "PrefetchNotEligibleBrowserContextOffTheRecord", PrefetchNotEligibleDataSaverEnabled: "PrefetchNotEligibleDataSaverEnabled", PrefetchNotEligibleExistingProxy: "PrefetchNotEligibleExistingProxy", PrefetchNotEligibleHostIsNonUnique: "PrefetchNotEligibleHostIsNonUnique", PrefetchNotEligibleNonDefaultStoragePartition: "PrefetchNotEligibleNonDefaultStoragePartition", PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy: "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy", PrefetchNotEligibleSchemeIsNotHttps: "PrefetchNotEligibleSchemeIsNotHttps", PrefetchNotEligibleUserHasCookies: "PrefetchNotEligibleUserHasCookies", PrefetchNotEligibleUserHasServiceWorker: "PrefetchNotEligibleUserHasServiceWorker", PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler: "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler", PrefetchNotEligibleRedirectFromServiceWorker: "PrefetchNotEligibleRedirectFromServiceWorker", PrefetchNotEligibleRedirectToServiceWorker: "PrefetchNotEligibleRedirectToServiceWorker", PrefetchNotEligibleBatterySaverEnabled: "PrefetchNotEligibleBatterySaverEnabled", PrefetchNotEligiblePreloadingDisabled: "PrefetchNotEligiblePreloadingDisabled", PrefetchNotFinishedInTime: "PrefetchNotFinishedInTime", PrefetchNotStarted: "PrefetchNotStarted", PrefetchNotUsedCookiesChanged: "PrefetchNotUsedCookiesChanged", PrefetchProxyNotAvailable: "PrefetchProxyNotAvailable", PrefetchResponseUsed: "PrefetchResponseUsed", PrefetchSuccessfulButNotUsed: "PrefetchSuccessfulButNotUsed", PrefetchNotUsedProbeFailed: "PrefetchNotUsedProbeFailed"});
|
|
1220
|
+
inspectorBackend.registerEnum("Preload.PrefetchStatus", {PrefetchAllowed: "PrefetchAllowed", PrefetchFailedIneligibleRedirect: "PrefetchFailedIneligibleRedirect", PrefetchFailedInvalidRedirect: "PrefetchFailedInvalidRedirect", PrefetchFailedMIMENotSupported: "PrefetchFailedMIMENotSupported", PrefetchFailedNetError: "PrefetchFailedNetError", PrefetchFailedNon2XX: "PrefetchFailedNon2XX", PrefetchEvictedAfterBrowsingDataRemoved: "PrefetchEvictedAfterBrowsingDataRemoved", PrefetchEvictedAfterCandidateRemoved: "PrefetchEvictedAfterCandidateRemoved", PrefetchEvictedForNewerPrefetch: "PrefetchEvictedForNewerPrefetch", PrefetchHeldback: "PrefetchHeldback", PrefetchIneligibleRetryAfter: "PrefetchIneligibleRetryAfter", PrefetchIsPrivacyDecoy: "PrefetchIsPrivacyDecoy", PrefetchIsStale: "PrefetchIsStale", PrefetchNotEligibleBlockedByConnectionAllowlist: "PrefetchNotEligibleBlockedByConnectionAllowlist", PrefetchNotEligibleBrowserContextOffTheRecord: "PrefetchNotEligibleBrowserContextOffTheRecord", PrefetchNotEligibleDataSaverEnabled: "PrefetchNotEligibleDataSaverEnabled", PrefetchNotEligibleExistingProxy: "PrefetchNotEligibleExistingProxy", PrefetchNotEligibleHostIsNonUnique: "PrefetchNotEligibleHostIsNonUnique", PrefetchNotEligibleNonDefaultStoragePartition: "PrefetchNotEligibleNonDefaultStoragePartition", PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy: "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy", PrefetchNotEligibleSchemeIsNotHttps: "PrefetchNotEligibleSchemeIsNotHttps", PrefetchNotEligibleUserHasCookies: "PrefetchNotEligibleUserHasCookies", PrefetchNotEligibleUserHasServiceWorker: "PrefetchNotEligibleUserHasServiceWorker", PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler: "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler", PrefetchNotEligibleRedirectFromServiceWorker: "PrefetchNotEligibleRedirectFromServiceWorker", PrefetchNotEligibleRedirectToServiceWorker: "PrefetchNotEligibleRedirectToServiceWorker", PrefetchNotEligibleBatterySaverEnabled: "PrefetchNotEligibleBatterySaverEnabled", PrefetchNotEligiblePreloadingDisabled: "PrefetchNotEligiblePreloadingDisabled", PrefetchNotFinishedInTime: "PrefetchNotFinishedInTime", PrefetchNotStarted: "PrefetchNotStarted", PrefetchNotUsedCookiesChanged: "PrefetchNotUsedCookiesChanged", PrefetchProxyNotAvailable: "PrefetchProxyNotAvailable", PrefetchResponseUsed: "PrefetchResponseUsed", PrefetchSuccessfulButNotUsed: "PrefetchSuccessfulButNotUsed", PrefetchNotUsedProbeFailed: "PrefetchNotUsedProbeFailed", PrefetchCancelledOnUserNavigation: "PrefetchCancelledOnUserNavigation"});
|
|
1217
1221
|
inspectorBackend.registerEvent("Preload.ruleSetUpdated", ["ruleSet"]);
|
|
1218
1222
|
inspectorBackend.registerEvent("Preload.ruleSetRemoved", ["id"]);
|
|
1219
1223
|
inspectorBackend.registerEvent("Preload.preloadEnabledStateUpdated", ["disabledByPreference", "disabledByDataSaver", "disabledByBatterySaver", "disabledByHoldbackPrefetchSpeculationRules", "disabledByHoldbackPrerenderSpeculationRules"]);
|
|
@@ -1089,6 +1089,13 @@ export namespace ProtocolMapping {
|
|
|
1089
1089
|
paramsType: [Protocol.Accessibility.QueryAXTreeRequest?];
|
|
1090
1090
|
returnType: Protocol.Accessibility.QueryAXTreeResponse;
|
|
1091
1091
|
};
|
|
1092
|
+
/**
|
|
1093
|
+
* Retrieves ad metrics for the current page.
|
|
1094
|
+
*/
|
|
1095
|
+
'Ads.getAdMetrics': {
|
|
1096
|
+
paramsType: [];
|
|
1097
|
+
returnType: Protocol.Ads.GetAdMetricsResponse;
|
|
1098
|
+
};
|
|
1092
1099
|
/**
|
|
1093
1100
|
* Disables animation domain notifications.
|
|
1094
1101
|
*/
|
|
@@ -20,6 +20,8 @@ declare namespace ProtocolProxyApi {
|
|
|
20
20
|
export interface ProtocolApi {
|
|
21
21
|
Accessibility: AccessibilityApi;
|
|
22
22
|
|
|
23
|
+
Ads: AdsApi;
|
|
24
|
+
|
|
23
25
|
Animation: AnimationApi;
|
|
24
26
|
|
|
25
27
|
Audits: AuditsApi;
|
|
@@ -133,6 +135,8 @@ declare namespace ProtocolProxyApi {
|
|
|
133
135
|
export interface ProtocolDispatchers {
|
|
134
136
|
Accessibility: AccessibilityDispatcher;
|
|
135
137
|
|
|
138
|
+
Ads: AdsDispatcher;
|
|
139
|
+
|
|
136
140
|
Animation: AnimationDispatcher;
|
|
137
141
|
|
|
138
142
|
Audits: AuditsDispatcher;
|
|
@@ -308,6 +312,16 @@ declare namespace ProtocolProxyApi {
|
|
|
308
312
|
|
|
309
313
|
}
|
|
310
314
|
|
|
315
|
+
export interface AdsApi {
|
|
316
|
+
/**
|
|
317
|
+
* Retrieves ad metrics for the current page.
|
|
318
|
+
*/
|
|
319
|
+
invoke_getAdMetrics(): Promise<Protocol.Ads.GetAdMetricsResponse>;
|
|
320
|
+
|
|
321
|
+
}
|
|
322
|
+
export interface AdsDispatcher {
|
|
323
|
+
}
|
|
324
|
+
|
|
311
325
|
export interface AnimationApi {
|
|
312
326
|
/**
|
|
313
327
|
* Disables animation domain notifications.
|
|
@@ -435,6 +435,49 @@ export namespace Accessibility {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
+
/**
|
|
439
|
+
* A domain for ad-related metrics and data.
|
|
440
|
+
*/
|
|
441
|
+
export namespace Ads {
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Ad metrics for a page.
|
|
445
|
+
*/
|
|
446
|
+
export interface AdMetrics {
|
|
447
|
+
/**
|
|
448
|
+
* The viewport ad density by area, represented as a percentage (an integer
|
|
449
|
+
* between 0 and 100).
|
|
450
|
+
*/
|
|
451
|
+
viewportAdDensityByArea: integer;
|
|
452
|
+
/**
|
|
453
|
+
* The time-weighted average of the viewport ad density by area, measured
|
|
454
|
+
* across the duration of the page.
|
|
455
|
+
*/
|
|
456
|
+
averageViewportAdDensityByArea: number;
|
|
457
|
+
/**
|
|
458
|
+
* The number of ads currently visible within the viewport.
|
|
459
|
+
*/
|
|
460
|
+
viewportAdCount: integer;
|
|
461
|
+
/**
|
|
462
|
+
* The time-weighted average of the viewport ad count, measured across the
|
|
463
|
+
* duration of the page.
|
|
464
|
+
*/
|
|
465
|
+
averageViewportAdCount: number;
|
|
466
|
+
/**
|
|
467
|
+
* The total ad CPU usage, in milliseconds.
|
|
468
|
+
*/
|
|
469
|
+
totalAdCpuTime: number;
|
|
470
|
+
/**
|
|
471
|
+
* The total ad network bytes.
|
|
472
|
+
*/
|
|
473
|
+
totalAdNetworkBytes: number;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export interface GetAdMetricsResponse extends ProtocolResponseWithError {
|
|
477
|
+
metrics: AdMetrics;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
438
481
|
export namespace Animation {
|
|
439
482
|
|
|
440
483
|
export const enum AnimationType {
|
|
@@ -1389,6 +1432,40 @@ export namespace Audits {
|
|
|
1389
1432
|
WellKnownMissingAccountsEndpoint = 'WellKnownMissingAccountsEndpoint',
|
|
1390
1433
|
UserLoggedOut = 'UserLoggedOut',
|
|
1391
1434
|
WellKnownAccountsEndpointCrossOrigin = 'WellKnownAccountsEndpointCrossOrigin',
|
|
1435
|
+
AccountsHttpNotFound = 'AccountsHttpNotFound',
|
|
1436
|
+
AccountsNoResponse = 'AccountsNoResponse',
|
|
1437
|
+
AccountsInvalidResponse = 'AccountsInvalidResponse',
|
|
1438
|
+
AccountsInvalidContentType = 'AccountsInvalidContentType',
|
|
1439
|
+
AccountsEmptyList = 'AccountsEmptyList',
|
|
1440
|
+
EmailVerificationWellKnownHttpNotFound = 'EmailVerificationWellKnownHttpNotFound',
|
|
1441
|
+
EmailVerificationWellKnownNoResponse = 'EmailVerificationWellKnownNoResponse',
|
|
1442
|
+
EmailVerificationWellKnownInvalidResponse = 'EmailVerificationWellKnownInvalidResponse',
|
|
1443
|
+
EmailVerificationWellKnownInvalidContentType = 'EmailVerificationWellKnownInvalidContentType',
|
|
1444
|
+
JwksHttpNotFound = 'JwksHttpNotFound',
|
|
1445
|
+
JwksInvalidResponse = 'JwksInvalidResponse',
|
|
1446
|
+
TokenVerificationSdJwtUnsupportedHeaderAlg = 'TokenVerificationSdJwtUnsupportedHeaderAlg',
|
|
1447
|
+
TokenVerificationSdJwtMissingIss = 'TokenVerificationSdJwtMissingIss',
|
|
1448
|
+
TokenVerificationSdJwtMissingIat = 'TokenVerificationSdJwtMissingIat',
|
|
1449
|
+
TokenVerificationSdJwtMissingCnf = 'TokenVerificationSdJwtMissingCnf',
|
|
1450
|
+
TokenVerificationSdJwtMissingEmail = 'TokenVerificationSdJwtMissingEmail',
|
|
1451
|
+
TokenVerificationSdJwtInvalidIssuedAt = 'TokenVerificationSdJwtInvalidIssuedAt',
|
|
1452
|
+
TokenVerificationSdJwtInvalidIssuer = 'TokenVerificationSdJwtInvalidIssuer',
|
|
1453
|
+
TokenVerificationSdJwtJwksMissingKeys = 'TokenVerificationSdJwtJwksMissingKeys',
|
|
1454
|
+
TokenVerificationSdJwtSignatureFailed = 'TokenVerificationSdJwtSignatureFailed',
|
|
1455
|
+
TokenVerificationSdJwtInvalidEmailVerified = 'TokenVerificationSdJwtInvalidEmailVerified',
|
|
1456
|
+
TokenVerificationSdJwtInvalidEmail = 'TokenVerificationSdJwtInvalidEmail',
|
|
1457
|
+
TokenVerificationSdJwtInvalidHolderKey = 'TokenVerificationSdJwtInvalidHolderKey',
|
|
1458
|
+
TokenVerificationKbInvalidTyp = 'TokenVerificationKbInvalidTyp',
|
|
1459
|
+
TokenVerificationKbMissingAud = 'TokenVerificationKbMissingAud',
|
|
1460
|
+
TokenVerificationKbMissingNonce = 'TokenVerificationKbMissingNonce',
|
|
1461
|
+
TokenVerificationKbMissingIat = 'TokenVerificationKbMissingIat',
|
|
1462
|
+
TokenVerificationKbMissingSdHash = 'TokenVerificationKbMissingSdHash',
|
|
1463
|
+
TokenVerificationKbInvalidIssuedAt = 'TokenVerificationKbInvalidIssuedAt',
|
|
1464
|
+
TokenVerificationKbInvalidAudience = 'TokenVerificationKbInvalidAudience',
|
|
1465
|
+
TokenVerificationKbInvalidNonce = 'TokenVerificationKbInvalidNonce',
|
|
1466
|
+
TokenVerificationKbInvalidSdHash = 'TokenVerificationKbInvalidSdHash',
|
|
1467
|
+
TokenVerificationKbMissingCnf = 'TokenVerificationKbMissingCnf',
|
|
1468
|
+
TokenVerificationKbSignatureFailed = 'TokenVerificationKbSignatureFailed',
|
|
1392
1469
|
}
|
|
1393
1470
|
|
|
1394
1471
|
/**
|
|
@@ -4702,6 +4779,7 @@ export namespace DOM {
|
|
|
4702
4779
|
Picker = 'picker',
|
|
4703
4780
|
PermissionIcon = 'permission-icon',
|
|
4704
4781
|
OverscrollAreaParent = 'overscroll-area-parent',
|
|
4782
|
+
Skeleton = 'skeleton',
|
|
4705
4783
|
}
|
|
4706
4784
|
|
|
4707
4785
|
/**
|
|
@@ -17147,6 +17225,7 @@ export namespace Preload {
|
|
|
17147
17225
|
PrefetchIneligibleRetryAfter = 'PrefetchIneligibleRetryAfter',
|
|
17148
17226
|
PrefetchIsPrivacyDecoy = 'PrefetchIsPrivacyDecoy',
|
|
17149
17227
|
PrefetchIsStale = 'PrefetchIsStale',
|
|
17228
|
+
PrefetchNotEligibleBlockedByConnectionAllowlist = 'PrefetchNotEligibleBlockedByConnectionAllowlist',
|
|
17150
17229
|
PrefetchNotEligibleBrowserContextOffTheRecord = 'PrefetchNotEligibleBrowserContextOffTheRecord',
|
|
17151
17230
|
PrefetchNotEligibleDataSaverEnabled = 'PrefetchNotEligibleDataSaverEnabled',
|
|
17152
17231
|
PrefetchNotEligibleExistingProxy = 'PrefetchNotEligibleExistingProxy',
|
|
@@ -17168,6 +17247,7 @@ export namespace Preload {
|
|
|
17168
17247
|
PrefetchResponseUsed = 'PrefetchResponseUsed',
|
|
17169
17248
|
PrefetchSuccessfulButNotUsed = 'PrefetchSuccessfulButNotUsed',
|
|
17170
17249
|
PrefetchNotUsedProbeFailed = 'PrefetchNotUsedProbeFailed',
|
|
17250
|
+
PrefetchCancelledOnUserNavigation = 'PrefetchCancelledOnUserNavigation',
|
|
17171
17251
|
}
|
|
17172
17252
|
|
|
17173
17253
|
/**
|
|
@@ -12,6 +12,19 @@ declare module '*.css.js' {
|
|
|
12
12
|
export default styles;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
declare module '*.skill.js' {
|
|
16
|
+
// Duplicated from front_end/models/ai_assistance/skills/Skill.ts
|
|
17
|
+
// to avoid importing from the source tree in a global declaration file,
|
|
18
|
+
// which was causing build artifacts to be generated in the source tree.
|
|
19
|
+
interface Skill {
|
|
20
|
+
name: 'styling';
|
|
21
|
+
description: string;
|
|
22
|
+
allowedTools: string[];
|
|
23
|
+
instructions: string;
|
|
24
|
+
}
|
|
25
|
+
export const skill: Skill;
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
// TODO: remove once URLPattern types are available in TypeScript (see https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1199).
|
|
16
29
|
declare class URLPattern {
|
|
17
30
|
constructor(input: string);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Copyright 2026 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 * as Host from '../../core/host/host.js';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
type AgentOptions,
|
|
9
|
+
AiAgent,
|
|
10
|
+
type ContextResponse,
|
|
11
|
+
type ConversationContext,
|
|
12
|
+
type RequestOptions,
|
|
13
|
+
ResponseType
|
|
14
|
+
} from './agents/AiAgent.js';
|
|
15
|
+
import {debugLog} from './debug.js';
|
|
16
|
+
import type {Skill, SkillName} from './skills/Skill.js';
|
|
17
|
+
import {SKILLS} from './skills/SkillRegistry.js';
|
|
18
|
+
|
|
19
|
+
export class AiAgent2 extends AiAgent<unknown> {
|
|
20
|
+
// TODO: The static preamble is a placeholder and will eventually live server-side.
|
|
21
|
+
readonly preamble = 'You are a unified AI assistant in Chrome DevTools. You can learn skills to help the user.';
|
|
22
|
+
readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_STYLING_AGENT; // Placeholder
|
|
23
|
+
readonly userTier = 'TESTERS';
|
|
24
|
+
|
|
25
|
+
#skillsInjected = false;
|
|
26
|
+
|
|
27
|
+
get options(): RequestOptions {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
readonly #activeSkills = new Set<SkillName>();
|
|
32
|
+
|
|
33
|
+
constructor(opts: AgentOptions) {
|
|
34
|
+
super(opts);
|
|
35
|
+
const skillsList = Object.keys(SKILLS).join(', ');
|
|
36
|
+
this.declareFunction<{skills: SkillName[]}>('learnSkills', {
|
|
37
|
+
description: `Load skills to help with the task. Available skills: ${skillsList}.`,
|
|
38
|
+
parameters: {
|
|
39
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
40
|
+
description: 'Parameters for learning skills',
|
|
41
|
+
properties: {
|
|
42
|
+
skills: {
|
|
43
|
+
type: Host.AidaClient.ParametersTypes.ARRAY,
|
|
44
|
+
items: {
|
|
45
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
46
|
+
description: 'Skill name',
|
|
47
|
+
},
|
|
48
|
+
description: 'List of skill names to load',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
required: ['skills'],
|
|
52
|
+
},
|
|
53
|
+
displayInfoFromArgs: args => {
|
|
54
|
+
return {
|
|
55
|
+
title: `Learning skills: ${args.skills.join(', ')}`,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
handler: async args => {
|
|
59
|
+
const result = await this.learnSkill(args.skills);
|
|
60
|
+
return {result};
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
override async enhanceQuery(query: string): Promise<string> {
|
|
66
|
+
if (this.#skillsInjected) {
|
|
67
|
+
return query;
|
|
68
|
+
}
|
|
69
|
+
this.#skillsInjected = true;
|
|
70
|
+
const skillsManifest = Object.entries(SKILLS).map(([name, skill]) => `- ${name}: ${skill.description}`).join('\n');
|
|
71
|
+
return `Available skills:
|
|
72
|
+
${skillsManifest}
|
|
73
|
+
|
|
74
|
+
You must call \`learnSkills\` to load a skill before you can use it.
|
|
75
|
+
|
|
76
|
+
User query: ${query}`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async *
|
|
80
|
+
handleContextDetails(_select: ConversationContext<unknown>|null): AsyncGenerator<ContextResponse, void, void> {
|
|
81
|
+
yield {
|
|
82
|
+
type: ResponseType.CONTEXT,
|
|
83
|
+
details: [{
|
|
84
|
+
title: 'Status',
|
|
85
|
+
text: 'Minimal agent initialized.',
|
|
86
|
+
}],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async learnSkill(names: SkillName[]): Promise<string> {
|
|
91
|
+
let response = '';
|
|
92
|
+
for (const name of names) {
|
|
93
|
+
debugLog(`AiAgent2: Attempting to load skill ${name}`);
|
|
94
|
+
if (this.#activeSkills.has(name)) {
|
|
95
|
+
debugLog(`AiAgent2: Skill ${name} is already loaded`);
|
|
96
|
+
response += `Skill ${name} is already loaded.\n`;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const skillObj: Skill = SKILLS[name];
|
|
101
|
+
if (skillObj) {
|
|
102
|
+
this.#activeSkills.add(name);
|
|
103
|
+
debugLog(`AiAgent2: Skill ${name} loaded successfully`);
|
|
104
|
+
response += `Skill ${name} loaded. Instructions:\n${skillObj.instructions}\n`;
|
|
105
|
+
} else {
|
|
106
|
+
debugLog(`AiAgent2: Failed to load skill ${name}`);
|
|
107
|
+
response += `Failed to load skill ${name}. Valid skills are: ${Object.keys(SKILLS).join(', ')}.\n`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return response.trim();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
get activeSkills(): Set<SkillName> {
|
|
114
|
+
return this.#activeSkills;
|
|
115
|
+
}
|
|
116
|
+
}
|