/** * AI mode: multipart flow — small calls with progress feedback. * 1) Package overview. 2) List export names. 3..N) Export details in batches. */ import { type TokenUsage } from './openrouter.js'; import type { AIRawResponse } from './types.js'; export interface AiModeInput { packageJsonContent: string; entryPath: string | null; includeSrc: boolean; /** If we can statically determine export names, pass them to avoid an extra AI call. */ exportNames?: string[]; existingLlmPackageJson?: string; } export declare function buildUserContent(input: AiModeInput): string; export interface AiProgressReport { current: number; total: number; message: string; } export type AiProgressCallback = (report: AiProgressReport) => void; export interface AiCallReport { step: string; model: string; systemPromptChars: number; userContentChars: number; responseChars: number; usage?: TokenUsage; startedAt: string; finishedAt: string; durationMs: number; } export type AiCallCallback = (report: AiCallReport) => void; /** When set, OpenRouter model IDs are tried in order (from Free LLM Router). */ export interface RunAiModeFreeRouter { modelIds: string[]; requestId?: string; } export interface RunAiModeOptions { freeRouter?: RunAiModeFreeRouter; } export declare function runAiMode(input: AiModeInput, apiKey: string, model: string, onProgress?: AiProgressCallback, onCall?: AiCallCallback, options?: RunAiModeOptions): Promise; //# sourceMappingURL=aiMode.d.ts.map