import { type EnvSource, type GatewayConfig } from "@oscharko-dev/keiko-model-gateway";
import type { ModelPort } from "@oscharko-dev/keiko-harness";
import type { EvidenceStore } from "@oscharko-dev/keiko-evidence";
import type { RunRegistry } from "./runs.js";
import { type UiStore } from "./store/index.js";
import { type TerminalExecutionManager } from "./terminal.js";
import { type BrowserSessionManager } from "@oscharko-dev/keiko-tools";
import { type MemoryVaultStore } from "@oscharko-dev/keiko-memory-vault";
import { type ConsolidationJobRegistry } from "./memory-consolidation-registry.js";
import type { OpenAIEmbeddingOutcome, OpenAIEmbeddingRequest } from "@oscharko-dev/keiko-model-gateway";
import { type RelationshipHandlerDeps } from "./relationship-handlers.js";
import { type GroundingLimits } from "@oscharko-dev/keiko-contracts/bff-wire";
export type Redactor = (value: unknown) => unknown;
export type ModelPortFactory = (modelId: string) => ModelPort | undefined;
type GatewayEgressConfig = NonNullable<GatewayConfig["egress"]>;
export interface RuntimeGatewayConfig {
    readonly storagePath: string;
    current(): GatewayConfig | undefined;
    present(): boolean;
    set(config: GatewayConfig | undefined, present: boolean): void;
}
export interface UiHandlerDeps {
    readonly config: GatewayConfig | undefined;
    readonly configPresent: boolean;
    readonly evidenceStore: EvidenceStore;
    readonly env: EnvSource;
    readonly redactor: Redactor;
    readonly registry: RunRegistry;
    readonly modelPortFactory: ModelPortFactory;
    readonly redactionSecrets?: readonly string[] | undefined;
    readonly store: UiStore;
    readonly uiDbPath?: string | undefined;
    readonly terminal?: TerminalExecutionManager | undefined;
    readonly browser?: BrowserSessionManager | undefined;
    readonly memoryVault?: MemoryVaultStore | undefined;
    readonly consolidationJobs?: ConsolidationJobRegistry | undefined;
    readonly gatewayConfig?: RuntimeGatewayConfig | undefined;
    readonly gatewaySetupTester?: ((config: GatewayConfig, candidateModelIds: readonly string[]) => Promise<readonly string[]>) | undefined;
    readonly gatewayModelDiscovery?: ((baseUrl: string, apiKey: string, apiKeyHeaderName?: string, egress?: GatewayEgressConfig) => Promise<readonly string[]>) | undefined;
    readonly localKnowledgeEmbeddingRequest?: ((request: OpenAIEmbeddingRequest) => Promise<OpenAIEmbeddingOutcome>) | undefined;
    readonly relationship?: RelationshipHandlerDeps | undefined;
    readonly evidenceDir?: string | undefined;
}
export interface BuildHandlerDepsOptions {
    readonly configPath: string | undefined;
    readonly evidenceDir: string | undefined;
    readonly env: EnvSource;
    readonly registry?: RunRegistry | undefined;
    readonly modelPortFactory?: ModelPortFactory | undefined;
    readonly uiDbPath?: string | undefined;
    readonly store?: UiStore | undefined;
    readonly gatewaySetupTester?: ((config: GatewayConfig, candidateModelIds: readonly string[]) => Promise<readonly string[]>) | undefined;
    readonly gatewayModelDiscovery?: ((baseUrl: string, apiKey: string, apiKeyHeaderName?: string, egress?: GatewayEgressConfig) => Promise<readonly string[]>) | undefined;
}
export declare function currentGatewayConfig(deps: UiHandlerDeps): GatewayConfig | undefined;
export declare function currentGatewayConfigPresent(deps: UiHandlerDeps): boolean;
export declare function currentGatewayEgressConfig(deps: Pick<UiHandlerDeps, "config" | "gatewayConfig" | "env">): GatewayEgressConfig | undefined;
export declare function currentGroundingLimits(deps: UiHandlerDeps): GroundingLimits;
export type { GroundingLimits };
export declare function buildRedactor(env: EnvSource, config?: GatewayConfig): Redactor;
export declare function currentRedactionSecrets(deps: UiHandlerDeps): readonly string[];
export declare function buildUiHandlerDeps(options: BuildHandlerDepsOptions): UiHandlerDeps;
//# sourceMappingURL=deps.d.ts.map