import { type NativeCheckPlan } from './native-check-executor.js'; import type { NativeLocalCheckState, NativeLocalExecutionState, NativePortableCheckSummary, NativePortableState } from './native-portable-types.js'; import type { NativeTrustedVerifierEnvelope } from './native-runner-protocol.js'; import { type NativeVerifierResponse } from './native-verifier-protocol.js'; import type { NativeProjectPaths } from './native-types.js'; export declare function localCheckCwdRef(projectRoot: string, cwd: string): string; export declare function hasGitlinksInIndex(indexOutput: string): boolean; export declare function nativeLocalCheckPlanKey(check: NativeLocalCheckState, projectRoot: string): string; export declare function nativePortableCheckPlansFromLocal(local: NativeLocalExecutionState, projectRoot?: string): NativeCheckPlan[]; export declare function sameNativeCheckPlan(local: NativeLocalExecutionState, plans: readonly NativeCheckPlan[], projectRoot: string, state: NativePortableState, inputFingerprint: string, branch: string | null): boolean; export declare function sameNativeCheckCommands(local: NativeLocalExecutionState, plans: readonly NativeCheckPlan[], projectRoot: string): boolean; export type NativePortableCheckExecutionLiveness = 'not-running' | 'running' | 'orphaned' | 'unknown'; /** * Inspect the owner and active child recorded for a local Runtime check operation. * Missing identity metadata remains unknown so a stale overlay can never trigger a * second check while the original process might still be alive. */ export declare function inspectNativePortableCheckExecution(local: NativeLocalExecutionState): Promise; /** * Stream-hash a file with the same digest semantics as hashing the base64 of * its full content, without retaining the bytes. The file must stay stable * while read, matching the previous read-then-restat contract. */ export declare function digestNativeInputFileContent(file: string): Promise<{ digest: string; size: number; }>; export declare function nativeCheckInputFingerprint(options: { state: NativePortableState; projectRoot: string; plans: readonly NativeCheckPlan[]; managedArtifactRoot?: string; }): Promise; /** * Cheap pre-gate over the full fingerprint's decisive inputs. Git observations * of HEAD, branch, porcelain status, and staged blob IDs plus dirty, untracked, and * ignored generated-input content digests cover every mutable input represented * by the full fingerprint. A gate hit therefore proves the full fingerprint * would recompute to its recorded value without hashing the clean tracked tree. */ interface NativeCheckInputGateOptions { projectRoot: string; candidateId: string | null; plans?: readonly NativeCheckPlan[]; managedArtifactRoot?: string; } export declare function nativeCheckInputGate(options: NativeCheckInputGateOptions): Promise; export declare function authoritativePortableChecks(options: { local: NativeLocalExecutionState; projectRoot: string; supplied: readonly NativePortableCheckSummary[]; requestedNames?: ReadonlyMap; }): NativePortableCheckSummary[]; export declare function preservedLocalChecksForVersion(options: { local: NativeLocalExecutionState | null; state: NativePortableState; projectRoot: string; }): NativeLocalExecutionState; export declare function readCurrentLocalExecution(options: { paths: NativeProjectPaths; state: NativePortableState; }): Promise; export declare function persistVerifierExecutionError(options: { paths: NativeProjectPaths; state: NativePortableState; summary: string; }): Promise; /** Rebind completed evidence only after proving the new candidate has identical inputs. */ export declare function rebindNativeCheckEvidence(options: { paths: NativeProjectPaths; previous: NativePortableState; next: NativePortableState; local: NativeLocalExecutionState | null; plans: readonly NativeCheckPlan[]; projectRoot?: string; }): Promise; export declare function executeNativePortableCheckPlan(options: { paths: NativeProjectPaths; name: string; plans: NativeCheckPlan[]; projectRoot?: string; retryCheckIds?: readonly string[]; }): Promise<{ state: NativePortableState; checks: NativePortableCheckSummary[]; disposition: 'executed' | 'reused'; }>; /** * Retry only repeatable interrupted checks for the current Builder candidate. * The local overlay is read to reconstruct the exact original command, so an * Agent cannot silently replace a failed command while claiming a retry. */ export declare function retryNativePortableCheckPlan(options: { paths: NativeProjectPaths; name: string; checkIds: readonly string[]; projectRoot?: string; }): Promise<{ state: NativePortableState; checks: NativePortableCheckSummary[]; }>; export interface NativePortableRequestChecksOutcome { round: number; reusedCheckIds: string[]; executedCheckIds: string[]; } interface NativeVerifierRequestedCheckReservation { state: NativePortableState; local: NativeLocalExecutionState; verifierExecutionRef: string; round: number; novelPlans: NativeCheckPlan[]; requestedNames: ReadonlyMap; reusedCheckIds: string[]; suppliedChecks: readonly NativePortableCheckSummary[]; } export declare function reserveVerifierRequestedChecks(options: { paths: NativeProjectPaths; projectRoot: string; state: NativePortableState; local: NativeLocalExecutionState; envelope: NativeTrustedVerifierEnvelope; response: Extract; suppliedChecks: readonly NativePortableCheckSummary[]; }): Promise; export declare function executeReservedVerifierRequestedChecks(options: { paths: NativeProjectPaths; projectRoot: string; reservation: NativeVerifierRequestedCheckReservation; }): Promise<{ checks: NativePortableCheckSummary[]; requestChecks: NativePortableRequestChecksOutcome; }>; export {}; //# sourceMappingURL=native-portable-checks.d.ts.map