chrome-devtools-frontend 1.0.1597624 → 1.0.1599001

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.
Files changed (140) hide show
  1. package/.agents/README.md +13 -0
  2. package/{agents/prompts/creating-a-model.md → .agents/skills/creating-a-model/SKILL.md} +7 -1
  3. package/{agents/prompts/devtools-imports.md → .agents/skills/devtools-imports/SKILL.md} +10 -5
  4. package/{agents/prompts/merging-devtools-module.md → .agents/skills/merging-devtools-module/SKILL.md} +5 -0
  5. package/{agents/prompts/ui-widgets.md → .agents/skills/ui-widgets/SKILL.md} +5 -0
  6. package/{agents/prompts/verification.md → .agents/skills/verification/SKILL.md} +5 -0
  7. package/docs/ui_engineering.md +6 -6
  8. package/front_end/core/host/AidaClient.ts +2 -0
  9. package/front_end/core/host/GcaTypes.ts +518 -0
  10. package/front_end/core/host/UserMetrics.ts +0 -1
  11. package/front_end/core/host/host.ts +2 -0
  12. package/front_end/core/root/ExperimentNames.ts +0 -1
  13. package/front_end/entrypoints/main/MainImpl.ts +0 -2
  14. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  15. package/front_end/generated/protocol.ts +2 -1
  16. package/front_end/models/ai_assistance/AiConversation.ts +28 -15
  17. package/front_end/models/ai_assistance/AiHistoryStorage.snapshot.txt +1 -1
  18. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -0
  19. package/front_end/models/ai_assistance/ConversationHandler.ts +8 -2
  20. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +3 -18
  21. package/front_end/models/ai_assistance/agents/AiAgent.ts +39 -5
  22. package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +0 -1
  23. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -0
  24. package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +108 -0
  25. package/front_end/models/ai_assistance/agents/FileAgent.ts +0 -15
  26. package/front_end/models/ai_assistance/agents/NetworkAgent.ts +0 -5
  27. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +76 -13
  28. package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +0 -10
  29. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -6
  30. package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -5
  31. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  32. package/front_end/models/emulation/DeviceModeModel.ts +5 -1
  33. package/front_end/models/emulation/EmulatedDevices.ts +3 -2
  34. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +15 -5
  35. package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorNoCorpCrossOriginNoCorsRequest.md +3 -0
  36. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoCorpCossOriginNoCorsRequest.md +3 -0
  37. package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
  38. package/front_end/models/lighthouse/RunTypes.ts +41 -0
  39. package/front_end/models/lighthouse/lighthouse.ts +2 -0
  40. package/front_end/models/trace/ModelImpl.ts +4 -0
  41. package/front_end/models/trace/helpers/SamplesIntegrator.ts +1 -8
  42. package/front_end/models/trace/types/Configuration.ts +0 -5
  43. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +90 -14
  44. package/front_end/panels/ai_assistance/PatchWidget.ts +1 -1
  45. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -0
  46. package/front_end/panels/ai_assistance/components/ChatMessage.ts +153 -42
  47. package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
  48. package/front_end/panels/ai_assistance/components/chatMessage.css +61 -0
  49. package/front_end/panels/application/AppManifestView.ts +2 -2
  50. package/front_end/panels/application/CookieItemsView.ts +9 -15
  51. package/front_end/panels/application/DeviceBoundSessionsView.ts +3 -5
  52. package/front_end/panels/application/FrameDetailsView.ts +2 -2
  53. package/front_end/panels/application/ReportingApiView.ts +2 -2
  54. package/front_end/panels/application/preloading/PreloadingView.ts +20 -7
  55. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +6 -3
  56. package/front_end/panels/application/preloading/components/PreloadingString.ts +15 -2
  57. package/front_end/panels/application/preloading/helper/PreloadingForward.ts +31 -2
  58. package/front_end/panels/changes/ChangesView.ts +7 -11
  59. package/front_end/panels/coverage/CoverageView.ts +4 -4
  60. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
  61. package/front_end/panels/elements/ElementsTreeOutline.ts +34 -8
  62. package/front_end/panels/elements/StylePropertiesSection.ts +129 -1
  63. package/front_end/panels/elements/StylePropertyHighlighter.ts +3 -0
  64. package/front_end/panels/elements/stylesSidebarPane.css +34 -0
  65. package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +3 -5
  66. package/front_end/panels/layer_viewer/LayerDetailsView.ts +2 -1
  67. package/front_end/panels/lighthouse/LighthouseController.ts +148 -162
  68. package/front_end/panels/lighthouse/LighthousePanel.ts +2 -7
  69. package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -6
  70. package/front_end/panels/lighthouse/LighthouseStatusView.ts +3 -3
  71. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +7 -3
  72. package/front_end/panels/network/RequestConditionsDrawer.ts +4 -4
  73. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  74. package/front_end/panels/network/RequestHeadersView.ts +4 -4
  75. package/front_end/panels/network/RequestResponseView.ts +2 -2
  76. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -2
  77. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
  78. package/front_end/panels/recorder/components/StepView.ts +2 -1
  79. package/front_end/panels/search/SearchView.ts +2 -2
  80. package/front_end/panels/sensors/SensorsView.ts +32 -22
  81. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +18 -4
  82. package/front_end/panels/timeline/StatusDialog.ts +159 -83
  83. package/front_end/panels/timeline/TimelineController.ts +0 -4
  84. package/front_end/panels/timeline/TimelineDetailsView.ts +8 -6
  85. package/front_end/panels/timeline/TimelinePanel.ts +29 -2
  86. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
  87. package/front_end/panels/timeline/components/Sidebar.ts +1 -1
  88. package/front_end/panels/timeline/components/SidebarInsightsTab.ts +1 -1
  89. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +62 -34
  90. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +53 -28
  91. package/front_end/panels/timeline/components/insights/CharacterSet.ts +2 -6
  92. package/front_end/panels/timeline/components/insights/EventRef.ts +2 -2
  93. package/front_end/panels/timeline/components/insights/baseInsightComponent.css +7 -0
  94. package/front_end/panels/timeline/components/insights/insights.ts +0 -2
  95. package/front_end/panels/timeline/timeline-meta.ts +11 -0
  96. package/front_end/panels/webauthn/WebauthnPane.ts +2 -2
  97. package/front_end/third_party/chromium/README.chromium +1 -1
  98. package/front_end/third_party/puppeteer/README.chromium +2 -2
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js.map +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts +4 -0
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +13 -0
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/mitt.js +2 -2
  113. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/parsel-js/parsel-js.js +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/rxjs/rxjs.js +446 -446
  115. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +166 -167
  116. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js +2 -2
  117. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts +4 -0
  119. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +12 -0
  121. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  123. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  124. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/mitt.js +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js/parsel-js.js +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs/rxjs.js +97 -97
  130. package/front_end/third_party/puppeteer/package/package.json +1 -1
  131. package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +2 -2
  132. package/front_end/third_party/puppeteer/package/src/bidi/util.ts +17 -0
  133. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  134. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  135. package/front_end/ui/legacy/Widget.ts +47 -9
  136. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
  137. package/package.json +1 -1
  138. package/agents/prompts/README.md +0 -18
  139. package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +0 -1
  140. package/front_end/panels/timeline/components/insights/InsightRenderer.ts +0 -93
