e2e 0.15.1 → 0.16.0

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.
Files changed (1019) hide show
  1. package/README.md +51 -24
  2. package/dist/.build.json +1 -1
  3. package/dist/agent/act-validation.d.ts +10 -1
  4. package/dist/agent/act-validation.js +48 -1
  5. package/dist/agent/act.d.ts +1 -2
  6. package/dist/agent/act.js +25 -8
  7. package/dist/agent/action-dispatcher.d.ts +0 -1
  8. package/dist/agent/action-dispatcher.js +0 -1
  9. package/dist/agent/action-names.d.ts +0 -1
  10. package/dist/agent/action-names.js +0 -1
  11. package/dist/agent/actions.d.ts +0 -1
  12. package/dist/agent/actions.js +0 -1
  13. package/dist/agent/agent-brand.d.ts +0 -1
  14. package/dist/agent/agent-brand.js +0 -1
  15. package/dist/agent/ai-sdk.d.ts +7 -1
  16. package/dist/agent/ai-sdk.js +11 -1
  17. package/dist/agent/call-options.d.ts +0 -1
  18. package/dist/agent/call-options.js +0 -1
  19. package/dist/agent/default-agent.d.ts +0 -1
  20. package/dist/agent/default-agent.js +0 -1
  21. package/dist/agent/derived.d.ts +0 -1
  22. package/dist/agent/derived.js +0 -1
  23. package/dist/agent/error.d.ts +16 -4
  24. package/dist/agent/error.js +25 -7
  25. package/dist/agent/executor.d.ts +0 -1
  26. package/dist/agent/executor.js +0 -1
  27. package/dist/agent/index.d.ts +0 -1
  28. package/dist/agent/index.js +0 -1
  29. package/dist/agent/interactive-step.d.ts +0 -1
  30. package/dist/agent/interactive-step.js +0 -1
  31. package/dist/agent/invocation.d.ts +0 -1
  32. package/dist/agent/invocation.js +10 -5
  33. package/dist/agent/ledger.d.ts +0 -1
  34. package/dist/agent/ledger.js +0 -1
  35. package/dist/agent/loop-guards.d.ts +0 -1
  36. package/dist/agent/loop-guards.js +0 -1
  37. package/dist/agent/model/adapter.d.ts +0 -1
  38. package/dist/agent/model/adapter.js +0 -1
  39. package/dist/agent/model/overflow.d.ts +0 -1
  40. package/dist/agent/model/overflow.js +0 -1
  41. package/dist/agent/model/provider-hints.d.ts +0 -1
  42. package/dist/agent/model/provider-hints.js +0 -1
  43. package/dist/agent/model/schema.d.ts +0 -1
  44. package/dist/agent/model/schema.js +0 -1
  45. package/dist/agent/model/sdk.d.ts +0 -1
  46. package/dist/agent/model/sdk.js +0 -1
  47. package/dist/agent/model/stall.d.ts +0 -1
  48. package/dist/agent/model/stall.js +0 -1
  49. package/dist/agent/model/tool-choice.d.ts +24 -2
  50. package/dist/agent/model/tool-choice.js +27 -2
  51. package/dist/agent/observation-budget.d.ts +0 -1
  52. package/dist/agent/observation-budget.js +0 -1
  53. package/dist/agent/observation-feed.d.ts +0 -1
  54. package/dist/agent/observation-feed.js +0 -1
  55. package/dist/agent/observation.d.ts +0 -1
  56. package/dist/agent/observation.js +0 -1
  57. package/dist/agent/operation-queue.d.ts +0 -1
  58. package/dist/agent/operation-queue.js +0 -1
  59. package/dist/agent/phases.d.ts +0 -1
  60. package/dist/agent/phases.js +0 -1
  61. package/dist/agent/pixels.d.ts +0 -1
  62. package/dist/agent/pixels.js +0 -1
  63. package/dist/agent/point-tap.d.ts +0 -1
  64. package/dist/agent/point-tap.js +0 -1
  65. package/dist/agent/primitives.d.ts +6 -1
  66. package/dist/agent/primitives.js +4 -2
  67. package/dist/agent/prompts.d.ts +0 -1
  68. package/dist/agent/prompts.js +0 -1
  69. package/dist/agent/protocol.d.ts +0 -1
  70. package/dist/agent/protocol.js +0 -1
  71. package/dist/agent/public.d.ts +0 -1
  72. package/dist/agent/public.js +0 -1
  73. package/dist/agent/reading.d.ts +0 -1
  74. package/dist/agent/reading.js +0 -1
  75. package/dist/agent/replay.d.ts +0 -1
  76. package/dist/agent/replay.js +0 -1
  77. package/dist/agent/screen-update.d.ts +0 -1
  78. package/dist/agent/screen-update.js +0 -1
  79. package/dist/agent/scroll-target.d.ts +0 -1
  80. package/dist/agent/scroll-target.js +0 -1
  81. package/dist/agent/secrets.d.ts +0 -1
  82. package/dist/agent/secrets.js +0 -1
  83. package/dist/agent/settle-policy.d.ts +0 -1
  84. package/dist/agent/settle-policy.js +0 -1
  85. package/dist/agent/step-accounting.d.ts +0 -1
  86. package/dist/agent/step-accounting.js +0 -1
  87. package/dist/agent/step-cache.d.ts +14 -4
  88. package/dist/agent/step-cache.js +13 -4
  89. package/dist/agent/tool-loop.d.ts +0 -1
  90. package/dist/agent/tool-loop.js +62 -10
  91. package/dist/agent/tool-output.d.ts +0 -1
  92. package/dist/agent/tool-output.js +0 -1
  93. package/dist/agent/tool.d.ts +0 -1
  94. package/dist/agent/tool.js +0 -1
  95. package/dist/agent/transcript-compaction.d.ts +0 -1
  96. package/dist/agent/transcript-compaction.js +0 -1
  97. package/dist/agent/upload-paths.d.ts +0 -1
  98. package/dist/agent/upload-paths.js +0 -1
  99. package/dist/agent/usage.d.ts +0 -1
  100. package/dist/agent/usage.js +0 -1
  101. package/dist/cache/anchors.d.ts +0 -1
  102. package/dist/cache/anchors.js +0 -1
  103. package/dist/cache/context.d.ts +19 -7
  104. package/dist/cache/context.js +15 -22
  105. package/dist/cache/decide.d.ts +0 -1
  106. package/dist/cache/decide.js +0 -1
  107. package/dist/cache/identity.d.ts +0 -1
  108. package/dist/cache/identity.js +0 -1
  109. package/dist/cache/recorder.d.ts +0 -1
  110. package/dist/cache/recorder.js +0 -1
  111. package/dist/cache/relocate.d.ts +0 -1
  112. package/dist/cache/relocate.js +0 -1
  113. package/dist/cache/route.d.ts +0 -1
  114. package/dist/cache/route.js +0 -1
  115. package/dist/cache/store.d.ts +0 -1
  116. package/dist/cache/store.js +0 -1
  117. package/dist/cache/template.d.ts +0 -1
  118. package/dist/cache/template.js +0 -1
  119. package/dist/cache/trace.d.ts +0 -1
  120. package/dist/cache/trace.js +0 -1
  121. package/dist/cli/bin.d.ts +0 -1
  122. package/dist/cli/bin.js +0 -1
  123. package/dist/cli/cache.d.ts +0 -1
  124. package/dist/cli/cache.js +0 -1
  125. package/dist/cli/docs-url.d.ts +0 -1
  126. package/dist/cli/docs-url.js +0 -1
  127. package/dist/cli/feedback.d.ts +0 -1
  128. package/dist/cli/feedback.js +0 -1
  129. package/dist/cli/guide.d.ts +0 -1
  130. package/dist/cli/guide.js +0 -1
  131. package/dist/cli/index.d.ts +0 -1
  132. package/dist/cli/index.js +2 -3
  133. package/dist/cli/init/agent-skill.d.ts +0 -1
  134. package/dist/cli/init/agent-skill.js +0 -1
  135. package/dist/cli/init/engines.d.ts +0 -1
  136. package/dist/cli/init/engines.js +0 -1
  137. package/dist/cli/init/gateways.d.ts +0 -1
  138. package/dist/cli/init/gateways.js +0 -1
  139. package/dist/cli/init/mcp-config.d.ts +0 -1
  140. package/dist/cli/init/mcp-config.js +0 -1
  141. package/dist/cli/init/package.d.ts +0 -1
  142. package/dist/cli/init/package.js +0 -1
  143. package/dist/cli/init/scaffold.d.ts +1 -1
  144. package/dist/cli/init/scaffold.js +2 -2
  145. package/dist/cli/init/sibling-versions.json +1 -1
  146. package/dist/cli/init/versions.d.ts +0 -1
  147. package/dist/cli/init/versions.js +0 -1
  148. package/dist/cli/init.d.ts +0 -1
  149. package/dist/cli/init.js +0 -1
  150. package/dist/cli/mcp.d.ts +9 -2
  151. package/dist/cli/mcp.js +14 -2
  152. package/dist/cli/signals.d.ts +0 -1
  153. package/dist/cli/signals.js +0 -1
  154. package/dist/cli/skill.d.ts +0 -1
  155. package/dist/cli/skill.js +0 -1
  156. package/dist/cli/telemetry.d.ts +0 -1
  157. package/dist/cli/telemetry.js +1 -2
  158. package/dist/cli/wordmark.d.ts +0 -1
  159. package/dist/cli/wordmark.js +0 -1
  160. package/dist/collect/collect.d.ts +0 -1
  161. package/dist/collect/collect.js +3 -2
  162. package/dist/collect/registry.d.ts +6 -3
  163. package/dist/collect/registry.js +31 -14
  164. package/dist/collect/select.d.ts +0 -1
  165. package/dist/collect/select.js +0 -1
  166. package/dist/config/agent.d.ts +0 -1
  167. package/dist/config/agent.js +0 -1
  168. package/dist/config/app.d.ts +0 -1
  169. package/dist/config/app.js +0 -1
  170. package/dist/config/command.d.ts +0 -1
  171. package/dist/config/command.js +0 -1
  172. package/dist/config/diagnose.d.ts +0 -1
  173. package/dist/config/diagnose.js +0 -1
  174. package/dist/config/esm-hooks.d.ts +0 -1
  175. package/dist/config/esm-hooks.js +0 -1
  176. package/dist/config/load.d.ts +0 -1
  177. package/dist/config/load.js +0 -1
  178. package/dist/config/resolve.d.ts +0 -1
  179. package/dist/config/resolve.js +0 -1
  180. package/dist/config/secrets.d.ts +0 -1
  181. package/dist/config/secrets.js +0 -1
  182. package/dist/config/targets.d.ts +0 -1
  183. package/dist/config/targets.js +0 -1
  184. package/dist/config/validate.d.ts +0 -1
  185. package/dist/config/validate.js +0 -1
  186. package/dist/engine/contract.d.ts +0 -1
  187. package/dist/engine/contract.js +0 -1
  188. package/dist/engine/index.d.ts +1 -2
  189. package/dist/engine/index.js +4 -4
  190. package/dist/engine/manifest.d.ts +0 -1
  191. package/dist/engine/manifest.js +0 -1
  192. package/dist/engine/recording.d.ts +0 -1
  193. package/dist/engine/recording.js +0 -1
  194. package/dist/engine/resolve.d.ts +0 -1
  195. package/dist/engine/resolve.js +0 -1
  196. package/dist/engine/session.d.ts +0 -1
  197. package/dist/engine/session.js +0 -1
  198. package/dist/engine/surface.d.ts +0 -1
  199. package/dist/engine/surface.js +0 -1
  200. package/dist/engine/timing.d.ts +0 -1
  201. package/dist/engine/timing.js +0 -1
  202. package/dist/expect/async.d.ts +0 -1
  203. package/dist/expect/async.js +99 -58
  204. package/dist/expect/attempt.d.ts +0 -1
  205. package/dist/expect/attempt.js +0 -1
  206. package/dist/expect/index.d.ts +0 -1
  207. package/dist/expect/index.js +0 -1
  208. package/dist/expect/poll.d.ts +0 -1
  209. package/dist/expect/poll.js +0 -1
  210. package/dist/expect/soft.d.ts +0 -1
  211. package/dist/expect/soft.js +0 -1
  212. package/dist/expect/values.d.ts +0 -1
  213. package/dist/expect/values.js +1 -2
  214. package/dist/explore/body.d.ts +0 -1
  215. package/dist/explore/body.js +0 -1
  216. package/dist/explore/executor.d.ts +0 -1
  217. package/dist/explore/executor.js +0 -1
  218. package/dist/explore/index.d.ts +0 -1
  219. package/dist/explore/index.js +16 -2
  220. package/dist/explore/plan.d.ts +0 -1
  221. package/dist/explore/plan.js +0 -1
  222. package/dist/explore/progress.d.ts +0 -1
  223. package/dist/explore/progress.js +0 -1
  224. package/dist/explore/state.d.ts +0 -1
  225. package/dist/explore/state.js +0 -1
  226. package/dist/index.d.ts +0 -1
  227. package/dist/index.js +0 -1
  228. package/dist/internal/ai-trace.d.ts +0 -1
  229. package/dist/internal/ai-trace.js +0 -1
  230. package/dist/internal/atomic-write.d.ts +0 -1
  231. package/dist/internal/atomic-write.js +0 -1
  232. package/dist/internal/brands.d.ts +0 -1
  233. package/dist/internal/brands.js +0 -1
  234. package/dist/internal/debug.d.ts +0 -1
  235. package/dist/internal/debug.js +0 -1
  236. package/dist/internal/env.d.ts +0 -1
  237. package/dist/internal/env.js +0 -1
  238. package/dist/internal/errors.d.ts +0 -1
  239. package/dist/internal/errors.js +0 -1
  240. package/dist/internal/geometry.d.ts +0 -1
  241. package/dist/internal/geometry.js +0 -1
  242. package/dist/internal/git.d.ts +0 -1
  243. package/dist/internal/git.js +0 -1
  244. package/dist/internal/globs.d.ts +0 -1
  245. package/dist/internal/globs.js +0 -1
  246. package/dist/internal/ids.d.ts +0 -1
  247. package/dist/internal/ids.js +0 -1
  248. package/dist/internal/json-value.d.ts +0 -1
  249. package/dist/internal/json-value.js +0 -1
  250. package/dist/internal/keys.d.ts +0 -1
  251. package/dist/internal/keys.js +0 -1
  252. package/dist/internal/node-version.d.ts +0 -1
  253. package/dist/internal/node-version.js +0 -1
  254. package/dist/internal/objects.d.ts +0 -1
  255. package/dist/internal/objects.js +0 -1
  256. package/dist/internal/options.d.ts +0 -1
  257. package/dist/internal/options.js +0 -1
  258. package/dist/internal/package-manager.d.ts +0 -1
  259. package/dist/internal/package-manager.js +0 -1
  260. package/dist/internal/package-version.d.ts +0 -1
  261. package/dist/internal/package-version.js +0 -1
  262. package/dist/internal/paths.d.ts +0 -1
  263. package/dist/internal/paths.js +0 -1
  264. package/dist/internal/realm-slot.d.ts +0 -1
  265. package/dist/internal/realm-slot.js +0 -1
  266. package/dist/internal/recording-modes.d.ts +0 -1
  267. package/dist/internal/recording-modes.js +0 -1
  268. package/dist/internal/redact.d.ts +0 -1
  269. package/dist/internal/redact.js +0 -1
  270. package/dist/internal/regexp.d.ts +0 -1
  271. package/dist/internal/regexp.js +0 -1
  272. package/dist/internal/roles.d.ts +0 -1
  273. package/dist/internal/roles.js +0 -1
  274. package/dist/internal/skip.d.ts +0 -1
  275. package/dist/internal/skip.js +0 -1
  276. package/dist/internal/source.d.ts +0 -1
  277. package/dist/internal/source.js +0 -1
  278. package/dist/internal/standard-schema.d.ts +0 -1
  279. package/dist/internal/standard-schema.js +0 -1
  280. package/dist/internal/suggest.d.ts +0 -1
  281. package/dist/internal/suggest.js +0 -1
  282. package/dist/internal/text.d.ts +8 -1
  283. package/dist/internal/text.js +13 -2
  284. package/dist/internal/time.d.ts +0 -1
  285. package/dist/internal/time.js +0 -1
  286. package/dist/internal/urls.d.ts +0 -1
  287. package/dist/internal/urls.js +0 -1
  288. package/dist/internal/vcs.d.ts +0 -1
  289. package/dist/internal/vcs.js +0 -1
  290. package/dist/internal/zip.d.ts +0 -1
  291. package/dist/internal/zip.js +0 -1
  292. package/dist/locator/engine.d.ts +0 -1
  293. package/dist/locator/engine.js +0 -1
  294. package/dist/locator/expression.d.ts +0 -1
  295. package/dist/locator/expression.js +0 -1
  296. package/dist/locator/screen.d.ts +0 -1
  297. package/dist/locator/screen.js +0 -1
  298. package/dist/mcp/catalog.d.ts +4 -1
  299. package/dist/mcp/catalog.js +2 -3
  300. package/dist/mcp/config.d.ts +0 -1
  301. package/dist/mcp/config.js +0 -1
  302. package/dist/mcp/recording.d.ts +0 -1
  303. package/dist/mcp/recording.js +0 -1
  304. package/dist/mcp/server.d.ts +8 -1
  305. package/dist/mcp/server.js +8 -5
  306. package/dist/mcp/session.d.ts +4 -2
  307. package/dist/mcp/session.js +43 -21
  308. package/dist/mcp/sessions.d.ts +2 -1
  309. package/dist/mcp/sessions.js +5 -2
  310. package/dist/mcp/tools.d.ts +7 -6
  311. package/dist/mcp/tools.js +36 -11
  312. package/dist/mcp/usage.d.ts +61 -0
  313. package/dist/mcp/usage.js +73 -0
  314. package/dist/oauth/callback-server.d.ts +0 -1
  315. package/dist/oauth/callback-server.js +0 -1
  316. package/dist/oauth/chatgpt.d.ts +0 -1
  317. package/dist/oauth/chatgpt.js +0 -1
  318. package/dist/oauth/cli.d.ts +0 -1
  319. package/dist/oauth/cli.js +0 -1
  320. package/dist/oauth/copilot.d.ts +0 -1
  321. package/dist/oauth/copilot.js +0 -1
  322. package/dist/oauth/device-code.d.ts +0 -1
  323. package/dist/oauth/device-code.js +0 -1
  324. package/dist/oauth/errors.d.ts +0 -1
  325. package/dist/oauth/errors.js +0 -1
  326. package/dist/oauth/fetch.d.ts +0 -1
  327. package/dist/oauth/fetch.js +0 -1
  328. package/dist/oauth/grok.d.ts +0 -1
  329. package/dist/oauth/grok.js +0 -1
  330. package/dist/oauth/jwt.d.ts +0 -1
  331. package/dist/oauth/jwt.js +0 -1
  332. package/dist/oauth/login.d.ts +0 -1
  333. package/dist/oauth/login.js +0 -1
  334. package/dist/oauth/models.d.ts +0 -1
  335. package/dist/oauth/models.js +0 -1
  336. package/dist/oauth/pkce.d.ts +0 -1
  337. package/dist/oauth/pkce.js +0 -1
  338. package/dist/oauth/providers/github-copilot.d.ts +0 -1
  339. package/dist/oauth/providers/github-copilot.js +10 -3
  340. package/dist/oauth/providers/openai.d.ts +0 -1
  341. package/dist/oauth/providers/openai.js +1 -2
  342. package/dist/oauth/providers/xai.d.ts +0 -1
  343. package/dist/oauth/providers/xai.js +0 -1
  344. package/dist/oauth/providers.d.ts +0 -1
  345. package/dist/oauth/providers.js +0 -1
  346. package/dist/oauth/sse.d.ts +0 -1
  347. package/dist/oauth/sse.js +0 -1
  348. package/dist/oauth/store.d.ts +0 -1
  349. package/dist/oauth/store.js +0 -1
  350. package/dist/oauth/token-endpoint.d.ts +0 -1
  351. package/dist/oauth/token-endpoint.js +0 -1
  352. package/dist/oauth/types.d.ts +0 -1
  353. package/dist/oauth/types.js +0 -1
  354. package/dist/params.d.ts +0 -1
  355. package/dist/params.js +0 -1
  356. package/dist/report/build.d.ts +0 -1
  357. package/dist/report/build.js +0 -1
  358. package/dist/report/builtin.d.ts +0 -1
  359. package/dist/report/builtin.js +0 -1
  360. package/dist/report/code-frame.d.ts +0 -1
  361. package/dist/report/code-frame.js +0 -1
  362. package/dist/report/debug-steps.d.ts +0 -1
  363. package/dist/report/debug-steps.js +0 -1
  364. package/dist/report/explore-text.d.ts +0 -1
  365. package/dist/report/explore-text.js +0 -1
  366. package/dist/report/failure-text.d.ts +0 -1
  367. package/dist/report/failure-text.js +0 -1
  368. package/dist/report/format.d.ts +0 -1
  369. package/dist/report/format.js +0 -1
  370. package/dist/report/json.d.ts +0 -1
  371. package/dist/report/json.js +0 -1
  372. package/dist/report/junit.d.ts +0 -1
  373. package/dist/report/junit.js +0 -1
  374. package/dist/report/list-explore.d.ts +0 -1
  375. package/dist/report/list-explore.js +0 -1
  376. package/dist/report/list-model.d.ts +0 -1
  377. package/dist/report/list-model.js +0 -1
  378. package/dist/report/list-steps.d.ts +0 -1
  379. package/dist/report/list-steps.js +0 -1
  380. package/dist/report/list.d.ts +0 -1
  381. package/dist/report/list.js +0 -1
  382. package/dist/report/live-window.d.ts +0 -1
  383. package/dist/report/live-window.js +0 -1
  384. package/dist/report/markdown-text.d.ts +0 -1
  385. package/dist/report/markdown-text.js +0 -1
  386. package/dist/report/markdown.d.ts +0 -1
  387. package/dist/report/markdown.js +0 -1
  388. package/dist/report/outcome.d.ts +0 -1
  389. package/dist/report/outcome.js +0 -1
  390. package/dist/report/repeats.d.ts +0 -1
  391. package/dist/report/repeats.js +0 -1
  392. package/dist/report/running-tree.d.ts +0 -1
  393. package/dist/report/running-tree.js +0 -1
  394. package/dist/report/write.d.ts +0 -1
  395. package/dist/report/write.js +0 -1
  396. package/dist/run/app-ports.d.ts +0 -1
  397. package/dist/run/app-ports.js +0 -1
  398. package/dist/run/artifacts.d.ts +0 -1
  399. package/dist/run/artifacts.js +0 -1
  400. package/dist/run/budget.d.ts +0 -1
  401. package/dist/run/budget.js +0 -1
  402. package/dist/run/declared-processes.d.ts +0 -1
  403. package/dist/run/declared-processes.js +0 -1
  404. package/dist/run/events.d.ts +0 -1
  405. package/dist/run/events.js +0 -1
  406. package/dist/run/execute.d.ts +0 -1
  407. package/dist/run/execute.js +27 -13
  408. package/dist/run/extended-fixtures.d.ts +0 -1
  409. package/dist/run/extended-fixtures.js +0 -1
  410. package/dist/run/failure-evidence.d.ts +0 -1
  411. package/dist/run/failure-evidence.js +0 -1
  412. package/dist/run/fixture-recording.d.ts +0 -1
  413. package/dist/run/fixture-recording.js +0 -1
  414. package/dist/run/fixtures.d.ts +0 -1
  415. package/dist/run/fixtures.js +0 -1
  416. package/dist/run/in-process.d.ts +0 -1
  417. package/dist/run/in-process.js +0 -1
  418. package/dist/run/last-run.d.ts +0 -1
  419. package/dist/run/last-run.js +0 -1
  420. package/dist/run/managed-process.d.ts +0 -1
  421. package/dist/run/managed-process.js +0 -1
  422. package/dist/run/output.d.ts +0 -1
  423. package/dist/run/output.js +0 -1
  424. package/dist/run/process-pool.d.ts +0 -1
  425. package/dist/run/process-pool.js +0 -1
  426. package/dist/run/provision.d.ts +0 -1
  427. package/dist/run/provision.js +0 -1
  428. package/dist/run/realm.d.ts +2 -1
  429. package/dist/run/realm.js +1 -2
  430. package/dist/run/records.d.ts +0 -1
  431. package/dist/run/records.js +0 -1
  432. package/dist/run/retry.d.ts +0 -1
  433. package/dist/run/retry.js +0 -1
  434. package/dist/run/runner.d.ts +2 -1
  435. package/dist/run/runner.js +1 -2
  436. package/dist/run/scheduler.d.ts +0 -1
  437. package/dist/run/scheduler.js +0 -1
  438. package/dist/run/secrecy.d.ts +15 -1
  439. package/dist/run/secrecy.js +27 -2
  440. package/dist/run/serial.d.ts +0 -1
  441. package/dist/run/serial.js +0 -1
  442. package/dist/run/sessions.d.ts +0 -1
  443. package/dist/run/sessions.js +0 -1
  444. package/dist/run/standalone.d.ts +0 -1
  445. package/dist/run/standalone.js +3 -3
  446. package/dist/run/steps.d.ts +2 -3
  447. package/dist/run/steps.js +4 -2
  448. package/dist/run/trace-redaction.d.ts +0 -1
  449. package/dist/run/trace-redaction.js +0 -1
  450. package/dist/run/unit-runner.d.ts +0 -1
  451. package/dist/run/unit-runner.js +0 -1
  452. package/dist/run/units.d.ts +0 -1
  453. package/dist/run/units.js +0 -1
  454. package/dist/run/worker/entry.d.ts +0 -1
  455. package/dist/run/worker/entry.js +2 -3
  456. package/dist/run/worker/handle.d.ts +0 -1
  457. package/dist/run/worker/handle.js +0 -1
  458. package/dist/run/worker/protocol.d.ts +0 -1
  459. package/dist/run/worker/protocol.js +0 -1
  460. package/dist/run/worker/session.d.ts +0 -1
  461. package/dist/run/worker/session.js +0 -1
  462. package/dist/run/worker-models.d.ts +0 -1
  463. package/dist/run/worker-models.js +0 -1
  464. package/dist/secrets.d.ts +0 -1
  465. package/dist/secrets.js +0 -1
  466. package/dist/telemetry/checkout.d.ts +0 -1
  467. package/dist/telemetry/checkout.js +0 -1
  468. package/dist/telemetry/environment.d.ts +0 -1
  469. package/dist/telemetry/environment.js +0 -1
  470. package/dist/telemetry/events.d.ts +26 -10
  471. package/dist/telemetry/events.js +107 -13
  472. package/dist/telemetry/failure-kind.d.ts +0 -1
  473. package/dist/telemetry/failure-kind.js +0 -1
  474. package/dist/telemetry/posthog.d.ts +0 -1
  475. package/dist/telemetry/posthog.js +0 -1
  476. package/dist/telemetry/project.d.ts +0 -1
  477. package/dist/telemetry/project.js +0 -1
  478. package/dist/telemetry/store.d.ts +0 -1
  479. package/dist/telemetry/store.js +0 -1
  480. package/dist/telemetry/telemetry.d.ts +19 -8
  481. package/dist/telemetry/telemetry.js +26 -9
  482. package/dist/telemetry/token.d.ts +0 -1
  483. package/dist/telemetry/token.js +0 -1
  484. package/dist/types.d.ts +26 -24
  485. package/dist/types.js +0 -1
  486. package/docs/agent-steps.mdx +126 -0
  487. package/docs/agents.mdx +217 -0
  488. package/docs/api-testing.mdx +65 -0
  489. package/docs/authentication.mdx +345 -0
  490. package/docs/browser.mdx +440 -0
  491. package/docs/bug-bash.mdx +90 -0
  492. package/docs/cache.mdx +306 -0
  493. package/docs/ci.mdx +210 -0
  494. package/docs/coding-agents.mdx +183 -0
  495. package/docs/debugging.mdx +291 -0
  496. package/docs/executors.mdx +243 -0
  497. package/docs/explore.mdx +174 -0
  498. package/docs/github.mdx +184 -0
  499. package/docs/index.mdx +82 -0
  500. package/docs/integrations/eas.mdx +216 -0
  501. package/docs/integrations/index.mdx +24 -0
  502. package/docs/integrations/kernel.mdx +163 -0
  503. package/docs/migrate/cypress.mdx +124 -0
  504. package/docs/migrate/detox.mdx +140 -0
  505. package/docs/migrate/maestro.mdx +229 -0
  506. package/docs/migrate/playwright.mdx +430 -0
  507. package/docs/migrate/selenium.mdx +110 -0
  508. package/docs/mobile-ci.mdx +567 -0
  509. package/docs/mobile.mdx +595 -0
  510. package/docs/models.mdx +241 -0
  511. package/docs/quickstart.mdx +260 -0
  512. package/docs/reference/agent.mdx +524 -0
  513. package/docs/reference/app.mdx +72 -0
  514. package/docs/reference/cli.mdx +819 -0
  515. package/docs/reference/config.mdx +986 -0
  516. package/docs/reference/engine.mdx +1363 -0
  517. package/docs/reference/environment.mdx +113 -0
  518. package/docs/reference/errors.mdx +143 -0
  519. package/docs/reference/expect.mdx +546 -0
  520. package/docs/reference/mcp.mdx +205 -0
  521. package/docs/reference/mobile.mdx +522 -0
  522. package/docs/reference/reporters.mdx +216 -0
  523. package/docs/reference/screen.mdx +688 -0
  524. package/docs/reference/test.mdx +449 -0
  525. package/docs/reference/web.mdx +615 -0
  526. package/docs/security.mdx +308 -0
  527. package/docs/starting-your-app.mdx +231 -0
  528. package/docs/subscriptions.mdx +166 -0
  529. package/docs/telemetry.mdx +227 -0
  530. package/docs/tools.mdx +150 -0
  531. package/docs/viewports.mdx +146 -0
  532. package/docs/writing-an-engine.mdx +316 -0
  533. package/docs/writing-tests.mdx +256 -0
  534. package/package.json +5 -3
  535. package/skills/e2e/SKILL.md +4 -1
  536. package/skills/e2e/references/agent.md +3 -1
  537. package/skills/e2e/references/mcp.md +3 -0
  538. package/skills/e2e/references/setup.md +19 -4
  539. package/skills/e2e/references/writing-tests.md +11 -0
  540. package/dist/agent/act-validation.d.ts.map +0 -1
  541. package/dist/agent/act-validation.js.map +0 -1
  542. package/dist/agent/act.d.ts.map +0 -1
  543. package/dist/agent/act.js.map +0 -1
  544. package/dist/agent/action-dispatcher.d.ts.map +0 -1
  545. package/dist/agent/action-dispatcher.js.map +0 -1
  546. package/dist/agent/action-names.d.ts.map +0 -1
  547. package/dist/agent/action-names.js.map +0 -1
  548. package/dist/agent/actions.d.ts.map +0 -1
  549. package/dist/agent/actions.js.map +0 -1
  550. package/dist/agent/agent-brand.d.ts.map +0 -1
  551. package/dist/agent/agent-brand.js.map +0 -1
  552. package/dist/agent/ai-sdk.d.ts.map +0 -1
  553. package/dist/agent/ai-sdk.js.map +0 -1
  554. package/dist/agent/call-options.d.ts.map +0 -1
  555. package/dist/agent/call-options.js.map +0 -1
  556. package/dist/agent/default-agent.d.ts.map +0 -1
  557. package/dist/agent/default-agent.js.map +0 -1
  558. package/dist/agent/derived.d.ts.map +0 -1
  559. package/dist/agent/derived.js.map +0 -1
  560. package/dist/agent/error.d.ts.map +0 -1
  561. package/dist/agent/error.js.map +0 -1
  562. package/dist/agent/executor.d.ts.map +0 -1
  563. package/dist/agent/executor.js.map +0 -1
  564. package/dist/agent/index.d.ts.map +0 -1
  565. package/dist/agent/index.js.map +0 -1
  566. package/dist/agent/interactive-step.d.ts.map +0 -1
  567. package/dist/agent/interactive-step.js.map +0 -1
  568. package/dist/agent/invocation.d.ts.map +0 -1
  569. package/dist/agent/invocation.js.map +0 -1
  570. package/dist/agent/ledger.d.ts.map +0 -1
  571. package/dist/agent/ledger.js.map +0 -1
  572. package/dist/agent/loop-guards.d.ts.map +0 -1
  573. package/dist/agent/loop-guards.js.map +0 -1
  574. package/dist/agent/model/adapter.d.ts.map +0 -1
  575. package/dist/agent/model/adapter.js.map +0 -1
  576. package/dist/agent/model/overflow.d.ts.map +0 -1
  577. package/dist/agent/model/overflow.js.map +0 -1
  578. package/dist/agent/model/provider-hints.d.ts.map +0 -1
  579. package/dist/agent/model/provider-hints.js.map +0 -1
  580. package/dist/agent/model/schema.d.ts.map +0 -1
  581. package/dist/agent/model/schema.js.map +0 -1
  582. package/dist/agent/model/sdk.d.ts.map +0 -1
  583. package/dist/agent/model/sdk.js.map +0 -1
  584. package/dist/agent/model/stall.d.ts.map +0 -1
  585. package/dist/agent/model/stall.js.map +0 -1
  586. package/dist/agent/model/tool-choice.d.ts.map +0 -1
  587. package/dist/agent/model/tool-choice.js.map +0 -1
  588. package/dist/agent/observation-budget.d.ts.map +0 -1
  589. package/dist/agent/observation-budget.js.map +0 -1
  590. package/dist/agent/observation-feed.d.ts.map +0 -1
  591. package/dist/agent/observation-feed.js.map +0 -1
  592. package/dist/agent/observation.d.ts.map +0 -1
  593. package/dist/agent/observation.js.map +0 -1
  594. package/dist/agent/operation-queue.d.ts.map +0 -1
  595. package/dist/agent/operation-queue.js.map +0 -1
  596. package/dist/agent/phases.d.ts.map +0 -1
  597. package/dist/agent/phases.js.map +0 -1
  598. package/dist/agent/pixels.d.ts.map +0 -1
  599. package/dist/agent/pixels.js.map +0 -1
  600. package/dist/agent/point-tap.d.ts.map +0 -1
  601. package/dist/agent/point-tap.js.map +0 -1
  602. package/dist/agent/primitives.d.ts.map +0 -1
  603. package/dist/agent/primitives.js.map +0 -1
  604. package/dist/agent/prompts.d.ts.map +0 -1
  605. package/dist/agent/prompts.js.map +0 -1
  606. package/dist/agent/protocol.d.ts.map +0 -1
  607. package/dist/agent/protocol.js.map +0 -1
  608. package/dist/agent/public.d.ts.map +0 -1
  609. package/dist/agent/public.js.map +0 -1
  610. package/dist/agent/reading.d.ts.map +0 -1
  611. package/dist/agent/reading.js.map +0 -1
  612. package/dist/agent/replay.d.ts.map +0 -1
  613. package/dist/agent/replay.js.map +0 -1
  614. package/dist/agent/screen-update.d.ts.map +0 -1
  615. package/dist/agent/screen-update.js.map +0 -1
  616. package/dist/agent/scroll-target.d.ts.map +0 -1
  617. package/dist/agent/scroll-target.js.map +0 -1
  618. package/dist/agent/secrets.d.ts.map +0 -1
  619. package/dist/agent/secrets.js.map +0 -1
  620. package/dist/agent/settle-policy.d.ts.map +0 -1
  621. package/dist/agent/settle-policy.js.map +0 -1
  622. package/dist/agent/step-accounting.d.ts.map +0 -1
  623. package/dist/agent/step-accounting.js.map +0 -1
  624. package/dist/agent/step-cache.d.ts.map +0 -1
  625. package/dist/agent/step-cache.js.map +0 -1
  626. package/dist/agent/tool-loop.d.ts.map +0 -1
  627. package/dist/agent/tool-loop.js.map +0 -1
  628. package/dist/agent/tool-output.d.ts.map +0 -1
  629. package/dist/agent/tool-output.js.map +0 -1
  630. package/dist/agent/tool.d.ts.map +0 -1
  631. package/dist/agent/tool.js.map +0 -1
  632. package/dist/agent/transcript-compaction.d.ts.map +0 -1
  633. package/dist/agent/transcript-compaction.js.map +0 -1
  634. package/dist/agent/upload-paths.d.ts.map +0 -1
  635. package/dist/agent/upload-paths.js.map +0 -1
  636. package/dist/agent/usage.d.ts.map +0 -1
  637. package/dist/agent/usage.js.map +0 -1
  638. package/dist/cache/anchors.d.ts.map +0 -1
  639. package/dist/cache/anchors.js.map +0 -1
  640. package/dist/cache/context.d.ts.map +0 -1
  641. package/dist/cache/context.js.map +0 -1
  642. package/dist/cache/decide.d.ts.map +0 -1
  643. package/dist/cache/decide.js.map +0 -1
  644. package/dist/cache/identity.d.ts.map +0 -1
  645. package/dist/cache/identity.js.map +0 -1
  646. package/dist/cache/recorder.d.ts.map +0 -1
  647. package/dist/cache/recorder.js.map +0 -1
  648. package/dist/cache/relocate.d.ts.map +0 -1
  649. package/dist/cache/relocate.js.map +0 -1
  650. package/dist/cache/route.d.ts.map +0 -1
  651. package/dist/cache/route.js.map +0 -1
  652. package/dist/cache/store.d.ts.map +0 -1
  653. package/dist/cache/store.js.map +0 -1
  654. package/dist/cache/template.d.ts.map +0 -1
  655. package/dist/cache/template.js.map +0 -1
  656. package/dist/cache/trace.d.ts.map +0 -1
  657. package/dist/cache/trace.js.map +0 -1
  658. package/dist/cli/bin.d.ts.map +0 -1
  659. package/dist/cli/bin.js.map +0 -1
  660. package/dist/cli/cache.d.ts.map +0 -1
  661. package/dist/cli/cache.js.map +0 -1
  662. package/dist/cli/docs-url.d.ts.map +0 -1
  663. package/dist/cli/docs-url.js.map +0 -1
  664. package/dist/cli/feedback.d.ts.map +0 -1
  665. package/dist/cli/feedback.js.map +0 -1
  666. package/dist/cli/guide.d.ts.map +0 -1
  667. package/dist/cli/guide.js.map +0 -1
  668. package/dist/cli/index.d.ts.map +0 -1
  669. package/dist/cli/index.js.map +0 -1
  670. package/dist/cli/init/agent-skill.d.ts.map +0 -1
  671. package/dist/cli/init/agent-skill.js.map +0 -1
  672. package/dist/cli/init/engines.d.ts.map +0 -1
  673. package/dist/cli/init/engines.js.map +0 -1
  674. package/dist/cli/init/gateways.d.ts.map +0 -1
  675. package/dist/cli/init/gateways.js.map +0 -1
  676. package/dist/cli/init/mcp-config.d.ts.map +0 -1
  677. package/dist/cli/init/mcp-config.js.map +0 -1
  678. package/dist/cli/init/package.d.ts.map +0 -1
  679. package/dist/cli/init/package.js.map +0 -1
  680. package/dist/cli/init/scaffold.d.ts.map +0 -1
  681. package/dist/cli/init/scaffold.js.map +0 -1
  682. package/dist/cli/init/versions.d.ts.map +0 -1
  683. package/dist/cli/init/versions.js.map +0 -1
  684. package/dist/cli/init.d.ts.map +0 -1
  685. package/dist/cli/init.js.map +0 -1
  686. package/dist/cli/mcp.d.ts.map +0 -1
  687. package/dist/cli/mcp.js.map +0 -1
  688. package/dist/cli/signals.d.ts.map +0 -1
  689. package/dist/cli/signals.js.map +0 -1
  690. package/dist/cli/skill.d.ts.map +0 -1
  691. package/dist/cli/skill.js.map +0 -1
  692. package/dist/cli/telemetry.d.ts.map +0 -1
  693. package/dist/cli/telemetry.js.map +0 -1
  694. package/dist/cli/wordmark.d.ts.map +0 -1
  695. package/dist/cli/wordmark.js.map +0 -1
  696. package/dist/collect/collect.d.ts.map +0 -1
  697. package/dist/collect/collect.js.map +0 -1
  698. package/dist/collect/registry.d.ts.map +0 -1
  699. package/dist/collect/registry.js.map +0 -1
  700. package/dist/collect/select.d.ts.map +0 -1
  701. package/dist/collect/select.js.map +0 -1
  702. package/dist/config/agent.d.ts.map +0 -1
  703. package/dist/config/agent.js.map +0 -1
  704. package/dist/config/app.d.ts.map +0 -1
  705. package/dist/config/app.js.map +0 -1
  706. package/dist/config/command.d.ts.map +0 -1
  707. package/dist/config/command.js.map +0 -1
  708. package/dist/config/diagnose.d.ts.map +0 -1
  709. package/dist/config/diagnose.js.map +0 -1
  710. package/dist/config/esm-hooks.d.ts.map +0 -1
  711. package/dist/config/esm-hooks.js.map +0 -1
  712. package/dist/config/load.d.ts.map +0 -1
  713. package/dist/config/load.js.map +0 -1
  714. package/dist/config/resolve.d.ts.map +0 -1
  715. package/dist/config/resolve.js.map +0 -1
  716. package/dist/config/secrets.d.ts.map +0 -1
  717. package/dist/config/secrets.js.map +0 -1
  718. package/dist/config/targets.d.ts.map +0 -1
  719. package/dist/config/targets.js.map +0 -1
  720. package/dist/config/validate.d.ts.map +0 -1
  721. package/dist/config/validate.js.map +0 -1
  722. package/dist/engine/contract.d.ts.map +0 -1
  723. package/dist/engine/contract.js.map +0 -1
  724. package/dist/engine/index.d.ts.map +0 -1
  725. package/dist/engine/index.js.map +0 -1
  726. package/dist/engine/manifest.d.ts.map +0 -1
  727. package/dist/engine/manifest.js.map +0 -1
  728. package/dist/engine/recording.d.ts.map +0 -1
  729. package/dist/engine/recording.js.map +0 -1
  730. package/dist/engine/resolve.d.ts.map +0 -1
  731. package/dist/engine/resolve.js.map +0 -1
  732. package/dist/engine/session.d.ts.map +0 -1
  733. package/dist/engine/session.js.map +0 -1
  734. package/dist/engine/surface.d.ts.map +0 -1
  735. package/dist/engine/surface.js.map +0 -1
  736. package/dist/engine/timing.d.ts.map +0 -1
  737. package/dist/engine/timing.js.map +0 -1
  738. package/dist/expect/async.d.ts.map +0 -1
  739. package/dist/expect/async.js.map +0 -1
  740. package/dist/expect/attempt.d.ts.map +0 -1
  741. package/dist/expect/attempt.js.map +0 -1
  742. package/dist/expect/index.d.ts.map +0 -1
  743. package/dist/expect/index.js.map +0 -1
  744. package/dist/expect/poll.d.ts.map +0 -1
  745. package/dist/expect/poll.js.map +0 -1
  746. package/dist/expect/soft.d.ts.map +0 -1
  747. package/dist/expect/soft.js.map +0 -1
  748. package/dist/expect/values.d.ts.map +0 -1
  749. package/dist/expect/values.js.map +0 -1
  750. package/dist/explore/body.d.ts.map +0 -1
  751. package/dist/explore/body.js.map +0 -1
  752. package/dist/explore/executor.d.ts.map +0 -1
  753. package/dist/explore/executor.js.map +0 -1
  754. package/dist/explore/index.d.ts.map +0 -1
  755. package/dist/explore/index.js.map +0 -1
  756. package/dist/explore/plan.d.ts.map +0 -1
  757. package/dist/explore/plan.js.map +0 -1
  758. package/dist/explore/progress.d.ts.map +0 -1
  759. package/dist/explore/progress.js.map +0 -1
  760. package/dist/explore/state.d.ts.map +0 -1
  761. package/dist/explore/state.js.map +0 -1
  762. package/dist/index.d.ts.map +0 -1
  763. package/dist/index.js.map +0 -1
  764. package/dist/internal/ai-trace.d.ts.map +0 -1
  765. package/dist/internal/ai-trace.js.map +0 -1
  766. package/dist/internal/atomic-write.d.ts.map +0 -1
  767. package/dist/internal/atomic-write.js.map +0 -1
  768. package/dist/internal/brands.d.ts.map +0 -1
  769. package/dist/internal/brands.js.map +0 -1
  770. package/dist/internal/debug.d.ts.map +0 -1
  771. package/dist/internal/debug.js.map +0 -1
  772. package/dist/internal/env.d.ts.map +0 -1
  773. package/dist/internal/env.js.map +0 -1
  774. package/dist/internal/errors.d.ts.map +0 -1
  775. package/dist/internal/errors.js.map +0 -1
  776. package/dist/internal/geometry.d.ts.map +0 -1
  777. package/dist/internal/geometry.js.map +0 -1
  778. package/dist/internal/git.d.ts.map +0 -1
  779. package/dist/internal/git.js.map +0 -1
  780. package/dist/internal/globs.d.ts.map +0 -1
  781. package/dist/internal/globs.js.map +0 -1
  782. package/dist/internal/ids.d.ts.map +0 -1
  783. package/dist/internal/ids.js.map +0 -1
  784. package/dist/internal/json-value.d.ts.map +0 -1
  785. package/dist/internal/json-value.js.map +0 -1
  786. package/dist/internal/keys.d.ts.map +0 -1
  787. package/dist/internal/keys.js.map +0 -1
  788. package/dist/internal/node-version.d.ts.map +0 -1
  789. package/dist/internal/node-version.js.map +0 -1
  790. package/dist/internal/objects.d.ts.map +0 -1
  791. package/dist/internal/objects.js.map +0 -1
  792. package/dist/internal/options.d.ts.map +0 -1
  793. package/dist/internal/options.js.map +0 -1
  794. package/dist/internal/package-manager.d.ts.map +0 -1
  795. package/dist/internal/package-manager.js.map +0 -1
  796. package/dist/internal/package-version.d.ts.map +0 -1
  797. package/dist/internal/package-version.js.map +0 -1
  798. package/dist/internal/paths.d.ts.map +0 -1
  799. package/dist/internal/paths.js.map +0 -1
  800. package/dist/internal/realm-slot.d.ts.map +0 -1
  801. package/dist/internal/realm-slot.js.map +0 -1
  802. package/dist/internal/recording-modes.d.ts.map +0 -1
  803. package/dist/internal/recording-modes.js.map +0 -1
  804. package/dist/internal/redact.d.ts.map +0 -1
  805. package/dist/internal/redact.js.map +0 -1
  806. package/dist/internal/regexp.d.ts.map +0 -1
  807. package/dist/internal/regexp.js.map +0 -1
  808. package/dist/internal/roles.d.ts.map +0 -1
  809. package/dist/internal/roles.js.map +0 -1
  810. package/dist/internal/skip.d.ts.map +0 -1
  811. package/dist/internal/skip.js.map +0 -1
  812. package/dist/internal/source.d.ts.map +0 -1
  813. package/dist/internal/source.js.map +0 -1
  814. package/dist/internal/standard-schema.d.ts.map +0 -1
  815. package/dist/internal/standard-schema.js.map +0 -1
  816. package/dist/internal/suggest.d.ts.map +0 -1
  817. package/dist/internal/suggest.js.map +0 -1
  818. package/dist/internal/text.d.ts.map +0 -1
  819. package/dist/internal/text.js.map +0 -1
  820. package/dist/internal/time.d.ts.map +0 -1
  821. package/dist/internal/time.js.map +0 -1
  822. package/dist/internal/urls.d.ts.map +0 -1
  823. package/dist/internal/urls.js.map +0 -1
  824. package/dist/internal/vcs.d.ts.map +0 -1
  825. package/dist/internal/vcs.js.map +0 -1
  826. package/dist/internal/zip.d.ts.map +0 -1
  827. package/dist/internal/zip.js.map +0 -1
  828. package/dist/locator/engine.d.ts.map +0 -1
  829. package/dist/locator/engine.js.map +0 -1
  830. package/dist/locator/expression.d.ts.map +0 -1
  831. package/dist/locator/expression.js.map +0 -1
  832. package/dist/locator/screen.d.ts.map +0 -1
  833. package/dist/locator/screen.js.map +0 -1
  834. package/dist/mcp/catalog.d.ts.map +0 -1
  835. package/dist/mcp/catalog.js.map +0 -1
  836. package/dist/mcp/config.d.ts.map +0 -1
  837. package/dist/mcp/config.js.map +0 -1
  838. package/dist/mcp/recording.d.ts.map +0 -1
  839. package/dist/mcp/recording.js.map +0 -1
  840. package/dist/mcp/server.d.ts.map +0 -1
  841. package/dist/mcp/server.js.map +0 -1
  842. package/dist/mcp/session.d.ts.map +0 -1
  843. package/dist/mcp/session.js.map +0 -1
  844. package/dist/mcp/sessions.d.ts.map +0 -1
  845. package/dist/mcp/sessions.js.map +0 -1
  846. package/dist/mcp/tools.d.ts.map +0 -1
  847. package/dist/mcp/tools.js.map +0 -1
  848. package/dist/oauth/callback-server.d.ts.map +0 -1
  849. package/dist/oauth/callback-server.js.map +0 -1
  850. package/dist/oauth/chatgpt.d.ts.map +0 -1
  851. package/dist/oauth/chatgpt.js.map +0 -1
  852. package/dist/oauth/cli.d.ts.map +0 -1
  853. package/dist/oauth/cli.js.map +0 -1
  854. package/dist/oauth/copilot.d.ts.map +0 -1
  855. package/dist/oauth/copilot.js.map +0 -1
  856. package/dist/oauth/device-code.d.ts.map +0 -1
  857. package/dist/oauth/device-code.js.map +0 -1
  858. package/dist/oauth/errors.d.ts.map +0 -1
  859. package/dist/oauth/errors.js.map +0 -1
  860. package/dist/oauth/fetch.d.ts.map +0 -1
  861. package/dist/oauth/fetch.js.map +0 -1
  862. package/dist/oauth/grok.d.ts.map +0 -1
  863. package/dist/oauth/grok.js.map +0 -1
  864. package/dist/oauth/jwt.d.ts.map +0 -1
  865. package/dist/oauth/jwt.js.map +0 -1
  866. package/dist/oauth/login.d.ts.map +0 -1
  867. package/dist/oauth/login.js.map +0 -1
  868. package/dist/oauth/models.d.ts.map +0 -1
  869. package/dist/oauth/models.js.map +0 -1
  870. package/dist/oauth/pkce.d.ts.map +0 -1
  871. package/dist/oauth/pkce.js.map +0 -1
  872. package/dist/oauth/providers/github-copilot.d.ts.map +0 -1
  873. package/dist/oauth/providers/github-copilot.js.map +0 -1
  874. package/dist/oauth/providers/openai.d.ts.map +0 -1
  875. package/dist/oauth/providers/openai.js.map +0 -1
  876. package/dist/oauth/providers/xai.d.ts.map +0 -1
  877. package/dist/oauth/providers/xai.js.map +0 -1
  878. package/dist/oauth/providers.d.ts.map +0 -1
  879. package/dist/oauth/providers.js.map +0 -1
  880. package/dist/oauth/sse.d.ts.map +0 -1
  881. package/dist/oauth/sse.js.map +0 -1
  882. package/dist/oauth/store.d.ts.map +0 -1
  883. package/dist/oauth/store.js.map +0 -1
  884. package/dist/oauth/token-endpoint.d.ts.map +0 -1
  885. package/dist/oauth/token-endpoint.js.map +0 -1
  886. package/dist/oauth/types.d.ts.map +0 -1
  887. package/dist/oauth/types.js.map +0 -1
  888. package/dist/params.d.ts.map +0 -1
  889. package/dist/params.js.map +0 -1
  890. package/dist/report/build.d.ts.map +0 -1
  891. package/dist/report/build.js.map +0 -1
  892. package/dist/report/builtin.d.ts.map +0 -1
  893. package/dist/report/builtin.js.map +0 -1
  894. package/dist/report/code-frame.d.ts.map +0 -1
  895. package/dist/report/code-frame.js.map +0 -1
  896. package/dist/report/debug-steps.d.ts.map +0 -1
  897. package/dist/report/debug-steps.js.map +0 -1
  898. package/dist/report/explore-text.d.ts.map +0 -1
  899. package/dist/report/explore-text.js.map +0 -1
  900. package/dist/report/failure-text.d.ts.map +0 -1
  901. package/dist/report/failure-text.js.map +0 -1
  902. package/dist/report/format.d.ts.map +0 -1
  903. package/dist/report/format.js.map +0 -1
  904. package/dist/report/json.d.ts.map +0 -1
  905. package/dist/report/json.js.map +0 -1
  906. package/dist/report/junit.d.ts.map +0 -1
  907. package/dist/report/junit.js.map +0 -1
  908. package/dist/report/list-explore.d.ts.map +0 -1
  909. package/dist/report/list-explore.js.map +0 -1
  910. package/dist/report/list-model.d.ts.map +0 -1
  911. package/dist/report/list-model.js.map +0 -1
  912. package/dist/report/list-steps.d.ts.map +0 -1
  913. package/dist/report/list-steps.js.map +0 -1
  914. package/dist/report/list.d.ts.map +0 -1
  915. package/dist/report/list.js.map +0 -1
  916. package/dist/report/live-window.d.ts.map +0 -1
  917. package/dist/report/live-window.js.map +0 -1
  918. package/dist/report/markdown-text.d.ts.map +0 -1
  919. package/dist/report/markdown-text.js.map +0 -1
  920. package/dist/report/markdown.d.ts.map +0 -1
  921. package/dist/report/markdown.js.map +0 -1
  922. package/dist/report/outcome.d.ts.map +0 -1
  923. package/dist/report/outcome.js.map +0 -1
  924. package/dist/report/repeats.d.ts.map +0 -1
  925. package/dist/report/repeats.js.map +0 -1
  926. package/dist/report/running-tree.d.ts.map +0 -1
  927. package/dist/report/running-tree.js.map +0 -1
  928. package/dist/report/write.d.ts.map +0 -1
  929. package/dist/report/write.js.map +0 -1
  930. package/dist/run/app-ports.d.ts.map +0 -1
  931. package/dist/run/app-ports.js.map +0 -1
  932. package/dist/run/artifacts.d.ts.map +0 -1
  933. package/dist/run/artifacts.js.map +0 -1
  934. package/dist/run/budget.d.ts.map +0 -1
  935. package/dist/run/budget.js.map +0 -1
  936. package/dist/run/declared-processes.d.ts.map +0 -1
  937. package/dist/run/declared-processes.js.map +0 -1
  938. package/dist/run/events.d.ts.map +0 -1
  939. package/dist/run/events.js.map +0 -1
  940. package/dist/run/execute.d.ts.map +0 -1
  941. package/dist/run/execute.js.map +0 -1
  942. package/dist/run/extended-fixtures.d.ts.map +0 -1
  943. package/dist/run/extended-fixtures.js.map +0 -1
  944. package/dist/run/failure-evidence.d.ts.map +0 -1
  945. package/dist/run/failure-evidence.js.map +0 -1
  946. package/dist/run/fixture-recording.d.ts.map +0 -1
  947. package/dist/run/fixture-recording.js.map +0 -1
  948. package/dist/run/fixtures.d.ts.map +0 -1
  949. package/dist/run/fixtures.js.map +0 -1
  950. package/dist/run/in-process.d.ts.map +0 -1
  951. package/dist/run/in-process.js.map +0 -1
  952. package/dist/run/last-run.d.ts.map +0 -1
  953. package/dist/run/last-run.js.map +0 -1
  954. package/dist/run/managed-process.d.ts.map +0 -1
  955. package/dist/run/managed-process.js.map +0 -1
  956. package/dist/run/output.d.ts.map +0 -1
  957. package/dist/run/output.js.map +0 -1
  958. package/dist/run/process-pool.d.ts.map +0 -1
  959. package/dist/run/process-pool.js.map +0 -1
  960. package/dist/run/provision.d.ts.map +0 -1
  961. package/dist/run/provision.js.map +0 -1
  962. package/dist/run/realm.d.ts.map +0 -1
  963. package/dist/run/realm.js.map +0 -1
  964. package/dist/run/records.d.ts.map +0 -1
  965. package/dist/run/records.js.map +0 -1
  966. package/dist/run/retry.d.ts.map +0 -1
  967. package/dist/run/retry.js.map +0 -1
  968. package/dist/run/runner.d.ts.map +0 -1
  969. package/dist/run/runner.js.map +0 -1
  970. package/dist/run/scheduler.d.ts.map +0 -1
  971. package/dist/run/scheduler.js.map +0 -1
  972. package/dist/run/secrecy.d.ts.map +0 -1
  973. package/dist/run/secrecy.js.map +0 -1
  974. package/dist/run/serial.d.ts.map +0 -1
  975. package/dist/run/serial.js.map +0 -1
  976. package/dist/run/sessions.d.ts.map +0 -1
  977. package/dist/run/sessions.js.map +0 -1
  978. package/dist/run/standalone.d.ts.map +0 -1
  979. package/dist/run/standalone.js.map +0 -1
  980. package/dist/run/steps.d.ts.map +0 -1
  981. package/dist/run/steps.js.map +0 -1
  982. package/dist/run/trace-redaction.d.ts.map +0 -1
  983. package/dist/run/trace-redaction.js.map +0 -1
  984. package/dist/run/unit-runner.d.ts.map +0 -1
  985. package/dist/run/unit-runner.js.map +0 -1
  986. package/dist/run/units.d.ts.map +0 -1
  987. package/dist/run/units.js.map +0 -1
  988. package/dist/run/worker/entry.d.ts.map +0 -1
  989. package/dist/run/worker/entry.js.map +0 -1
  990. package/dist/run/worker/handle.d.ts.map +0 -1
  991. package/dist/run/worker/handle.js.map +0 -1
  992. package/dist/run/worker/protocol.d.ts.map +0 -1
  993. package/dist/run/worker/protocol.js.map +0 -1
  994. package/dist/run/worker/session.d.ts.map +0 -1
  995. package/dist/run/worker/session.js.map +0 -1
  996. package/dist/run/worker-models.d.ts.map +0 -1
  997. package/dist/run/worker-models.js.map +0 -1
  998. package/dist/secrets.d.ts.map +0 -1
  999. package/dist/secrets.js.map +0 -1
  1000. package/dist/telemetry/checkout.d.ts.map +0 -1
  1001. package/dist/telemetry/checkout.js.map +0 -1
  1002. package/dist/telemetry/environment.d.ts.map +0 -1
  1003. package/dist/telemetry/environment.js.map +0 -1
  1004. package/dist/telemetry/events.d.ts.map +0 -1
  1005. package/dist/telemetry/events.js.map +0 -1
  1006. package/dist/telemetry/failure-kind.d.ts.map +0 -1
  1007. package/dist/telemetry/failure-kind.js.map +0 -1
  1008. package/dist/telemetry/posthog.d.ts.map +0 -1
  1009. package/dist/telemetry/posthog.js.map +0 -1
  1010. package/dist/telemetry/project.d.ts.map +0 -1
  1011. package/dist/telemetry/project.js.map +0 -1
  1012. package/dist/telemetry/store.d.ts.map +0 -1
  1013. package/dist/telemetry/store.js.map +0 -1
  1014. package/dist/telemetry/telemetry.d.ts.map +0 -1
  1015. package/dist/telemetry/telemetry.js.map +0 -1
  1016. package/dist/telemetry/token.d.ts.map +0 -1
  1017. package/dist/telemetry/token.js.map +0 -1
  1018. package/dist/types.d.ts.map +0 -1
  1019. package/dist/types.js.map +0 -1
