import { type Fetcher } from '../core/fetcher/index.js'; import { type QueryFs } from '../core/queries/index.js'; import { type SnapshotFs } from '../core/output/index.js'; import type { RunCheckDeps, RunShoppingDeps } from '../core/run/index.js'; import type { EngineId } from '../core/types.js'; /** Parsed `check` flags, normalized from commander options. */ export interface CheckFlags { yes?: boolean; json?: boolean; report?: string; quick?: boolean; engines?: string[]; judge?: string; maxCost?: number; maxSetupCost?: number; /** Ask engines in grounded (web-search) mode where they support it. */ grounded?: boolean; /** CI gate: exit non-zero when the score is under this (dev-plan M8). */ failUnder?: number; refresh?: boolean; regenerate?: boolean; brand?: string; category?: string; queries?: string; } /** Parsed `shopping` flags (M12a), normalized from commander options. */ export interface ShoppingFlags { yes?: boolean; json?: boolean; report?: string; /** Comma-separated product names, in any order (not a ranking). */ products?: string; /** Path to a products file (name, aliases, descriptor). */ productsFile?: string; engines?: EngineId[]; judge?: string; maxCost?: number; maxSetupCost?: number; grounded?: boolean; refresh?: boolean; brand?: string; category?: string; } /** All the process-level effects the CLI commands need, injectable for tests. */ export interface Runtime { out(s: string): void; err(s: string): void; env: Record; cwd: string; homeDir: string; isTTY: boolean; /** Whether `/.optifeed` is writable (drives `resolveStateDir`). */ isProjectWritable: boolean; now(): string; /** Write a report file (the HTML `--report` output). */ writeFile(path: string, data: string): Promise; /** Shared fetcher for audit + check. */ fetcher: Fetcher; /** Snapshot fs for the read-only inspect commands (`diff`, `sources`). */ snapshotFs: SnapshotFs; /** Query-pack fs for the `queries` command. */ queryFs: QueryFs; /** Override the check pipeline's injected deps (tests bypass real adapters). */ checkDeps?: (flags: CheckFlags) => RunCheckDeps; /** Override the shopping pipeline's injected deps (M12a), same purpose. */ shoppingDeps?: (flags: ShoppingFlags) => RunShoppingDeps; /** * Outcome of the `.env` auto-load, when a `.env` was present. Absent when * there was none - the ordinary case of keys exported in the shell. */ envFile?: { path?: string; reason?: string; }; } /** The production runtime, wired from `process`. */ export declare function defaultRuntime(): Runtime;