@@ -0,0 +1,13 @@
1
+ # .agents
2
+
3
+ This directory contains workspace-specific agent expertise and skills.
4
+
5
+ ## Skills
6
+
7
+ Workspace skills are located in `.agents/skills/`. These represent on-demand expertise that the AI agent can activate to complete specialized tasks.
8
+
9
+ To use a skill, the agent will autonomously identify it based on its description and pull in the instructions using the `activate_skill` tool.
10
+
11
+ ## Contributing
12
+
13
+ Contributions to existing skills or adding new ones are encouraged via CLs.
@@ -1,3 +1,9 @@
1
+ ```
2
+ ---
3
+ name: devtools-model-management
4
+ description: Guidelines for creating, migrating, and registering models in front_end/models/. Covers BUILD.gn, devtools_grd_files.gni, and entrypoints.
5
+ ---
6
+
1
7
  # Creating or Migrating a Model in DevTools
2
8
 
3
9
  This guide outlines the standard procedure for creating a new model or migrating an existing one to `front_end/models/`.
@@ -48,4 +54,4 @@ The build system does not auto-detect new modules. You must manually register th
48
54
  * **Circular Dependencies:** Occur when internal files import from the directory's own barrel file.
49
55
  * **Missing Tests:** Failing to add the target to `front_end/BUILD.gn` means tests exist but never run.
50
56
  * **Legacy Exports:** Forgetting to remove the class from the old location's `files` or `exports` allows old patterns to persist.
51
- * **Build Errors:** Including the barrel file in `devtools_module` sources causes duplicate definition errors.
57
+ * **Build Errors:** Including the barrel file in `devtools_module` sources causes duplicate definition errors.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: devtools-imports
3
+ description: Conventions for importing code in Devtools to avoid build errors. Covers cross-module imports, internal imports, and the "import * as" requirement.
4
+ ---
5
+
1
6
  # Imports
2
7
 
3
8
  This codebase follows a special convention for importing code that must be followed to avoid build errors.
@@ -16,23 +21,23 @@ Within each module there are multiple TypeScript files. *The file that is named
16
21
 
17
22
  When you want to reuse code from other modules, *you must import that module via its entrypoint*. Imagine we are in `front_end/panels/timeline/TimelinePanel.ts`. This import is GOOD:
18
23
 
19
- ```
24
+ ```ts
20
25
  import * as Trace from '../models/trace/trace.js'; // import the entrypoint
21
26
  ```
