gpt-driver-node 1.0.11 → 1.0.12

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/CHANGELOG.md ADDED
@@ -0,0 +1,65 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [docs.mobileboost.io](https://docs.mobileboost.io) for full documentation.
5
+
6
+ ## [1.0.12] - 2026-02-27
7
+
8
+ ### Added
9
+ - `maxWaitForStableScreenSecs` config option to control the maximum time to wait for a stable screen
10
+
11
+ ### Changed
12
+ - Enhanced screen stability handling for more reliable test execution
13
+
14
+ ## [1.0.11] - 2026-02-25
15
+
16
+ ### Changed
17
+ - Improved AI execution logging with richer detail (screenshot, prompt, commands, reasoning, cache status)
18
+
19
+ ## [1.0.10] - 2026-02-25
20
+
21
+ ### Added
22
+ - Screen resolution is now automatically sent to the server during session initialization when a device `size` is provided
23
+
24
+ ## [1.0.9] - 2026-02-20
25
+
26
+ ### Changed
27
+ - Smart loop now throws an error on failure instead of resolving silently — update your error handling accordingly
28
+
29
+ ## [1.0.8] - 2026-02-19
30
+
31
+ ### Changed
32
+ - Screenshots are now compressed before being sent, reducing bandwidth usage
33
+ - ADB-based screenshots are used automatically on Android when the Appium server is local
34
+
35
+ ## [1.0.7] - 2026-02-18
36
+
37
+ ### Added
38
+ - `additionalUserContext` option in `GptDriverConfig` — pass extra context to the AI for more accurate test execution
39
+
40
+ ### Fixed
41
+ - Session is now correctly marked as failed when `maxCacheAttempts` is reached
42
+
43
+ ## [1.0.6] - 2026-02-09
44
+
45
+ ### Added
46
+ - Automatic retry logic for middleware service calls
47
+ - ADB screenshot support for Android devices
48
+ - `usemiddleLayerAssertFn` option for assertion handling
49
+
50
+ ### Changed
51
+ - Screen stability checks are now performed once per loop iteration for better cache efficiency
52
+ - Default log level changed to `info`
53
+
54
+ ## [1.0.5] - 2026-01-12
55
+
56
+ ### Added
57
+ - Press/Enter key command support
58
+ - Config file and environment variable support via `configFilePath`
59
+ - `actionDescription` field on commands for improved traceability
60
+ - Screen stability wait between steps to increase cache hit rate
61
+
62
+ ## [1.0.3] - 2026-01-02
63
+
64
+ ### Changed
65
+ - `executeFlow` reliability and performance improvements
package/dist/index.cjs CHANGED
@@ -632,7 +632,7 @@ async function executeSmartLoop(ctx, params) {
632
632
  let commands = [];
633
633
  let isCacheHit = false;
634
634
  let screenshotResolution = void 0;
635
- const stabilityResult = await waitForStableScreen(ctx.getScreenshot);
635
+ const stabilityResult = await waitForStableScreen(ctx.getScreenshot, { ...ctx.maxWaitForStableScreenSecs && { maxTimeoutSec: ctx.maxWaitForStableScreenSecs } });
636
636
  for (let attempt = 0; attempt < maxCacheAttempts; attempt++) {
637
637
  const screenshotStartTime = performance.now();
638
638
  const screenshotEndTime = performance.now();
@@ -964,6 +964,7 @@ class GptDriver {
964
964
  organisationId;
965
965
  configFilePath;
966
966
  additionalUserContext;
967
+ maxWaitForStableScreenSecs;
967
968
  // Session Execution Stats
968
969
  _stats_startTime = 0;
969
970
  _stats_executedSteps = 0;
@@ -1000,6 +1001,7 @@ class GptDriver {
1000
1001
  this.organisationId = config.organisationId;
1001
1002
  this.configFilePath = config.configFilePath;
1002
1003
  this.additionalUserContext = config.additionalUserContext;
1004
+ this.maxWaitForStableScreenSecs = config.maxWaitForStableScreenSecs;
1003
1005
  if (config.useGptDriverCloud) {
1004
1006
  if (config.serverConfig.device?.platform == null) {
1005
1007
  throw new Error("Platform is missing. Please specify the platform when using GPTDriver Cloud.");
@@ -1251,7 +1253,8 @@ ${"=".repeat(50)}`);
1251
1253
  logAIExecution: async (params) => this.logAIExecution(params),
1252
1254
  organisationId: this.organisationId,
1253
1255
  middleLayerAssertFn: options?.middleLayerAssertFn,
1254
- pendingLogPromises: options?.pendingLogPromises
1256
+ pendingLogPromises: options?.pendingLogPromises,
1257
+ maxWaitForStableScreenSecs: this.maxWaitForStableScreenSecs
1255
1258
  };
1256
1259
  }
1257
1260
  /**
@@ -1327,7 +1330,7 @@ ${"=".repeat(50)}`);
1327
1330
  actions: [
1328
1331
  { type: "pointerMove", duration: 0, x: clampedX, y: clampedY },
1329
1332
  { type: "pointerDown", button: 0 },
1330
- { type: "pause", duration: 100 },
1333
+ { type: "pause", duration: 300 },
1331
1334
  { type: "pointerUp", button: 0 }
1332
1335
  ]
1333
1336
  }
@@ -1580,7 +1583,7 @@ ${"=".repeat(50)}`);
1580
1583
  const driver = this.driver;
1581
1584
  if (appiumHandler != null) {
1582
1585
  try {
1583
- await this.takeScreenshotAndLogCodeExecution(appiumHandler.toString());
1586
+ this.pendingLogPromises.push(this.takeScreenshotAndLogCodeExecution(appiumHandler.toString()));
1584
1587
  await appiumHandler(driver);
1585
1588
  globalLogger.debug("Custom Appium handler executed successfully");
1586
1589
  } catch (e) {
@@ -1612,7 +1615,7 @@ ${"=".repeat(50)}`);
1612
1615
  try {
1613
1616
  const handlerStartTime = performance.now();
1614
1617
  globalLogger.debug(`[Performance] Executing custom Appium handler...`);
1615
- await this.takeScreenshotAndLogCodeExecution(appiumHandler.toString());
1618
+ this.pendingLogPromises.push(this.takeScreenshotAndLogCodeExecution(appiumHandler.toString()));
1616
1619
  await appiumHandler(driver);
1617
1620
  const handlerEndTime = performance.now();
1618
1621
  globalLogger.debug("Custom Appium handler executed successfully");
package/dist/index.d.cts CHANGED
@@ -25,6 +25,7 @@ interface GptDriverConfig {
25
25
  additionalUserContext?: string;
26
26
  organisationId?: string;
27
27
  configFilePath?: string;
28
+ maxWaitForStableScreenSecs?: number;
28
29
  }
29
30
  /**
30
31
  * Parameters for opening a deep link url in the Appium session.
@@ -514,6 +515,7 @@ declare class GptDriver {
514
515
  private organisationId?;
515
516
  private configFilePath?;
516
517
  private additionalUserContext?;
518
+ private maxWaitForStableScreenSecs?;
517
519
  private _stats_startTime;
518
520
  private _stats_executedSteps;
519
521
  private _stats_cacheHits;
package/dist/index.mjs CHANGED
@@ -630,7 +630,7 @@ async function executeSmartLoop(ctx, params) {
630
630
  let commands = [];
631
631
  let isCacheHit = false;
632
632
  let screenshotResolution = void 0;
633
- const stabilityResult = await waitForStableScreen(ctx.getScreenshot);
633
+ const stabilityResult = await waitForStableScreen(ctx.getScreenshot, { ...ctx.maxWaitForStableScreenSecs && { maxTimeoutSec: ctx.maxWaitForStableScreenSecs } });
634
634
  for (let attempt = 0; attempt < maxCacheAttempts; attempt++) {
635
635
  const screenshotStartTime = performance.now();
636
636
  const screenshotEndTime = performance.now();
@@ -962,6 +962,7 @@ class GptDriver {
962
962
  organisationId;
963
963
  configFilePath;
964
964
  additionalUserContext;
965
+ maxWaitForStableScreenSecs;
965
966
  // Session Execution Stats
966
967
  _stats_startTime = 0;
967
968
  _stats_executedSteps = 0;
@@ -998,6 +999,7 @@ class GptDriver {
998
999
  this.organisationId = config.organisationId;
999
1000
  this.configFilePath = config.configFilePath;
1000
1001
  this.additionalUserContext = config.additionalUserContext;
1002
+ this.maxWaitForStableScreenSecs = config.maxWaitForStableScreenSecs;
1001
1003
  if (config.useGptDriverCloud) {
1002
1004
  if (config.serverConfig.device?.platform == null) {
1003
1005
  throw new Error("Platform is missing. Please specify the platform when using GPTDriver Cloud.");
@@ -1249,7 +1251,8 @@ ${"=".repeat(50)}`);
1249
1251
  logAIExecution: async (params) => this.logAIExecution(params),
1250
1252
  organisationId: this.organisationId,
1251
1253
  middleLayerAssertFn: options?.middleLayerAssertFn,
1252
- pendingLogPromises: options?.pendingLogPromises
1254
+ pendingLogPromises: options?.pendingLogPromises,
1255
+ maxWaitForStableScreenSecs: this.maxWaitForStableScreenSecs
1253
1256
  };
1254
1257
  }
1255
1258
  /**
@@ -1325,7 +1328,7 @@ ${"=".repeat(50)}`);
1325
1328
  actions: [
1326
1329
  { type: "pointerMove", duration: 0, x: clampedX, y: clampedY },
1327
1330
  { type: "pointerDown", button: 0 },
1328
- { type: "pause", duration: 100 },
1331
+ { type: "pause", duration: 300 },
1329
1332
  { type: "pointerUp", button: 0 }
1330
1333
  ]
1331
1334
  }
@@ -1578,7 +1581,7 @@ ${"=".repeat(50)}`);
1578
1581
  const driver = this.driver;
1579
1582
  if (appiumHandler != null) {
1580
1583
  try {
1581
- await this.takeScreenshotAndLogCodeExecution(appiumHandler.toString());
1584
+ this.pendingLogPromises.push(this.takeScreenshotAndLogCodeExecution(appiumHandler.toString()));
1582
1585
  await appiumHandler(driver);
1583
1586
  globalLogger.debug("Custom Appium handler executed successfully");
1584
1587
  } catch (e) {
@@ -1610,7 +1613,7 @@ ${"=".repeat(50)}`);
1610
1613
  try {
1611
1614
  const handlerStartTime = performance.now();
1612
1615
  globalLogger.debug(`[Performance] Executing custom Appium handler...`);
1613
- await this.takeScreenshotAndLogCodeExecution(appiumHandler.toString());
1616
+ this.pendingLogPromises.push(this.takeScreenshotAndLogCodeExecution(appiumHandler.toString()));
1614
1617
  await appiumHandler(driver);
1615
1618
  const handlerEndTime = performance.now();
1616
1619
  globalLogger.debug("Custom Appium handler executed successfully");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpt-driver-node",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.cts",