/** * Vision commands. * * P3-04: the command no longer constructs a Provider client or validates * media directly. It receives the effective Provider's VisionCapability * through the dispatch dependency object (same pattern as Search in * P2-05), builds the discriminated `VisionRequest`, and invokes through * shared execution (`executeProviderOperation("vision", ...)`). The * support check — not a command branch on a Provider ID — decides * availability; Provider selection and capability gating live in the * dispatcher (`index.ts`). * * Default prompts and command presentation meaning stay here. Source * limits stay in the Adapter media Modules. Vision never uses the * response cache (FR-022). */ import type { CommandContext, CommandResult } from "../command-invocation.js"; import type { VisionCapability } from "../capabilities/vision.js"; import type { OutputMode } from "../lib/output.js"; import type { AllowedBatchCommand } from "../lib/batch-manifest.js"; import type { BatchOperationHandler } from "../lib/batch-runner.js"; import type { HandlerDependencies } from "../index.js"; import type { ConsumptionSink } from "../lib/consumption.js"; type OutputType = "code" | "prompt" | "spec" | "description"; export declare const VISION_HELP: string; /** * Shared Vision execution dependencies. The Capability is the selected * Provider's `VisionCapability`; `sleep`/`random` drive retry backoff * deterministically under test. Vision bypasses the response cache, so * no cache dependency is threaded here. * * PB-T2: `provider` + `consume` enable consumption emission at the * execution seam. `provider` is the actual attempted descriptor ID * (NOT the registry-derived effective provider); `consume` is the * optional sink. When `consume` is absent, no event is emitted — the * pre-PB-T2 byte-for-byte behavior. */ export interface VisionExecutionDependencies { readonly capability: VisionCapability; readonly sleep: (ms: number) => Promise; readonly random: () => number; readonly provider?: import("../providers/types.js").ProviderId; readonly consume?: ConsumptionSink; readonly now?: () => number; } export declare function analyze(imageSource: string, prompt: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function uiToCode(imageSource: string, prompt: string | undefined, outputType: OutputType, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function extractText(imageSource: string, prompt: string | undefined, language: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function diagnoseError(imageSource: string, prompt: string | undefined, contextFlag: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function diagram(imageSource: string, prompt: string | undefined, diagramType: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function chart(imageSource: string, prompt: string | undefined, focus: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function diff(expectedSource: string, actualSource: string, prompt: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; export declare function video(videoSource: string, prompt: string | undefined, deps: VisionExecutionDependencies, context?: CommandContext): Promise; /** * The shared runner's handler map (D5) — the same object the main * dispatch switch passes to `runBatch`. Injected by `handleVision`'s * early branch because the handlers are module-private in `index.ts`. */ export type VisionBatchHandlers = Readonly>; /** * `vision batch ` (batch-runner DESIGN D10, Ticket 7). * * The wrapper NEVER resolves a vision provider and never calls * `descriptor.create()` — per-op assignment happens inside the shared * runner (D4), exactly as in `scoutline batch`. It owns: strict flag * surface, input discrimination (manifest vs glob), glob expansion * (single directory, lexicographic, media union, sanitization, * collisions), `promptTemplate` extraction from the RAW manifest JSON * before the strict D2 parse (a wrapper field, not a D2 schema field), * the `--out` contract (per-input `output` targets + the wrapper's own * `/summary.json` write after the runner returns — the only extra * write path), concurrency default 1, and the dry-run boundary * (existence + extension validation only; media size validation stays * in the handler). The shared runner still performs the ONE stdout * write (the summary envelope); the wrapper adds none. */ export declare function handleVisionBatch(positional: string[], flags: Record, outputMode: OutputMode, deps: HandlerDependencies, handlers: VisionBatchHandlers): Promise; export {}; //# sourceMappingURL=vision.d.ts.map