@testdriverai/mcp 7.11.5-test → 7.11.7-canary

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.
@@ -125,6 +125,10 @@ const testdriver = new TestDriver(apiKey, options)
125
125
  Cache key for element finding operations. If provided, enables caching tied to this key.
126
126
  </ParamField>
127
127
 
128
+ <ParamField path="verify" type="boolean" default="false">
129
+ Global default for AI verification of located elements. When `true`, every `find()` runs a second AI check to confirm the returned coordinates actually match the requested element (catching hallucinated or incorrect positions), at the cost of extra latency. Can be overridden per call via `find(description, { verify: true | false })`.
130
+ </ParamField>
131
+
128
132
  <ParamField path="dashcam" type="boolean" default="true">
129
133
  Enable or disable Dashcam video recording
130
134
  </ParamField>
@@ -54,7 +54,7 @@ const element = await testdriver.find(description, options)
54
54
  </ParamField>
55
55
 
56
56
  <ParamField path="verify" type="boolean" default={false}>
57
- Enable AI verification of the located element. When `true`, a second AI call checks that the coordinates returned actually correspond to the requested element, catching hallucinated or incorrect positions. Disabled by default for lower latency.
57
+ Enable AI verification of the located element. When `true`, a second AI call checks that the coordinates returned actually correspond to the requested element, catching hallucinated or incorrect positions. Disabled by default for lower latency. Defaults to the global `verify` option set on the SDK constructor when not specified per call.
58
58
  </ParamField>
59
59
 
60
60
  <ParamField path="ai" type="object">
@@ -121,6 +121,10 @@ const testdriver = new TestDriver(apiKey, options)
121
121
  Cache key for element finding operations. If provided, enables caching tied to this key.
122
122
  </ParamField>
123
123
 
124
+ <ParamField path="verify" type="boolean" default="false">
125
+ Global default for AI verification of located elements. When `true`, every `find()` runs a second AI check to confirm the returned coordinates actually match the requested element (catching hallucinated or incorrect positions), at the cost of extra latency. Can be overridden per call via `find(description, { verify: true | false })`.
126
+ </ParamField>
127
+
124
128
  <ParamField path="dashcam" type="boolean" default="true">
125
129
  Enable or disable Dashcam video recording
126
130
  </ParamField>
@@ -54,7 +54,7 @@ const element = await testdriver.find(description, options)
54
54
  </ParamField>
55
55
 
56
56
  <ParamField path="verify" type="boolean" default={false}>
57
- Enable AI verification of the located element. When `true`, a second AI call checks that the coordinates returned actually correspond to the requested element, catching hallucinated or incorrect positions. Disabled by default for lower latency.
57
+ Enable AI verification of the located element. When `true`, a second AI call checks that the coordinates returned actually correspond to the requested element, catching hallucinated or incorrect positions. Disabled by default for lower latency. Defaults to the global `verify` option set on the SDK constructor when not specified per call.
58
58
  </ParamField>
59
59
 
60
60
  <ParamField path="ai" type="object">
@@ -2,16 +2,16 @@
2
2
  "$schema": "./examples-manifest.schema.json",
