/** * Shared between `recipes/cli.ts` and `recipes/load-cli.ts`. The two * CLI surfaces accept the same `--dir / --global / --json / --quiet` * flags and open the store the same way; keeping that in one place * means a future flag (e.g. `--cache`) updates both surfaces. */ import { RecipeStore } from "./store.js"; import type { ActionRecipe, RecipeStatus } from "./types.js"; export interface CommonOpts { dir?: string; global?: boolean; json?: boolean; quiet?: boolean; } export declare const COMMON_OPTIONS: { dir: { type: "string"; }; global: { type: "boolean"; }; json: { type: "boolean"; }; quiet: { type: "boolean"; }; help: { type: "boolean"; short: string; }; }; export declare function openStore(opts: CommonOpts): RecipeStore; export declare const RECIPE_STATUSES: readonly ["candidate", "verified", "demoted"]; export declare const RECIPE_SELECTIONS: readonly ["uniform", "by-success-rate"]; export declare function isRecipeStatus(value: string): value is RecipeStatus; export declare function isRecipeSelection(value: string): value is (typeof RECIPE_SELECTIONS)[number]; /** * `process.exit(1)` with a message when the recipe isn't in the store. * Throws `never`, so TS narrows the caller's `recipe` to `ActionRecipe`. */ export declare function requireRecipe(store: RecipeStore, name: string): ActionRecipe; export declare function requireVersion(store: RecipeStore, name: string, version: number): ActionRecipe; //# sourceMappingURL=cli-common.d.ts.map