import { type ConfigDocumentPort, type RuntimeConfigDocument, type RuntimeMode, type EnvironmentLayers } from '@zhin.js/runtime'; export declare const processRestartExitCode = 75; /** Storm guard parity with the `zhin start` daemon: 10 restarts/minute, 3s delay. */ export declare const MAX_RESPAWNS_PER_MINUTE = 10; export declare const RESPAWN_DELAY_MS = 3000; export interface RespawnPlan { readonly respawn: boolean; readonly attempts: readonly number[]; } /** * Pure backoff decision for native-TS child respawns. * `attempts` holds timestamps of respawns already scheduled; `once` mode never * respawns. Exit 75 (restartRequired) always respawns (subject to the storm * budget); in daemon mode any crash (non-zero exit / signal) also respawns. * Exceeding the per-minute budget stops respawning and the parent exits. */ export declare function planRespawn(exitCode: number | null, once: boolean, daemon: boolean, attempts: readonly number[], now?: number): RespawnPlan; export interface StartCommandOptions { readonly root: string; readonly args: readonly string[]; writeOutput(value: string): void; writeError(value: string): void; } export declare function runStartCommand(options: StartCommandOptions): Promise; export declare function hasAgentConfiguration(document: RuntimeConfigDocument): boolean; /** * Read project dotenv files into Runtime EnvironmentLayers without changing * the CLI process. `.env.` deliberately overrides `.env`; the * Runtime applies that overlay after inherited process variables. */ export declare function loadRuntimeEnvironmentLayers(root: string, environment: string): Promise>; interface StartOptions { readonly once: boolean; readonly noWatch: boolean; readonly open: boolean; readonly environment: string; readonly mode: RuntimeMode; readonly daemon: boolean; readonly logFile?: string; } export declare function parseStartOptions(args: readonly string[]): StartOptions; /** * Endpoint master / trusted 解析器。 * master 来源:plugins..master、plugins..endpoints[].master(+ name 别名键)。 * trusted 来源:plugins..trusted、plugins..endpoints[].trusted(数组或空白/逗号分隔字符串)。 * 不读 owner/admin:那是群/频道平台身份,不是框架 master。 */ export declare function createEndpointRoleResolver(config: RuntimeConfigDocument | ConfigDocumentPort): Promise<{ resolveOwner: (adapterLocalName: string, endpointKey: string) => string | undefined; resolveTrusted: (adapterLocalName: string, endpointKey: string) => readonly string[]; }>; export {}; //# sourceMappingURL=start-command.d.ts.map