@mablhq/mabl-cli 2.77.1 → 2.77.2

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.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import {BrowserContext, Locator, Page, Frame} from 'playwright-core';
2
- import {TestType} from '@playwright/test';
2
+ import {TestType, Download} from '@playwright/test';
3
3
 
4
4
  declare module '@mablhq/mabl-cli' {
5
5
  export type AuthServerPolicy = 'off' | 'none' | 'all';
@@ -219,6 +219,7 @@ export interface MablToolset {
219
219
  * @param page The page to evaluate the gen AI prompt against
220
220
  * @param prompt The gen AI prompt to evaluate
221
221
  * @param locator optional element to run the prompt against, the bounding box of the element will be used to produce the screenshot used in the assertion
222
+ * @param filePaths Optional array of file paths to be evaluated along with the screenshot. Content type will be inferred from file extension.
222
223
  * @returns
223
224
  */
224
225
  evaluateGenAiAssertion(
@@ -227,6 +228,20 @@ export interface MablToolset {
227
228
  locator?: Locator,
228
229
  ): Promise<GenAiAssertionResponse>;
229
230
 
231
+ /**
232
+ * Evaluates a gen AI prompt against a file (e.g., downloaded PDF, CSV, image, etc.).
233
+ * This method is optimized for file-only assertions and doesn't require element selection.
234
+ * @param page The page (used for test context)
235
+ * @param prompt The gen AI prompt to evaluate
236
+ * @param file The file to evaluate
237
+ * @returns
238
+ */
239
+ evaluateGenAiAssertionInFile(
240
+ page: Page,
241
+ prompt: string,
242
+ file: Download,
243
+ ): Promise<GenAiAssertionResponse>;
244
+
230
245
  /**
231
246
  * Initializes the mabl tooling and execution context to work with the provided Playwright BrowserContext
232
247
  * @param browserContext the Playwright BrowserContext to use with the MablTools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mablhq/mabl-cli",
3
- "version": "2.77.1",
3
+ "version": "2.77.2",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "The official mabl command line interface tool",
6
6
  "main": "index.js",
@@ -5,6 +5,7 @@ var ExternalToolsEvents;
5
5
  (function (ExternalToolsEvents) {
6
6
  ExternalToolsEvents["CreateMailboxAddress"] = "MablToolset: create mailbox address";
7
7
  ExternalToolsEvents["EvaluateGenAiAssertion"] = "MablToolset: evaluate AI assertion";
8
+ ExternalToolsEvents["EvaluateGenAiAssertionInFile"] = "MablToolset: evaluate AI assertion in file";
8
9
  ExternalToolsEvents["ExecuteDatabaseQuery"] = "MablToolset: execute database query";
9
10
  ExternalToolsEvents["GetCredentials"] = "MablToolset: get credentials";
10
11
  ExternalToolsEvents["GetMFACode"] = "MablTooset: get MFA code";