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 AgentCapability, 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; } export declare function buildActiveProvider(input: { container: CliContainer; provider: AuthProvider; agent: Pick; credential: string; explicitBaseUrl?: string; explicitShapeBaseUrls?: Partial>; readOnly?: boolean; }): Promise; export declare function parseProviderShapeBaseUrls(provider: AuthProvider, values: readonly string[]): Partial>; 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; 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 apiKeyFlagDescription(envVar: string): string; export declare function warnApiKeyFlag(logger: ScopedLogger, value: string | undefined, envVar: string): void; export declare function requireInteractiveStdin(message: string): void; export declare function createExecutionResources(container: CliContainer, flags: CommandFlags, scope: string, env?: Record): 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, capability?: AgentCapability): ProviderService; export type SpawnTarget = { id: string; name: string; label: string; aliases?: string[]; supportsStdinPrompt?: boolean; supportsMcpSpawn?: boolean; requiresProvider?: boolean; spawn?: ProviderService["spawn"]; provider?: ProviderService; }; export declare function resolveSpawnTarget(container: CliContainer, service: string): SpawnTarget; export declare function listSpawnTargets(container: CliContainer, extraServices?: string[]): SpawnTarget[]; 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; sideEffects?: boolean; }): Promise; export declare function resolveMergedDocument(container: CliContainer, options?: { readOnly?: boolean; }): Promise; export declare function resolveDefaultAgent(container: CliContainer, options?: { readOnly?: boolean; }): Promise; /** * Resolves the agent that `--yes` should assume and announces it: a defaulted * agent has real side effects (installs, written skills), so it is never silent. */ export declare function resolveAssumedDefaultAgent(input: { container: CliContainer; logger: ScopedLogger; readOnly?: boolean; }): Promise; export declare function announceAssumedScope(logger: ScopedLogger, scope: string): void; export declare function shlexQuote(value: string): string;