-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathtypes.ts
More file actions
81 lines (69 loc) · 1.65 KB
/
types.ts
File metadata and controls
81 lines (69 loc) · 1.65 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Protobuf message interfaces
export interface ChromeDevToolsMcpExtension {
os_type?: OsType;
mcp_client?: McpClient;
app_version?: string;
session_id?: string;
tool_invocation?: ToolInvocation;
server_start?: ServerStart;
daily_active?: DailyActive;
server_shutdown?: ServerShutdown;
}
export type ServerShutdown = Record<string, never>;
export interface ToolInvocation {
tool_name: string;
success: boolean;
latency_ms: number;
}
export interface ServerStart {
flag_usage?: FlagUsage;
}
export interface DailyActive {
days_since_last_active: number;
}
export type FlagUsage = Record<string, boolean | string | number | undefined>;
// Clearcut API interfaces
export interface LogRequest {
log_source: number;
request_time_ms: string;
client_info: {
client_type: number;
};
log_event: Array<{
event_time_ms: string;
source_extension_json: string;
}>;
}
// Enums
export enum OsType {
OS_TYPE_UNSPECIFIED = 0,
OS_TYPE_WINDOWS = 1,
OS_TYPE_MACOS = 2,
OS_TYPE_LINUX = 3,
}
export enum ChromeChannel {
CHROME_CHANNEL_UNSPECIFIED = 0,
CHROME_CHANNEL_CANARY = 1,
CHROME_CHANNEL_DEV = 2,
CHROME_CHANNEL_BETA = 3,
CHROME_CHANNEL_STABLE = 4,
}
export enum McpClient {
MCP_CLIENT_UNSPECIFIED = 0,
MCP_CLIENT_CLAUDE_CODE = 1,
MCP_CLIENT_GEMINI_CLI = 2,
}
// IPC types for messages between the main process and the
// telemetry watchdog process.
export enum WatchdogMessageType {
LOG_EVENT = 'log-event',
}
export interface WatchdogMessage {
type: WatchdogMessageType.LOG_EVENT;
payload: ChromeDevToolsMcpExtension;
}