error-intelligence-tools.d.ts•6.18 kB
/**
* Error Intelligence Tools
* Advanced error analysis and debugging tools for WebSee MCP Server
*
* @module error-intelligence-tools
*/
import { z } from 'zod';
import { Page } from 'playwright';
export declare const ErrorResolveStackSchema: z.ZodObject<{
url: z.ZodString;
errorStack: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
errorStack?: string;
}, {
url?: string;
errorStack?: string;
}>;
export declare const ErrorGetContextSchema: z.ZodObject<{
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
}, {
url?: string;
}>;
export declare const ErrorTraceCauseSchema: z.ZodObject<{
url: z.ZodString;
errorMessage: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
errorMessage?: string;
}, {
url?: string;
errorMessage?: string;
}>;
export declare const ErrorGetSimilarSchema: z.ZodObject<{
url: z.ZodString;
errorMessage: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
errorMessage?: string;
}, {
url?: string;
errorMessage?: string;
}>;
export interface ResolvedStackFrame {
original: string;
resolved?: {
file: string;
line: number;
column: number;
content?: string;
};
}
export interface ErrorContext {
errors: Array<{
type: string;
message: string;
timestamp: number;
location?: string;
}>;
warnings: Array<{
type: string;
message: string;
timestamp: number;
location?: string;
}>;
components: Array<{
name: string;
framework: string;
state?: Record<string, any>;
props?: Record<string, any>;
}>;
network: Array<{
url: string;
method: string;
status?: number;
duration?: number;
timestamp: number;
}>;
}
export interface RootCauseAnalysis {
rootCause: string;
confidence: 'high' | 'medium' | 'low';
stackTrace: ResolvedStackFrame[];
relatedErrors: Array<{
message: string;
timestamp: number;
correlation: number;
}>;
recommendations: string[];
}
export interface SimilarError {
message: string;
count: number;
firstSeen: number;
lastSeen: number;
stackTrace?: string;
pattern: string;
}
/**
* Resolve minified error stack traces to original source locations
*/
export declare function errorResolveStack(page: Page, params: z.infer<typeof ErrorResolveStackSchema>): Promise<{
original: string[];
resolved: ResolvedStackFrame[];
message: string;
}>;
/**
* Get comprehensive error context including console, network, and component state
*/
export declare function errorGetContext(page: Page, params: z.infer<typeof ErrorGetContextSchema>): Promise<ErrorContext>;
/**
* Trace an error to its root cause with AI-powered analysis
*/
export declare function errorTraceCause(page: Page, params: z.infer<typeof ErrorTraceCauseSchema>): Promise<RootCauseAnalysis>;
/**
* Find similar errors in the error timeline
*/
export declare function errorGetSimilar(page: Page, params: z.infer<typeof ErrorGetSimilarSchema>): Promise<{
similar: SimilarError[];
}>;
export declare const errorIntelligenceTools: {
error_resolve_stack: {
name: string;
description: string;
inputSchema: {
type: string;
properties: {
url: {
type: string;
description: string;
};
errorStack: {
type: string;
description: string;
};
};
required: string[];
};
handler: typeof errorResolveStack;
schema: z.ZodObject<{
url: z.ZodString;
errorStack: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
errorStack?: string;
}, {
url?: string;
errorStack?: string;
}>;
};
error_get_context: {
name: string;
description: string;
inputSchema: {
type: string;
properties: {
url: {
type: string;
description: string;
};
};
required: string[];
};
handler: typeof errorGetContext;
schema: z.ZodObject<{
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
}, {
url?: string;
}>;
};
error_trace_cause: {
name: string;
description: string;
inputSchema: {
type: string;
properties: {
url: {
type: string;
description: string;
};
errorMessage: {
type: string;
description: string;
};
};
required: string[];
};
handler: typeof errorTraceCause;
schema: z.ZodObject<{
url: z.ZodString;
errorMessage: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
errorMessage?: string;
}, {
url?: string;
errorMessage?: string;
}>;
};
error_get_similar: {
name: string;
description: string;
inputSchema: {
type: string;
properties: {
url: {
type: string;
description: string;
};
errorMessage: {
type: string;
description: string;
};
};
required: string[];
};
handler: typeof errorGetSimilar;
schema: z.ZodObject<{
url: z.ZodString;
errorMessage: z.ZodString;
}, "strip", z.ZodTypeAny, {
url?: string;
errorMessage?: string;
}, {
url?: string;
errorMessage?: string;
}>;
};
};
//# sourceMappingURL=error-intelligence-tools.d.ts.map