e2e 0.15.2 → 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 (979) hide show
  1. package/dist/.build.json +1 -1
  2. package/dist/agent/act-validation.d.ts +10 -1
  3. package/dist/agent/act-validation.js +48 -1
  4. package/dist/agent/act.d.ts +1 -2
  5. package/dist/agent/act.js +22 -5
  6. package/dist/agent/action-dispatcher.d.ts +0 -1
  7. package/dist/agent/action-dispatcher.js +0 -1
  8. package/dist/agent/action-names.d.ts +0 -1
  9. package/dist/agent/action-names.js +0 -1
  10. package/dist/agent/actions.d.ts +0 -1
  11. package/dist/agent/actions.js +0 -1
  12. package/dist/agent/agent-brand.d.ts +0 -1
  13. package/dist/agent/agent-brand.js +0 -1
  14. package/dist/agent/ai-sdk.d.ts +7 -1
  15. package/dist/agent/ai-sdk.js +11 -1
  16. package/dist/agent/call-options.d.ts +0 -1
  17. package/dist/agent/call-options.js +0 -1
  18. package/dist/agent/default-agent.d.ts +0 -1
  19. package/dist/agent/default-agent.js +0 -1
  20. package/dist/agent/derived.d.ts +0 -1
  21. package/dist/agent/derived.js +0 -1
  22. package/dist/agent/error.d.ts +0 -1
  23. package/dist/agent/error.js +0 -1
  24. package/dist/agent/executor.d.ts +0 -1
  25. package/dist/agent/executor.js +0 -1
  26. package/dist/agent/index.d.ts +0 -1
  27. package/dist/agent/index.js +0 -1
  28. package/dist/agent/interactive-step.d.ts +0 -1
  29. package/dist/agent/interactive-step.js +0 -1
  30. package/dist/agent/invocation.d.ts +0 -1
  31. package/dist/agent/invocation.js +10 -5
  32. package/dist/agent/ledger.d.ts +0 -1
  33. package/dist/agent/ledger.js +0 -1
  34. package/dist/agent/loop-guards.d.ts +0 -1
  35. package/dist/agent/loop-guards.js +0 -1
  36. package/dist/agent/model/adapter.d.ts +0 -1
  37. package/dist/agent/model/adapter.js +0 -1
  38. package/dist/agent/model/overflow.d.ts +0 -1
  39. package/dist/agent/model/overflow.js +0 -1
  40. package/dist/agent/model/provider-hints.d.ts +0 -1
  41. package/dist/agent/model/provider-hints.js +0 -1
  42. package/dist/agent/model/schema.d.ts +0 -1
  43. package/dist/agent/model/schema.js +0 -1
  44. package/dist/agent/model/sdk.d.ts +0 -1
  45. package/dist/agent/model/sdk.js +0 -1
  46. package/dist/agent/model/stall.d.ts +0 -1
  47. package/dist/agent/model/stall.js +0 -1
  48. package/dist/agent/model/tool-choice.d.ts +0 -1
  49. package/dist/agent/model/tool-choice.js +0 -1
  50. package/dist/agent/observation-budget.d.ts +0 -1
  51. package/dist/agent/observation-budget.js +0 -1
  52. package/dist/agent/observation-feed.d.ts +0 -1
  53. package/dist/agent/observation-feed.js +0 -1
  54. package/dist/agent/observation.d.ts +0 -1
  55. package/dist/agent/observation.js +0 -1
  56. package/dist/agent/operation-queue.d.ts +0 -1
  57. package/dist/agent/operation-queue.js +0 -1
  58. package/dist/agent/phases.d.ts +0 -1
  59. package/dist/agent/phases.js +0 -1
  60. package/dist/agent/pixels.d.ts +0 -1
  61. package/dist/agent/pixels.js +0 -1
  62. package/dist/agent/point-tap.d.ts +0 -1
  63. package/dist/agent/point-tap.js +0 -1
  64. package/dist/agent/primitives.d.ts +6 -1
  65. package/dist/agent/primitives.js +4 -2
  66. package/dist/agent/prompts.d.ts +0 -1
  67. package/dist/agent/prompts.js +0 -1
  68. package/dist/agent/protocol.d.ts +0 -1
  69. package/dist/agent/protocol.js +0 -1
  70. package/dist/agent/public.d.ts +0 -1
  71. package/dist/agent/public.js +0 -1
  72. package/dist/agent/reading.d.ts +0 -1
  73. package/dist/agent/reading.js +0 -1
  74. package/dist/agent/replay.d.ts +0 -1
  75. package/dist/agent/replay.js +0 -1
  76. package/dist/agent/screen-update.d.ts +0 -1
  77. package/dist/agent/screen-update.js +0 -1
  78. package/dist/agent/scroll-target.d.ts +0 -1
  79. package/dist/agent/scroll-target.js +0 -1
  80. package/dist/agent/secrets.d.ts +0 -1
  81. package/dist/agent/secrets.js +0 -1
  82. package/dist/agent/settle-policy.d.ts +0 -1
  83. package/dist/agent/settle-policy.js +0 -1
  84. package/dist/agent/step-accounting.d.ts +0 -1
  85. package/dist/agent/step-accounting.js +0 -1
  86. package/dist/agent/step-cache.d.ts +0 -1
  87. package/dist/agent/step-cache.js +0 -1
  88. package/dist/agent/tool-loop.d.ts +0 -1
  89. package/dist/agent/tool-loop.js +0 -1
  90. package/dist/agent/tool-output.d.ts +0 -1
  91. package/dist/agent/tool-output.js +0 -1
  92. package/dist/agent/tool.d.ts +0 -1
  93. package/dist/agent/tool.js +0 -1
  94. package/dist/agent/transcript-compaction.d.ts +0 -1
  95. package/dist/agent/transcript-compaction.js +0 -1
  96. package/dist/agent/upload-paths.d.ts +0 -1
  97. package/dist/agent/upload-paths.js +0 -1
  98. package/dist/agent/usage.d.ts +0 -1
  99. package/dist/agent/usage.js +0 -1
  100. package/dist/cache/anchors.d.ts +0 -1
  101. package/dist/cache/anchors.js +0 -1
  102. package/dist/cache/context.d.ts +0 -1
  103. package/dist/cache/context.js +0 -1
  104. package/dist/cache/decide.d.ts +0 -1
  105. package/dist/cache/decide.js +0 -1
  106. package/dist/cache/identity.d.ts +0 -1
  107. package/dist/cache/identity.js +0 -1
  108. package/dist/cache/recorder.d.ts +0 -1
  109. package/dist/cache/recorder.js +0 -1
  110. package/dist/cache/relocate.d.ts +0 -1
  111. package/dist/cache/relocate.js +0 -1
  112. package/dist/cache/route.d.ts +0 -1
  113. package/dist/cache/route.js +0 -1
  114. package/dist/cache/store.d.ts +0 -1
  115. package/dist/cache/store.js +0 -1
  116. package/dist/cache/template.d.ts +0 -1
  117. package/dist/cache/template.js +0 -1
  118. package/dist/cache/trace.d.ts +0 -1
  119. package/dist/cache/trace.js +0 -1
  120. package/dist/cli/bin.d.ts +0 -1
  121. package/dist/cli/bin.js +0 -1
  122. package/dist/cli/cache.d.ts +0 -1
  123. package/dist/cli/cache.js +0 -1
  124. package/dist/cli/docs-url.d.ts +0 -1
  125. package/dist/cli/docs-url.js +0 -1
  126. package/dist/cli/feedback.d.ts +0 -1
  127. package/dist/cli/feedback.js +0 -1
  128. package/dist/cli/guide.d.ts +0 -1
  129. package/dist/cli/guide.js +0 -1
  130. package/dist/cli/index.d.ts +0 -1
  131. package/dist/cli/index.js +2 -3
  132. package/dist/cli/init/agent-skill.d.ts +0 -1
  133. package/dist/cli/init/agent-skill.js +0 -1
  134. package/dist/cli/init/engines.d.ts +0 -1
  135. package/dist/cli/init/engines.js +0 -1
  136. package/dist/cli/init/gateways.d.ts +0 -1
  137. package/dist/cli/init/gateways.js +0 -1
  138. package/dist/cli/init/mcp-config.d.ts +0 -1
  139. package/dist/cli/init/mcp-config.js +0 -1
  140. package/dist/cli/init/package.d.ts +0 -1
  141. package/dist/cli/init/package.js +0 -1
  142. package/dist/cli/init/scaffold.d.ts +0 -1
  143. package/dist/cli/init/scaffold.js +0 -1
  144. package/dist/cli/init/sibling-versions.json +1 -1
  145. package/dist/cli/init/versions.d.ts +0 -1
  146. package/dist/cli/init/versions.js +0 -1
  147. package/dist/cli/init.d.ts +0 -1
  148. package/dist/cli/init.js +0 -1
  149. package/dist/cli/mcp.d.ts +9 -2
  150. package/dist/cli/mcp.js +14 -2
  151. package/dist/cli/signals.d.ts +0 -1
  152. package/dist/cli/signals.js +0 -1
  153. package/dist/cli/skill.d.ts +0 -1
  154. package/dist/cli/skill.js +0 -1
  155. package/dist/cli/telemetry.d.ts +0 -1
  156. package/dist/cli/telemetry.js +1 -2
  157. package/dist/cli/wordmark.d.ts +0 -1
  158. package/dist/cli/wordmark.js +0 -1
  159. package/dist/collect/collect.d.ts +0 -1
  160. package/dist/collect/collect.js +3 -2
  161. package/dist/collect/registry.d.ts +6 -3
  162. package/dist/collect/registry.js +31 -14
  163. package/dist/collect/select.d.ts +0 -1
  164. package/dist/collect/select.js +0 -1
  165. package/dist/config/agent.d.ts +0 -1
  166. package/dist/config/agent.js +0 -1
  167. package/dist/config/app.d.ts +0 -1
  168. package/dist/config/app.js +0 -1
  169. package/dist/config/command.d.ts +0 -1
  170. package/dist/config/command.js +0 -1
  171. package/dist/config/diagnose.d.ts +0 -1
  172. package/dist/config/diagnose.js +0 -1
  173. package/dist/config/esm-hooks.d.ts +0 -1
  174. package/dist/config/esm-hooks.js +0 -1
  175. package/dist/config/load.d.ts +0 -1
  176. package/dist/config/load.js +0 -1
  177. package/dist/config/resolve.d.ts +0 -1
  178. package/dist/config/resolve.js +0 -1
  179. package/dist/config/secrets.d.ts +0 -1
  180. package/dist/config/secrets.js +0 -1
  181. package/dist/config/targets.d.ts +0 -1
  182. package/dist/config/targets.js +0 -1
  183. package/dist/config/validate.d.ts +0 -1
  184. package/dist/config/validate.js +0 -1
  185. package/dist/engine/contract.d.ts +0 -1
  186. package/dist/engine/contract.js +0 -1
  187. package/dist/engine/index.d.ts +1 -2
  188. package/dist/engine/index.js +4 -4
  189. package/dist/engine/manifest.d.ts +0 -1
  190. package/dist/engine/manifest.js +0 -1
  191. package/dist/engine/recording.d.ts +0 -1
  192. package/dist/engine/recording.js +0 -1
  193. package/dist/engine/resolve.d.ts +0 -1
  194. package/dist/engine/resolve.js +0 -1
  195. package/dist/engine/session.d.ts +0 -1
  196. package/dist/engine/session.js +0 -1
  197. package/dist/engine/surface.d.ts +0 -1
  198. package/dist/engine/surface.js +0 -1
  199. package/dist/engine/timing.d.ts +0 -1
  200. package/dist/engine/timing.js +0 -1
  201. package/dist/expect/async.d.ts +0 -1
  202. package/dist/expect/async.js +99 -58
  203. package/dist/expect/attempt.d.ts +0 -1
  204. package/dist/expect/attempt.js +0 -1
  205. package/dist/expect/index.d.ts +0 -1
  206. package/dist/expect/index.js +0 -1
  207. package/dist/expect/poll.d.ts +0 -1
  208. package/dist/expect/poll.js +0 -1
  209. package/dist/expect/soft.d.ts +0 -1
  210. package/dist/expect/soft.js +0 -1
  211. package/dist/expect/values.d.ts +0 -1
  212. package/dist/expect/values.js +0 -1
  213. package/dist/explore/body.d.ts +0 -1
  214. package/dist/explore/body.js +0 -1
  215. package/dist/explore/executor.d.ts +0 -1
  216. package/dist/explore/executor.js +0 -1
  217. package/dist/explore/index.d.ts +0 -1
  218. package/dist/explore/index.js +16 -2
  219. package/dist/explore/plan.d.ts +0 -1
  220. package/dist/explore/plan.js +0 -1
  221. package/dist/explore/progress.d.ts +0 -1
  222. package/dist/explore/progress.js +0 -1
  223. package/dist/explore/state.d.ts +0 -1
  224. package/dist/explore/state.js +0 -1
  225. package/dist/index.d.ts +0 -1
  226. package/dist/index.js +0 -1
  227. package/dist/internal/ai-trace.d.ts +0 -1
  228. package/dist/internal/ai-trace.js +0 -1
  229. package/dist/internal/atomic-write.d.ts +0 -1
  230. package/dist/internal/atomic-write.js +0 -1
  231. package/dist/internal/brands.d.ts +0 -1
  232. package/dist/internal/brands.js +0 -1
  233. package/dist/internal/debug.d.ts +0 -1
  234. package/dist/internal/debug.js +0 -1
  235. package/dist/internal/env.d.ts +0 -1
  236. package/dist/internal/env.js +0 -1
  237. package/dist/internal/errors.d.ts +0 -1
  238. package/dist/internal/errors.js +0 -1
  239. package/dist/internal/geometry.d.ts +0 -1
  240. package/dist/internal/geometry.js +0 -1
  241. package/dist/internal/git.d.ts +0 -1
  242. package/dist/internal/git.js +0 -1
  243. package/dist/internal/globs.d.ts +0 -1
  244. package/dist/internal/globs.js +0 -1
  245. package/dist/internal/ids.d.ts +0 -1
  246. package/dist/internal/ids.js +0 -1
  247. package/dist/internal/json-value.d.ts +0 -1
  248. package/dist/internal/json-value.js +0 -1
  249. package/dist/internal/keys.d.ts +0 -1
  250. package/dist/internal/keys.js +0 -1
  251. package/dist/internal/node-version.d.ts +0 -1
  252. package/dist/internal/node-version.js +0 -1
  253. package/dist/internal/objects.d.ts +0 -1
  254. package/dist/internal/objects.js +0 -1
  255. package/dist/internal/options.d.ts +0 -1
  256. package/dist/internal/options.js +0 -1
  257. package/dist/internal/package-manager.d.ts +0 -1
  258. package/dist/internal/package-manager.js +0 -1
  259. package/dist/internal/package-version.d.ts +0 -1
  260. package/dist/internal/package-version.js +0 -1
  261. package/dist/internal/paths.d.ts +0 -1
  262. package/dist/internal/paths.js +0 -1
  263. package/dist/internal/realm-slot.d.ts +0 -1
  264. package/dist/internal/realm-slot.js +0 -1
  265. package/dist/internal/recording-modes.d.ts +0 -1
  266. package/dist/internal/recording-modes.js +0 -1
  267. package/dist/internal/redact.d.ts +0 -1
  268. package/dist/internal/redact.js +0 -1
  269. package/dist/internal/regexp.d.ts +0 -1
  270. package/dist/internal/regexp.js +0 -1
  271. package/dist/internal/roles.d.ts +0 -1
  272. package/dist/internal/roles.js +0 -1
  273. package/dist/internal/skip.d.ts +0 -1
  274. package/dist/internal/skip.js +0 -1
  275. package/dist/internal/source.d.ts +0 -1
  276. package/dist/internal/source.js +0 -1
  277. package/dist/internal/standard-schema.d.ts +0 -1
  278. package/dist/internal/standard-schema.js +0 -1
  279. package/dist/internal/suggest.d.ts +0 -1
  280. package/dist/internal/suggest.js +0 -1
  281. package/dist/internal/text.d.ts +8 -1
  282. package/dist/internal/text.js +13 -2
  283. package/dist/internal/time.d.ts +0 -1
  284. package/dist/internal/time.js +0 -1
  285. package/dist/internal/urls.d.ts +0 -1
  286. package/dist/internal/urls.js +0 -1
  287. package/dist/internal/vcs.d.ts +0 -1
  288. package/dist/internal/vcs.js +0 -1
  289. package/dist/internal/zip.d.ts +0 -1
  290. package/dist/internal/zip.js +0 -1
  291. package/dist/locator/engine.d.ts +0 -1
  292. package/dist/locator/engine.js +0 -1
  293. package/dist/locator/expression.d.ts +0 -1
  294. package/dist/locator/expression.js +0 -1
  295. package/dist/locator/screen.d.ts +0 -1
  296. package/dist/locator/screen.js +0 -1
  297. package/dist/mcp/catalog.d.ts +4 -1
  298. package/dist/mcp/catalog.js +2 -3
  299. package/dist/mcp/config.d.ts +0 -1
  300. package/dist/mcp/config.js +0 -1
  301. package/dist/mcp/recording.d.ts +0 -1
  302. package/dist/mcp/recording.js +0 -1
  303. package/dist/mcp/server.d.ts +8 -1
  304. package/dist/mcp/server.js +8 -5
  305. package/dist/mcp/session.d.ts +4 -2
  306. package/dist/mcp/session.js +43 -21
  307. package/dist/mcp/sessions.d.ts +2 -1
  308. package/dist/mcp/sessions.js +5 -2
  309. package/dist/mcp/tools.d.ts +7 -6
  310. package/dist/mcp/tools.js +36 -11
  311. package/dist/mcp/usage.d.ts +61 -0
  312. package/dist/mcp/usage.js +73 -0
  313. package/dist/oauth/callback-server.d.ts +0 -1
  314. package/dist/oauth/callback-server.js +0 -1
  315. package/dist/oauth/chatgpt.d.ts +0 -1
  316. package/dist/oauth/chatgpt.js +0 -1
  317. package/dist/oauth/cli.d.ts +0 -1
  318. package/dist/oauth/cli.js +0 -1
  319. package/dist/oauth/copilot.d.ts +0 -1
  320. package/dist/oauth/copilot.js +0 -1
  321. package/dist/oauth/device-code.d.ts +0 -1
  322. package/dist/oauth/device-code.js +0 -1
  323. package/dist/oauth/errors.d.ts +0 -1
  324. package/dist/oauth/errors.js +0 -1
  325. package/dist/oauth/fetch.d.ts +0 -1
  326. package/dist/oauth/fetch.js +0 -1
  327. package/dist/oauth/grok.d.ts +0 -1
  328. package/dist/oauth/grok.js +0 -1
  329. package/dist/oauth/jwt.d.ts +0 -1
  330. package/dist/oauth/jwt.js +0 -1
  331. package/dist/oauth/login.d.ts +0 -1
  332. package/dist/oauth/login.js +0 -1
  333. package/dist/oauth/models.d.ts +0 -1
  334. package/dist/oauth/models.js +0 -1
  335. package/dist/oauth/pkce.d.ts +0 -1
  336. package/dist/oauth/pkce.js +0 -1
  337. package/dist/oauth/providers/github-copilot.d.ts +0 -1
  338. package/dist/oauth/providers/github-copilot.js +10 -3
  339. package/dist/oauth/providers/openai.d.ts +0 -1
  340. package/dist/oauth/providers/openai.js +1 -2
  341. package/dist/oauth/providers/xai.d.ts +0 -1
  342. package/dist/oauth/providers/xai.js +0 -1
  343. package/dist/oauth/providers.d.ts +0 -1
  344. package/dist/oauth/providers.js +0 -1
  345. package/dist/oauth/sse.d.ts +0 -1
  346. package/dist/oauth/sse.js +0 -1
  347. package/dist/oauth/store.d.ts +0 -1
  348. package/dist/oauth/store.js +0 -1
  349. package/dist/oauth/token-endpoint.d.ts +0 -1
  350. package/dist/oauth/token-endpoint.js +0 -1
  351. package/dist/oauth/types.d.ts +0 -1
  352. package/dist/oauth/types.js +0 -1
  353. package/dist/params.d.ts +0 -1
  354. package/dist/params.js +0 -1
  355. package/dist/report/build.d.ts +0 -1
  356. package/dist/report/build.js +0 -1
  357. package/dist/report/builtin.d.ts +0 -1
  358. package/dist/report/builtin.js +0 -1
  359. package/dist/report/code-frame.d.ts +0 -1
  360. package/dist/report/code-frame.js +0 -1
  361. package/dist/report/debug-steps.d.ts +0 -1
  362. package/dist/report/debug-steps.js +0 -1
  363. package/dist/report/explore-text.d.ts +0 -1
  364. package/dist/report/explore-text.js +0 -1
  365. package/dist/report/failure-text.d.ts +0 -1
  366. package/dist/report/failure-text.js +0 -1
  367. package/dist/report/format.d.ts +0 -1
  368. package/dist/report/format.js +0 -1
  369. package/dist/report/json.d.ts +0 -1
  370. package/dist/report/json.js +0 -1
  371. package/dist/report/junit.d.ts +0 -1
  372. package/dist/report/junit.js +0 -1
  373. package/dist/report/list-explore.d.ts +0 -1
  374. package/dist/report/list-explore.js +0 -1
  375. package/dist/report/list-model.d.ts +0 -1
  376. package/dist/report/list-model.js +0 -1
  377. package/dist/report/list-steps.d.ts +0 -1
  378. package/dist/report/list-steps.js +0 -1
  379. package/dist/report/list.d.ts +0 -1
  380. package/dist/report/list.js +0 -1
  381. package/dist/report/live-window.d.ts +0 -1
  382. package/dist/report/live-window.js +0 -1
  383. package/dist/report/markdown-text.d.ts +0 -1
  384. package/dist/report/markdown-text.js +0 -1
  385. package/dist/report/markdown.d.ts +0 -1
  386. package/dist/report/markdown.js +0 -1
  387. package/dist/report/outcome.d.ts +0 -1
  388. package/dist/report/outcome.js +0 -1
  389. package/dist/report/repeats.d.ts +0 -1
  390. package/dist/report/repeats.js +0 -1
  391. package/dist/report/running-tree.d.ts +0 -1
  392. package/dist/report/running-tree.js +0 -1
  393. package/dist/report/write.d.ts +0 -1
  394. package/dist/report/write.js +0 -1
  395. package/dist/run/app-ports.d.ts +0 -1
  396. package/dist/run/app-ports.js +0 -1
  397. package/dist/run/artifacts.d.ts +0 -1
  398. package/dist/run/artifacts.js +0 -1
  399. package/dist/run/budget.d.ts +0 -1
  400. package/dist/run/budget.js +0 -1
  401. package/dist/run/declared-processes.d.ts +0 -1
  402. package/dist/run/declared-processes.js +0 -1
  403. package/dist/run/events.d.ts +0 -1
  404. package/dist/run/events.js +0 -1
  405. package/dist/run/execute.d.ts +0 -1
  406. package/dist/run/execute.js +6 -5
  407. package/dist/run/extended-fixtures.d.ts +0 -1
  408. package/dist/run/extended-fixtures.js +0 -1
  409. package/dist/run/failure-evidence.d.ts +0 -1
  410. package/dist/run/failure-evidence.js +0 -1
  411. package/dist/run/fixture-recording.d.ts +0 -1
  412. package/dist/run/fixture-recording.js +0 -1
  413. package/dist/run/fixtures.d.ts +0 -1
  414. package/dist/run/fixtures.js +0 -1
  415. package/dist/run/in-process.d.ts +0 -1
  416. package/dist/run/in-process.js +0 -1
  417. package/dist/run/last-run.d.ts +0 -1
  418. package/dist/run/last-run.js +0 -1
  419. package/dist/run/managed-process.d.ts +0 -1
  420. package/dist/run/managed-process.js +0 -1
  421. package/dist/run/output.d.ts +0 -1
  422. package/dist/run/output.js +0 -1
  423. package/dist/run/process-pool.d.ts +0 -1
  424. package/dist/run/process-pool.js +0 -1
  425. package/dist/run/provision.d.ts +0 -1
  426. package/dist/run/provision.js +0 -1
  427. package/dist/run/realm.d.ts +2 -1
  428. package/dist/run/realm.js +1 -2
  429. package/dist/run/records.d.ts +0 -1
  430. package/dist/run/records.js +0 -1
  431. package/dist/run/retry.d.ts +0 -1
  432. package/dist/run/retry.js +0 -1
  433. package/dist/run/runner.d.ts +2 -1
  434. package/dist/run/runner.js +1 -2
  435. package/dist/run/scheduler.d.ts +0 -1
  436. package/dist/run/scheduler.js +0 -1
  437. package/dist/run/secrecy.d.ts +15 -1
  438. package/dist/run/secrecy.js +27 -2
  439. package/dist/run/serial.d.ts +0 -1
  440. package/dist/run/serial.js +0 -1
  441. package/dist/run/sessions.d.ts +0 -1
  442. package/dist/run/sessions.js +0 -1
  443. package/dist/run/standalone.d.ts +0 -1
  444. package/dist/run/standalone.js +3 -3
  445. package/dist/run/steps.d.ts +2 -3
  446. package/dist/run/steps.js +4 -2
  447. package/dist/run/trace-redaction.d.ts +0 -1
  448. package/dist/run/trace-redaction.js +0 -1
  449. package/dist/run/unit-runner.d.ts +0 -1
  450. package/dist/run/unit-runner.js +0 -1
  451. package/dist/run/units.d.ts +0 -1
  452. package/dist/run/units.js +0 -1
  453. package/dist/run/worker/entry.d.ts +0 -1
  454. package/dist/run/worker/entry.js +2 -3
  455. package/dist/run/worker/handle.d.ts +0 -1
  456. package/dist/run/worker/handle.js +0 -1
  457. package/dist/run/worker/protocol.d.ts +0 -1
  458. package/dist/run/worker/protocol.js +0 -1
  459. package/dist/run/worker/session.d.ts +0 -1
  460. package/dist/run/worker/session.js +0 -1
  461. package/dist/run/worker-models.d.ts +0 -1
  462. package/dist/run/worker-models.js +0 -1
  463. package/dist/secrets.d.ts +0 -1
  464. package/dist/secrets.js +0 -1
  465. package/dist/telemetry/checkout.d.ts +0 -1
  466. package/dist/telemetry/checkout.js +0 -1
  467. package/dist/telemetry/environment.d.ts +0 -1
  468. package/dist/telemetry/environment.js +0 -1
  469. package/dist/telemetry/events.d.ts +26 -10
  470. package/dist/telemetry/events.js +107 -13
  471. package/dist/telemetry/failure-kind.d.ts +0 -1
  472. package/dist/telemetry/failure-kind.js +0 -1
  473. package/dist/telemetry/posthog.d.ts +0 -1
  474. package/dist/telemetry/posthog.js +0 -1
  475. package/dist/telemetry/project.d.ts +0 -1
  476. package/dist/telemetry/project.js +0 -1
  477. package/dist/telemetry/store.d.ts +0 -1
  478. package/dist/telemetry/store.js +0 -1
  479. package/dist/telemetry/telemetry.d.ts +19 -8
  480. package/dist/telemetry/telemetry.js +26 -9
  481. package/dist/telemetry/token.d.ts +0 -1
  482. package/dist/telemetry/token.js +0 -1
  483. package/dist/types.d.ts +25 -23
  484. package/dist/types.js +0 -1
  485. package/docs/executors.mdx +1 -1
  486. package/docs/migrate/playwright.mdx +4 -1
  487. package/docs/mobile.mdx +40 -0
  488. package/docs/reference/cli.mdx +3 -1
  489. package/docs/reference/engine.mdx +1 -0
  490. package/docs/reference/expect.mdx +48 -15
  491. package/docs/reference/mcp.mdx +3 -0
  492. package/docs/reference/web.mdx +6 -2
  493. package/docs/security.mdx +19 -3
  494. package/docs/subscriptions.mdx +9 -0
  495. package/docs/telemetry.mdx +47 -5
  496. package/package.json +4 -3
  497. package/skills/e2e/references/mcp.md +3 -0
  498. package/skills/e2e/references/setup.md +6 -0
  499. package/skills/e2e/references/writing-tests.md +11 -0
  500. package/dist/agent/act-validation.d.ts.map +0 -1
  501. package/dist/agent/act-validation.js.map +0 -1
  502. package/dist/agent/act.d.ts.map +0 -1
  503. package/dist/agent/act.js.map +0 -1
  504. package/dist/agent/action-dispatcher.d.ts.map +0 -1
  505. package/dist/agent/action-dispatcher.js.map +0 -1
  506. package/dist/agent/action-names.d.ts.map +0 -1
  507. package/dist/agent/action-names.js.map +0 -1
  508. package/dist/agent/actions.d.ts.map +0 -1
  509. package/dist/agent/actions.js.map +0 -1
  510. package/dist/agent/agent-brand.d.ts.map +0 -1
  511. package/dist/agent/agent-brand.js.map +0 -1
  512. package/dist/agent/ai-sdk.d.ts.map +0 -1
  513. package/dist/agent/ai-sdk.js.map +0 -1
  514. package/dist/agent/call-options.d.ts.map +0 -1
  515. package/dist/agent/call-options.js.map +0 -1
  516. package/dist/agent/default-agent.d.ts.map +0 -1
  517. package/dist/agent/default-agent.js.map +0 -1
  518. package/dist/agent/derived.d.ts.map +0 -1
  519. package/dist/agent/derived.js.map +0 -1
  520. package/dist/agent/error.d.ts.map +0 -1
  521. package/dist/agent/error.js.map +0 -1
  522. package/dist/agent/executor.d.ts.map +0 -1
  523. package/dist/agent/executor.js.map +0 -1
  524. package/dist/agent/index.d.ts.map +0 -1
  525. package/dist/agent/index.js.map +0 -1
  526. package/dist/agent/interactive-step.d.ts.map +0 -1
  527. package/dist/agent/interactive-step.js.map +0 -1
  528. package/dist/agent/invocation.d.ts.map +0 -1
  529. package/dist/agent/invocation.js.map +0 -1
  530. package/dist/agent/ledger.d.ts.map +0 -1
  531. package/dist/agent/ledger.js.map +0 -1
  532. package/dist/agent/loop-guards.d.ts.map +0 -1
  533. package/dist/agent/loop-guards.js.map +0 -1
  534. package/dist/agent/model/adapter.d.ts.map +0 -1
  535. package/dist/agent/model/adapter.js.map +0 -1
  536. package/dist/agent/model/overflow.d.ts.map +0 -1
  537. package/dist/agent/model/overflow.js.map +0 -1
  538. package/dist/agent/model/provider-hints.d.ts.map +0 -1
  539. package/dist/agent/model/provider-hints.js.map +0 -1
  540. package/dist/agent/model/schema.d.ts.map +0 -1
  541. package/dist/agent/model/schema.js.map +0 -1
  542. package/dist/agent/model/sdk.d.ts.map +0 -1
  543. package/dist/agent/model/sdk.js.map +0 -1
  544. package/dist/agent/model/stall.d.ts.map +0 -1
  545. package/dist/agent/model/stall.js.map +0 -1
  546. package/dist/agent/model/tool-choice.d.ts.map +0 -1
  547. package/dist/agent/model/tool-choice.js.map +0 -1
  548. package/dist/agent/observation-budget.d.ts.map +0 -1
  549. package/dist/agent/observation-budget.js.map +0 -1
  550. package/dist/agent/observation-feed.d.ts.map +0 -1
  551. package/dist/agent/observation-feed.js.map +0 -1
  552. package/dist/agent/observation.d.ts.map +0 -1
  553. package/dist/agent/observation.js.map +0 -1
  554. package/dist/agent/operation-queue.d.ts.map +0 -1
  555. package/dist/agent/operation-queue.js.map +0 -1
  556. package/dist/agent/phases.d.ts.map +0 -1
  557. package/dist/agent/phases.js.map +0 -1
  558. package/dist/agent/pixels.d.ts.map +0 -1
  559. package/dist/agent/pixels.js.map +0 -1
  560. package/dist/agent/point-tap.d.ts.map +0 -1
  561. package/dist/agent/point-tap.js.map +0 -1
  562. package/dist/agent/primitives.d.ts.map +0 -1
  563. package/dist/agent/primitives.js.map +0 -1
  564. package/dist/agent/prompts.d.ts.map +0 -1
  565. package/dist/agent/prompts.js.map +0 -1
  566. package/dist/agent/protocol.d.ts.map +0 -1
  567. package/dist/agent/protocol.js.map +0 -1
  568. package/dist/agent/public.d.ts.map +0 -1
  569. package/dist/agent/public.js.map +0 -1
  570. package/dist/agent/reading.d.ts.map +0 -1
  571. package/dist/agent/reading.js.map +0 -1
  572. package/dist/agent/replay.d.ts.map +0 -1
  573. package/dist/agent/replay.js.map +0 -1
  574. package/dist/agent/screen-update.d.ts.map +0 -1
  575. package/dist/agent/screen-update.js.map +0 -1
  576. package/dist/agent/scroll-target.d.ts.map +0 -1
  577. package/dist/agent/scroll-target.js.map +0 -1
  578. package/dist/agent/secrets.d.ts.map +0 -1
  579. package/dist/agent/secrets.js.map +0 -1
  580. package/dist/agent/settle-policy.d.ts.map +0 -1
  581. package/dist/agent/settle-policy.js.map +0 -1
  582. package/dist/agent/step-accounting.d.ts.map +0 -1
  583. package/dist/agent/step-accounting.js.map +0 -1
  584. package/dist/agent/step-cache.d.ts.map +0 -1
  585. package/dist/agent/step-cache.js.map +0 -1
  586. package/dist/agent/tool-loop.d.ts.map +0 -1
  587. package/dist/agent/tool-loop.js.map +0 -1
  588. package/dist/agent/tool-output.d.ts.map +0 -1
  589. package/dist/agent/tool-output.js.map +0 -1
  590. package/dist/agent/tool.d.ts.map +0 -1
  591. package/dist/agent/tool.js.map +0 -1
  592. package/dist/agent/transcript-compaction.d.ts.map +0 -1
  593. package/dist/agent/transcript-compaction.js.map +0 -1
  594. package/dist/agent/upload-paths.d.ts.map +0 -1
  595. package/dist/agent/upload-paths.js.map +0 -1
  596. package/dist/agent/usage.d.ts.map +0 -1
  597. package/dist/agent/usage.js.map +0 -1
  598. package/dist/cache/anchors.d.ts.map +0 -1
  599. package/dist/cache/anchors.js.map +0 -1
  600. package/dist/cache/context.d.ts.map +0 -1
  601. package/dist/cache/context.js.map +0 -1
  602. package/dist/cache/decide.d.ts.map +0 -1
  603. package/dist/cache/decide.js.map +0 -1
  604. package/dist/cache/identity.d.ts.map +0 -1
  605. package/dist/cache/identity.js.map +0 -1
  606. package/dist/cache/recorder.d.ts.map +0 -1
  607. package/dist/cache/recorder.js.map +0 -1
  608. package/dist/cache/relocate.d.ts.map +0 -1
  609. package/dist/cache/relocate.js.map +0 -1
  610. package/dist/cache/route.d.ts.map +0 -1
  611. package/dist/cache/route.js.map +0 -1
  612. package/dist/cache/store.d.ts.map +0 -1
  613. package/dist/cache/store.js.map +0 -1
  614. package/dist/cache/template.d.ts.map +0 -1
  615. package/dist/cache/template.js.map +0 -1
  616. package/dist/cache/trace.d.ts.map +0 -1
  617. package/dist/cache/trace.js.map +0 -1
  618. package/dist/cli/bin.d.ts.map +0 -1
  619. package/dist/cli/bin.js.map +0 -1
  620. package/dist/cli/cache.d.ts.map +0 -1
  621. package/dist/cli/cache.js.map +0 -1
  622. package/dist/cli/docs-url.d.ts.map +0 -1
  623. package/dist/cli/docs-url.js.map +0 -1
  624. package/dist/cli/feedback.d.ts.map +0 -1
  625. package/dist/cli/feedback.js.map +0 -1
  626. package/dist/cli/guide.d.ts.map +0 -1
  627. package/dist/cli/guide.js.map +0 -1
  628. package/dist/cli/index.d.ts.map +0 -1
  629. package/dist/cli/index.js.map +0 -1
  630. package/dist/cli/init/agent-skill.d.ts.map +0 -1
  631. package/dist/cli/init/agent-skill.js.map +0 -1
  632. package/dist/cli/init/engines.d.ts.map +0 -1
  633. package/dist/cli/init/engines.js.map +0 -1
  634. package/dist/cli/init/gateways.d.ts.map +0 -1
  635. package/dist/cli/init/gateways.js.map +0 -1
  636. package/dist/cli/init/mcp-config.d.ts.map +0 -1
  637. package/dist/cli/init/mcp-config.js.map +0 -1
  638. package/dist/cli/init/package.d.ts.map +0 -1
  639. package/dist/cli/init/package.js.map +0 -1
  640. package/dist/cli/init/scaffold.d.ts.map +0 -1
  641. package/dist/cli/init/scaffold.js.map +0 -1
  642. package/dist/cli/init/versions.d.ts.map +0 -1
  643. package/dist/cli/init/versions.js.map +0 -1
  644. package/dist/cli/init.d.ts.map +0 -1
  645. package/dist/cli/init.js.map +0 -1
  646. package/dist/cli/mcp.d.ts.map +0 -1
  647. package/dist/cli/mcp.js.map +0 -1
  648. package/dist/cli/signals.d.ts.map +0 -1
  649. package/dist/cli/signals.js.map +0 -1
  650. package/dist/cli/skill.d.ts.map +0 -1
  651. package/dist/cli/skill.js.map +0 -1
  652. package/dist/cli/telemetry.d.ts.map +0 -1
  653. package/dist/cli/telemetry.js.map +0 -1
  654. package/dist/cli/wordmark.d.ts.map +0 -1
  655. package/dist/cli/wordmark.js.map +0 -1
  656. package/dist/collect/collect.d.ts.map +0 -1
  657. package/dist/collect/collect.js.map +0 -1
  658. package/dist/collect/registry.d.ts.map +0 -1
  659. package/dist/collect/registry.js.map +0 -1
  660. package/dist/collect/select.d.ts.map +0 -1
  661. package/dist/collect/select.js.map +0 -1
  662. package/dist/config/agent.d.ts.map +0 -1
  663. package/dist/config/agent.js.map +0 -1
  664. package/dist/config/app.d.ts.map +0 -1
  665. package/dist/config/app.js.map +0 -1
  666. package/dist/config/command.d.ts.map +0 -1
  667. package/dist/config/command.js.map +0 -1
  668. package/dist/config/diagnose.d.ts.map +0 -1
  669. package/dist/config/diagnose.js.map +0 -1
  670. package/dist/config/esm-hooks.d.ts.map +0 -1
  671. package/dist/config/esm-hooks.js.map +0 -1
  672. package/dist/config/load.d.ts.map +0 -1
  673. package/dist/config/load.js.map +0 -1
  674. package/dist/config/resolve.d.ts.map +0 -1
  675. package/dist/config/resolve.js.map +0 -1
  676. package/dist/config/secrets.d.ts.map +0 -1
  677. package/dist/config/secrets.js.map +0 -1
  678. package/dist/config/targets.d.ts.map +0 -1
  679. package/dist/config/targets.js.map +0 -1
  680. package/dist/config/validate.d.ts.map +0 -1
  681. package/dist/config/validate.js.map +0 -1
  682. package/dist/engine/contract.d.ts.map +0 -1
  683. package/dist/engine/contract.js.map +0 -1
  684. package/dist/engine/index.d.ts.map +0 -1
  685. package/dist/engine/index.js.map +0 -1
  686. package/dist/engine/manifest.d.ts.map +0 -1
  687. package/dist/engine/manifest.js.map +0 -1
  688. package/dist/engine/recording.d.ts.map +0 -1
  689. package/dist/engine/recording.js.map +0 -1
  690. package/dist/engine/resolve.d.ts.map +0 -1
  691. package/dist/engine/resolve.js.map +0 -1
  692. package/dist/engine/session.d.ts.map +0 -1
  693. package/dist/engine/session.js.map +0 -1
  694. package/dist/engine/surface.d.ts.map +0 -1
  695. package/dist/engine/surface.js.map +0 -1
  696. package/dist/engine/timing.d.ts.map +0 -1
  697. package/dist/engine/timing.js.map +0 -1
  698. package/dist/expect/async.d.ts.map +0 -1
  699. package/dist/expect/async.js.map +0 -1
  700. package/dist/expect/attempt.d.ts.map +0 -1
  701. package/dist/expect/attempt.js.map +0 -1
  702. package/dist/expect/index.d.ts.map +0 -1
  703. package/dist/expect/index.js.map +0 -1
  704. package/dist/expect/poll.d.ts.map +0 -1
  705. package/dist/expect/poll.js.map +0 -1
  706. package/dist/expect/soft.d.ts.map +0 -1
  707. package/dist/expect/soft.js.map +0 -1
  708. package/dist/expect/values.d.ts.map +0 -1
  709. package/dist/expect/values.js.map +0 -1
  710. package/dist/explore/body.d.ts.map +0 -1
  711. package/dist/explore/body.js.map +0 -1
  712. package/dist/explore/executor.d.ts.map +0 -1
  713. package/dist/explore/executor.js.map +0 -1
  714. package/dist/explore/index.d.ts.map +0 -1
  715. package/dist/explore/index.js.map +0 -1
  716. package/dist/explore/plan.d.ts.map +0 -1
  717. package/dist/explore/plan.js.map +0 -1
  718. package/dist/explore/progress.d.ts.map +0 -1
  719. package/dist/explore/progress.js.map +0 -1
  720. package/dist/explore/state.d.ts.map +0 -1
  721. package/dist/explore/state.js.map +0 -1
  722. package/dist/index.d.ts.map +0 -1
  723. package/dist/index.js.map +0 -1
  724. package/dist/internal/ai-trace.d.ts.map +0 -1
  725. package/dist/internal/ai-trace.js.map +0 -1
  726. package/dist/internal/atomic-write.d.ts.map +0 -1
  727. package/dist/internal/atomic-write.js.map +0 -1
  728. package/dist/internal/brands.d.ts.map +0 -1
  729. package/dist/internal/brands.js.map +0 -1
  730. package/dist/internal/debug.d.ts.map +0 -1
  731. package/dist/internal/debug.js.map +0 -1
  732. package/dist/internal/env.d.ts.map +0 -1
  733. package/dist/internal/env.js.map +0 -1
  734. package/dist/internal/errors.d.ts.map +0 -1
  735. package/dist/internal/errors.js.map +0 -1
  736. package/dist/internal/geometry.d.ts.map +0 -1
  737. package/dist/internal/geometry.js.map +0 -1
  738. package/dist/internal/git.d.ts.map +0 -1
  739. package/dist/internal/git.js.map +0 -1
  740. package/dist/internal/globs.d.ts.map +0 -1
  741. package/dist/internal/globs.js.map +0 -1
  742. package/dist/internal/ids.d.ts.map +0 -1
  743. package/dist/internal/ids.js.map +0 -1
  744. package/dist/internal/json-value.d.ts.map +0 -1
  745. package/dist/internal/json-value.js.map +0 -1
  746. package/dist/internal/keys.d.ts.map +0 -1
  747. package/dist/internal/keys.js.map +0 -1
  748. package/dist/internal/node-version.d.ts.map +0 -1
  749. package/dist/internal/node-version.js.map +0 -1
  750. package/dist/internal/objects.d.ts.map +0 -1
  751. package/dist/internal/objects.js.map +0 -1
  752. package/dist/internal/options.d.ts.map +0 -1
  753. package/dist/internal/options.js.map +0 -1
  754. package/dist/internal/package-manager.d.ts.map +0 -1
  755. package/dist/internal/package-manager.js.map +0 -1
  756. package/dist/internal/package-version.d.ts.map +0 -1
  757. package/dist/internal/package-version.js.map +0 -1
  758. package/dist/internal/paths.d.ts.map +0 -1
  759. package/dist/internal/paths.js.map +0 -1
  760. package/dist/internal/realm-slot.d.ts.map +0 -1
  761. package/dist/internal/realm-slot.js.map +0 -1
  762. package/dist/internal/recording-modes.d.ts.map +0 -1
  763. package/dist/internal/recording-modes.js.map +0 -1
  764. package/dist/internal/redact.d.ts.map +0 -1
  765. package/dist/internal/redact.js.map +0 -1
  766. package/dist/internal/regexp.d.ts.map +0 -1
  767. package/dist/internal/regexp.js.map +0 -1
  768. package/dist/internal/roles.d.ts.map +0 -1
  769. package/dist/internal/roles.js.map +0 -1
  770. package/dist/internal/skip.d.ts.map +0 -1
  771. package/dist/internal/skip.js.map +0 -1
  772. package/dist/internal/source.d.ts.map +0 -1
  773. package/dist/internal/source.js.map +0 -1
  774. package/dist/internal/standard-schema.d.ts.map +0 -1
  775. package/dist/internal/standard-schema.js.map +0 -1
  776. package/dist/internal/suggest.d.ts.map +0 -1
  777. package/dist/internal/suggest.js.map +0 -1
  778. package/dist/internal/text.d.ts.map +0 -1
  779. package/dist/internal/text.js.map +0 -1
  780. package/dist/internal/time.d.ts.map +0 -1
  781. package/dist/internal/time.js.map +0 -1
  782. package/dist/internal/urls.d.ts.map +0 -1
  783. package/dist/internal/urls.js.map +0 -1
  784. package/dist/internal/vcs.d.ts.map +0 -1
  785. package/dist/internal/vcs.js.map +0 -1
  786. package/dist/internal/zip.d.ts.map +0 -1
  787. package/dist/internal/zip.js.map +0 -1
  788. package/dist/locator/engine.d.ts.map +0 -1
  789. package/dist/locator/engine.js.map +0 -1
  790. package/dist/locator/expression.d.ts.map +0 -1
  791. package/dist/locator/expression.js.map +0 -1
  792. package/dist/locator/screen.d.ts.map +0 -1
  793. package/dist/locator/screen.js.map +0 -1
  794. package/dist/mcp/catalog.d.ts.map +0 -1
  795. package/dist/mcp/catalog.js.map +0 -1
  796. package/dist/mcp/config.d.ts.map +0 -1
  797. package/dist/mcp/config.js.map +0 -1
  798. package/dist/mcp/recording.d.ts.map +0 -1
  799. package/dist/mcp/recording.js.map +0 -1
  800. package/dist/mcp/server.d.ts.map +0 -1
  801. package/dist/mcp/server.js.map +0 -1
  802. package/dist/mcp/session.d.ts.map +0 -1
  803. package/dist/mcp/session.js.map +0 -1
  804. package/dist/mcp/sessions.d.ts.map +0 -1
  805. package/dist/mcp/sessions.js.map +0 -1
  806. package/dist/mcp/tools.d.ts.map +0 -1
  807. package/dist/mcp/tools.js.map +0 -1
  808. package/dist/oauth/callback-server.d.ts.map +0 -1
  809. package/dist/oauth/callback-server.js.map +0 -1
  810. package/dist/oauth/chatgpt.d.ts.map +0 -1
  811. package/dist/oauth/chatgpt.js.map +0 -1
  812. package/dist/oauth/cli.d.ts.map +0 -1
  813. package/dist/oauth/cli.js.map +0 -1
  814. package/dist/oauth/copilot.d.ts.map +0 -1
  815. package/dist/oauth/copilot.js.map +0 -1
  816. package/dist/oauth/device-code.d.ts.map +0 -1
  817. package/dist/oauth/device-code.js.map +0 -1
  818. package/dist/oauth/errors.d.ts.map +0 -1
  819. package/dist/oauth/errors.js.map +0 -1
  820. package/dist/oauth/fetch.d.ts.map +0 -1
  821. package/dist/oauth/fetch.js.map +0 -1
  822. package/dist/oauth/grok.d.ts.map +0 -1
  823. package/dist/oauth/grok.js.map +0 -1
  824. package/dist/oauth/jwt.d.ts.map +0 -1
  825. package/dist/oauth/jwt.js.map +0 -1
  826. package/dist/oauth/login.d.ts.map +0 -1
  827. package/dist/oauth/login.js.map +0 -1
  828. package/dist/oauth/models.d.ts.map +0 -1
  829. package/dist/oauth/models.js.map +0 -1
  830. package/dist/oauth/pkce.d.ts.map +0 -1
  831. package/dist/oauth/pkce.js.map +0 -1
  832. package/dist/oauth/providers/github-copilot.d.ts.map +0 -1
  833. package/dist/oauth/providers/github-copilot.js.map +0 -1
  834. package/dist/oauth/providers/openai.d.ts.map +0 -1
  835. package/dist/oauth/providers/openai.js.map +0 -1
  836. package/dist/oauth/providers/xai.d.ts.map +0 -1
  837. package/dist/oauth/providers/xai.js.map +0 -1
  838. package/dist/oauth/providers.d.ts.map +0 -1
  839. package/dist/oauth/providers.js.map +0 -1
  840. package/dist/oauth/sse.d.ts.map +0 -1
  841. package/dist/oauth/sse.js.map +0 -1
  842. package/dist/oauth/store.d.ts.map +0 -1
  843. package/dist/oauth/store.js.map +0 -1
  844. package/dist/oauth/token-endpoint.d.ts.map +0 -1
  845. package/dist/oauth/token-endpoint.js.map +0 -1
  846. package/dist/oauth/types.d.ts.map +0 -1
  847. package/dist/oauth/types.js.map +0 -1
  848. package/dist/params.d.ts.map +0 -1
  849. package/dist/params.js.map +0 -1
  850. package/dist/report/build.d.ts.map +0 -1
  851. package/dist/report/build.js.map +0 -1
  852. package/dist/report/builtin.d.ts.map +0 -1
  853. package/dist/report/builtin.js.map +0 -1
  854. package/dist/report/code-frame.d.ts.map +0 -1
  855. package/dist/report/code-frame.js.map +0 -1
  856. package/dist/report/debug-steps.d.ts.map +0 -1
  857. package/dist/report/debug-steps.js.map +0 -1
  858. package/dist/report/explore-text.d.ts.map +0 -1
  859. package/dist/report/explore-text.js.map +0 -1
  860. package/dist/report/failure-text.d.ts.map +0 -1
  861. package/dist/report/failure-text.js.map +0 -1
  862. package/dist/report/format.d.ts.map +0 -1
  863. package/dist/report/format.js.map +0 -1
  864. package/dist/report/json.d.ts.map +0 -1
  865. package/dist/report/json.js.map +0 -1
  866. package/dist/report/junit.d.ts.map +0 -1
  867. package/dist/report/junit.js.map +0 -1
  868. package/dist/report/list-explore.d.ts.map +0 -1
  869. package/dist/report/list-explore.js.map +0 -1
  870. package/dist/report/list-model.d.ts.map +0 -1
  871. package/dist/report/list-model.js.map +0 -1
  872. package/dist/report/list-steps.d.ts.map +0 -1
  873. package/dist/report/list-steps.js.map +0 -1
  874. package/dist/report/list.d.ts.map +0 -1
  875. package/dist/report/list.js.map +0 -1
  876. package/dist/report/live-window.d.ts.map +0 -1
  877. package/dist/report/live-window.js.map +0 -1
  878. package/dist/report/markdown-text.d.ts.map +0 -1
  879. package/dist/report/markdown-text.js.map +0 -1
  880. package/dist/report/markdown.d.ts.map +0 -1
  881. package/dist/report/markdown.js.map +0 -1
  882. package/dist/report/outcome.d.ts.map +0 -1
  883. package/dist/report/outcome.js.map +0 -1
  884. package/dist/report/repeats.d.ts.map +0 -1
  885. package/dist/report/repeats.js.map +0 -1
  886. package/dist/report/running-tree.d.ts.map +0 -1
  887. package/dist/report/running-tree.js.map +0 -1
  888. package/dist/report/write.d.ts.map +0 -1
  889. package/dist/report/write.js.map +0 -1
  890. package/dist/run/app-ports.d.ts.map +0 -1
  891. package/dist/run/app-ports.js.map +0 -1
  892. package/dist/run/artifacts.d.ts.map +0 -1
  893. package/dist/run/artifacts.js.map +0 -1
  894. package/dist/run/budget.d.ts.map +0 -1
  895. package/dist/run/budget.js.map +0 -1
  896. package/dist/run/declared-processes.d.ts.map +0 -1
  897. package/dist/run/declared-processes.js.map +0 -1
  898. package/dist/run/events.d.ts.map +0 -1
  899. package/dist/run/events.js.map +0 -1
  900. package/dist/run/execute.d.ts.map +0 -1
  901. package/dist/run/execute.js.map +0 -1
  902. package/dist/run/extended-fixtures.d.ts.map +0 -1
  903. package/dist/run/extended-fixtures.js.map +0 -1
  904. package/dist/run/failure-evidence.d.ts.map +0 -1
  905. package/dist/run/failure-evidence.js.map +0 -1
  906. package/dist/run/fixture-recording.d.ts.map +0 -1
  907. package/dist/run/fixture-recording.js.map +0 -1
  908. package/dist/run/fixtures.d.ts.map +0 -1
  909. package/dist/run/fixtures.js.map +0 -1
  910. package/dist/run/in-process.d.ts.map +0 -1
  911. package/dist/run/in-process.js.map +0 -1
  912. package/dist/run/last-run.d.ts.map +0 -1
  913. package/dist/run/last-run.js.map +0 -1
  914. package/dist/run/managed-process.d.ts.map +0 -1
  915. package/dist/run/managed-process.js.map +0 -1
  916. package/dist/run/output.d.ts.map +0 -1
  917. package/dist/run/output.js.map +0 -1
  918. package/dist/run/process-pool.d.ts.map +0 -1
  919. package/dist/run/process-pool.js.map +0 -1
  920. package/dist/run/provision.d.ts.map +0 -1
  921. package/dist/run/provision.js.map +0 -1
  922. package/dist/run/realm.d.ts.map +0 -1
  923. package/dist/run/realm.js.map +0 -1
  924. package/dist/run/records.d.ts.map +0 -1
  925. package/dist/run/records.js.map +0 -1
  926. package/dist/run/retry.d.ts.map +0 -1
  927. package/dist/run/retry.js.map +0 -1
  928. package/dist/run/runner.d.ts.map +0 -1
  929. package/dist/run/runner.js.map +0 -1
  930. package/dist/run/scheduler.d.ts.map +0 -1
  931. package/dist/run/scheduler.js.map +0 -1
  932. package/dist/run/secrecy.d.ts.map +0 -1
  933. package/dist/run/secrecy.js.map +0 -1
  934. package/dist/run/serial.d.ts.map +0 -1
  935. package/dist/run/serial.js.map +0 -1
  936. package/dist/run/sessions.d.ts.map +0 -1
  937. package/dist/run/sessions.js.map +0 -1
  938. package/dist/run/standalone.d.ts.map +0 -1
  939. package/dist/run/standalone.js.map +0 -1
  940. package/dist/run/steps.d.ts.map +0 -1
  941. package/dist/run/steps.js.map +0 -1
  942. package/dist/run/trace-redaction.d.ts.map +0 -1
  943. package/dist/run/trace-redaction.js.map +0 -1
  944. package/dist/run/unit-runner.d.ts.map +0 -1
  945. package/dist/run/unit-runner.js.map +0 -1
  946. package/dist/run/units.d.ts.map +0 -1
  947. package/dist/run/units.js.map +0 -1
  948. package/dist/run/worker/entry.d.ts.map +0 -1
  949. package/dist/run/worker/entry.js.map +0 -1
  950. package/dist/run/worker/handle.d.ts.map +0 -1
  951. package/dist/run/worker/handle.js.map +0 -1
  952. package/dist/run/worker/protocol.d.ts.map +0 -1
  953. package/dist/run/worker/protocol.js.map +0 -1
  954. package/dist/run/worker/session.d.ts.map +0 -1
  955. package/dist/run/worker/session.js.map +0 -1
  956. package/dist/run/worker-models.d.ts.map +0 -1
  957. package/dist/run/worker-models.js.map +0 -1
  958. package/dist/secrets.d.ts.map +0 -1
  959. package/dist/secrets.js.map +0 -1
  960. package/dist/telemetry/checkout.d.ts.map +0 -1
  961. package/dist/telemetry/checkout.js.map +0 -1
  962. package/dist/telemetry/environment.d.ts.map +0 -1
  963. package/dist/telemetry/environment.js.map +0 -1
  964. package/dist/telemetry/events.d.ts.map +0 -1
  965. package/dist/telemetry/events.js.map +0 -1
  966. package/dist/telemetry/failure-kind.d.ts.map +0 -1
  967. package/dist/telemetry/failure-kind.js.map +0 -1
  968. package/dist/telemetry/posthog.d.ts.map +0 -1
  969. package/dist/telemetry/posthog.js.map +0 -1
  970. package/dist/telemetry/project.d.ts.map +0 -1
  971. package/dist/telemetry/project.js.map +0 -1
  972. package/dist/telemetry/store.d.ts.map +0 -1
  973. package/dist/telemetry/store.js.map +0 -1
  974. package/dist/telemetry/telemetry.d.ts.map +0 -1
  975. package/dist/telemetry/telemetry.js.map +0 -1
  976. package/dist/telemetry/token.d.ts.map +0 -1
  977. package/dist/telemetry/token.js.map +0 -1
  978. package/dist/types.d.ts.map +0 -1
  979. package/dist/types.js.map +0 -1
