import { type ControlErrorHandler, type ConfigDocumentPort, type ConfigPatch, type GenerationCommitListener, type PluginId, type RuntimeConfigDocument, type RuntimeSnapshot, type SnapshotReader } from '@zhin.js/plugin-runtime'; import { type RuntimeEnvironment } from './environment.js'; import { type EnvironmentLayers, type EnvironmentLayersPort } from './environment-store.js'; import type { IsolatedPluginRuntimePort } from './isolation.js'; import type { ModuleRuntime } from './module-runtime.js'; import { type PluginConfigResolver, type RootResourceInstaller } from './plugin-scope-assembler.js'; import { HmrCoordinator, type HmrCoordinatorOptions } from './hmr-coordinator.js'; import { type RuntimeGenerationState } from './runtime-generation.js'; import { RootProcessRestartExecutor, type ProcessRestartAdapter } from './process-restart.js'; import { SourceOwnershipIndex } from './source-ownership.js'; export type { PluginConfigResolver, RootResourceContext, RootResourceInstaller, } from './plugin-scope-assembler.js'; export interface RootRuntimeOptions { readonly projectRoot: string; readonly modules: ModuleRuntime; readonly environment: RuntimeEnvironment; readonly environmentVariables?: EnvironmentLayers; readonly environmentSource?: EnvironmentLayersPort; readonly config?: PluginConfigResolver | RuntimeConfigDocument | ConfigDocumentPort; readonly installResources?: RootResourceInstaller; readonly isolation?: IsolatedPluginRuntimePort; readonly onControlError?: ControlErrorHandler; readonly disabledPluginInstanceKeys?: readonly string[]; } export type RootHmrOptions = Omit; export declare class RootRuntime { #private; constructor(options: RootRuntimeOptions); get snapshot(): RuntimeSnapshot; get snapshots(): SnapshotReader; onGenerationCommit(listener: GenerationCommitListener): () => void; get sourceOwnership(): SourceOwnershipIndex; start(): Promise; reload(target?: PluginId | string): Promise; patchConfig(patches: readonly ConfigPatch[]): Promise; createHmrCoordinator(options: RootHmrOptions): HmrCoordinator; createProcessRestartExecutor(adapter: ProcessRestartAdapter): RootProcessRestartExecutor; stop(): Promise; }