import type { Command } from "commander"; import { type MultiRunPlan, type MultiRunResult, type Persona, type RunEnvelope } from "./multi-run.js"; /** * The command line a single run is re-invoked with: every option the user actually gave (source * `cli`), minus the orchestrator's own and `omit`. Values are forwarded as given; storage-state * CONTENTS are never read here (only their paths travel). */ export declare function forwardedArgv(cmd: Command, omit?: ReadonlySet): string[]; /** A run's own command failed before its mission could run (bad args, missing keys, …): stop the multi-run. */ export declare class MultiRunAbortedError extends Error { readonly envelope: Extract; constructor(envelope: Extract); } /** The last JSON envelope a run wrote (`{v, ok, …}`), or a typed failure when it wrote none. */ export declare function lastEnvelope(lines: readonly string[]): RunEnvelope; export interface ExploreMultiRunArgs { /** The `explore` command being run (its parsed options are forwarded). */ readonly cmd: Command; /** A fresh, unparsed program built from the same deps. */ readonly newProgram: () => Command; readonly plan: MultiRunPlan; readonly strategy: string; /** `--out`: the multi-run directory (default `~/.jevitate/multi-runs/multi-`). */ readonly out?: string; readonly nowIso?: () => string; /** * #220: what a SIGTERM/SIGINT prints for the whole multi-run (the command's own output rule: the * envelope with --json, else the human summary) — instead of the killed run's own envelope. * Absent: a kill prints the multi-run nothing (a library caller that owns stdout). */ readonly killOutput?: (partial: MultiRunResult) => string; /** * #427: the pre-flight auth check, run by the orchestrator before EACH run (a persona's session, * or the mission's own `--storage-state`): the result a run ends with when the session is expired * (and could not be refreshed), else undefined. The runs themselves then skip it (`--auth-check off`). */ readonly authPreflight?: (persona: Persona | undefined) => Promise; } export declare function runExploreMultiRun(args: ExploreMultiRunArgs): Promise;