import { vendoSync, type SyncReportWithWarnings } from "../actions/sync/public.js"; import type { ToolImpact } from "../core/index.js"; import type { JudgmentPassOptions } from "./judge/pass.js"; import { type Output, type TelemetryOptions } from "./shared.js"; export interface SyncReportPayload { report: SyncReportWithWarnings; impact?: ToolImpact[]; at: string; } export interface SyncOptions { targetDir: string; strict?: boolean; output?: Output; sync?: typeof vendoSync; url?: string; fetchImpl?: typeof fetch; report?: boolean; push?: (report: SyncReportPayload) => Promise; apiKey?: string; apiUrl?: string; json?: boolean; /** Injectable telemetry deps (matches init/doctor). */ telemetry?: TelemetryOptions; /** --review: render the pending + new loosenings and ask before writing. */ review?: boolean; /** --full: judge the whole catalog instead of only what moved. */ full?: boolean; /** --ai / --no-ai (`--no-watermark` is the legacy spelling of `--no-ai`): * `true` runs the judgment pass with no prompt, `false` forces it off, and * `undefined` asks in an interactive run and skips otherwise. Identical to * init's rule; no answer is ever persisted. */ ai?: boolean; /** --yes: this run cannot ask (never prompt, take the flags as given). */ yes?: boolean; /** --theme-refresh: take the deterministic theme scan's values even for * slots a human hand-edited. */ themeRefresh?: boolean; /** --engine: pin the judgment engine family (claude | codex | npx). */ engine?: string; /** Test seam: interactivity override for the AI question (default: TTY), * mirroring init's. */ interactive?: boolean; /** Test seam: the wall-clock budget for each Cloud reconcile (pin baselines, * registered components). */ baselineBudgetMs?: number; /** --push-components / --no-push-components: send the registered-component * source corpus to Vendo Cloud. `undefined` reads the project's saved answer * (`.vendo/cloud.json`) and, with none, ASKS once in an interactive run. */ pushComponents?: boolean; /** askYesNo seam for the component-upload question (tests inject an answer). */ confirm?: (question: string, defaultYes?: boolean) => Promise; /** Judgment-pass seams (tests / init's chosen harness). */ judge?: Pick; } /** `sync --json` — the one machine-readable object printed on stdout. */ export interface SyncJsonResult { ok: boolean; /** 1 = the run could not do what was asked (`--report` with no Cloud key); * 2 = uncapturable `` wrapper, or breaking changes under * --strict; 3 = breaking changes with saved references. */ exitCode: 0 | 1 | 2 | 3; report: SyncReportWithWarnings; /** [] = nothing referenced the changed tools; null = impact unknown (dev server unreachable). */ impact: ToolImpact[] | null; /** CLI-level events not carried by the report (unreachable impact endpoint, report-push problems). */ notes: string[]; /** The theme re-scan: which slots this run took from the host, and which * the host disagrees with but a human owns. null = no `.vendo/theme.json` * to reconcile (run `vendo init`). */ theme: { updated: string[]; pinned: string[]; } | null; /** The pin baselines reconciled with Vendo Cloud. null = keyless/BYO — the * baselines stayed on disk and no request was made. */ baselines: { pushed: string[]; pruned: string[]; } | null; /** The registered-component corpus reconciled with Vendo Cloud. null = * keyless/BYO, or the project has not said yes — nothing left the machine. */ components: { pushed: string[]; pruned: string[]; modules: { uploaded: number; deleted: number; }; } | null; error?: string; } /** 04-actions §1 / 09-vendo §5 — fail-soft extraction, strict CI gate. */ export declare function runSync(options: SyncOptions): Promise;