testdriverai 7.2.64 → 7.2.65

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 (360) hide show
  1. package/agent/index.js +4 -3
  2. package/agent/interface.js +11 -251
  3. package/agent/lib/debugger-server.js +2 -1
  4. package/agent/lib/logger.js +56 -0
  5. package/agent/lib/sandbox.js +6 -7
  6. package/ai/agents/test-writer.md +457 -0
  7. package/{docs/v7/ai.mdx → ai/skills/testdriver:ai/SKILL.md} +3 -5
  8. package/{docs/v7/assert.mdx → ai/skills/testdriver:assert/SKILL.md} +3 -4
  9. package/{docs/v7/aws-setup.mdx → ai/skills/testdriver:aws-setup/SKILL.md} +3 -4
  10. package/{docs/v7/caching.mdx → ai/skills/testdriver:caching/SKILL.md} +3 -7
  11. package/{docs/v7/captcha.mdx → ai/skills/testdriver:captcha/SKILL.md} +4 -5
  12. package/{docs/v7/ci-cd.mdx → ai/skills/testdriver:ci-cd/SKILL.md} +3 -4
  13. package/{docs/v7/click.mdx → ai/skills/testdriver:click/SKILL.md} +3 -4
  14. package/{docs/v7/client.mdx → ai/skills/testdriver:client/SKILL.md} +11 -5
  15. package/{docs/v7/cloud.mdx → ai/skills/testdriver:cloud/SKILL.md} +3 -4
  16. package/{docs/v7/customizing-devices.mdx → ai/skills/testdriver:customizing-devices/SKILL.md} +36 -26
  17. package/{docs/v7/dashcam.mdx → ai/skills/testdriver:dashcam/SKILL.md} +3 -4
  18. package/{docs/v7/device-config.mdx → ai/skills/testdriver:device-config/SKILL.md} +3 -3
  19. package/{docs/v7/double-click.mdx → ai/skills/testdriver:double-click/SKILL.md} +3 -3
  20. package/{docs/v7/elements.mdx → ai/skills/testdriver:elements/SKILL.md} +3 -4
  21. package/{docs/v7/enterprise.mdx → ai/skills/testdriver:enterprise/SKILL.md} +3 -5
  22. package/ai/skills/testdriver:examples/SKILL.md +7 -0
  23. package/{docs/v7/exec.mdx → ai/skills/testdriver:exec/SKILL.md} +3 -4
  24. package/{docs/v7/find.mdx → ai/skills/testdriver:find/SKILL.md} +81 -4
  25. package/{docs/v7/focus-application.mdx → ai/skills/testdriver:focus-application/SKILL.md} +3 -4
  26. package/{docs/v7/generating-tests.mdx → ai/skills/testdriver:generating-tests/SKILL.md} +3 -3
  27. package/{docs/v7/hover.mdx → ai/skills/testdriver:hover/SKILL.md} +3 -4
  28. package/{docs/v7/locating-elements.mdx → ai/skills/testdriver:locating-elements/SKILL.md} +3 -3
  29. package/{docs/v7/making-assertions.mdx → ai/skills/testdriver:making-assertions/SKILL.md} +3 -3
  30. package/ai/skills/testdriver:mcp-workflow/SKILL.md +410 -0
  31. package/{docs/v7/mouse-down.mdx → ai/skills/testdriver:mouse-down/SKILL.md} +3 -3
  32. package/{docs/v7/mouse-up.mdx → ai/skills/testdriver:mouse-up/SKILL.md} +3 -3
  33. package/{docs/v7/performing-actions.mdx → ai/skills/testdriver:performing-actions/SKILL.md} +3 -3
  34. package/{docs/v7/press-keys.mdx → ai/skills/testdriver:press-keys/SKILL.md} +3 -4
  35. package/{docs/v7/quickstart.mdx → ai/skills/testdriver:quickstart/SKILL.md} +3 -4
  36. package/{docs/v7/reusable-code.mdx → ai/skills/testdriver:reusable-code/SKILL.md} +3 -3
  37. package/{docs/v7/right-click.mdx → ai/skills/testdriver:right-click/SKILL.md} +3 -3
  38. package/{docs/v7/running-tests.mdx → ai/skills/testdriver:running-tests/SKILL.md} +3 -3
  39. package/{docs/v7/screenshot.mdx → ai/skills/testdriver:screenshot/SKILL.md} +3 -4
  40. package/{docs/v7/scroll.mdx → ai/skills/testdriver:scroll/SKILL.md} +3 -4
  41. package/{docs/v7/secrets.mdx → ai/skills/testdriver:secrets/SKILL.md} +3 -3
  42. package/{docs/v7/self-hosted.mdx → ai/skills/testdriver:self-hosted/SKILL.md} +3 -4
  43. package/ai/skills/testdriver:testdriver/SKILL.md +31 -0
  44. package/{docs/v7/type.mdx → ai/skills/testdriver:type/SKILL.md} +3 -4
  45. package/{docs/v7/variables.mdx → ai/skills/testdriver:variables/SKILL.md} +3 -3
  46. package/{docs/v7/waiting-for-elements.mdx → ai/skills/testdriver:waiting-for-elements/SKILL.md} +3 -3
  47. package/{docs/v7/what-is-testdriver.mdx → ai/skills/testdriver:what-is-testdriver/SKILL.md} +3 -3
  48. package/interfaces/cli/commands/init.js +278 -1
  49. package/interfaces/cli/commands/setup.js +382 -0
  50. package/interfaces/vitest-plugin.mjs +190 -122
  51. package/lib/sentry.js +4 -3
  52. package/lib/vitest/hooks.mjs +70 -16
  53. package/package.json +29 -9
  54. package/sdk.d.ts +29 -2
  55. package/sdk.js +1 -0
  56. package/.env.example +0 -4
  57. package/.github/workflows/acceptance-linux-scheduled.yaml +0 -45
  58. package/.github/workflows/acceptance-windows-scheduled.yaml +0 -54
  59. package/.github/workflows/acceptance.yaml +0 -87
  60. package/.github/workflows/publish.yaml +0 -68
  61. package/.github/workflows/test-init.yml +0 -145
  62. package/.github/workflows/testdriver.yml +0 -170
  63. package/.github/workflows/windows-self-hosted.yaml +0 -82
  64. package/.prettierignore +0 -4
  65. package/.prettierrc +0 -1
  66. package/CHANGELOG.md +0 -34
  67. package/agents.md +0 -455
  68. package/debugger/bg.png +0 -0
  69. package/debugger/icon.png +0 -0
  70. package/debugger/index.html +0 -797
  71. package/debugger/td.png +0 -0
  72. package/debugger/tray-buffered.png +0 -0
  73. package/debugger/tray.png +0 -0
  74. package/docs/GITHUB_COMMENTS.md +0 -330
  75. package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +0 -167
  76. package/docs/QUICK-START-GITHUB-COMMENTS.md +0 -84
  77. package/docs/TEST-GITHUB-COMMENTS.md +0 -129
  78. package/docs/_scripts/link-replacer.js +0 -164
  79. package/docs/_scripts/upload-docs-to-openai.js +0 -284
  80. package/docs/docs.json +0 -393
  81. package/docs/github-integration-setup.md +0 -266
  82. package/docs/guide/best-practices-polling.mdx +0 -154
  83. package/docs/images/content/account/newprojectsettings.png +0 -0
  84. package/docs/images/content/account/projectpage.png +0 -0
  85. package/docs/images/content/account/projectreplays.png +0 -0
  86. package/docs/images/content/account/team-manage.png +0 -0
  87. package/docs/images/content/account/teampage.png +0 -0
  88. package/docs/images/content/extension/cursor.svg +0 -1
  89. package/docs/images/content/extension/vscode.svg +0 -57
  90. package/docs/images/content/extension/windsurf.svg +0 -3
  91. package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
  92. package/docs/images/content/side-by-side.png +0 -0
  93. package/docs/images/content/vscode/ide-full.png +0 -0
  94. package/docs/images/content/vscode/running.png +0 -0
  95. package/docs/images/content/vscode/vscode-2-assert.png +0 -0
  96. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  97. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  98. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  99. package/docs/images/content/vscode/vscode-install.png +0 -0
  100. package/docs/images/content/vscode/vscode-overview.png +0 -0
  101. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  102. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  103. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  104. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  105. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  106. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  107. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  108. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  109. package/docs/images/template/dark.png +0 -0
  110. package/docs/images/template/icon.png +0 -0
  111. package/docs/images/template/light.png +0 -0
  112. package/docs/snippets/calendar-link.mdx +0 -4
  113. package/docs/snippets/gitignore-warning.mdx +0 -7
  114. package/docs/snippets/lifecycle-warning.mdx +0 -6
  115. package/docs/snippets/test-prereqs.mdx +0 -12
  116. package/docs/snippets/tests/assert-replay.mdx +0 -7
  117. package/docs/snippets/tests/assert-yaml.mdx +0 -8
  118. package/docs/snippets/tests/exec-js-replay.mdx +0 -7
  119. package/docs/snippets/tests/exec-js-yaml.mdx +0 -32
  120. package/docs/snippets/tests/exec-shell-replay.mdx +0 -7
  121. package/docs/snippets/tests/exec-shell-yaml.mdx +0 -15
  122. package/docs/snippets/tests/hover-image-replay.mdx +0 -7
  123. package/docs/snippets/tests/hover-image-yaml.mdx +0 -17
  124. package/docs/snippets/tests/hover-text-replay.mdx +0 -7
  125. package/docs/snippets/tests/hover-text-with-description-replay.mdx +0 -7
  126. package/docs/snippets/tests/hover-text-with-description-yaml.mdx +0 -24
  127. package/docs/snippets/tests/hover-text-yaml.mdx +0 -14
  128. package/docs/snippets/tests/match-image-replay.mdx +0 -7
  129. package/docs/snippets/tests/match-image-yaml.mdx +0 -17
  130. package/docs/snippets/tests/press-keys-replay.mdx +0 -7
  131. package/docs/snippets/tests/press-keys-yaml.mdx +0 -36
  132. package/docs/snippets/tests/remember-replay.mdx +0 -7
  133. package/docs/snippets/tests/remember-yaml.mdx +0 -28
  134. package/docs/snippets/tests/scroll-replay.mdx +0 -7
  135. package/docs/snippets/tests/scroll-until-image-replay.mdx +0 -7
  136. package/docs/snippets/tests/scroll-until-image-yaml.mdx +0 -14
  137. package/docs/snippets/tests/scroll-until-text-replay.mdx +0 -7
  138. package/docs/snippets/tests/scroll-until-text-yaml.mdx +0 -17
  139. package/docs/snippets/tests/scroll-yaml.mdx +0 -30
  140. package/docs/snippets/tests/type-repeated-replay.mdx +0 -7
  141. package/docs/snippets/tests/type-repeated-yaml.mdx +0 -22
  142. package/docs/snippets/tests/type-replay.mdx +0 -7
  143. package/docs/snippets/tests/type-yaml.mdx +0 -28
  144. package/docs/snippets/tests/wait-for-image-replay.mdx +0 -7
  145. package/docs/snippets/tests/wait-for-image-yaml.mdx +0 -18
  146. package/docs/snippets/tests/wait-for-text-replay.mdx +0 -7
  147. package/docs/snippets/tests/wait-for-text-yaml.mdx +0 -18
  148. package/docs/snippets/tests/wait-replay.mdx +0 -7
  149. package/docs/snippets/tests/wait-yaml.mdx +0 -13
  150. package/docs/styles.css +0 -65
  151. package/docs/v6/account/dashboard.mdx +0 -16
  152. package/docs/v6/account/enterprise.mdx +0 -110
  153. package/docs/v6/account/pricing.mdx +0 -33
  154. package/docs/v6/account/projects.mdx +0 -33
  155. package/docs/v6/account/team.mdx +0 -35
  156. package/docs/v6/action/ami.mdx +0 -109
  157. package/docs/v6/action/performance.mdx +0 -105
  158. package/docs/v6/action/secrets.mdx +0 -93
  159. package/docs/v6/apps/chrome-extensions.mdx +0 -48
  160. package/docs/v6/apps/desktop-apps.mdx +0 -93
  161. package/docs/v6/apps/mobile-apps.mdx +0 -26
  162. package/docs/v6/apps/static-websites.mdx +0 -54
  163. package/docs/v6/apps/tauri-apps.mdx +0 -361
  164. package/docs/v6/bugs/jira.mdx +0 -232
  165. package/docs/v6/cli/overview.mdx +0 -66
  166. package/docs/v6/commands/assert.mdx +0 -45
  167. package/docs/v6/commands/exec.mdx +0 -282
  168. package/docs/v6/commands/focus-application.mdx +0 -44
  169. package/docs/v6/commands/hover-image.mdx +0 -69
  170. package/docs/v6/commands/hover-text.mdx +0 -47
  171. package/docs/v6/commands/if.mdx +0 -53
  172. package/docs/v6/commands/match-image.mdx +0 -67
  173. package/docs/v6/commands/press-keys.mdx +0 -87
  174. package/docs/v6/commands/remember.mdx +0 -49
  175. package/docs/v6/commands/run.mdx +0 -44
  176. package/docs/v6/commands/scroll-until-image.mdx +0 -66
  177. package/docs/v6/commands/scroll-until-text.mdx +0 -60
  178. package/docs/v6/commands/scroll.mdx +0 -69
  179. package/docs/v6/commands/type.mdx +0 -45
  180. package/docs/v6/commands/wait-for-image.mdx +0 -54
  181. package/docs/v6/commands/wait-for-text.mdx +0 -48
  182. package/docs/v6/commands/wait.mdx +0 -45
  183. package/docs/v6/exporting/junit.mdx +0 -218
  184. package/docs/v6/exporting/playwright.mdx +0 -197
  185. package/docs/v6/features/auto-healing.mdx +0 -144
  186. package/docs/v6/features/generation.mdx +0 -116
  187. package/docs/v6/features/parallel-testing.mdx +0 -151
  188. package/docs/v6/features/reusable-snippets.mdx +0 -131
  189. package/docs/v6/features/selectorless.mdx +0 -80
  190. package/docs/v6/features/visual-assertions.mdx +0 -139
  191. package/docs/v6/getting-started/ci.mdx +0 -146
  192. package/docs/v6/getting-started/cli.mdx +0 -91
  193. package/docs/v6/getting-started/editing.mdx +0 -100
  194. package/docs/v6/getting-started/playwright.mdx +0 -342
  195. package/docs/v6/getting-started/running.mdx +0 -48
  196. package/docs/v6/getting-started/self-hosting.mdx +0 -408
  197. package/docs/v6/getting-started/vscode.mdx +0 -89
  198. package/docs/v6/guide/assertions.mdx +0 -189
  199. package/docs/v6/guide/authentication.mdx +0 -136
  200. package/docs/v6/guide/code.mdx +0 -65
  201. package/docs/v6/guide/dashcam.mdx +0 -118
  202. package/docs/v6/guide/environment-variables.mdx +0 -26
  203. package/docs/v6/guide/lifecycle.mdx +0 -242
  204. package/docs/v6/guide/locating.mdx +0 -141
  205. package/docs/v6/guide/protips.mdx +0 -43
  206. package/docs/v6/guide/variables.mdx +0 -143
  207. package/docs/v6/guide/waiting.mdx +0 -130
  208. package/docs/v6/importing/csv.mdx +0 -196
  209. package/docs/v6/importing/gherkin.mdx +0 -143
  210. package/docs/v6/importing/jira.mdx +0 -164
  211. package/docs/v6/importing/testrail.mdx +0 -162
  212. package/docs/v6/integrations/electron.mdx +0 -146
  213. package/docs/v6/integrations/netlify.mdx +0 -100
  214. package/docs/v6/integrations/vercel.mdx +0 -125
  215. package/docs/v6/interactive/explore.mdx +0 -99
  216. package/docs/v6/interactive/run.mdx +0 -52
  217. package/docs/v6/interactive/save.mdx +0 -63
  218. package/docs/v6/overview/comparison.mdx +0 -101
  219. package/docs/v6/overview/faq.mdx +0 -162
  220. package/docs/v6/overview/performance.mdx +0 -52
  221. package/docs/v6/overview/quickstart.mdx +0 -137
  222. package/docs/v6/overview/what-is-testdriver.mdx +0 -85
  223. package/docs/v6/scenarios/ai-chatbot.mdx +0 -28
  224. package/docs/v6/scenarios/cookie-banner.mdx +0 -32
  225. package/docs/v6/scenarios/file-upload.mdx +0 -33
  226. package/docs/v6/scenarios/form-filling.mdx +0 -32
  227. package/docs/v6/scenarios/log-in.mdx +0 -75
  228. package/docs/v6/scenarios/pdf-generation.mdx +0 -25
  229. package/docs/v6/scenarios/spell-check.mdx +0 -22
  230. package/docs/v6/security/action.mdx +0 -84
  231. package/docs/v6/security/agent.mdx +0 -73
  232. package/docs/v6/security/platform.mdx +0 -77
  233. package/docs/v6/tutorials/advanced-test.mdx +0 -81
  234. package/docs/v6/tutorials/basic-test.mdx +0 -45
  235. package/docs/v7/_drafts/agents.mdx +0 -852
  236. package/docs/v7/_drafts/architecture.mdx +0 -399
  237. package/docs/v7/_drafts/auto-cache-key.mdx +0 -167
  238. package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +0 -100
  239. package/docs/v7/_drafts/best-practices.mdx +0 -486
  240. package/docs/v7/_drafts/caching-ai.mdx +0 -215
  241. package/docs/v7/_drafts/caching-selectors.mdx +0 -424
  242. package/docs/v7/_drafts/caching.mdx +0 -366
  243. package/docs/v7/_drafts/cli-to-sdk-migration.mdx +0 -425
  244. package/docs/v7/_drafts/commands/assert.mdx +0 -45
  245. package/docs/v7/_drafts/commands/exec.mdx +0 -282
  246. package/docs/v7/_drafts/commands/focus-application.mdx +0 -44
  247. package/docs/v7/_drafts/commands/hover-image.mdx +0 -69
  248. package/docs/v7/_drafts/commands/hover-text.mdx +0 -47
  249. package/docs/v7/_drafts/commands/if.mdx +0 -53
  250. package/docs/v7/_drafts/commands/match-image.mdx +0 -67
  251. package/docs/v7/_drafts/commands/press-keys.mdx +0 -87
  252. package/docs/v7/_drafts/commands/remember.mdx +0 -49
  253. package/docs/v7/_drafts/commands/run.mdx +0 -44
  254. package/docs/v7/_drafts/commands/scroll-until-image.mdx +0 -66
  255. package/docs/v7/_drafts/commands/scroll-until-text.mdx +0 -60
  256. package/docs/v7/_drafts/commands/scroll.mdx +0 -69
  257. package/docs/v7/_drafts/commands/type.mdx +0 -45
  258. package/docs/v7/_drafts/commands/wait-for-image.mdx +0 -54
  259. package/docs/v7/_drafts/commands/wait-for-text.mdx +0 -48
  260. package/docs/v7/_drafts/commands/wait.mdx +0 -45
  261. package/docs/v7/_drafts/configuration.mdx +0 -378
  262. package/docs/v7/_drafts/contributing.mdx +0 -174
  263. package/docs/v7/_drafts/core.mdx +0 -458
  264. package/docs/v7/_drafts/dashcam-title-feature.mdx +0 -89
  265. package/docs/v7/_drafts/debugging.mdx +0 -349
  266. package/docs/v7/_drafts/error-handling.mdx +0 -501
  267. package/docs/v7/_drafts/faq.mdx +0 -393
  268. package/docs/v7/_drafts/hooks.mdx +0 -360
  269. package/docs/v7/_drafts/init-command.mdx +0 -95
  270. package/docs/v7/_drafts/installation.mdx +0 -420
  271. package/docs/v7/_drafts/migration.mdx +0 -562
  272. package/docs/v7/_drafts/observable.mdx +0 -604
  273. package/docs/v7/_drafts/playwright.mdx +0 -342
  274. package/docs/v7/_drafts/plugin-migration.mdx +0 -220
  275. package/docs/v7/_drafts/powerful.mdx +0 -419
  276. package/docs/v7/_drafts/presets.mdx +0 -210
  277. package/docs/v7/_drafts/progressive-disclosure.mdx +0 -230
  278. package/docs/v7/_drafts/prompt-cache.mdx +0 -200
  279. package/docs/v7/_drafts/provision.mdx +0 -390
  280. package/docs/v7/_drafts/quick-start-test-recording.mdx +0 -214
  281. package/docs/v7/_drafts/readme.mdx +0 -135
  282. package/docs/v7/_drafts/reports.mdx +0 -414
  283. package/docs/v7/_drafts/scalable.mdx +0 -754
  284. package/docs/v7/_drafts/screenshot.mdx +0 -155
  285. package/docs/v7/_drafts/sdk-awesome-logs.mdx +0 -468
  286. package/docs/v7/_drafts/sdk-browser-rendering.mdx +0 -167
  287. package/docs/v7/_drafts/sdk-migration.mdx +0 -474
  288. package/docs/v7/_drafts/sdk-v7-complete.mdx +0 -345
  289. package/docs/v7/_drafts/self-hosting.mdx +0 -369
  290. package/docs/v7/_drafts/test-recording.mdx +0 -382
  291. package/docs/v7/_drafts/troubleshooting.mdx +0 -526
  292. package/docs/v7/_drafts/vitest-plugin.mdx +0 -477
  293. package/docs/v7/_drafts/vitest.mdx +0 -535
  294. package/docs/v7/_drafts/writing-tests.mdx +0 -25
  295. package/docs/v7/examples.mdx +0 -5
  296. package/eslint.config.js +0 -67
  297. package/examples/ai.test.mjs +0 -30
  298. package/examples/assert.test.mjs +0 -46
  299. package/examples/captcha-api.test.mjs +0 -50
  300. package/examples/chrome-extension.test.mjs +0 -94
  301. package/examples/drag-and-drop.test.mjs +0 -58
  302. package/examples/element-not-found.test.mjs +0 -26
  303. package/examples/exec-output.test.mjs +0 -59
  304. package/examples/exec-pwsh.test.mjs +0 -57
  305. package/examples/focus-window.test.mjs +0 -36
  306. package/examples/formatted-logging.test.mjs +0 -26
  307. package/examples/hover-image.test.mjs +0 -52
  308. package/examples/hover-text-with-description.test.mjs +0 -56
  309. package/examples/hover-text.test.mjs +0 -27
  310. package/examples/installer.test.mjs +0 -49
  311. package/examples/launch-vscode-linux.test.mjs +0 -54
  312. package/examples/match-image.test.mjs +0 -54
  313. package/examples/no-provision.test.mjs +0 -23
  314. package/examples/press-keys.test.mjs +0 -50
  315. package/examples/prompt.test.mjs +0 -33
  316. package/examples/scroll-keyboard.test.mjs +0 -37
  317. package/examples/scroll-until-image.test.mjs +0 -39
  318. package/examples/scroll-until-text.test.mjs +0 -67
  319. package/examples/scroll.test.mjs +0 -41
  320. package/examples/type.test.mjs +0 -45
  321. package/examples/windows-installer.test.mjs +0 -53
  322. package/interfaces/cli/commands/edit.js +0 -3
  323. package/interfaces/cli/commands/generate.js +0 -3
  324. package/interfaces/cli/commands/run.js +0 -3
  325. package/interfaces/cli/utils/factory.js +0 -71
  326. package/jsconfig.json +0 -26
  327. package/manual/test-init-command.js +0 -223
  328. package/sdk-log-formatter.js +0 -930
  329. package/setup/aws/cloudformation.yaml +0 -470
  330. package/setup/aws/spawn-runner.sh +0 -190
  331. package/test/api-resilience.test.mjs +0 -0
  332. package/test/captcha-solver.test.mjs +0 -70
  333. package/test/chrome-remote-debugging.test.mjs +0 -66
  334. package/test/manual/debug-locate-response.js +0 -82
  335. package/test/manual/reconnect-provision.test.mjs +0 -49
  336. package/test/manual/test-console-logs.test.mjs +0 -42
  337. package/test/manual/test-find-api.js +0 -73
  338. package/test/manual/test-init.sh +0 -54
  339. package/test/manual/test-prompt-cache.js +0 -96
  340. package/test/manual/test-provision-auth.mjs +0 -22
  341. package/test/manual/test-sandbox-render.js +0 -28
  342. package/test/manual/test-sdk-methods.js +0 -15
  343. package/test/manual/test-sdk-refactor.js +0 -53
  344. package/test/manual/test-stack-trace.mjs +0 -57
  345. package/test/manual/verify-element-api.js +0 -89
  346. package/test/manual/verify-types.js +0 -0
  347. package/test/manual-unawaited-promise.test.mjs +0 -31
  348. package/testdriver-plugin/skills/actions/SKILL.md +0 -93
  349. package/testdriver-plugin/skills/assertions/SKILL.md +0 -77
  350. package/testdriver-plugin/skills/caching/SKILL.md +0 -66
  351. package/testdriver-plugin/skills/creating-tests/SKILL.md +0 -104
  352. package/testdriver-plugin/skills/finding-elements/SKILL.md +0 -77
  353. package/testdriver-plugin/skills/github-actions/SKILL.md +0 -100
  354. package/testdriver-plugin/skills/running-tests/SKILL.md +0 -77
  355. package/testdriver-plugin/skills/secrets/SKILL.md +0 -87
  356. package/testdriver-plugin/skills/self-hosting/SKILL.md +0 -89
  357. package/testdriver-plugin/skills/setup/SKILL.md +0 -76
  358. package/testdriver-plugin/skills/variables/SKILL.md +0 -88
  359. package/testdriver-plugin/skills/waiting/SKILL.md +0 -72
  360. package/vitest.config.mjs +0 -29
