/**
 * CLI core logic — command implementations and arg parsing.
 * Daemon lifecycle and healthz client are in separate modules.
 * This module has NO side effects on import. Tests import this, not cli.ts.
 */
import { type OwlCodaConfig } from './config.js';
import { runPreflight } from './preflight.js';
import { VERSION } from './version.js';
import { getAdminBundleStatus, type AdminHandoffContext } from './admin-delivery.js';
import { type OperatingMode } from './native/modes.js';
export { VERSION };
export { resolveClientHost, healthzMatchesConfig, healthzMatchesRuntimeMeta } from './healthz-client.js';
export type { HealthzResponse } from './healthz-client.js';
export { buildDaemonArgs, getBaseUrl } from './daemon.js';
export type { RuntimeMeta } from './daemon.js';
import { ensureProxyRunning, readRuntimeMeta, getMetaBaseUrl, getBaseUrl } from './daemon.js';
import { createLiveReplClientId, removeLiveReplClientIfOwned, upsertLiveReplClient } from './repl-lease.js';
export declare function loadEffectiveConfig(configPath?: string, port?: number, routerUrl?: string): OwlCodaConfig;
export declare function parseArgs(argv: string[]): {
    command: string;
    port?: number;
    configPath?: string;
    routerUrl?: string;
    model?: string;
    mode?: OperatingMode;
    daemonOnly?: boolean;
    prompt?: string;
    jsonOutput?: boolean;
    autoApprove?: boolean;
    allowTools?: string[];
    denyTools?: string[];
    resumeSession?: string;
    force?: boolean;
    dryRun?: boolean;
    printUrl?: boolean;
    openBrowser?: boolean;
    route?: 'start' | 'models' | 'aliases' | 'orphans' | 'catalog';
    select?: string;
    view?: string;
    passthroughArgs: string[];
};
export declare function printHelp(): void;
export declare function doStart(configPath?: string, port?: number, routerUrl?: string): Promise<void>;
export declare function doStop(force?: boolean): Promise<void>;
/**
 * Compare daemon's reported version vs the CLI binary's VERSION. When they
 * differ, print a dim hint suggesting `owlcoda stop && owlcoda` to align —
 * we do NOT auto-restart because the user likely has in-flight sessions.
 *
 * Returns true if a mismatch was reported (used by tests).
 */
export declare function warnIfDaemonStale(daemonVersion: string | undefined, cliVersion?: string, activeClientCount?: number): boolean;
export declare function doStatus(): Promise<void>;
export declare function doClients(passthroughArgs: string[], jsonOutput?: boolean, force?: boolean): Promise<void>;
export declare function doServe(configPath?: string, port?: number, routerUrl?: string): Promise<void>;
export interface UiLaunchResult {
    url: string;
    bundleAvailable: boolean;
    openedBrowser: boolean;
    context: AdminHandoffContext;
}
export interface UiLaunchDeps {
    ensureProxyRunning: typeof ensureProxyRunning;
    readRuntimeMeta: typeof readRuntimeMeta;
    getMetaBaseUrl: typeof getMetaBaseUrl;
    getBaseUrl: typeof getBaseUrl;
    openUrlInBrowser: (url: string) => boolean;
    now: () => number;
    getAdminBundleStatus: typeof getAdminBundleStatus;
}
type StartNativeRepl = (options: Parameters<typeof import('./native/repl.js').startRepl>[0]) => Promise<void>;
export interface LaunchDeps {
    runPreflight: typeof runPreflight;
    ensureProxyRunning: typeof ensureProxyRunning;
    readRuntimeMeta: typeof readRuntimeMeta;
    getBaseUrl: typeof getBaseUrl;
    doUi: typeof doUi;
    createLiveReplClientId: typeof createLiveReplClientId;
    upsertLiveReplClient: typeof upsertLiveReplClient;
    removeLiveReplClientIfOwned: typeof removeLiveReplClientIfOwned;
    startNativeRepl: StartNativeRepl;
}
export declare function doUi(configPath?: string, port?: number, routerUrl?: string, options?: {
    printUrl?: boolean;
    openBrowser?: boolean;
    route?: AdminHandoffContext['route'];
    select?: string;
    view?: string;
}, deps?: UiLaunchDeps): Promise<UiLaunchResult>;
export declare function doLaunch(configPath?: string, port?: number, routerUrl?: string, resumeSession?: string, model?: string, deps?: LaunchDeps, mode?: OperatingMode): Promise<void>;
export declare function main(): Promise<void>;
