import { type AgentSession, type SessionEntry, type SessionHeader, SessionManager } from "@sheason/pi-coding-agent";
import type { HubSessionEvent } from "./session-events.js";
import { type HubAvailableModel } from "./session-options.js";
import { type HubQueuedInputMessage, type HubRunEndReason, type HubSessionSnapshot } from "./session-snapshot.js";
export declare const DISABLED_SESSION_COMMAND_NAMES: readonly ["new", "resume", "tree", "fork", "clone"];
export interface HubSessionServiceOptions {
    now?: () => number;
}
export declare class UnsupportedSessionOperationError extends Error {
    constructor(commandName: string);
}
export declare class HubSessionService {
    private readonly sessionManager;
    private readonly sessionFile;
    private readonly now;
    private seq;
    private isRunning;
    private runStartedAt;
    private lastRunStartedAt;
    private lastRunEndedAt;
    private lastRunDurationMs;
    private lastRunEndReason;
    private readonly pendingToolCallIds;
    private queuedMessages;
    private steeringMessages;
    private followUpMessages;
    private lastError;
    private diagnostics;
    private summary;
    private availableModels;
    private availableThinkingLevels;
    private boundAgentSession;
    private readonly listeners;
    private constructor();
    static open(cwd?: string, options?: HubSessionServiceOptions): HubSessionService;
    static openAgent(cwd: string, sessionFile: string, options?: HubSessionServiceOptions): HubSessionService;
    static createIfMissing(cwd?: string, options?: HubSessionServiceOptions): HubSessionService;
    getSessionManager(): SessionManager;
    getHeader(): SessionHeader;
    getEntries(): SessionEntry[];
    getSnapshot(): HubSessionSnapshot;
    subscribe(listener: (event: HubSessionEvent) => void): () => void;
    bindAgentSession(session: AgentSession, options?: {
        diagnostics?: string[];
    }): HubSessionEvent;
    unbindAgentSession(): HubSessionEvent;
    syncBoundAgentSession(): HubSessionEvent;
    assertOperationSupported(commandName: string): void;
    setRunState(isRunning: boolean, reason?: HubRunEndReason): HubSessionEvent;
    setInputQueue(messages: readonly HubQueuedInputMessage[], steering?: readonly HubQueuedInputMessage[], followUp?: readonly HubQueuedInputMessage[]): HubSessionEvent;
    getInputQueue(): HubQueuedInputMessage[];
    addPendingToolCall(toolCallId: string): HubSessionEvent;
    removePendingToolCall(toolCallId: string): HubSessionEvent;
    clearError(): HubSessionEvent;
    recordError(message: string, options?: {
        endRun?: boolean;
    }): HubSessionEvent;
    updateDiagnostics(diagnostics: string[]): HubSessionEvent;
    updateSummary(summary: string): HubSessionEvent;
    updateSessionOptions(options: {
        availableModels: HubAvailableModel[];
        availableThinkingLevels?: string[];
    }): HubSessionEvent;
    private nextSeq;
    private emitQueueChangedEvent;
    private getContextSnapshot;
    private emit;
    private hydrateLastRunTimingFromEntries;
    private hydrateSummaryFromEntries;
}
//# sourceMappingURL=hub-session-service.d.ts.map