/** * @license * Copyright 2026 Qwen * SPDX-License-Identifier: Apache-2.0 */ import type { LiveConfig } from './config.js'; import { LiveDaemon } from './daemon.js'; import { LiveHostInstaller } from './host/qwen-live-harness-host-installer.js'; import { LiveLogger } from './logger.js'; import { probeDaemon } from './startup.js'; import { withDaemonStartupLock } from './startup-lock.js'; import { registerCurrentRuntime } from './startup-registration.js'; import type { RuntimeFailureLog } from './log/runtime-failure.js'; export type ManagedDaemon = Pick; export interface CliStartupOptions { daemonOnly: boolean; debug: boolean; signal?: AbortSignal; onDaemonCreated?: (daemon: ManagedDaemon) => void; logger?: LiveLogger; failureLog?: RuntimeFailureLog; } export interface CliStartupDependencies { platform: NodeJS.Platform; version: string; probe: typeof probeDaemon; register: typeof registerCurrentRuntime; lock: typeof withDaemonStartupLock; createDaemon: (config: LiveConfig, logger: LiveLogger) => ManagedDaemon; openHost: LiveHostInstaller['launch']; } /** One lock covers the probe and backend preflight for every CLI entry, including GUI children. */ export declare function startCliApplication(config: LiveConfig, options: CliStartupOptions, overrides?: Partial): Promise<{ reused: boolean; }>;