/** * `scan` — one-shot orchestrator: enumerate → fuzz → classify → report. * * The daily-driver command. Composes the four primitives defined in * `enumerate.ts`, `fuzz/index.ts`, `classify/index.ts`, `report/index.ts` * and writes all four artefacts to a single output directory. * * When operator bindings are supplied (caller / sandbox-prefix / expiry / * per-tool overrides), `scan` also emits a 5th artefact, `caveats.json`, * by running the classification through the caveats planner. This closes * the bridge to capnagent in a single command. Without bindings, `scan` * keeps its original 4-artefact behaviour intact. * * Returns the bag of intermediate values so a caller (CLI or library) * can post-process beyond the on-disk artefacts. */ import type { Client } from "@modelcontextprotocol/sdk/client/index.js"; import type { CaveatBindings, CaveatsResults } from "../caveats/types.js"; import type { ClassificationResults } from "../classify/types.js"; import type { ToolInventory } from "../enumerate.js"; import { type FuzzOptions } from "../fuzz/index.js"; import type { FuzzResults } from "../fuzz/types.js"; export interface ScanResult { inventory: ToolInventory; fuzz: FuzzResults; classification: ClassificationResults; reportMarkdown: string; /** Present when bindings triggered caveats emission. */ caveats?: CaveatsResults; } export interface ScanOptions extends FuzzOptions { /** If set, write the artefacts to this directory. */ outDir?: string; /** * If set AND has at least one of caller / sandbox_prefix / expiry / * per_tool_overrides populated, scan additionally produces a caveats * document (and writes `caveats.json` when `outDir` is set). Empty * objects, or objects with only undefined values, do not trigger * caveats emission. */ bindings?: CaveatBindings; } /** * Run the full pipeline. Caller owns the client (open + close). * * Side effects (only when `outDir` is provided): * - mkdir -p outDir * - write inventory.json / fuzz.json / classification.json / report.md * - write caveats.json IFF bindings provided with at least one field set */ export declare function scan(client: Client, options?: ScanOptions): Promise; //# sourceMappingURL=index.d.ts.map