import { type ClassifiedRun, type KernelStores } from "../../../core/src/classify/classifier.js";
import type { JourneyBranch, UiJourneyPlan } from "./schema.js";
import type { JourneyOracles } from "./public.js";
import type { ExternalEffect, OracleVerdict, PersistenceOracle, SideEffectOracle } from "../oracles/types.js";
export type JourneyTriggerResult = Record<string, unknown>;
export type JourneyTrigger = () => Promise<JourneyTriggerResult>;
export type RunJourneyBranchOptions = {
    trigger: JourneyTrigger;
    certificationAllowed?: () => boolean;
    oracles: JourneyOracles;
    stores?: KernelStores;
    runId?: string;
};
export type JourneyPromiseCheck = {
    id: string;
    dimension: string;
    path: string;
    operator: "exists" | "absent" | "equals";
    passed: boolean;
    before?: unknown;
    after?: unknown;
};
export type RunUiJourneyPlanOptions = RunJourneyBranchOptions & {
    browserPromiseChecks?: () => readonly JourneyPromiseCheck[];
};
export type OracleRunResult = {
    kind: "persistence" | "side-effect";
    adapterId: string;
    verdict: OracleVerdict;
};
export type JourneyCoverageGap = {
    reason: "missing-domain-oracles" | "missing-browser-promises";
    declaredAdapters: string[];
};
export type JourneyTerminalStatus = "success" | "failure" | "coverage-incomplete";
export type JourneyAdjudicationItem = {
    kind: "journey-discrepancy";
    branchId: string;
    branchStatus: JourneyBranch["status"];
    oracleKind: "persistence" | "side-effect" | "browser-promise";
    violated: string[];
    evidence: Record<string, unknown>;
};
export type JourneyOutcome = {
    branchId: string;
    branchStatus: JourneyBranch["status"];
    triggerResult: JourneyTriggerResult;
    oracleResults: OracleRunResult[];
    certified: boolean;
    terminalStatus: JourneyTerminalStatus;
    uiOnly: boolean;
    browserPromiseChecks?: JourneyPromiseCheck[];
    coverageGap?: JourneyCoverageGap;
    adjudicationItems: JourneyAdjudicationItem[];
    classified: ClassifiedRun;
};
export declare function runJourneyBranch(branchInput: JourneyBranch, options: RunJourneyBranchOptions): Promise<JourneyOutcome>;
export declare function runUiJourneyPlan(planInput: UiJourneyPlan, options: RunUiJourneyPlanOptions): Promise<JourneyOutcome>;
export type { ExternalEffect, OracleVerdict, PersistenceOracle, SideEffectOracle };
//# sourceMappingURL=runner.d.ts.map