import { PostScaffoldResult } from "./outfitter-hcexcvxe.js"; import { OutputMode } from "@outfitter/cli/types"; import { Result } from "@outfitter/contracts"; import { AddBlockResult } from "@outfitter/tooling"; import { Command } from "commander"; /** Options for the scaffold command, corresponding to CLI flags and positional arguments. */ interface ScaffoldOptions { /** Working directory to scaffold in. */ readonly cwd: string; /** Preview changes without writing to disk. */ readonly dryRun: boolean; /** Overwrite existing files without prompting. */ readonly force: boolean; /** Timeout in milliseconds for `bun install`. */ readonly installTimeout?: number | undefined; /** Use `workspace:*` protocol for `@outfitter` dependencies. */ readonly local?: boolean | undefined; /** Override the default target directory name. */ readonly name?: string | undefined; /** Skip adding default tooling blocks. */ readonly noTooling?: boolean | undefined; /** Skip running `bun install` after scaffolding. */ readonly skipInstall: boolean; /** Target preset ID to scaffold (e.g. "cli", "mcp"). */ readonly target: string; /** Comma-separated tooling block names to include. */ readonly with?: string | undefined; } /** Result of a successful `outfitter scaffold` run. */ interface ScaffoldCommandResult { /** Tooling blocks that were added, if any. */ readonly blocksAdded?: AddBlockResult | undefined; /** Whether the project was converted from single-package to workspace. */ readonly converted: boolean; /** Present only for dry-run invocations; contains the planned operations and summary counts. */ readonly dryRunPlan?: { readonly operations: readonly unknown[]; readonly summary: Record; } | undefined; /** Details of the existing package that was relocated during workspace conversion. */ readonly movedExisting?: { readonly from: string; readonly to: string; readonly name: string; } | undefined; /** Results from post-scaffold steps (install, next-step hints). */ readonly postScaffold: PostScaffoldResult; /** Absolute path to the workspace root. */ readonly rootDir: string; /** The target preset ID that was scaffolded. */ readonly target: string; /** Absolute path to the scaffolded target directory. */ readonly targetDir: string; /** Whether a new workspace pattern was added to the root package.json. */ readonly workspacePatternsUpdated: boolean; } /** Error returned when scaffolding fails. */ declare class ScaffoldCommandError extends Error { readonly _tag: "ScaffoldCommandError"; /** @param message - Human-readable description of the scaffold failure. */ constructor(message: string); } /** * Runs the full scaffold flow: detects project structure, converts to workspace * if needed, executes the preset plan, and performs post-scaffold steps. */ declare function runScaffold(options: ScaffoldOptions): Promise>; /** * Registers the `scaffold` command on a Commander program. * @deprecated Use action-registry CLI wiring via `buildCliCommands(outfitterActions, ...)`. */ declare function scaffoldCommand(program: Command): void; /** Options controlling how scaffold results are rendered (human-readable, JSON, or JSONL). */ interface PrintScaffoldResultsOptions { readonly mode?: OutputMode; } /** * Renders scaffold results to stdout. Handles dry-run plans, structured output modes, * and human-readable summaries including workspace conversion details and next steps. */ declare function printScaffoldResults(result: ScaffoldCommandResult, options?: PrintScaffoldResultsOptions): Promise; export { PrintScaffoldResultsOptions, printScaffoldResults, ScaffoldOptions, ScaffoldCommandResult, ScaffoldCommandError, runScaffold, scaffoldCommand };