/** * check-invariants (CUT A3) — the fast-lane invariant gate as a finite, * structured command (migrated from `scripts/check-invariants.ts`). It fails when * production source under `packages/**` contains a banned pattern (require / * module.exports / `var` / a default export outside the sanctioned Astro contract * files / a hand-parsed signal axis), or when a committed text file violates the * `.gitattributes` line-ending policy. * * The scan engine (`node:fs` source walk + the `git ls-files --eol` line-ending * probe + the `INVARIANTS` rule set) is INJECTED via `context.runCheckInvariants`, * never imported here, so `@czap/command` stays free of `node:fs`/`child_process`. * Like `audit`/`audit-floor` (and UNLIKE `plumb`), the scan needs `@czap/audit`'s * `normalizeRepoPath` (the one B5b slash-normalize home) and `@czap/command` may * not import `@czap/audit` (it would drag the heavy TS-compiler/glob engine into * `@czap/mcp-server`). So the capability is provisioned ONLY by `@czap/cli`, not * in the shared host factory: the command is CLI-only and NOT `mcpExposed` — * over MCP the capability is absent and the handler degrades to a structured * `capabilityUnavailable` failure. * * @module */ import { Schema } from 'effect'; import { type HandledCommand } from '../registry.js'; /** * Structured payload returned by `check-invariants` — ONE Effect Schema is the * source of both {@link CheckInvariantsPayload} and the descriptor's * `outputSchema`. */ export declare const CheckInvariantsPayloadSchema: Schema.Struct<{ readonly ok: Schema.Boolean; /** Banned-pattern violations, grouped by the rule that flagged them. */ readonly groups: Schema.$Array>; }>>; /** Committed text files whose line endings violate the `.gitattributes` policy. */ readonly lineEndings: Schema.$Array; }>; /** Structured payload returned by `check-invariants`. */ export type CheckInvariantsPayload = Schema.Schema.Type; /** `check-invariants` — scan source for banned patterns + line-ending policy; emit a structured verdict. */ export declare const checkInvariantsCommand: HandledCommand; //# sourceMappingURL=check-invariants.d.ts.map