/** * build-targets — the host's once-per-run construction of `scope.targets` * (ADR-0037, generic-targeting-runtime Phase 1). * * The composition root reads the already-resolved config document, parses the * host-owned `targets:` / `globalExcludes:` blocks through the * `@opensip-cli/config` Zod field schemas, registers each target into the * substrate `TargetRegistry`, and returns a `BoundedTargetResolver` — the * additive bounded subtype of the structural scope-slot shape `core` declares * — wrapping the registry plus the bound synchronous and cooperative closures, * `applyGlobalExcludes`, and the project `globalExcludes`. The CLI bootstrap * attaches the result as `scope.targets`, * mirroring how `composeAndValidateToolConfig` produces `scope.toolConfig`. * * The host build is the GENERIC half only: it does NOT validate `checkOverrides` * (a check-slug concept) — that cross-validation stays in * `@opensip-cli/fitness`'s loader (Phase 2). A run with no config document, or * a config document with no `targets:` block, yields `undefined` — exactly like * a config-less `toolConfig`. */ import { type BoundedTargetMembershipResolver } from '@opensip-cli/core'; /** * Build the host's `scope.targets` resolver from the validated config document. * * Takes the SAME validated document the single sanctioned reader * (`composeAndValidateToolConfig`) already produced — this is a pure builder, it * never reads the config file itself (ADR-0023: one reader). The host-owned * `targets:` / `globalExcludes:` namespaces were strict-validated whole-document * by the composed schema; they are re-parsed here through the same field schemas * only to recover their narrowed types (idempotent on already-validated data, no * I/O), then each target is registered into a substrate `TargetRegistry` and * wrapped in a `BoundedTargetResolver` with the bound synchronous and bounded * target resolution plus `applyGlobalExcludes` closures. * * @param args.document The validated config document from * `composeAndValidateToolConfig`, or an empty object for a config-less run. * @returns The `BoundedTargetResolver` to attach to `scope.targets`, or `undefined` * when there is no config document or no `targets:` block to resolve. */ export declare function buildTargets(args: { readonly document: unknown; }): BoundedTargetMembershipResolver | undefined; //# sourceMappingURL=build-targets.d.ts.map