import { type Recipe } from "./schema/recipe.js"; import { type OperationIr } from "./ir/operations.js"; import type { Plan } from "./runtime/plan.js"; /** * Load a recipe file. Supports both shapes: * * - `.recipe.ts` (or `.tsx`/`.mts`/`.cts`) — TypeScript source compiled * and executed in the recipe sandbox. Recipes export the recipe * object as either the default export or a named export (the first * one found wins). * - `.recipe.json` — pre-serialized recipe JSON. * * The TypeScript path is shared with the schema-aware loader at * `@/sync/typescript-recipe` so brand-kit, agent, campaign, and brief * recipes can also be authored as `.recipe.ts`. * * Validates against `RecipeSchema` (the `Recipe = ComponentTemplateRecipe | * ContentTemplateRecipe` discriminated union) so both kinds parse uniformly. */ export declare const loadRecipe: (filePath: string) => Promise; export declare const writeIr: (filePath: string, ir: OperationIr) => Promise; export declare const loadIr: (filePath: string) => Promise; export declare const writePlan: (filePath: string, plan: Plan) => Promise; export declare const defaultIrPath: (recipeHandle: string, baseDir: string) => string; /** * Bare `.ir.json` filename — for a flat `--output-dir` artifact. * * When `order` is given, a zero-padded numeric prefix is prepended * (`00014-.ir.json`). This is LOAD-BEARING for `push --from-compiled`: * `resolveCompiledIrInputs` reloads the artifact with a plain lexical * `.sort()`, and the apply loop runs IRs in that order. Without the prefix * the set reloads ALPHABETICALLY BY HANDLE — discarding the topological * apply order `compileRecipeSet` emitted — so a recipe that references a * handle sorted after it (e.g. `ai-chat@1` → `ai-context-item@1`) applies * before its referent and its `ref-source-fields` throws "not yet in * captured map". The prefix makes the lexical `.sort()` reproduce the * emitted apply order. 5 digits: the largest real sets are well under * 100k IRs, and fixed width keeps `10` sorting after `9`. */ export declare const irFileName: (recipeHandle: string, order?: number) => string; export declare const defaultPlanPath: (recipeHandle: string, baseDir: string) => string;