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

    Class CapabilityRegistry

    Queryable registry of Praman API capabilities for AI agents.

    Expose Praman API surface to LLMs for test generation.

    pramanAI.capabilities

    const registry = new CapabilityRegistry();
    const tableCaps = registry.byCategory('table');
    const aiContext = registry.forAI();
    Index

    Constructors

    Properties

    registryVersion: 1

    Registry schema version.

    Bumped when the entry shape changes. Consumers can use this to detect incompatible generated files at runtime.

    Methods

    • Returns capabilities matching the given category.

      Parameters

      • category:
            | "ui5"
            | "auth"
            | "navigate"
            | "table"
            | "dialog"
            | "date"
            | "odata"
            | "fe"
            | "intent"
            | "flp"
            | "shell"
            | "footer"
            | "ai"
            | "data"
            | "assert"

        Category to filter by.

      Returns {
          aiSteering?: string;
          async?: boolean;
          category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
          controlTypes?: string[];
          description: string;
          id: string;
          intent?: string;
          name: string;
          priority: "fixture"
          | "namespace"
          | "implementation";
          qualifiedName: string;
          registryVersion: 1;
          sapModule?: string;
          usageExample: string;
      }[]

      Entries whose category matches exactly.

      • OptionalaiSteering?: string

        AI agent steering — tells agents to prefer a higher-level alternative.

      • Optionalasync?: boolean

        Whether this is an async method.

      • category:
            | "ui5"
            | "auth"
            | "navigate"
            | "table"
            | "dialog"
            | "date"
            | "odata"
            | "fe"
            | "intent"
            | "flp"
            | "shell"
            | "footer"
            | "ai"
            | "data"
            | "assert"

        Logical grouping for filtering.

      • OptionalcontrolTypes?: string[]

        UI5 control types this capability works with.

      • description: string

        One-sentence description of what this capability does.

      • id: string

        Unique identifier in UI5-PREFIX-NNN format.

      • Optionalintent?: string

        Optional intent tag.

      • name: string

        Human-readable function or method name.

      • priority: "fixture" | "namespace" | "implementation"

        REQUIRED priority tier.

      • qualifiedName: string

        Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

      • registryVersion: 1

        Registry schema version for forward compatibility.

      • OptionalsapModule?: string

        Optional SAP UI5 module tag.

      • usageExample: string

        Ready-to-run usage example string.

      const navCaps = registry.byCategory('navigate');
      
    • Returns capabilities matching the given namespace prefix.

      Parameters

      • namespace: string

        Dot-separated namespace prefix, e.g. 'ui5.table'.

      Returns {
          aiSteering?: string;
          async?: boolean;
          category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
          controlTypes?: string[];
          description: string;
          id: string;
          intent?: string;
          name: string;
          priority: "fixture"
          | "namespace"
          | "implementation";
          qualifiedName: string;
          registryVersion: 1;
          sapModule?: string;
          usageExample: string;
      }[]

      Entries whose qualifiedName starts with the namespace.

      • OptionalaiSteering?: string

        AI agent steering — tells agents to prefer a higher-level alternative.

      • Optionalasync?: boolean

        Whether this is an async method.

      • category:
            | "ui5"
            | "auth"
            | "navigate"
            | "table"
            | "dialog"
            | "date"
            | "odata"
            | "fe"
            | "intent"
            | "flp"
            | "shell"
            | "footer"
            | "ai"
            | "data"
            | "assert"

        Logical grouping for filtering.

      • OptionalcontrolTypes?: string[]

        UI5 control types this capability works with.

      • description: string

        One-sentence description of what this capability does.

      • id: string

        Unique identifier in UI5-PREFIX-NNN format.

      • Optionalintent?: string

        Optional intent tag.

      • name: string

        Human-readable function or method name.

      • priority: "fixture" | "namespace" | "implementation"

        REQUIRED priority tier.

      • qualifiedName: string

        Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

      • registryVersion: 1

        Registry schema version for forward compatibility.

      • OptionalsapModule?: string

        Optional SAP UI5 module tag.

      • usageExample: string

        Ready-to-run usage example string.

      const tableCaps = registry.byNamespace('ui5.table');
      
    • Searches capabilities by partial match against name or description.

      Parameters

      • query: string

        Substring to search for.

      Returns {
          aiSteering?: string;
          async?: boolean;
          category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
          controlTypes?: string[];
          description: string;
          id: string;
          intent?: string;
          name: string;
          priority: "fixture"
          | "namespace"
          | "implementation";
          qualifiedName: string;
          registryVersion: 1;
          sapModule?: string;
          usageExample: string;
      }[]

      Entries whose name or description contains the query.

      • OptionalaiSteering?: string

        AI agent steering — tells agents to prefer a higher-level alternative.

      • Optionalasync?: boolean

        Whether this is an async method.

      • category:
            | "ui5"
            | "auth"
            | "navigate"
            | "table"
            | "dialog"
            | "date"
            | "odata"
            | "fe"
            | "intent"
            | "flp"
            | "shell"
            | "footer"
            | "ai"
            | "data"
            | "assert"

        Logical grouping for filtering.

      • OptionalcontrolTypes?: string[]

        UI5 control types this capability works with.

      • description: string

        One-sentence description of what this capability does.

      • id: string

        Unique identifier in UI5-PREFIX-NNN format.

      • Optionalintent?: string

        Optional intent tag.

      • name: string

        Human-readable function or method name.

      • priority: "fixture" | "namespace" | "implementation"

        REQUIRED priority tier.

      • qualifiedName: string

        Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

      • registryVersion: 1

        Registry schema version for forward compatibility.

      • OptionalsapModule?: string

        Optional SAP UI5 module tag.

      • usageExample: string

        Ready-to-run usage example string.

      Case-insensitive substring match. For semantic search, feed the result list into an embedding model or pass forAI() output to an LLM.

      const clickCaps = registry.find('click');
      
    • Returns the first capability entry matching the given name, or undefined.

      Parameters

      • name: string

        Human-readable capability name to look up (case-sensitive).

      Returns
          | {
              aiSteering?: string;
              async?: boolean;
              category: | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
              controlTypes?: string[];
              description: string;
              id: string;
              intent?: string;
              name: string;
              priority: "fixture"
              | "namespace"
              | "implementation";
              qualifiedName: string;
              registryVersion: 1;
              sapModule?: string;
              usageExample: string;
          }
          | undefined

      The matching entry, or undefined if not found.

      • {
            aiSteering?: string;
            async?: boolean;
            category:
                | "ui5"
                | "auth"
                | "navigate"
                | "table"
                | "dialog"
                | "date"
                | "odata"
                | "fe"
                | "intent"
                | "flp"
                | "shell"
                | "footer"
                | "ai"
                | "data"
                | "assert";
            controlTypes?: string[];
            description: string;
            id: string;
            intent?: string;
            name: string;
            priority: "fixture"
            | "namespace"
            | "implementation";
            qualifiedName: string;
            registryVersion: 1;
            sapModule?: string;
            usageExample: string;
        }
        • OptionalaiSteering?: string

          AI agent steering — tells agents to prefer a higher-level alternative.

        • Optionalasync?: boolean

          Whether this is an async method.

        • category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert"

          Logical grouping for filtering.

        • OptionalcontrolTypes?: string[]

          UI5 control types this capability works with.

        • description: string

          One-sentence description of what this capability does.

        • id: string

          Unique identifier in UI5-PREFIX-NNN format.

        • Optionalintent?: string

          Optional intent tag.

        • name: string

          Human-readable function or method name.

        • priority: "fixture" | "namespace" | "implementation"

          REQUIRED priority tier.

        • qualifiedName: string

          Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

        • registryVersion: 1

          Registry schema version for forward compatibility.

        • OptionalsapModule?: string

          Optional SAP UI5 module tag.

        • usageExample: string

          Ready-to-run usage example string.

      • undefined

      Searches by human-readable name (not id). For exact ID lookup use get().

      const cap = registry.findByName('clickButton');
      if (cap !== undefined) {
      logger.info(cap.usageExample);
      }
    • Returns the full registry as structured JSON optimised for AI agent consumption.

      Returns CapabilitiesJSON

      Structured JSON snapshot of the entire registry.

      Currently an alias for toJSON(). Future releases may apply provider-specific formatting or token-budget-aware truncation.

      const aiContext = registry.forAI();
      const prompt = JSON.stringify(aiContext);
    • Returns capabilities formatted for a specific AI provider.

      Parameters

      Returns string

      Formatted capability descriptions as a string.

      Each provider receives a format optimised for its native consumption pattern:

      • 'claude' — XML-structured {@literal <capability>} elements with attributes
      • 'openai' — JSON array of function-calling tool schemas
      • 'gemini' — Plain text listing with name, description, and example
      const registry = new CapabilityRegistry();
      const claudeContext = registry.forProvider('claude');
      const openaiTools = registry.forProvider('openai');
      const geminiText = registry.forProvider('gemini');
    • Returns the capability entry with the given id, or undefined.

      Parameters

      • id: string

        Unique kebab-case capability identifier.

      Returns
          | {
              aiSteering?: string;
              async?: boolean;
              category: | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
              controlTypes?: string[];
              description: string;
              id: string;
              intent?: string;
              name: string;
              priority: "fixture"
              | "namespace"
              | "implementation";
              qualifiedName: string;
              registryVersion: 1;
              sapModule?: string;
              usageExample: string;
          }
          | undefined

      The matching entry, or undefined if not registered.

      • {
            aiSteering?: string;
            async?: boolean;
            category:
                | "ui5"
                | "auth"
                | "navigate"
                | "table"
                | "dialog"
                | "date"
                | "odata"
                | "fe"
                | "intent"
                | "flp"
                | "shell"
                | "footer"
                | "ai"
                | "data"
                | "assert";
            controlTypes?: string[];
            description: string;
            id: string;
            intent?: string;
            name: string;
            priority: "fixture"
            | "namespace"
            | "implementation";
            qualifiedName: string;
            registryVersion: 1;
            sapModule?: string;
            usageExample: string;
        }
        • OptionalaiSteering?: string

          AI agent steering — tells agents to prefer a higher-level alternative.

        • Optionalasync?: boolean

          Whether this is an async method.

        • category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert"

          Logical grouping for filtering.

        • OptionalcontrolTypes?: string[]

          UI5 control types this capability works with.

        • description: string

          One-sentence description of what this capability does.

        • id: string

          Unique identifier in UI5-PREFIX-NNN format.

        • Optionalintent?: string

          Optional intent tag.

        • name: string

          Human-readable function or method name.

        • priority: "fixture" | "namespace" | "implementation"

          REQUIRED priority tier.

        • qualifiedName: string

          Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

        • registryVersion: 1

          Registry schema version for forward compatibility.

        • OptionalsapModule?: string

          Optional SAP UI5 module tag.

        • usageExample: string

          Ready-to-run usage example string.

      • undefined
      const cap = registry.get('click-button');
      if (cap !== undefined) {
      logger.info(cap.usageExample);
      }
    • Returns a statistical summary of the capability registry.

      Returns CapabilityStats

      Statistics including total count, categories, and priority breakdown.

      const stats = registry.getStatistics();
      logger.info(`Total: ${stats.totalMethods}`);
    • Returns true if a capability with the given name is registered.

      Parameters

      • name: string

        Human-readable capability name to look up.

      Returns boolean

      true when at least one entry matches.

      Searches by name (not id). Names are not guaranteed unique but are human-readable and match the TSDoc @capability tag value.

      if (registry.has('clickButton')) {
      // safe to use
      }
    • Returns all registered capability entries.

      Returns {
          aiSteering?: string;
          async?: boolean;
          category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
          controlTypes?: string[];
          description: string;
          id: string;
          intent?: string;
          name: string;
          priority: "fixture"
          | "namespace"
          | "implementation";
          qualifiedName: string;
          registryVersion: 1;
          sapModule?: string;
          usageExample: string;
      }[]

      Shallow copy of the full capability list.

      • OptionalaiSteering?: string

        AI agent steering — tells agents to prefer a higher-level alternative.

      • Optionalasync?: boolean

        Whether this is an async method.

      • category:
            | "ui5"
            | "auth"
            | "navigate"
            | "table"
            | "dialog"
            | "date"
            | "odata"
            | "fe"
            | "intent"
            | "flp"
            | "shell"
            | "footer"
            | "ai"
            | "data"
            | "assert"

        Logical grouping for filtering.

      • OptionalcontrolTypes?: string[]

        UI5 control types this capability works with.

      • description: string

        One-sentence description of what this capability does.

      • id: string

        Unique identifier in UI5-PREFIX-NNN format.

      • Optionalintent?: string

        Optional intent tag.

      • name: string

        Human-readable function or method name.

      • priority: "fixture" | "namespace" | "implementation"

        REQUIRED priority tier.

      • qualifiedName: string

        Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

      • registryVersion: 1

        Registry schema version for forward compatibility.

      • OptionalsapModule?: string

        Optional SAP UI5 module tag.

      • usageExample: string

        Ready-to-run usage example string.

      const all = registry.list();
      logger.info(all.length);
    • Returns capabilities matching the given priority tier.

      Parameters

      • priority: "fixture" | "namespace" | "implementation"

        Priority level to filter by.

      Returns {
          aiSteering?: string;
          async?: boolean;
          category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert";
          controlTypes?: string[];
          description: string;
          id: string;
          intent?: string;
          name: string;
          priority: "fixture"
          | "namespace"
          | "implementation";
          qualifiedName: string;
          registryVersion: 1;
          sapModule?: string;
          usageExample: string;
      }[]

      Entries whose priority matches exactly.

      • OptionalaiSteering?: string

        AI agent steering — tells agents to prefer a higher-level alternative.

      • Optionalasync?: boolean

        Whether this is an async method.

      • category:
            | "ui5"
            | "auth"
            | "navigate"
            | "table"
            | "dialog"
            | "date"
            | "odata"
            | "fe"
            | "intent"
            | "flp"
            | "shell"
            | "footer"
            | "ai"
            | "data"
            | "assert"

        Logical grouping for filtering.

      • OptionalcontrolTypes?: string[]

        UI5 control types this capability works with.

      • description: string

        One-sentence description of what this capability does.

      • id: string

        Unique identifier in UI5-PREFIX-NNN format.

      • Optionalintent?: string

        Optional intent tag.

      • name: string

        Human-readable function or method name.

      • priority: "fixture" | "namespace" | "implementation"

        REQUIRED priority tier.

      • qualifiedName: string

        Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

      • registryVersion: 1

        Registry schema version for forward compatibility.

      • OptionalsapModule?: string

        Optional SAP UI5 module tag.

      • usageExample: string

        Ready-to-run usage example string.

      const fixtures = registry.listByPriority('fixture');
      const handlers = registry.listByPriority('namespace');
    • Registers a new capability entry or overwrites an existing one by id.

      Parameters

      • entry: {
            aiSteering?: string;
            async?: boolean;
            category:
                | "ui5"
                | "auth"
                | "navigate"
                | "table"
                | "dialog"
                | "date"
                | "odata"
                | "fe"
                | "intent"
                | "flp"
                | "shell"
                | "footer"
                | "ai"
                | "data"
                | "assert";
            controlTypes?: string[];
            description: string;
            id: string;
            intent?: string;
            name: string;
            priority: "fixture"
            | "namespace"
            | "implementation";
            qualifiedName: string;
            registryVersion: 1;
            sapModule?: string;
            usageExample: string;
        }

        Capability entry to add or replace.

        • OptionalaiSteering?: string

          AI agent steering — tells agents to prefer a higher-level alternative.

        • Optionalasync?: boolean

          Whether this is an async method.

        • category:
              | "ui5"
              | "auth"
              | "navigate"
              | "table"
              | "dialog"
              | "date"
              | "odata"
              | "fe"
              | "intent"
              | "flp"
              | "shell"
              | "footer"
              | "ai"
              | "data"
              | "assert"

          Logical grouping for filtering.

        • OptionalcontrolTypes?: string[]

          UI5 control types this capability works with.

        • description: string

          One-sentence description of what this capability does.

        • id: string

          Unique identifier in UI5-PREFIX-NNN format.

        • Optionalintent?: string

          Optional intent tag.

        • name: string

          Human-readable function or method name.

        • priority: "fixture" | "namespace" | "implementation"

          REQUIRED priority tier.

        • qualifiedName: string

          Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

        • registryVersion: 1

          Registry schema version for forward compatibility.

        • OptionalsapModule?: string

          Optional SAP UI5 module tag.

        • usageExample: string

          Ready-to-run usage example string.

      Returns void

      Intended for use in tests and plugins. The generated file should not call this method — run npm run generate:capabilities instead.

      registry.register({
      id: 'UI5-UI5-020',
      qualifiedName: 'ui5.myCapability',
      name: 'myCapability',
      description: 'Does something useful for testing.',
      category: 'ui5',
      priority: 'fixture',
      usageExample: 'await ui5.myCapability()',
      registryVersion: 1,
      });
    • Exports the full registry as a structured JSON object.

      Returns CapabilitiesJSON

      Structured JSON snapshot of the entire registry.

      Fixtures are listed first (Playwright best practice), then all methods.

      const json = registry.toJSON();
      logger.info(JSON.stringify(json, null, 2));