devtools-protocol 0.0.1601756 → 0.0.1603894

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.
@@ -6928,7 +6928,8 @@
6928
6928
  "domain": "DOM",
6929
6929
  "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object\nthat has an `id`. This `id` can be used to get additional information on the Node, resolve it into\nthe JavaScript object wrapper, etc. It is important that client receives DOM events only for the\nnodes that are known to the client. Backend keeps track of the nodes that were sent to the client\nand never sends the same node twice. It is client's responsibility to collect information about\nthe nodes that were sent to the client. Note that `iframe` owner elements will return\ncorresponding document elements as their child nodes.",
6930
6930
  "dependencies": [
6931
- "Runtime"
6931
+ "Runtime",
6932
+ "Network"
6932
6933
  ],
6933
6934
  "types": [
6934
6935
  {
@@ -7285,10 +7286,10 @@
7285
7286
  }
7286
7287
  },
7287
7288
  {
7288
- "name": "isAdRelated",
7289
+ "name": "adProvenance",
7289
7290
  "experimental": true,
7290
7291
  "optional": true,
7291
- "type": "boolean"
7292
+ "$ref": "Network.AdProvenance"
7292
7293
  }
7293
7294
  ]
7294
7295
  },
@@ -8854,9 +8855,10 @@
8854
8855
  "$ref": "DOM.NodeId"
8855
8856
  },
8856
8857
  {
8857
- "name": "isAdRelated",
8858
- "description": "If the node is ad related.",
8859
- "type": "boolean"
8858
+ "name": "adProvenance",
8859
+ "description": "The provenance of the ad related node, if it is ad related.",
8860
+ "optional": true,
8861
+ "$ref": "Network.AdProvenance"
8860
8862
  }
8861
8863
  ]
8862
8864
  },
@@ -17297,6 +17299,26 @@
17297
17299
  }
17298
17300
  ]
17299
17301
  },
17302
+ {
17303
+ "id": "AdProvenance",
17304
+ "description": "Represents the provenance of an ad resource or element. Only one of\n`filterlistRule` or `adScriptAncestry` can be set. If `filterlistRule`\nis provided, the resource URL directly matches a filter list rule. If\n`adScriptAncestry` is provided, an ad script initiated the resource fetch or\nappended the element to the DOM. If neither is provided, the entity is\nknown to be an ad, but provenance tracking information is unavailable.",
17305
+ "experimental": true,
17306
+ "type": "object",
17307
+ "properties": [
17308
+ {
17309
+ "name": "filterlistRule",
17310
+ "description": "The filterlist rule that matched, if any.",
17311
+ "optional": true,
17312
+ "type": "string"
17313
+ },
17314
+ {
17315
+ "name": "adScriptAncestry",
17316
+ "description": "The script ancestry that created the ad, if any.",
17317
+ "optional": true,
17318
+ "$ref": "AdAncestry"
17319
+ }
17320
+ ]
17321
+ },
17300
17322
  {
17301
17323
  "id": "CrossOriginOpenerPolicyValue",
17302
17324
  "experimental": true,
@@ -31396,6 +31418,16 @@
31396
31418
  }
31397
31419
  ]
31398
31420
  },
31421
+ {
31422
+ "id": "InvocationStatus",
31423
+ "description": "Represents the status of a tool invocation.",
31424
+ "type": "string",
31425
+ "enum": [
31426
+ "Success",
31427
+ "Canceled",
31428
+ "Error"
31429
+ ]
31430
+ },
31399
31431
  {
31400
31432
  "id": "Tool",
31401
31433
  "description": "Definition of a tool that can be invoked.",
@@ -31477,6 +31509,66 @@
31477
31509
  }
31478
31510
  }
31479
31511
  ]
