import { z } from 'zod'; import type { GateResult } from '../gates'; export type ReviewSide = 'LEFT' | 'RIGHT'; export type ReviewEvent = 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT'; export interface ReviewComment { file: string; line?: number; side?: ReviewSide; body: string; author?: string; sourceCommentId?: string; } export interface ReviewDraft { comments: ReviewComment[]; body: string; } export interface ReviewThreadRecord { id: string; file?: string; line?: number; rootCommentId?: string; commentIds?: string[]; commentNodeIds?: string[]; body: string; author?: string; resolved: boolean; addressed?: boolean; question: boolean; reply?: string; replies?: string[]; } export interface ReviewReply { threadId: string; body: string; resolve: boolean; question?: boolean; } export interface ReviewBackend { readonly kind: 'local' | 'remote'; stage(draft: ReviewDraft): Promise; readDraft(): Promise; listThreads(): Promise; reply(input: ReviewReply): Promise; setResolved?(threadId: string, resolved: boolean): Promise; deleteThread?(threadId: string): Promise; publish(event: ReviewEvent): Promise; } export interface LocalReviewBackendOptions { session: string; artifactPath: string; author: string; } export interface ReviewThreadArtifactOptions { timestamp?: string; number?: number; url?: string; } export declare const severitySchema: z.ZodEnum<{ BLOCKING: "BLOCKING"; CONSIDER: "CONSIDER"; NOTE: "NOTE"; }>; export type Severity = z.infer; export declare const findingSchema: z.ZodObject<{ file: z.ZodString; line: z.ZodNumber; severity: z.ZodEnum<{ BLOCKING: "BLOCKING"; CONSIDER: "CONSIDER"; NOTE: "NOTE"; }>; body: z.ZodString; reference: z.ZodDefault>; }, z.core.$strip>; export type Finding = z.infer; export declare const findingsSchema: z.ZodArray; body: z.ZodString; reference: z.ZodDefault>; }, z.core.$strip>>; export interface ReviewDocInput { title: string; number?: number; url?: string; author?: string; model?: string; baseRef?: string; headRef?: string; additions?: number; deletions?: number; changedFiles?: number; findings: Finding[]; overallIssues: string[]; gates: GateResult[]; notVerified: string[]; timestamp?: string; } export declare function reviewSlug(input: string): string; export declare function yymmdd(date?: Date): string; export declare function reviewRecordName(target: string, date?: Date): string; export declare function localResponseMarker(threadId: string): string; export declare function isLocalResponse(body: string): boolean; export type ReviewThreadAction = 'reopen' | 'resolve' | 'delete'; export declare function parseReviewThreadAction(body: string): { action?: ReviewThreadAction; body: string; }; export declare function dedupeFindings(findings: Finding[]): Finding[]; export declare function toReviewComments(findings: Finding[], model?: string): ReviewComment[]; export declare function withRemoteProvenance(body: string, model: string): string; export declare function localReviewAuthor(model: string): string; //# sourceMappingURL=types.d.ts.map