/** * graph-config — load the `graph:` block of `opensip-cli.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-cli/contracts` `loadCliDefaults`). * * Launch (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-cli/contracts'; import type { GraphConfig } from '../types.js'; /** * Best-effort load of the `graph:` block of `opensip-cli.config.yml`. * * ADR-0023, Phase 4: the resolved `graph:` block rides on the per-run scope * (`scope.toolConfig.graph`) — the host already strict-validated + precedence- * resolved (flag > env > file > defaults) the whole document before dispatch. So * when a scope is present (every in-process AND forked-worker run goes through * the pre-action hook) this returns the SCOPE value and does NOT re-read YAML. * The YAML read below is the fallback for a caller with no scope (a unit test * driving `loadGraphConfig` directly) — there it stays best-effort: 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. * * @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` > built-in * `default`. Delegates the precedence/tolerance decision to the shared * `resolveToolRecipeName`. The caller turns the returned `name` into rules via * `resolveRecipeToRules(name, { tolerant })`. * * @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