@e2e-dev/mobile 0.12.8-nightly-20261118030221 → 0.12.8

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/dist/.build.json CHANGED
@@ -1 +1 @@
1
- {"version":"0.12.8-nightly-20261118030221"}
1
+ {"version":"0.12.8"}
package/dist/engine.js CHANGED
@@ -60,6 +60,10 @@ export function buildEngine(surface) {
60
60
  fixtures: {
61
61
  device: (context) => createDeviceFixture(surface, context),
62
62
  },
63
+ // A device keeps permissions, keychain, and installed apps from one
64
+ // attempt to the next, so `device`, `app`, and `screen` are worker
65
+ // fixtures: `beforeAll` and `afterAll` can drive them.
66
+ isolation: 'worker',
63
67
  });
64
68
  surfaces.set(handle, surface);
65
69
  return handle;
package/dist/errors.d.ts CHANGED
@@ -27,6 +27,15 @@
27
27
  */
28
28
  /** A failure's message in agent-device's normalized form. */
29
29
  export declare function message(cause: unknown): string;
30
+ /**
31
+ * The snapshot warning agent-device 0.21.37 adds, word for word, when a
32
+ * capture could not place its window on the screen. It refuses its own ref
33
+ * actions on that capture with `window-origin-unknown`, but takes points a
34
+ * caller sends, so a gesture aimed from the capture's rects is checked here.
35
+ */
36
+ export declare const ORIGIN_WARNING = "This snapshot cannot establish the window origin on screen. Coordinate-derived element interactions are unavailable until a capture measures the viewport.";
37
+ /** What that capture means for a caller, after "The " or "the ": the one wording a refused tap and a refused node swipe share. */
38
+ export declare const ORIGIN_UNKNOWN_BOUNDS = "app's window has no known position on the screen, so node bounds, boundingBox() included, may be offset from screen coordinates.";
30
39
  /**
31
40
  * Translates an unexpected agent-device error at the contract boundary.
32
41
  * `where` names the session and device the command ran under, for the
package/dist/errors.js CHANGED
@@ -88,6 +88,15 @@ const STALE_REF_REASONS = new Set([
88
88
  'plain_ref_requires_complete_frame',
89
89
  'ref_not_issued',
90
90
  ]);
91
+ /**
92
+ * The snapshot warning agent-device 0.21.37 adds, word for word, when a
93
+ * capture could not place its window on the screen. It refuses its own ref
94
+ * actions on that capture with `window-origin-unknown`, but takes points a
95
+ * caller sends, so a gesture aimed from the capture's rects is checked here.
96
+ */
97
+ export const ORIGIN_WARNING = 'This snapshot cannot establish the window origin on screen. Coordinate-derived element interactions are unavailable until a capture measures the viewport.';
98
+ /** What that capture means for a caller, after "The " or "the ": the one wording a refused tap and a refused node swipe share. */
99
+ export const ORIGIN_UNKNOWN_BOUNDS = "app's window has no known position on the screen, so node bounds, boundingBox() included, may be offset from screen coordinates.";
91
100
  /**
92
101
  * The `details.reason` values agent-device refuses an action with, nothing
93
102
  * sent, on a healthy device, each with the hint the failure carries:
@@ -109,7 +118,7 @@ const NOT_ACTIONABLE_REASONS = new Map([
109
118
  ['tap_keyboard_occludes_target', undefined],
110
119
  [
111
120
  'window-origin-unknown',
112
- "Nothing was sent. The app's window has no known position on the screen, so node bounds, boundingBox() included, may be offset from screen coordinates. For a tap, tap a screen point with screen.tapAt(), not one taken from those bounds.",
121
+ `Nothing was sent. The ${ORIGIN_UNKNOWN_BOUNDS} For a tap, tap a screen point with screen.tapAt(), not one taken from those bounds.`,
113
122
  ],
114
123
  ]);
115
124
  /**
package/dist/index.d.ts CHANGED
@@ -6,17 +6,20 @@
6
6
  * subpath so this entry never loads the AI SDK. Without `e2e` installed,
7
7
  * `mobile()` still loads and `test` throws when used.
8
8
  */
