import type { CostClass } from "./gateway.js";
import type { HarnessCode, HarnessStateName, RunManifest, RunOutcome, RunResult, TaskType } from "./harness.js";
import type { AuditSummary } from "./workspace.js";
import type { VerificationAuditSummary } from "./verification-summary.js";
export declare const EVIDENCE_SCHEMA_VERSION: "1";
export interface EvidenceRunIdentity {
    readonly runId: string;
    readonly fingerprint: string;
    readonly harnessVersion: string;
    readonly taskType: EvidenceTaskType;
    readonly outcome: RunOutcome;
    readonly startedAt: number;
    readonly finishedAt: number;
    readonly durationMs: number;
}
export interface EvidenceModel {
    readonly modelId: string;
    readonly costClass: CostClass | "unknown";
}
export interface EvidenceUsageTotals {
    readonly promptTokens: number;
    readonly completionTokens: number;
    readonly requestCount: number;
    readonly totalLatencyMs: number;
}
export interface EvidenceStateTransition {
    readonly seq: number;
    readonly ts: number;
    readonly from: HarnessStateName;
    readonly to: HarnessStateName;
    readonly reason: string;
}
export interface EvidenceToolCall {
    readonly seq: number;
    readonly ts: number;
    readonly toolName: string;
    readonly toolCallId: string;
    readonly outcome: "completed" | "failed";
    readonly durationMs?: number | undefined;
    readonly errorCode?: string | undefined;
}
export interface EvidenceCommandExecution {
    readonly seq: number;
    readonly ts: number;
    readonly executable: string;
    readonly argCount: number;
    readonly exitCode: number | null;
    readonly timedOut: boolean;
    readonly durationMs: number;
}
export interface EvidenceSandboxConfiguration {
    readonly seq: number;
    readonly ts: number;
    readonly envAllowlist: readonly string[];
    readonly network: "inherit" | "none";
    readonly maxOutputBytes: number;
    readonly timeoutMs: number;
    readonly terminationGraceMs: number;
    readonly cwdRequested: boolean;
}
export interface EvidenceVerificationResult {
    readonly seq: number;
    readonly ts: number;
    readonly passed: boolean;
    readonly detail: string;
}
export interface EvidencePatch {
    readonly proposed: boolean;
    readonly applied: boolean;
    readonly targetFileCount: number;
    readonly patchBytes: number;
    readonly changedFiles: number;
    readonly created: number;
    readonly deleted: number;
    readonly redactedDiff?: string | undefined;
}
export interface EvidenceReasoningEntry {
    readonly seq: number;
    readonly ts: number;
    readonly phase: HarnessStateName;
    readonly rationale: string;
    readonly modelResponse?: string | undefined;
}
export interface EvidenceFailure {
    readonly category: HarnessCode;
    readonly message: string;
}
export type EvidenceTaskType = TaskType | "browser-capture" | "terminal-execution" | "connected-context";
export interface EvidenceBrowserViewportPx {
    readonly width: number;
    readonly height: number;
}
export type EvidenceBrowserEventType = "browser:session-opened" | "browser:navigated" | "browser:screenshot-captured" | "browser:page-content-captured" | "browser:session-closed" | "browser:trust-warning" | "browser:error";
export interface EvidenceBrowserEvent {
    readonly schemaVersion: "1";
    readonly type: EvidenceBrowserEventType;
    readonly sessionId: string;
    readonly seq: number;
    readonly ts: number;
    readonly originOnly?: string | undefined;
    readonly httpStatus?: number | null | undefined;
    readonly captureSeq?: number | undefined;
    readonly persisted?: boolean | undefined;
    readonly viewportPx?: EvidenceBrowserViewportPx | undefined;
    readonly path?: string | undefined;
    readonly sha256?: string | undefined;
    readonly bytes?: number | undefined;
    readonly byteLength?: number | undefined;
    readonly reason?: string | undefined;
    readonly warning?: string | undefined;
    readonly code?: string | undefined;
    readonly message?: string | undefined;
}
export interface EvidenceBrowserScreenshot {
    readonly seq: number;
    readonly path: string;
    readonly sha256: string;
    readonly bytes: number;
    readonly capturedAt: number;
    readonly viewportPx: EvidenceBrowserViewportPx;
}
export interface EvidenceBrowserContentCapture {
    readonly seq: number;
    readonly byteLength: number;
    readonly capturedAt: number;
    readonly redactedHtml: string;
}
export interface EvidenceBrowserCapture {
    readonly sessionId: string;
    readonly cdpPort: number;
    readonly targetId: string;
    readonly status: "open" | "closed";
    readonly startedAt: number;
    readonly closedAt?: number | undefined;
    readonly closeReason?: string | undefined;
    readonly lastOriginOnly?: string | undefined;
    readonly events: readonly EvidenceBrowserEvent[];
    readonly screenshots?: readonly EvidenceBrowserScreenshot[] | undefined;
    readonly contentCaptures?: readonly EvidenceBrowserContentCapture[] | undefined;
}
export interface EvidenceConnectedContextScope {
    readonly schemaVersion: "1";
    readonly scopeIdHash: string;
    readonly scopeKind: string;
    readonly selectedPathCount: number;
    readonly selectedPaths: readonly string[];
}
export interface EvidenceConnectedContextQuery {
    readonly kind: string;
    readonly queryTextHash: string;
    readonly queryTextBytes: number;
    readonly maxResults: number;
    readonly caseSensitive: boolean;
}
export interface EvidenceConnectedContextExcerpt {
    readonly atomStableId: string;
    readonly scopePath: string;
    readonly lineRange?: {
        readonly startLine: number;
        readonly endLine: number;
    } | undefined;
    readonly score: number;
    readonly provenanceKind: string;
    readonly tool: string;
    readonly queryFingerprint: string;
    readonly redactionState: string;
    readonly contentBytes: number;
    readonly contentSha256: string;
}
export interface EvidenceConnectedContextFile {
    readonly scopePath: string;
    readonly role: string;
    readonly selectionReason: string;
    readonly excerptCount: number;
    readonly excerptBytes: number;
    readonly excerpts: readonly EvidenceConnectedContextExcerpt[];
}
export interface EvidenceConnectedContextOmitted {
    readonly scopePath: string;
    readonly reason: string;
}
export interface EvidenceConnectedContextUncertainty {
    readonly kind: string;
    readonly impactedAtomCount: number;
}
export interface EvidenceConnectedContextAudit {
    readonly packSchemaVersion: "1";
    readonly packStableIdHash: string;
    readonly chatIdHash: string | undefined;
    readonly modelRequest: {
        readonly sentToModel: true;
        readonly excerptContentPersisted: false;
    };
    readonly scope: EvidenceConnectedContextScope;
    readonly query: EvidenceConnectedContextQuery;
    readonly budget: {
        readonly usage: Record<string, number>;
        readonly limits: Record<string, number>;
    };
    readonly files: readonly EvidenceConnectedContextFile[];
    readonly omitted: readonly EvidenceConnectedContextOmitted[];
    readonly uncertainty: readonly EvidenceConnectedContextUncertainty[];
    readonly toolsUsed: readonly string[];
    readonly summary: {
        readonly fileCount: number;
        readonly citationCount: number;
        readonly omittedCount: number;
        readonly uncertaintyCount: number;
        readonly elapsedMs: number;
    };
}
export interface EvidenceGovernedWorkflowHandoff {
    readonly sourceGroundedRunId: string;
    readonly contextPackStableIdHash: string;
    readonly workflowKind: string;
    readonly editablePathCount: number;
    readonly readOnlyPathCount: number;
    readonly evidenceAtomCount: number;
    readonly expectedChecks: readonly string[];
    readonly approvalTokenHash: string;
}
export interface EvidenceManifest {
    readonly evidenceSchemaVersion: "1";
    readonly run: EvidenceRunIdentity;
    readonly model: EvidenceModel;
    readonly usageTotals: EvidenceUsageTotals;
    readonly context?: AuditSummary | undefined;
    readonly stateTransitions: readonly EvidenceStateTransition[];
    readonly toolCalls: readonly EvidenceToolCall[];
    readonly commandExecutions: readonly EvidenceCommandExecution[];
    readonly sandboxConfigurations?: readonly EvidenceSandboxConfiguration[] | undefined;
    readonly verificationResults?: readonly EvidenceVerificationResult[] | undefined;
    readonly patch?: EvidencePatch | undefined;
    readonly verification?: VerificationAuditSummary | undefined;
    readonly failure?: EvidenceFailure | undefined;
    readonly reasoning?: readonly EvidenceReasoningEntry[] | undefined;
    readonly browser?: EvidenceBrowserCapture | undefined;
    readonly connectedContext?: EvidenceConnectedContextAudit | undefined;
    readonly governedHandoff?: EvidenceGovernedWorkflowHandoff | undefined;
}
export interface AuditRedactionConfig {
    readonly additionalSecrets?: readonly string[] | undefined;
    readonly redactEnvValues?: readonly string[] | undefined;
    readonly sensitiveLiterals?: readonly string[] | undefined;
}
export interface RetentionPolicy {
    readonly maxRuns?: number | undefined;
    readonly maxAgeMs?: number | undefined;
    readonly maxTotalBytes?: number | undefined;
    readonly disabled?: boolean | undefined;
}
export declare const DEFAULT_RETENTION: RetentionPolicy;
export interface BuildOptions {
    readonly includeReasoning?: boolean | undefined;
    readonly includeDiff?: boolean | undefined;
}
export interface EvidenceBuildInput {
    readonly result: RunResult;
    readonly manifest: RunManifest;
    readonly context?: AuditSummary | undefined;
    readonly verification?: VerificationAuditSummary | undefined;
    readonly redaction?: AuditRedactionConfig | undefined;
    readonly options?: BuildOptions | undefined;
}
export interface EvidenceDeps {
    readonly env?: Readonly<Record<string, string | undefined>> | undefined;
    readonly store?: EvidenceStore | undefined;
    readonly randomSuffix?: (() => string) | undefined;
    readonly now?: (() => number) | undefined;
    readonly costClassResolver?: ((modelId: string) => CostClass | "unknown") | undefined;
}
export interface EvidenceStore {
    readonly put: (runId: string, json: string) => string;
    readonly list: () => readonly string[];
    readonly get: (runId: string) => string | undefined;
    readonly location?: ((runId: string) => string) | undefined;
    readonly delete: (runId: string) => void;
}
export interface SideFileWriteResult {
    readonly relativePath: string;
    readonly sha256: string;
    readonly bytes: number;
    readonly absolutePath: string;
}
//# sourceMappingURL=evidence.d.ts.map