/** * Shared types for `celilo module check` and the validators it composes. * * A `Check` is a single named verdict — one row in the report. The same * checks are produced regardless of output format (text or JSON); the * format layer is pure presentation. */ export type CheckStatus = 'ok' | 'warn' | 'fail'; export type CheckCategory = | 'capability' | 'workspace_dep' | 'manifest_schema' | 'contract_version' | 'typescript_build' | 'git_hygiene'; export interface Check { category: CheckCategory; name: string; status: CheckStatus; message: string; /** What the module currently says (manifest claim, package.json range, etc.). */ currentValue?: string; /** What we suggest changing it to. Empty when the fix isn't a single value. */ suggestedValue?: string; /** Convention-generated link to a per-package migration page. */ migrationUrl?: string; } export interface RunChecksOptions { /** Skip the TypeScript build check unconditionally. */ noBuild?: boolean; /** Injectable npm metadata fetcher; defaults to real registry.npmjs.org. */ fetchNpmMetadata?: (packageName: string) => Promise; } export interface NpmMetadata { name: string; /** "latest" tag — the version a fresh `npm install` would pick up. */ latestVersion: string; }