9
+ import type { TestFixtures } from 'e2e';
9
10
  import type { MobileFixtures } from './fixtures.ts';
10
11
  export * from './engine-entry.ts';
11
12
  /** The engine factory as the default export: what `e2e mcp` calls when `open_session` names this package as its `engine`. */
12
13
  export { default } from './engine-entry.ts';
13
14
  /**
14
15
  * `test` typed with this engine's contributed `device` fixture. The same
15
- * runtime `test` as `e2e`'s; only the fixture types differ.
16
+ * runtime `test` as `e2e`'s; only the fixture types differ. A device keeps
17
+ * its state between attempts, so `device`, `app`, and `screen` are worker
18
+ * fixtures, which `beforeAll` and `afterAll` receive too.
16
19
  */
17
- export declare const test: import("e2e").TestAPI<import("e2e").TestFixtures & MobileFixtures>;
20
+ export declare const test: import("e2e").TestAPI<TestFixtures, import("e2e").WorkerFixtures & MobileFixtures & Pick<TestFixtures, "app" | "screen">>;
18
21
  /** `describe` and the hooks, the same functions as `test.describe` and `test.beforeEach`, typed with the `device` fixture. */
19
22
  export declare const describe: {
20
23
  <Result>(title: string, body: import("e2e").SynchronousBody<Result>): void;
21
24
  <Result>(title: string, options: import("e2e").DescribeOptions, body: import("e2e").SynchronousBody<Result>): void;
22
- }, beforeEach: (fn: import("e2e").TestHookFn<import("e2e").TestFixtures & MobileFixtures>) => void, afterEach: (fn: import("e2e").TestHookFn<import("e2e").TestFixtures & MobileFixtures>) => void, beforeAll: (fn: import("e2e").SuiteHookFn) => void, afterAll: (fn: import("e2e").SuiteHookFn) => void;
25
+ }, beforeEach: (fn: import("e2e").TestHookFn<TestFixtures & import("e2e").WorkerFixtures & MobileFixtures & Pick<TestFixtures, "app" | "screen">>) => void, afterEach: (fn: import("e2e").TestHookFn<TestFixtures & import("e2e").WorkerFixtures & MobileFixtures & Pick<TestFixtures, "app" | "screen">>) => void, beforeAll: (fn: import("e2e").TestHookFn<import("e2e").WorkerFixtures & MobileFixtures & Pick<TestFixtures, "app" | "screen">>) => void, afterAll: (fn: import("e2e").TestHookFn<import("e2e").WorkerFixtures & MobileFixtures & Pick<TestFixtures, "app" | "screen">>) => void;
package/dist/index.js CHANGED
@@ -12,7 +12,9 @@ export * from './engine-entry.js';
12
12
  export { default } from './engine-entry.js';
13
13
  /**
14
14
  * `test` typed with this engine's contributed `device` fixture. The same
15
- * runtime `test` as `e2e`'s; only the fixture types differ.
15
+ * runtime `test` as `e2e`'s; only the fixture types differ. A device keeps
16
+ * its state between attempts, so `device`, `app`, and `screen` are worker
17
+ * fixtures, which `beforeAll` and `afterAll` receive too.
16
18
  */
17
19
  export const test = runnerTest().extend();
18
20
  /** `describe` and the hooks, the same functions as `test.describe` and `test.beforeEach`, typed with the `device` fixture. */
package/dist/surface.js CHANGED
@@ -15,7 +15,7 @@ import { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, w
15
15
  import { tmpdir } from 'node:os';
16
16
  import path from 'node:path';
17
17
  import { EngineError, KEY_NAMES, parseKey, raceAbort, rejectUnknownKeys, stopProviderRecording, withinCleanupBudget, ConfigurationError, TestError, } from '@e2e-dev/core/engine';
18
- import { isAppNotRunning, isSnapshotPresentationFailure, isUnreadableCapture, runCommand, staleOr } from './errors.js';
18
+ import { isAppNotRunning, isSnapshotPresentationFailure, isUnreadableCapture, ORIGIN_UNKNOWN_BOUNDS, ORIGIN_WARNING, runCommand, staleOr } from './errors.js';
19
19
  import { pointerInteraction, DEFAULT_LONG_PRESS_MS } from './actions.js';
20
20
  import { resolveExpression } from './locate.js';
21
21
  import { isWithin, KEYBOARD_KINDS, keyboardBand, mayTakeText, normalizeKind, projectSnapshot, ROOT_ID, screenRoot, screenTitle, } from './nodes.js';
@@ -881,6 +881,7 @@ export class AgentDeviceSurface {
881
881
  keyboard: keyboardBand(raw.nodes ?? [], raw.keyboard, raw.viewport),
882
882
  }),