@@ -12,11 +12,11 @@
12
12
  * restart and the client's tool list never changes.
13
13
  */
14
14
  import { z } from 'zod';
15
- import { loadAiSdk } from '../agent/ai-sdk.js';
15
+ import { loadAiSdkIfInstalled } from '../agent/ai-sdk.js';
16
16
  import { openInteractiveStep } from '../agent/interactive-step.js';
17
17
  import { ScreenPresenter } from '../agent/screen-update.js';
18
18
  import { secretHandle } from '../secrets.js';
19
- import { ConfigurationError, errorMessage, InfrastructureError } from '../internal/errors.js';
19
+ import { classifyError, ConfigurationError, errorMessage, InfrastructureError } from '../internal/errors.js';
20
20
  import { LocatorEngine } from '../locator/engine.js';
21
21
  import { allocateAppPorts } from '../run/app-ports.js';
22
22
  import { SharedAppProcesses } from '../run/process-pool.js';
@@ -26,6 +26,7 @@ import { openStandaloneAttempt } from '../run/standalone.js';
26
26
  import { createSessionCatalog, isGrammarVerb } from './catalog.js';
27
27
  import { describeRecording, SessionRecorder } from './recording.js';
28
28
  import { SessionRegistry } from './sessions.js';
29
+ import { SessionUsage } from './usage.js';
29
30
  import { actionResult, catalogLine, defineMcpTool, describeToolDetail, errorResult, invokeTool, redactResult, textResult } from './tools.js';
