#!/usr/bin/env node import { Command } from 'commander'; /** Global flags shared across all `vg` commands (VG-CLI-SPEC §1.1). */ interface GlobalOpts { /** -C, --cwd */ cwd?: string; /** --deep */ deep?: boolean; /** --json */ json?: boolean; /** --generated-at */ generatedAt?: string; /** --graph (override the map path) */ graph?: string; /** --no-cache (commander exposes this as `cache: false`) */ noCache?: boolean; /** --local (never touch the network) */ local?: boolean; /** --quiet */ quiet?: boolean; /** * --client — the AI on the other end (e.g. `claude`, `cursor`). When an * AI host runs `vg`, passing this lets navigation calls be counted in the local * savings ledger with the command-vs-MCP split, so `vg savings` and the opt-in * share-stats upload can attribute usage. Counts only; a coarse label, not * identity (sanitized before it's recorded). Absent for human-run commands. */ client?: string; /** * --no-daemon (commander exposes this as `daemon: false`) — never auto-start * or use the local runtime; run everything in this process, as vg did before * vgd existed. Also settable once via `VG_NO_DAEMON=1`. */ daemon?: boolean; } interface BuildCmdOpts { only?: string; exclude?: string[]; html?: boolean; report?: boolean; ground?: boolean; jobs?: string; scip?: string | boolean; tsc?: boolean; export?: string; warm?: boolean; grammars?: string; fast?: boolean; index?: boolean; analysisTier?: string; attest?: boolean; verify?: boolean; attestKey?: string; attestation?: string; pub?: string; } interface RunBuildHooks { /** Invoked during the parse phase (even under --quiet / non-TTY hosts). */ onParseProgress?: (done: number, total: number) => void; } declare function runBuild(paths: string[], opts: BuildCmdOpts, global: GlobalOpts, hooks?: RunBuildHooks): Promise; /** The set of registered subcommand names (kept in sync with registration). */ declare const KNOWN_COMMANDS: Set; declare function buildProgram(): Command; declare function dispatch(argv: string[], cwd: string): string[]; declare function main(argv?: string[]): Promise; export { KNOWN_COMMANDS, buildProgram, dispatch, main, runBuild };