import type { CriterionResult, TaskAcceptanceContract } from '@dsh-enhanced/task-acceptance-contract'; export interface RunnerAuthorityInput { readonly kind: 'runner'; readonly id: string; readonly executable: string; readonly fixedArgs: readonly string[]; readonly timeoutMs: number; readonly maxOutputBytes: number; readonly environment?: Readonly>; } export interface DocumentSourceInput { readonly id: string; readonly url: string; } export interface DocumentAuthorityInput { readonly kind: 'document'; readonly id: string; readonly sources: readonly DocumentSourceInput[]; readonly timeoutMs: number; readonly maxResponseBytes: number; readonly allowHttpLoopback?: boolean; } export interface ReadbackAuthorityInput { readonly kind: 'readback'; readonly id: string; readonly urlTemplate: string; readonly objectIdPointer: string; readonly revisionPointer?: string; readonly timeoutMs: number; readonly maxResponseBytes: number; readonly allowHttpLoopback?: boolean; } /** Fixed repository requirements; credentials and delivered head come only from Actions' Host ledger. */ export interface RepositoryReadbackAuthorityInput { readonly kind: 'repository-readback'; readonly id: string; readonly grantId: string; readonly grantRevision: number; readonly repository: string; readonly branch: string; readonly baseBranch: string; readonly requiredChecks: readonly { readonly name: string; readonly appId: number; }[]; readonly reviewerIds: readonly number[]; readonly minApprovals: number; readonly timeoutMs: number; readonly freshnessMs: number; } export interface RepositoryReadbackAuthority extends RepositoryReadbackAuthorityInput { readonly digest: string; } /** Fixed direct-commit requirements; credentials and delivered head come only from Actions' Host ledger. */ export interface RepositoryCommitReadbackAuthorityInput { readonly kind: 'repository-commit-readback'; readonly id: string; readonly grantId: string; readonly grantRevision: number; readonly repository: string; readonly branch: string; readonly baseBranch: string; readonly requiredChecks: readonly { readonly name: string; readonly appId: number; }[]; readonly timeoutMs: number; readonly freshnessMs: number; } export interface RepositoryCommitReadbackAuthority extends RepositoryCommitReadbackAuthorityInput { readonly digest: string; } export type RepositoryOutcomeAuthority = RepositoryReadbackAuthority | RepositoryCommitReadbackAuthority; export interface RepositoryVerificationContext { read(contract: TaskAcceptanceContract, authority: RepositoryOutcomeAuthority, signal: AbortSignal): Promise; } export interface IsolatedRunnerTestCaseInput { readonly stdin: string; readonly expectedStdout: string; readonly expectedExitCode: number; } export interface IsolatedRunnerTestSetInput { readonly id: string; readonly cases: readonly IsolatedRunnerTestCaseInput[]; } export interface IsolatedRunnerAuthorityInput { readonly kind: 'isolated-runner'; readonly id: string; readonly stateRoot: string; readonly image: string; readonly dockerPath: string; readonly command: string; readonly expiresAt: number; readonly maxRuns: number; readonly maxTotalDurationMs: number; readonly maxDurationMs: number; readonly maxOutputBytes: number; readonly testSets: readonly IsolatedRunnerTestSetInput[]; } export type VerifierAuthorityInput = RunnerAuthorityInput | DocumentAuthorityInput | ReadbackAuthorityInput | IsolatedRunnerAuthorityInput | RepositoryReadbackAuthorityInput | RepositoryCommitReadbackAuthorityInput; export interface VerifierAuthoritiesConfig { readonly authorities: readonly VerifierAuthorityInput[]; } export interface RunnerAuthority extends Omit { readonly environment: Readonly>; readonly executableDigest: string; readonly digest: string; } export interface DocumentAuthority extends Omit { readonly allowHttpLoopback: boolean; readonly digest: string; } export interface ReadbackAuthority extends Omit { readonly revisionPointer?: string; readonly allowHttpLoopback: boolean; readonly digest: string; } export interface IsolatedRunnerAuthority extends IsolatedRunnerAuthorityInput { readonly digest: string; } export type VerifierAuthority = RunnerAuthority | DocumentAuthority | ReadbackAuthority | IsolatedRunnerAuthority | RepositoryOutcomeAuthority; export interface IsolatedVerificationContext { readArtifact(contract: TaskAcceptanceContract, path: string): Promise<{ readonly jobId: string; readonly requestDigest: string; readonly path: string; readonly content: string; readonly sha256: string; }>; run(authority: IsolatedRunnerAuthority, key: string, artifact: string, stdin: string, signal: AbortSignal): Promise<{ readonly jobId: string; readonly status: string; readonly quiescent: boolean; readonly exitCode?: number; readonly stdout: string; readonly stderr: string; readonly reason?: string; }>; } export declare class VerifierAuthorityError extends Error { readonly code: 'invalid-authority'; constructor(code: 'invalid-authority', message: string); } /** Validates Host-owned driver configuration, captures executable identity, and freezes it. */ export declare function createVerifierAuthorities(config: unknown): readonly VerifierAuthority[]; /** Runs every immutable criterion once. It never retries task side effects. */ export declare function verifyAcceptanceCriteria(contract: TaskAcceptanceContract, authorities: readonly VerifierAuthority[], signal: AbortSignal, context?: IsolatedVerificationContext, repository?: RepositoryVerificationContext): Promise; //# sourceMappingURL=drivers.d.ts.map