import type { Command } from "commander";
import { type ConfigDocument } from "../../../packages/poe-code-config/dist/index.js";
import type { CliContainer } from "../container.js";
import type { ProviderService, ProviderContext, ProviderIsolatedEnv } from "../service-registry.js";
import { type CommandContext } from "../context.js";
import type { ScopedLogger } from "../logger.js";
import type { MutationObservers } from "../../../packages/config-mutations/dist/index.js";
import type { PromptForSecret } from "../../../packages/providers/dist/index.js";
import { type HookBridgeOptions } from "../../../packages/agent-spawn/dist/index.js";
import { type AgentDefinition } from "../../../packages/agent-defs/dist/index.js";
import { type ApiShapeBinding, type ApiShapeId, type AuthProvider, type ProviderModelInput } from "../../../packages/providers/dist/index.js";
export interface CommandFlags {
    dryRun: boolean;
    assumeYes: boolean;
    verbose: boolean;
}
export interface ActiveProvider {
    id: string;
    apiShape: ApiShapeId;
    baseUrl: string;
    agentBaseUrl: string;
    credential: string;
    modelInput?: ProviderModelInput;
    extraEnv: Record<string, string>;
}
export declare function buildActiveProvider(input: {
    container: CliContainer;
    provider: AuthProvider;
    agent: Pick<AgentDefinition, "id" | "apiShapes">;
    credential: string;
    explicitBaseUrl?: string;
    explicitShapeBaseUrls?: Partial<Record<ApiShapeId, string>>;
    readOnly?: boolean;
}): Promise<ActiveProvider>;
export declare function parseProviderShapeBaseUrls(provider: AuthProvider, values: readonly string[]): Partial<Record<ApiShapeId, string>>;
export declare function resolveNonEmpty(value: string | undefined): string | undefined;
export declare function resolveShapeBaseUrl(baseUrl: string | undefined, pathSuffix: string | undefined): string | undefined;
export declare function resolveProviderShapeBaseUrl(provider: AuthProvider, shape: ApiShapeBinding, baseUrl: string | undefined): string | undefined;
export declare function resolveActiveProviderForService(container: CliContainer, serviceName: string, options?: {
    readOnly?: boolean;
}): Promise<ActiveProvider | undefined>;
export declare function resolveAgentDefinition(serviceName: string): AgentDefinition | undefined;
export interface ExecutionResources {
    logger: ScopedLogger;
    context: CommandContext;
}
export declare function resolveCommandFlags(program: Command): CommandFlags;
export declare function requireInteractiveStdin(message: string): void;
export declare function createExecutionResources(container: CliContainer, flags: CommandFlags, scope: string, env?: Record<string, string | undefined>): ExecutionResources;
export declare function buildProviderContext(container: CliContainer, adapter: ProviderService, resources: ExecutionResources, options?: {
    model?: string;
    hooks?: HookBridgeOptions;
    activeProvider?: ActiveProvider;
}): ProviderContext;
export declare function listIsolatedServiceIds(container: CliContainer): string[];
export declare function listServiceNames(services: Array<{
    name: string;
    aliases?: string[];
}>): string[];
export declare function resolveServiceAdapter(container: CliContainer, service: string): ProviderService;
export declare function createSecretPrompter(container: CliContainer): PromptForSecret;
export declare function formatServiceList(names: string[]): string;
export declare function buildResumeCommand(canonicalService: string, threadId: string, cwd: string): string | undefined;
export declare function applyIsolatedConfiguration(input: {
    adapter: ProviderService;
    providerContext: ProviderContext;
    payload: unknown;
    isolated: ProviderIsolatedEnv;
    providerName: string;
    observers?: MutationObservers;
}): Promise<void>;
export declare function resolveMergedDocument(container: CliContainer, options?: {
    readOnly?: boolean;
}): Promise<ConfigDocument>;
export declare function resolveDefaultAgent(container: CliContainer, options?: {
    readOnly?: boolean;
}): Promise<string | null>;
export declare function shlexQuote(value: string): string;
