Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Class RecipeRegistry

    Queryable registry of reusable test pattern recipes.

    Provide curated SAP Fiori test patterns to AI agents and human testers.

    pramanAI.recipes

    const registry = new RecipeRegistry();
    const aiRecipes = registry.forAI();
    Index

    Constructors

    Methods

    • Creates a registry seeded with an explicit list of entries.

      Parameters

      • entries: readonly {
            capabilities: string[];
            description: string;
            domain: string;
            id: string;
            name: string;
            pattern: string;
            priority:
                | "optional"
                | "essential"
                | "recommended"
                | "advanced"
                | "deprecated";
        }[]

        Recipe entries to seed the registry with.

      Returns RecipeRegistry

      A new RecipeRegistry instance containing the given entries.

      Use this factory in tests or plugins to provide a known set of recipes without modifying GENERATED_RECIPES.

      const registry = RecipeRegistry.fromEntries([authRecipe, navRecipe]);
      
    • Returns all recipes in an AI-agent-friendly format.

      Returns {
          capabilities: string[];
          description: string;
          domain: string;
          id: string;
          name: string;
          pattern: string;
          priority:
              | "optional"
              | "essential"
              | "recommended"
              | "advanced"
              | "deprecated";
      }[]

      All recipe entries ordered by insertion.

      • capabilities: string[]

        Capability IDs or refs this recipe uses.

      • description: string

        One or two sentence explanation.

      • domain: string

        Domain category for grouping.

      • id: string

        Unique kebab-case identifier.

      • name: string

        Short descriptive title.

      • pattern: string

        Ready-to-use TypeScript code pattern.

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level for adoption guidance.

      Currently returns all registered entries. Future versions may apply token-budget-aware truncation or relevance scoring.

      const allRecipes = registry.forAI();
      const prompt = JSON.stringify(allRecipes);
    • Returns the top n recipes from the registry.

      Parameters

      • n: number

        Maximum number of recipes to return.

      Returns {
          capabilities: string[];
          description: string;
          domain: string;
          id: string;
          name: string;
          pattern: string;
          priority:
              | "optional"
              | "essential"
              | "recommended"
              | "advanced"
              | "deprecated";
      }[]

      Up to n recipe entries.

      • capabilities: string[]

        Capability IDs or refs this recipe uses.

      • description: string

        One or two sentence explanation.

      • domain: string

        Domain category for grouping.

      • id: string

        Unique kebab-case identifier.

      • name: string

        Short descriptive title.

      • pattern: string

        Ready-to-use TypeScript code pattern.

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level for adoption guidance.

      Returns at most n entries in insertion order. If fewer than n recipes are registered, all registered entries are returned.

      const topThree = registry.getTopRecipes(3);
      
    • Searches recipes by substring match against name or description.

      Parameters

      • query: string

        Substring to search for.

      Returns {
          capabilities: string[];
          description: string;
          domain: string;
          id: string;
          name: string;
          pattern: string;
          priority:
              | "optional"
              | "essential"
              | "recommended"
              | "advanced"
              | "deprecated";
      }[]

      Matching recipe entries.

      • capabilities: string[]

        Capability IDs or refs this recipe uses.

      • description: string

        One or two sentence explanation.

      • domain: string

        Domain category for grouping.

      • id: string

        Unique kebab-case identifier.

      • name: string

        Short descriptive title.

      • pattern: string

        Ready-to-use TypeScript code pattern.

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level for adoption guidance.

      Case-insensitive substring match. For semantic search, pass forAI() output directly to an LLM.

      const loginRecipes = registry.search('login');
      const tableRecipes = registry.search('table');
    • Returns recipes matching the given filter criteria.

      Parameters

      • filter: RecipeFilter

        Optional category and/or role constraints.

      Returns {
          capabilities: string[];
          description: string;
          domain: string;
          id: string;
          name: string;
          pattern: string;
          priority:
              | "optional"
              | "essential"
              | "recommended"
              | "advanced"
              | "deprecated";
      }[]

      Matching recipe entries.

      • capabilities: string[]

        Capability IDs or refs this recipe uses.

      • description: string

        One or two sentence explanation.

      • domain: string

        Domain category for grouping.

      • id: string

        Unique kebab-case identifier.

      • name: string

        Short descriptive title.

      • pattern: string

        Ready-to-use TypeScript code pattern.

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level for adoption guidance.

      All specified filter properties are AND-combined. An empty filter object returns all registered recipes.

      const uiRecipes = registry.select({ domain: 'ui5' });
      const essential = registry.select({ domain: 'auth', priority: 'essential' });
    • Returns recipes matching the given domain.

      Parameters

      • domain: string

        Domain string to filter by (e.g. 'ui5', 'table', 'auth').

      Returns {
          capabilities: string[];
          description: string;
          domain: string;
          id: string;
          name: string;
          pattern: string;
          priority:
              | "optional"
              | "essential"
              | "recommended"
              | "advanced"
              | "deprecated";
      }[]

      Matching recipe entries.

      • capabilities: string[]

        Capability IDs or refs this recipe uses.

      • description: string

        One or two sentence explanation.

      • domain: string

        Domain category for grouping.

      • id: string

        Unique kebab-case identifier.

      • name: string

        Short descriptive title.

      • pattern: string

        Ready-to-use TypeScript code pattern.

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level for adoption guidance.

      const authRecipes = registry.selectByDomain('auth');
      
    • Returns recipes matching the given priority level.

      Parameters

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level to filter by.

      Returns {
          capabilities: string[];
          description: string;
          domain: string;
          id: string;
          name: string;
          pattern: string;
          priority:
              | "optional"
              | "essential"
              | "recommended"
              | "advanced"
              | "deprecated";
      }[]

      Matching recipe entries.

      • capabilities: string[]

        Capability IDs or refs this recipe uses.

      • description: string

        One or two sentence explanation.

      • domain: string

        Domain category for grouping.

      • id: string

        Unique kebab-case identifier.

      • name: string

        Short descriptive title.

      • pattern: string

        Ready-to-use TypeScript code pattern.

      • priority: "optional" | "essential" | "recommended" | "advanced" | "deprecated"

        Priority level for adoption guidance.

      const essentialRecipes = registry.selectByPriority('essential');