import { z } from 'zod'; /** * Normalize legacy severity values to the 3-level scale. * Maps 'critical' → 'high' and 'info' → 'low' for backwards compatibility * with old JSONL logs and LLM responses. */ export declare function normalizeSeverity(val: unknown): unknown; export declare const SeveritySchema: z.ZodPreprocess>; export type Severity = z.infer; export declare const ConfidenceSchema: z.ZodEnum<{ high: "high"; low: "low"; medium: "medium"; }>; export type Confidence = z.infer; /** * Confidence order for comparison (lower = more confident). * Single source of truth for confidence ordering across the codebase. */ export declare const CONFIDENCE_ORDER: Record; export declare const SeverityThresholdSchema: z.ZodPreprocess>; export type SeverityThreshold = z.infer; export declare const ConfidenceThresholdSchema: z.ZodEnum<{ high: "high"; low: "low"; medium: "medium"; off: "off"; }>; export type ConfidenceThreshold = z.infer; /** * Severity order for comparison (lower = more severe). * Single source of truth for severity ordering across the codebase. */ export declare const SEVERITY_ORDER: Record; /** * Filter findings to only include those at or above the given severity threshold. * If no threshold is provided, returns all findings unchanged. * If threshold is 'off', returns empty array (disabled). */ export declare function filterFindingsBySeverity(findings: Finding[], threshold?: SeverityThreshold): Finding[]; /** * Filter findings to only include those at or above the given confidence threshold. * If no threshold is provided or threshold is 'off', returns all findings unchanged. * Findings without a confidence field are always included (backwards compat). */ export declare function filterFindingsByConfidence(findings: Finding[], threshold?: ConfidenceThreshold): Finding[]; /** * Filter findings by both severity and confidence thresholds. * Applies severity filtering first, then confidence filtering. * Either threshold can be omitted to skip that filter. */ export declare function filterFindings(findings: Finding[], reportOn?: SeverityThreshold, minConfidence?: ConfidenceThreshold): Finding[]; export declare const LocationSchema: z.ZodObject<{ path: z.ZodString; startLine: z.ZodNumber; endLine: z.ZodOptional; }, z.core.$strip>; export type Location = z.infer; export declare const SourceSnippetLineSchema: z.ZodObject<{ line: z.ZodNumber; content: z.ZodString; highlighted: z.ZodOptional; }, z.core.$strip>; export type SourceSnippetLine = z.infer; export declare const SourceSnippetSchema: z.ZodObject<{ path: z.ZodString; language: z.ZodOptional; startLine: z.ZodNumber; endLine: z.ZodNumber; targetStartLine: z.ZodNumber; targetEndLine: z.ZodNumber; lines: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>; export type SourceSnippet = z.infer; export declare const FindingSchema: z.ZodObject<{ id: z.ZodString; severity: z.ZodPreprocess>; confidence: z.ZodOptional>; title: z.ZodString; description: z.ZodString; verification: z.ZodOptional; location: z.ZodOptional; }, z.core.$strip>>; additionalLocations: z.ZodOptional; }, z.core.$strip>>>; sourceSnippet: z.ZodOptional; startLine: z.ZodNumber; endLine: z.ZodNumber; targetStartLine: z.ZodNumber; targetEndLine: z.ZodNumber; lines: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; elapsedMs: z.ZodOptional; }, z.core.$strip>; export type Finding = z.infer; /** * Get the effective line number for a finding (endLine if present, otherwise startLine). */ export declare function findingLine(f: Finding): number; /** * Compare two findings by priority for winner selection. * Lower return value = higher priority (more severe, more confident, earlier path/line). */ export declare function compareFindingPriority(a: Finding, b: Finding): number; export declare const UsageStatsSchema: z.ZodObject<{ inputTokens: z.ZodNumber; outputTokens: z.ZodNumber; cacheReadInputTokens: z.ZodOptional; cacheCreationInputTokens: z.ZodOptional; cacheCreation5mInputTokens: z.ZodOptional; cacheCreation1hInputTokens: z.ZodOptional; webSearchRequests: z.ZodOptional; costUSD: z.ZodNumber; }, z.core.$strip>; export type UsageStats = z.infer; export declare const UsageAttributionSchema: z.ZodObject<{ model: z.ZodOptional; models: z.ZodOptional>; runtime: z.ZodOptional; runtimes: z.ZodOptional>; }, z.core.$strip>; export type UsageAttribution = z.infer; export declare const AuxiliaryUsageMapSchema: z.ZodRecord; cacheCreationInputTokens: z.ZodOptional; cacheCreation5mInputTokens: z.ZodOptional; cacheCreation1hInputTokens: z.ZodOptional; webSearchRequests: z.ZodOptional; costUSD: z.ZodNumber; }, z.core.$strip>>; export type AuxiliaryUsageMap = z.infer; export declare const AuxiliaryUsageAttributionMapSchema: z.ZodRecord; models: z.ZodOptional>; runtime: z.ZodOptional; runtimes: z.ZodOptional>; }, z.core.$strip>>; export type AuxiliaryUsageAttributionMap = z.infer; export declare const SkippedFileSchema: z.ZodObject<{ filename: z.ZodString; reason: z.ZodEnum<{ pattern: "pattern"; builtin: "builtin"; "ignored:builtin": "ignored:builtin"; "ignored:user": "ignored:user"; "ignored:generated": "ignored:generated"; "limit:file_size": "limit:file_size"; "limit:file_lines": "limit:file_lines"; "limit:file_read": "limit:file_read"; "limit:file_count": "limit:file_count"; "limit:changed_lines": "limit:changed_lines"; "limit:missing_patch": "limit:missing_patch"; }>; pattern: z.ZodOptional; }, z.core.$strip>; export type SkippedFile = z.infer; export declare const FileReportSchema: z.ZodPreprocess; usage: z.ZodOptional; cacheCreationInputTokens: z.ZodOptional; cacheCreation5mInputTokens: z.ZodOptional; cacheCreation1hInputTokens: z.ZodOptional; webSearchRequests: z.ZodOptional; costUSD: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>>; export type FileReport = z.infer; export declare const ErrorCodeSchema: z.ZodEnum<{ unknown: "unknown"; auth_failed: "auth_failed"; provider_unavailable: "provider_unavailable"; sdk_error: "sdk_error"; subprocess_failure: "subprocess_failure"; max_turns: "max_turns"; aborted: "aborted"; all_hunks_failed: "all_hunks_failed"; invalid_model_selector: "invalid_model_selector"; skill_resolution_failed: "skill_resolution_failed"; extraction_invalid_json: "extraction_invalid_json"; extraction_unbalanced_json: "extraction_unbalanced_json"; extraction_no_findings_json: "extraction_no_findings_json"; extraction_missing_findings_key: "extraction_missing_findings_key"; extraction_findings_not_array: "extraction_findings_not_array"; extraction_llm_failed: "extraction_llm_failed"; extraction_llm_timeout: "extraction_llm_timeout"; extraction_no_api_key: "extraction_no_api_key"; }>; export type ErrorCode = z.infer; export declare function isExtractionErrorCode(code: ErrorCode): boolean; export declare const SkillErrorSchema: z.ZodObject<{ code: z.ZodEnum<{ unknown: "unknown"; auth_failed: "auth_failed"; provider_unavailable: "provider_unavailable"; sdk_error: "sdk_error"; subprocess_failure: "subprocess_failure"; max_turns: "max_turns"; aborted: "aborted"; all_hunks_failed: "all_hunks_failed"; invalid_model_selector: "invalid_model_selector"; skill_resolution_failed: "skill_resolution_failed"; extraction_invalid_json: "extraction_invalid_json"; extraction_unbalanced_json: "extraction_unbalanced_json"; extraction_no_findings_json: "extraction_no_findings_json"; extraction_missing_findings_key: "extraction_missing_findings_key"; extraction_findings_not_array: "extraction_findings_not_array"; extraction_llm_failed: "extraction_llm_failed"; extraction_llm_timeout: "extraction_llm_timeout"; extraction_no_api_key: "extraction_no_api_key"; }>; message: z.ZodString; timestamp: z.ZodOptional; }, z.core.$strip>; export type SkillError = z.infer; export declare const HunkFailureSchema: z.ZodObject<{ type: z.ZodEnum<{ analysis: "analysis"; extraction: "extraction"; }>; filename: z.ZodString; lineRange: z.ZodString; code: z.ZodEnum<{ unknown: "unknown"; auth_failed: "auth_failed"; provider_unavailable: "provider_unavailable"; sdk_error: "sdk_error"; subprocess_failure: "subprocess_failure"; max_turns: "max_turns"; aborted: "aborted"; all_hunks_failed: "all_hunks_failed"; invalid_model_selector: "invalid_model_selector"; skill_resolution_failed: "skill_resolution_failed"; extraction_invalid_json: "extraction_invalid_json"; extraction_unbalanced_json: "extraction_unbalanced_json"; extraction_no_findings_json: "extraction_no_findings_json"; extraction_missing_findings_key: "extraction_missing_findings_key"; extraction_findings_not_array: "extraction_findings_not_array"; extraction_llm_failed: "extraction_llm_failed"; extraction_llm_timeout: "extraction_llm_timeout"; extraction_no_api_key: "extraction_no_api_key"; }>; message: z.ZodString; preview: z.ZodOptional; attempts: z.ZodOptional; }, z.core.$strip>; export type HunkFailure = z.infer; declare const TraceSpanAttributeValueSchema: z.ZodUnion>]>; export type TraceSpanAttributeValue = z.infer; export declare const TraceSpanSchema: z.ZodObject<{ traceId: z.ZodString; spanId: z.ZodString; parentSpanId: z.ZodOptional; op: z.ZodOptional; name: z.ZodOptional; startTimeUnixMs: z.ZodOptional; endTimeUnixMs: z.ZodOptional; durationMs: z.ZodOptional; status: z.ZodOptional; origin: z.ZodOptional; attributes: z.ZodOptional>]>>>; }, z.core.$strip>; export type TraceSpan = z.infer; export declare const HunkTraceSchema: z.ZodObject<{ filename: z.ZodString; lineRange: z.ZodString; runtime: z.ZodString; status: z.ZodString; traceId: z.ZodOptional; spanId: z.ZodOptional; responseId: z.ZodOptional; responseModel: z.ZodOptional; sessionId: z.ZodOptional; durationMs: z.ZodOptional; durationApiMs: z.ZodOptional; numTurns: z.ZodOptional; spans: z.ZodOptional; op: z.ZodOptional; name: z.ZodOptional; startTimeUnixMs: z.ZodOptional; endTimeUnixMs: z.ZodOptional; durationMs: z.ZodOptional; status: z.ZodOptional; origin: z.ZodOptional; attributes: z.ZodOptional>]>>>; }, z.core.$strip>>>; }, z.core.$strip>; export type HunkTrace = z.infer; export declare const SkillReportSchema: z.ZodObject<{ skill: z.ZodString; summary: z.ZodString; findings: z.ZodArray>; confidence: z.ZodOptional>; title: z.ZodString; description: z.ZodString; verification: z.ZodOptional; location: z.ZodOptional; }, z.core.$strip>>; additionalLocations: z.ZodOptional; }, z.core.$strip>>>; sourceSnippet: z.ZodOptional; startLine: z.ZodNumber; endLine: z.ZodNumber; targetStartLine: z.ZodNumber; targetEndLine: z.ZodNumber; lines: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; elapsedMs: z.ZodOptional; }, z.core.$strip>>; metadata: z.ZodOptional>; durationMs: z.ZodOptional; usage: z.ZodOptional; cacheCreationInputTokens: z.ZodOptional; cacheCreation5mInputTokens: z.ZodOptional; cacheCreation1hInputTokens: z.ZodOptional; webSearchRequests: z.ZodOptional; costUSD: z.ZodNumber; }, z.core.$strip>>; skippedFiles: z.ZodOptional; pattern: z.ZodOptional; }, z.core.$strip>>>; failedHunks: z.ZodOptional; failedExtractions: z.ZodOptional; hunkFailures: z.ZodOptional; filename: z.ZodString; lineRange: z.ZodString; code: z.ZodEnum<{ unknown: "unknown"; auth_failed: "auth_failed"; provider_unavailable: "provider_unavailable"; sdk_error: "sdk_error"; subprocess_failure: "subprocess_failure"; max_turns: "max_turns"; aborted: "aborted"; all_hunks_failed: "all_hunks_failed"; invalid_model_selector: "invalid_model_selector"; skill_resolution_failed: "skill_resolution_failed"; extraction_invalid_json: "extraction_invalid_json"; extraction_unbalanced_json: "extraction_unbalanced_json"; extraction_no_findings_json: "extraction_no_findings_json"; extraction_missing_findings_key: "extraction_missing_findings_key"; extraction_findings_not_array: "extraction_findings_not_array"; extraction_llm_failed: "extraction_llm_failed"; extraction_llm_timeout: "extraction_llm_timeout"; extraction_no_api_key: "extraction_no_api_key"; }>; message: z.ZodString; preview: z.ZodOptional; attempts: z.ZodOptional; }, z.core.$strip>>>; traces: z.ZodOptional; spanId: z.ZodOptional; responseId: z.ZodOptional; responseModel: z.ZodOptional; sessionId: z.ZodOptional; durationMs: z.ZodOptional; durationApiMs: z.ZodOptional; numTurns: z.ZodOptional; spans: z.ZodOptional; op: z.ZodOptional; name: z.ZodOptional; startTimeUnixMs: z.ZodOptional; endTimeUnixMs: z.ZodOptional; durationMs: z.ZodOptional; status: z.ZodOptional; origin: z.ZodOptional; attributes: z.ZodOptional>]>>>; }, z.core.$strip>>>; }, z.core.$strip>>>; error: z.ZodOptional; message: z.ZodString; timestamp: z.ZodOptional; }, z.core.$strip>>; auxiliaryUsage: z.ZodOptional; cacheCreationInputTokens: z.ZodOptional; cacheCreation5mInputTokens: z.ZodOptional; cacheCreation1hInputTokens: z.ZodOptional; webSearchRequests: z.ZodOptional; costUSD: z.ZodNumber; }, z.core.$strip>>>; auxiliaryUsageAttribution: z.ZodOptional; models: z.ZodOptional>; runtime: z.ZodOptional; runtimes: z.ZodOptional>; }, z.core.$strip>>>; files: z.ZodOptional; usage: z.ZodOptional; cacheCreationInputTokens: z.ZodOptional; cacheCreation5mInputTokens: z.ZodOptional; cacheCreation1hInputTokens: z.ZodOptional; webSearchRequests: z.ZodOptional; costUSD: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>>>>; model: z.ZodOptional; runtime: z.ZodOptional; }, z.core.$strip>; export type SkillReport = z.infer; export declare const GitHubEventTypeSchema: z.ZodEnum<{ pull_request: "pull_request"; issues: "issues"; issue_comment: "issue_comment"; pull_request_review: "pull_request_review"; pull_request_review_comment: "pull_request_review_comment"; schedule: "schedule"; }>; export type GitHubEventType = z.infer; export declare const PullRequestActionSchema: z.ZodEnum<{ opened: "opened"; synchronize: "synchronize"; reopened: "reopened"; closed: "closed"; labeled: "labeled"; }>; export type PullRequestAction = z.infer; export declare const FileChangeSchema: z.ZodObject<{ filename: z.ZodString; status: z.ZodEnum<{ added: "added"; removed: "removed"; modified: "modified"; renamed: "renamed"; copied: "copied"; changed: "changed"; unchanged: "unchanged"; }>; additions: z.ZodNumber; deletions: z.ZodNumber; patch: z.ZodOptional; chunks: z.ZodOptional; }, z.core.$strip>; export type FileChange = z.infer; export declare const DiffContextSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"working-tree">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"git-index">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"git-ref">; ref: z.ZodString; }, z.core.$strip>], "type">; export type DiffContextSource = z.infer; /** * Count the number of chunks/hunks in a patch string. * Each chunk starts with @@ -X,Y +A,B @@ */ export declare function countPatchChunks(patch: string | undefined): number; export declare const PullRequestContextSchema: z.ZodObject<{ number: z.ZodNumber; title: z.ZodString; body: z.ZodNullable; author: z.ZodString; draft: z.ZodOptional; labels: z.ZodOptional>; baseBranch: z.ZodString; headBranch: z.ZodString; headSha: z.ZodString; baseSha: z.ZodString; files: z.ZodArray; additions: z.ZodNumber; deletions: z.ZodNumber; patch: z.ZodOptional; chunks: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type PullRequestContext = z.infer; export declare const RepositoryContextSchema: z.ZodObject<{ owner: z.ZodString; name: z.ZodString; fullName: z.ZodString; defaultBranch: z.ZodString; }, z.core.$strip>; export type RepositoryContext = z.infer; export declare const EventContextSchema: z.ZodObject<{ eventType: z.ZodEnum<{ pull_request: "pull_request"; issues: "issues"; issue_comment: "issue_comment"; pull_request_review: "pull_request_review"; pull_request_review_comment: "pull_request_review_comment"; schedule: "schedule"; }>; action: z.ZodString; label: z.ZodOptional; repository: z.ZodObject<{ owner: z.ZodString; name: z.ZodString; fullName: z.ZodString; defaultBranch: z.ZodString; }, z.core.$strip>; pullRequest: z.ZodOptional; author: z.ZodString; draft: z.ZodOptional; labels: z.ZodOptional>; baseBranch: z.ZodString; headBranch: z.ZodString; headSha: z.ZodString; baseSha: z.ZodString; files: z.ZodArray; additions: z.ZodNumber; deletions: z.ZodNumber; patch: z.ZodOptional; chunks: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; repoPath: z.ZodString; diffContextSource: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"git-index">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"git-ref">; ref: z.ZodString; }, z.core.$strip>], "type">>; }, z.core.$strip>; export type EventContext = z.infer; export declare const FixStatusSchema: z.ZodEnum<{ not_attempted: "not_attempted"; attempted_failed: "attempted_failed"; resolved: "resolved"; }>; export type FixStatus = z.infer; export declare const RetryConfigSchema: z.ZodObject<{ maxRetries: z.ZodDefault; initialDelayMs: z.ZodDefault; backoffMultiplier: z.ZodDefault; maxDelayMs: z.ZodDefault; }, z.core.$strip>; export type RetryConfig = z.infer; export {}; //# sourceMappingURL=index.d.ts.map