/** * Typed selectors for the runtime store. * * Each domain has a primary selector plus derived selectors for * common access patterns. All selectors are pure functions of RuntimeState. * * No ad hoc direct `set` from arbitrary modules. * Selectors are the read path; mutations go through DomainDispatch. */ import type { RuntimeState } from '../state.js'; import type { SessionDomainState } from '../domains/session.js'; import type { ModelDomainState } from '../domains/model.js'; import type { ConversationDomainState, TurnState } from '../domains/conversation.js'; import type { OverlayDomainState, OverlayId } from '../domains/overlays.js'; import type { PermissionDomainState, PermissionMode } from '../domains/permissions.js'; import type { TaskDomainState, RuntimeTask, TaskKind } from '../domains/tasks.js'; import type { AgentDomainState, RuntimeAgent } from '../domains/agents.js'; import type { OrchestrationDomainState } from '../domains/orchestration.js'; import type { CommunicationDomainState } from '../domains/communication.js'; import type { AutomationDomainState } from '../domains/automation.js'; import type { RoutesDomainState } from '../domains/routes.js'; import type { ControlPlaneDomainState } from '../domains/control-plane.js'; import type { DeliveryDomainState } from '../domains/deliveries.js'; import type { WatcherDomainState } from '../domains/watchers.js'; import type { SurfaceDomainState } from '../domains/surfaces.js'; import type { ProviderHealthDomainState, CompositeHealthStatus } from '../domains/provider-health.js'; import type { McpDomainState } from '../domains/mcp.js'; import type { PluginDomainState } from '../domains/plugins.js'; import type { DaemonDomainState } from '../domains/daemon.js'; import type { AcpDomainState } from '../domains/acp.js'; import type { IntegrationDomainState } from '../domains/integrations.js'; import type { TelemetryDomainState } from '../domains/telemetry.js'; import type { GitDomainState } from '../domains/git.js'; import type { DiscoveryDomainState } from '../domains/discovery.js'; import type { IntelligenceDomainState } from '../domains/intelligence.js'; import type { SurfacePerfDomainState } from '../domains/surface-perf.js'; /** Select the full session domain slice. */ export declare function selectSession(state: RuntimeState): SessionDomainState; /** Select the full model domain slice. */ export declare function selectModel(state: RuntimeState): ModelDomainState; /** Select the full conversation domain slice. */ export declare function selectConversation(state: RuntimeState): ConversationDomainState; /** Select the full overlays domain slice. */ export declare function selectOverlays(state: RuntimeState): OverlayDomainState; /** Select the full permissions domain slice. */ export declare function selectPermissions(state: RuntimeState): PermissionDomainState; /** Select the full tasks domain slice. */ export declare function selectTasks(state: RuntimeState): TaskDomainState; /** Select the full agents domain slice. */ export declare function selectAgents(state: RuntimeState): AgentDomainState; /** Select the full provider health domain slice. */ export declare function selectProviderHealth(state: RuntimeState): ProviderHealthDomainState; /** Select the full MCP domain slice. */ export declare function selectMcp(state: RuntimeState): McpDomainState; /** Select the full plugins domain slice. */ export declare function selectPlugins(state: RuntimeState): PluginDomainState; /** Select the full daemon domain slice. */ export declare function selectDaemon(state: RuntimeState): DaemonDomainState; /** Select the full ACP domain slice. */ export declare function selectAcp(state: RuntimeState): AcpDomainState; /** Select the full integrations domain slice. */ export declare function selectIntegrations(state: RuntimeState): IntegrationDomainState; /** Select the full telemetry domain slice. */ export declare function selectTelemetry(state: RuntimeState): TelemetryDomainState; /** Select the full git domain slice. */ export declare function selectGit(state: RuntimeState): GitDomainState; /** Select the full discovery domain slice. */ export declare function selectDiscovery(state: RuntimeState): DiscoveryDomainState; /** Select the full intelligence domain slice. */ export declare function selectIntelligence(state: RuntimeState): IntelligenceDomainState; /** Select the full orchestration domain slice. */ export declare function selectOrchestration(state: RuntimeState): OrchestrationDomainState; /** Select the full communication domain slice. */ export declare function selectCommunication(state: RuntimeState): CommunicationDomainState; /** Select the full automation domain slice. */ export declare function selectAutomation(state: RuntimeState): AutomationDomainState; /** Select the full routes domain slice. */ export declare function selectRoutes(state: RuntimeState): RoutesDomainState; /** Select the full control plane domain slice. */ export declare function selectControlPlane(state: RuntimeState): ControlPlaneDomainState; /** Select the full deliveries domain slice. */ export declare function selectDeliveries(state: RuntimeState): DeliveryDomainState; /** Select the full watchers domain slice. */ export declare function selectWatchers(state: RuntimeState): WatcherDomainState; /** Select the full surfaces domain slice. */ export declare function selectSurfaces(state: RuntimeState): SurfaceDomainState; /** Select the full surface performance domain slice. */ export declare function selectSurfacePerf(state: RuntimeState): SurfacePerfDomainState; /** Active model summary, the three most-used fields for display and routing. */ export interface ActiveModelSummary { providerId: string; modelId: string; displayName: string; } /** * Returns the active model identity fields. * Use this in components that need to display or route by model. */ export declare function selectActiveModel(state: RuntimeState): ActiveModelSummary; /** * Returns all tasks currently in 'running' state, ordered by startedAt. */ export declare function selectRunningTasks(state: RuntimeState): RuntimeTask[]; /** * Returns all agents currently in non-terminal states. */ export declare function selectRunningAgents(state: RuntimeState): RuntimeAgent[]; /** * Domain names that have a health record in providerHealth. * Used to look up health status by a named domain. */ export type HealthDomain = 'providerHealth' | 'mcp' | 'daemon' | 'acp' | 'integrations'; /** * Derives a simplified HealthStatus for a named domain. * Returns 'healthy', 'degraded', 'critical', or 'unknown'. */ export declare function selectDomainHealth(state: RuntimeState, domain: HealthDomain): CompositeHealthStatus; /** Composite system health summary across all tracked subsystems. */ export interface CompositeSystemHealth { status: CompositeHealthStatus; /** Per-domain breakdown. */ domains: Record; /** Whether any domain is in critical state. */ hasCritical: boolean; /** Whether any domain is degraded. */ hasDegraded: boolean; } /** * Returns a composite system health summary across all tracked subsystems. */ export declare function selectSystemHealth(state: RuntimeState): CompositeSystemHealth; /** * Returns the current permission mode. */ export declare function selectPermissionMode(state: RuntimeState): PermissionMode; /** * Returns whether any overlay is currently visible. */ export declare function selectAnyOverlayVisible(state: RuntimeState): boolean; /** * Returns whether a specific overlay is visible. */ export declare function selectOverlayVisible(state: RuntimeState, overlayId: OverlayId): boolean; /** * Returns the current turn state from the conversation domain. */ export declare function selectTurnState(state: RuntimeState): TurnState; /** * Returns the current store-owned partial tool preview for the active stream. */ export declare function selectStreamToolPreview(state: RuntimeState): string | undefined; /** * Returns whether a turn is currently active (not idle or terminal). */ export declare function selectIsTurnActive(state: RuntimeState): boolean; /** * Returns whether the session is fully initialized and ready. */ export declare function selectIsSessionReady(state: RuntimeState): boolean; /** * Returns the number of currently running tasks, grouped by kind. */ export declare function selectRunningTaskCountByKind(state: RuntimeState): Partial>; //# sourceMappingURL=index.d.ts.map