/** * The `check` command: the full AI Visibility pipeline (M11). THIN over * `runCheck` (M10) - it parses flags, builds concrete deps, and renders the * returned envelope via M9. No orchestration here (hard rule #1). */ import { Command } from 'commander'; import { type RunCheckDeps } from '../core/run/index.js'; import type { EngineId } from '../core/types.js'; import type { CheckFlags, Runtime } from './runtime.js'; /** * Fail loudly on stray positional arguments. Commander already rejects excess * args, but with a raw `process.exit` and a generic message; this routes the * error through the injected runtime (testable, keeps `--json` stdout clean) * and names the offending token. Returns true when a stray arg was found. * * The common cause (live 2026-07-17): `npm run dev check --report x`, * where npm swallows `--report` and leaves `x` as a bare positional - so the * `hint` points back at the flag the user almost certainly meant. */ export declare function rejectStrayArgs(rt: Runtime, command: Command, hint?: string): boolean; /** * Reject a cost cap that cannot be enforced, before anything spends. * * `parseFloat` yields NaN for `--max-cost oops`, and EVERY CostGuard comparison * against NaN is false - so a typo'd cap did not cap: it ran the command * completely unbounded while the user believed they had set a limit. A cap that * silently does nothing is worse than no cap, and hard rule #5 requires money to * be spent only through an enforced guard. Zero and negatives are refused for * the same reason: they are not caps anyone can run under, and the likeliest * cause is a typo. Returns true when a flag was bad (the caller should stop). */ export declare function rejectUnusableCostCaps(rt: Runtime, caps: { maxCost?: number; maxSetupCost?: number; }): boolean; /** * Build the real check deps from env + flags. Resolves the judge model (cheapest * available, honest notice), wires adapters/guard/fs, and provides a confirm * gate that is a no-op abort off a TTY (agents pass `--yes`). */ export declare function defaultCheckDeps(rt: Runtime, flags: CheckFlags, available: EngineId[]): Promise; /** Register `check ` on the program. */ export declare function registerCheck(program: Command, rt: Runtime): void;