import type { UserEvidence } from "../schema/workspec.js"; import type { CriterionAttempt, TreeIdentity, UserConfirmationProof, VerificationFailure } from "./results.js"; export interface SessionMessageEntry { id?: string; parentId?: string | null; timestamp?: string | number; type?: string; message?: unknown; } export interface SessionReader { getSessionId(): string; getSessionFile(): string | undefined; getBranch(): readonly SessionMessageEntry[]; } export interface HostUserCapabilities { readonly hasUI: boolean; readonly confirm?: ((title: string, message: string, opts?: { signal?: AbortSignal; timeout?: number; }) => Promise) | undefined; readonly session?: SessionReader | undefined; } export interface UserRunInput { evidence: UserEvidence; specPath: string; nodeId: string; criterionId: string; tree: TreeIdentity; } export type UserRunOptions = SessionReader | { host: HostUserCapabilities; signal?: AbortSignal | undefined; }; export type UserRunOutcome = { outcome: "passed"; proof: UserConfirmationProof; } | { outcome: "failed"; attempt: CriterionAttempt; failures: VerificationFailure[]; }; export declare function userChallenge(input: UserRunInput, sessionId: string): string; export declare function confirmationLine(challenge: string): string; /** Legacy adapter seam. The authority passes a host capability object instead. */ export declare function runUser(input: UserRunInput, options?: UserRunOptions): Promise;