3
3
  "examples": {
4
4
  "assert.test.mjs": {
5
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cc58cd69b3fa8c8980f",
6
- "lastUpdated": "2026-07-07T00:48:05.133Z"
5
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5bb3e5d15d75eac0d7e",
6
+ "lastUpdated": "2026-07-15T00:35:07.257Z"
7
7
  },
8
8
  "drag-and-drop.test.mjs": {
9
9
  "url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b42fc0ac3cc632a918b",
10
10
  "lastUpdated": "2026-03-03T00:32:25.275Z"
11
11
  },
12
12
  "exec-pwsh.test.mjs": {
13
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4bed8cd69b3fa8c897c7",
14
- "lastUpdated": "2026-07-07T00:51:26.821Z"
13
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d4e3823fc6a1246b8e52",
14
+ "lastUpdated": "2026-07-15T00:38:21.897Z"
15
15
  },
16
16
  "match-image.test.mjs": {
17
17
  "url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738c14b73310c783941d",
@@ -22,88 +22,88 @@
22
22
  "lastUpdated": "2026-03-03T00:32:25.282Z"
23
23
  },
24
24
  "hover-text-with-description.test.mjs": {
25
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c1e287f1ae277c1ff81",
26
- "lastUpdated": "2026-07-07T00:52:15.546Z"
25
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5133e5d15d75eac0d2a",
26
+ "lastUpdated": "2026-07-15T00:39:07.525Z"
27
27
  },
28
28
  "windows-installer.test.mjs": {
29
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c208cd69b3fa8c897e1",
30
- "lastUpdated": "2026-07-07T01:10:58.312Z"
29
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5142274a992c42745e2",
30
+ "lastUpdated": "2026-07-15T00:57:11.884Z"
31
31
  },
32
32
  "exec-output.test.mjs": {
33
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c228cd69b3fa8c897e2",
34
- "lastUpdated": "2026-07-07T00:59:09.739Z"
33
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5162274a992c42745e4",
34
+ "lastUpdated": "2026-07-15T00:46:13.121Z"
35
35
  },
36
36
  "chrome-extension.test.mjs": {
37
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4beb8cd69b3fa8c897c4",
38
- "lastUpdated": "2026-07-07T00:51:24.117Z"
37
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d4e13e5d15d75eac0d1c",
38
+ "lastUpdated": "2026-07-15T00:38:19.595Z"
39
39
  },
40
40
  "launch-vscode-linux.test.mjs": {
41
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c068cd69b3fa8c897cd",
42
- "lastUpdated": "2026-07-07T00:58:40.320Z"
41
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d4fb2274a992c42745e0",
42
+ "lastUpdated": "2026-07-15T00:45:45.182Z"
43
43
  },
44
44
  "hover-image.test.mjs": {
45
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c3b287f1ae277c1ff92",
46
- "lastUpdated": "2026-07-07T00:45:47.106Z"
45
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d52c823fc6a1246b8e58",
46
+ "lastUpdated": "2026-07-15T00:32:44.332Z"
47
47
  },
48
48
  "installer.test.mjs": {
49
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c69287f1ae277c1ffa6",
50
- "lastUpdated": "2026-07-07T00:46:33.274Z"
49
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d55d3e5d15d75eac0d4e",
50
+ "lastUpdated": "2026-07-15T00:33:33.466Z"
51
51
  },
52
52
  "type.test.mjs": {
53
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4c948cd69b3fa8c89809",
54
- "lastUpdated": "2026-07-07T01:01:04.253Z"
53
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d58c2274a992c4274611",
54
+ "lastUpdated": "2026-07-15T00:48:10.956Z"
55
55
  },
56
56
  "press-keys.test.mjs": {
57
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cad287f1ae277c1ffac",
58
- "replayUrl": "https://console-test.testdriver.ai/replay/6a4c53cf8cd69b3fa8c8986e?share=ynZ6gn7JlP9dW2rY2Oc5bQ",
59
- "embedUrl": "https://console-test.testdriver.ai/replay/6a4c53cf8cd69b3fa8c8986e?share=ynZ6gn7JlP9dW2rY2Oc5bQ&embed=true",
60
- "lastUpdated": "2026-07-07T01:18:15.316Z"
57
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5a33e5d15d75eac0d77",
58
+ "replayUrl": "https://console-test.testdriver.ai/replay/6a56dc8e3e5d15d75eac0df0?share=ZM6rTCmGwCpC1YtUtOcbhw",
59
+ "embedUrl": "https://console-test.testdriver.ai/replay/6a56dc8e3e5d15d75eac0df0?share=ZM6rTCmGwCpC1YtUtOcbhw&embed=true",
60
+ "lastUpdated": "2026-07-15T01:04:19.595Z"
61
61
  },
62
62
  "scroll-keyboard.test.mjs": {
63
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cf5287f1ae277c1ffb7",
64
- "lastUpdated": "2026-07-07T01:02:42.601Z"
63
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5eb3e5d15d75eac0d8a",
64
+ "lastUpdated": "2026-07-15T00:49:44.110Z"
65
65
  },
66
66
  "scroll.test.mjs": {
67
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4d14287f1ae277c1ffc4",
68
- "lastUpdated": "2026-07-07T00:56:13.586Z"
67
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d6092274a992c427463d",
68
+ "lastUpdated": "2026-07-15T00:43:20.527Z"
69
69
  },
70
70
  "scroll-until-image.test.mjs": {
71
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cf78cd69b3fa8c89821",
72
- "lastUpdated": "2026-07-07T00:48:55.696Z"
71
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5ec2274a992c4274634",
72
+ "lastUpdated": "2026-07-15T00:35:57.105Z"
73
73
  },
74
74
  "prompt.test.mjs": {
75
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cf98cd69b3fa8c89823",
76
- "lastUpdated": "2026-07-07T01:02:47.229Z"
75
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5ee3e5d15d75eac0d8b",
76
+ "lastUpdated": "2026-07-15T00:49:48.454Z"
77
77
  },
78
78
  "focus-window.test.mjs": {
79
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cfb287f1ae277c1ffba",
80
- "lastUpdated": "2026-07-07T01:02:49.037Z"
79
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5f02274a992c4274636",
80
+ "lastUpdated": "2026-07-15T00:49:50.238Z"
81
81
  },
82
82
  "captcha-api.test.mjs": {
83
83
  "url": "https://console.testdriver.ai/runs/698f7df69e27ce1528d7d087/698f7fb0d3b320ad547d9d44",
84
84
  "lastUpdated": "2026-02-13T19:55:05.951Z"
85
85
  },
86
86
  "element-not-found.test.mjs": {
87
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4d2e287f1ae277c1ffc8",
88
- "lastUpdated": "2026-07-07T00:56:37.711Z"
87
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d61f2274a992c4274641",
88
+ "lastUpdated": "2026-07-15T00:43:45.295Z"
89
89
  },
90
90
  "formatted-logging.test.mjs": {
91
91
  "url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a714b73310c7839450",
92
92
  "lastUpdated": "2026-03-29T00:36:10.628Z"
93
93
  },
94
94
  "hover-text.test.mjs": {
95
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4d5d287f1ae277c1ffca",
96
- "lastUpdated": "2026-07-07T00:57:25.538Z"
95
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d64d2274a992c4274643",
96
+ "lastUpdated": "2026-07-15T00:44:32.621Z"
97
97
  },
98
98
  "no-provision.test.mjs": {
99
99
  "url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b7706a177a05bccd1cf",
100
100
  "lastUpdated": "2026-03-03T00:32:25.279Z"
101
101
  },
102
102
  "ai.test.mjs": {
103
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4d45287f1ae277c1ffc9",
104
- "replayUrl": "https://console-test.testdriver.ai/replay/6a4c5611287f1ae277c20032?share=lPXDRHY7kw9LZU1GYzR1lA",
105
- "embedUrl": "https://console-test.testdriver.ai/replay/6a4c5611287f1ae277c20032?share=lPXDRHY7kw9LZU1GYzR1lA&embed=true",
106
- "lastUpdated": "2026-07-07T01:27:52.965Z"
103
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d6352274a992c4274642",
104
+ "replayUrl": "https://console-test.testdriver.ai/replay/6a56df942274a992c42746d5?share=ONWSkyWjk3x2rtVjANyiA",
105
+ "embedUrl": "https://console-test.testdriver.ai/replay/6a56df942274a992c42746d5?share=ONWSkyWjk3x2rtVjANyiA&embed=true",
106
+ "lastUpdated": "2026-07-15T01:17:14.431Z"
107
107
  },
108
108
  "popup-loading.test.mjs": {
109
109
  "url": "https://console.testdriver.ai/runs/698bc89f7140c3fa7daaca8d/698bca7f7140c3fa7daacbf7",
@@ -138,12 +138,12 @@
138
138
  "lastUpdated": "2026-02-13T19:55:05.953Z"
139
139
  },
140
140
  "findall-coffee-icons.test.mjs": {
141
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4cdc8cd69b3fa8c89814",
142
- "lastUpdated": "2026-07-07T00:48:28.615Z"
141
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d5d32274a992c427462d",
142
+ "lastUpdated": "2026-07-15T00:35:31.546Z"
143
143
  },
144
144
  "parse.test.mjs": {
145
- "url": "https://console-test.testdriver.ai/runs/6a4c4bd323dcc2e575ab5c0a/6a4c4d75287f1ae277c1ffcb",
146
- "lastUpdated": "2026-07-07T00:57:49.215Z"
145
+ "url": "https://console-test.testdriver.ai/runs/6a56d4cad5a17ea4b9190265/6a56d6653e5d15d75eac0d95",
146
+ "lastUpdated": "2026-07-15T00:44:55.714Z"
147
147
  },
148
148
  "flake-diffthreshold-001.test.mjs": {
149
149
  "url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62bcafc0ac3cc632a91aa",
@@ -126,6 +126,10 @@ const testdriver = new TestDriver(apiKey, options)
126
126
  Cache key for element finding operations. If provided, enables caching tied to this key.
127
127
  </ParamField>
128
128
 
129
+ <ParamField path="verify" type="boolean" default="false">
130
+ Global default for AI verification of located elements. When `true`, every `find()` runs a second AI check to confirm the returned coordinates actually match the requested element (catching hallucinated or incorrect positions), at the cost of extra latency. Can be overridden per call via `find(description, { verify: true | false })`.
131
+ </ParamField>
132
+
129
133
  <ParamField path="dashcam" type="boolean" default="true">
130
134
  Enable or disable Dashcam video recording
131
135
  </ParamField>
@@ -17,7 +17,7 @@ Watch this test execute in a real sandbox environment:
17
17
 
18
18
  {/* ai.test.mjs output */}
19
19
  <iframe
20
- src="https://console-test.testdriver.ai/replay/6a4c5611287f1ae277c20032?share=lPXDRHY7kw9LZU1GYzR1lA&embed=true"
20
+ src="https://console-test.testdriver.ai/replay/6a56df942274a992c42746d5?share=ONWSkyWjk3x2rtVjANyiA&embed=true"
21
21
  width="100%"
22
22
  height="600"
23
23
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* assert.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4cc58cd69b3fa8c8980f/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d5bb3e5d15d75eac0d7e/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* chrome-extension.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4beb8cd69b3fa8c897c4/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d4e13e5d15d75eac0d1c/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* element-not-found.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4d2e287f1ae277c1ffc8/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d61f2274a992c4274641/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
18
18
 
19
19
  {/* findall-coffee-icons.test.mjs output */}
20
20
  <iframe
21
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4cdc8cd69b3fa8c89814/replay"
21
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d5d32274a992c427462d/replay"
22
22
  width="100%"
23
23
  height="600"
24
24
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* hover-image.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4c3b287f1ae277c1ff92/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d52c823fc6a1246b8e58/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
18
18
 
19
19
  {/* hover-text-with-description.test.mjs output */}
20
20
  <iframe
21
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4c1e287f1ae277c1ff81/replay"
21
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d5133e5d15d75eac0d2a/replay"
22
22
  width="100%"
23
23
  height="600"
24
24
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* hover-text.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4d5d287f1ae277c1ffca/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d64d2274a992c4274643/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* installer.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4c69287f1ae277c1ffa6/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d55d3e5d15d75eac0d4e/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* launch-vscode-linux.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4c068cd69b3fa8c897cd/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d4fb2274a992c42745e0/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
18
18
 
19
19
  {/* parse.test.mjs output */}
20
20
  <iframe
21
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4d75287f1ae277c1ffcb/replay"
21
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d6653e5d15d75eac0d95/replay"
22
22
  width="100%"
23
23
  height="600"
24
24
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* press-keys.test.mjs output */}
14
14
  <iframe
15
- src="https://console-test.testdriver.ai/replay/6a4c53cf8cd69b3fa8c8986e?share=ynZ6gn7JlP9dW2rY2Oc5bQ&embed=true"
15
+ src="https://console-test.testdriver.ai/replay/6a56dc8e3e5d15d75eac0df0?share=ZM6rTCmGwCpC1YtUtOcbhw&embed=true"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* scroll-keyboard.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4cf5287f1ae277c1ffb7/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d5eb3e5d15d75eac0d8a/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* scroll.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4d14287f1ae277c1ffc4/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d6092274a992c427463d/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
12
12
 
13
13
  {/* type.test.mjs output */}
14
14
  <iframe
15
- src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a4c4c948cd69b3fa8c89809/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/6a56d58c2274a992c4274611/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
package/docs/v7/find.mdx CHANGED
@@ -55,7 +55,7 @@ const element = await testdriver.find(description, options)
55
55
  </ParamField>
56
56
 
57
57
  <ParamField path="verify" type="boolean" default={false}>
58
- Enable AI verification of the located element. When `true`, a second AI call checks that the coordinates returned actually correspond to the requested element, catching hallucinated or incorrect positions. Disabled by default for lower latency.
58
+ Enable AI verification of the located element. When `true`, a second AI call checks that the coordinates returned actually correspond to the requested element, catching hallucinated or incorrect positions. Disabled by default for lower latency. Defaults to the global `verify` option set on the [SDK constructor](/v7/client) when not specified per call.
59
59
  </ParamField>
60
60
 
61
61
  <ParamField path="ai" type="object">
@@ -18,7 +18,7 @@
18
18
  * mirroring how the stdio MCP server has always behaved.
19
19
  */
20
20
  import { SessionStartInputSchema, type SessionStartInput } from "../provision-types.js";
21
- import { type SessionState } from "../session.js";
21
+ import { SessionManager, type SessionState } from "../session.js";
22
22
  export { SessionStartInputSchema, type SessionStartInput };
23
23
  export interface ActionImage {
24
24
  kind: "screenshot" | "cropped";
@@ -44,14 +44,75 @@ export declare class NoActiveSessionError extends Error {
44
44
  constructor(code: "NO_SESSION" | "SESSION_EXPIRED", message: string, expiredSessionId?: string);
45
45
  }
46
46
  /**
47
- * Optional adapter-supplied recovery hook. When the singleton SDK is missing or
48
- * stale at action time, {@link requireActiveSession} calls this to obtain the
49
- * params needed to rebuild the connection from the still-alive sandbox, then
50
- * reconnects before throwing NO_SESSION.
47
+ * The mutable state a single sandbox session needs: the live SDK handle, the
48
+ * element-ref map from `find`/`findall`, the "last screenshot" `check` diffs
49
+ * against, the adapter recovery hook, the in-flight reconnect promise, and the
50
+ * session-lifecycle manager.
51
+ *
52
+ * This used to be a bag of module-level singletons ("single sandbox per
53
+ * process"). That is correct for hosts that ARE one-session-per-process — eve
54
+ * (each durable turn is its own recycled process) and the stdio MCP server — but
55
+ * the Streamable-HTTP MCP server is one long-lived process serving *concurrent*
56
+ * clients, where shared singletons let one client's tool call read another
57
+ * client's sandbox. So the state moves into {@link CoreContext} and is resolved
58
+ * per async call via {@link als}.
59
+ */
60
+ export interface CoreContext {
61
+ sdk: any;
62
+ lastScreenshotBase64: string | null;
63
+ reconnectResolver: ReconnectResolver | null;
64
+ /** In-flight reconnect, so concurrent actions in one context share one rebuild. */
65
+ reconnecting: Promise<void> | null;
66
+ /** Stored element instances from `find`/`findall`, addressable by ref. */
67
+ elementRefs: Map<string, {
68
+ element: any;
69
+ description: string;
70
+ coords: {
71
+ x: number;
72
+ y: number;
73
+ centerX: number;
74
+ centerY: number;
75
+ };
76
+ }>;
77
+ /** Session lifecycle for THIS context. */
78
+ sessions: SessionManager;
79
+ /**
80
+ * Opaque per-connection scratch space for adapters (e.g. the MCP server's
81
+ * image store). mcp-core doesn't read this; it just guarantees each isolated
82
+ * context gets its own object, so adapter-side per-connection state rides along
83
+ * with the same AsyncLocalStorage isolation instead of needing a second one.
84
+ */
85
+ adapter: Record<string, unknown>;
86
+ }
87
+ /** Build a fresh, empty context. Callers that want isolation mint one per connection. */
88
+ export declare function createCoreContext(): CoreContext;
89
+ /**
90
+ * Run `fn` with `context` as the active {@link CoreContext}, isolating every
91
+ * action's state (sdk, element refs, session, recovery hook) for the duration.
92
+ * The HTTP MCP server wraps each connection's request handling in this so
93
+ * concurrent clients never share a sandbox. Hosts that don't call this keep
94
+ * using {@link globalContext} exactly as before.
95
+ */
96
+ export declare function runInContext<T>(context: CoreContext, fn: () => T): T;
97
+ /** Build an isolated context whose SessionManager is its own (not the global). */
98
+ export declare function createIsolatedContext(): CoreContext;
99
+ /** The active context's adapter scratch space (see {@link CoreContext.adapter}). */
100
+ export declare function getAdapterState(): Record<string, unknown>;
101
+ /** The active context's current session (null when none). Adapters use this for
102
+ * read-only lookups (e.g. the MCP server's testFile/expiry) that must resolve
103
+ * the caller's own session, not a process-global one. */
104
+ export declare function getCurrentSession(): SessionState | null;
105
+ /** Time remaining (ms) on a session in the active context. */
106
+ export declare function getSessionTimeRemaining(sessionId: string): number;
107
+ /**
108
+ * Optional adapter-supplied recovery hook. When the SDK is missing or stale at
109
+ * action time, {@link requireActiveSession} calls this to obtain the params
110
+ * needed to rebuild the connection from the still-alive sandbox, then reconnects
111
+ * before throwing NO_SESSION.
51
112
  *
52
113
  * Why a hook instead of mcp-core owning the handle: the durable facts (sandbox
53
114
  * id, config) and the API key must survive a host process recycle, but this
54
- * module's globals do NOT — they reset on the very recycle we're recovering
115
+ * context's state does NOT — it resets on the very recycle we're recovering
55
116
  * from. So the *durable owner* (eve's per-session state) registers a resolver
56
117
  * that reads its own durable store and re-resolves the key per call. Hosts with
57
118
  * one long-lived process (stdio MCP server, CLI) register nothing: the resolver
@@ -60,7 +121,7 @@ export declare class NoActiveSessionError extends Error {
60
121
  *
61
122
  * The resolver returns `null` when it has nothing to recover from (no sandbox
62
123
  * provisioned this session), in which case we fall through to the normal throw.
63
- * It is re-registered each step by the adapter (module globals reset on recycle),
124
+ * It is re-registered each step by the adapter (context state resets on recycle),
64
125
  * so a stale closure can't outlive the process it was bound to.
65
126
  */
66
127
  export type ReconnectResolver = () => Promise<ReconnectParams | null>;