/** * Install pack operation handler. * * Fetches the pack archive, extracts to the managed location, and * writes pack metadata to settings and lockfile. * * @experimental This API is unstable and may change without notice. */ import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import type { Option } from "effect/Option"; import type { Handle } from "../../extensions/handle.js"; import type { Version } from "../../version-constraints/version-constraints.js"; import type { PackRef } from "../refs.js"; import { SourceHostProviders } from "../../source-resolution/index.js"; import type { OperationHandler } from "../../plan/apply-plan.js"; import type { Operation } from "../../plan/plan.js"; import { WorkspaceMutations } from "../../workspace/service-interface.js"; import { type ResolvedPackDependencyMap } from "../resolved-dependency.js"; /** * Args for the install pack operation. */ export interface InstallPackOperationArgs { /** Pack name (e.g., "my-pack") */ readonly packName: string; /** Pack owner (e.g., "@acme") */ readonly owner: Handle; /** Exact resolved version */ readonly resolvedVersion: Version; /** SRI integrity string */ readonly integrity: string; /** Registry source name */ readonly sourceName: string; readonly publisherBindingId: string; /** Resolved skill FQNs to exact versions */ readonly resolvedSkills: ResolvedPackDependencyMap; /** Resolved MCP server FQNs to exact versions */ readonly resolvedMcpServers: ResolvedPackDependencyMap; /** Resolved subagent FQNs to exact versions */ readonly resolvedSubagents: ResolvedPackDependencyMap; /** Resolved rule FQNs to exact versions */ readonly resolvedRules: ResolvedPackDependencyMap; /** Resolved hook FQNs to exact versions */ readonly resolvedHooks: ResolvedPackDependencyMap; /** Resolved knowledge FQNs to exact versions */ readonly resolvedKnowledge: ResolvedPackDependencyMap; /** Version constraint from the original source (e.g. "^2.0.0"). Preserved in settings. */ readonly versionRange: Option; /** Pack extension ref for fetching the archive. */ readonly ref: PackRef; } /** * Add a pack to the workspace. * * @experimental This API is unstable and may change without notice. */ export type InstallPackOperation = Operation<"install-pack", InstallPackOperationArgs>; /** * Install pack operation handler. * * Fetches the pack archive via sources.fetch(), extracts to the managed * source-qualified acquired pack location, then records * the pack in settings and lockfile. */ export declare const installPack: OperationHandler; //# sourceMappingURL=install.d.ts.map