route-claudecode
Version:
Advanced routing and transformation system for Claude Code outputs to multiple AI providers
52 lines • 2.93 kB
TypeScript
/**
* 临时日志兼容层
* 为了保持构建兼容性,提供旧日志接口的兼容实现
* 项目所有者: Jason Zhang
*/
import { type ToolCallError } from '../logging';
export declare const logger: {
error: (message: string, data?: any, requestId?: string, stage?: string) => void;
warn: (message: string, data?: any, requestId?: string, stage?: string) => void;
info: (message: string, data?: any, requestId?: string, stage?: string) => void;
debug: (message: string, data?: any, requestId?: string, stage?: string) => void;
logFinishReason: (finishReason: string, data?: any, requestId?: string, stage?: string) => void;
logStopReason: (stopReason: string, data?: any, requestId?: string, stage?: string) => void;
logDualFinishReason: (originalReason: string, convertedReason: string, provider: string, data?: any, requestId?: string, stage?: string) => void;
trace: (requestId: string, stage: string, message: string, data?: any) => void;
setConfig: (_options: any) => void;
setQuietMode: (_enabled: boolean) => void;
};
export declare class PipelineDebugger {
private errorTracker;
private requestTracker;
private logger;
constructor(port: number);
detectToolCallError(text: string, requestId: string, stage?: string, provider?: string, model?: string): boolean;
logToolCallError(error: ToolCallError): void;
addRawStreamData(requestId: string, data: string): void;
logFailure(failureData: any): void;
}
export declare class ToolCallErrorClass implements ToolCallError {
requestId: string;
errorMessage: string;
transformationStage: string;
provider: string;
model: string;
context: any;
port: number;
constructor(errorMessage: string, requestId: string, transformationStage: string | undefined, provider: string | undefined, model: string | undefined, context: any | undefined, port: number);
}
export declare function createLogger(_logDir: string, _serverType: string): {
error: (message: string, data?: any, requestId?: string, stage?: string) => void;
warn: (message: string, data?: any, requestId?: string, stage?: string) => void;
info: (message: string, data?: any, requestId?: string, stage?: string) => void;
debug: (message: string, data?: any, requestId?: string, stage?: string) => void;
logFinishReason: (finishReason: string, data?: any, requestId?: string, stage?: string) => void;
logStopReason: (stopReason: string, data?: any, requestId?: string, stage?: string) => void;
logDualFinishReason: (originalReason: string, convertedReason: string, provider: string, data?: any, requestId?: string, stage?: string) => void;
trace: (requestId: string, stage: string, message: string, data?: any) => void;
setConfig: (_options: any) => void;
setQuietMode: (_enabled: boolean) => void;
};
export { type ToolCallError };
//# sourceMappingURL=logger.d.ts.map