import type { GlobalInstallPlan } from '../utils/global-install.js'; export interface BotLifecycleSpawnResult { ok: boolean; message?: string; } /** * Bring a freshly-onboarded bot online without a fleet-wide restart by spawning * `botmux start-bot --json` (see cli.ts:ensureBotDaemonStarted). The new * daemon is forked+supervised by pm2 (reparented off this process), self-registers * and opens its Feishu WSClient, then publishes a descriptor the DaemonRegistry * auto-discovers — so no dashboard reload is needed either. Runs `botmux` on the * SAME host as the dashboard (shared pm2 home / bots.json — the documented * dashboard↔daemon co-location assumption). Resolves best-effort; the caller * falls back to the restart hint on failure. */ export declare function spawnStartBotLive(appId: string): Promise; export declare function spawnStopBotLive(appId: string): Promise; /** * Run the ownership-aware npm/pnpm/Bun update for the manual-update flow WITHOUT blocking * the event loop (async spawn, not execSync — the dashboard must keep serving * during the ~10-30s install). Resolves on exit 0; rejects with the tail of * stdout/stderr on a non-zero exit, spawn error, or 3-minute timeout. Args are * a fixed literal — no shell interpolation of untrusted input. */ export declare function runGlobalInstall(plan: GlobalInstallPlan): Promise; /** * Run one local-dev update step (`git pull --ff-only` / `pnpm build`) in `dir`, * capturing output so a failure surfaces an actionable tail rather than a bare * exit code. Like the other host children this runs on `redactChildEnv` — the * git/pnpm child (and any lifecycle/hook it spawns) must not inherit the * dashboard's Feishu H5 credentials; the denylist still keeps PATH/HOME/etc. so * the tools resolve normally. 300s timeout (a cold `pnpm build` is slower than a * package install). No shell interpolation of untrusted input. */ export declare function runLocalDevStep(dir: string, command: string, args: string[]): Promise; //# sourceMappingURL=managed-spawn.d.ts.map