/** * Semantic validator for CLI Contracts documents. * * Structural validation (required fields, types, value constraints) is * handled by the Zod schema in schema.ts at parse time. This module * performs higher-level semantic checks that cannot be expressed in * a JSON Schema / Zod schema: * * - duplicate command paths within a command set * - duplicate argument / option names * - duplicate option aliases * - variadic argument placement * - exit code range (0-255) * - stream schema vs framing conflict * - unresolved $ref targets * - empty command set warnings * - constraint references to unknown option / argument names * * Enforcement layer note (see also README "Constraints" section): * The `constraints` block (mutuallyExclusive / requiredOneOf / requiredTogether) * is enforced HERE, at contract-validation time, only as a *reference integrity* * check: every name it lists must resolve to a real option, alias, or argument * declared on the same command (or a global option of its command set). It is a * static check on the contract document. cli-contracts does NOT itself parse * end-user CLI invocations, so the *behavioral* semantics of the constraints * (rejecting a runtime invocation that supplies two mutually-exclusive options, * etc.) are the responsibility of the target CLI's own argument parser at * runtime; the contract merely declares them. */ import type { CliContractsDocument, Command, Diagnostic, ValidateResult } from "./types.js"; export declare function validateContract(doc: CliContractsDocument, options?: { basePath?: string; }): ValidateResult; export declare function validateXAgent(xAgent: unknown, basePath: string): Diagnostic[]; export declare function validateMemoryRef(cmd: Command, basePath: string): Diagnostic[]; export declare function validateXAgentDeprecation(xAgent: Record, basePath: string): Diagnostic[]; export declare function validateEffectsConsistency(cmd: Command, cmdId: string, basePath: string): Diagnostic[]; //# sourceMappingURL=validator.d.ts.map