devtools-protocol 0.0.1602427 → 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.
|
@@ -31418,6 +31418,16 @@
|
|
|
31418
31418
|
}
|
|
31419
31419
|
]
|
|
31420
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
|
+
},
|
|
31421
31431
|
{
|
|
31422
31432
|
"id": "Tool",
|
|
31423
31433
|
"description": "Definition of a tool that can be invoked.",
|
|
@@ -31499,6 +31509,66 @@
|
|
|
31499
31509
|
}
|
|
31500
31510
|
}
|
|
31501
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
|
+
]
|
|
31502
31572
|
}
|
|
31503
31573
|
]
|
|
31504
31574
|
}
|
package/package.json
CHANGED
package/pdl/domains/WebMCP.pdl
CHANGED
|
@@ -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
|
|
package/types/protocol.d.ts
CHANGED
|
@@ -22348,6 +22348,11 @@ export namespace Protocol {
|
|
|
22348
22348
|
autosubmit?: boolean;
|
|
22349
22349
|
}
|
|
22350
22350
|
|
|
22351
|
+
/**
|
|
22352
|
+
* Represents the status of a tool invocation.
|
|
22353
|
+
*/
|
|
22354
|
+
export type InvocationStatus = ('Success' | 'Canceled' | 'Error');
|
|
22355
|
+
|
|
22351
22356
|
/**
|
|
22352
22357
|
* Definition of a tool that can be invoked.
|
|
22353
22358
|
*/
|
|
@@ -22401,6 +22406,54 @@ export namespace Protocol {
|
|
|
22401
22406
|
*/
|
|
22402
22407
|
tools: Tool[];
|
|
22403
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
|
+
}
|
|
22404
22457
|
}
|
|
22405
22458
|
}
|
|
22406
22459
|
|