/** * Add-to-pack operation — applies a precomputed manifest-add delta to a pack manifest. * * Validates manifest precondition (stale check) before writing. * * @experimental This API is unstable and may change without notice. */ import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import type { Handle } from "../../extensions/index.js"; import type { OperationHandler } from "../../plan/apply-plan.js"; import type { Operation } from "../../plan/plan.js"; import { WorkspaceMutations } from "../../workspace/service-interface.js"; /** * Args for the add-to-pack operation. */ export interface AddToPackOperationArgs { /** Pack name (without owner). */ readonly packName: string; /** Pack owner (e.g., "@myorg"). */ readonly packOwner: Handle; /** Precomputed manifest delta: FQN -> version range entries to add. */ readonly additions: Readonly>; /** Manifest content hash at plan time for stale-check. */ readonly manifestHash: string; } /** * Add extensions to a pack manifest. * * @experimental This API is unstable and may change without notice. */ export type AddToPackOperation = Operation<"add-to-pack", AddToPackOperationArgs>; /** * Add-to-pack operation handler. * * 1. Short-circuit if additions map is empty (no-op) * 2. Read current manifest and compute hash * 3. Compare hash with args.manifestHash (stale check) * 4. Apply additions to manifest * 5. Write updated manifest */ export declare const addToPack: OperationHandler; //# sourceMappingURL=add-to-pack.d.ts.map