/** * QA360 MCP Server Types * Type definitions for MCP tools and responses */ export interface QA360Error { code: string; message: string; hint?: string; } export interface QA360Response { success: boolean; data?: T; error?: QA360Error; } export interface RunArgs { packPath: string; runKey?: string; strict?: boolean; weights?: Record; } export interface ReportSignArgs { runId: string; } export interface VerifyArgs { runId?: string; proofPath?: string; } export interface HistoryListArgs { limit?: number; status?: 'passed' | 'failed' | 'error' | 'cancelled' | 'any'; gate?: string; since?: string; } export interface HistoryGetArgs { runId: string; } export interface HistoryDiffArgs { runA: string; runB: string; } export interface HistoryTrendArgs { gate?: 'perf' | 'ui' | 'api' | 'a11y' | 'sast' | 'dast' | 'deps' | 'secrets'; window?: number; } export interface HistoryExportArgs { runId: string; bundlePath: string; } export interface HistoryGCArgs { keepLast?: number; maxBytes?: string; dryRun?: boolean; } export interface HistoryPinArgs { runId: string; } export interface PackAskArgs { query: string; context?: { targets?: Record; }; } export interface PackValidateArgs { pack?: string; path?: string; } export interface SecretsAddArgs { name: string; value: string; description?: string; } export interface SecretsListArgs { } export interface SecretsRemoveArgs { name: string; } export interface ServeDiagArgs { } export interface VaultGetRunArgs { runId: string; } export interface VaultGetArtifactsArgs { runId: string; } export interface TriageExplainArgs { code: string; context?: Record; } export interface RunResult { runId: string; status: 'passed' | 'failed' | 'cancelled' | 'error'; trust: { score: number; weights?: Record; }; proof?: { pdf?: { sha256: string; path: string; }; }; gates: Array<{ name: string; status: 'passed' | 'failed' | 'skipped' | 'warn'; duration_ms: number; key_metrics?: Record; }>; } export interface ReportSignResult { signature: string; algorithm: string; runId: string; } export interface VerifyResult { verified: boolean; algorithm: string; message: string; runId?: string; } export interface HistoryListResult { runs: Array<{ id: string; started_at: number; status: string; trust_score?: number; gates_summary?: Record; }>; } export interface HistoryGetResult { run: { id: string; started_at: number; ended_at?: number; status: string; trust_score?: number; pack_path: string; pack_hash: string; run_key?: string; }; gates: Array<{ name: string; status: string; duration_ms: number; metrics?: Record; }>; findings: Array<{ gate: string; severity: string; rule: string; location?: string; message: string; }>; artifacts: Array<{ label: string; sha256: string; mime_type: string; size_bytes: number; }>; } export interface HistoryDiffResult { delta: { trust: number; gates: Record; findings: { added: Array; removed: Array; regressed: Array; }; }; } export interface HistoryTrendResult { series: Array<{ timestamp: number; value: number; metadata?: Record; }>; summary: { average: number; trend: 'up' | 'down' | 'stable'; window_size: number; }; } export interface HistoryExportResult { bundlePath: string; size_bytes: number; contents: string[]; } export interface HistoryGCResult { removed: { runs: number; artifacts: number; bytesFreed: number; }; dryRun: boolean; } export interface PackAskResult { pack: string; hints: { tools_needed: string[]; estimated_duration: string; complexity: 'simple' | 'medium' | 'complex'; }; } export interface PackValidateResult { valid: boolean; errors: Array<{ code: string; message: string; line?: number; column?: number; }>; warnings: Array<{ code: string; message: string; line?: number; column?: number; }>; auto_fixes?: string[]; } export interface SecretsListResult { secrets: Array<{ name: string; description?: string; created_at: number; last_used?: number; }>; } export interface ServeDiagResult { health: 'healthy' | 'degraded' | 'unhealthy'; version: string; uptime_ms: number; metrics: Record; vault_stats?: Record; } export interface TriageExplainResult { explanation: { cause: string; severity: 'low' | 'medium' | 'high' | 'critical'; category: string; }; actions: Array<{ type: 'fix' | 'investigate' | 'ignore'; description: string; command?: string; }>; references: Array<{ title: string; url: string; }>; } export interface MCPServerConfig { allowRun: boolean; allowSecrets: boolean; maxConcurrency: number; rateLimit: { requests: number; window: number; }; sandbox: { allowedPaths: string[]; requireQA360Dir: boolean; }; audit: { enabled: boolean; logPath: string; }; } //# sourceMappingURL=index.d.ts.map