/**
 * WakeCycleRunner — encapsulates the inner session-switch loop, Claude
 * stream processing, error classification / retry logic, transcript
 * sanitization, and post-cycle transcript memory indexing.
 *
 * Extracted from loop.ts so the main loop is a thin orchestrator.
 */
import type { VisionClawConfig, OwnerConfig } from "../config/types.js";
import type { CommandMessage } from "../channels/interface.js";
import type { ContentBlock } from "./context.js";
import type { SessionManager } from "./session-manager.js";
import type { ActivityTracker } from "./activity-tracker.js";
import type { InterruptHandler } from "./interrupt-handler.js";
import type { ChannelManager } from "../channels/manager.js";
import type { MessageQueue } from "../channels/queue.js";
import type { ProviderFallbackManager } from "./provider-fallback.js";
export interface WakeCycleRunnerDeps {
    config: VisionClawConfig;
    ownerConfig: OwnerConfig;
    session: SessionManager;
    activityTracker: ActivityTracker;
    interruptHandler: InterruptHandler;
    channelManager: ChannelManager;
    messageQueue: MessageQueue;
    providerFallback: ProviderFallbackManager;
}
/**
 * Result of a wake cycle execution.
 *  - consecutiveErrors is the updated error counter (0 = success).
 */
export interface WakeCycleResult {
    consecutiveErrors: number;
}
export declare class WakeCycleRunner {
    private readonly deps;
    private invalidJsonBodyRecoveryCount;
    constructor(deps: WakeCycleRunnerDeps);
    private recordHealthEvent;
    /**
     * Execute one full wake cycle: the session-switch inner loop, stream
     * processing, error recovery, and post-cycle transcript indexing.
     *
     * @param contentBlocks  The multimodal user-message blocks for this cycle.
     * @param trigger        Whether this wake was from a message or heartbeat.
     * @param messages       Inbound messages (empty for heartbeat).
     * @param calendarSummary Calendar summary string for session-switch context.
     * @param consecutiveErrors Current error counter from previous cycles.
     * @returns Updated consecutive error count.
     */
    run(contentBlocks: ContentBlock[], trigger: "message" | "heartbeat", messages: CommandMessage[], calendarSummary: string, consecutiveErrors: number): Promise<WakeCycleResult>;
    /**
     * Handle an error from the session switch loop. Returns:
     *  - `continue_with_reset` for recovery paths that should retry immediately
     *    with a clean error counter (compaction/sanitization succeeded)
     *  - `continue_preserve_count` for normal retryable failures that should
     *    keep accumulating consecutiveErrors across retries
     *  - `done` when the wake cycle should exit
     */
    private handleError;
    /**
     * Handle a provider failure by disabling the current provider and
     * switching to the next one. If all are exhausted, notify the owner,
     * sleep, and reset.
     */
    private handleProviderFailed;
}
//# sourceMappingURL=wake-cycle-runner.d.ts.map