/**
 * Module-level server state management
 *
 * Server references persist across Vite config reloads.
 * When Vite restarts due to config changes, it creates a new plugin instance,
 * but the servers continue running in the same Node process. We maintain
 * these references at module scope to properly clean them up on restart.
 */
import type { ViteDevServer } from 'vite';
import type { CliServerManager, PlatformRoleOverride, SandboxManager, TimebackRoleOverride } from '../types';
import type { PlaycademyMode } from '../types/options';
/**
 * Module-level server references
 */
export declare const serverState: {
    sandbox: SandboxManager | null;
    backend: CliServerManager | null;
    viteServer: ViteDevServer | null;
    currentMode: PlaycademyMode;
    timebackRoleOverride: TimebackRoleOverride | null;
    platformRoleOverride: PlatformRoleOverride | null;
};
/**
 * Get sandbox server reference
 */
export declare function getSandboxRef(): SandboxManager | null;
/**
 * Set sandbox server reference
 */
export declare function setSandboxRef(sandbox: SandboxManager | null): void;
/**
 * Get backend server reference
 */
export declare function getBackendRef(): CliServerManager | null;
/**
 * Set backend server reference
 */
export declare function setBackendRef(backend: CliServerManager | null): void;
/**
 * Check if any servers are currently running
 */
export declare function hasActiveServers(): boolean;
/**
 * Get current mode
 */
export declare function getCurrentMode(): PlaycademyMode;
/**
 * Set current mode
 */
export declare function setCurrentMode(mode: PlaycademyMode): void;
/**
 * Get Vite dev server reference
 */
export declare function getViteServerRef(): ViteDevServer | null;
/**
 * Set Vite dev server reference
 */
export declare function setViteServerRef(server: ViteDevServer | null): void;
/**
 * Get current TimeBack role override
 */
export declare function getTimebackRoleOverride(): TimebackRoleOverride | null;
/**
 * Set TimeBack role override
 */
export declare function setTimebackRoleOverride(role: TimebackRoleOverride | null): void;
/**
 * Get current platform role override
 */
export declare function getPlatformRoleOverride(): PlatformRoleOverride | null;
/**
 * Set platform role override
 */
export declare function setPlatformRoleOverride(role: PlatformRoleOverride | null): void;
