woaru
Version:
Universal Project Setup Autopilot - Analyze and automatically configure development tools for ANY programming language
111 lines • 2.94 kB
TypeScript
export interface LLMProviderConfig {
id: string;
providerType: 'openai' | 'anthropic' | 'google' | 'custom-ollama' | 'azure-openai';
apiKeyEnvVar: string;
baseUrl: string;
model: string;
headers?: Record<string, string>;
bodyTemplate: string;
timeout?: number;
maxTokens?: number;
temperature?: number;
enabled: boolean;
}
export interface AIReviewConfig {
providers: LLMProviderConfig[];
parallelRequests: boolean;
consensusMode: boolean;
minConsensusCount: number;
tokenLimit: number;
costThreshold: number;
}
export interface CodeContext {
filePath: string;
language: string;
framework?: string;
totalLines: number;
changedLines?: number[];
gitDiff?: string;
projectContext?: {
name: string;
type: 'library' | 'application' | 'service';
dependencies: string[];
};
}
export interface AIReviewFinding {
llmId: string;
severity: 'critical' | 'high' | 'medium' | 'low';
category: 'security' | 'performance' | 'maintainability' | 'architecture' | 'code-smell' | 'best-practice';
message: string;
rationale: string;
suggestion: string;
filePath: string;
lineNumber?: number;
lineRange?: {
start: number;
end: number;
};
codeSnippet?: string;
confidence: number;
tags: string[];
estimatedFixTime?: string;
businessImpact?: 'low' | 'medium' | 'high';
}
export interface MultiLLMReviewResult {
codeContext: CodeContext;
results: {
[llmId: string]: AIReviewFinding[];
};
aggregation: {
totalFindings: number;
findingsBySeverity: {
[severity: string]: number;
};
findingsByCategory: {
[category: string]: number;
};
consensusFindings: AIReviewFinding[];
uniqueFindings: {
[llmId: string]: AIReviewFinding[];
};
llmAgreementScore: number;
};
meta: {
analysisStartTime: Date;
analysisEndTime: Date;
totalDuration: number;
llmResponseTimes: {
[llmId: string]: number;
};
tokensUsed: {
[llmId: string]: number;
};
estimatedCost: {
[llmId: string]: number;
};
totalEstimatedCost: number;
llmErrors: {
[llmId: string]: string | null;
};
};
}
export interface LLMResponse {
success: boolean;
findings: AIReviewFinding[];
rawResponse?: string;
tokensUsed?: number;
responseTime: number;
error?: string;
estimatedCost?: number;
}
export interface PromptTemplate {
systemPrompt: string;
userPromptTemplate: string;
contextInjection: {
includeFileMetadata: boolean;
includeProjectContext: boolean;
includeGitDiff: boolean;
maxCodeLength: number;
};
}
//# sourceMappingURL=ai-review.d.ts.map