@puberty-labs/clits
Version:
CLiTS (Chrome Logging and Inspection Tool Suite) is a powerful Node.js library for AI-controlled Chrome browser automation, testing, and inspection. Features enhanced CSS selector support (:contains(), XPath), dry-run mode, element discovery tools, and co
42 lines (41 loc) • 1.16 kB
TypeScript
export interface AIErrorResponse {
success: false;
error: {
code: string;
message: string;
category: 'AUTOMATION' | 'NETWORK' | 'SYSTEM' | 'AUTH';
severity: 'ERROR' | 'WARNING' | 'INFO';
context: {
command: string;
[key: string]: any;
};
recovery_suggestions: string[];
requires_human_intervention: boolean;
};
}
export interface AISuccessResponse {
success: true;
data?: any;
metadata?: {
version: string;
platform: string;
timestamp: string;
};
}
export type AIResponse = AIErrorResponse | AISuccessResponse;
export declare class AIErrorHandler {
private static instance;
private jsonErrorsEnabled;
private constructor();
static getInstance(): AIErrorHandler;
enableJsonErrors(): void;
disableJsonErrors(): void;
handleError(error: Error | string, context: {
command: string;
[key: string]: any;
}, traditionalMessage?: string): void;
handleSuccess(data?: any): void;
private categorizeError;
private createAIErrorResponse;
private getCommandPrefix;
}