@mablhq/mabl-cli 2.56.0 → 2.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -612,6 +612,14 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
612
612
  }
613
613
  }
614
614
  async evaluateAiAssertion(workspaceId, testRunId, screenshot, userPrompt, metaPrompt, criteria, test, variables) {
615
+ const requestUrl = `${this.baseApiUrl}/analysis/${workspaceId}/assertion/evaluate`;
616
+ return this.evaluateAiAssertionInternal(requestUrl, testRunId, screenshot, userPrompt, metaPrompt, criteria, test, variables);
617
+ }
618
+ async externalToolsAiAssertion(workspaceId, testRunId, screenshot, userPrompt, criteria, test, variables) {
619
+ const requestUrl = `${this.baseApiUrl}/externalTools/${workspaceId}/assertion/evaluate`;
620
+ return this.evaluateAiAssertionInternal(requestUrl, testRunId, screenshot, userPrompt, undefined, criteria, test, variables);
621
+ }
622
+ async evaluateAiAssertionInternal(requestUrl, testRunId, screenshot, userPrompt, metaPrompt, criteria, test, variables) {
615
623
  try {
616
624
  const body = {
617
625
  test_run_id: testRunId,
@@ -627,10 +635,10 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
627
635
  meta_prompt: metaPrompt,
628
636
  };
629
637
  }
630
- return await this.makePostRequestWithRetries(`${this.baseApiUrl}/analysis/${workspaceId}/assertion/evaluate`, body, GENAI_RETRY_OPTIONS);
638
+ return await this.makePostRequestWithRetries(requestUrl, body, GENAI_RETRY_OPTIONS);
631
639
  }
632
640
  catch (error) {
633
- throw toApiError('Failed to evaluate the AI prompt assertion', error);
641
+ throw toApiError('Failed to evaluate the AI assertion', error);
634
642
  }
635
643
  }
636
644
  async createBranch(workspaceId, branchName) {