💬 Commit message: Update 2026-02-11 12:18:05, 14 files, 1838 lines
📁 Files changed: 14 📝 Lines changed: 1838 • CLAUDE.md • README.md • TODO.md • browser.d.ts • browser.d.ts.map • browser.js • browser.js.map • mcp.js • mcp.js.map • types.d.ts • types.d.ts.map • browser.ts • mcp.ts • types.ts
This commit is contained in:
Vendored
+128
-1
@@ -142,7 +142,114 @@ export interface InterceptCommand {
|
||||
contentType?: string;
|
||||
};
|
||||
}
|
||||
export type BrowserCommand = GotoCommand | ClickCommand | TypeCommand | QueryCommand | ScreenshotCommand | UrlCommand | HtmlCommand | BackCommand | ForwardCommand | ReloadCommand | WaitCommand | NewPageCommand | CloseCommand | EvalCommand | FaviconCommand | ConvertCommand | ResizeCommand | CropCommand | CompressCommand | ThumbnailCommand | ConsoleCommand | NetworkCommand | InterceptCommand;
|
||||
export interface PageError {
|
||||
message: string;
|
||||
stack?: string;
|
||||
timestamp: number;
|
||||
}
|
||||
export interface ErrorsCommand {
|
||||
cmd: 'errors';
|
||||
clear?: boolean;
|
||||
}
|
||||
export interface MetricsData {
|
||||
timing: {
|
||||
domContentLoaded?: number;
|
||||
load?: number;
|
||||
firstPaint?: number;
|
||||
firstContentfulPaint?: number;
|
||||
};
|
||||
dom: {
|
||||
nodes: number;
|
||||
scripts: number;
|
||||
stylesheets: number;
|
||||
images: number;
|
||||
};
|
||||
resources?: Array<{
|
||||
name: string;
|
||||
type: string;
|
||||
duration: number;
|
||||
size: number;
|
||||
}>;
|
||||
}
|
||||
export interface MetricsCommand {
|
||||
cmd: 'metrics';
|
||||
resources?: boolean;
|
||||
}
|
||||
export interface A11yNode {
|
||||
role: string;
|
||||
name?: string;
|
||||
value?: string;
|
||||
description?: string;
|
||||
children?: A11yNode[];
|
||||
}
|
||||
export interface A11yCommand {
|
||||
cmd: 'a11y';
|
||||
selector?: string;
|
||||
}
|
||||
export interface DialogEntry {
|
||||
type: 'alert' | 'confirm' | 'prompt' | 'beforeunload';
|
||||
message: string;
|
||||
defaultValue?: string;
|
||||
response?: string | boolean;
|
||||
timestamp: number;
|
||||
}
|
||||
export interface DialogCommand {
|
||||
cmd: 'dialog';
|
||||
action: 'status' | 'accept' | 'dismiss' | 'config';
|
||||
text?: string;
|
||||
autoAccept?: boolean;
|
||||
autoDismiss?: boolean;
|
||||
}
|
||||
export interface CookiesCommand {
|
||||
cmd: 'cookies';
|
||||
action: 'get' | 'set' | 'delete' | 'clear';
|
||||
name?: string;
|
||||
value?: string;
|
||||
domain?: string;
|
||||
path?: string;
|
||||
url?: string;
|
||||
}
|
||||
export interface StorageCommand {
|
||||
cmd: 'storage';
|
||||
type: 'local' | 'session';
|
||||
action: 'get' | 'set' | 'delete' | 'clear';
|
||||
key?: string;
|
||||
value?: string;
|
||||
}
|
||||
export interface HoverCommand {
|
||||
cmd: 'hover';
|
||||
selector: string;
|
||||
}
|
||||
export interface SelectCommand {
|
||||
cmd: 'select';
|
||||
selector: string;
|
||||
value: string | string[];
|
||||
}
|
||||
export interface KeysCommand {
|
||||
cmd: 'keys';
|
||||
keys: string;
|
||||
}
|
||||
export interface UploadCommand {
|
||||
cmd: 'upload';
|
||||
selector: string;
|
||||
files: string[];
|
||||
}
|
||||
export interface ScrollCommand {
|
||||
cmd: 'scroll';
|
||||
selector?: string;
|
||||
x?: number;
|
||||
y?: number;
|
||||
}
|
||||
export interface ViewportCommand {
|
||||
cmd: 'viewport';
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export interface EmulateCommand {
|
||||
cmd: 'emulate';
|
||||
device: string;
|
||||
}
|
||||
export type BrowserCommand = GotoCommand | ClickCommand | TypeCommand | QueryCommand | ScreenshotCommand | UrlCommand | HtmlCommand | BackCommand | ForwardCommand | ReloadCommand | WaitCommand | NewPageCommand | CloseCommand | EvalCommand | FaviconCommand | ConvertCommand | ResizeCommand | CropCommand | CompressCommand | ThumbnailCommand | ConsoleCommand | NetworkCommand | InterceptCommand | ErrorsCommand | MetricsCommand | A11yCommand | DialogCommand | CookiesCommand | StorageCommand | HoverCommand | SelectCommand | KeysCommand | UploadCommand | ScrollCommand | ViewportCommand | EmulateCommand;
|
||||
export interface SuccessResponse {
|
||||
ok: true;
|
||||
url?: string;
|
||||
@@ -161,6 +268,26 @@ export interface SuccessResponse {
|
||||
messages?: ConsoleMessage[];
|
||||
requests?: NetworkEntry[];
|
||||
patterns?: string[];
|
||||
errors?: PageError[];
|
||||
metrics?: MetricsData;
|
||||
a11y?: A11yNode;
|
||||
dialogs?: DialogEntry[];
|
||||
dialogConfig?: {
|
||||
autoAccept: boolean;
|
||||
autoDismiss: boolean;
|
||||
};
|
||||
cookies?: Array<{
|
||||
name: string;
|
||||
value: string;
|
||||
domain: string;
|
||||
path: string;
|
||||
}>;
|
||||
storage?: Record<string, string>;
|
||||
viewport?: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
selected?: string[];
|
||||
}
|
||||
export interface ErrorResponse {
|
||||
ok: false;
|
||||
|
||||
Reference in New Issue
Block a user