export type RecipeKind = "channel" | "sandbox" | "model-provider" | "skill" | "policy" | "database" | "tooling" | "databricks"; export interface RecipeFile { path: string; content: string; } export interface Recipe { /** Monotonically increasing managed recipe contract version. */ version?: number; kind: RecipeKind; name: string; /** Unique one-word CLI aliases, for example `fh add slack`. */ aliases?: string[]; description: string; files: RecipeFile[]; envExample: string[]; test: string; dependencies?: string[]; devDependencies?: string[]; /** Compatible package ranges. Unlisted dependencies use the CLI defaults. */ dependencyRanges?: Record; devDependencyRanges?: Record; /** User-facing notes applied when upgrading from a prior managed version. */ upgrades?: Record; /** Additional commands to run after installation; the generated contract test is always included. */ verificationCommands?: string[]; /** Exact generated baselines used to distinguish safe upgrades from user edits. */ previousVersions?: Record; } export declare const RECIPE_MARKER_PREFIX = "fabric-harness-recipe:"; export declare const RECIPES: Record; export declare function resolveRecipeAlias(alias: string): { kind: RecipeKind; name: string; } | undefined; export interface RunRecipeOptions { kind: RecipeKind; name: string; dir: string; force?: boolean; install?: boolean; mode?: "add" | "update"; dryRun?: boolean; json?: boolean; } export type RecipeFileAction = "create" | "update" | "unchanged" | "skip" | "conflict"; export type RecipeDependencyAction = "add" | "satisfied" | "unmanaged" | "conflict"; export interface RecipeFileChange { path: string; action: RecipeFileAction; reason: string; content?: string; } export interface RecipeDependencyChange { name: string; range: string; section: "dependencies" | "devDependencies"; action: RecipeDependencyAction; existing?: string; } export interface RecipePlan { mode: "add" | "update"; root: string; recipe: { kind: RecipeKind; name: string; version: number; description: string; }; packageManager: PackageManagerName; packageJsonPath?: string; packageJsonContent?: string; files: RecipeFileChange[]; dependencies: RecipeDependencyChange[]; verificationCommands: string[]; upgrades: string[]; conflicts: string[]; } export type PackageManagerName = "pnpm" | "npm" | "yarn" | "bun"; export declare function detectPackageManager(root: string): Promise; export declare function dependencyInstallArgs(manager: PackageManagerName, dependencies: string[], development?: boolean): string[]; export declare function planRecipe({ kind, name, dir, force, install, mode, }: RunRecipeOptions): Promise; export declare function runRecipe(options: RunRecipeOptions): Promise; export declare function installDeclaredDependencies(root: string, requiredDependencies: string[], requiredDevDependencies?: string[], install?: boolean): Promise; export declare function rangesCompatible(existing: string, required: string): boolean; /** * Spawn options for the package-manager install. On Windows the package * managers are `.cmd` shims that only resolve through a shell (same * convention as the deploy targets). */ export declare function dependencyInstallSpawnOptions(cwd: string, platform?: NodeJS.Platform): { cwd: string; stdio: "inherit"; shell?: boolean; }; //# sourceMappingURL=index.d.ts.map