@@ -0,0 +1,524 @@
1
+ ---
2
+ title: agent
3
+ description: Run agent actions, check conditions, and extract structured data.
4
+ ---
5
+
6
+ Use `act` to interact with the app, `assert` to check the current screen,
7
+ `waitFor` to wait for a condition, and `extract` to read structured data.
8
+ Each call has its own timeout and model-call budget. The built-in agent
9
+ requires a configured model: without one, the first acquisition of the
10
+ `agent` fixture records one run-level `MODEL_UNAVAILABLE` and stops the run
11
+ (exit 2).
12
+ [Custom executors](/executors) can implement `act` and `assert` without one;
13
+ `waitFor` and `extract` still need a model.
14
+
15
+ ```ts
16
+ export interface Agent {
17
+ /** Plans and executes a bounded multi-action flow; resolves with what the step did. */
18
+ act(instruction: string, options?: ActOptions): Promise<ActResult>;
19
+ /** Polls a natural-language condition until true or timed out. */
20
+ waitFor(condition: string, options?: WaitForOptions): Promise<void>;
21
+ /** Extracts and validates structured screen data. */
22
+ extract<Schema extends StandardSchemaV1>(
23
+ instruction: string,
24
+ options: ExtractOptions<Schema>,
25
+ ): Promise<StandardSchemaV1.InferOutput<Schema>>;
26
+ /** Judges a natural-language assertion against a fresh observation. */
27
+ assert(assertion: string, options?: AssertOptions): Promise<void>;
28
+ }
29
+ ```
30
+
31
+ ## Budgets
32
+
33
+ Model calls count every model request including repair rounds. Action steps
34
+ count committed engine actions. Every timeout is additionally capped by the
35
+ remaining test timeout.
36
+
37
+ | Method | Model calls | Action steps | Default timeout |
38
+ | --- | ---: | ---: | --- |
39
+ | `act` | `agents.<name>.maxModelCalls`, 25 | `agents.<name>.maxSteps`, 25 | `config.timeout`, 120000 ms |
40
+ | `waitFor` | `agents.<name>.maxModelCalls`, 25 | 0 | `agents.<name>.judgmentTimeout`, 30000 ms |
41
+ | `extract` | 2 | 0 | `agents.<name>.judgmentTimeout`, 30000 ms |
42
+ | `assert` | 2 | 0 | `agents.<name>.judgmentTimeout`, 30000 ms |
43
+
44
+ `actionTimeout` limits engine operations, not model calls. Per-call budgets
45
+ must be positive integers no larger than the configured limits; a larger one
46
+ is `INVALID_ARGUMENT`. All durations are in milliseconds.
47
+
48
+ The `assert` row holds for the built-in agent. When the selected agent has a
49
+ custom `executor`, `assert` is dispatched to it as a step: its budget is the
50
+ agent's `maxSteps` and `maxModelCalls`, its default timeout is
51
+ `config.timeout`, and `vision` on the call is `UNSUPPORTED_CAPABILITY`;
52
+ `screenshot` still applies.
53
+
54
+ ## agent.act
55
+
56
+ ```ts
57
+ act(instruction: string, options?: ActOptions): Promise<ActResult>;
58
+ ```
59
+
60
+ Plans and executes one bounded multi-action flow. A passing verdict resolves
61
+ with an `ActResult`; a failing or blocked one throws an `AgentError` whose
62
+ `code` and `blocked` flag say why.
63
+
64
+ `instruction` is 1 through 8192 UTF-8 bytes after NFC normalization. An
65
+ unknown `agent` name is `INVALID_ARGUMENT` before the step opens.
66
+
67
+ Values come from your code through `options.params`, never from the model. The
68
+ model sees a `Secret` as its name and purpose only. The runner checks the
69
+ field the model picked before it fills the value: it must be an enabled
70
+ editable input, and a password goes only into a password field.
71
+ `locator.fill` runs no such check, since your code chose the field.
72
+
73
+ ```ts
74
+ await agent.act('invite {email} as an editor', { params: { email: 'ada@example.test' } });
75
+
76
+ const member = credentials.user('member');
77
+ const { summary, cache } = await agent.act('Sign in', {
78
+ params: { username: member.username, password: member.password },
79
+ });
80
+ ```
81
+
82
+ The result carries the step's `summary`, the `modelCalls` and `actions` it
83
+ spent, and `cache`: how the [replay cache](/cache) took part
84
+ (`self-finalized`, `agent-concluded`, or `missed` with a `reason`; absent when
85
+ caching is off).
86
+
87
+ ### Action tools
88
+
89
+ The built-in agent offers one tool per verb the target's engine declares.
90
+ Every tool takes node ids from the newest observation, returns what changed
91
+ on screen, and is recorded for the [replay cache](/cache) with the node it
92
+ acted on. A verb the engine does not declare is not offered.
93
+
94
+ | Tool | Engine action | What it does |
95
+ | --- | --- | --- |
96
+ | `tap({ target })` | `tap` | Taps or clicks one node: the gesture for a button, link, menu item, tab, checkbox, row, or field. |
97
+ | `double_tap({ target })` | `doubleTap` | Double-clicks one node, for an item that opens or enters editing on the second click. |
98
+ | `long_press({ target })` | `longPress` | Presses one node and holds, for a long-press menu or action. |
99
+ | `right_click({ target })` | `secondaryTap` | Right-clicks one node to open its context menu. |
100
+ | `hover({ target })` | `hover` | Moves the pointer over one node without pressing: hover menus, flyouts, tooltips, controls revealed on mouse-over. |
101
+ | `type({ target?, value, replace? })` | `fill`; without `target`, `keyboard` | Replaces the node's value; without a target, types into whatever has focus. |
102
+ | `type_secret({ target, name })` | `fill` | Fills a secret declared in the step's params. Offered only when the step declares one. |
103
+ | `press({ target?, key, times? })` | `press`; without `target`, `keyboard` | Sends one key to a node or to the focused control, up to 20 times in one call. Each press is one action; with a target, the first press addresses the node and the rest go to whatever has focus, so a repeated `Tab` walks on. |
104
+ | `select({ target, value })` | `selectOption` | Picks an option by its visible label. |
105
+ | `check({ target, checked? })` | `check` and `uncheck` | Sets a checkbox, switch, or radio to a state (`true` by default). A control already in that state is left alone, unlike a tap, which flips it. |
106
+ | `scroll({ direction, target?, times? })` | `swipe` | Scrolls the viewport or one scrollable node, up to 20 screens per call. |
107
+ | `scroll_to({ target })` or `scroll_to({ text, direction?, target? })` | `scrollIntoView`; with `text`, `swipe` | With `target` alone, brings one listed node into the viewport, for a node the tree lists below or above the fold. With `text`, pages the list (`target`, else the viewport) screen by screen in `direction` (down by default) until a node reading that text shows (as its whole label, or bounded by nothing of a word, so `Row 12` never stops at `Row 120`; inside the list when `target` names one, so a heading elsewhere reading the same does not end the paging), then brings it in when the engine can: for a row deep in a long or windowed list the tree has not rendered yet. One action however many screens, up to 800; a screen that stops moving or the cap is `LOCATOR_NOT_FOUND`. Each form is offered only with its action kind. |
108
+ | `drag({ target, to })` | `dragTo` | Drags one node and drops it on another: reordering, kanban columns, drop zones. |
109
+ | `upload({ target, files })` | `setInputFiles` | Attaches files to a file input. Paths are project-relative; see the policy below. |
110
+ | `navigate({ url })` | `session.open` | Opens a URL or an app-relative path. |
111
+ | `back()` | `session.back` | Goes back once: browser history on a page, the in-app back on a device. |
112
+ | `observe()` | | Looks again and reports what changed since the last screen the model received. |
113
+ | `dismiss_keyboard()` | `keyboard.dismiss` | Hides an on-screen keyboard. Device engines only. |
114
+
115
+ `scroll_to({ text })` waits for each scrolled screen to settle. On a device,
116
+ the next observation checks stability without waiting for a second scroll
117
+ effect. Engines with `scrollIntoView` still wait for the final adjustment
118
+ that brings the matched node into view. Replay follows the same rule.
119
+
120
+ `upload` takes the model's path but the runner decides. Each path is
121
+ resolved against the project root the way `locator.setInputFiles` resolves
122
+ it, and is refused with `POLICY_DENIED` when it lies outside the project
123
+ (through a symlink too) or names a hidden file or a file under a hidden
124
+ directory such as `.env`, `.git`, or `.e2e`. A path that names no regular
125
+ file is `INVALID_ARGUMENT`, an ordinary action failure the model reads and
126
+ corrects. Every refusal and the final allow is a `policy` event named
127
+ `upload.path` on the step. Nothing reaches the engine until every path passed.
128
+
129
+ The screen the model reads lists the text selected inside the focused field
130
+ as `selection="..."` after its value, when the engine reports one: the web
131
+ engine does for an input, a textarea, and a `contenteditable` editor, and a
132
+ secure field reports none. The runner drops it from a field whose value or
133
+ text holds a registered secret, and from a field cut at its length limit when
134
+ the selection is not in the part shown, so selected characters of a secret
135
+ never reach the model. A `press` of `Shift+ArrowLeft` shows what it selected, and
136
+ `times` presses the key several times in one call, so the agent extends a
137
+ selection to exactly the word it wants in one more turn before it formats or
138
+ replaces it.
139
+
140
+ The tap variants are separate tools rather than an option on `tap` on
141
+ purpose: offered as an optional `kind`, a model filled it on ordinary
142
+ buttons (a double-click on Save), and a double-click on a submit button
143
+ submits twice. A tool has to be chosen, and each one says what takes a
144
+ plain tap instead.
145
+
146
+ Mobile engines declare `hover`, `doubleTap`, `longPress`, `check`,
147
+ `uncheck`, `dragTo`, and `session.back`, so a device offers `hover`,
148
+ `double_tap`, `long_press`, `check`, `drag`, and `back`; they declare no
149
+ `secondaryTap`, `scrollIntoView`, or `setInputFiles`. Tab switching has no
150
+ verb yet: a new tab is invisible to the model.
151
+
152
+ ### Pixel tools: screenshot and the point verbs
153
+
154
+ `act` reads the semantic tree and requests screenshots when it needs them.
155
+ A screen with no listed interactive nodes, such as a canvas, opens with a
156
+ screenshot. The same model reads the tree and screenshots; there is no
157
+ `vision` option for `act`.
158
+
159
+ The built-in agent offers these tools while no secret has been filled:
160
+
161
+ | Tool | What it does |
162
+ | --- | --- |
163
+ | `screenshot()` | Returns a masked viewport screenshot and includes a fresh screenshot after every later action in the step. |
164
+ | `tap_at({ x, y })` | Taps the control at the point by node id, or taps the coordinates directly when no control is listed. |
165
+ | `hover_at({ x, y })` | Hovers the control at the point by node id, or moves the pointer to the coordinates when no control is listed. Needs the `hover` action or pointer kind. |
166
+ | `type_at({ x, y, value, replace? })` | Replaces a listed input's value. For an unlisted input, taps to focus and types at the caret unless `replace` is set. Unlisted inputs require keyboard support. |
167
+ | `press_at({ x, y, key })` | Sends a key to the control at the point. If no control is listed, taps to focus and uses the engine's keyboard. |
168
+ | `select_at({ x, y, value })` | Selects an option by visible label in the control at the point. |
169
+
170
+ Coordinates refer to the latest screenshot. The model must take a screenshot
171
+ before using a point tool and should prefer node ids for listed controls.
172
+ The runner checks each point against the tree. A point on a listed control
173
+ uses the same policy checks and [replay cache](/cache) recording as an action
174
+ by id.
175
+
176
+ Once screenshots are in use, the post-action wait also detects pixel changes,
177
+ including canvas redraws. Screenshots have a maximum long side of 768 px;
178
+ older images are removed in batches, keeping the newest two.
179
+
180
+ On engines with a keyboard, including the browser and device engines, `type`
181
+ and `press` can omit `target` to act on the focused field. `type` inserts at
182
+ the caret; `replace: true` clears first. The browser engine rejects typing
183
+ when no editable field has focus. Device engines also offer `dismiss_keyboard`.
184
+ When an action closes an on-screen keyboard, the result says so: on a touch
185
+ screen that tap was often spent on closing it, and the model acts on the
186
+ control again.
187
+
188
+ If semantic capture times out, an engine that proves masking independently
189
+ can return a fresh screenshot with an explicit unavailable-tree warning.
190
+ Every `act` observation with unavailable semantics includes that image and
191
+ warning automatically. Earlier node ids are invalid, and the next successful
192
+ semantic capture presents the whole tree again. The screenshot shows the
193
+ current viewport; an unavailable tree does not prove that a control or
194
+ message is absent.
195
+
196
+ If semantic capture fails, trace replay stops and the step cannot record a
197
+ new trace entry, even if the tree later recovers.
198
+
199
+ A secret filled during the step withholds every later screenshot
200
+ (`PIXEL_TAINTED`), and a step that opens on a tainted viewport offers none of
201
+ the six pixel tools. `tap_at` needs an engine whose `actions` or
202
+ `pointerActions` include `tap`, and `hover_at` one whose include `hover`;
203
+ without the pointer kind the point must land on a listed control. A
204
+ bare-point tap or hover replays from the [replay cache](/cache) only on a
205
+ viewport of the recorded size, or at the same place inside the listed node
206
+ that contained it. A step that sent pixels records `visionInput: true` and
207
+ `metrics.pixelBytes`.
208
+
209
+ A failed or blocked step throws an `AgentError`. A failed verdict is
210
+ `ACTION_FAILED` unless the executor names a more specific code, such as
211
+ `LOCATOR_NOT_FOUND` or `AUTHENTICATION_FAILED`. A blocked verdict, a step
212
+ that could not reach a product verdict, carries one of these codes:
213
+
214
+ | Blocked on | Codes |
215
+ | --- | --- |
216
+ | credentials | `AUTH_CREDENTIAL_UNAVAILABLE`, `AUTH_CREDENTIAL_INVALID`, `SECRET_UNAVAILABLE` |
217
+ | environment | `ENVIRONMENT_UNAVAILABLE`, `APP_UNREACHABLE`, `APP_ALREADY_RUNNING` |
218
+ | seed data | `SEED_DATA_MISSING` |
219
+ | test setup | `TEST_SETUP_FAILED`, `APP_NOT_OPEN`, `POLICY_DENIED` |
220
+ | automation | `MODEL_UNAVAILABLE`, `AUTOMATION_UNSUPPORTED`, `STEP_BUDGET_EXHAUSTED`, `STEP_TIMEOUT`, `CONTEXT_OVERFLOW` |
221
+
222
+ The runner's own stops are
223
+ `STEP_BUDGET_EXHAUSTED` and `STEP_TIMEOUT` when a budget or the deadline ran
224
+ out, `CANCELLED`, `STEP_NO_CONCLUSION` when the turns ran out without a
225
+ conclusion, `CONTEXT_OVERFLOW`, `MODEL_PROVIDER_FAILED`,
226
+ `MODEL_OUTPUT_INVALID` for a verdict outside the grammar, and `REPLAY_STALE`
227
+ under a strict cache. Every code is in [Errors](/reference/errors#agenterror).
228
+
229
+ `act` also throws `INVALID_ARGUMENT` for a malformed instruction, oversized
230
+ `params`, an unknown option, or a budget above the configured limit, and
231
+ `UNSUPPORTED_CAPABILITY` for `schema` or `vision`, which `act` does not take.
232
+
233
+ ## agent.assert
234
+
235
+ ```ts
236
+ assert(assertion: string, options?: AssertOptions): Promise<void>;
237
+ ```
238
+
239
+ Checks one fresh observation without polling. The judge sees only the
240
+ assertion and current observation, never prior steps or `act` summaries.
241
+ It answers `holds`, `fails`, or `inconclusive`.
242
+
243
+ Throws `ASSERTION_FAILED` on a false judgment and `ASSERTION_INCONCLUSIVE`
244
+ when the screen did not show enough to decide. Both carry the explanation
245
+ and, when permitted, a screenshot path. An inconclusive judgment made from
246
+ the tree alone adds `pass vision: true when the answer is in pixels` to its
247
+ message, worded as a condition (`if the engine captures pixels, ...`) until
248
+ a step of the attempt has received pixels. There is no hint when the engine
249
+ declares no screenshot capture, a secret was filled, or an earlier step's
250
+ pixel request was degraded: `vision: true` could add no evidence then. The
251
+ hint is the built-in judge's; with a custom `executor`, `assert` carries the
252
+ executor's explanation alone. No evidence is captured with
253
+ `screenshot: false` or once a secret has been filled in the attempt.
254
+ `screenshot` controls failure evidence attached after the judgment; `vision`
255
+ controls what the model is shown before it. A custom `StepExecutor` judges
256
+ the assertion itself: it honors `screenshot`, since the runner takes that
257
+ evidence after the verdict, and rejects `vision` with
258
+ `UNSUPPORTED_CAPABILITY`, since the executor decides what its model sees.
259
+
260
+ ```ts
261
+ await agent.assert('the dashboard shows a trial badge');
262
+ ```
263
+
264
+ ## agent.waitFor
265
+
266
+ ```ts
267
+ waitFor(condition: string, options?: WaitForOptions): Promise<void>;
268
+ ```
269
+
270
+ Observes and judges at once. After a false or inconclusive judgment it
271
+ waits out `interval`, then observes every 500 ms (or every `interval`, when
272
+ shorter) without a model call, and judges again only once the screen
273
+ differs from the one last judged, pixels included under `vision`. Succeeds
274
+ on the first judgment that holds.
275
+
276
+ Throws `STEP_TIMEOUT` on deadline expiry and `STEP_BUDGET_EXHAUSTED` on
277
+ budget exhaustion, each carrying the last judgment (with the same vision
278
+ hint as `agent.assert` when that round was inconclusive), and
279
+ `INVALID_ARGUMENT` for an out-of-range option or one `waitFor` does not
280
+ take.
281
+
282
+ ```ts
283
+ await agent.waitFor('the upload progress reports completion', { interval: 500 });
284
+ ```
285
+
286
+ ## agent.extract
287
+
288
+ ```ts
289
+ extract<Schema extends StandardSchemaV1>(
290
+ instruction: string,
291
+ options: ExtractOptions<Schema>,
292
+ ): Promise<StandardSchemaV1.InferOutput<Schema>>;
293
+ ```
294
+
295
+ Takes one fresh observation, requests structured output, validates it, and
296
+ returns the validated value. It performs no app actions.
297
+
298
+ When the schema has a JSON Schema projection (zod does), the model receives
299
+ its shape: types, fields, required fields, and allowed literals. Value rules
300
+ such as `min`, `max`, lengths, patterns, and formats stay with your schema,
301
+ which judges the value the model read. The model can also answer that the
302
+ screen does not show the data, which throws `ASSERTION_INCONCLUSIVE` with
303
+ what was missing, instead of returning a placeholder such as `""` or `0`.
304
+ To accept absence as an answer, say so in the instruction and the schema
305
+ (`'the phone number, or null when none is shown'` with
306
+ `z.string().nullable()`).
307
+
308
+ The budget is two model calls: one extraction and one repair round for
309
+ output that failed validation. Throws `INVALID_ARGUMENT` for a schema that is
310
+ not Standard Schema v1, `ASSERTION_INCONCLUSIVE` when the screen does not
311
+ show the data, and `MODEL_OUTPUT_INVALID` when validation still fails after
312
+ the repair.
313
+
314
+ ```ts
315
+ const summary = await agent.extract('the workspace name and plan', {
316
+ schema: z.object({ name: z.string(), plan: z.string() }),
317
+ });
318
+ ```
319
+
320
+ ## Vision
321
+
322
+ `assert`, `waitFor`, and `extract` accept `vision`. Screenshots require a
323
+ judge model that accepts images.
324
+
325
+ | `vision` | Evidence sent to the judge |
326
+ | --- | --- |
327
+ | `false`, the default | Semantic tree |
328
+ | `true` | Semantic tree and a masked screenshot |
329
+ | `'only'` | Masked screenshot only |
330
+
331
+ Use `'only'` for visual checks, such as whether an overlay covers a form or a
332
+ chart looks correct. Screenshots show the current viewport, so scroll to the
333
+ relevant content first. `act` requests its own screenshots and does not take
334
+ this option.
335
+
336
+ Pixels are withheld and the tree sent alone when a secret fill has tainted
337
+ the viewport (`visionDegraded: "PIXEL_TAINTED"` on the step), when the engine
338
+ masked fewer regions than the secure fields it observed (`MASKING_UNPROVEN`),
339
+ or when the engine cannot capture pixels (`UNSUPPORTED_CAPABILITY`). In
340
+ `'only'` mode those cases fail with `POLICY_DENIED` instead.
341
+
342
+ With `vision: true` or `'only'`, a recoverable semantic-capture failure can
343
+ use a fresh screenshot when the engine proves masking independently. With
344
+ `vision: false`, or after a secret fill, the capture failure stops the
345
+ judgment before any model call. A missing tree cannot support a judgment
346
+ about an empty screen.
347
+
348
+ If capture fails before a judgment, the report records zero model calls and
349
+ omits `observationRevision` and `explanation`. The step error describes the
350
+ capture failure. An answer the closed grammar rejects is a `schema` event on
351
+ the step and earns one repair round; when that answer is rejected too, the
352
+ step fails with `MODEL_OUTPUT_INVALID` and its `explanation` is the rejection.
353
+
354
+ ## Types
355
+
356
+ ```ts
357
+ /**
358
+ * Parameters and budgets for one `act` call.
359
+ */
360
+ export interface ActOptions extends AgentOption {
361
+ /**
362
+ * JSON-safe values the instruction refers to, at most 64 KiB and 32 levels
363
+ * deep. A `Secret` reaches the model by name only; the runner fills it. A
364
+ * value wrapped in `unique()` is different on every run, and the replay
365
+ * cache records a slot for it instead of the value.
366
+ */
367
+ params?: AgentParams;
368
+ /** Step deadline in milliseconds; defaults to `config.timeout`. */
369
+ timeout?: number;
370
+ /** Action budget; defaults to `agents.<name>.maxSteps` and can only lower it. */
371
+ maxSteps?: number;
372
+ /** Model-call budget; defaults to `agents.<name>.maxModelCalls` and can only lower it. */
373
+ maxModelCalls?: number;
374
+ }
375
+
376
+ /** The configured agent (`agents.<name>`) one call runs with, in place of the test's. */
377
+ export interface AgentOption {
378
+ agent?: string;
379
+ }
380
+
381
+ /** `assert` options: one judgment plus one repair round, within `timeout`. */
382
+ export interface AssertOptions extends VisionOption, AgentOption {
383
+ /** Deadline in milliseconds; defaults to the agent's `judgmentTimeout`, 30000. */
384
+ timeout?: number;
385
+ /** Attach a redacted screenshot to the step; on by default, denied after a secret fill. */
386
+ screenshot?: boolean;
387
+ }
388
+
389
+ /** `waitFor` options: a judgment at most once per `interval` until `timeout`. */
390
+ export interface WaitForOptions extends VisionOption, AgentOption {
391
+ /** Deadline in milliseconds; defaults to the agent's `judgmentTimeout`, 30000. */
392
+ timeout?: number;
393
+ /** Least time between two judgments, in milliseconds; 100 through 60000, default 3000. */
394
+ interval?: number;
395
+ /** Judgment budget; defaults to `agents.<name>.maxModelCalls` and can only lower it. */
396
+ maxModelCalls?: number;
397
+ }
398
+
399
+ /** `extract` options: one extraction plus one repair round, validated against `schema`. */
400
+ export interface ExtractOptions<Schema extends StandardSchemaV1> extends VisionOption, AgentOption {
401
+ /** Any Standard Schema v1 validator; the output is validated against it, with one repair round. */
402
+ schema: Schema;
403
+ /** Deadline in milliseconds; defaults to the agent's `judgmentTimeout`, 30000. */
404
+ timeout?: number;
405
+ }
406
+
407
+ export interface VisionOption {
408
+ /** What the judge is shown; `false` by default. */
409
+ vision?: VisionMode;
410
+ }
411
+
412
+ /**
413
+ * Evidence for `assert`, `waitFor`, and `extract`.
414
+ *
415
+ * - `false`: the tree.
416
+ * - `true`: the tree and a screenshot, on every call.
417
+ * - `'only'`: the screenshot, and not the tree.
418
+ *
419
+ * When pixels cannot be safely captured, `true` falls back to the tree;
420
+ * `'only'` fails with `POLICY_DENIED`.
421
+ */
422
+ export type VisionMode = boolean | 'only';
423
+
424
+ /** What one passing `act` step did, as the report records it. */
425
+ export interface ActResult {
426
+ /** The executor's one-line account of the step, or the replay's when the cache finished it. */
427
+ readonly summary: string;
428
+ /** How the replay cache took part; absent when caching is off for the step. */
429
+ readonly cache?: StepCacheInfo;
430
+ /** Model calls the step spent; 0 when a cached replay finished it. */
431
+ readonly modelCalls: number;
432
+ /** Grammar actions and mutating tool calls the step performed. */
433
+ readonly actions: number;
434
+ }
435
+
436
+ /**
437
+ * How the replay cache took part in one agent step. `self-finalized` means
438
+ * the full trace replayed and the step passed with zero model calls;
439
+ * `agent-concluded` means a replayed prefix handed the step to the executor;
440
+ * `missed` means the executor ran the step from the top.
441
+ */
442
+ export interface StepCacheInfo {
443
+ mode: 'self-finalized' | 'agent-concluded' | 'missed';
444
+ /** The miss or hand-off reason token; absent on `self-finalized`. */
445
+ reason?: TraceReplayMissReason | ReplayHandOffReason;
446
+ /**
447
+ * On a `gap` at a typed value: the rule that made the value this run's
448
+ * data rather than the flow's. Absent for a gap at a project tool.
449
+ */
450
+ derived?: DerivedReason;
451
+ /**
452
+ * Why a passing step that ran live was still not recorded, when the cause
453
+ * is the call itself: `param-collision` when a `unique()` value equals, is
454
+ * spelled inside, or is the encoded form of another param's value, so the
455
+ * recording could not tell which param a recorded input came from.
456
+ */
457
+ notRecorded?: 'param-collision';
458
+ replayedActions: number;
459
+ totalActions: number;
460
+ }
461
+
462
+ type TraceReplayMissReason = 'retry' | 'no-entry' | 'invalid-entry' | 'truncated' | 'wrong-context';
463
+ export type ReplayHandOffReason =
464
+ | 'gap'
465
+ | 'target-not-found'
466
+ | 'target-ambiguous'
467
+ | 'viewport-changed'
468
+ | 'action-failed'
469
+ | 'action-uncertain'
470
+ | 'end-mismatch';
471
+ export type DerivedReason = 'pixels' | 'whole-node' | 'minted-token' | 'date';
472
+
473
+ /** Values an `act` instruction refers to. */
474
+ export type AgentParams = Readonly<Record<string, AgentParam>>;
475
+
476
+ /** A JSON-safe value, a `Secret`, or a `Unique` string. */
477
+ export type AgentParam =
478
+ | JsonPrimitive
479
+ | Secret
480
+ | Unique
481
+ | readonly AgentParam[]
482
+ | { readonly [key: string]: AgentParam };
483
+ ```
484
+
485
+ Each `StepCacheInfo.reason` is explained under
486
+ [Why a step was not replayed](/cache#why-a-step-was-not-replayed).
487
+
488
+ `Unique` is what `unique()` returns: a value that differs on every run, which
489
+ the replay cache records as a slot and substitutes on replay. See
490
+ [Cache](/cache).
491
+
492
+ ## unique
493
+
494
+ ```ts
495
+ import { unique } from 'e2e';
496
+
497
+ /** A string param that differs on every run; the model sees `value`, the replay cache a slot. */
498
+ export interface Unique {
499
+ readonly value: string;
500
+ }
501
+
502
+ /**
503
+ * Marks a value that is different on every run. Mark values the flow types
504
+ * or looks for, not choices that steer it: two runs whose `unique()` values
505
+ * differ replay the same recording.
506
+ */
507
+ export function unique(value: string): Unique;
508
+ ```
509
+
510
+ Throws `INVALID_ARGUMENT` for a value that is not a string, is empty or only
511
+ whitespace, or contains the placeholder text `{{param:`.
512
+
513
+ ```ts
514
+ await agent.act('create a company named {name}', {
515
+ params: { name: unique(`Acme ${Date.now()}`) },
516
+ });
517
+ ```
518
+
519
+ ## AgentError
520
+
521
+ Every failure is an `AgentError` with a closed `code`, an `explanation`, an
522
+ optional `screenshot` path, and a `blocked` flag. Check it with
523
+ `isAgentError(error)` from `e2e`, not `instanceof`. The class and
524
+ every code are in [Errors](/reference/errors#agenterror).
@@ -0,0 +1,72 @@
1
+ ---
2
+ title: app
3
+ description: The portable app lifecycle fixture, available on every platform.
4
+ ---
5
+
6
+ `app` controls the app's lifecycle and captures screenshots. Each method
7
+ requires the corresponding engine capability; unsupported operations fail
8
+ with `UNSUPPORTED_CAPABILITY`.
9
+
10
+ ```ts
11
+ export interface App {
12
+ /**
13
+ * The resolved base URL of the target's app, with the port the run
14
+ * allocated when `app.url` declared port 0; undefined for a target that
15
+ * declares no `app.url`.
16
+ */
17
+ readonly baseUrl: string | undefined;
18
+ /**
19
+ * Opens the app: the declared URL, a path relative to it, or any absolute
20
+ * http(s) URL. On a device target, which has no URL, it launches the pinned
21
+ * app fresh and takes no path.
22
+ */
23
+ open(path?: string): Promise<void>;
24
+ /**
25
+ * Recreates the execution context while preserving persisted state, then
26
+ * reopens the app at its base URL when the target declares one.
27
+ */
28
+ restart(): Promise<void>;
29
+ /**
30
+ * Clears persisted client state, recreates the execution context, then
31
+ * reopens the app at its base URL when the target declares one.
32
+ */
33
+ clearState(): Promise<void>;
34
+ /** Navigates back once. */
35
+ back(): Promise<void>;
36
+ /** Captures a redacted evidence screenshot. */
37
+ screenshot(label?: string): Promise<string>;
38
+ }
39
+ ```
40
+
41
+ `app` methods use the configured timeouts below, capped by the remaining test
42
+ timeout. They do not accept per-call timeout options.
43
+
44
+ | Method | Timeout | Throws |
45
+ | --- | --- | --- |
46
+ | `open(path?)` | `config.timeout`, 120000 ms | `APP_URL_REQUIRED` for a path when the target declares no `app.url`, `POLICY_DENIED` for a `file:`, `data:`, or `javascript:` URL, `APP_UNREACHABLE`, `ACTION_FAILED`, `UNSUPPORTED_CAPABILITY` without `session.open` on a target with a URL or without `session.restart` on one without (a device launches its pinned app) |
47
+ | `restart()` | `config.timeout`, 120000 ms | `ACTION_FAILED`, `ENGINE_FAILURE`, `UNSUPPORTED_CAPABILITY` without `session.restart` |
48
+ | `clearState()` | `config.timeout`, 120000 ms | `ACTION_FAILED`, `ENGINE_FAILURE`, `UNSUPPORTED_CAPABILITY` without `session.reset` |
49
+ | `back()` | `config.actionTimeout`, 30000 ms | `APP_NOT_OPEN`, `ACTION_FAILED`, `UNSUPPORTED_CAPABILITY` without `session.back` |
50
+ | `screenshot(label?)` | `config.actionTimeout`, 30000 ms | `POLICY_DENIED` after a secret fill, `UNSUPPORTED_CAPABILITY`, `ENGINE_FAILURE` |
51
+
52
+ `screenshot` registers the file as an attempt artifact and returns its path
53
+ relative to the attempt's artifact directory, under `screenshots/`; the report
54
+ records the artifact-root-relative path. `label` names the step and joins the
55
+ file name.
56
+
57
+ ```ts
58
+ await app.open('/settings/billing');
59
+ const shot = await app.screenshot('after-checkout');
60
+ ```
61
+
62
+ <Warning>
63
+ `clearState` inside a serial group destroys the shared state the group
64
+ depends on. Use it in `beforeEach` of an ordinary group instead.
65
+ </Warning>
66
+
67
+ Once a `Secret` has been filled, pixels are withheld for the rest of the
68
+ session, including later tests in a serial group. `app.screenshot()` then
69
+ fails with `POLICY_DENIED` and creates no artifact.
70
+
71
+ Browser-only operations live on the [`browser`](/reference/web) fixture;
72
+ device operations on [`device`](/reference/mobile).