/** * Install skill executor — orchestrates the full per-skill installation pipeline. * * Dispatches to a per-refType install function via `switch(ref.refType)`, then * runs shared post-install steps (agent symlinks, lockfile/settings writes). * * @experimental This API is unstable and may change without notice. */ import * as FileSystem from "effect/FileSystem"; import type * as HttpClient from "effect/unstable/http/HttpClient"; import * as Path from "effect/Path"; import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import type { AgentId } from "../../agents/index.js"; import { type RenderedFilesMap } from "../../extensions/index.js"; import type { SkillExtensionRef } from "../refs.js"; import { SourceHostProviders } from "../../source-resolution/index.js"; import { CodingAgentRepository } from "../../agents/index.js"; import type { OperationHandler } from "../../plan/apply-plan.js"; import type { Operation } from "../../plan/plan.js"; import type { JobStepArtifact, JobStepArtifactSource, JobStepArtifactTarget } from "../../plan/plan.js"; import { WorkspaceMutations } from "../../workspace/service-interface.js"; import type { InstallResult } from "./install-result.js"; /** * Args for the install-skill operation. */ export type InstallSkillOperationArgs = { readonly ref: SkillExtensionRef; readonly force: boolean; /** Version constraint from the original input when available. */ readonly versionRange: Option.Option; /** When true, write to lockfile only (skip settings). Used for pack dependencies. */ readonly skipSettings: Option.Option; /** When true, fail on unknown configured agents instead of warning+skip. */ readonly strictUnknownAgents: Option.Option; /** Named registry source that provided the ref (written to lockfile for registry skills). */ readonly sourceName: Option.Option; }; /** * Add a skill to the workspace. * * @experimental This API is unstable and may change without notice. */ export type InstallSkillOperation = Operation<"install-skill", InstallSkillOperationArgs>; export type InstallableSkillTarget = { readonly agentId: AgentId; readonly targetDir: string; }; export type InstallableSkillTargetLocation = { readonly targetDir: string; readonly agentIds: ReadonlyArray; }; export declare const artifactAgentIdsFromTargets: (targets: ReadonlyArray) => ReadonlyArray; export declare const artifactTargetAgentIds: (agentIds: ReadonlyArray) => ReadonlyArray; export declare const groupInstallTargetsByDirectory: (targets: ReadonlyArray, workspaceRoot: string) => Effect.Effect, never, FileSystem.FileSystem | Path.Path>; export declare const skillArtifactFromTargets: (args: { readonly targets: ReadonlyArray; readonly workspaceRoot: string; readonly sanitizedName: string; readonly scope: JobStepArtifact["scope"]; readonly change: JobStepArtifact["change"]; readonly workspaceTargets?: ReadonlyArray; }) => Effect.Effect<{ targets?: JobStepArtifactTarget[]; path: string; scope: "user" | "project"; agents: readonly string[]; change: "removed" | "created" | "unchanged" | "updated"; }, never, Path.Path | FileSystem.FileSystem>; export declare const gitHostedSkillArtifactSource: (ref: SkillExtensionRef) => JobStepArtifactSource | undefined; export { computeSkillSourceHash } from "./source-hash.js"; /** * Build a RenderedFilesMap from per-agent copy-mode install results. * Only includes agents where mode === "copy" and success === true. * * @internal Exported for testing only. */ export declare const buildRenderedFilesFromResults: (installableTargets: ReadonlyArray<{ agentId: AgentId; targetDir: string; }>, agentResults: ReadonlyArray, toWorkspaceRelativePath: (path: string) => string) => RenderedFilesMap; /** * Install-skill operation handler. * * Dispatches to a per-refType install function producing a MaterializedSkill, * then runs shared post-install steps: * 1. Create symlinks from each agent's skills dir (concurrent) * 2. Update lockfile/settings entry (failures logged as warnings) * 3. Compute and return overall result */ export declare const installSkill: OperationHandler; //# sourceMappingURL=install.d.ts.map