import { type AnySystem, start } from "@lisachandra/matter"; import type { MatterPackageDescriptor } from "@lisachandra/matter/packages"; /** * Options for configuring the Matter ECS bootstrap process. * * @remarks * Combines pre-resolved systems, auto-collected Flamework barrels, hot-reload containers, and * ad-hoc extensions into a single boundary passed to the Matter loop. */ export interface BootstrapOptions { /** `"development"` enables Rewire hot reload via the Matter Loop. Defaults to `"production"`. */ mode?: "production" | "development"; /** * Barrel modules (Flamework namespaces) whose `@meta`-annotated systems are auto-collected via * `findSystems()`. */ modules?: { client?: object; server?: object; shared?: object; }; /** * Pre-resolved systems from the pipeline or package registry (Paths A / B / C in the bootstrap * chain). */ systems?: Array; /** * Hot reload containers (Rewire `Folder` instances). Only meaningful when `mode === * "development"`. */ hotReload?: { containers?: Array; }; /** * Ad-hoc user extensions — extra systems, modules, or containers merged into the final boundary * automatically. */ packages?: Array; extensions?: { containers?: Array; modules?: Array; systems?: Array; }; } /** * Resolved boundary produced from {@link BootstrapOptions}. * * @remarks * This is the normalized input that `start()` receives after `resolveBoundary` merges all * configured sources. */ export interface BootstrapBoundary { containers: Array; mode: "production" | "development"; systems: Array; } /** * Return value of {@link bootstrap}, providing access to the Matter world, crate, loop, and the * resolved boundary used. */ export type BootstrapResult = { /** The resolved boundary used — useful for debugging or reusing. */ boundary: BootstrapBoundary; } & ReturnType; /** * Merges all configured system/module/container sources into a single {@link BootstrapBoundary} * suitable for `start()`. * * @param options - The bootstrap options specifying mode, modules, systems, hot-reload containers, * and extensions. * @returns A resolved boundary with the final system list, mode, and * containers. */ export declare function resolveBoundary(options?: BootstrapOptions): BootstrapBoundary; /** * Single bootstrap entry point — works on both client and server. * * @example * ```ts * // Full pipeline path * const systems = createPipeline().use(families).build(); * const { world, crate, loop } = bootstrap({ mode: "development", systems }); * ```; * * @example * ```ts * // Auto-collect from Flamework barrels (no pipeline) * // Include builtin matter systems via packages * const { world, crate } = bootstrap({ * packages: [builtinPackage], * modules: { server: systems, shared: sharedSystems }, * ```; */ export declare function bootstrap(options?: BootstrapOptions): BootstrapResult;