Variable: recipes
constrecipes:object
Defined in: src/ai/recipes.ts:39
Consumer-facing recipes introspection API.
Type Declaration​
describe()​
readonlydescribe: (title) =>string|undefined
Returns a human-readable description of a named recipe.
Parameters​
title​
string
Returns​
string | undefined
find()​
readonlyfind: (query) =>RecipeEntry[]
Searches recipes by substring match on title, description, or tags.
Parameters​
query​
string
Returns​
forAI()​
readonlyforAI: () =>RecipeEntry[]
Returns all recipes in an AI-agent-friendly format.
Returns​
forCapability()​
readonlyforCapability: (capability) =>RecipeEntry[]
Returns recipes associated with a specific capability.
Parameters​
capability​
string
Returns​
forDomain()​
readonlyforDomain: (domain) =>RecipeEntry[]
Returns recipes relevant to a specific SAP domain.
Parameters​
domain​
string
Returns​
forProcess()​
readonlyforProcess: (process) =>RecipeEntry[]
Returns recipes for a specific business process.
Parameters​
process​
string
Returns​
getCategories()​
readonlygetCategories: () =>string[]
Returns unique category names across all registered recipes.
Returns​
string[]
getSteps()​
readonlygetSteps: (title) =>string|undefined
Returns the code steps for a named recipe, or undefined.
Parameters​
title​
string
Returns​
string | undefined
getTopRecipes()​
readonlygetTopRecipes: (n) =>RecipeEntry[]
Returns the top n recipes by insertion order.
Parameters​
n​
number
Returns​
has()​
readonlyhas: (title) =>boolean
Returns true if a recipe with the given title exists.
Parameters​
title​
string
Returns​
boolean
list()​
readonlylist: () =>RecipeEntry[]
Returns all registered recipe entries.
Returns​
registry​
registry:
RecipeRegistry
The underlying registry instance (for advanced usage like fromEntries()).
search()​
readonlysearch: (query) =>RecipeEntry[]
Searches recipes by substring match on title, description, or tags.
Parameters​
query​
string
Returns​
select()​
readonlyselect: (filter) =>RecipeEntry[]
Returns recipes matching the given filter criteria.
Parameters​
filter​
category?​
string
priority?​
role?​
Returns​
selectByCategory()​
readonlyselectByCategory: (category) =>RecipeEntry[]
Returns recipes matching the given category.
Parameters​
category​
string
Returns​
selectByPriority()​
readonlyselectByPriority: (priority) =>RecipeEntry[]
Returns recipes matching the given priority level.
Parameters​
priority​
Returns​
selectByRole()​
readonlyselectByRole: (role) =>RecipeEntry[]
Returns recipes matching the given role.
Parameters​
role​
Returns​
toJSON()​
readonlytoJSON: () => readonlyRecipeEntry[]
Exports all recipes as a JSON-serializable array.
Returns​
readonly RecipeEntry[]
validate()​
readonlyvalidate: (title) =>object
Validates that a recipe title exists and returns basic info.
Parameters​
title​
string
Returns​
object
role?​
readonlyoptionalrole:RecipeRole
valid​
readonlyvalid:boolean
Intent​
Provide drop-in parity with mk's recipes object.
Capability​
Recipe discovery, AI test scaffolding.
Example​
import { recipes } from 'playwright-praman';
const essential = recipes.selectByPriority('essential');
const all = recipes.forAI();