31512
+ },
31513
+ {
31514
+ "name": "toolInvoked",
31515
+ "description": "Event fired when a tool invocation starts.",
31516
+ "parameters": [
31517
+ {
31518
+ "name": "toolName",
31519
+ "description": "Name of the tool to invoke.",
31520
+ "type": "string"
31521
+ },
31522
+ {
31523
+ "name": "frameId",
31524
+ "description": "Frame id",
31525
+ "$ref": "Page.FrameId"
31526
+ },
31527
+ {
31528
+ "name": "invocationId",
31529
+ "description": "Invocation identifier.",
31530
+ "type": "string"
31531
+ },
31532
+ {
31533
+ "name": "input",
31534
+ "description": "The input parameters used for the invocation.",
31535
+ "type": "string"
31536
+ }
31537
+ ]
31538
+ },
31539
+ {
31540
+ "name": "toolResponded",
31541
+ "description": "Event fired when a tool invocation completes or fails.",
31542
+ "parameters": [
31543
+ {
31544
+ "name": "invocationId",
31545
+ "description": "Invocation identifier.",
31546
+ "type": "string"
31547
+ },
31548
+ {
31549
+ "name": "status",
31550
+ "description": "Status of the invocation.",
31551
+ "$ref": "InvocationStatus"
31552
+ },
31553
+ {
31554
+ "name": "output",
31555
+ "description": "Output or error delivered as delivered to the agent. Missing if `status` is anything other than Success.",
31556
+ "optional": true,
31557
+ "type": "object"
31558
+ },
31559
+ {
31560
+ "name": "errorText",
31561
+ "description": "Error text for protocol users.",
31562
+ "optional": true,
31563
+ "type": "string"
31564
+ },
31565
+ {
31566
+ "name": "exception",
31567
+ "description": "The exception object, if the javascript tool threw an error>",
31568
+ "optional": true,
31569
+ "$ref": "Runtime.RemoteObject"
31570
+ }
31571
+ ]
31480
31572
  }
31481
31573
  ]
31482
31574
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devtools-protocol",
3
- "version": "0.0.1601756",
3
+ "version": "0.0.1603894",
4
4
  "description": "The Chrome DevTools Protocol JSON",
5
5
  "repository": "https://github.com/ChromeDevTools/devtools-protocol",
6
6
  "author": "The Chromium Authors",
@@ -13,6 +13,7 @@
13
13
  # corresponding document elements as their child nodes.
14
14
  domain DOM
15
15
  depends on Runtime
16
+ depends on Network
16
17
 
17
18
  # Unique DOM node identifier.
18
19
  type NodeId extends integer
@@ -184,7 +185,7 @@ domain DOM
184
185
  experimental optional boolean isScrollable
185
186
  experimental optional boolean affectedByStartingStyles
186
187
  experimental optional array of StyleSheetId adoptedStyleSheets
187
- experimental optional boolean isAdRelated
188
+ experimental optional Network.AdProvenance adProvenance
188
189
 
189
190
  # A structure to hold the top-level node of a detached tree and an array of its retained descendants.
190
191
  type DetachedElementInfo extends object
@@ -919,8 +920,8 @@ domain DOM
919
920
  parameters
920
921
  # The id of the node.
921
922
  DOM.NodeId nodeId
922
- # If the node is ad related.
923
- boolean isAdRelated
923
+ # The provenance of the ad related node, if it is ad related.
924
+ optional Network.AdProvenance adProvenance
924
925
 
925
926
  # Fired when a node's starting styles changes.
926
927
  experimental event affectedByStartingStylesFlagUpdated
@@ -1825,6 +1825,19 @@ domain Network
1825
1825
  # `ancestryChain` to be tagged as an ad.
1826
1826
  optional string rootScriptFilterlistRule
1827
1827
 
1828
+ # Represents the provenance of an ad resource or element. Only one of
1829
+ # `filterlistRule` or `adScriptAncestry` can be set. If `filterlistRule`
1830
+ # is provided, the resource URL directly matches a filter list rule. If
1831
+ # `adScriptAncestry` is provided, an ad script initiated the resource fetch or
1832
+ # appended the element to the DOM. If neither is provided, the entity is
1833
+ # known to be an ad, but provenance tracking information is unavailable.
1834
+ experimental type AdProvenance extends object
1835
+ properties
1836
+ # The filterlist rule that matched, if any.
1837
+ optional string filterlistRule
1838
+ # The script ancestry that created the ad, if any.
1839
+ optional AdAncestry adScriptAncestry
1840
+
1828
1841
  # Fired when additional information about a requestWillBeSent event is available from the
1829
1842
  # network stack. Not every requestWillBeSent event will have an additional
1830
1843
  # requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
@@ -11,12 +11,20 @@ experimental domain WebMCP
11
11
 
12
12
  # Tool annotations
13
13
  type Annotation extends object
14
+
14
15
  properties
15
16
  # A hint indicating that the tool does not modify any state.
16
17
  optional boolean readOnly
17
18
  # If the declarative tool was declared with the autosubmit attribute.
