/** * Shared install command workflow orchestration. * * Defines the `InstallExtensionCommandWorkflowActions` interface and * `runInstallCommandWorkflow` function shared by all install command handlers. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import type * as Scope from "effect/Scope"; import type { AppError } from "../../app-error/index.js"; import { CliRenderer } from "../../cli-renderer/index.js"; import type { PromptCancelled } from "../../cli-prompt/prompt-cancelled.js"; import type { Plan } from "../../plan/plan.js"; import type { OperationResolution } from "../../plan/operation-resolution.js"; import type { PlanExecution } from "../../cli-runtime/confirmation-recovery.js"; /** * Type-specific actions for install command workflows. * * Each extension type provides its own implementation of these actions. * The generic type parameters allow full type safety per extension type. * * @typeParam Args - Raw command arguments from the active CLI parser * @typeParam Parsed - Parsed/validated arguments * @typeParam Req - Source request type (for resolution) * @typeParam Ref - Extension ref type (discovery output) * @typeParam Intent - Command-specific install intent */ export interface InstallExtensionCommandWorkflowActions { readonly parseArgs: (args: Args) => Effect.Effect; readonly resolveSourceRequests: (parsed: Parsed) => Effect.Effect, AppError | PromptCancelled>; readonly discoverRefs: (reqs: ReadonlyArray) => Effect.Effect, AppError, Scope.Scope>; readonly finalizeIntent: (parsed: Parsed, refs: ReadonlyArray) => Effect.Effect; readonly buildPlan: (intent: Intent) => Effect.Effect; } /** * Run the canonical install command workflow. * * Executes phases in order: parse -> resolveSource -> discover -> * finalizeIntent -> buildPlan -> previewOrApplyPlan. */ export declare const buildInstallCommandPlan: (args: Args, actions: InstallExtensionCommandWorkflowActions, options?: { readonly transformIntent?: (intent: Intent) => Intent; readonly transformPlan?: (plan: Plan) => Effect.Effect; }) => Effect.Effect, AppError | PromptCancelled, Scope.Scope | TransformRequirements>; /** * Run the canonical install command workflow. * * Executes phases in order: parse -> resolveSource -> discover -> * finalizeIntent -> buildPlan -> previewOrApplyPlan. */ export declare const runInstallCommandWorkflow: (args: Args, actions: InstallExtensionCommandWorkflowActions, options: { readonly execution: PlanExecution; readonly transformIntent?: (intent: Intent) => Intent; readonly transformPlan?: (plan: Plan) => Effect.Effect; }) => Effect.Effect, AppError | PromptCancelled, import("effect/Path").Path | import("effect/FileSystem").FileSystem | import("../../workspace/service-interface.ts").WorkspaceMutations | CliRenderer | import("../../cli-flags/verbosity.ts").Verbosity | import("../../workspace/resolve-plan-interaction.ts").ResolvePlanInteraction | Exclude>; //# sourceMappingURL=workflow.d.ts.map