/** * Check registry — central registration and discovery. * * Supports namespaced slugs: checks are stored as `namespace:slug` when * a namespace is provided. Bare slug lookups resolve via a reverse index, * with a warning logged on ambiguity. * * Built on the kernel's unified `Registry` with * `duplicatePolicy: 'silent-skip'` — re-importing the same check is a * no-op (the historical behaviour the file's previous incarnation * documented). The `bareSlugIndex` (slug → list of namespaced keys) * lives alongside the base because it's a domain-specific lookup * structure not in the base's shape. */ import type { Check } from './check-types.js'; /** Registry of fitness checks, indexed by namespaced key with a bare-slug reverse index. */ export declare class CheckRegistry { private readonly inner; /** Reverse index: bare slug → list of namespaced keys */ private readonly bareSlugIndex; register(check: Check, namespace?: string): void; /** Get a check by slug. Supports both namespaced and bare slugs. */ get(slug: string): Check; /** Check whether a slug is registered (namespaced or bare). */ has(slug: string): boolean; /** Get a check by slug, or `undefined` if not registered (non-throwing {@link get}). */ find(slug: string): Check | undefined; list(): Check[]; /** Get the namespace for an exact registry key or the first registered bare-slug match. */ getNamespace(slugOrKey: string): string | undefined; listEnabled(): Check[]; byTag(tag: string): Check[]; /** Get a check by slug, returning undefined if not found. */ getBySlug(slug: string): Check | undefined; /** Return all registered keys (namespaced where applicable). */ listSlugs(): string[]; /** Return all checks with a given bare slug across all namespaces. */ listByBareSlug(bareSlug: string): Check[]; /** * Resolve a slug to its canonical registry key (fail-closed on ambiguity). * * - Exact registry keys (namespaced or bare) are returned unchanged. * - A namespaced ref whose exact key is NOT registered (e.g. a built-in * recipe's `@opensip-cli/checks-universal:no-console-log` against a * bare-registered first-party check) falls back to its bare slug — still * fail-closed if that bare slug is genuinely ambiguous. * - Bare slugs resolve via the reverse index; multiple matches return * `undefined` and emit `check.registry.ambiguous` (mirrors {@link resolve}). * - Unknown slugs return `undefined`. */ resolveBareSlug(slug: string): string | undefined; get size(): number; /** * Resolve a slug to a Check. * - If slug contains ':', exact lookup. * - If bare slug, use reverse index. Single match → return. * Multiple candidates → throw NotFoundError listing them (ambiguity is * now a hard failure rather than load-order-dependent silent choice of [0]). * Use listByBareSlug() when enumeration of all is desired. */ private resolve; } export { type Check } from './check-types.js'; //# sourceMappingURL=registry.d.ts.map