/**
 * Interactive Session Service — THIN FACADE (Phase 7 of 7)
 *
 * Implements `IInteractiveSessionService` by delegating every public method
 * to the appropriate collaborator. Contains NO business logic of its own.
 *
 * Collaborator map:
 * - `SessionBootstrapper`        — startSession
 * - `SessionTerminator`          — stopSession, stopByFeature, clearMessages
 * - `MessageDispatcher`          — sendMessage, sendUserMessage
 * - `IInteractiveMessageRepository` — getMessages
 * - `IInteractiveSessionRepository` — getSession, getTurnStatuses, getAllActiveTurnStatuses
 * - `StreamEventDispatcher`      — subscribe, subscribeByFeature, subscribeAll
 * - `ChatStateAssembler`         — getChatState
 * - `SessionPersistence`         — markRead
 * - `UserInteractionCoordinator` — respondToInteraction
 * - `WorkflowHooks`              — setActiveStep, clearActiveStep, notifyWorkflowStep, waitForTurnDone
 *
 * See `docs/plans/2026-04-14-interactive-session-service-refactor.md` for
 * the full strangler-refactor history (phases 1–7).
 */
import type { IInteractiveSessionService, StreamChunk, UnsubscribeFn, ChatState } from '../../../application/ports/output/services/interactive-session-service.interface.js';
import type { IInteractiveSessionRepository } from '../../../application/ports/output/repositories/interactive-session-repository.interface.js';
import type { IInteractiveMessageRepository } from '../../../application/ports/output/repositories/interactive-message-repository.interface.js';
import type { InteractiveSession, InteractiveMessage, WorkflowStep } from '../../../domain/generated/output.js';
import type { StreamEventDispatcher } from './core/stream-event-dispatcher.js';
import type { SessionPersistence } from './core/session-persistence.js';
import type { SessionBootstrapper } from './lifecycle/session-bootstrapper.js';
import type { SessionTerminator } from './lifecycle/session-terminator.js';
import type { UserInteractionCoordinator } from './runtime/user-interaction.coordinator.js';
import type { MessageDispatcher } from './api/message-dispatcher.js';
import type { ChatStateAssembler } from './api/chat-state.assembler.js';
import type { WorkflowHooks } from './api/workflow-hooks.js';
/**
 * Core service managing interactive agent session lifecycles.
 * Must be registered as a singleton in the DI container.
 *
 * **Polymorphic `featureId` scope key:** The `featureId` parameter accepted
 * by public methods (`sendUserMessage`, `getChatState`, `subscribeByFeature`,
 * etc.) is a polymorphic scope key — not necessarily a feature UUID:
 * - Feature chat: actual feature UUID (e.g. `"feat-abc123"`)
 * - Repository chat: repo identifier (e.g. `"repo-<repoId>"`)
 * - Global chat: literal string `"global"`
 *
 * Sessions and messages are isolated by this key regardless of chat type.
 *
 * @todo Consider renaming to `scopeId` + adding a `scopeType` discriminator.
 */
export declare class InteractiveSessionService implements IInteractiveSessionService {
    private readonly sessionRepo;
    private readonly messageRepo;
    private readonly dispatcher;
    private readonly persistence;
    private readonly bootstrapper;
    private readonly terminator;
    private readonly interactionCoordinator;
    private readonly messageDispatcher;
    private readonly chatStateAssembler;
    private readonly workflowHooks;
    constructor(sessionRepo: IInteractiveSessionRepository, messageRepo: IInteractiveMessageRepository, _featureRepo: unknown, // owned by SessionBootstrapper — kept for signature arity
    _contextBuilder: unknown, // owned by BootPromptResolver — kept for signature arity
    _workflowStepRepo: unknown, // owned by SessionTerminator — kept for signature arity
    _registry: unknown, // owned by collaborators — kept for signature arity
    dispatcher: StreamEventDispatcher, persistence: SessionPersistence, _logger: unknown, // owned by collaborators — kept for signature arity
    bootstrapper: SessionBootstrapper, terminator: SessionTerminator, _turnExecutor: unknown, // owned by MessageDispatcher — kept for signature arity
    interactionCoordinator: UserInteractionCoordinator, messageDispatcher: MessageDispatcher, chatStateAssembler: ChatStateAssembler, workflowHooks: WorkflowHooks);
    startSession(featureId: string, worktreePath: string, model?: string, agentType?: string, systemPrompt?: string, initialUserMessage?: string): Promise<InteractiveSession>;
    stopSession(sessionId: string): Promise<void>;
    stopByFeature(featureId: string): Promise<void>;
    sendMessage(sessionId: string, content: string): Promise<InteractiveMessage>;
    sendUserMessage(featureId: string, content: string, worktreePath: string, model?: string, agentType?: string, systemPrompt?: string, agentKickoffOverride?: string, persistUserMessage?: boolean): Promise<InteractiveMessage>;
    getMessages(featureId: string, limit?: number): Promise<InteractiveMessage[]>;
    clearMessages(featureId: string): Promise<void>;
    getSession(sessionId: string): Promise<InteractiveSession | null>;
    getTurnStatuses(featureIds: string[]): Promise<Map<string, string>>;
    getAllActiveTurnStatuses(): Promise<Map<string, string>>;
    subscribe(sessionId: string, onChunk: (chunk: StreamChunk) => void): UnsubscribeFn;
    subscribeByFeature(featureId: string, onChunk: (chunk: StreamChunk) => void): UnsubscribeFn;
    subscribeAll(onChunk: (featureId: string, chunk: StreamChunk) => void): UnsubscribeFn;
    getChatState(featureId: string): Promise<ChatState>;
    markRead(featureId: string): Promise<void>;
    respondToInteraction(featureId: string, answers: Record<string, string>): Promise<void>;
    setActiveStep(featureId: string, stepId: string): void;
    clearActiveStep(featureId: string): void;
    notifyWorkflowStep(featureId: string, step: WorkflowStep): void;
    waitForTurnDone(featureId: string, signal?: AbortSignal): Promise<void>;
}
//# sourceMappingURL=interactive-session.service.d.ts.map