/** Interactive-shell session workflow for creating, resuming, and driving runtime turns. */
import { listAllSessions, listSessions } from '../../app/session/session-catalog.js';
import { openSessionManager } from '../../app/session/session-factory.js';
import type { ProductSessionStore } from '../../app/session/session-store-types.js';
import type { SessionTreeNode } from '../../core/session-schema.js';
import type { Component } from '../../tui/index.js';
import type { KeybindingsManager } from '../keybindings.js';
import type { SessionWorkflowSessionClient } from '../session-client.js';
type SelectorCreate = (done: () => void) => {
    component: Component;
    focus: Component;
};
interface TreeSelectorFactoryArgs {
    tree: SessionTreeNode[];
    currentLeafId: string | null;
    terminalRows: number;
    onSelect: (entryId: string) => void | Promise<void>;
    onCancel: () => void;
    onLabelChange: (entryId: string, label: string | undefined) => void;
    initialSelectedId?: string;
}
interface SessionSelectorFactoryArgs {
    currentSessionsLoader: typeof listSessions;
    allSessionsLoader: typeof listAllSessions;
    cwd: string;
    sessionDir: string;
    onSelect: (sessionPath: string) => void | Promise<void>;
    onCancel: () => void;
    onExit: () => void;
    onRequestRender: () => void;
    renameSession: (sessionFilePath: string, nextName: string | undefined) => Promise<void>;
    keybindings: KeybindingsManager;
    currentSessionFile?: string;
}
export interface SessionWorkflowDependencies {
    session: SessionWorkflowSessionClient;
    sessionManager: Pick<ProductSessionStore, 'getTree' | 'getLeafId' | 'getCwd' | 'getSessionDir' | 'getSessionFile' | 'appendLabelChange'>;
    terminalRows: number;
    keybindings: KeybindingsManager;
    showSelector(create: SelectorCreate): void;
    requestRender(): void;
    showStatus(message: string): void;
    showError(message: string): void;
    shutdown(): Promise<void>;
    resetTransientUiState(): void;
    rebuildChat(): void;
    getEditorText(): string;
    setEditorText(text: string): void;
    listSessions?: typeof listSessions;
    listAllSessions?: typeof listAllSessions;
    openSessionManager?: typeof openSessionManager;
    createTreeSelector?: (args: TreeSelectorFactoryArgs) => {
        component: Component;
        focus: Component;
    };
    createSessionSelector?: (args: SessionSelectorFactoryArgs) => {
        component: Component;
        focus: Component;
    };
}
export declare class SessionWorkflow {
    private readonly deps;
    private readonly listSessionsImpl;
    private readonly listAllSessionsImpl;
    private readonly openSessionManagerImpl;
    private readonly createTreeSelectorImpl;
    private readonly createSessionSelectorImpl;
    constructor(deps: SessionWorkflowDependencies);
    showTreeSelector(initialSelectedId?: string): void;
    showSessionSelector(): void;
    handleResumeSession(sessionPath: string): Promise<void>;
}
export {};
//# sourceMappingURL=session-workflow.d.ts.map