/** * graph-config — load the `graph:` block of `opensip-tools.config.yml` * into a {@link GraphConfig}. * * The graph rule knobs (`minDuplicateBodyLines`, `minDuplicateBodySize`, * `minCrossPackageDuplicatePackages`, `minCrossPackageDuplicateBodySize`, * `entryPointHashes`, `severityOverrides`) are owned by the graph tool, so the graph engine * reads its own config block — mirroring the way fitness owns its * sections and the CLI seam owns the `cli:` block * (`@opensip-tools/contracts` `loadCliDefaults`). * * Release 2.10.0 (ADR-0023, Phase 4): the block is now read through graph's * own Zod {@link GraphConfigSchema} (the same schema graph contributes to the * host's composed whole-document validation) instead of the old hand-rolled * `projectGraphConfig`. The composed dispatch-level validation is the STRICT * gate that rejects a typo inside `graph:` before any command runs; this * loader stays permissive at its own call sites — a missing config, malformed * YAML, an absent `graph:` key, or a block that fails the schema all collapse * to `{}` so a rule falls back to its in-rule default and a mid-run read never * throws. */ import { type ResolvedRecipe } from '@opensip-tools/contracts'; import type { GraphConfig } from '../types.js'; /** * Best-effort load of the `graph:` block from `opensip-tools.config.yml`. * * Returns `{}` when the config is missing, unreadable, malformed, has no * `graph:` section, or the section fails the graph schema — every rule then * falls back to its in-rule default. The strict typo rejection happens at the * dispatch-level composed validation, not here. * * @param cwd Project root for config resolution. * @param explicitPath Optional `--config ` override. */ export declare function loadGraphConfig(cwd: string, explicitPath?: string): GraphConfig; /** * Resolve which recipe NAME a `graph` run should use (ADR-0022), applying the * tool-scoped precedence: explicit `--recipe` > `graph.recipe` > deprecated * `cli.recipe` > built-in `default`. Reads both the `graph:` block and the * `cli:` block and delegates the precedence/tolerance decision to the shared * `resolveToolRecipeName`. The caller turns the returned `name` into rules via * `resolveRecipeToRules(name, { tolerant })` and warns on a deprecated fallback. * * @param cwd Project root for config resolution. * @param explicit The `--recipe ` flag value (undefined when absent). * @param explicitPath Optional `--config ` override. */ export declare function resolveGraphRecipeSelection(cwd: string, explicit: string | undefined, explicitPath?: string): ResolvedRecipe; //# sourceMappingURL=graph-config.d.ts.map