/** * @fileoverview Scope-owned fitness registries — the simulation pattern. * * Each `RunScope` owns its own check + recipe registries (D7 — tool * subscopes via module augmentation). The fitness tool's * `contributeScope` hook constructs fresh registries per CLI invocation * and attaches them to `scope.fitness.{checks,recipes}`. The module-level * singletons (`defaultRegistry` / `defaultRecipeRegistry`) are gone — * consumers read via `currentCheckRegistry()` / `currentRecipeRegistry()`, * which route through the scope-bound instances and throw outside a scope. * * Public API (mirrors simulation's `createScenarioRegistry` / * `currentScenarioRegistry`): * - `createCheckRegistry()` — factory used by `contributeScope`. * - `createRecipeRegistry()` — factory used by `contributeScope`. * - `createFitnessLoadState()`— fresh `ensureChecksLoaded` lifecycle slot. * - `currentCheckRegistry()` — reads `scope.fitness.checks`; throws * outside a scope / when the subscope is absent. * - `currentRecipeRegistry()` — reads `scope.fitness.recipes`; same throws. * - `currentFitnessLoadState()` — reads `scope.fitness.load`; same throws. */ import { FitnessRecipeRegistry } from '../recipes/registry.js'; import { MemoryProfiler } from './memory-profiler.js'; import { CheckRegistry } from './registry.js'; import type { FitnessLoadState } from '../scope-augmentation.js'; import '../scope-augmentation.js'; /** Construct a fresh check registry for a single `RunScope`. */ export declare function createCheckRegistry(): CheckRegistry; /** Construct a fresh recipe registry (built-ins pre-seeded) for a single `RunScope`. */ export declare function createRecipeRegistry(): FitnessRecipeRegistry; /** Construct a fresh, empty `ensureChecksLoaded` lifecycle slot for a `RunScope`. */ export declare function createFitnessLoadState(): FitnessLoadState; /** Read the current scope's check registry. */ export declare function currentCheckRegistry(): CheckRegistry; /** Read the current scope's recipe registry. */ export declare function currentRecipeRegistry(): FitnessRecipeRegistry; /** Read the current scope's `ensureChecksLoaded` lifecycle state. */ export declare function currentFitnessLoadState(): FitnessLoadState; /** Construct a fresh per-`RunScope` memory profiler (mirrors the registry factories). */ export declare function createMemoryProfiler(): MemoryProfiler; /** Resolve the active, scope-bound memory profiler. */ export declare function resolveMemoryProfiler(): MemoryProfiler; //# sourceMappingURL=scope-registry.d.ts.map