/**
 * SessionBootstrapper
 *
 * Owns the `startSession` / `completeBootAsync` lifecycle that was previously
 * inlined in the monolithic `InteractiveSessionService`.
 *
 * `startSession`:
 * 1. Checks the concurrent-session cap via `AgentConfigResolver.getCap()`.
 * 2. Resolves the previous agent session id (in-memory cache → stopped cache → DB).
 * 3. Creates the DB row in `booting` status.
 * 4. Initialises `SessionState` in the registry with `pendingUserContent` set
 *    BEFORE dispatching `completeBootAsync` (critical ordering — avoids a race
 *    where the async boot reads `undefined` for the first turn).
 * 5. Fires `completeBootAsync` as a fire-and-forget promise.
 * 6. Returns the session immediately so the API caller can poll.
 *
 * `completeBootAsync` (private):
 * 1. Calls `BootPromptResolver.resolve()` for the three-case boot-prompt logic.
 * 2. Resolves agent type + auth config.
 * 3. Creates or resumes the SDK session via `IAgentExecutorFactory`.
 * 4. If there is a non-empty boot prompt, sends it and consumes the stream via
 *    `AgentStreamConsumer`. Uses `BootWatchdog` as an idle timer.
 * 5. Detects CWD-mismatch resumption failures (SDK silently created fresh session).
 * 6. Persists the SDK session id and transitions the DB session to `ready`.
 *
 * Extracted from `interactive-session.service.ts` in phase 5 of the
 * strangler refactor documented at
 * `docs/plans/2026-04-14-interactive-session-service-refactor.md`.
 */
import type { IInteractiveSessionRepository } from '../../../../application/ports/output/repositories/interactive-session-repository.interface.js';
import type { SessionRegistry } from '../core/session-registry.js';
import type { SessionPersistence } from '../core/session-persistence.js';
import type { StreamEventDispatcher } from '../core/stream-event-dispatcher.js';
import type { BootPromptResolver } from './boot-prompt.resolver.js';
import type { AgentStreamConsumer } from '../runtime/agent-stream.consumer.js';
import type { IAgentExecutorFactory } from '../../../../application/ports/output/agents/agent-executor-factory.interface.js';
import type { AgentConfigResolver } from './agent-config.resolver.js';
import type { UserInteractionCoordinator } from '../runtime/user-interaction.coordinator.js';
import type { ILogger } from '../../../../application/ports/output/services/logger.interface.js';
import type { InteractiveSession } from '../../../../domain/generated/output.js';
export declare class SessionBootstrapper {
    private readonly sessionRepo;
    private readonly registry;
    private readonly persistence;
    private readonly dispatcher;
    private readonly bootPromptResolver;
    private readonly streamConsumer;
    private readonly executorFactory;
    private readonly agentConfigResolver;
    private readonly interactionCoordinator;
    private readonly logger;
    constructor(sessionRepo: IInteractiveSessionRepository, registry: SessionRegistry, persistence: SessionPersistence, dispatcher: StreamEventDispatcher, bootPromptResolver: BootPromptResolver, streamConsumer: AgentStreamConsumer, executorFactory: IAgentExecutorFactory, agentConfigResolver: AgentConfigResolver, interactionCoordinator: UserInteractionCoordinator, logger: ILogger);
    /**
     * Start a new session for the given feature scope.
     * Returns immediately in `booting` status; the async boot runs in the background.
     */
    startSession(featureId: string, worktreePath: string, model?: string, agentType?: string, systemPrompt?: string, initialUserMessage?: string): Promise<InteractiveSession>;
    /**
     * Asynchronously complete the boot sequence: resolve boot prompt, create
     * the SDK session, send the boot prompt, consume the stream, and transition
     * the session to `ready`.
     */
    private completeBootAsync;
}
//# sourceMappingURL=session-bootstrapper.d.ts.map