import type { z } from "zod"; import type { ExtractionHarness } from "./extract/harness.js"; import { type ThemeStageInput } from "./extract/stages.js"; import type { ResolveEngineOptions } from "./judge/engine.js"; import type { SelectOption } from "./pretty.js"; import { type Output } from "./shared.js"; import type { modelThemeSchema } from "./theme/extract-theme.js"; /** * The PROSE half of the model-assisted step — the product brief and the theme * fill — run once the judgment pass has settled names and descriptions. * * Consent, engine selection and the pass itself are NOT here: they belong to * the one shared flow (`sync-flow.ts`), so `vendo init` and `vendo sync` ask * the same question once, in one implementation. What lives here is what to do * after an engine has been chosen. */ /** init's AI-polish seam, in init's own flat spelling — tests reach the engine * ladder and the consent question through it. `runInit` maps it onto the * shared flow's options. */ export interface InitPolishSeam { /** --ai / --no-ai: `true` runs without asking (even non-interactively), `false` skips, `undefined` asks in an interactive run and skips otherwise. Never persisted anywhere. */ ai?: boolean; /** --engine: pin the rung family (claude | codex | npx) instead of first-available. An unavailable pin skips loudly — never a fallback. */ engine?: string; harnesses?: ExtractionHarness[]; confirm?: (question: string, defaultYes: boolean) => Promise; /** The multi-engine consent select (init passes pretty.select); default is the plain numbered select. Resolves to an option value or "skip". */ choose?: (question: string, options: SelectOption[], defaultIndex: number) => Promise; interactive?: boolean; resolveCredential?: ResolveEngineOptions["resolveCredential"]; } export interface ProseStagesOptions { root: string; output: Output; env: Record; harness: ExtractionHarness; force?: boolean; /** false = no catalog to brief about (the brief reads the graded tools). */ tools: boolean; /** The theme slots still open after the deterministic pass. Omitted when this run has no theme to fill (a pre-existing theme.json). */ theme?: Pick; } /** Neither stage is worth failing a run over: a failure degrades to one line * and the extractor/deterministic values stand. */ export declare function runProseStages(options: ProseStagesOptions): Promise<{ theme?: z.infer; }>;