#!/usr/bin/env node /** * cumulus-gateway daemon CLI — manages the gateway server lifecycle. * * Usage: * cumulus-gateway start [--foreground] [--config path] [--port N] * cumulus-gateway stop * cumulus-gateway status * cumulus-gateway --version * cumulus-gateway --help */ import { type GatewayConfig } from './config.js'; export declare function writePidFile(pid?: number): void; export declare function readPidFile(): number | null; export declare function removePidFile(): void; export declare function isProcessRunning(pid: number): boolean; export declare function getPidFilePath(): string; interface ParsedArgs { command: 'start' | 'stop' | 'reload' | 'status' | 'help' | 'version' | 'check-update' | 'update' | 'rollback' | 'setup' | 'config'; foreground: boolean; /** Set when the first positional arg was not a recognized command (exit 1 after showing help) */ unknownCommand?: string; configPath?: string; portOverride?: number; logLevel?: string; /** For `setup --project-root` */ projectRoot?: string; /** For `setup --force` */ force?: boolean; /** For `config get/set/list` — remaining positional args */ configArgs?: string[]; } export declare function parseArgs(argv: string[]): ParsedArgs; /** * The ONE pipeline-options object the daemon hands to every spawn path it owns: * the webchat adapter, the scheduler, and background-job completions. * * Live-mutable model config subset (task 104) — shared BY REFERENCE, so an * in-app `PUT /api/config` propagates to all of them with no restart * (`onConfigApplied` mutates it in place). * * Task 158: the scheduler and job registry used to hold a SECOND object * carrying only claudePath/sharedMcpPort/projectRoot/gatewayAgentsConfig, so a * turn woken by a trigger or a finished job reached `sendMessage` with no * catalog and no credential and fell closed to the Claude path — silently, and * only when the thread happened to be idle (a busy thread went via the agent * queue, which passes the full set). Two holders is what made that expressible. * * Extracted so the claim "every model field reaches the automated paths" is * assertable without launching a daemon (the `resolveClaudeModel` / * `claudeSpawnArgs` precedent). */ export declare function buildTurnPipelineOpts(config: GatewayConfig, port: number): { claudePath: string | undefined; sharedMcpPort: number | undefined; projectRoot: string | undefined; gatewayAgentsConfig: { resendApiKey?: string | undefined; resendDefaultFrom?: string | undefined; resendReplyTo?: string | undefined; resendRateLimit?: number | undefined; apiUrl: string; apiKey: string; }; hfApiKey: string | undefined; openaiApiKey: string | undefined; customProviders: import("./config.js").CustomProviderEntry[] | undefined; models: import("./config.js").ModelEntry[] | undefined; claudeModels: import("./config.js").ClaudeModelEntry[] | undefined; model: string | undefined; voiceModel: string | undefined; stallClassifierModel: string | undefined; workerModel: string | undefined; namespaces: import("./config.js").NamespaceConfig[] | undefined; }; export {}; //# sourceMappingURL=daemon.d.ts.map