/** * vclaw schema --json — the v3 introspection bundle. * * Returns the full CLI contract in one call: commands, flags, artifact * schemas, error codes, exit codes. Agents call this once to learn the * surface, then drive the CLI without further introspection. * * Stateless function — no fs writes, no env reads, no network. Pure * read of bundled JSON + reflection of the dispatch table. */ import { type MultiShotPreset } from './multi-shot-prompt.js'; import { type PromptQualityIssueExplanation } from './prompt-quality.js'; export interface CommandFlag { name: string; /** "value" if it takes an argument, "boolean" if it's a switch. */ kind: 'value' | 'boolean'; description?: string; } /** A command (or one of its aliases) that still works but prints a one-line stderr notice. */ export interface CommandDeprecation { /** Package version the notice first shipped in. */ since: string; /** What to type instead — a bare `video ...` spelling. Absent when nothing replaces it. */ replacement?: string; /** One short clause of context (why, or where to read more); never a command. */ note?: string; } export interface CommandSpec { name: string; usage: string; description?: string; flags?: CommandFlag[]; /** Backwards-compat aliases that dispatch to this command. */ aliases?: string[]; /** * The whole command is deprecated: it keeps working, and every invocation * prints ONE line to stderr naming `replacement` (stdout stays untouched). * Lifecycle: docs/DEPRECATION.md "Command lifecycle". */ deprecated?: CommandDeprecation; /** * Aliases in `aliases` that are deprecated individually; the replacement is * the canonical `name` unless the entry names another command (`library * find` → `find-library`). An alias absent from here is a declared, supported * spelling (`execute`, `execution-plan`) and prints nothing. */ deprecatedAliases?: Array<{ name: string; } & CommandDeprecation>; } export interface SchemaDump { version: string; generatedAt: string; exitCodes: Record; errorCodes: ReadonlyArray; commands: CommandSpec[]; artifactSchemas: Record; multiShot: { presets: readonly MultiShotPreset[]; issueExplanations: readonly PromptQualityIssueExplanation[]; }; } /** * Hand-curated list of subcommands covering the FULL VIDEO_DISPATCH table in * src/cli/vclaw.ts (back-compat aliases — execution-plan/execute/preflight — * are listed via their canonical entries only). cli-schema.test.ts asserts the * exact count, cli-dispatch-table.test.ts asserts every advertised command + * alias resolves to a dispatch entry, and cli-schema-dispatch-sync.test.ts * asserts the REVERSE: every dispatch key is either listed here or an alias of * a listed command — so `vclaw schema --json` can never silently drift behind * the dispatch again (it drifted to 40 missing public commands once). */ export declare const COMMANDS: CommandSpec[]; /** * The CLI's own version, read from the bundled package.json rather than * hardcoded — a literal here silently went 7 releases stale (alpha.1 while the * package was alpha.8), and `cli-schema.test.ts` only asserted it was a string. */ export declare function loadPackageVersion(): string; /** The notice line: `use ''` only when there is a command to use. */ export declare function formatDeprecationNotice(typed: string, d: CommandDeprecation): string; /** The parenthetical `vclaw` help appends to a deprecated spelling's usage line. */ export declare function deprecationLabel(d: CommandDeprecation): string; /** * The one-line stderr notice for a typed `video` subcommand, or null. Pure: * `main` calls it with the RESOLVED subcommand followed by the remaining argv * (a noun-verb spelling has already collapsed to its kebab name). The two-word form * (`library find`) is tried before the one-word form so a deprecated verb of a * multi-verb command can be named without deprecating the command. Matches the * canonical `name` and every entry of `aliases`; an alias prints only when it * is listed in `deprecatedAliases`. */ export declare function findDeprecationNotice(videoArgs: readonly string[], commands?: readonly CommandSpec[]): string | null; export declare function buildSchemaDump(): SchemaDump; //# sourceMappingURL=cli-schema.d.ts.map