import { RootRuntime, type EnvironmentLayers, type InvalidationPlan, type ModuleRuntime, type ProcessInvalidationPlan, type RootResourceInstaller, type RuntimeConfigDocument, type RuntimeEnvironment, type ConfigDocumentPort } from '@zhin.js/runtime'; export interface RootHostOptions { readonly projectRoot: string; readonly config?: RuntimeConfigDocument | ConfigDocumentPort; readonly environment?: RuntimeEnvironment; readonly environmentVariables?: EnvironmentLayers; readonly modules?: ModuleRuntime; readonly installResources?: RootResourceInstaller; readonly watch?: boolean; onRestartRequired?(plan: ProcessInvalidationPlan): void | Promise; onError?(error: unknown): void | Promise; onPlan?(plan: InvalidationPlan): void | Promise; /** * Generation commit 回调(包括初始 start 与后续 HMR/config patch)。 * 用于 Console `hmr:reload` SSE 推送。 */ onGenerationCommit?(generation: number): void; } export interface RootHostSnapshot { readonly generation: number; readonly plugins: number; readonly capabilities: number; readonly projections: number; } /** Owns one Root process lifecycle; callers own signals and restart policy. */ export declare class RootHost { #private; readonly runtime: RootRuntime; constructor(options: RootHostOptions); start(): Promise; stop(): Promise; } export declare function describeSnapshot(snapshot: RootRuntime['snapshot']): RootHostSnapshot; //# sourceMappingURL=root-host.d.ts.map