/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002
 * @pseudocode cli-runtime-adapter.md lines 44-688
 *
 * CLI Runtime Adapter - bridges CLI commands and AgentRuntimeState abstraction.
 * Phase 08: GREEN implementation to make all TDD tests pass.
 */
import type { Config, AgentRuntimeState, RuntimeStateParams, RuntimeStateSnapshot } from '@vybestack/llxprt-code-core';
import { AuthType } from '@vybestack/llxprt-code-core';
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.1
 * @pseudocode cli-runtime-adapter.md lines 51-88
 *
 * AgentRuntimeAdapter manages the foreground agent runtime state and provides
 * a stable API for CLI commands and helpers. It bridges AgentRuntimeState with
 * legacy Config for UI compatibility during the migration.
 */
export declare class AgentRuntimeAdapter {
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 52-54
     */
    private runtimeState;
    private legacyConfig;
    private runtimeId;
    private unsubscribe;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 56-75
     *
     * Creates a new adapter instance.
     */
    constructor(initialState: AgentRuntimeState, legacyConfig: Config);
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 76-87
     *
     * Handles runtime state change events.
     */
    private handleStateChange;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 199-203
     *
     * Returns the current provider name.
     */
    getProvider(): string;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 205-206
     *
     * Returns the current model name.
     */
    getModel(): string;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 208-209
     *
     * Returns the current auth type.
     */
    getAuthType(): AuthType;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 211-212
     *
     * Returns the current session ID.
     */
    getSessionId(): string;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 214-215
     *
     * Returns the current base URL.
     */
    getBaseUrl(): string | undefined;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 217-218
     *
     * Returns the current runtime state.
     */
    getRuntimeState(): AgentRuntimeState;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-001.3
     * @pseudocode cli-runtime-adapter.md lines 220-221
     *
     * Returns a sanitized snapshot for diagnostics.
     */
    getSnapshot(): RuntimeStateSnapshot;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 227-249
     *
     * Sets the provider and updates default model.
     */
    setProvider(providerName: string): void;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 250-256
     *
     * Sets the model name.
     */
    setModel(modelName: string): void;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 258-264
     *
     * Sets the auth type.
     */
    setAuthType(authType: AuthType): void;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 266-272
     *
     * Sets the base URL.
     */
    setBaseUrl(baseUrl: string): void;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 280-316
     *
     * Atomically switches provider with optional model and settings.
     */
    switchProvider(providerName: string, options?: {
        model?: string;
        clearSettings?: boolean;
    }): void;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.3
     * @pseudocode cli-runtime-adapter.md lines 329-351
     *
     * Mirrors runtime state to legacy Config for UI compatibility.
     */
    private mirrorStateToConfig;
    /**
     * @plan PLAN-20251027-STATELESS5.P08
     * @requirement REQ-STAT5-002.1
     * @pseudocode cli-runtime-adapter.md lines 597-609
     *
     * Cleans up adapter resources and unsubscribes from events.
     */
    dispose(): void;
}
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.1
 * @pseudocode cli-runtime-adapter.md lines 366-376
 *
 * Sets the global runtime adapter (called during CLI bootstrap).
 */
export declare function setRuntimeAdapter(adapter: AgentRuntimeAdapter): void;
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.1
 * @pseudocode cli-runtime-adapter.md lines 366-376
 *
 * Gets the global runtime adapter (used by CLI helpers).
 */
export declare function getRuntimeAdapter(): AgentRuntimeAdapter;
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.1
 *
 * Resets the global runtime adapter (for testing).
 */
export declare function resetRuntimeAdapter(): void;
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.2
 * @pseudocode cli-runtime-adapter.md lines 101-132
 *
 * CLI flags for runtime state initialization.
 */
export interface CliFlags {
    provider?: string;
    model?: string;
    key?: string;
    keyfile?: string;
    set?: Array<[string, string]>;
    profileLoad?: string;
    [key: string]: unknown;
}
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.2
 * @pseudocode cli-runtime-adapter.md lines 138-186
 *
 * Resolves runtime state parameters from CLI flags and config.
 */
export declare function resolveRuntimeStateFromFlags(flags: CliFlags, config: Config): RuntimeStateParams;
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.2
 * @pseudocode cli-runtime-adapter.md lines 101-132
 *
 * Bootstrap result containing adapter and client.
 */
export interface BootstrapResult {
    adapter: AgentRuntimeAdapter;
    client: unknown;
}
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.2
 * @pseudocode cli-runtime-adapter.md lines 101-132
 *
 * Bootstraps the foreground agent runtime from CLI flags.
 */
export declare function bootstrapForegroundAgent(cliFlags: CliFlags, config: Config): Promise<BootstrapResult>;
/**
 * @plan PLAN-20251027-STATELESS5.P08
 * @requirement REQ-STAT5-002.1
 * @pseudocode cli-runtime-adapter.md lines 378-398
 *
 * Legacy helper functions that delegate to the global adapter.
 */
export declare function setRuntimeProvider(providerName: string): void;
export declare function getRuntimeProvider(): string;
export declare function setRuntimeModel(modelName: string): void;
export declare function getRuntimeModel(): string;
export declare function switchRuntimeProvider(providerName: string, model?: string): void;