@@ -1,70 +0,0 @@
1
- /**
2
- * Unit tests for the captcha solver script
3
- * These tests verify the solver script is valid JavaScript and can be loaded correctly
4
- */
5
- import { describe, expect, it } from "vitest";
6
- import fs from "fs";
7
- import path from "path";
8
- import { fileURLToPath } from "url";
9
- import vm from "vm";
10
-
11
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
- const solverPath = path.join(__dirname, "..", "lib", "captcha", "solver.js");
13
-
14
- describe("Captcha Solver Script", () => {
15
- it("should exist", () => {
16
- expect(fs.existsSync(solverPath)).toBe(true);
17
- });
18
-
19
- it("should be valid JavaScript syntax", () => {
20
- const script = fs.readFileSync(solverPath, "utf8");
21
-
22
- // This will throw if the syntax is invalid
23
- expect(() => {
24
- new vm.Script(script, { filename: "solver.js" });
25
- }).not.toThrow();
26
- });
27
-
28
- it("should contain required functions and variables", () => {
29
- const script = fs.readFileSync(solverPath, "utf8");
30
-
31
- // Check for key components
32
- expect(script).toContain('require("https")');
33
- expect(script).toContain('require("chrome-remote-interface")');
34
- expect(script).toContain("detectCaptchaScript");
35
- expect(script).toContain("getInjectScript");
36
- expect(script).toContain("autoSubmitScript");
37
- expect(script).toContain("checkSuccessScript");
38
- expect(script).toContain("2captcha.com");
39
- });
40
-
41
- it("should handle all supported captcha types", () => {
42
- const script = fs.readFileSync(solverPath, "utf8");
43
-
44
- // Check for captcha type handling
45
- expect(script).toContain("recaptcha_v2");
46
- expect(script).toContain("recaptcha_v3");
47
- expect(script).toContain("hcaptcha");
48
- expect(script).toContain("turnstile");
49
- });
50
-
51
- it("should have proper auto-detection for captcha elements", () => {
52
- const script = fs.readFileSync(solverPath, "utf8");
53
-
54
- // Check for DOM selectors used in auto-detection
55
- expect(script).toContain(".g-recaptcha[data-sitekey]");
56
- expect(script).toContain(".h-captcha[data-sitekey]");
57
- expect(script).toContain(".cf-turnstile[data-sitekey]");
58
- expect(script).toContain("[data-sitekey]");
59
- });
60
-
61
- it("should properly inject tokens into response fields", () => {
62
- const script = fs.readFileSync(solverPath, "utf8");
63
-
64
- // Check for token injection selectors
65
- expect(script).toContain("[name=g-recaptcha-response]");
66
- expect(script).toContain("[name=h-captcha-response]");
67
- expect(script).toContain("[name=cf-turnstile-response]");
68
- expect(script).toContain("___grecaptcha_cfg");
69
- });
70
- });
@@ -1,66 +0,0 @@
1
- /**
2
- * Test that validates Chrome remote debugging is working
3
- * Installs chrome-remote-interface and connects to the active tab
4
- */
5
- import { describe, expect, it } from "vitest";
6
- import { TestDriver } from "../lib/vitest/hooks.mjs";
7
-
8
- describe("Chrome Remote Debugging", () => {
9
-
10
- it("should connect to Chrome via CDP and get page title", async (context) => {
11
- const testdriver = TestDriver(context);
12
-
13
- // Launch Chrome with a known URL
14
- await testdriver.provision.chrome({
15
- url: 'https://example.com',
16
- });
17
-
18
- // Take a screenshot to verify Chrome launched
19
- await testdriver.screenshot();
20
-
21
- // Install chrome-remote-interface (needs sudo for global install)
22
- const installResult = await testdriver.exec(
23
- 'sh',
24
- 'sudo npm install -g chrome-remote-interface',
25
- 60000
26
- );
27
- console.log('Install result:', installResult);
28
-
29
- // Write the CDP script to a file to avoid quoting issues
30
- const cdpScript = `
31
- const CDP = require('chrome-remote-interface');
32
- (async () => {
33
- try {
34
- const client = await CDP();
35
- const { Runtime } = client;
36
- const result = await Runtime.evaluate({
37
- expression: 'document.title'
38
- });
39
- console.log('PAGE_TITLE:' + result.result.value);
40
- await client.close();
41
- process.exit(0);
42
- } catch (err) {
43
- console.error('CDP_ERROR:' + err.message);
44
- process.exit(1);
45
- }
46
- })();
47
- `;
48
-
49
- // Write script to file
50
- await testdriver.exec('sh', `cat > /tmp/cdp-test.js << 'SCRIPT'
51
- ${cdpScript}
52
- SCRIPT`, 5000);
53
-
54
- // Run the CDP script with NODE_PATH set to find globally installed modules
55
- const cdpResult = await testdriver.exec(
56
- 'sh',
57
- 'NODE_PATH=/usr/lib/node_modules node /tmp/cdp-test.js 2>&1 || echo "CDP_EXIT_CODE:$?"',
58
- 30000
59
- );
60
- console.log('CDP result:', cdpResult);
61
-
62
- // Verify we got the page title
63
- expect(cdpResult).toContain('PAGE_TITLE:');
64
- expect(cdpResult).toContain('Example Domain');
65
- });
66
- });
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Debug script to inspect the full locate API response
5
- * Run this with: TD_API_KEY=your_key node debug-locate-response.js
6
- */
7
-
8
- const TestDriverSDK = require("./sdk.js");
9
-
10
- async function debugLocateResponse() {
11
- const client = new TestDriverSDK(process.env.TD_API_KEY);
12
-
13
- try {
14
- console.log("Connecting to sandbox (Linux)...");
15
- await client.connect({ headless: true });
16
-
17
- console.log("Opening a test page...");
18
- await client.focusApplication("Google Chrome");
19
- await client.type("https://example.com");
20
- await client.pressKeys(["enter"]);
21
-
22
- // Wait for page to load
23
- await new Promise((resolve) => setTimeout(resolve, 3000));
24
-
25
- console.log("\nFinding an element to inspect the response...");
26
- const element = await client.find("the heading that says Example Domain");
27
-
28
- console.log("\n=".repeat(60));
29
- console.log("FULL LOCATE API RESPONSE:");
30
- console.log("=".repeat(60));
31
-
32
- const response = element.getResponse();
33
- console.log(JSON.stringify(response, null, 2));
34
-
35
- console.log("\n=".repeat(60));
36
- console.log("RESPONSE KEYS:");
37
- console.log("=".repeat(60));
38
-
39
- if (response) {
40
- Object.keys(response).forEach((key) => {
41
- const value = response[key];
42
- const type = Array.isArray(value) ? "array" : typeof value;
43
- const preview =
44
- typeof value === "string" && value.length > 100
45
- ? `${value.substring(0, 100)}... (${value.length} chars)`
46
- : typeof value === "object"
47
- ? JSON.stringify(value)
48
- : value;
49
-
50
- console.log(` ${key} (${type}): ${preview}`);
51
- });
52
- }
53
-
54
- console.log("\n=".repeat(60));
55
- console.log("ELEMENT PROPERTIES:");
56
- console.log("=".repeat(60));
57
- console.log(" found:", element.found());
58
- console.log(" x:", element.x);
59
- console.log(" y:", element.y);
60
- console.log(" centerX:", element.centerX);
61
- console.log(" centerY:", element.centerY);
62
- console.log(" width:", element.width);
63
- console.log(" height:", element.height);
64
- console.log(" confidence:", element.confidence);
65
- console.log(" text:", element.text);
66
- console.log(" label:", element.label);
67
- console.log(
68
- " screenshot:",
69
- element.screenshot ? `${element.screenshot.length} chars` : null,
70
- );
71
- console.log(" boundingBox:", element.boundingBox);
72
-
73
- await client.disconnect();
74
- } catch (error) {
75
- console.error("Error:", error.message);
76
- console.error(error.stack);
77
- await client.disconnect();
78
- process.exit(1);
79
- }
80
- }
81
-
82
- debugLocateResponse();
@@ -1,49 +0,0 @@
1
- /**
2
- * TestDriver SDK - Reconnect Test Part 1: Provision
3
- *
4
- * This test provisions a new sandbox and navigates to the login page.
5
- * The sandbox ID is saved to .testdriver/last-sandbox for the next test.
6
- *
7
- * The sandbox has keepAlive: 120000 (2 minutes) after disconnect.
8
- * Run reconnect-signin.test.mjs within 2 minutes of this test completing.
9
- *
10
- * Usage:
11
- * 1. npm test -- examples/reconnect-provision.test.mjs
12
- * 2. (within 2 minutes) examples/reconnect-signin.test.mjs
13
- */
14
-
15
- import { afterAll, describe, expect, it } from "vitest";
16
- import { TestDriver } from "../../lib/vitest/hooks.mjs";
17
-
18
- describe("Reconnect Test - Part 1: Provision", () => {
19
-
20
- afterAll(async () => {
21
- // Explicitly DO NOT disconnect - we want the sandbox to stay alive
22
- // for the reconnect test. The sandbox will auto-terminate after keepAlive TTL.
23
- console.log("\n⚠️ NOT disconnecting - sandbox will stay alive for ~2 minutes (keepAlive: 120000)");
24
- console.log(" Run reconnect-signin.test.mjs within 2 minutes to test reconnect\n");
25
- });
26
-
27
- it("should provision sandbox and navigate to login page", async (context) => {
28
-
29
- const testdriver = TestDriver(context, { newSandbox: true, headless: false });
30
-
31
- // Provision Chrome and navigate to login page
32
- await testdriver.provision.chrome({
33
- url: 'http://testdriver-sandbox.vercel.app/login',
34
- });
35
-
36
-
37
- // Verify we're on the login page
38
- const result = await testdriver.assert("I can see a Sign In button");
39
- expect(result).toBeTruthy();
40
-
41
- // Get the sandbox ID that was saved
42
- const lastSandbox = testdriver.getLastSandboxId();
43
- console.log("\n✅ Sandbox provisioned:", lastSandbox?.sandboxId);
44
- console.log(" Sandbox info saved to .testdriver/last-sandbox");
45
-
46
- expect(lastSandbox).toBeTruthy();
47
- expect(lastSandbox.sandboxId).toBeTruthy();
48
- });
49
- });
@@ -1,42 +0,0 @@
1
- /**
2
- * TestDriver SDK - Console Log Test
3
- * Tests that console.log statements are captured and sent to dashcam
4
- */
5
-
6
- import { describe, expect, it } from "vitest";
7
- import { TestDriver } from "../../lib/vitest/hooks.mjs";
8
-
9
- describe("Console Log Test", () => {
10
- it("should capture console logs and send them to dashcam", async (context) => {
11
- console.log("🎬 Test starting - this should appear in dashcam");
12
-
13
- const testdriver = TestDriver(context, { headless: true });
14
- await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
15
-
16
- console.log("✅ Chrome launched successfully");
17
-
18
- // Give Chrome a moment to fully render the UI
19
- await new Promise(resolve => setTimeout(resolve, 2000));
20
-
21
- console.log("🔍 Looking for Sign In button");
22
-
23
- // Find and click the sign in button
24
- const signInButton = await testdriver.find(
25
- "Sign In, black button below the password field",
26
- );
27
-
28
- console.log("👆 Clicking Sign In button");
29
- await signInButton.click();
30
-
31
- console.log("🧪 Asserting error message appears");
32
-
33
- // Assert error shows
34
- const result = await testdriver.assert(
35
- "an error shows that fields are required",
36
- );
37
-
38
- console.log("✅ Test completed successfully - all logs should be in dashcam");
39
-
40
- expect(result).toBeTruthy();
41
- });
42
- });
@@ -1,73 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Quick test of the new find() API
5
- * This is a simple smoke test to verify the Element class works
6
- */
7
-
8
- const TestDriver = require("../sdk");
9
-
10
- async function testFindAPI() {
11
- console.log("Testing new find() API...\n");
12
-
13
- const client = new TestDriver("test-key", {
14
- logging: false,
15
- });
16
-
17
- // Test 1: Create element without connecting
18
- console.log("✓ Test 1: Creating Element instance");
19
- const element = client.find("test element");
20
- console.log(" Element description:", element.description);
21
- console.log(" Element found():", element.found());
22
- console.log(" Element coordinates:", element.getCoordinates());
23
-
24
- // Test 2: Verify element methods exist
25
- console.log("\n✓ Test 2: Verifying Element methods");
26
- console.log(" Has find():", typeof element.find === "function");
27
- console.log(" Has click():", typeof element.click === "function");
28
- console.log(" Has hover():", typeof element.hover === "function");
29
- console.log(
30
- " Has doubleClick():",
31
- typeof element.doubleClick === "function",
32
- );
33
- console.log(" Has rightClick():", typeof element.rightClick === "function");
34
- console.log(" Has mouseDown():", typeof element.mouseDown === "function");
35
- console.log(" Has mouseUp():", typeof element.mouseUp === "function");
36
- console.log(" Has found():", typeof element.found === "function");
37
- console.log(
38
- " Has getCoordinates():",
39
- typeof element.getCoordinates === "function",
40
- );
41
-
42
- // Test 3: Verify error handling for clicking unfound element
43
- console.log("\n✓ Test 3: Error handling for unfound element");
44
- try {
45
- await element.click();
46
- console.log(" ❌ Should have thrown error");
47
- } catch (error) {
48
- console.log(" ✓ Correctly throws error:", error.message);
49
- }
50
-
51
- // Test 4: Verify TypeScript types exist (if running from TypeScript)
52
- console.log("\n✓ Test 4: SDK methods");
53
- console.log(" Has find():", typeof client.find === "function");
54
- console.log(
55
- " Has deprecated hoverText():",
56
- typeof client.hoverText === "undefined" ? "not yet connected" : "exists",
57
- );
58
- console.log(
59
- " Has deprecated waitForText():",
60
- typeof client.waitForText === "undefined" ? "not yet connected" : "exists",
61
- );
62
-
63
- console.log("\n✅ All basic tests passed!");
64
- console.log(
65
- "\nNote: Full integration tests require connection to TestDriver sandbox.",
66
- );
67
- console.log("See examples/sdk-find-example.js for complete usage examples.");
68
- }
69
-
70
- testFindAPI().catch((error) => {
71
- console.error("Test failed:", error);
72
- process.exit(1);
73
- });
@@ -1,54 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Test script for the init command
4
- # Usage: ./test-init.sh
5
-
6
- set -e
7
-
8
- echo "🧪 Testing testdriverai init command..."
9
- echo ""
10
-
11
- # Cleanup function
12
- cleanup() {
13
- echo "🧹 Cleaning up test directories..."
14
- rm -rf /tmp/testdriver-test-*
15
- }
16
-
17
- trap cleanup EXIT
18
-
19
- # Test 1: Full init with all features
20
- echo "1️⃣ Testing full initialization (package.json, tests, workflow, npm install)..."
21
- cd /tmp
22
- mkdir -p testdriver-test-init
23
- cd testdriver-test-init
24
- node /Users/ianjennings/Development/cli/bin/testdriverai.js init
25
- echo ""
26
- echo "✅ Files created:"
27
- find . -type f -not -path "./node_modules/*" | sort
28
- echo ""
29
- echo "📄 package.json:"
30
- cat package.json
31
- echo ""
32
- echo "📄 vitest.config.js:"
33
- cat vitest.config.js
34
- echo ""
35
- echo "📄 GitHub workflow:"
36
- cat .github/workflows/testdriver.yml
37
- echo ""
38
- echo "📄 First 15 lines of tests/example.test.js:"
39
- head -15 tests/example.test.js
40
- echo ""
41
- echo "📦 Installed dependencies:"
42
- npm list --depth=0
43
- echo ""
44
- echo "---"
45
- echo ""
46
-
47
- # Test 2: Help command
48
- echo "2️⃣ Testing help command..."
49
- node /Users/ianjennings/Development/cli/bin/testdriverai.js init --help
50
- echo ""
51
- echo "---"
52
- echo ""
53
-
54
- echo "✅ All tests passed!"
@@ -1,96 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Simple test to verify prompt caching functionality
5
- *
6
- * This test demonstrates that:
7
- * 1. First .prompt() call makes an API request and caches the YAML response
8
- * 2. Second .prompt() call with the same prompt uses the cached YAML
9
- * 3. Cache can be disabled with TD_NO_PROMPT_CACHE=true
10
- */
11
-
12
- const TestDriver = require("./sdk.js");
13
- const promptCache = require("./agent/lib/cache.js");
14
-
15
- async function testPromptCache() {
16
- console.log("Testing prompt caching functionality...\n");
17
-
18
- const client = new TestDriver(process.env.TD_API_KEY, {
19
- os: "linux",
20
- logging: true,
21
- });
22
-
23
- try {
24
- // Connect to sandbox
25
- console.log("Connecting to sandbox...");
26
- await client.connect();
27
- console.log("Connected!\n");
28
-
29
- const testPrompt = "click the search button";
30
-
31
- // Clear cache for this prompt to start fresh
32
- const cachePath = promptCache.getCachePath(testPrompt);
33
- console.log(`Cache path for "${testPrompt}": ${cachePath}\n`);
34
-
35
- // Test 1: First call (should make API request and cache)
36
- console.log("Test 1: First .ai() call (should cache the response)");
37
- const stats1 = promptCache.getCacheStats();
38
- console.log(`Cache before: ${stats1.count} files`);
39
-
40
- await client.ai(testPrompt);
41
-
42
- const stats2 = promptCache.getCacheStats();
43
- console.log(`Cache after: ${stats2.count} files`);
44
- console.log(
45
- `Cache hit: ${promptCache.hasCache(testPrompt) ? "YES" : "NO"}\n`,
46
- );
47
-
48
- // Test 2: Second call (should use cache)
49
- console.log(
50
- "Test 2: Second .ai() call with same prompt (should use cache)",
51
- );
52
- console.log('Look for "(using cached response)" message above...\n');
53
- await client.ai(testPrompt);
54
-
55
- // Test 3: Third call with cache disabled (should make API call)
56
- console.log(
57
- "\nTest 3: Third .ai() call with cache=false (should bypass cache)",
58
- );
59
- await client.ai(testPrompt, false);
60
-
61
- // Test 4: Show cache contents
62
- console.log("\nTest 4: Cache contents");
63
- const cachedYaml = promptCache.readCache(testPrompt);
64
- if (cachedYaml) {
65
- console.log("Cached YAML preview (first 500 chars):");
66
- console.log(cachedYaml.substring(0, 500));
67
- console.log("...\n");
68
- }
69
-
70
- // Test 5: Cache statistics
71
- console.log("Test 5: Cache statistics");
72
- const finalStats = promptCache.getCacheStats();
73
- console.log(`Total cached prompts: ${finalStats.count}`);
74
- console.log(`Cache files:`, finalStats.files.slice(0, 5));
75
-
76
- console.log("\n✅ Prompt caching test completed!");
77
- console.log("\nTo disable caching, pass false: client.ai(prompt, false)");
78
- console.log("To clear cache, delete .testdriver/.cache/*.yaml files");
79
- } catch (error) {
80
- console.error("❌ Test failed:", error.message);
81
- throw error;
82
- } finally {
83
- // Disconnect
84
- await client.disconnect();
85
- }
86
- }
87
-
88
- // Run the test
89
- if (require.main === module) {
90
- testPromptCache().catch((error) => {
91
- console.error("Test error:", error);
92
- process.exit(1);
93
- });
94
- }
95
-
96
- module.exports = testPromptCache;
@@ -1,22 +0,0 @@
1
- /**
2
- * Quick test to verify provision() authentication works
3
- */
4
-
5
- import { test } from 'vitest';
6
- import { provision } from '../../lib/presets/index.mjs';
7
-
8
- test('provision auth test', async (context) => {
9
- console.log('Starting provision...');
10
-
11
- const { testdriver, dashcam } = await provision('chrome', {
12
- url: 'http://testdriver-sandbox.vercel.app/',
13
- }, context);
14
-
15
- console.log('✅ Provision complete!');
16
- console.log('TestDriver:', testdriver);
17
- console.log('Dashcam:', dashcam);
18
-
19
- // Try a simple find
20
- const result = await testdriver.find('any element');
21
- console.log('Find result:', result);
22
- });
@@ -1,28 +0,0 @@
1
- const TestDriver = require("./sdk.js");
2
-
3
- async function test() {
4
- console.log("Testing sandbox rendering...");
5
-
6
- const client = new TestDriver(process.env.TD_API_KEY, {
7
- os: process.env.TEST_PLATFORM || "linux",
8
- headless: false, // Should open browser
9
- logging: true,
10
- });
11
-
12
- try {
13
- console.log("Connecting to sandbox...");
14
- const instance = await client.connect();
15
- console.log("Connected to instance:", instance);
16
-
17
- // Wait a bit to see if browser opens
18
- await new Promise((resolve) => setTimeout(resolve, 5000));
19
-
20
- await client.disconnect();
21
- console.log("Test completed successfully");
22
- } catch (error) {
23
- console.error("Test failed:", error);
24
- process.exit(1);
25
- }
26
- }
27
-
28
- test();
@@ -1,15 +0,0 @@
1
- const SDK = require("./sdk.js");
2
-
3
- const client = new SDK("test-key");
4
-
5
- // Get all public methods (non-private, non-constructor)
6
- const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(client))
7
- .filter((m) => !m.startsWith("_") && m !== "constructor")
8
- .sort();
9
-
10
- console.log("Public SDK Methods:");
11
- console.log(methods.join(", "));
12
- console.log("\nTotal:", methods.length, "methods");
13
-
14
- // Check if commands will be set up after connect
15
- console.log("\nCommands before connect:", client.commands);
@@ -1,53 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Quick test to verify SDK refactoring works correctly
5
- */
6
-
7
- const TestDriver = require("./sdk.js");
8
-
9
- async function test() {
10
- console.log("Testing SDK refactor...\n");
11
-
12
- // Test 1: SDK construction
13
- console.log("✓ Test 1: Creating SDK instance");
14
- const client = new TestDriver(process.env.TD_API_KEY || "test-key", {
15
- logging: false,
16
- });
17
-
18
- console.log(" - agent exists:", !!client.agent);
19
- console.log(" - emitter exists:", !!client.emitter);
20
- console.log(" - config exists:", !!client.config);
21
- console.log(" - session exists:", !!client.session);
22
- console.log(" - apiClient exists:", !!client.apiClient);
23
- console.log(" - analytics exists:", !!client.analytics);
24
- console.log(" - sandbox exists:", !!client.sandbox);
25
- console.log(" - system exists:", !!client.system);
26
-
27
- // Test 2: Check agent methods are accessible
28
- console.log("\n✓ Test 2: Checking agent methods");
29
- console.log(
30
- " - agent.exploratoryLoop exists:",
31
- typeof client.agent.exploratoryLoop,
32
- );
33
- console.log(" - agent.buildEnv exists:", typeof client.agent.buildEnv);
34
- console.log(
35
- " - agent.getRecentSandboxId exists:",
36
- typeof client.agent.getRecentSandboxId,
37
- );
38
-
39
- // Test 3: Check SDK methods
40
- console.log("\n✓ Test 3: Checking SDK methods");
41
- console.log(" - ai() exists:", typeof client.ai);
42
- console.log(" - auth() exists:", typeof client.auth);
43
- console.log(" - connect() exists:", typeof client.connect);
44
- console.log(" - disconnect() exists:", typeof client.disconnect);
45
-
46
- console.log("\n✅ All basic tests passed!");
47
- }
48
-
49
- test().catch((error) => {
50
- console.error("\n❌ Test failed:", error.message);
51
- console.error(error.stack);
52
- process.exit(1);
53
- });