18
19
  optional boolean autosubmit
19
20
 
21
+ # Represents the status of a tool invocation.
22
+ type InvocationStatus extends string
23
+ enum
24
+ Success
25
+ Canceled
26
+ Error
27
+
20
28
  # Definition of a tool that can be invoked.
21
29
  type Tool extends object
22
30
  properties
@@ -51,3 +59,30 @@ experimental domain WebMCP
51
59
  parameters
52
60
  # Array of tools that were removed.
53
61
  array of Tool tools
62
+
63
+ # Event fired when a tool invocation starts.
64
+ event toolInvoked
65
+ parameters
66
+ # Name of the tool to invoke.
67
+ string toolName
68
+ # Frame id
69
+ Page.FrameId frameId
70
+ # Invocation identifier.
71
+ string invocationId
72
+ # The input parameters used for the invocation.
73
+ string input
74
+
75
+ # Event fired when a tool invocation completes or fails.
76
+ event toolResponded
77
+ parameters
78
+ # Invocation identifier.
79
+ string invocationId
80
+ # Status of the invocation.
81
+ InvocationStatus status
82
+ # Output or error delivered as delivered to the agent. Missing if `status` is anything other than Success.
83
+ optional object output
84
+ # Error text for protocol users.
85
+ optional string errorText
86
+ # The exception object, if the javascript tool threw an error>
87
+ optional Runtime.RemoteObject exception
88
+
@@ -1122,6 +1122,14 @@ export namespace ProtocolMapping {
1122
1122
  * Event fired when tools are removed.
1123
1123
  */
1124
1124
  'WebMCP.toolsRemoved': [Protocol.WebMCP.ToolsRemovedEvent];
1125
+ /**
1126
+ * Event fired when a tool invocation starts.
1127
+ */
1128
+ 'WebMCP.toolInvoked': [Protocol.WebMCP.ToolInvokedEvent];
1129
+ /**
1130
+ * Event fired when a tool invocation completes or fails.
1131
+ */
1132
+ 'WebMCP.toolResponded': [Protocol.WebMCP.ToolRespondedEvent];
1125
1133
  }
1126
1134
 
1127
1135
  export interface Commands {
@@ -5515,6 +5515,16 @@ export namespace ProtocolProxyApi {
5515
5515
  */
5516
5516
  on(event: 'toolsRemoved', listener: (params: Protocol.WebMCP.ToolsRemovedEvent) => void): void;
5517
5517
 
5518
+ /**
5519
+ * Event fired when a tool invocation starts.
5520
+ */
5521
+ on(event: 'toolInvoked', listener: (params: Protocol.WebMCP.ToolInvokedEvent) => void): void;
5522
+
5523
+ /**
5524
+ * Event fired when a tool invocation completes or fails.
5525
+ */
5526
+ on(event: 'toolResponded', listener: (params: Protocol.WebMCP.ToolRespondedEvent) => void): void;
5527
+
5518
5528
  }
5519
5529
  }
5520
5530
 
@@ -5993,6 +5993,20 @@ export namespace ProtocolTestsProxyApi {
5993
5993
  offToolsRemoved(listener: (event: { params: Protocol.WebMCP.ToolsRemovedEvent }) => void): void;
5994
5994
  onceToolsRemoved(eventMatcher?: (event: { params: Protocol.WebMCP.ToolsRemovedEvent }) => boolean): Promise<{ params: Protocol.WebMCP.ToolsRemovedEvent }>;
5995
5995
 
5996
+ /**
5997
+ * Event fired when a tool invocation starts.
5998
+ */
5999
+ onToolInvoked(listener: (event: { params: Protocol.WebMCP.ToolInvokedEvent }) => void): void;
6000
+ offToolInvoked(listener: (event: { params: Protocol.WebMCP.ToolInvokedEvent }) => void): void;
6001
+ onceToolInvoked(eventMatcher?: (event: { params: Protocol.WebMCP.ToolInvokedEvent }) => boolean): Promise<{ params: Protocol.WebMCP.ToolInvokedEvent }>;
6002
+
6003
+ /**
6004
+ * Event fired when a tool invocation completes or fails.
6005
+ */
6006
+ onToolResponded(listener: (event: { params: Protocol.WebMCP.ToolRespondedEvent }) => void): void;
6007
+ offToolResponded(listener: (event: { params: Protocol.WebMCP.ToolRespondedEvent }) => void): void;
6008
+ onceToolResponded(eventMatcher?: (event: { params: Protocol.WebMCP.ToolRespondedEvent }) => boolean): Promise<{ params: Protocol.WebMCP.ToolRespondedEvent }>;
6009
+
5996
6010
  }