30
31
  /** How long one session may live, whatever happens. */
31
32
  const SESSION_TTL_MS = 4 * 60 * 60 * 1000;
@@ -64,21 +65,25 @@ export class SessionHost {
64
65
  * it, or disconnects, aborts the open and what it started.
65
66
  */
66
67
  open(options, signal) {
67
- return this.sessions.admit((id) => this.openSession(id, options, signal));
68
+ const usage = new SessionUsage(this.sessions.liveCount, this.options.headed);
69
+ return this.sessions.admit((id) => this.openSession(id, options, usage, signal)).catch((cause) => {
70
+ this.options.onSessionEnd?.(usage.openFailed(classifyError(cause).code));
71
+ throw cause;
72
+ });
68
73
  }
69
74
  /** Closes one session, the only one when `session` is omitted, and returns what happened; a session already closing returns that close. */
70
- async close(reason, session) {
75
+ async close(reason, session, endedBy = 'agent') {
71
76
  if (session === undefined && !this.sessions.hasLive)
72
77
  return 'No session is open.';
73
- return this.sessions.close(session, reason, (live) => this.teardown(live, reason));
78
+ return this.sessions.close(session, reason, (live) => this.teardown(live, reason, endedBy));
74
79
  }
75
80
  /** Closes every session, for a server that is shutting down; undefined when none was open. */
76
81
  async closeAll(reason) {
77
82
  this.shutdown.abort();
78
- const summaries = await this.sessions.closeAll(reason, (live) => this.teardown(live, reason));
83
+ const summaries = await this.sessions.closeAll(reason, (live) => this.teardown(live, reason, 'server'));
79
84
  return summaries.length === 0 ? undefined : summaries.join('\n');
80
85
  }
81
- async teardown(live, reason) {
86
+ async teardown(live, reason, endedBy) {
82
87
  if (live.idleTimer !== undefined)
83
88
  clearTimeout(live.idleTimer);
84
89
  const { value, cleanupErrors } = await this.closeAttempt(live.attempt, live.abort, async () => {
@@ -86,7 +91,7 @@ export class SessionHost {
86
91
  const outcome = await live.step.done;
87
92
  // The recorder runs this after a start or stop still in flight, even one the step's deadline abandoned.
88
93
  return { outcome, saved: await this.saveRecording(live) };
89
- });
94
+ }).finally(() => this.options.onSessionEnd?.(live.usage.closed(endedBy)));
90
95
  const lines = [`Session ${live.id} closed (${reason}); ${live.actions} tool calls ran.`];
91
96
  if (value.saved !== undefined)
92
97
  lines.push(value.saved);
@@ -124,16 +129,31 @@ export class SessionHost {
124
129
  call(session, name, args, extra) {
125
130
  const live = this.sessions.resolve(session);
126
131
  const tool = live.catalog.tools[name];
127
- if (tool === undefined)
128
- throw this.unknownTool(live, name);
132
+ live.usage.called(name, live.catalog.project.has(name));
133
+ if (tool === undefined) {
134
+ const error = this.unknownTool(live, name);
135
+ live.usage.failed(error.code);
136
+ throw error;
137
+ }
129
138
  const redact = live.attempt.agentRuntime.redact;
130
- return this.run(live, () => invokeTool(name, tool, args, extra)).then((result) => redactResult(isGrammarVerb(name) ? actionResult(name, result) : result, redact), (cause) => redactResult(errorResult(cause), redact));
139
+ return this.run(live, () => invokeTool(name, tool, args, extra)).then((result) => {
140
+ if (!isGrammarVerb(name)) {
141
+ // A grammar action's failure was counted with its code as it happened; a project tool's result carries none.
142
+ if (result.isError === true)
143
+ live.usage.failed(undefined);
144
+ return redactResult(result, redact);
145
+ }
146
+ return redactResult(actionResult(name, result), redact);
147
+ }, (cause) => {
148
+ live.usage.failed(classifyError(cause).code);
149
+ return redactResult(errorResult(cause), redact);
150
+ });
131
151
  }
132
- async openSession(id, options, request) {
133
- // The catalog reads the tools' schemas through the AI SDK, synchronously
134
- // and on every render, so the optional SDK is loaded once here: a project
135
- // without it learns so before an attempt opens a browser.
136
- await loadAiSdk();
152
+ async openSession(id, options, usage, request) {
153
+ // The catalog renders synchronously, so the optional SDK is loaded once
154
+ // here when installed. Without it the catalog reads the tools' Standard
155
+ // Schemas, and only a model-backed call needs the package.
156
+ await loadAiSdkIfInstalled();
137
157
  // The config is claimed before it evaluates: its top-level code resolves
138
158
  // secrets against the registry an open session installed, which only
139
159
  // knows that session's config.
@@ -143,6 +163,7 @@ export class SessionHost {
143
163
  // A session is its own run: a URL declared with port 0 gets a port here.
144
164
  const config = await allocateAppPorts(loaded);
145
165
  const target = this.resolveTarget(config, options.target);
166
+ usage.resolved(target.platform, target.engine);
146
167
  this.sessions.claimEngine(id, target.name, target.engine);
147
168
  const ttlMs = this.options.ttlMs ?? SESSION_TTL_MS;
148
169
  const abort = new AbortController();
@@ -197,6 +218,7 @@ export class SessionHost {
197
218
  assertionTimeout: config.assertionTimeout,
198
219
  }),
199
220
  warn: (message) => this.options.log('warning', message),
221
+ onActionFailed: (cause) => usage.failed(classifyError(cause).code),
200
222
  });
201
223
  const live = {
202
224
  id,
@@ -210,6 +232,7 @@ export class SessionHost {
210
232
  abort,
211
233
  idleTimer: undefined,
212
234
  actions: 0,
235
+ usage,
213
236
  };
214
237
  const text = this.openingText(live, config, await this.firstScreen(live));
215
238
  // A first screen that came back despite the cancel must not become a live session nobody asked for.
@@ -218,7 +241,7 @@ export class SessionHost {
218
241
  opening.removeEventListener('abort', cancel);
219
242
  this.sessions.activate(live);
220
243
  // A step that ends on its own (the TTL, a hard stop) ends the session.
221
- void step.done.then((outcome) => this.endOnItsOwn(live, outcome.error === undefined ? 'the session step concluded' : errorMessage(outcome.error)));
244
+ void step.done.then((outcome) => this.endOnItsOwn(live, outcome.error === undefined ? 'the session step concluded' : errorMessage(outcome.error), 'step'));
222
245
  this.touch(live);
223
246
  return text;
224
247
  }
@@ -231,11 +254,11 @@ export class SessionHost {
231
254
  }
232
255
  }
233
256
  /** Closes a live session that ended without a close_session: its step concluded, or it sat idle. */
234
- endOnItsOwn(live, why) {
257
+ endOnItsOwn(live, why, endedBy) {
235
258
  if (!this.sessions.isLive(live.id))
236
259
  return;
237
260
  this.options.log('warning', `session ${live.id} ended: ${why}`);
238
- this.close(why, live.id).catch((cause) => this.options.log('error', `closing session ${live.id} failed: ${errorMessage(cause)}`));
261
+ this.close(why, live.id, endedBy).catch((cause) => this.options.log('error', `closing session ${live.id} failed: ${errorMessage(cause)}`));
239
262
  }
240
263
  /** A recorder writing to `<output>/videos/<session>/`, when the engine records video. */
241
264
  recorder(id, config, attempt) {
@@ -345,7 +368,7 @@ export class SessionHost {
345
368
  if (live.idleTimer !== undefined)
346
369
  clearTimeout(live.idleTimer);
347
370
  const idleMs = this.options.idleMs ?? SESSION_IDLE_MS;
348
- live.idleTimer = setTimeout(() => this.endOnItsOwn(live, `idle for ${Math.round(idleMs / 60_000)} minutes`), idleMs);
371
+ live.idleTimer = setTimeout(() => this.endOnItsOwn(live, `idle for ${Math.round(idleMs / 60_000)} minutes`, 'idle'), idleMs);
349
372
  live.idleTimer.unref();
350
373
  }
351
374
  /** Runs one tool body inside the live session's step. */
@@ -404,4 +427,3 @@ export class SessionHost {
404
427
  });
405
428
  }
406
429
  }
407
- //# sourceMappingURL=session.js.map
@@ -25,6 +25,8 @@ export declare class SessionRegistry<S extends NamedSession> {
25
25
  constructor(limit: number);
26
26
  /** Whether any session is live. */
27
27
  get hasLive(): boolean;
28
+ /** How many sessions are live. */
29
+ get liveCount(): number;
28
30
  /**
29
31
  * Admits a session and runs `open` for it under a fresh id. A session whose
30
32
  * open fails leaves once `open` has settled, after the host tore down what
@@ -63,4 +65,3 @@ export declare class SessionRegistry<S extends NamedSession> {
63
65
  /** Keeps why a session ended, forgetting the oldest beyond `ENDED_KEPT`. */
64
66
  private remember;
65
67
  }
66
- //# sourceMappingURL=sessions.d.ts.map
@@ -23,7 +23,11 @@ export class SessionRegistry {
23
23
  }
24
24
  /** Whether any session is live. */
25
25
  get hasLive() {
26
- return this.live().length > 0;
26
+ return this.liveCount > 0;
27
+ }
28
+ /** How many sessions are live. */
29
+ get liveCount() {
30
+ return this.live().length;
27
31
  }
28
32
  /**
29
33
  * Admits a session and runs `open` for it under a fresh id. A session whose
@@ -156,4 +160,3 @@ export class SessionRegistry {
156
160
  function describe(sessions) {
157
161
  return sessions.map((session) => `${session.id} on "${session.target.name}"`).join(', ');
158
162
  }
159
- //# sourceMappingURL=sessions.js.map
@@ -8,10 +8,11 @@
8
8
  * validates the arguments against the schema, runs the tool, and renders its
9
9
  * output in the MCP result envelope.
10
10
  *
11
- * The schemas are read through the AI SDK's `asSchema`, and the SDK is an
12
- * optional peer dependency: this module reaches it only through the lazy
13
- * loader, never a static import, since the CLI loads this module for every
14
- * command and `e2e init` runs before `ai` is installed.
11
+ * The schemas are read through the AI SDK's `asSchema` when it is installed,
12
+ * and through the schema's own Standard Schema (zod's, among others) when it
13
+ * is not. The SDK is an optional peer dependency: this module reaches it only
14
+ * through the lazy loader, never a static import, since the CLI loads this
15
+ * module for every command and `e2e init` runs before `ai` is installed.
15
16
  */
16
17
  import type { JSONSchema7, ToolSet } from 'ai';
17
18
  import type { z } from 'zod';
@@ -66,7 +67,8 @@ export declare function redactResult(result: McpToolResult, redact: (text: strin
66
67
  * never need. A zod schema converts synchronously; a schema that only
67
68
  * resolves lazily is shown as an open object rather than awaited, since the
68
69
  * catalog is rendered inline. Synchronous, so the session that renders the
69
- * catalog has loaded the SDK first.
70
+ * catalog has loaded the SDK first when it is installed; without it, the
71
+ * schema's Standard JSON Schema converter is read instead.
70
72
  */
71
73
  export declare function toolJsonSchema(tool: ToolSet[string]): JSONSchema7;
72
74
  /**
@@ -89,4 +91,3 @@ export declare function invokeTool(name: string, tool: ToolSet[string], args: Re
89
91
  * else is JSON, so a structured output is never lost.
90
92
  */
91
93
  export declare function resultFromOutput(tool: ToolSet[string], output: unknown, input?: unknown): Promise<McpToolResult>;
92
- //# sourceMappingURL=tools.d.ts.map
package/dist/mcp/tools.js CHANGED
@@ -8,14 +8,16 @@
8
8
  * validates the arguments against the schema, runs the tool, and renders its
9
9
  * output in the MCP result envelope.
10
10
  *
11
- * The schemas are read through the AI SDK's `asSchema`, and the SDK is an
12
- * optional peer dependency: this module reaches it only through the lazy
13
- * loader, never a static import, since the CLI loads this module for every
14
- * command and `e2e init` runs before `ai` is installed.
11
+ * The schemas are read through the AI SDK's `asSchema` when it is installed,
12
+ * and through the schema's own Standard Schema (zod's, among others) when it
13
+ * is not. The SDK is an optional peer dependency: this module reaches it only
14
+ * through the lazy loader, never a static import, since the CLI loads this
15
+ * module for every command and `e2e init` runs before `ai` is installed.
15
16
  */
16
- import { aiSdk, loadAiSdk } from '../agent/ai-sdk.js';
17
+ import { loadAiSdk, loadAiSdkIfInstalled, loadedAiSdk } from '../agent/ai-sdk.js';
17
18
  import { isFailedResult } from '../agent/loop-guards.js';
18
19
  import { codedMessage, ConfigurationError, errorMessage } from '../internal/errors.js';
20
+ import { describeIssue } from '../internal/standard-schema.js';
19
21
  /** Declares one fixed tool with `call` typed from its `inputSchema`. */
20
22
  export function defineMcpTool(spec) {
21
23
  return spec;
@@ -54,15 +56,26 @@ const CATALOG_SENTENCE_MAX = 160;
54
56
  * never need. A zod schema converts synchronously; a schema that only
55
57
  * resolves lazily is shown as an open object rather than awaited, since the
56
58
  * catalog is rendered inline. Synchronous, so the session that renders the
57
- * catalog has loaded the SDK first.
59
+ * catalog has loaded the SDK first when it is installed; without it, the
60
+ * schema's Standard JSON Schema converter is read instead.
58
61
  */
59
62
  export function toolJsonSchema(tool) {
60
- const raw = aiSdk().asSchema(tool.inputSchema).jsonSchema;
61
- if (typeof raw.then === 'function')
63
+ const sdk = loadedAiSdk();
64
+ const raw = sdk === undefined ? standardJsonSchema(tool.inputSchema) : sdk.asSchema(tool.inputSchema).jsonSchema;
65
+ if (raw === undefined || typeof raw.then === 'function')
62
66
  return { type: 'object' };
63
67
  const { $schema: _draft, ...schema } = raw;
64
68
  return schema;
65
69
  }
70
+ /** The tool schema as a Standard Schema v1, or undefined for a schema the AI SDK built. */
71
+ function standardSchemaOf(schema) {
72
+ const props = schema?.['~standard'];
73
+ return typeof props === 'object' && props !== null && typeof props.validate === 'function' ? schema : undefined;
74
+ }
75
+ /** The draft-07 JSON Schema a Standard Schema's own converter produces, or undefined without one. */
76
+ function standardJsonSchema(schema) {
77
+ return standardSchemaOf(schema)?.['~standard'].jsonSchema?.input({ target: 'draft-07' });
78
+ }
66
79
  /**
67
80
  * One catalog line: the name, the argument names (`?` marks an optional
68
81
  * one), the first sentence of the description, and the read-only mark.
@@ -119,14 +132,27 @@ export async function invokeTool(name, tool, args, extra) {
119
132
  return resultFromOutput(tool, await resolveOutput(await tool.execute(input, options)), input);
120
133
  }
121
134
  async function validateArgs(name, tool, args) {
122
- const { asSchema } = await loadAiSdk();
135
+ const sdk = await loadAiSdkIfInstalled();
136
+ const standard = standardSchemaOf(tool.inputSchema);
137
+ if (sdk === undefined && standard !== undefined) {
138
+ const result = await standard['~standard'].validate(args);
139
+ if (result.issues === undefined)
140
+ return result.value;
141
+ throw invalidArgs(name, result.issues.map(describeIssue).join('; '));
142
+ }
143
+ // A schema the SDK built (`jsonSchema()`, a lazy schema) only exists with the SDK installed.
144
+ const { asSchema } = sdk ?? (await loadAiSdk());
123
145
  const schema = asSchema(tool.inputSchema);
124
146
  if (schema.validate === undefined)
125
147
  return args;
126
148
  const result = await schema.validate(args);
127
149
  if (result.success)
128
150
  return result.value;
129
- throw new ConfigurationError('INVALID_ARGUMENT', `call ${name}: ${describeValidationError(result.error)}; tools {tool: ${JSON.stringify(name)}} shows its arguments`);
151
+ throw invalidArgs(name, describeValidationError(result.error));
152
+ }
153
+ /** The failure a `call` with arguments its tool's schema rejects gets. */
154
+ function invalidArgs(name, issues) {
155
+ return new ConfigurationError('INVALID_ARGUMENT', `call ${name}: ${issues}; tools {tool: ${JSON.stringify(name)}} shows its arguments`);
130
156
  }
131
157
  /**
132
158
  * The issues a zod (or any standard schema) failure carries, one per line;
@@ -200,4 +226,3 @@ function contentFromModelOutput(output) {
200
226
  return undefined;
201
227
  }
202
228
  }
203
- //# sourceMappingURL=tools.js.map
@@ -0,0 +1,61 @@
1
+ /**
2
+ * What one `e2e mcp` session did, kept beside it for whoever is told when it
3
+ * ends: the CLI turns it into telemetry. The host fills it from facts it
4
+ * already holds; nothing here reads an argument, a result, or a screen. A
5
+ * project tool counts under one number, never its name, and an error under
6
+ * its runner code alone.
7
+ */
8
+ /** How a session ended: the agent's `close_session`, idleness, its step concluding (the TTL), or the server going away. */
9
+ export type SessionEndedBy = 'agent' | 'idle' | 'step' | 'server';
10
+ /** One session, from `open_session` to its close or failed open. */
11
+ export interface McpSessionSummary {
12
+ /** `closed` for a session that went live, `open-failed` for an `open_session` that did not. */
13
+ readonly outcome: 'closed' | 'open-failed';
14
+ /** Undefined for a failed open. */
15
+ readonly endedBy: SessionEndedBy | undefined;
16
+ /** The runner code an open failed with; undefined for a session that went live. */
17
+ readonly openErrorCode: string | undefined;
18
+ /** Undefined when the open failed before the target resolved. */
19
+ readonly platform: string | undefined;
20
+ /** Undefined before the target resolved, and for a target without an engine. */
21
+ readonly engine: SessionEngine | undefined;
22
+ readonly headed: boolean;
23
+ readonly durationMs: number;
24
+ /** Sessions live beside this one when it opened. */
25
+ readonly concurrent: number;
26
+ /** Calls of every other name, the built-in catalog tools and names the session does not have, by name; telemetry folds the latter. */
27
+ readonly toolCalls: ReadonlyMap<string, number>;
28
+ /** Calls of the project's own tools, together. */
29
+ readonly projectToolCalls: number;
30
+ /** Calls whose result was an error. */
31
+ readonly failedCalls: number;
32
+ /** How often each runner code failed a call. */
33
+ readonly errorCodes: ReadonlyMap<string, number>;
34
+ }
35
+ /** The engine a session's target declares, by its own name and version. */
36
+ export interface SessionEngine {
37
+ readonly name: string;
38
+ readonly version: string;
39
+ }
40
+ /** The live counters of one session. */
41
+ export declare class SessionUsage {
42
+ private readonly concurrent;
43
+ private readonly headed;
44
+ private readonly startedAt;
45
+ private readonly toolCalls;
46
+ private projectToolCalls;
47
+ private failedCalls;
48
+ private readonly errorCodes;
49
+ private target;
50
+ constructor(concurrent: number, headed: boolean);
51
+ /** Notes the target once the open resolved it, so a later failure still names the platform it failed on. */
52
+ resolved(platform: string, engine: SessionEngine | undefined): void;
53
+ /** Counts one call of a catalog tool. */
54
+ called(name: string, project: boolean): void;
55
+ /** Counts one failed call, under its code when it has one. */
56
+ failed(code: string | undefined): void;
57
+ /** The summary of a session that went live and has now closed. */
58
+ closed(endedBy: SessionEndedBy): McpSessionSummary;
59
+ /** The summary of an `open_session` that failed with `code`. */
60
+ openFailed(code: string): McpSessionSummary;
61
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * What one `e2e mcp` session did, kept beside it for whoever is told when it
3
+ * ends: the CLI turns it into telemetry. The host fills it from facts it
4
+ * already holds; nothing here reads an argument, a result, or a screen. A
5
+ * project tool counts under one number, never its name, and an error under
6
+ * its runner code alone.
7
+ */
8
+ /** The live counters of one session. */
9
+ export class SessionUsage {
10
+ concurrent;
11
+ headed;
12
+ startedAt = Date.now();
13
+ toolCalls = new Map();
14
+ projectToolCalls = 0;
15
+ failedCalls = 0;
16
+ errorCodes = new Map();
17
+ target;
18
+ constructor(concurrent, headed) {
19
+ this.concurrent = concurrent;
20
+ this.headed = headed;
21
+ }
22
+ /** Notes the target once the open resolved it, so a later failure still names the platform it failed on. */
23
+ resolved(platform, engine) {
24
+ this.target = { platform, engine };
25
+ }
26
+ /** Counts one call of a catalog tool. */
27
+ called(name, project) {
28
+ if (project)
29
+ this.projectToolCalls += 1;
30
+ else
31
+ this.toolCalls.set(name, (this.toolCalls.get(name) ?? 0) + 1);
32
+ }
33
+ /** Counts one failed call, under its code when it has one. */
34
+ failed(code) {
35
+ this.failedCalls += 1;
36
+ if (code !== undefined)
37
+ this.errorCodes.set(code, (this.errorCodes.get(code) ?? 0) + 1);
38
+ }
39
+ /** The summary of a session that went live and has now closed. */
40
+ closed(endedBy) {
41
+ return {
42
+ outcome: 'closed',
43
+ endedBy,
44
+ openErrorCode: undefined,
45
+ platform: this.target?.platform,
46
+ engine: this.target?.engine,
47
+ headed: this.headed,
48
+ durationMs: Date.now() - this.startedAt,
49
+ concurrent: this.concurrent,
50
+ toolCalls: new Map(this.toolCalls),
51
+ projectToolCalls: this.projectToolCalls,
52
+ failedCalls: this.failedCalls,
53
+ errorCodes: new Map(this.errorCodes),
54
+ };
55
+ }
56
+ /** The summary of an `open_session` that failed with `code`. */
57
+ openFailed(code) {
58
+ return {
59
+ outcome: 'open-failed',
60
+ endedBy: undefined,
61
+ openErrorCode: code,
62
+ platform: this.target?.platform,
63
+ engine: this.target?.engine,
64
+ headed: this.headed,
65
+ durationMs: Date.now() - this.startedAt,
66
+ concurrent: this.concurrent,
67
+ toolCalls: new Map(),
68
+ projectToolCalls: 0,
69
+ failedCalls: 0,
70
+ errorCodes: new Map(),
71
+ };
72
+ }
73
+ }
@@ -23,4 +23,3 @@ export interface CallbackServer {
23
23
  close(): void;
24
24
  }
25
25
  export declare function startCallbackServer(options: CallbackServerOptions): Promise<CallbackServer | undefined>;
26
- //# sourceMappingURL=callback-server.d.ts.map
@@ -100,4 +100,3 @@ function renderPage(productName, heading, message) {
100
100
  <body><main><h1>${escapeHtml(heading)}</h1><p>${escapeHtml(message)}</p></main></body>
101
101
  </html>`;
102
102
  }
103
- //# sourceMappingURL=callback-server.js.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  import type { LanguageModelV4 } from '@ai-sdk/provider';
8
8
  export declare function chatgpt(modelId: string): LanguageModelV4;
9
- //# sourceMappingURL=chatgpt.d.ts.map
@@ -40,4 +40,3 @@ function withoutServerStorage(model) {
40
40
  doStream: (options) => model.doStream(storeOff(options)),
41
41
  };
42
42
  }
43
- //# sourceMappingURL=chatgpt.js.map
@@ -31,4 +31,3 @@ export declare function runLogout(providerId: string | undefined, io?: CliIo): P
31
31
  * terminal controls stripped. `list` is a test seam.
32
32
  */
33
33
  export declare function runModels(providerId: string | undefined, io?: CliIo, list?: (id: ProviderId) => Promise<SubscriptionModel[]>): Promise<number>;
34
- //# sourceMappingURL=cli.d.ts.map
package/dist/oauth/cli.js CHANGED
@@ -258,4 +258,3 @@ function openInBrowser(url) {
258
258
  // The printed URL is the fallback.
259
259
  }
260
260
  }
261
- //# sourceMappingURL=cli.js.map
@@ -7,4 +7,3 @@
7
7
  */
8
8
  import type { LanguageModelV4 } from '@ai-sdk/provider';
9
9
  export declare function copilot(modelId: string): LanguageModelV4;
10
- //# sourceMappingURL=copilot.d.ts.map
@@ -24,4 +24,3 @@ export function copilot(modelId) {
24
24
  includeUsage: true,
25
25
  }).chatModel(modelId);
26
26
  }
27
- //# sourceMappingURL=copilot.js.map
@@ -53,4 +53,3 @@ export interface Rfc8628Options {
53
53
  }
54
54
  /** The standard device flow; the poll reads the body before the status, since vendors disagree on the status for "pending". */
55
55
  export declare function rfc8628Flow(options: Rfc8628Options): Promise<TokenResponse>;
56
- //# sourceMappingURL=device-code.d.ts.map
@@ -110,4 +110,3 @@ function abortableSleep(ms, signal) {
110
110
  signal?.addEventListener('abort', onAbort, { once: true });
111
111
  });
112
112
  }
113
- //# sourceMappingURL=device-code.js.map
@@ -20,4 +20,3 @@ export declare class OAuthError extends Error {
20
20
  }
21
21
  /** Reads an error body for a message without assuming JSON. */
22
22
  export declare function describeResponse(response: Response): Promise<string>;
23
- //# sourceMappingURL=errors.d.ts.map
@@ -29,4 +29,3 @@ export async function describeResponse(response) {
29
29
  return `${response.status}: ${text.slice(0, 200)}`;
30
30
  }
31
31
  }
32
- //# sourceMappingURL=errors.js.map
@@ -17,4 +17,3 @@ export interface OAuthFetchOptions {
17
17
  readonly loginHint?: string;
18
18
  }
19
19
  export declare function createOAuthFetch<Credentials extends OAuthCredentials>(provider: OAuthProvider<Credentials, never>, options: OAuthFetchOptions): FetchFunction;
20
- //# sourceMappingURL=fetch.d.ts.map
@@ -115,4 +115,3 @@ export function createOAuthFetch(provider, options) {
115
115
  function expiring(credentials) {
116
116
  return credentials.expires !== 0 && credentials.expires - REFRESH_SKEW_MS <= Date.now();
117
117
  }
118
- //# sourceMappingURL=fetch.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  import type { LanguageModelV4 } from '@ai-sdk/provider';
7
7
  export declare function grok(modelId: string): LanguageModelV4;
8
- //# sourceMappingURL=grok.d.ts.map
@@ -16,4 +16,3 @@ export function grok(modelId) {
16
16
  });
17
17
  return createXai({ apiKey: 'oauth', fetch })(modelId);
18
18
  }
19
- //# sourceMappingURL=grok.js.map
@@ -1,3 +1,2 @@
1
1
  /** The payload of a JWT, or undefined when the token is not one. Signatures are not checked: the values only steer requests. */
2
2
  export declare function decodeJwtPayload(token: string): Record<string, unknown> | undefined;
3
- //# sourceMappingURL=jwt.d.ts.map
package/dist/oauth/jwt.js CHANGED
@@ -11,4 +11,3 @@ export function decodeJwtPayload(token) {
11
11
  return undefined;
12
12
  }
13
13
  }
14
- //# sourceMappingURL=jwt.js.map
@@ -9,4 +9,3 @@ export interface LoginInput<Id extends ProviderId> {
9
9
  export declare function login<Id extends ProviderId>(providerId: Id, input: LoginInput<Id>): Promise<OAuthCredentials>;
10
10
  /** Forgets a stored login; true when there was one. */
11
11
  export declare function logout(providerId: ProviderId, store?: CredentialStore): Promise<boolean>;
12
- //# sourceMappingURL=login.d.ts.map
@@ -14,4 +14,3 @@ export async function logout(providerId, store = defaultCredentialStore()) {
14
14
  await store.remove(providerId);
15
15
  return true;
16
16
  }
17
- //# sourceMappingURL=login.js.map
@@ -3,4 +3,3 @@ import { type ProviderId } from './providers.ts';
3
3
  import type { CredentialStore, SubscriptionModel } from './types.ts';
4
4
  /** The models `providerId`'s stored login serves; `NOT_LOGGED_IN` without one. */
5
5
  export declare function listModels(providerId: ProviderId, store?: CredentialStore): Promise<SubscriptionModel[]>;
6
- //# sourceMappingURL=models.d.ts.map
@@ -11,4 +11,3 @@ export async function listModels(providerId, store = defaultCredentialStore()) {
11
11
  const fetch = createOAuthFetch(provider, { store, userAgent: USER_AGENT, loginHint: loginHint(providerId) });
12
12
  return provider.models(fetch);
13
13
  }
14
- //# sourceMappingURL=models.js.map
@@ -5,4 +5,3 @@ export interface Pkce {
5
5
  }
6
6
  export declare function generatePkce(): Promise<Pkce>;
7
7
  export declare function randomState(): string;
8
- //# sourceMappingURL=pkce.d.ts.map
@@ -10,4 +10,3 @@ export async function generatePkce() {
10
10
  export function randomState() {
11
11
  return base64url(crypto.getRandomValues(new Uint8Array(24)));
12
12
  }
13
- //# sourceMappingURL=pkce.js.map
@@ -36,4 +36,3 @@ export declare function copilotBaseUrl(enterpriseUrl?: string): string;
36
36
  export declare function createCopilotProvider(options?: CopilotProviderOptions): OAuthProvider<CopilotCredentials, CopilotLoginOptions>;
37
37
  /** Routes an enterprise login at its host and adds Copilot's headers: who initiated the turn, and that images are present. */
38
38
  export declare function sendCopilotRequest(request: Request, credentials: CopilotCredentials, upstream: FetchFunction): Promise<Response>;
39
- //# sourceMappingURL=github-copilot.d.ts.map
@@ -114,8 +114,10 @@ export async function sendCopilotRequest(request, credentials, upstream) {
114
114
  }
115
115
  /**
116
116
  * The chat models the Copilot plan serves; embeddings and other kinds are
117
- * left out because only chat models fit `copilot()`. The request goes through
118
- * `send`, so an enterprise login lists its own host.
117
+ * left out because only chat models fit `copilot()`. A model the plan has
118
+ * not enabled, or one Copilot serves without `/chat/completions`, is listed
119
+ * but marked: `copilot()` posts to `/chat/completions`, which rejects both. The
120
+ * request goes through `send`, so an enterprise login lists its own host.
119
121
  */
120
122
  async function listCopilotModels(fetch) {
121
123
  const response = await fetch(`${COPILOT_API_URL}/models`);
@@ -132,6 +134,8 @@ async function listCopilotModels(fetch) {
132
134
  supports?.tool_calls === true ? 'tools' : undefined,
133
135
  supports?.vision === true ? 'vision' : undefined,
134
136
  model.preview === true ? 'preview' : undefined,
137
+ typeof model.policy?.state === 'string' && model.policy.state !== 'enabled' ? 'not enabled' : undefined,
138
+ servesChatCompletions(model) ? undefined : 'no chat completions',
135
139
  ].filter((part) => part !== undefined);
136
140
  return {
137
141
  id: model.id,
@@ -140,4 +144,7 @@ async function listCopilotModels(fetch) {
140
144
  };
141
145
  });
142
146
  }
143
- //# sourceMappingURL=github-copilot.js.map
147
+ /** Whether `copilot()` can reach the model; an entry that names no endpoints is served over chat completions. */
148
+ function servesChatCompletions(model) {
149
+ return !Array.isArray(model.supported_endpoints) || model.supported_endpoints.includes('/chat/completions');
150
+ }