import type { Context } from '@deepseek-ai/cordis'; import type { OwnerForegroundLearningTask } from '@dsh-enhanced/assistant-delivery'; export interface SourceReviewModelSelection { provider: string; model: string; reasoningEffort?: string; } export type SourceReviewOwnerReceipt = OwnerForegroundLearningTask['owner']; declare const ownerKeys: readonly ["authorityId", "authorityHash", "principalId", "principalRecordId", "principalVersion", "workspace", "agentPreset"]; export interface SourceReviewConfig { authorityId: string; expiresAt: number; maxReviews: number; repository: string; git: { path: string; sha256: string; }; decisionRoot: string; plugins: readonly string[]; owner: Pick; reviewerPrincipal: string; policy: string; maxChangedFiles: number; maxInputBytes: number; maxOutputTokens: number; timeoutMs: number; model?: SourceReviewModelSelection; } export interface SourceReviewRequest { protocol: 'dsh-source-review/v1'; operationId: string; planId: string; planDigest: string; releaseId: string; fence: number; revision: number; name: string; baseCommit: string; headCommit: string; prId: string; prEvidenceDigest: string; checkedTreeDigest: string; checkedPatchDigest: string; scope: readonly string[]; source: { owner: SourceReviewOwnerReceipt; outcomeId: string; sourceDigest: string; objective: string; modelSelection?: SourceReviewModelSelection; }; } export interface SourceReviewResult { status: 'approved' | 'rejected' | 'unknown'; operationId: string; requestDigest: string; sessionId: string; reason: string; model: SourceReviewModelSelection; outputDigest?: string; } export interface SourceReviewInput { request: SourceReviewRequest; signal?: AbortSignal; withSourceFence(callback: () => T): T; } export interface SourceReviewSelection { decisionRoot: string; owner: SourceReviewOwnerReceipt; name: string; modelSelection?: SourceReviewModelSelection; operationId?: string; } export declare function validateSourceReviewConfig(value: SourceReviewConfig): SourceReviewConfig; /** Lifetime belongs to the injected Fiber; close aborts and drains before DB close. */ export declare class SourceReviewRuntime { #private; private readonly ctx; constructor(ctx: Context, config: SourceReviewConfig, databasePath: string); available(input: SourceReviewSelection): boolean; run(input: SourceReviewInput): Promise; close(): Promise; } export {}; //# sourceMappingURL=source-review.d.ts.map