22
27
 
23
28
  This import is BAD because we import a file that is NOT the entrypoint:
24
29
 
25
- ```
30
+ ```ts
26
31
  import * as ModelImpl from '../models/trace/ModelImpl.js' // NEVER ALLOWED
27
32
  ```
28
33
 
29
34
  Additionally, you **must import using the `import * as` syntax**.
30
35
 
31
- ```
36
+ ```ts
32
37
  import {ModelImpl, X, Y} from '../models/trace/trace.js'; // BAD
33
38
  ```
34
39
 
35
- ```
40
+ ```ts
36
41
  import * as Trace from '../models/trace/trace.js'; // GOOD
37
42
  ```
38
43
 
@@ -42,6 +47,6 @@ If you are within the same module, it is OK to import from files directly rather
42
47
 
43
48
  For example, if you are editing `front_end/models/trace/ModelImpl.ts` this would be acceptable:
44
49
 
45
- ```
50
+ ```ts
46
51
  import {Foo} from './Foo.js'; // allowed because Foo.ts is in the same directory.
47
52
  ```
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: devtools-module-merging
3
+ description: Workflow for merging a DevTools submodule into its parent module. Covers BUILD.gn consolidation and updating devtools_grd_files.gni.
4
+ ---
5
+
1
6
  # Workflow: Merging a DevTools Submodule into its Parent
2
7
 
3
8
  This document outlines the process for merging a submodule (e.g., `panels/timeline/extensions`) into its parent module (e.g., `panels/timeline`) within the DevTools build system. The goal is to simplify the build configuration by consolidating `BUILD.gn` files while keeping the original source file directory structure.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: devtools-ui-widgets
3
+ description: Guidelines for building UI widgets using the MVP architecture in DevTools. Covers Widget lifecycle, lit-html views, and state management.
4
+ ---
5
+
1
6
  ## UI Widget Framework Guide (MVP Architecture)
2
7
 
3
8
  Adhere strictly to the Model-View-Presenter (MVP) architecture.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: devtools-verification
3
+ description: Guidelines for verifying changes in DevTools. Covers npm test, autoninja build, linting, and using fast builds.
4
+ ---
5
+
1
6
  # Instructions on how to verify your changes
2
7
 
3
8
  ## Testing
@@ -44,7 +44,7 @@ To embed another presenter (`UI.Widget`) in the lit-html template, use `widget(<
44
44
 
45
45
  This will instantiate a `Widget` class with the web component as its `element` and, optionally, will set the properties provided in the second parameter. The widget won’t be re-instantiated on the subsequent template renders, but the properties would be updated. For this to work, the widget needs to accept `HTMLElement` as a sole constructor parameter and properties need to be public members or setters.
46
46
 
47
- For backwards compatibility, the first argument to `widgetConfig` can also be a factory function: `widget(element => new MyWidget(foo, bar, element))`. Similar to the class constructor version, `element` is the actual `<devtools-widget>` so the following two invocations of `widgetConfig` are equivalent: `widget(MyWidget)` and `widget(element => new MyWidget(element))`.
47
+ For backwards compatibility, the first argument to `widget` can also be a factory function: `widget(element => new MyWidget(foo, bar, element))`. Similar to the class constructor version, `element` is the actual `<devtools-widget>` so the following two invocations of `widget` are equivalent: `widget(MyWidget)` and `widget(element => new MyWidget(element))`.
48
48
 
49
49
  ## Styling
50
50
  To prevent style conflicts in widgets without relying on shadow DOM, we use the CSS [`@scope`](https://developer.mozilla.org/en-US/docs/Web/CSS/@scope) at-rule for style encapsulation. This ensures that styles defined for a widget do not leak out and affect other components.
@@ -93,9 +93,9 @@ In this example, the `.title` style will apply within the parent widget but will
93
93
  ## Examples
94
94
 
95
95
  ```html