883
883
  keyboardVisible: keyboardShowing(raw),
884
+ originUnknown: raw.warnings?.includes(ORIGIN_WARNING) === true,
884
885
  };
885
886
  this.latestScreen = projected;
886
887
  const read = projected.viewport;
@@ -1026,6 +1027,7 @@ export class AgentDeviceSurface {
1026
1027
  node,
1027
1028
  controlRef: control.ref,
1028
1029
  keyboardVisible: snapshot.keyboardVisible,
1030
+ originUnknown: snapshot.originUnknown,
1029
1031
  takesText: mayTakeText(entry.node),
1030
1032
  refsGeneration: snapshot.refsGeneration,
1031
1033
  };
@@ -1274,6 +1276,9 @@ export class AgentDeviceSurface {
1274
1276
  const rect = target.node.rect;
1275
1277
  if (rect === undefined)
1276
1278
  throw notActionable(`node ${target.id} has no bounds to swipe within`);
1279
+ if (target.originUnknown) {
1280
+ throw notActionable(`${label} failed: the ${ORIGIN_UNKNOWN_BOUNDS} Nothing was sent. Swipe the screen with screen.swipe({ direction }), or between screen points with screen.swipe({ from, to }) not taken from those bounds.`);
1281
+ }
1277
1282
  const stabilization = gestureStabilization(operation);
1278
1283
  const sent = await input.send(() => client.interactions.swipe({ ...swipeWithin(rect, action.direction, action.momentum), ...stabilization }));
1279
1284
  this.noteGesture(operation);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e2e-dev/mobile",
3
- "version": "0.12.8-nightly-20261118030221",
3
+ "version": "0.12.8",
4
4
  "description": "Mobile engine (iOS and Android) for e2e agentic end-to-end testing, built on agent-device",
5
5
  "keywords": [
6
6
  "e2e",
@@ -18,8 +18,8 @@
18
18
  ],
19
19
  "license": "Apache-2.0",
20
20
  "contributors": [
21
- "Oskar Kwaśniewski <oskar@tester.army>",
22
- "Szymon Rybczak <szymon@tester.army>"
21
+ "Oskar Kwaśniewski <oskar@e2e.com>",
22
+ "Szymon Rybczak <szymon@e2e.com>"
23
23
  ],
24
24
  "repository": {
25
25
  "type": "git",
@@ -60,13 +60,13 @@
60
60
  ],
61
61
  "dependencies": {
62
62
  "@napi-rs/image": "1.16.0",
63
- "agent-device": "0.21.38",
63
+ "agent-device": "0.21.39",
64
64
  "zod": "4.6.7"
65
65
  },
66
66
  "peerDependencies": {
67
- "@e2e-dev/core": "0.23.2-nightly-20261118030221",
67
+ "@e2e-dev/core": ">=0.23.2 <1",
68
68
  "ai": "^7.0.0",
69
- "e2e": "0.23.2-nightly-20261118030221"
69
+ "e2e": ">=0.23.2 <1"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "ai": {
@@ -77,12 +77,12 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@e2e-dev/core": "0.23.2-nightly-20261118030221",
80
+ "@e2e-dev/core": "0.24.0",
81
81
  "@types/node": "26.6.6",
82
- "ai": "7.0.173",
83
- "e2e": "0.23.2-nightly-20261118030221",
82
+ "ai": "7.0.177",
83
+ "e2e": "0.24.0",
84
84
  "typescript": "7.0.2",
85
- "vitest": "5.1.0"
85
+ "vitest": "5.1.1"
86
86
  },
87
87
  "engines": {
88
88
  "node": "^22.22.3 || >=24.8.0"