import { createOpenAI } from '@ai-sdk/openai'; import { generateText } from 'ai'; import type { AltOpinionReport } from './alt-opinion.types.js'; /** @purpose Injectable dependencies for the alt-opinion CLI command — enables testing without real stdin/fs. */ export type AltOpinionCmdDeps = { /** @purpose Pre-read stdin content bypassing process.stdin */ stdinContent?: string; /** * @purpose Sync file reader override — defaults to readFileSync * @param path File path to read. * @returns File content as string. */ readFile?: (path: string) => string; /** @purpose AI SDK generateText override for testing */ generateText?: typeof generateText; /** @purpose AI SDK createOpenAI override for testing */ createOpenAI?: typeof createOpenAI; }; /** * @purpose CLI entry point for the alt-opinion command. * * * Parses CLI arguments, creates AI SDK providers from environment variables, * builds a Map of AltOpinionModelPort keyed by "provider/model", calls the core runner, * and formats the results to stdout with anchor-wrapped blocks or synthesis output. * * * @param rawArgs Raw CLI arguments (typically process.argv). * @param [deps] Optional injectable dependencies for testing. * @throws {Error} On parsing failures (missing model, unknown provider, empty input). * @returns AltOpinionReport with per-model results, exit code, and optional synthesis block. * @sideEffect FS: readFile for prompt files and --file resolution. * @sideEffect Env: reads LLM_PROXY_API_KEY, LLM_PROXY_BASE_URL, OPENROUTER_API_KEY. * @sideEffect Network: AI model API calls via @ai-sdk/openai. */ export declare function run(rawArgs: string[], deps?: AltOpinionCmdDeps): Promise;