96
- <devtools-widget .widgetConfig=${widgetConfig(ElementsPanel)}>
96
+ <devtools-widget ${widget(ElementsPanel)}>
97
97
  <devtools-split-view>
98
- <devtools-widget slot="main" .widgetConfig=${widgetConfig(ElementsTree)}></devtools-widget>
98
+ <devtools-widget slot="main" ${widget(ElementsTree)}></devtools-widget>
99
99
  <devtools-tab-pane slot="sidebar">
100
100
  ${widget(StylesPane, {element: input.element})}
101
101
  ${widget(ComputedPane, {element: input.element})}
@@ -1169,12 +1169,12 @@ export const DEFAULT_VIEW = (input, _output, target) => {
1169
1169
  <div>
1170
1170
  <devtools-split-view direction=${this.vertical ? 'column' : 'row'} sidebar-position="first"
1171
1171
  sidebar-initial-size="200">
1172
- <devtools-widget slot="sidebar" .widgetConfig=${widgetConfig(SidebarPanel,
1172
+ <devtools-widget slot="sidebar" ${widget(SidebarPanel,
1173
1173
  {minimumSize: {width: 100, height: 25}})}></devtools-widget>
1174
1174
  <devtools-split-view direction="column" sidebar-position="second" slot="main"
1175
1175
  direction="row" sidebar-position="$this.dockedLeft ? 'second' : 'first'}">
1176
- <devtools-widget slot="main" .widgetConfig=${widgetConfig(UI.Widget.EmptyWidget)}></devtools-widget>
1177
- <devtools-widget slot="sidebar" .widgetConfig=${widgetConfig(DetailsView)}></devtools-widget>
1176
+ <devtools-widget slot="main" ${widget(UI.Widget.EmptyWidget)}></devtools-widget>
1177
+ <devtools-widget slot="sidebar" ${widget(DetailsView)}></devtools-widget>
1178
1178
  </devtools-split-view>
1179
1179
  </devtools-split-view>
1180
1180
  </div>`,
@@ -137,6 +137,8 @@ export enum ClientFeature {
137
137
  CHROME_CONTEXT_SELECTION_AGENT = 25,
138
138
  // Chrome Accessibility Agent
139
139
  CHROME_ACCESSIBILITY_AGENT = 26,
140
+ // Chrome AI Assistance Conversation Summary Agent.
141
+ CHROME_CONVERSATION_SUMMARY_AGENT = 27,
140
142
 
141
143
  // Removed features (for reference).
142
144
  // Chrome AI Assistance Performance Insights Agent.
@@ -0,0 +1,518 @@
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
+ // Reference proto definition
6
+ // google3/google/gca/aicode/v1main/prediction_service.proto
7
+ // revision 45 2026-03-06
8
+
9
+ /**
10
+ * Type contains the list of OpenAPI data types.
11
+ */
12
+ export enum Type {
13
+ TYPE_UNSPECIFIED = 0,
14
+ STRING = 1,
15
+ NUMBER = 2,
16
+ INTEGER = 3,
17
+ BOOLEAN = 4,
18
+ ARRAY = 5,
19
+ OBJECT = 6,
20
+ NULL = 7,
21
+ }
22
+
23
+ /**
24
+ * The category of a rating.
25
+ */
26
+ export enum HarmCategory {
27
+ HARM_CATEGORY_UNSPECIFIED = 0,
28
+ HARM_CATEGORY_HARASSMENT = 7,
29
+ HARM_CATEGORY_HATE_SPEECH = 8,
30
+ HARM_CATEGORY_SEXUALLY_EXPLICIT = 9,
31
+ HARM_CATEGORY_DANGEROUS_CONTENT = 10,
32
+ }
33
+
34
+ /**
35
+ * The probability that a piece of content is harmful.
36
+ */
37
+ export enum HarmProbability {
38
+ HARM_PROBABILITY_UNSPECIFIED = 0,
39
+ NEGLIGIBLE = 1,
40
+ LOW = 2,
41
+ MEDIUM = 3,
42
+ HIGH = 4,
43
+ }
44
+
45
+ /**
46
+ * Block at and beyond a specified harm probability.
47
+ */
48
+ export enum HarmBlockThreshold {
49
+ HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0,
50
+ BLOCK_LOW_AND_ABOVE = 1,
51
+ BLOCK_MEDIUM_AND_ABOVE = 2,
52
+ BLOCK_ONLY_HIGH = 3,
53
+ BLOCK_NONE = 4,
54
+ OFF = 5,
55
+ }
56
+
57
+ export enum HarmBlockMethod {
58
+ HARM_BLOCK_METHOD_UNSPECIFIED = 0,
59
+ SEVERITY = 1,
60
+ PROBABILITY = 2,
61
+ }
62
+
63
+ /**
64
+ * Defines the reason why the model stopped generating tokens.
65
+ */
66
+ export enum FinishReason {
67
+ FINISH_REASON_UNSPECIFIED = 0,
68
+ STOP = 1,
69
+ MAX_TOKENS = 2,
70
+ SAFETY = 3,
71
+ RECITATION = 4,
72
+ OTHER = 5,
73
+ BLOCKLIST = 6,
74
+ PROHIBITED_CONTENT = 7,
75
+ SPII = 8,
76
+ MALFORMED_FUNCTION_CALL = 9,
77
+ IMAGE_SAFETY = 10,
78
+ IMAGE_PROHIBITED_CONTENT = 11,
79
+ IMAGE_RECITATION = 12,
80
+ IMAGE_OTHER = 13,
81
+ UNEXPECTED_TOOL_CALL = 14,
82
+ NO_IMAGE = 15,
83
+ }
84
+
85
+ /**
86
+ * The suggestion method used.
87
+ */
88
+ export enum Method {
89
+ METHOD_UNSPECIFIED = 0,
90
+ GENERATE_CODE = 1,
91
+ COMPLETE_CODE = 2,
92
+ TRANSFORM_CODE = 3,
93
+ CHAT = 4,
94
+ }
95
+
96
+ /**
97
+ * The status of the suggestion received.
98
+ */
99
+ export enum SuggestionStatus {
100
+ STATUS_UNSPECIFIED = 0,
101
+ NO_ERROR = 1,
102
+ ERROR = 2,
103
+ CANCELLED = 3,
104
+ EMPTY = 4,
105
+ }
106
+
107
+ /**
108
+ * The type of interaction.
109
+ */
110
+ export enum InteractionType {
111
+ INTERACTION_TYPE_UNSPECIFIED = 0,
112
+ THUMBS_UP = 1,
113
+ THUMBS_DOWN = 2,
114
+ ACCEPT = 3,
115
+ ACCEPT_PARTIALLY = 4,
116
+ REJECT = 5,
117
+ COPY = 6,
118
+ }
119
+
120
+ export enum InclusionReason {
121
+ INCLUSION_REASON_UNSPECIFIED = 0,
122
+ ACTIVE = 1,
123
+ OPEN = 2,
124
+ RECENTLY_CLOSED = 3,
125
+ RECENTLY_EDITED = 4,
126
+ COLOCATED = 5,
127
+ RELATED = 6,
128
+ USER_SELECTED = 7,
129
+ }
130
+
131
+ /**
132
+ * A list of reasons why content may have been blocked.
133
+ */
134
+ export enum BlockReason {
135
+ BLOCKED_REASON_UNSPECIFIED = 0,
136
+ SAFETY = 1,
137
+ OTHER = 2,
138
+ BLOCKLIST = 3,
139
+ PROHIBITED_CONTENT = 4,
140
+ IMAGE_SAFETY = 5,
141
+ }
142
+
143
+ /**
144
+ * Supported programming languages for the generated code.
145
+ */
146
+ export enum Language {
147
+ LANGUAGE_UNSPECIFIED = 0,
148
+ PYTHON = 1,
149
+ }
150
+
151
+ /**
152
+ * Enumeration of possible outcomes of the code execution.
153
+ */
154
+ export enum Outcome {
155
+ OUTCOME_UNSPECIFIED = 0,
156
+ OUTCOME_OK = 1,
157
+ OUTCOME_FAILED = 2,
158
+ OUTCOME_DEADLINE_EXCEEDED = 3,
159
+ }
160
+
161
+ /**
162
+ * Defines the execution behavior for function calling.
163
+ */
164
+ export enum Mode {
165
+ MODE_UNSPECIFIED = 0,
166
+ AUTO = 1,
167
+ ANY = 2,
168
+ NONE = 3,
169
+ }
170
+
171
+ /* eslint-disable @typescript-eslint/naming-convention */
172
+ export interface GenerateContentRequest {
173
+ model?: string;
174
+ aicode?: AiCodeConfig;
175
+ contents: Content[];
176
+ system_instruction?: Content;
177
+ tools?: Tool[];
178
+ tool_config?: ToolConfig;
179
+ labels?: Record<string, string>;
180
+ safety_settings?: SafetySetting[];
181
+ generation_config?: GenerationConfig;
182
+ session_id?: string;
183
+ }
184
+ /* eslint-enable @typescript-eslint/naming-convention */
185
+
186
+ export interface AiCodeConfig {
187
+ experience: string;
188
+ files?: SourceFile[];
189
+ }
190
+
191
+ /* eslint-disable @typescript-eslint/naming-convention */
192
+ export interface SourceFile {
193
+ inclusion_reason?: InclusionReason[];
194
+ file_uri: string;
195
+ programming_language?: string;
196
+ }
197
+ /* eslint-enable @typescript-eslint/naming-convention */
198
+
199
+ /* eslint-disable @typescript-eslint/naming-convention */
200
+ export interface FileEdit {
201
+ file_uri: string;
202
+ content: string;
203
+ }
204
+ /* eslint-enable @typescript-eslint/naming-convention */
205
+
206
+ export interface Content {
207
+ parts?: Part[];
208
+ role: string;
209
+ }
210
+
211
+ /* eslint-disable @typescript-eslint/naming-convention */
212
+ export interface Part {
213
+ text?: string;
214
+ inline_data?: Blob;
215
+ file_data?: FileData;
216
+ function_call?: FunctionCall;
217
+ function_response?: FunctionResponse;
218
+ executable_code?: ExecutableCode;
219
+ code_execution_result?: CodeExecutionResult;
220
+ video_metadata?: VideoMetadata;
221
+ thought?: boolean;
222
+ thought_signature?: string; // bytes as base64 string
223
+ }
224
+ /* eslint-enable @typescript-eslint/naming-convention */
225
+
226
+ /* eslint-disable @typescript-eslint/naming-convention */
227
+ export interface Blob {
228
+ mime_type: string;
229
+ data: string; // bytes as base64 string
230
+ }
231
+ /* eslint-enable @typescript-eslint/naming-convention */
232
+
233
+ /* eslint-disable @typescript-eslint/naming-convention */
234
+ export interface FileData {
235
+ mime_type: string;
236
+ file_uri: string;
237
+ }
238
+ /* eslint-enable @typescript-eslint/naming-convention */
239
+
240
+ export interface FunctionCall {
241
+ name: string;
242
+ args?: Record<string, unknown>;
243
+ id?: string;
244
+ }
245
+
246
+ export interface FunctionResponse {
247
+ name: string;
248
+ response: Record<string, unknown>;
249
+ id?: string;
250
+ }
251
+
252
+ export interface ExecutableCode {
253
+ language: Language;
254
+ code: string;
255
+ }
256
+
257
+ export interface CodeExecutionResult {
258
+ outcome: Outcome;
259
+ output: string;
260
+ }
261
+
262
+ /* eslint-disable @typescript-eslint/naming-convention */
263
+ export interface Tool {
264
+ function_declarations?: FunctionDeclaration[];
265
+ google_search?: {
266
+ time_range_filter?: {
267
+ start_time?: string, // Timestamp
268
+ end_time?: string, // Timestamp
269
+ },
270
+ };
271
+ }
272
+ /* eslint-enable @typescript-eslint/naming-convention */
273
+
274
+ /* eslint-disable @typescript-eslint/naming-convention */
275
+ export interface FunctionDeclaration {
276
+ name: string;
277
+ description: string;
278
+ parameters?: Schema;
279
+ parameters_json_schema?: unknown; // google.protobuf.Value
280
+ response?: Schema;
281
+ response_json_schema?: unknown; // google.protobuf.Value
282
+ }
283
+ /* eslint-enable @typescript-eslint/naming-convention */
284
+
285
+ /* eslint-disable @typescript-eslint/naming-convention */
286
+ export interface Schema {
287
+ type?: Type;
288
+ format?: string;
289
+ description?: string;
290
+ nullable?: boolean;
291
+ enum?: string[];
292
+ items?: Schema;
293
+ properties?: Record<string, Schema>;
294
+ required?: string[];
295
+ minimum?: number;
296
+ maximum?: number;
297
+ min_length?: number;
298
+ max_length?: number;
299
+ pattern?: string;
300
+ example?: unknown; // google.protobuf.Value
301
+ }
302
+ /* eslint-enable @typescript-eslint/naming-convention */
303
+
304
+ /* eslint-disable @typescript-eslint/naming-convention */
305
+ export interface ToolConfig {
306
+ function_calling_config?: FunctionCallingConfig;
307
+ }
308
+ /* eslint-enable @typescript-eslint/naming-convention */
309
+
310
+ /* eslint-disable @typescript-eslint/naming-convention */
311
+ export interface FunctionCallingConfig {
312
+ mode: Mode;
313
+ allowed_function_names?: string[];
314
+ }
315
+ /* eslint-enable @typescript-eslint/naming-convention */
316
+
317
+ export interface SafetySetting {
318
+ category: HarmCategory;
319
+ threshold: HarmBlockThreshold;
320
+ method?: HarmBlockMethod;
321
+ }
322
+
323
+ /* eslint-disable @typescript-eslint/naming-convention */
324
+ export interface GenerationConfig {
325
+ candidate_count?: number;
326
+ stop_sequences?: string[];
327
+ max_output_tokens?: number;
328
+ temperature?: number;
329
+ top_p?: number;
330
+ top_k?: number;
331
+ seed?: number;
332
+ response_mime_type?: string;
333
+ response_schema?: Schema;
334
+ response_json_schema?: unknown; // google.protobuf.Value
335
+ presence_penalty?: number;
336
+ frequency_penalty?: number;
337
+ thinking_config?: ThinkingConfig;
338
+ }
339
+ /* eslint-enable @typescript-eslint/naming-convention */
340
+
341
+ /* eslint-disable @typescript-eslint/naming-convention */
342
+ export interface ThinkingConfig {
343
+ include_thoughts?: boolean;
344
+ thinking_budget?: number;
345
+ }
346
+ /* eslint-enable @typescript-eslint/naming-convention */
347
+
348
+ /* eslint-disable @typescript-eslint/naming-convention */
349
+ export interface GenerateContentResponse {
350
+ candidates: Candidate[];
351
+ prompt_feedback: PromptFeedback;
352
+ usage_metadata: UsageMetadata;
353
+ model_version: string;
354
+ response_id: string;
355
+ }
356
+ /* eslint-enable @typescript-eslint/naming-convention */
357
+
358
+ /* eslint-disable @typescript-eslint/naming-convention */
359
+ export interface Candidate {
360
+ index: number;
361
+ content: Content;
362
+ finish_reason: FinishReason;
363
+ safety_ratings: SafetyRating[];
364
+ citation_metadata: CitationMetadata;
365
+ grounding_metadata: GroundingMetadata;
366
+ aicode_output: AiCodeOutput;
367
+ }
368
+ /* eslint-enable @typescript-eslint/naming-convention */
369
+
370
+ export interface SafetyRating {
371
+ category: HarmCategory;
372
+ probability: HarmProbability;
373
+ blocked: boolean;
374
+ }
375
+
376
+ export interface CitationMetadata {
377
+ citations: Citation[];
378
+ }
379
+
380
+ /* eslint-disable @typescript-eslint/naming-convention */
381
+ export interface Citation {
382
+ start_index: number;
383
+ end_index: number;
384
+ uri: string;
385
+ license: string;
386
+ }
387
+ /* eslint-enable @typescript-eslint/naming-convention */
388
+
389
+ /* eslint-disable @typescript-eslint/naming-convention */
390
+ export interface GroundingMetadata {
391
+ web_search_queries?: string[];
392
+ search_entry_point?: {
393
+ rendered_content?: string,
394
+ sdk_blob?: string, // bytes as base64 string
395
+ };
396
+ grounding_chunks?: Array<{
397
+ web?: {
398
+ uri?: string,
399
+ title?: string,
400
+ },
401
+ }>;
402
+ grounding_supports?: Array<{
403
+ segment?: {
404
+ part_index?: number,
405
+ start_index?: number,
406
+ end_index?: number,
407
+ text?: string,
408
+ },
409
+ grounding_chunk_indices?: number[],
410
+ confidence_scores?: number[],
411
+ }>;
412
+ retrieval_metadata?: {
413
+ google_search_dynamic_retrieval_score?: number,
414
+ };
415
+ }
416
+ /* eslint-enable @typescript-eslint/naming-convention */
417
+
418
+ export interface AiCodeOutput {
419
+ contents: DerivedContent[];
420
+ }
421
+
422
+ /* eslint-disable @typescript-eslint/naming-convention */
423
+ export interface DerivedContent {
424
+ start_index?: number;
425
+ end_index?: number;
426
+ file?: OutputSourceFile;
427
+ code_block?: CodeBlock;
428
+ text_block?: TextBlock;
429
+ prediction_metadata?: PredictionMetadata;
430
+ }
431
+ /* eslint-enable @typescript-eslint/naming-convention */
432
+
433
+ /* eslint-disable @typescript-eslint/naming-convention */
434
+ export interface OutputSourceFile {
435
+ file_uri: string;
436
+ content: string;
437
+ }
438
+
439
+ /* eslint-disable @typescript-eslint/naming-convention */
440
+ export interface CodeBlock {
441
+ content: string;
442
+ programming_language: string;
443
+ }
444
+ /* eslint-enable @typescript-eslint/naming-convention */
445
+
446
+ export interface TextBlock {
447
+ content: string;
448
+ }
449
+
450
+ /* eslint-disable @typescript-eslint/naming-convention */
451
+ export interface PredictionMetadata {
452
+ score: number;
453
+ classifier_score: number;
454
+ }
455
+
456
+ /* eslint-disable @typescript-eslint/naming-convention */
457
+ export interface PromptFeedback {
458
+ block_reason: BlockReason;
459
+ safety_ratings: SafetyRating[];
460
+ block_reason_message: string;
461
+ }
462
+ /* eslint-enable @typescript-eslint/naming-convention */
463
+
464
+ /* eslint-disable @typescript-eslint/naming-convention */
465
+ export interface UsageMetadata {
466
+ prompt_token_count: number;
467
+ candidates_token_count: number;
468
+ total_token_count: number;
469
+ thoughts_token_count: number;
470
+ cached_content_token_count: number;
471
+ }
472
+ /* eslint-enable @typescript-eslint/naming-convention */
473
+
474
+ /* eslint-disable @typescript-eslint/naming-convention */
475
+ export interface VideoMetadata {
476
+ start_offset?: string; // Duration
477
+ end_offset?: string; // Duration
478
+ fps?: number;
479
+ }
480
+ /* eslint-enable @typescript-eslint/naming-convention */
481
+
482
+ /* eslint-disable @typescript-eslint/naming-convention */
483
+ export interface SendTelemetryRequest {
484
+ feedback_metrics: FeedbackMetric[];
485
+ }
486
+ /* eslint-enable @typescript-eslint/naming-convention */
487
+
488
+ /* eslint-disable @typescript-eslint/naming-convention */
489
+ export interface FeedbackMetric {
490
+ event_time: string; // Timestamp
491
+ response_id: string;
492
+ suggestion_offered?: SuggestionOffered;
493
+ suggestion_interaction?: SuggestionInteraction;
494
+ }
495
+ /* eslint-enable @typescript-eslint/naming-convention */
496
+
497
+ /* eslint-disable @typescript-eslint/naming-convention */
498
+ export interface SuggestionOffered {
499
+ method?: Method;
500
+ status?: SuggestionStatus;
501
+ first_message_latency?: string; // Duration
502
+ response_latency?: string; // Duration
503
+ displayed?: boolean;
504
+ e2e_latency?: string; // Duration
505
+ display_duration?: string; // Duration
506
+ programming_language?: string;
507
+ }
508
+ /* eslint-enable @typescript-eslint/naming-convention */
509
+
510
+ /* eslint-disable @typescript-eslint/naming-convention */
511
+ export interface SuggestionInteraction {
512
+ interaction?: InteractionType;
513
+ accepted_lines?: number;
514
+ accepted_characters?: number;
515
+ accepted_comment_lines?: number;
516
+ candidate_index?: number;
517
+ }
518
+ /* eslint-enable @typescript-eslint/naming-convention */
@@ -818,7 +818,6 @@ export enum DevtoolsExperiments {
818
818
  'show-option-to-expose-internals-in-heap-snapshot' = 18,
819
819
  'timeline-invalidation-tracking' = 26,
820
820
  'timeline-show-all-events' = 27,
821
- 'timeline-v8-runtime-call-stats' = 28,
822
821
  apca = 39,
823
822
  'font-editor' = 41,
824
823
  'full-accessibility-tree' = 42,
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as AidaClient from './AidaClient.js';
6
6
  import * as DispatchHttpRequestClient from './DispatchHttpRequestClient.js';
7
+ import * as GcaTypes from './GcaTypes.js';
7
8
  import * as GdpClient from './GdpClient.js';
8
9
  import * as InspectorFrontendHost from './InspectorFrontendHost.js';
9
10
  import * as InspectorFrontendHostAPI from './InspectorFrontendHostAPI.js';
@@ -14,6 +15,7 @@ import * as UserMetrics from './UserMetrics.js';
14
15
  export {
15
16
  AidaClient,
16
17
  DispatchHttpRequestClient,
18
+ GcaTypes,
17
19
  GdpClient,
18
20
  InspectorFrontendHost,
19
21
  InspectorFrontendHostAPI,