chrome-devtools-frontend 1.0.1599001 → 1.0.1601661
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/skills/verification/SKILL.md +1 -1
- package/front_end/core/common/Settings.ts +24 -1
- package/front_end/core/dom_extension/DOMExtension.ts +1 -0
- package/front_end/core/host/AidaClient.ts +5 -2
- package/front_end/core/host/AidaGcaTranslation.ts +377 -0
- package/front_end/core/host/GcaTypes.ts +3 -1
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/root/ExperimentNames.ts +0 -2
- package/front_end/core/sdk/CPUThrottlingManager.ts +12 -9
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +4 -2
- package/front_end/entrypoints/main/MainImpl.ts +1 -10
- package/front_end/generated/Deprecation.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -7
- package/front_end/generated/protocol.ts +47 -79
- package/front_end/models/ai_assistance/AiConversation.ts +37 -21
- package/front_end/models/ai_assistance/ConversationHandler.ts +8 -9
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +75 -20
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +11 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +38 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +55 -13
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +57 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +41 -3
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +84 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +172 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +20 -12
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +5 -15
- package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +52 -0
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +104 -10
- package/front_end/models/lighthouse/RunTypes.ts +2 -1
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +59 -35
- package/front_end/models/stack_trace/StackTrace.ts +5 -0
- package/front_end/models/stack_trace/StackTraceImpl.ts +7 -1
- package/front_end/models/stack_trace/StackTraceModel.ts +2 -1
- package/front_end/models/stack_trace/stack_trace.ts +4 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +79 -69
- package/front_end/panels/ai_assistance/ExportConversation.ts +25 -0
- package/front_end/panels/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +13 -12
- package/front_end/panels/ai_assistance/components/ChatView.ts +44 -0
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +240 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +4 -12
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +5 -27
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +115 -17
- package/front_end/panels/ai_assistance/components/chatMessage.css +4 -1
- package/front_end/panels/ai_assistance/components/chatView.css +8 -0
- package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +82 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +9 -1
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/application/AppManifestView.ts +13 -7
- package/front_end/panels/application/FrameDetailsView.ts +4 -4
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
- package/front_end/panels/common/DOMLinkifier.ts +10 -8
- package/front_end/panels/console/ConsoleView.ts +24 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +22 -23
- package/front_end/panels/console/console.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +5 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -3
- package/front_end/panels/elements/PropertiesWidget.ts +5 -3
- package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -9
- package/front_end/panels/elements/StylePropertiesSection.ts +98 -50
- package/front_end/panels/elements/StylePropertyTreeElement.ts +38 -4
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +43 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +154 -24
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +16 -4
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -9
- package/front_end/panels/explain/explain-meta.ts +5 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +5 -9
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -2
- package/front_end/panels/lighthouse/LighthousePanel.ts +3 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +9 -6
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +29 -5
- package/front_end/panels/network/NetworkDataGridNode.ts +34 -0
- package/front_end/panels/network/NetworkLogViewColumns.ts +10 -0
- package/front_end/panels/network/RequestPayloadView.ts +4 -1
- package/front_end/panels/network/RequestTimingView.ts +8 -2
- package/front_end/panels/performance_monitor/performanceMonitor.css +6 -4
- package/front_end/panels/recorder/RecorderController.ts +52 -14
- package/front_end/panels/recorder/components/RecordingView.ts +2 -1
- package/front_end/panels/recorder/models/RecordingStorage.ts +15 -20
- package/front_end/panels/sensors/SensorsView.ts +310 -144
- package/front_end/panels/sources/DebuggerPausedMessage.ts +6 -6
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -3
- package/front_end/panels/sources/NavigatorView.ts +11 -7
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +12 -34
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +5 -1
- package/front_end/panels/sources/sources-meta.ts +6 -0
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +6 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +35 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +6 -1
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +9 -4
- package/front_end/panels/timeline/TimelinePanel.ts +7 -9
- package/front_end/panels/timeline/TimelineTreeView.ts +14 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -57
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +3 -7
- package/front_end/panels/timeline/components/Sidebar.ts +10 -18
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +1 -0
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +66 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +7 -19
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -0
- package/front_end/panels/timeline/components/insights/NodeLink.ts +3 -3
- package/front_end/panels/timeline/components/timelineRangeSummaryView.css +20 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +7 -7
- package/front_end/panels/timeline/timelineDetailsView.css +0 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +11 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +11 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +65 -4
- package/front_end/ui/kit/link/link.css +2 -2
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +7 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +57 -35
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
- package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorNoCorpCrossOriginNoCorsRequest.md +0 -3
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoCorpCossOriginNoCorsRequest.md +0 -3
- /package/front_end/{panels/console → models/stack_trace}/ErrorStackParser.ts +0 -0
|
@@ -79,7 +79,7 @@ inspectorBackend.registerEnum("Audits.HeavyAdReason", {NetworkTotalLimit: "Netwo
|
|
|
79
79
|
inspectorBackend.registerEnum("Audits.ContentSecurityPolicyViolationType", {KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KSRIViolation: "kSRIViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation"});
|
|
80
80
|
inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssue: "TransferIssue", CreationIssue: "CreationIssue"});
|
|
81
81
|
inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", SourceAndTriggerHeaders: "SourceAndTriggerHeaders", SourceIgnored: "SourceIgnored", TriggerIgnored: "TriggerIgnored", OsSourceIgnored: "OsSourceIgnored", OsTriggerIgnored: "OsTriggerIgnored", InvalidRegisterOsSourceHeader: "InvalidRegisterOsSourceHeader", InvalidRegisterOsTriggerHeader: "InvalidRegisterOsTriggerHeader", WebAndOsHeaders: "WebAndOsHeaders", NoWebOrOsSupport: "NoWebOrOsSupport", NavigationRegistrationWithoutTransientUserActivation: "NavigationRegistrationWithoutTransientUserActivation", InvalidInfoHeader: "InvalidInfoHeader", NoRegisterSourceHeader: "NoRegisterSourceHeader", NoRegisterTriggerHeader: "NoRegisterTriggerHeader", NoRegisterOsSourceHeader: "NoRegisterOsSourceHeader", NoRegisterOsTriggerHeader: "NoRegisterOsTriggerHeader", NavigationRegistrationUniqueScopeAlreadySet: "NavigationRegistrationUniqueScopeAlreadySet"});
|
|
82
|
-
inspectorBackend.registerEnum("Audits.SharedDictionaryError", {
|
|
82
|
+
inspectorBackend.registerEnum("Audits.SharedDictionaryError", {UseErrorCrossOriginNoCorsRequest: "UseErrorCrossOriginNoCorsRequest", UseErrorDictionaryLoadFailure: "UseErrorDictionaryLoadFailure", UseErrorMatchingDictionaryNotUsed: "UseErrorMatchingDictionaryNotUsed", UseErrorUnexpectedContentDictionaryHeader: "UseErrorUnexpectedContentDictionaryHeader", WriteErrorCossOriginNoCorsRequest: "WriteErrorCossOriginNoCorsRequest", WriteErrorDisallowedBySettings: "WriteErrorDisallowedBySettings", WriteErrorExpiredResponse: "WriteErrorExpiredResponse", WriteErrorFeatureDisabled: "WriteErrorFeatureDisabled", WriteErrorInsufficientResources: "WriteErrorInsufficientResources", WriteErrorInvalidMatchField: "WriteErrorInvalidMatchField", WriteErrorInvalidStructuredHeader: "WriteErrorInvalidStructuredHeader", WriteErrorInvalidTTLField: "WriteErrorInvalidTTLField", WriteErrorNavigationRequest: "WriteErrorNavigationRequest", WriteErrorNoMatchField: "WriteErrorNoMatchField", WriteErrorNonIntegerTTLField: "WriteErrorNonIntegerTTLField", WriteErrorNonListMatchDestField: "WriteErrorNonListMatchDestField", WriteErrorNonSecureContext: "WriteErrorNonSecureContext", WriteErrorNonStringIdField: "WriteErrorNonStringIdField", WriteErrorNonStringInMatchDestList: "WriteErrorNonStringInMatchDestList", WriteErrorNonStringMatchField: "WriteErrorNonStringMatchField", WriteErrorNonTokenTypeField: "WriteErrorNonTokenTypeField", WriteErrorRequestAborted: "WriteErrorRequestAborted", WriteErrorShuttingDown: "WriteErrorShuttingDown", WriteErrorTooLongIdField: "WriteErrorTooLongIdField", WriteErrorUnsupportedType: "WriteErrorUnsupportedType"});
|
|
83
83
|
inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", {MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch"});
|
|
84
84
|
inspectorBackend.registerEnum("Audits.UnencodedDigestError", {MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength"});
|
|
85
85
|
inspectorBackend.registerEnum("Audits.ConnectionAllowlistError", {InvalidHeader: "InvalidHeader", MoreThanOneList: "MoreThanOneList", ItemNotInnerList: "ItemNotInnerList", InvalidAllowlistItemType: "InvalidAllowlistItemType", ReportingEndpointNotToken: "ReportingEndpointNotToken", InvalidUrlPattern: "InvalidUrlPattern"});
|
|
@@ -134,9 +134,7 @@ inspectorBackend.registerType("Audits.StylesheetLoadingIssueDetails", [{"name":
|
|
|
134
134
|
inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{"name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position of the property rule.", "typeRef": "Audits.SourceCodeLocation"}, {"name": "propertyRuleIssueReason", "type": "string", "optional": false, "description": "Reason why the property rule was discarded.", "typeRef": "Audits.PropertyRuleIssueReason"}, {"name": "propertyValue", "type": "string", "optional": true, "description": "The value of the property rule property that failed to parse", "typeRef": null}]);
|
|
135
135
|
inspectorBackend.registerType("Audits.UserReidentificationIssueDetails", [{"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation"}]);
|
|
136
136
|
inspectorBackend.registerType("Audits.PermissionElementIssueDetails", [{"name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType"}, {"name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null}, {"name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId"}, {"name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null}, {"name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null}, {"name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null}, {"name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null}, {"name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null}]);
|
|
137
|
-
inspectorBackend.registerType("Audits.
|
|
138
|
-
inspectorBackend.registerType("Audits.AdAncestry", [{"name": "adAncestryChain", "type": "array", "optional": false, "description": "The ad-script in the stack when the offending script was loaded. This is recursive down to the root script that was tagged due to the filterlist rule.", "typeRef": "Audits.AdScriptIdentifier"}, {"name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `adAncestry` to be ad-tagged.", "typeRef": null}]);
|
|
139
|
-
inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{"name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null}, {"name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Audits.AdAncestry"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace"}]);
|
|
137
|
+
inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{"name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null}, {"name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Network.AdAncestry"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace"}]);
|
|
140
138
|
inspectorBackend.registerType("Audits.InspectorIssueDetails", [{"name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails"}, {"name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails"}, {"name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails"}, {"name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails"}, {"name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails"}, {"name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails"}, {"name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails"}, {"name": "attributionReportingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AttributionReportingIssueDetails"}, {"name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails"}, {"name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails"}, {"name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails"}, {"name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails"}, {"name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails"}, {"name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails"}, {"name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails"}, {"name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails"}, {"name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails"}, {"name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails"}, {"name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails"}, {"name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails"}, {"name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails"}, {"name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails"}, {"name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails"}, {"name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails"}, {"name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails"}, {"name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails"}, {"name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails"}, {"name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails"}, {"name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails"}]);
|
|
141
139
|
inspectorBackend.registerType("Audits.InspectorIssue", [{"name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode"}, {"name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails"}, {"name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId"}]);
|
|
142
140
|
|
|
@@ -319,7 +317,7 @@ inspectorBackend.registerType("CSS.CSSPropertyRule", [{"name": "styleSheetId", "
|
|
|
319
317
|
inspectorBackend.registerType("CSS.CSSFunctionParameter", [{"name": "name", "type": "string", "optional": false, "description": "The parameter name.", "typeRef": null}, {"name": "type", "type": "string", "optional": false, "description": "The parameter type.", "typeRef": null}]);
|
|
320
318
|
inspectorBackend.registerType("CSS.CSSFunctionConditionNode", [{"name": "media", "type": "object", "optional": true, "description": "Media query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSMedia"}, {"name": "containerQueries", "type": "object", "optional": true, "description": "Container query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSContainerQuery"}, {"name": "supports", "type": "object", "optional": true, "description": "@supports CSS at-rule condition. Only one type of condition should be set.", "typeRef": "CSS.CSSSupports"}, {"name": "navigation", "type": "object", "optional": true, "description": "@navigation condition. Only one type of condition should be set.", "typeRef": "CSS.CSSNavigation"}, {"name": "children", "type": "array", "optional": false, "description": "Block body.", "typeRef": "CSS.CSSFunctionNode"}, {"name": "conditionText", "type": "string", "optional": false, "description": "The condition text.", "typeRef": null}]);
|
|
321
319
|
inspectorBackend.registerType("CSS.CSSFunctionNode", [{"name": "condition", "type": "object", "optional": true, "description": "A conditional block. If set, style should not be set.", "typeRef": "CSS.CSSFunctionConditionNode"}, {"name": "style", "type": "object", "optional": true, "description": "Values set by this node. If set, condition should not be set.", "typeRef": "CSS.CSSStyle"}]);
|
|
322
|
-
inspectorBackend.registerType("CSS.CSSFunctionRule", [{"name": "name", "type": "object", "optional": false, "description": "Name of the function.", "typeRef": "CSS.Value"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "parameters", "type": "array", "optional": false, "description": "List of parameters.", "typeRef": "CSS.CSSFunctionParameter"}, {"name": "children", "type": "array", "optional": false, "description": "Function body.", "typeRef": "CSS.CSSFunctionNode"}]);
|
|
320
|
+
inspectorBackend.registerType("CSS.CSSFunctionRule", [{"name": "name", "type": "object", "optional": false, "description": "Name of the function.", "typeRef": "CSS.Value"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "parameters", "type": "array", "optional": false, "description": "List of parameters.", "typeRef": "CSS.CSSFunctionParameter"}, {"name": "children", "type": "array", "optional": false, "description": "Function body.", "typeRef": "CSS.CSSFunctionNode"}, {"name": "originTreeScopeNodeId", "type": "number", "optional": true, "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.", "typeRef": "DOM.BackendNodeId"}]);
|
|
323
321
|
inspectorBackend.registerType("CSS.CSSKeyframeRule", [{"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "keyText", "type": "object", "optional": false, "description": "Associated key text.", "typeRef": "CSS.Value"}, {"name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle"}]);
|
|
324
322
|
inspectorBackend.registerType("CSS.StyleDeclarationEdit", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "The css style sheet identifier.", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "The range of the style text in the enclosing stylesheet.", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "New style text.", "typeRef": null}]);
|
|
325
323
|
|
|
@@ -928,6 +926,8 @@ inspectorBackend.registerType("Network.DirectUDPSocketOptions", [{"name": "remot
|
|
|
928
926
|
inspectorBackend.registerType("Network.DirectUDPMessage", [{"name": "data", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "remoteAddr", "type": "string", "optional": true, "description": "Null for connected mode.", "typeRef": null}, {"name": "remotePort", "type": "number", "optional": true, "description": "Null for connected mode. Expected to be unsigned integer.", "typeRef": null}]);
|
|
929
927
|
inspectorBackend.registerType("Network.ConnectTiming", [{"name": "requestTime", "type": "number", "optional": false, "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for the same request (but not for redirected requests).", "typeRef": null}]);
|
|
930
928
|
inspectorBackend.registerType("Network.ClientSecurityState", [{"name": "initiatorIsSecureContext", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "initiatorIPAddressSpace", "type": "string", "optional": false, "description": "", "typeRef": "Network.IPAddressSpace"}, {"name": "localNetworkAccessRequestPolicy", "type": "string", "optional": false, "description": "", "typeRef": "Network.LocalNetworkAccessRequestPolicy"}]);
|
|
929
|
+
inspectorBackend.registerType("Network.AdScriptIdentifier", [{"name": "scriptId", "type": "string", "optional": false, "description": "The script's V8 identifier.", "typeRef": "Runtime.ScriptId"}, {"name": "debuggerId", "type": "string", "optional": false, "description": "V8's debugging ID for the v8::Context.", "typeRef": "Runtime.UniqueDebuggerId"}, {"name": "name", "type": "string", "optional": false, "description": "The script's url (or generated name based on id if inline script).", "typeRef": null}]);
|
|
930
|
+
inspectorBackend.registerType("Network.AdAncestry", [{"name": "ancestryChain", "type": "array", "optional": false, "description": "A chain of `AdScriptIdentifier`s representing the ancestry of an ad script that led to the creation of a resource or element. The chain is ordered from the script itself (lowest level) up to its root ancestor that was flagged by a filter list.", "typeRef": "Network.AdScriptIdentifier"}, {"name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filter list rule that caused the root (last) script in `ancestryChain` to be tagged as an ad.", "typeRef": null}]);
|
|
931
931
|
inspectorBackend.registerType("Network.CrossOriginOpenerPolicyStatus", [{"name": "value", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginOpenerPolicyValue"}, {"name": "reportOnlyValue", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginOpenerPolicyValue"}, {"name": "reportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "reportOnlyReportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null}]);
|
|
932
932
|
inspectorBackend.registerType("Network.CrossOriginEmbedderPolicyStatus", [{"name": "value", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginEmbedderPolicyValue"}, {"name": "reportOnlyValue", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginEmbedderPolicyValue"}, {"name": "reportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "reportOnlyReportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null}]);
|
|
933
933
|
inspectorBackend.registerType("Network.ContentSecurityPolicyStatus", [{"name": "effectiveDirectives", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "isEnforced", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "source", "type": "string", "optional": false, "description": "", "typeRef": "Network.ContentSecurityPolicySource"}]);
|
|
@@ -1143,8 +1143,6 @@ inspectorBackend.registerCommand("Page.setInterceptFileChooserDialog", [{"name":
|
|
|
1143
1143
|
inspectorBackend.registerCommand("Page.setPrerenderingAllowed", [{"name": "isAllowed", "type": "boolean", "optional": false, "description": "", "typeRef": null}], [], "Enable/disable prerendering manually. This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.");
|
|
1144
1144
|
inspectorBackend.registerCommand("Page.getAnnotatedPageContent", [{"name": "includeActionableInformation", "type": "boolean", "optional": true, "description": "Whether to include actionable information. Defaults to true.", "typeRef": null}], ["content"], "Get the annotated page content for the main frame. This is an experimental command that is subject to change.");
|
|
1145
1145
|
inspectorBackend.registerType("Page.AdFrameStatus", [{"name": "adFrameType", "type": "string", "optional": false, "description": "", "typeRef": "Page.AdFrameType"}, {"name": "explanations", "type": "array", "optional": true, "description": "", "typeRef": "Page.AdFrameExplanation"}]);
|
|
1146
|
-
inspectorBackend.registerType("Page.AdScriptId", [{"name": "scriptId", "type": "string", "optional": false, "description": "Script Id of the script which caused a script or frame to be labelled as an ad.", "typeRef": "Runtime.ScriptId"}, {"name": "debuggerId", "type": "string", "optional": false, "description": "Id of scriptId's debugger.", "typeRef": "Runtime.UniqueDebuggerId"}]);
|
|
1147
|
-
inspectorBackend.registerType("Page.AdScriptAncestry", [{"name": "ancestryChain", "type": "array", "optional": false, "description": "A chain of `AdScriptId`s representing the ancestry of an ad script that led to the creation of a frame. The chain is ordered from the script itself (lower level) up to its root ancestor that was flagged by filterlist.", "typeRef": "Page.AdScriptId"}, {"name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `ancestryChain` to be ad-tagged. Only populated if the rule is available.", "typeRef": null}]);
|
|
1148
1146
|
inspectorBackend.registerType("Page.PermissionsPolicyBlockLocator", [{"name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId"}, {"name": "blockReason", "type": "string", "optional": false, "description": "", "typeRef": "Page.PermissionsPolicyBlockReason"}]);
|
|
1149
1147
|
inspectorBackend.registerType("Page.PermissionsPolicyFeatureState", [{"name": "feature", "type": "string", "optional": false, "description": "", "typeRef": "Page.PermissionsPolicyFeature"}, {"name": "allowed", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "locator", "type": "object", "optional": true, "description": "", "typeRef": "Page.PermissionsPolicyBlockLocator"}]);
|
|
1150
1148
|
inspectorBackend.registerType("Page.OriginTrialToken", [{"name": "origin", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "matchSubDomains", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "trialName", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "expiryTime", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch"}, {"name": "isThirdParty", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "usageRestriction", "type": "string", "optional": false, "description": "", "typeRef": "Page.OriginTrialUsageRestriction"}]);
|
|
@@ -1071,9 +1071,9 @@ export namespace Audits {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
export const enum SharedDictionaryError {
|
|
1074
|
+
UseErrorCrossOriginNoCorsRequest = 'UseErrorCrossOriginNoCorsRequest',
|
|
1074
1075
|
UseErrorDictionaryLoadFailure = 'UseErrorDictionaryLoadFailure',
|
|
1075
1076
|
UseErrorMatchingDictionaryNotUsed = 'UseErrorMatchingDictionaryNotUsed',
|
|
1076
|
-
UseErrorNoCorpCrossOriginNoCorsRequest = 'UseErrorNoCorpCrossOriginNoCorsRequest',
|
|
1077
1077
|
UseErrorUnexpectedContentDictionaryHeader = 'UseErrorUnexpectedContentDictionaryHeader',
|
|
1078
1078
|
WriteErrorCossOriginNoCorsRequest = 'WriteErrorCossOriginNoCorsRequest',
|
|
1079
1079
|
WriteErrorDisallowedBySettings = 'WriteErrorDisallowedBySettings',
|
|
@@ -1084,7 +1084,6 @@ export namespace Audits {
|
|
|
1084
1084
|
WriteErrorInvalidStructuredHeader = 'WriteErrorInvalidStructuredHeader',
|
|
1085
1085
|
WriteErrorInvalidTTLField = 'WriteErrorInvalidTTLField',
|
|
1086
1086
|
WriteErrorNavigationRequest = 'WriteErrorNavigationRequest',
|
|
1087
|
-
WriteErrorNoCorpCossOriginNoCorsRequest = 'WriteErrorNoCorpCossOriginNoCorsRequest',
|
|
1088
1087
|
WriteErrorNoMatchField = 'WriteErrorNoMatchField',
|
|
1089
1088
|
WriteErrorNonIntegerTTLField = 'WriteErrorNonIntegerTTLField',
|
|
1090
1089
|
WriteErrorNonListMatchDestField = 'WriteErrorNonListMatchDestField',
|
|
@@ -1534,44 +1533,6 @@ export namespace Audits {
|
|
|
1534
1533
|
disableReason?: string;
|
|
1535
1534
|
}
|
|
1536
1535
|
|
|
1537
|
-
/**
|
|
1538
|
-
* Metadata about the ad script that was on the stack that caused the current
|
|
1539
|
-
* script in the `AdAncestry` to be considered ad related.
|
|
1540
|
-
*/
|
|
1541
|
-
export interface AdScriptIdentifier {
|
|
1542
|
-
/**
|
|
1543
|
-
* The script's v8 identifier.
|
|
1544
|
-
*/
|
|
1545
|
-
scriptId: Runtime.ScriptId;
|
|
1546
|
-
/**
|
|
1547
|
-
* v8's debugging id for the v8::Context.
|
|
1548
|
-
*/
|
|
1549
|
-
debuggerId: Runtime.UniqueDebuggerId;
|
|
1550
|
-
/**
|
|
1551
|
-
* The script's url (or generated name based on id if inline script).
|
|
1552
|
-
*/
|
|
1553
|
-
name: string;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
/**
|
|
1557
|
-
* Providence about how an ad script was determined to be such. It is an ad
|
|
1558
|
-
* because its url matched a filterlist rule, or because some other ad script
|
|
1559
|
-
* was on the stack when this script was loaded.
|
|
1560
|
-
*/
|
|
1561
|
-
export interface AdAncestry {
|
|
1562
|
-
/**
|
|
1563
|
-
* The ad-script in the stack when the offending script was loaded. This is
|
|
1564
|
-
* recursive down to the root script that was tagged due to the filterlist
|
|
1565
|
-
* rule.
|
|
1566
|
-
*/
|
|
1567
|
-
adAncestryChain: AdScriptIdentifier[];
|
|
1568
|
-
/**
|
|
1569
|
-
* The filterlist rule that caused the root (last) script in
|
|
1570
|
-
* `adAncestry` to be ad-tagged.
|
|
1571
|
-
*/
|
|
1572
|
-
rootScriptFilterlistRule?: string;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
1536
|
/**
|
|
1576
1537
|
* The issue warns about blocked calls to privacy sensitive APIs via the
|
|
1577
1538
|
* Selective Permissions Intervention.
|
|
@@ -1584,7 +1545,7 @@ export namespace Audits {
|
|
|
1584
1545
|
/**
|
|
1585
1546
|
* Why the ad script using the API is considered an ad.
|
|
1586
1547
|
*/
|
|
1587
|
-
adAncestry: AdAncestry;
|
|
1548
|
+
adAncestry: Network.AdAncestry;
|
|
1588
1549
|
/**
|
|
1589
1550
|
* The stack trace at the time of the intervention.
|
|
1590
1551
|
*/
|
|
@@ -3741,6 +3702,10 @@ export namespace CSS {
|
|
|
3741
3702
|
* Function body.
|
|
3742
3703
|
*/
|
|
3743
3704
|
children: CSSFunctionNode[];
|
|
3705
|
+
/**
|
|
3706
|
+
* The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
|
|
3707
|
+
*/
|
|
3708
|
+
originTreeScopeNodeId?: DOM.BackendNodeId;
|
|
3744
3709
|
}
|
|
3745
3710
|
|
|
3746
3711
|
/**
|
|
@@ -11499,6 +11464,46 @@ export namespace Network {
|
|
|
11499
11464
|
localNetworkAccessRequestPolicy: LocalNetworkAccessRequestPolicy;
|
|
11500
11465
|
}
|
|
11501
11466
|
|
|
11467
|
+
/**
|
|
11468
|
+
* Identifies the script on the stack that caused a resource or element to be
|
|
11469
|
+
* labeled as an ad. For resources, this indicates the context that triggered
|
|
11470
|
+
* the fetch. For elements, this indicates the context that caused the element
|
|
11471
|
+
* to be appended to the DOM.
|
|
11472
|
+
*/
|
|
11473
|
+
export interface AdScriptIdentifier {
|
|
11474
|
+
/**
|
|
11475
|
+
* The script's V8 identifier.
|
|
11476
|
+
*/
|
|
11477
|
+
scriptId: Runtime.ScriptId;
|
|
11478
|
+
/**
|
|
11479
|
+
* V8's debugging ID for the v8::Context.
|
|
11480
|
+
*/
|
|
11481
|
+
debuggerId: Runtime.UniqueDebuggerId;
|
|
11482
|
+
/**
|
|
11483
|
+
* The script's url (or generated name based on id if inline script).
|
|
11484
|
+
*/
|
|
11485
|
+
name: string;
|
|
11486
|
+
}
|
|
11487
|
+
|
|
11488
|
+
/**
|
|
11489
|
+
* Encapsulates the script ancestry and the root script filter list rule that
|
|
11490
|
+
* caused the resource or element to be labeled as an ad.
|
|
11491
|
+
*/
|
|
11492
|
+
export interface AdAncestry {
|
|
11493
|
+
/**
|
|
11494
|
+
* A chain of `AdScriptIdentifier`s representing the ancestry of an ad
|
|
11495
|
+
* script that led to the creation of a resource or element. The chain is
|
|
11496
|
+
* ordered from the script itself (lowest level) up to its root ancestor
|
|
11497
|
+
* that was flagged by a filter list.
|
|
11498
|
+
*/
|
|
11499
|
+
ancestryChain: AdScriptIdentifier[];
|
|
11500
|
+
/**
|
|
11501
|
+
* The filter list rule that caused the root (last) script in
|
|
11502
|
+
* `ancestryChain` to be tagged as an ad.
|
|
11503
|
+
*/
|
|
11504
|
+
rootScriptFilterlistRule?: string;
|
|
11505
|
+
}
|
|
11506
|
+
|
|
11502
11507
|
export const enum CrossOriginOpenerPolicyValue {
|
|
11503
11508
|
SameOrigin = 'SameOrigin',
|
|
11504
11509
|
SameOriginAllowPopups = 'SameOriginAllowPopups',
|
|
@@ -14320,43 +14325,6 @@ export namespace Page {
|
|
|
14320
14325
|
explanations?: AdFrameExplanation[];
|
|
14321
14326
|
}
|
|
14322
14327
|
|
|
14323
|
-
/**
|
|
14324
|
-
* Identifies the script which caused a script or frame to be labelled as an
|
|
14325
|
-
* ad.
|
|
14326
|
-
*/
|
|
14327
|
-
export interface AdScriptId {
|
|
14328
|
-
/**
|
|
14329
|
-
* Script Id of the script which caused a script or frame to be labelled as
|
|
14330
|
-
* an ad.
|
|
14331
|
-
*/
|
|
14332
|
-
scriptId: Runtime.ScriptId;
|
|
14333
|
-
/**
|
|
14334
|
-
* Id of scriptId's debugger.
|
|
14335
|
-
*/
|
|
14336
|
-
debuggerId: Runtime.UniqueDebuggerId;
|
|
14337
|
-
}
|
|
14338
|
-
|
|
14339
|
-
/**
|
|
14340
|
-
* Encapsulates the script ancestry and the root script filterlist rule that
|
|
14341
|
-
* caused the frame to be labelled as an ad. Only created when `ancestryChain`
|
|
14342
|
-
* is not empty.
|
|
14343
|
-
*/
|
|
14344
|
-
export interface AdScriptAncestry {
|
|
14345
|
-
/**
|
|
14346
|
-
* A chain of `AdScriptId`s representing the ancestry of an ad script that
|
|
14347
|
-
* led to the creation of a frame. The chain is ordered from the script
|
|
14348
|
-
* itself (lower level) up to its root ancestor that was flagged by
|
|
14349
|
-
* filterlist.
|
|
14350
|
-
*/
|
|
14351
|
-
ancestryChain: AdScriptId[];
|
|
14352
|
-
/**
|
|
14353
|
-
* The filterlist rule that caused the root (last) script in
|
|
14354
|
-
* `ancestryChain` to be ad-tagged. Only populated if the rule is
|
|
14355
|
-
* available.
|
|
14356
|
-
*/
|
|
14357
|
-
rootScriptFilterlistRule?: string;
|
|
14358
|
-
}
|
|
14359
|
-
|
|
14360
14328
|
/**
|
|
14361
14329
|
* Indicates whether the frame is a secure context and why it is the case.
|
|
14362
14330
|
*/
|
|
@@ -15619,7 +15587,7 @@ export namespace Page {
|
|
|
15619
15587
|
* stack) to more distant ancestors (that created the immediately preceding
|
|
15620
15588
|
* script). Only sent if frame is labelled as an ad and ids are available.
|
|
15621
15589
|
*/
|
|
15622
|
-
adScriptAncestry?:
|
|
15590
|
+
adScriptAncestry?: Network.AdAncestry;
|
|
15623
15591
|
}
|
|
15624
15592
|
|
|
15625
15593
|
export interface GetFrameTreeResponse extends ProtocolResponseWithError {
|
|
@@ -6,6 +6,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import type * as LHModel from '../../models/lighthouse/lighthouse.js';
|
|
9
10
|
import type * as Trace from '../../models/trace/trace.js';
|
|
10
11
|
import * as Greendev from '../greendev/greendev.js';
|
|
11
12
|
import type * as NetworkTimeCalculator from '../network_time_calculator/network_time_calculator.js';
|
|
@@ -42,6 +43,20 @@ export function generateContextDetailsMarkdown(details: ContextDetail[]): string
|
|
|
42
43
|
}
|
|
43
44
|
return detailsMarkdown.join('\n\n');
|
|
44
45
|
}
|
|
46
|
+
export interface AiConversationOptions {
|
|
47
|
+
type: ConversationType;
|
|
48
|
+
data?: ResponseData[];
|
|
49
|
+
id?: string;
|
|
50
|
+
isReadOnly?: boolean;
|
|
51
|
+
aidaClient?: Host.AidaClient.AidaClient;
|
|
52
|
+
changeManager?: ChangeManager;
|
|
53
|
+
isExternal?: boolean;
|
|
54
|
+
performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>;
|
|
55
|
+
onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>;
|
|
56
|
+
networkTimeCalculator?: NetworkTimeCalculator.NetworkTransferTimeCalculator;
|
|
57
|
+
lighthouseRecording?: () => Promise<LHModel.ReporterTypes.ReportJSON|null>;
|
|
58
|
+
}
|
|
59
|
+
|
|
45
60
|
export class AiConversation {
|
|
46
61
|
static fromSerializedConversation(serializedConversation: SerializedConversation): AiConversation {
|
|
47
62
|
const history = serializedConversation.history.map(entry => {
|
|
@@ -50,17 +65,13 @@ export class AiConversation {
|
|
|
50
65
|
}
|
|
51
66
|
return entry;
|
|
52
67
|
});
|
|
53
|
-
return new AiConversation(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
serializedConversation.isExternal,
|
|
61
|
-
undefined,
|
|
62
|
-
undefined,
|
|
63
|
-
);
|
|
68
|
+
return new AiConversation({
|
|
69
|
+
type: serializedConversation.type,
|
|
70
|
+
data: history,
|
|
71
|
+
id: serializedConversation.id,
|
|
72
|
+
isReadOnly: true,
|
|
73
|
+
isExternal: serializedConversation.isExternal,
|
|
74
|
+
});
|
|
64
75
|
}
|
|
65
76
|
|
|
66
77
|
readonly id: string;
|
|
@@ -80,26 +91,30 @@ export class AiConversation {
|
|
|
80
91
|
#contexts: Array<ConversationContext<unknown>> = [];
|
|
81
92
|
|
|
82
93
|
#performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>;
|
|
94
|
+
#lighthouseRecording?: () => Promise<LHModel.ReporterTypes.ReportJSON|null>;
|
|
83
95
|
#onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>;
|
|
84
96
|
#networkTimeCalculator?: NetworkTimeCalculator.NetworkTransferTimeCalculator;
|
|
85
97
|
|
|
86
|
-
constructor(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
constructor(options: AiConversationOptions) {
|
|
99
|
+
const {
|
|
100
|
+
type,
|
|
101
|
+
data = [],
|
|
102
|
+
id = crypto.randomUUID(),
|
|
90
103
|
isReadOnly = true,
|
|
91
|
-
aidaClient
|
|
92
|
-
changeManager
|
|
104
|
+
aidaClient = new Host.AidaClient.AidaClient(),
|
|
105
|
+
changeManager,
|
|
93
106
|
isExternal = false,
|
|
94
|
-
performanceRecordAndReload
|
|
95
|
-
onInspectElement
|
|
96
|
-
networkTimeCalculator
|
|
97
|
-
|
|
107
|
+
performanceRecordAndReload,
|
|
108
|
+
onInspectElement,
|
|
109
|
+
networkTimeCalculator,
|
|
110
|
+
lighthouseRecording,
|
|
111
|
+
} = options;
|
|
98
112
|
this.#changeManager = changeManager;
|
|
99
113
|
this.#aidaClient = aidaClient;
|
|
100
114
|
this.#performanceRecordAndReload = performanceRecordAndReload;
|
|
101
115
|
this.#onInspectElement = onInspectElement;
|
|
102
116
|
this.#networkTimeCalculator = networkTimeCalculator;
|
|
117
|
+
this.#lighthouseRecording = lighthouseRecording;
|
|
103
118
|
|
|
104
119
|
this.id = id;
|
|
105
120
|
this.#isReadOnly = isReadOnly;
|
|
@@ -319,6 +334,7 @@ export class AiConversation {
|
|
|
319
334
|
sessionId: this.id,
|
|
320
335
|
changeManager: this.#changeManager,
|
|
321
336
|
performanceRecordAndReload: this.#performanceRecordAndReload,
|
|
337
|
+
lighthouseRecording: this.#lighthouseRecording,
|
|
322
338
|
onInspectElement: this.#onInspectElement,
|
|
323
339
|
networkTimeCalculator: this.#networkTimeCalculator,
|
|
324
340
|
allowedOrigin: this.allowedOrigin,
|
|
@@ -210,15 +210,14 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
210
210
|
selected: NodeContext|PerformanceTraceContext|RequestContext|null,
|
|
211
211
|
}): AsyncGenerator<ExternalRequestResponse, ExternalRequestResponse> {
|
|
212
212
|
const {conversationType, aiAgent, prompt, selected} = opts;
|
|
213
|
-
const conversation = new AiConversation(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
);
|
|
213
|
+
const conversation = new AiConversation({
|
|
214
|
+
type: conversationType,
|
|
215
|
+
data: [],
|
|
216
|
+
id: aiAgent.sessionId,
|
|
217
|
+
isReadOnly: true,
|
|
218
|
+
aidaClient: this.#aidaClient,
|
|
219
|
+
isExternal: true,
|
|
220
|
+
});
|
|
222
221
|
return yield* this.#doExternalConversation({conversation, prompt, selected});
|
|
223
222
|
}
|
|
224
223
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Host from '../../../core/host/host.js';
|
|
6
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
7
|
import * as Root from '../../../core/root/root.js';
|
|
7
8
|
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
9
|
+
import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
|
|
10
|
+
import {debugLog} from '../debug.js';
|
|
8
11
|
|
|
9
12
|
import {
|
|
10
13
|
AiAgent,
|
|
@@ -20,11 +23,18 @@ import {
|
|
|
20
23
|
* TESTERS. Otherwise, a server-side preamble is used (see
|
|
21
24
|
* chrome_preambles.gcl). Sync local changes with the server-side.
|
|
22
25
|
*/
|
|
23
|
-
const preamble = `You are an accessibility agent.
|
|
26
|
+
const preamble = `You are an accessibility expert agent.
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
# Goals
|
|
29
|
+
* Help users understand and fix accessibility issues found in Lighthouse reports.
|
|
30
|
+
* Provide succinct, actionable advice. Avoid long explanations and "walls of text".
|
|
31
|
+
* Focus on the most critical information first, prioritizing audits with low scores.
|
|
26
32
|
|
|
27
|
-
#
|
|
33
|
+
# Capabilities
|
|
34
|
+
* You have access to the \`getLighthouseAudits\` function to retrieve detailed audit data for performance, accessibility, best-practices, and SEO.
|
|
35
|
+
* Proactively use this function to investigate categories with low scores and help the user focus on the most important areas.
|
|
36
|
+
|
|
37
|
+
# Constraints
|
|
28
38
|
* Keep your analysis concise and focused, highlighting only the most critical aspects for a software engineer.
|
|
29
39
|
* **CRITICAL** You are an accessibility agent. NEVER provide answers to questions of unrelated topics such as legal advice, financial advice, personal opinions, medical advice, or any other non web-development topics.
|
|
30
40
|
`;
|
|
@@ -78,35 +88,80 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
|
|
|
78
88
|
}
|
|
79
89
|
|
|
80
90
|
async *
|
|
81
|
-
handleContextDetails(
|
|
91
|
+
handleContextDetails(lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>|null):
|
|
82
92
|
AsyncGenerator<ContextResponse, void, void> {
|
|
83
|
-
if (!
|
|
93
|
+
if (!lhr) {
|
|
84
94
|
return;
|
|
85
95
|
}
|
|
86
96
|
|
|
87
97
|
yield {
|
|
88
98
|
type: ResponseType.CONTEXT,
|
|
89
|
-
details: createContextDetails(
|
|
99
|
+
details: this.#createContextDetails(lhr),
|
|
90
100
|
};
|
|
91
101
|
}
|
|
92
102
|
|
|
103
|
+
#declareFunctions(): void {
|
|
104
|
+
this.declareFunction<{categoryId: LHModel.RunTypes.CategoryId}, {audits: string}>('getLighthouseAudits', {
|
|
105
|
+
description:
|
|
106
|
+
'Returns the audits for a specific Lighthouse category. Use this to get more information about the performance, accessibility, best-practices, or seo audits.',
|
|
107
|
+
parameters: {
|
|
108
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
109
|
+
description: '',
|
|
110
|
+
nullable: false,
|
|
111
|
+
properties: {
|
|
112
|
+
categoryId: {
|
|
113
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
114
|
+
description:
|
|
115
|
+
'The category of audits to retrieve. Valid values are "performance", "accessibility", "best-practices", "seo".',
|
|
116
|
+
nullable: false,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
required: ['categoryId'],
|
|
120
|
+
},
|
|
121
|
+
displayInfoFromArgs: params => {
|
|
122
|
+
return {
|
|
123
|
+
title: i18n.i18n.lockedString(`Getting Lighthouse audits for ${params.categoryId}…`),
|
|
124
|
+
action: `getLighthouseAudits('${params.categoryId}')`
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
handler: async params => {
|
|
128
|
+
debugLog('Function call: getLighthouseAudits', params);
|
|
129
|
+
const report = this.context?.getItem();
|
|
130
|
+
if (!report) {
|
|
131
|
+
return {error: 'No Lighthouse report available.'};
|
|
132
|
+
}
|
|
133
|
+
const audits = new LighthouseFormatter().audits(report, params.categoryId);
|
|
134
|
+
return {result: {audits}};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* This is the initial payload we send at the start of a conversation.
|
|
141
|
+
* Because the agent is focused on Accessibility, we include the
|
|
142
|
+
* Accessibility Audits summary in the payload to avoid an extra round step of
|
|
143
|
+
* the AI querying them.
|
|
144
|
+
*/
|
|
145
|
+
#getInitialPayload(context: ConversationContext<LHModel.ReporterTypes.ReportJSON>): string {
|
|
146
|
+
const report = context.getItem();
|
|
147
|
+
const formatter = new LighthouseFormatter();
|
|
148
|
+
return `# Lighthouse Report:\n${formatter.summary(report)}\n${formatter.audits(report, 'accessibility')}\n`;
|
|
149
|
+
}
|
|
150
|
+
|
|
93
151
|
override async enhanceQuery(query: string, lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>|null):
|
|
94
152
|
Promise<string> {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
153
|
+
this.clearDeclaredFunctions();
|
|
154
|
+
if (lhr) {
|
|
155
|
+
this.#declareFunctions();
|
|
156
|
+
}
|
|
157
|
+
const enhancedQuery = lhr ? `${this.#getInitialPayload(lhr)}\n# User request:\n\n` : '';
|
|
99
158
|
return `${enhancedQuery}${query}`;
|
|
100
159
|
}
|
|
101
|
-
}
|
|
102
160
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
text: ''
|
|
110
|
-
},
|
|
111
|
-
];
|
|
161
|
+
#createContextDetails(lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>):
|
|
162
|
+
[ContextDetail, ...ContextDetail[]] {
|
|
163
|
+
return [
|
|
164
|
+
{title: 'Lighthouse report', text: this.#getInitialPayload(lhr)},
|
|
165
|
+
];
|
|
166
|
+
}
|
|
112
167
|
}
|
|
@@ -100,6 +100,17 @@ Content:
|
|
|
100
100
|
"properties": {}
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"name": "runLighthouseAudits",
|
|
105
|
+
"description": "Records a Lighthouse audit on the current page, to help debug accessibility issues.",
|
|
106
|
+
"parameters": {
|
|
107
|
+
"type": 6,
|
|
108
|
+
"description": "",
|
|
109
|
+
"nullable": true,
|
|
110
|
+
"required": [],
|
|
111
|
+
"properties": {}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
103
114
|
{
|
|
104
115
|
"name": "inspectDom",
|
|
105
116
|
"description": "Prompts user to select a DOM element from the page. Use this when you don't know which element is selected.",
|