/**
 * 4Runr OS State Store
 *
 * Central state management - single source of truth
 * All runtime state lives here, not scattered across modules
 *
 * ARCHITECTURE:
 * - This is the runtime state store (in-memory)
 * - For persistent state (last agent, last run, etc.), see state.ts
 *
 * USAGE:
 * - Read state: const state = getState()
 * - Update state: updateAppState({ field: value })
 * - Never mutate state directly - always use updateAppState()
 *
 * EXTENSION:
 * - To add new state, add it to AppState interface
 * - Update syncStateToStore() in index.ts if needed (during migration)
 * - See CONTRIBUTING-CLI.md for full extension recipe
 */
import { GatewayClient } from './gateway-client.js';
import { UserSession } from './auth.js';
import type { CustomAgent } from './types.js';
import type { OperationEvent } from './models.js';
/**
 * Application State
 * This is the single source of truth for all runtime state
 */
export interface AppState {
    systemReady: boolean;
    currentView: 'BOOT' | 'INTELLIGENCE_POSTURE' | 'AGENT_LAB' | 'RUN_CONSOLE' | 'METRICS' | 'SYSTEM';
    gatewayClient: GatewayClient | null;
    gatewayConnected: boolean;
    gatewayUrl: string | null;
    localMode: boolean;
    currentUser: UserSession | null;
    sessionCheckInterval: NodeJS.Timeout | null;
    customAgents: Map<string, CustomAgent>;
    runHistory: Array<{
        runId: string;
        agentName: string;
        status: 'SUCCESS' | 'FAILED' | 'RUNNING';
        timestamp: number;
    }>;
    currentRun: {
        runId: string | null;
        agentName: string | null;
        startedAt: number | null;
    };
    firstRunCompleted: boolean;
    chatMode: boolean;
    operationEvents: OperationEvent[];
}
/**
 * Get current state (read-only)
 * Use this to read state in UI renderers and commands
 */
export declare function getState(): Readonly<AppState>;
/**
 * Update app state (immutable update)
 * Returns new state object, doesn't mutate original
 *
 * NOTE: This is for runtime state. For persistent state (last agent, etc.),
 * use updateState from state.ts
 */
export declare function updateAppState(updates: Partial<AppState>): AppState;
/**
 * Reset state (for testing or fresh start)
 */
export declare function resetState(): void;
//# sourceMappingURL=store.d.ts.map