import type { AnalyzeResult } from './analyze.js'; import type { CostIntelligence } from './schemas/cost-intelligence.schema.js'; /** * Agent-readable summary of an AnalyzeResult. Intended for orchestrators * (CI gates, external agent loops) that need a small, stable JSON shape. * * QLIB-001 spec: see docs/agent-summary-output.md. * C02 helper; exposed via CLI (`--agent-summary`) and MCP (`agentSummary: true`). * Field names below are the v1 contract for `toAgentSummary`. */ export type AgentGate = 'pass' | 'warn' | 'fail'; export type CoverageStatus = 'ok' | 'thin' | 'blocked-by-auth' | 'budget-exceeded' | 'navigation-failures' | 'unknown'; export interface AgentSummaryCostSummary { maxOutputTokensPerLlmCall: number; totalInputTokens: number; totalOutputTokens: number; budgetWarningCount: number; dataQuality: CostIntelligence['usageSummary']['dataQuality']; maturityLevel: number; maturityLabel: string; } export interface AgentSummary { schemaVersion: 1; gate: AgentGate; releaseConfidence: number | null; coverageStatus: CoverageStatus; topRisks: string[]; recommendedNextChecks: string[]; honestyNotes: string[]; costSummary: AgentSummaryCostSummary | null; deterministicFollowUps: string[]; } export interface AgentSummaryPolicy { /** Confidence at or above this number is required for `pass`. Default 80. */ passConfidenceThreshold?: number; /** Confidence below this triggers `fail` (when no harder failure already applies). Default 30. */ failConfidenceThreshold?: number; /** Max risks/checks/notes to include in each list. Default 5. */ maxListLength?: number; /** * Treat `mode === 'auth-required'` as `fail` (default) or `warn`. * Honest default: a deployment that was never exercised past auth cannot pass. */ authRequiredGate?: 'fail' | 'warn'; } /** * Convert an `AnalyzeResult` into a small agent-facing summary. * * Pure function. No I/O. CLI / MCP wiring belongs to QLIB-001-C03 and -C04. */ export declare function toAgentSummary(result: AnalyzeResult, policy?: AgentSummaryPolicy): AgentSummary; //# sourceMappingURL=agent-summary.d.ts.map