import { LaunchSelection } from "@agimon-ai/po-core/web"; import { Store } from "@tanstack/store"; //#region src/web/stores/newSessionStore.d.ts /** Session creation and workspace admission are distinct requests, even without a workspace id. */ export interface NewSessionState { open: boolean; kind: 'workspace' | 'general' | 'add-workspace'; workspaceId: string | null; hostId?: string; } export declare const newSessionStore: Store; export declare function openNewSession(workspaceId?: string | null): void; export declare function openGeneralSession(hostId?: string | undefined): void; /** Independent drafts per target host, never a selected workspace's draft. */ export declare function generalSessionDraftKey(hostId?: string): string; export declare function closeNewSession(): void; /** Test seam. */ export declare function resetNewSessionStore(): void; export interface NewSessionDraft { name: string; /** * The launch profile: undefined until one is chosen (a workspace default may apply), null for an explicit * "No profile", otherwise a profile name. Never restored from a past launch. */ profile?: string | null | undefined; pending: boolean; error: string; createdId?: string; } export declare const EMPTY_NEW_SESSION_DRAFT: NewSessionDraft; export declare const newSessionDraftStore: Store, never>; export declare function setNewSessionName(draftKey: string, name: string): void; export declare function setNewSessionProfile(draftKey: string, profile: string | null | undefined): void; /** A remount cannot admit another creation. A visibility retry reuses the already created session. */ export declare function createPlainSession(workspaceId: string, name?: string, selection?: LaunchSelection): Promise<{ sessionId: string; } | { error: string; }>; export declare function createGeneralSession(name?: string, hostId?: string, selection?: LaunchSelection): Promise<{ sessionId: string; } | { error: string; }>; //#endregion //# sourceMappingURL=newSessionStore.d.mts.map