/**
 * `extends:` mechanism — layer a child pack over a parent without forking.
 *
 * Per `docs/opensquid-real-design.md` §"Manifest fields" (`extends` row) and
 * §"Conflict resolution policy". `extends:` is the EXPLICIT override path:
 * the user opts into "child wins on field collision, child skills override
 * parent skills by name" rather than letting the runtime silently pick a
 * winner. It is the named alternative to the forbidden auto-resolve.
 *
 * Merge semantics (locked):
 *   - Top-level scalar fields (name, version, scope, goal, description,
 *     `extends`) — child value replaces parent value. `description` falls
 *     back to parent only when the child supplied the empty string default
 *     (so an "I forgot to write one" child doesn't blank out a real parent
 *     description); explicit child string wins.
 *   - List fields (requires, conflicts) — child REPLACES parent. Union
 *     semantics would silently re-introduce parent dependencies a child
 *     wanted to drop; replacement keeps `extends:` predictable.
 *   - `evolves` — child wins. A child that wants the wedge gate off needs
 *     to be able to turn it off regardless of parent default.
 *   - `skills` — merged by `name`. Same-named skill in child replaces
 *     parent's; new skills append; parent-only skills carry through.
 *
 * Defensive deep-clone: `JSON.parse(JSON.stringify(parent))` strips Dates,
 * RegExps, functions, and `undefined`. `Pack` is data-only (Zod-validated
 * plain objects with strings / numbers / booleans / nested objects / arrays),
 * so the round-trip is lossless. Documented here so a future field addition
 * doesn't accidentally break the contract — adding a `Date` field to `Pack`
 * means choosing a different clone strategy. Cloning the PARENT (not the
 * child) is intentional: the parent provides the base structure, and we
 * spend most of the merge code mutating that clone with child values.
 *
 * `detectExtendsCycle` walks the `extends` chain starting from each pack
 * and flags any pack whose chain re-enters itself. Returns the set of
 * cycle-START names; callers (validation layer) decide whether to error
 * or surface to the user. Out-of-scope: `extends:` pointing at a missing
 * parent — that's a validation concern, not a cycle concern; the caller
 * (loader) handles missing parents before invoking this function.
 *
 * Imports from: runtime/types.ts (Pack).
 * Imported by: future load-orchestrator (Phase 5 integration); re-exported
 * via packs/index.ts.
 */
import type { Pack } from '../runtime/types.js';
export declare function applyExtends(child: Pack, parent: Pack): Pack;
export declare function detectExtendsCycle(packs: Pack[]): string[];
//# sourceMappingURL=apply_extends.d.ts.map