import { RailRestartState } from "../lib/sessionRailModel.mjs"; import { CreateProfileInput } from "../lib/hubApi.mjs"; import { Store } from "@tanstack/store"; //#region src/web/stores/railDialogStore.d.ts /** Which history the resume dialog browses: one session's, or a whole workspace's. */ export type ResumeTarget = { sessionId: string; } | { workspaceId: string; }; /** Dialog selection survives replacement of the dashboard app. */ export interface RailDialogState { resume: ResumeTarget | null; sharing: string | null; move: { sessionId: string; pending: boolean; error: string; } | null; /** The add-bot dialog. Its state keeps the coordinator name from when it only created coordinators. */ coordinator: { workspaceId?: string; hostId?: string; profile?: string; actAsCoordinator?: boolean; pending: boolean; editingProfile?: boolean; profileDraft?: CreateProfileInput; profileRevision?: number; error: string; } | null; } export declare const railDialogStore: Store; export declare function openSessionSharing(sessionId: string): void; export declare function closeSessionSharing(): void; export declare function openResumeDialog(target: ResumeTarget): void; export declare function closeResumeDialog(): void; /** Opens the add-bot dialog for Home without a workspace id, else for that workspace. Capture the destination now, not after a filter or host changes. */ export declare function addDashboardCoordinator(workspaceId?: string, hostId?: string): Promise; export declare function closeCoordinatorProfile(): void; export declare function setCoordinatorProfile(profile: string | undefined): void; export declare function setBotActAsCoordinator(actAsCoordinator: boolean): void; export declare function setCoordinatorProfileForm(open: boolean): void; export declare function updateCoordinatorProfileDraft(profileDraft: CreateProfileInput): void; /** Keep the saved alias, but let the destination catalog confirm that it can launch there. */ export declare function saveCoordinatorProfile(): Promise; /** * A coordinator bot goes through the coordinator route; any other bot is a plain session with that profile. * `coordinatorBlocked` is the reason shown at submit time, so a stale opt-in never asks for a second coordinator. */ export declare function createBotWithProfile(coordinatorBlocked?: string): Promise; /** The resume dialog's two lists: saved history, or sessions removed in the last 7 days. */ export type ResumeView = 'history' | 'removed'; export interface ResumeDraft { view: ResumeView; query: string; selectedId: string | null; resumedId?: string; busy: boolean; error: string; } export declare const resumeDraftStore: Store; export declare const railRestartStore: Store, never>; export declare function updateResumeDraft(update: Partial>): void; /** Switching lists keeps the search text and drops a selection and error that belonged to the other list. */ export declare function setResumeView(view: ResumeView): void; /** * Returns a removed session to History and selects it there, so the person * resumes it the usual way. A refusal lands in the dialog's error slot. */ export declare function restoreRemovedThread(workspaceId: string, threadId: string): Promise; export declare function resumeDashboardSession(target: ResumeTarget): Promise; export declare function restartDashboardSession(sessionId: string): Promise; /** Test seam. */ export declare function resetRailDialogStore(): void; export declare function openMoveSessionDialog(sessionId: string): void; export declare function closeMoveSessionDialog(): void; export declare function moveDashboardSession(workspaceId: string): Promise; //#endregion //# sourceMappingURL=railDialogStore.d.mts.map