5997
6011
  }
5998
6012
 
@@ -7062,7 +7062,7 @@ export namespace Protocol {
7062
7062
  /**
7063
7063
  * @experimental
7064
7064
  */
7065
- isAdRelated?: boolean;
7065
+ adProvenance?: Network.AdProvenance;
7066
7066
  }
7067
7067
 
7068
7068
  /**
@@ -8138,9 +8138,9 @@ export namespace Protocol {
8138
8138
  */
8139
8139
  nodeId: DOM.NodeId;
8140
8140
  /**
8141
- * If the node is ad related.
8141
+ * The provenance of the ad related node, if it is ad related.
8142
8142
  */
8143
- isAdRelated: boolean;
8143
+ adProvenance?: Network.AdProvenance;
8144
8144
  }
8145
8145
 
8146
8146
  /**
@@ -13687,6 +13687,26 @@ export namespace Protocol {
13687
13687
  rootScriptFilterlistRule?: string;
13688
13688
  }
13689
13689
 
13690
+ /**
13691
+ * Represents the provenance of an ad resource or element. Only one of
13692
+ * `filterlistRule` or `adScriptAncestry` can be set. If `filterlistRule`
13693
+ * is provided, the resource URL directly matches a filter list rule. If
13694
+ * `adScriptAncestry` is provided, an ad script initiated the resource fetch or
13695
+ * appended the element to the DOM. If neither is provided, the entity is
13696
+ * known to be an ad, but provenance tracking information is unavailable.
13697
+ * @experimental
13698
+ */
13699
+ export interface AdProvenance {
13700
+ /**
13701
+ * The filterlist rule that matched, if any.
13702
+ */
13703
+ filterlistRule?: string;
13704
+ /**
13705
+ * The script ancestry that created the ad, if any.
13706
+ */
13707
+ adScriptAncestry?: AdAncestry;
13708
+ }
13709
+
13690
13710
  /**
13691
13711
  * @experimental
13692
13712
  */
@@ -22328,6 +22348,11 @@ export namespace Protocol {
22328
22348
  autosubmit?: boolean;
22329
22349
  }
22330
22350
 
22351
+ /**
22352
+ * Represents the status of a tool invocation.
22353
+ */
22354
+ export type InvocationStatus = ('Success' | 'Canceled' | 'Error');
22355
+
22331
22356
  /**
22332
22357
  * Definition of a tool that can be invoked.
22333
22358
  */
@@ -22381,6 +22406,54 @@ export namespace Protocol {
22381
22406
  */
22382
22407
  tools: Tool[];
22383
22408
  }
22409
+
22410
+ /**
22411
+ * Event fired when a tool invocation starts.
22412
+ */
22413
+ export interface ToolInvokedEvent {
22414
+ /**
22415
+ * Name of the tool to invoke.
22416
+ */
22417
+ toolName: string;
22418
+ /**
22419
+ * Frame id
22420
+ */
22421
+ frameId: Page.FrameId;
22422
+ /**
22423
+ * Invocation identifier.
22424
+ */
22425
+ invocationId: string;
22426
+ /**
22427
+ * The input parameters used for the invocation.
22428
+ */
22429
+ input: string;
22430
+ }
22431
+
22432
+ /**
22433
+ * Event fired when a tool invocation completes or fails.
22434
+ */
22435
+ export interface ToolRespondedEvent {
22436
+ /**
22437
+ * Invocation identifier.
22438
+ */
22439
+ invocationId: string;
22440
+ /**
22441
+ * Status of the invocation.
22442
+ */
22443
+ status: InvocationStatus;
22444
+ /**
22445
+ * Output or error delivered as delivered to the agent. Missing if `status` is anything other than Success.
22446
+ */
22447
+ output?: any;
22448
+ /**
22449
+ * Error text for protocol users.
22450
+ */
22451
+ errorText?: string;
22452
+ /**
22453
+ * The exception object, if the javascript tool threw an error>
22454
+ */
22455
+ exception?: Runtime.RemoteObject;
22456
+ }
22384
22457
  }
22385
22458
  }
22386
22459