forked from ChromeDevTools/chrome-devtools-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
65 lines (57 loc) · 1.37 KB
/
types.ts
File metadata and controls
65 lines (57 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type {
SerializedAXNode,
Viewport,
Target,
Protocol,
} from './third_party/index.js';
export interface ExtensionServiceWorker {
url: string;
target: Target;
id: string;
}
export interface TextSnapshotNode extends SerializedAXNode {
id: string;
backendNodeId?: number;
loaderId?: string;
children: TextSnapshotNode[];
}
export interface GeolocationOptions {
latitude: number;
longitude: number;
}
export interface TextSnapshot {
root: TextSnapshotNode;
idToNode: Map<string, TextSnapshotNode>;
snapshotId: string;
selectedElementUid?: string;
// It might happen that there is a selected element, but it is not part of the
// snapshot. This flag indicates if there is any selected element.
hasSelectedElement: boolean;
verbose: boolean;
}
export interface EmulationSettings {
networkConditions?: string;
cpuThrottlingRate?: number;
geolocation?: GeolocationOptions;
userAgent?: string;
colorScheme?: 'dark' | 'light';
viewport?: Viewport;
}
export interface WebMcpAnnotation {
readOnly?: boolean;
autosubmit?: boolean;
}
export interface WebMcpTool {
name: string;
description: string;
inputSchema?: object;
annotations?: WebMcpAnnotation;
frameId: string;
backendNodeId?: number;
stackTrace?: Protocol.Runtime.StackTrace;
}