import { RunRequest, AppletError, KindEnvelope, ServedInput, RunRef, IntelligencePort } from '@ai-matrx/agents/intelligence'; type MandateRunStatus = "idle" | "resolving" | "running" | "needs_input" | "done" | "error"; interface UseMandateRun { /** Start the job; `key` is bound by the hook, the rest is the run request. */ run: (req?: Omit | undefined) => Promise; status: MandateRunStatus; error: AppletError | null; /** Streamed text so far. */ text: string; /** The typed result envelope once the run settles (null when it had none). */ result: KindEnvelope | null; /** The inputs the run is waiting for, while `status === "needs_input"`. */ inputs: ServedInput[]; /** Answer a parked run; the resumed stream continues into the same state. */ answer: (values: Record) => Promise; ref: RunRef | null; } declare function useMandateRun(port: IntelligencePort, key: string): UseMandateRun; export { useMandateRun }; export type { MandateRunStatus, UseMandateRun };