/**
 * QueueRunner — lifecycle wrapper that turns the autonomous daemon profile
 * "on": it owns a QueueScheduler, wires the real OrchestratedMissionExecutor,
 * and exposes start()/stop() for the Gateway to call.
 *
 * Phase 1 (Daemon Wakeup) of the autonomous-agent milestone.
 *
 * Design note — signal handling lives in the daemon entry (src/index.ts) and
 * Gateway.shutdown(), NOT here. The Gateway calls `queueRunner.stop()` inside
 * its graceful-shutdown path so there is exactly one SIGTERM/SIGINT handler.
 * QueueRunner stays free of process-level side effects, which keeps it
 * unit-testable (inject a scheduler with a mock executor — the heavy
 * orchestration stack is never loaded).
 *
 * Heavy deps (Brain, TaskExecutor, OrchestrationLoop via MissionExecutor) are
 * lazy-required in the constructor's production branch only, matching the
 * repo convention of not paying for the orchestration stack at import time.
 */
import { QueueScheduler } from './QueueScheduler';
import type { MissionSpec } from './QueueScheduler';
import type { GoalTicker } from './GoalTicker';
import type { MissionDraft } from './GoalCompiler';
import type { GovernanceDecision } from './GovernanceLayer';
export interface QueueRunnerOptions {
    /** Poll cadence. Default: QueueScheduler default (env OPENLIFE_QUEUE_POLL_INTERVAL_MS or 10s). */
    pollIntervalMs?: number;
    /** Max concurrent missions. Default: QueueScheduler default (3). */
    maxConcurrent?: number;
    /** Drain deadline on stop(). Default: 2500ms. */
    drainTimeoutMs?: number;
    /** Test seam — inject a pre-built scheduler (skips heavy Brain/TaskExecutor). */
    scheduler?: QueueScheduler;
    /**
     * Phase 2 — goal→mission bridge. When true (default in the production
     * branch), a GoalTicker compiles the active /goal into queued missions.
     * Disable for pure queue-only behavior. Ignored when `scheduler` is
     * injected unless `goalTicker` is also provided.
     */
    enableGoalTicker?: boolean;
    /** Test seam — inject a pre-built GoalTicker. */
    goalTicker?: GoalTicker;
    /** GoalTicker tick cadence. Default 300_000ms (5min). */
    goalTickIntervalMs?: number;
    /** Fired when a compiled draft is held pending consent (e.g. Gateway → bridge event). */
    onConsentRequired?: (draft: MissionDraft, decision: GovernanceDecision) => void;
    /** Fired when a compiled draft is hard-blocked. */
    onGoalDraftBlocked?: (draft: MissionDraft, decision: GovernanceDecision) => void;
}
export declare class QueueRunner {
    private readonly scheduler;
    private readonly drainTimeoutMs;
    private readonly goalTicker;
    private started;
    constructor(opts?: QueueRunnerOptions);
    /** Start the poll loop + goal ticker. Idempotent. */
    start(): void;
    /**
     * Stop the ticker + drain in-flight missions (bounded by drainTimeoutMs).
     * Idempotent. Called by Gateway.shutdown() — never registers its own
     * signal handler.
     */
    stop(): Promise<void>;
    /** Enqueue a mission. Thin pass-through to the scheduler. */
    enqueue(spec: Omit<MissionSpec, 'enqueuedAt' | 'status' | 'attempts'>): MissionSpec;
    /** Inspect the queue. */
    list(): MissionSpec[];
    isRunning(): boolean;
    /** Exposed for tests + observability. */
    inFlightCount(): number;
}
