/** * ForgeHost — Multi-Project Hosting Platform * * Wraps Supervisor via composition to manage multiple projects * sharing one machine, one Postgres, one Redis, and one auth system. * * Usage: * * import { ForgeHost, defineHost } from 'threadforge'; * * const hostConfig = defineHost({ ... }); * const host = new ForgeHost(hostConfig); * await host.start(); */ import type { HostMeta } from "./host-config.js"; import { resolveAndDefine } from "./host-config.js"; import type { RegistryMode } from "./config-enums.js"; interface SupervisorOptions { cpus?: number; reserved?: number; registryMode?: RegistryMode; host?: string; httpBasePort?: number; evaluationIntervalMs?: number; } interface StatusGroup { group: string; services: Array<{ name: string; }>; workers: number; [key: string]: unknown; } interface StatusResult { processGroups: StatusGroup[]; [key: string]: unknown; } interface HostStatus extends StatusResult { hostMode: true; domain: string | null; projects: Record; } interface ProjectStatus { domain: string | null; services: number; workers: number; schema: string; keyPrefix: string; } type HostConfigInput = Parameters[0]; export declare class ForgeHost { private _hostConfig; private _options; private _supervisor; private _resolvedConfig; private _hostMeta; constructor(hostConfig: HostConfigInput, options?: SupervisorOptions); /** * Resolve all project configs, merge into one flat config, * and start the Supervisor. */ start(): Promise; /** * Gracefully shut down the entire host. */ shutdown(): Promise; /** * Get status with per-project breakdown. */ status(): HostStatus | null; /** * Get the list of project IDs. */ get projectIds(): string[]; /** * Get metadata for a specific project. */ getProject(projectId: string): HostMeta | null; private _printHostInfo; } export {}; //# sourceMappingURL=ForgeHost.d.ts.map