import { Command } from "commander"; import { type ContractPipelineArtifactName } from "./contractPipeline/artifactStore.js"; import type { ValidationIssue } from "audit-tools/shared"; import { runTracked } from "audit-tools/shared"; declare const program: Command; export interface ValidateArtifactActionResult { status: "ok" | "error"; name?: ContractPipelineArtifactName; issue_count?: number; issues?: ValidationIssue[]; message?: string; } /** * The `validate-artifact --name X` self-check's full logic, exported so tests * can call it directly (no dist build / subprocess race). Returns the JSON body * + exit code the CLI action prints/exits with, without doing either itself. * * Beyond the per-artifact structural validator, this ALSO loads the on-disk * sibling contract-pipeline artifacts (under `/intake/contract/`) * and runs the SAME cross-artifact gates the plural `validate-artifacts` sweep * and `next-step` enforce (evaluateContractPipelineCrossGates — single-sourced * in validation/contractPipelineGates.ts), substituting the in-flight `name` * payload for its on-disk version so the in-flight edit always wins over a * stale/absent sibling. Without this, a shape-valid artifact missing its * cross-artifact obligations (e.g. a test_validator_plan missing its CE-006 * scoped negative) could self-validate "ok" here and only fail later at * next-step — the exact authoring round-trip this closes. */ export declare function runValidateArtifactAction(options: { name: string; file?: string; root: string; artifactsDir: string; }): Promise<{ result: ValidateArtifactActionResult; exitCode: number; }>; export { program }; export declare function parseProgram(argv: string[]): void; /** * Rewrite `=true` → `` and `=false` → `--no-` so a * value-less commander boolean can still be set false via the `=` spelling. A * non-boolean `=` value fails loudly rather than silently defaulting. */ export declare function normalizeBooleanFlagArgv(argv: string[], flag: string): string[]; /** * Resolve the remediation artifacts dir. An explicit `--artifacts-dir` is * honored verbatim; the unchanged commander default (`.audit-tools/remediation`) * rebases onto the anchored `--root` via the shared `remediationArtifactsDir()` * helper, so `--root ` lands the default under `/.audit-tools/remediation`. * The `.audit-tools/...` join literal lives only in the shared path module, and * `resolveRepoRoot()` climbs the root out of a drifted cwd so a bare `--root .` * run from inside `.audit-tools/` cannot mint a phantom nested tree. */ export declare function resolveArtifactsDirOption(root: string, artifactsDir: string): string; export declare function runValidateCommand(deps?: { run?: typeof runTracked; log?: (message: string) => void; error?: (message: string) => void; }): number; //# sourceMappingURL=index.d.ts.map