import type * as ClackPrompts from "@clack/prompts"; import { bootstrapInit } from "../../tools/config/bootstrap-init.js"; import type { CliCommand } from "../router.js"; type PromptModule = typeof ClackPrompts; type InitCommandDeps = { bootstrapInitFn: typeof bootstrapInit; loadPrompts: () => Promise; resolveProjectRoot: (explicitRoot?: string) => string | null; isInteractiveTerminal: () => boolean; backupPrimitives: (targetRoot: string, assetsRoot: string) => void; }; /** * Lazy-load `@clack/prompts` for the interactive init wizard. * * Falls back gracefully if the module is unavailable (e.g., during CI or * partial install), logging a warning and enabling non-interactive mode. * * @returns The loaded prompts module, or null if unavailable. * * @example * ```ts * const prompts = await loadClackPrompts() * if (prompts === null) { /* fallback *\/ } * ``` */ export declare function loadClackPrompts(): Promise; /** * Create the BOOT-02 `init` CLI command. * * The command is a thin router handler: it resolves the project root, decides * between non-interactive defaults and the TTY wizard, then delegates all * filesystem mutation to {@link bootstrapInit} with an explicit scope contract. * * @param deps - Optional injectable dependencies for tests. * @returns The `init` command implementation. * * @example * ```ts * const command = createInitCommand() * ``` */ export declare function createInitCommand(deps?: Partial): CliCommand; /** * Canonical BOOT-02 `init` command export. * * @example * ```ts * const result = await initCmd.handler({ flags: { yes: true }, positionals: [], argv: ["init", "--yes"] }) * ``` */ export declare const initCmd: CliCommand; /** * Back up existing user primitives before a fresh install. * * For each primitive type, checks which files in the target directory * have the same name as shipped files in `assets/{type}/`. Those matching * files are moved to a `.backup/` subdirectory with a timestamp suffix. * User-only files (not in assets) are left untouched. * * @param targetRoot - The OpenCode root directory (e.g. `{projectRoot}/.opencode`). * @param assetsRoot - The package's `assets/` directory path. */ export declare function backupExistingPrimitives(targetRoot: string, assetsRoot: string): void; export {}; //# sourceMappingURL=init.d.ts.map