testeiya 0.2.1 → 0.3.10

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 (402) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +284 -171
  3. package/dist/prompt/context.js +79 -0
  4. package/dist/prompt/context.js.map +1 -0
  5. package/dist/prompt/index.js +60 -0
  6. package/dist/prompt/index.js.map +1 -0
  7. package/dist/prompt/print.js +30 -0
  8. package/dist/prompt/print.js.map +1 -0
  9. package/dist/prompt/project-info.js +2 -0
  10. package/dist/prompt/project-info.js.map +1 -0
  11. package/{src/prompt/system-prompt.ts → dist/prompt/system-prompt.js} +38 -25
  12. package/dist/prompt/system-prompt.js.map +1 -0
  13. package/dist/prompt/testomatio.js +264 -0
  14. package/dist/prompt/testomatio.js.map +1 -0
  15. package/dist/prompt/tools.js +57 -0
  16. package/dist/prompt/tools.js.map +1 -0
  17. package/dist/prompt/vocab.js +8 -0
  18. package/dist/prompt/vocab.js.map +1 -0
  19. package/dist/src/args.js +172 -0
  20. package/dist/src/args.js.map +1 -0
  21. package/dist/src/cli.js +97 -0
  22. package/dist/src/cli.js.map +1 -0
  23. package/dist/src/doctor.js +186 -0
  24. package/dist/src/doctor.js.map +1 -0
  25. package/dist/src/env.js +93 -0
  26. package/dist/src/env.js.map +1 -0
  27. package/dist/src/mcp-extension.js +9 -0
  28. package/dist/src/mcp-extension.js.map +1 -0
  29. package/dist/src/mcp.js +139 -0
  30. package/dist/src/mcp.js.map +1 -0
  31. package/dist/src/model.js +71 -0
  32. package/dist/src/model.js.map +1 -0
  33. package/dist/src/models.js +38 -0
  34. package/dist/src/models.js.map +1 -0
  35. package/dist/src/output.js +185 -0
  36. package/dist/src/output.js.map +1 -0
  37. package/dist/src/result.js +41 -0
  38. package/dist/src/result.js.map +1 -0
  39. package/dist/src/run.js +291 -0
  40. package/dist/src/run.js.map +1 -0
  41. package/dist/src/session.js +92 -0
  42. package/dist/src/session.js.map +1 -0
  43. package/dist/src/sessions.js +61 -0
  44. package/dist/src/sessions.js.map +1 -0
  45. package/dist/vendor/mcp.js +14801 -0
  46. package/mcp-tools.json +2967 -0
  47. package/package.json +34 -43
  48. package/prompt/context.ts +101 -0
  49. package/prompt/index.ts +102 -0
  50. package/prompt/print.ts +32 -0
  51. package/prompt/project-info.ts +30 -0
  52. package/prompt/system-prompt.ts +187 -0
  53. package/{src/prompt → prompt}/testomatio.ts +120 -9
  54. package/prompt/tools.ts +57 -0
  55. package/prompt/vocab.ts +7 -0
  56. package/skills/codeceptjs/ci-fix-tests/SKILL.md +7 -8
  57. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +47 -64
  58. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +56 -47
  59. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +144 -106
  60. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +50 -57
  61. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +88 -196
  62. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +4 -5
  63. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +25 -36
  64. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +23 -36
  65. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +23 -36
  66. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +23 -35
  67. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +50 -53
  68. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +87 -191
  69. package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/SKILL.md +1 -1
  70. package/{skills.lock.json → skills/skills.lock.json} +43 -36
  71. package/skills/skills.yaml +34 -0
  72. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +49 -61
  73. package/skills/testomatio/explorbot/explorbot-fundamentals/references/no-install.md +36 -0
  74. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +20 -7
  75. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +41 -289
  76. package/skills/testomatio/qa-process/qa-explain-behavior/SKILL.md +111 -0
  77. package/skills/testomatio/qa-process/qa-explain-behavior/references/answer-shapes.md +116 -0
  78. package/skills/testomatio/qa-process/qa-explain-behavior/references/examples.md +157 -0
  79. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/SKILL.md +91 -0
  80. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/references/output-format.md +71 -0
  81. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +227 -0
  82. package/skills/testomatio/test-automation/qa-data-seeder/SKILL.md +83 -0
  83. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +5 -3
  84. package/skills/testomatio/test-automation/setup-change-aware-pr-testing/SKILL.md +190 -0
  85. package/skills/testomatio/test-automation/setup-ci-automation/SKILL.md +76 -0
  86. package/skills/testomatio/test-management/qa-split-testing-levels-pyramid/SKILL.md +55 -0
  87. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/SKILL.md +220 -0
  88. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/references/qa-sprint-report.md +126 -0
  89. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +1 -1
  90. package/skills/testomatio/test-management/qa-thinking/SKILL.md +25 -25
  91. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +14 -1
  92. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +8 -0
  93. package/assets/testeiya-logo-dark.svg +0 -16
  94. package/assets/testeiya-logo.svg +0 -15
  95. package/models.catalog.json +0 -6963
  96. package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
  97. package/skills/playwright-best-practices-skill/README.md +0 -147
  98. package/skills/testeiya/README.md +0 -29
  99. package/skills/testeiya/answer-formatting/SKILL.md +0 -30
  100. package/skills/testeiya/check-cucumber/SKILL.md +0 -200
  101. package/skills/testeiya/check-tests/SKILL.md +0 -260
  102. package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
  103. package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
  104. package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
  105. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
  106. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
  107. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
  108. package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
  109. package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
  110. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
  111. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
  112. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
  113. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
  114. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
  115. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
  116. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
  117. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
  118. package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
  119. package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
  120. package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
  121. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
  122. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
  123. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
  124. package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
  125. package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
  126. package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
  127. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
  128. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
  129. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
  130. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
  131. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
  132. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
  133. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
  134. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
  135. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
  136. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
  137. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
  138. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
  139. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
  140. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
  141. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
  142. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
  143. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
  144. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
  145. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
  146. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
  147. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
  148. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
  149. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
  150. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
  151. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
  152. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
  153. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
  154. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
  155. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
  156. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
  157. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
  158. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
  159. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
  160. package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
  161. package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
  162. package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
  163. package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
  164. package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
  165. package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
  166. package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
  167. package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
  168. package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
  169. package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
  170. package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
  171. package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
  172. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
  173. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
  174. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
  175. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
  176. package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
  177. package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
  178. package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
  179. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
  180. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
  181. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
  182. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
  183. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
  184. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
  185. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
  186. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
  187. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
  188. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
  189. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
  190. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
  191. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
  192. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
  193. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
  194. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
  195. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
  196. package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
  197. package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
  198. package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
  199. package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
  200. package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
  201. package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
  202. package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
  203. package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
  204. package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
  205. package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
  206. package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
  207. package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
  208. package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
  209. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
  210. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
  211. package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
  212. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
  213. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
  214. package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
  215. package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
  216. package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
  217. package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
  218. package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
  219. package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
  220. package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
  221. package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
  222. package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
  223. package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
  224. package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
  225. package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
  226. package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
  227. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
  228. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
  229. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
  230. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
  231. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
  232. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
  233. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
  234. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
  235. package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
  236. package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
  237. package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
  238. package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
  239. package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
  240. package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
  241. package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
  242. package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
  243. package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
  244. package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
  245. package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
  246. package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
  247. package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
  248. package/skills.yaml +0 -21
  249. package/src/ai-debug.ts +0 -188
  250. package/src/api/agent-get.ts +0 -22
  251. package/src/api/agent-start.ts +0 -384
  252. package/src/api/client-log.ts +0 -29
  253. package/src/api/context.ts +0 -332
  254. package/src/api/debug-layout.ts +0 -47
  255. package/src/api/debug-report.ts +0 -29
  256. package/src/api/debug-snapshot.ts +0 -30
  257. package/src/api/debug-stream.ts +0 -52
  258. package/src/api/files-delete.ts +0 -184
  259. package/src/api/files-read.ts +0 -41
  260. package/src/api/files-rename.ts +0 -99
  261. package/src/api/files-tree.ts +0 -292
  262. package/src/api/files-write.ts +0 -41
  263. package/src/api/mcp.ts +0 -603
  264. package/src/api/memory.ts +0 -69
  265. package/src/api/open-external.ts +0 -39
  266. package/src/api/playwright-cli.ts +0 -606
  267. package/src/api/providers.ts +0 -457
  268. package/src/api/read-env-token.ts +0 -33
  269. package/src/api/sessions.ts +0 -79
  270. package/src/api/settings.ts +0 -120
  271. package/src/api/skills.ts +0 -58
  272. package/src/api/testomatio-attachment.ts +0 -89
  273. package/src/api/testomatio-auth.ts +0 -284
  274. package/src/api/testomatio-proxy.ts +0 -197
  275. package/src/api/testomatio-run-stats.ts +0 -81
  276. package/src/api/testomatio-target.ts +0 -225
  277. package/src/api/testomatio-transcription.ts +0 -82
  278. package/src/api/workspace-search.ts +0 -96
  279. package/src/api/workspace-sync.ts +0 -151
  280. package/src/api/workspace.ts +0 -165
  281. package/src/app-server.ts +0 -556
  282. package/src/bridge.ts +0 -251
  283. package/src/check-tests.ts +0 -156
  284. package/src/cli.ts +0 -17
  285. package/src/commands.ts +0 -244
  286. package/src/config.ts +0 -183
  287. package/src/connection.ts +0 -658
  288. package/src/context-store.ts +0 -265
  289. package/src/debug-bus.ts +0 -405
  290. package/src/extensions/tool-gate.ts +0 -220
  291. package/src/extensions/webui/ask-channel.ts +0 -52
  292. package/src/extensions/webui/index.ts +0 -184
  293. package/src/extensions/webui/tools/ask-question.ts +0 -88
  294. package/src/extensions/webui/tools/query-result.ts +0 -79
  295. package/src/extensions/webui/tools/render-chart.ts +0 -53
  296. package/src/extensions/webui/tools/render-item.ts +0 -61
  297. package/src/extensions/webui/tools/render-list.ts +0 -170
  298. package/src/extensions/webui/tools/render-result.ts +0 -85
  299. package/src/extensions/webui/tools/render-tree.ts +0 -71
  300. package/src/extensions/webui/tools/ui-widget.ts +0 -54
  301. package/src/extensions/webui/tools/widget-result.ts +0 -13
  302. package/src/extensions/webui/widget-channel.ts +0 -50
  303. package/src/file-log.ts +0 -196
  304. package/src/git-tracked.ts +0 -68
  305. package/src/gitignore.ts +0 -53
  306. package/src/json-store.ts +0 -43
  307. package/src/load-env.ts +0 -70
  308. package/src/loader-style.ts +0 -96
  309. package/src/main.ts +0 -140
  310. package/src/mcp-catalog.ts +0 -96
  311. package/src/models-catalog.ts +0 -72
  312. package/src/permissions.ts +0 -120
  313. package/src/project-dir.ts +0 -189
  314. package/src/project-info.ts +0 -108
  315. package/src/prompt/app-ui.ts +0 -59
  316. package/src/prompt/browser.ts +0 -27
  317. package/src/prompt/index.ts +0 -62
  318. package/src/prompt/tools.ts +0 -27
  319. package/src/server-info.ts +0 -62
  320. package/src/session-factory.ts +0 -442
  321. package/src/session-store.ts +0 -115
  322. package/src/shell-env.ts +0 -45
  323. package/src/skills.ts +0 -163
  324. package/src/sync-snapshot.ts +0 -140
  325. package/src/telemetry.ts +0 -239
  326. package/src/testomatio-auth.ts +0 -299
  327. package/src/testomatio.ts +0 -98
  328. package/src/theme.ts +0 -30
  329. package/src/user-env.ts +0 -94
  330. package/src/welcome.ts +0 -194
  331. package/src/workspace/safe-path.ts +0 -85
  332. package/src/workspace/test-md.ts +0 -70
  333. package/src/workspace-model.ts +0 -440
  334. package/testeiya.config.json +0 -14
  335. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication-flows.md +0 -0
  336. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication.md +0 -0
  337. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/clock-mocking.md +0 -0
  338. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/mobile-testing.md +0 -0
  339. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-context.md +0 -0
  340. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-user.md +0 -0
  341. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/network-advanced.md +0 -0
  342. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/third-party.md +0 -0
  343. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/pom-vs-fixtures.md +0 -0
  344. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/test-architecture.md +0 -0
  345. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/when-to-mock.md +0 -0
  346. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/browser-apis.md +0 -0
  347. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/iframes.md +0 -0
  348. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/service-workers.md +0 -0
  349. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/websockets.md +0 -0
  350. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/annotations.md +0 -0
  351. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/assertions-waiting.md +0 -0
  352. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/configuration.md +0 -0
  353. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/fixtures-hooks.md +0 -0
  354. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/global-setup.md +0 -0
  355. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/locators.md +0 -0
  356. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/page-object-model.md +0 -0
  357. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/projects-dependencies.md +0 -0
  358. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-data.md +0 -0
  359. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-suite-structure.md +0 -0
  360. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-tags.md +0 -0
  361. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/console-errors.md +0 -0
  362. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/debugging.md +0 -0
  363. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/error-testing.md +0 -0
  364. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/flaky-tests.md +0 -0
  365. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/angular.md +0 -0
  366. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/nextjs.md +0 -0
  367. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/react.md +0 -0
  368. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/vue.md +0 -0
  369. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/ci-cd.md +0 -0
  370. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/docker.md +0 -0
  371. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/github-actions.md +0 -0
  372. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/gitlab.md +0 -0
  373. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/other-providers.md +0 -0
  374. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/parallel-sharding.md +0 -0
  375. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/performance.md +0 -0
  376. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/reporting.md +0 -0
  377. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/test-coverage.md +0 -0
  378. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/accessibility.md +0 -0
  379. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/api-testing.md +0 -0
  380. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/browser-extensions.md +0 -0
  381. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/canvas-webgl.md +0 -0
  382. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/component-testing.md +0 -0
  383. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/drag-drop.md +0 -0
  384. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/electron.md +0 -0
  385. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-operations.md +0 -0
  386. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-upload-download.md +0 -0
  387. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/forms-validation.md +0 -0
  388. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/graphql-testing.md +0 -0
  389. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/i18n.md +0 -0
  390. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/performance-testing.md +0 -0
  391. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/security-testing.md +0 -0
  392. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/visual-regression.md +0 -0
  393. /package/skills/{playwright-cli → playwright/playwright-cli}/SKILL.md +0 -0
  394. /package/skills/{playwright-cli → playwright/playwright-cli}/references/element-attributes.md +0 -0
  395. /package/skills/{playwright-cli → playwright/playwright-cli}/references/playwright-tests.md +0 -0
  396. /package/skills/{playwright-cli → playwright/playwright-cli}/references/request-mocking.md +0 -0
  397. /package/skills/{playwright-cli → playwright/playwright-cli}/references/running-code.md +0 -0
  398. /package/skills/{playwright-cli → playwright/playwright-cli}/references/session-management.md +0 -0
  399. /package/skills/{playwright-cli → playwright/playwright-cli}/references/storage-state.md +0 -0
  400. /package/skills/{playwright-cli → playwright/playwright-cli}/references/test-generation.md +0 -0
  401. /package/skills/{playwright-cli → playwright/playwright-cli}/references/tracing.md +0 -0
  402. /package/skills/{playwright-cli → playwright/playwright-cli}/references/video-recording.md +0 -0
@@ -0,0 +1,172 @@
1
+ import { parseArgs } from "node:util";
2
+ export const WELCOME = `
3
+ Testeiya, an AI testing agent.
4
+
5
+ testeiya task "analyze this pr and find inconsistencies"
6
+ testeiya ask "is this feature ready"
7
+
8
+ testeiya doctor check your setup
9
+ testeiya --help options and environment
10
+ testeiya help the full guide
11
+ `;
12
+ export const USAGE = `testeiya, an AI testing agent
13
+
14
+ Usage:
15
+ testeiya task "<task>" run one task and write a report
16
+ testeiya ask "<question>" answer a question
17
+ testeiya doctor check what a run would resolve
18
+ testeiya models [pattern] list the models your key can reach
19
+ testeiya sessions list saved sessions for this folder
20
+
21
+ Options:
22
+ -o, --output <dest> report destination, repeatable: file.md, file.json, gh:pr-comment
23
+ --model <id> provider/model to run
24
+ --project <id> Testomat.io project id
25
+ -c, --continue continue the last session in this folder
26
+ --resume <id> continue that session
27
+ --name <label> name the session
28
+ --no-session do not save the session
29
+ --json machine-readable output
30
+ --probe doctor only: test the key with one request
31
+ -h, --help show this
32
+ -v, --version show version
33
+
34
+ Environment:
35
+ TESTEIYA_MODEL model to run, e.g. openrouter/anthropic/claude-sonnet-5
36
+ OPENROUTER_API_KEY provider key, also ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY
37
+ TESTOMATIO Testomat.io project API key
38
+ TESTOMATIO_PROJECT_ID Testomat.io project id, same as --project
39
+ TESTOMATIO_URL Testomat.io base url, for self-hosted
40
+
41
+ Run "testeiya help" for the full guide.`;
42
+ export const HELP = `${USAGE}
43
+
44
+ Running a task
45
+
46
+ The agent runs one task and exits. There is no interactive mode. Progress and
47
+ errors go to stderr, so a run drops into CI as-is.
48
+
49
+ A task can also come from stdin: cat task.md | testeiya task
50
+ A task starting with "-" must follow "--": testeiya task -- "-weird task"
51
+
52
+ Exit codes: 0 pass, 1 failed run or negative verdict, 2 bad usage, 130 interrupted.
53
+
54
+ Where the report goes
55
+
56
+ --output names a destination and can repeat. Without one the report goes to
57
+ stdout. --json prints the run envelope to stdout instead.
58
+
59
+ report.md the agent writes the report there
60
+ run.json the run envelope: verdict, reason, report, tokens, session id
61
+ gh:pr-comment posted on this branch's pull request, through the GitHub CLI
62
+ gh:pr#123 posted on that pull request
63
+
64
+ Every destination is checked before the run starts, so a missing gh costs no
65
+ tokens.
66
+
67
+ Models and keys
68
+
69
+ There is no default model. Pass --model or set TESTEIYA_MODEL. A resumed run
70
+ reuses its session's model. "testeiya models" lists what your key can reach.
71
+
72
+ The provider key comes from the environment, from ~/.testeiya/.env, or from
73
+ ~/.testeiya/auth.json, which is the file the desktop app's Settings dialog
74
+ writes.
75
+
76
+ Sessions
77
+
78
+ Runs are saved under ~/.testeiya, so a follow-up picks up where the last one
79
+ stopped. -c continues the last session in this folder, --resume <id> picks
80
+ another, --name labels one, and --no-session saves nothing.
81
+
82
+ Testomat.io
83
+
84
+ Set TESTOMATIO to a project API key and the agent reads and writes that
85
+ project's tests, suites, runs and plans through check-tests and the REST API.
86
+ Add the project id, with --project or TESTOMATIO_PROJECT_ID, and it also gets
87
+ the Testomat.io tools. The MCP server needs the id: a token alone does not say
88
+ which project to talk to.`;
89
+ export const COMMANDS = ["task", "ask", "models", "doctor", "sessions", "help"];
90
+ export function parseCliArgs(argv) {
91
+ const first = argv[0];
92
+ if (!first)
93
+ return { command: "welcome" };
94
+ if (first === "-h" || first === "--help")
95
+ return { command: "usage" };
96
+ if (first === "-v" || first === "--version")
97
+ return { command: "version" };
98
+ if (!isCommand(first))
99
+ return { error: unknownCommand(first) };
100
+ if (first === "help")
101
+ return { command: "help" };
102
+ const options = OPTIONS[first];
103
+ let parsed;
104
+ try {
105
+ parsed = parseArgs({ args: argv.slice(1), options, allowPositionals: true, strict: true });
106
+ }
107
+ catch (err) {
108
+ if (err instanceof Error)
109
+ return { error: err.message };
110
+ return { error: String(err) };
111
+ }
112
+ const values = parsed.values;
113
+ if (values.help)
114
+ return { command: "usage" };
115
+ const args = { command: first };
116
+ const text = parsed.positionals.join(" ").trim();
117
+ if ((first === "task" || first === "ask") && text)
118
+ args.prompt = text;
119
+ if (first === "models" && text)
120
+ args.pattern = text;
121
+ if (Array.isArray(values.output))
122
+ args.outputs = values.output;
123
+ if (values.json)
124
+ args.json = true;
125
+ if (values.probe)
126
+ args.probe = true;
127
+ if (typeof values.model === "string")
128
+ args.model = values.model;
129
+ if (typeof values.project === "string")
130
+ args.project = values.project;
131
+ if (values.continue)
132
+ args.continueLast = true;
133
+ if (typeof values.resume === "string")
134
+ args.resume = values.resume;
135
+ if (typeof values.name === "string")
136
+ args.name = values.name;
137
+ if (values["no-session"])
138
+ args.noSession = true;
139
+ return args;
140
+ }
141
+ const HELP_FLAG = { type: "boolean", short: "h" };
142
+ const JSON_FLAG = { type: "boolean" };
143
+ const RUN_OPTIONS = {
144
+ output: { type: "string", short: "o", multiple: true },
145
+ json: JSON_FLAG,
146
+ model: { type: "string" },
147
+ project: { type: "string" },
148
+ continue: { type: "boolean", short: "c" },
149
+ resume: { type: "string" },
150
+ name: { type: "string" },
151
+ "no-session": { type: "boolean" },
152
+ help: HELP_FLAG,
153
+ };
154
+ const OPTIONS = {
155
+ task: RUN_OPTIONS,
156
+ ask: RUN_OPTIONS,
157
+ models: { json: JSON_FLAG, help: HELP_FLAG },
158
+ doctor: { json: JSON_FLAG, probe: { type: "boolean" }, model: { type: "string" }, help: HELP_FLAG },
159
+ sessions: { json: JSON_FLAG, help: HELP_FLAG },
160
+ help: {},
161
+ };
162
+ function isCommand(value) {
163
+ return COMMANDS.includes(value);
164
+ }
165
+ // The task used to be the first positional, so a bare prompt is the mistake to
166
+ // expect. Name the fix rather than printing the whole usage at them.
167
+ function unknownCommand(value) {
168
+ if (value.startsWith("-"))
169
+ return `unknown option "${value}"`;
170
+ return `unknown command "${value}" — did you mean: testeiya task "${value}"`;
171
+ }
172
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAC;AAE5D,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;CAStB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA6BmB,CAAC;AAEzC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA8CA,CAAC;AAE7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,KAAK,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,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,mBAAmB,KAAK,GAAG,CAAC;IAC9D,OAAO,oBAAoB,KAAK,qCAAqC,KAAK,GAAG,CAAC;AAChF,CAAC"}
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import { HELP, parseCliArgs, USAGE, WELCOME } from "./args.js";
5
+ import { runDoctor } from "./doctor.js";
6
+ import { loadEnvFiles, PACKAGE_ROOT } from "./env.js";
7
+ import { UsageError } from "./model.js";
8
+ import { runModels } from "./models.js";
9
+ import { parseDestinations, preflight } from "./output.js";
10
+ import { runPrint } from "./run.js";
11
+ import { openSessionManager, runSessions } from "./sessions.js";
12
+ main(process.argv.slice(2)).catch((err) => {
13
+ process.stderr.write(`${err?.message ?? err}\n`);
14
+ process.exit(1);
15
+ });
16
+ async function main(argv) {
17
+ process.title = "testeiya";
18
+ const args = parseCliArgs(argv);
19
+ if (args.error) {
20
+ process.stderr.write(`${args.error}\n\n${USAGE}\n`);
21
+ process.exit(2);
22
+ }
23
+ if (args.command === "welcome") {
24
+ process.stdout.write(`${WELCOME}\n`);
25
+ return;
26
+ }
27
+ if (args.command === "usage") {
28
+ process.stdout.write(`${USAGE}\n`);
29
+ return;
30
+ }
31
+ if (args.command === "help") {
32
+ process.stdout.write(`${HELP}\n`);
33
+ return;
34
+ }
35
+ if (args.command === "version") {
36
+ process.stdout.write(`${version()}\n`);
37
+ return;
38
+ }
39
+ const envSources = loadEnvFiles();
40
+ // --project is a spelling of the env var the MCP server needs, so the rest of
41
+ // the CLI only ever reads the environment.
42
+ if (args.project)
43
+ process.env.TESTOMATIO_PROJECT_ID = args.project;
44
+ try {
45
+ if (args.command === "models")
46
+ process.exit(await runModels(args.pattern, args.json));
47
+ if (args.command === "doctor") {
48
+ process.exit(await runDoctor({ envSources, json: args.json, probe: args.probe, model: args.model }));
49
+ }
50
+ if (args.command === "sessions")
51
+ process.exit(await runSessions(process.cwd(), args.json));
52
+ process.exit(await task(args));
53
+ }
54
+ catch (err) {
55
+ if (!(err instanceof UsageError))
56
+ throw err;
57
+ process.stderr.write(` ${err.message}\n`);
58
+ process.exit(2);
59
+ }
60
+ }
61
+ async function task(args) {
62
+ const prompt = args.prompt ?? (await readStdin());
63
+ if (!prompt.trim()) {
64
+ process.stderr.write(` ${args.command} needs something to work on\n\n${USAGE}\n`);
65
+ process.exit(2);
66
+ }
67
+ const destinations = parseDestinations(args.outputs ?? [], args.json);
68
+ if (typeof destinations === "string")
69
+ throw new UsageError(destinations);
70
+ // Everything a destination needs is checked before a single token is spent.
71
+ const unreachable = await preflight(destinations);
72
+ if (unreachable)
73
+ throw new UsageError(unreachable);
74
+ const sessionManager = await openSessionManager(process.cwd(), args);
75
+ if (typeof sessionManager === "string")
76
+ throw new UsageError(sessionManager);
77
+ if (args.name)
78
+ sessionManager.appendSessionInfo(args.name);
79
+ let sessionId = null;
80
+ if (!args.noSession)
81
+ sessionId = sessionManager.getSessionId();
82
+ const brief = args.command === "ask";
83
+ return runPrint({ prompt, destinations, sessionManager, sessionId, brief, model: args.model });
84
+ }
85
+ async function readStdin() {
86
+ if (process.stdin.isTTY)
87
+ return "";
88
+ const chunks = [];
89
+ for await (const chunk of process.stdin)
90
+ chunks.push(chunk);
91
+ return Buffer.concat(chunks).toString("utf8");
92
+ }
93
+ function version() {
94
+ const pkg = JSON.parse(readFileSync(join(PACKAGE_ROOT, "package.json"), "utf8"));
95
+ return pkg.version;
96
+ }
97
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAgB,MAAM,WAAW,CA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C,IAAI,CAAC,SAAS;QAAE,SAAS,GAAG,cAAc,CAAC,YAAY,EAAE,CAAC;IAE/D,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC;IACrC,OAAO,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;AACjG,CAAC;AAED,KAAK,UAAU,SAAS;IACtB,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,OAAO;IACd,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CACzD,CAAC;IACF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC"}
@@ -0,0 +1,186 @@
1
+ import { existsSync } from "node:fs";
2
+ import { SettingsManager } from "@earendil-works/pi-coding-agent";
3
+ import { dirname, relative } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { TESTEIYA_HOME } from "./env.js";
6
+ import { hasMcp, hasTestomatio, metadataCachePath, vendorBundle } from "./mcp.js";
7
+ import { PROVIDER_KEYS, resolveModel, UsageError } from "./model.js";
8
+ import { BUNDLED_SKILLS_DIR, createLoader, createRuntime } from "./session.js";
9
+ const MIN_NODE = [22, 19];
10
+ /**
11
+ * Everything a run resolves silently: which key file won, whether skills loaded,
12
+ * whether MCP is on. Reads config only — `--probe` is the one check that spends.
13
+ */
14
+ export async function runDoctor(options) {
15
+ const checks = [nodeCheck(), homeCheck()];
16
+ const runtime = await createRuntime();
17
+ checks.push(keyCheck(runtime, options.envSources));
18
+ const model = modelCheck(runtime, options.model);
19
+ checks.push(model.check);
20
+ const skills = await skillsChecks();
21
+ checks.push(...skills.checks);
22
+ checks.push(testomatioCheck(), mcpCacheCheck());
23
+ if (options.probe)
24
+ checks.push(await probeCheck(runtime, model.resolved));
25
+ if (options.json) {
26
+ const report = {
27
+ checks: checks.filter((check) => check.status !== "list"),
28
+ skills: skills.groups,
29
+ };
30
+ process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
31
+ return worst(checks) === "fail" ? 1 : 0;
32
+ }
33
+ process.stdout.write("\n");
34
+ for (const check of checks) {
35
+ process.stdout.write(` ${MARK[check.status]} ${check.name.padEnd(12)} ${check.detail}\n`);
36
+ }
37
+ process.stdout.write("\n");
38
+ return worst(checks) === "fail" ? 1 : 0;
39
+ }
40
+ function nodeCheck() {
41
+ const version = process.versions.node;
42
+ const [major = 0, minor = 0] = version.split(".").map(Number);
43
+ if (major > MIN_NODE[0] || (major === MIN_NODE[0] && minor >= MIN_NODE[1])) {
44
+ return { name: "node", status: "ok", detail: `v${version}` };
45
+ }
46
+ return { name: "node", status: "fail", detail: `v${version}, needs v22.19 or newer` };
47
+ }
48
+ function homeCheck() {
49
+ if (!existsSync(TESTEIYA_HOME)) {
50
+ return { name: "home", status: "warn", detail: `${TESTEIYA_HOME} (not created yet)` };
51
+ }
52
+ return { name: "home", status: "ok", detail: TESTEIYA_HOME };
53
+ }
54
+ // The key can come from four places and nothing else ever says which one won.
55
+ function keyCheck(runtime, sources) {
56
+ const found = [];
57
+ for (const { provider, env } of PROVIDER_KEYS) {
58
+ if (process.env[env]) {
59
+ found.push(`${provider} from ${sources.get(env) ?? "environment"}`);
60
+ continue;
61
+ }
62
+ if (runtime.hasConfiguredAuth(provider))
63
+ found.push(`${provider} from auth.json`);
64
+ }
65
+ if (found.length === 0) {
66
+ return { name: "key", status: "fail", detail: "none — set OPENROUTER_API_KEY or similar" };
67
+ }
68
+ return { name: "key", status: "ok", detail: found.join(", ") };
69
+ }
70
+ function modelCheck(runtime, explicit) {
71
+ try {
72
+ const model = resolveModel(runtime, explicit);
73
+ return {
74
+ check: { name: "model", status: "ok", detail: `${model.provider}/${model.id}` },
75
+ resolved: model,
76
+ };
77
+ }
78
+ catch (err) {
79
+ const detail = err instanceof UsageError ? err.message : String(err);
80
+ return { check: { name: "model", status: "warn", detail } };
81
+ }
82
+ }
83
+ async function skillsChecks() {
84
+ const loader = createLoader({
85
+ cwd: process.cwd(),
86
+ settingsManager: SettingsManager.inMemory(),
87
+ extensionPaths: [],
88
+ systemPrompt: () => "",
89
+ });
90
+ await loader.reload();
91
+ const { skills, diagnostics } = loader.getSkills();
92
+ const groups = byGroup(skills);
93
+ const checks = [];
94
+ if (skills.length === 0) {
95
+ checks.push({ name: "skills", status: "warn", detail: "none loaded" });
96
+ }
97
+ if (skills.length > 0) {
98
+ checks.push({ name: "skills", status: "ok", detail: `${skills.length} loaded` });
99
+ for (const [group, names] of groups) {
100
+ checks.push({ name: "", status: "list", detail: `${group.padEnd(28)} ${summarize(names)}` });
101
+ }
102
+ }
103
+ // Collisions and parse errors were dropped on the floor before this command.
104
+ for (const diagnostic of diagnostics) {
105
+ const status = diagnostic.type === "error" ? "fail" : "warn";
106
+ let detail = diagnostic.message;
107
+ if (diagnostic.path)
108
+ detail = `${detail} — ${shorten(diagnostic.path)}`;
109
+ checks.push({ name: "skills", status, detail });
110
+ }
111
+ return { checks, groups: [...groups].map(([group, names]) => ({ group, skills: names })) };
112
+ }
113
+ function shorten(path) {
114
+ const inBundle = relative(BUNDLED_SKILLS_DIR, path);
115
+ if (inBundle.startsWith(".."))
116
+ return path;
117
+ return inBundle;
118
+ }
119
+ // The full list is in --json; this line only has to prove the right set loaded.
120
+ function summarize(names) {
121
+ if (names.length <= 6)
122
+ return names.join(", ");
123
+ return `${names.slice(0, 6).join(", ")}, +${names.length - 6}`;
124
+ }
125
+ function byGroup(skills) {
126
+ const groups = new Map();
127
+ for (const skill of skills) {
128
+ let group = dirname(relative(BUNDLED_SKILLS_DIR, skill.baseDir));
129
+ if (group === "." || group.startsWith(".."))
130
+ group = "bundled";
131
+ const names = groups.get(group) ?? [];
132
+ names.push(skill.name);
133
+ groups.set(group, names);
134
+ }
135
+ return groups;
136
+ }
137
+ function testomatioCheck() {
138
+ if (!hasTestomatio()) {
139
+ return { name: "testomatio", status: "warn", detail: "no TESTOMATIO token, not connected" };
140
+ }
141
+ if (!hasMcp()) {
142
+ return {
143
+ name: "testomatio",
144
+ status: "warn",
145
+ detail: "token set, no project id — check-tests and REST only",
146
+ };
147
+ }
148
+ return { name: "testomatio", status: "ok", detail: "token and project id, MCP tools on" };
149
+ }
150
+ function mcpCacheCheck() {
151
+ if (!hasMcp())
152
+ return { name: "mcp", status: "ok", detail: "off" };
153
+ const bundle = fileURLToPath(vendorBundle());
154
+ if (!existsSync(bundle)) {
155
+ return { name: "mcp", status: "fail", detail: "vendor bundle missing — run npm run build" };
156
+ }
157
+ if (!existsSync(metadataCachePath())) {
158
+ return { name: "mcp", status: "warn", detail: "tool cache empty, first run is proxy-only" };
159
+ }
160
+ return { name: "mcp", status: "ok", detail: "direct tools and proxy" };
161
+ }
162
+ async function probeCheck(runtime, model) {
163
+ if (!model)
164
+ return { name: "probe", status: "warn", detail: "skipped, no model to probe" };
165
+ const message = await runtime
166
+ .completeSimple(model, { messages: [{ role: "user", content: "ping", timestamp: Date.now() }] })
167
+ .catch((err) => ({ stopReason: "error", errorMessage: String(err) }));
168
+ if (message.stopReason === "error") {
169
+ return { name: "probe", status: "fail", detail: message.errorMessage ?? "request failed" };
170
+ }
171
+ return { name: "probe", status: "ok", detail: "the key works" };
172
+ }
173
+ function worst(checks) {
174
+ if (checks.some((check) => check.status === "fail"))
175
+ return "fail";
176
+ if (checks.some((check) => check.status === "warn"))
177
+ return "warn";
178
+ return "ok";
179
+ }
180
+ const MARK = {
181
+ ok: "✓",
182
+ warn: "!",
183
+ fail: "✗",
184
+ list: " ",
185
+ };
186
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,eAAe,EAAc,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAgB,aAAa,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE/E,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAE1B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAsB;IACpD,MAAM,MAAM,GAAY,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAEnD,MAAM,OAAO,GAAG,MAAM,aAAa,EAAE,CAAC;IACtC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAEnD,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEzB,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;IACpC,MAAM,CAAC,IAAI,CAAC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C;AACd,CAAC;AAED,MAAM,IAAI,GAA2B;IACnC,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;CACV,CAAC"}
@@ -0,0 +1,93 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { homedir } from "node:os";
3
+ import { dirname, join } from "node:path";
4
+ /**
5
+ * Testeiya's state directory, shared with the desktop app: a provider key saved
6
+ * in its Settings dialog works here with no extra step.
7
+ */
8
+ export const TESTEIYA_HOME = join(homedir(), ".testeiya");
9
+ /**
10
+ * This package's root, found by walking up to package.json — `dist/src` when
11
+ * built, `src` when run from source. Bundled files resolve from here.
12
+ */
13
+ export const PACKAGE_ROOT = packageRoot();
14
+ /**
15
+ * Where pi keeps its own state for this CLI. Deliberately not `~/.pi` — running
16
+ * `npx testeiya` must not write into a user's own pi installation.
17
+ */
18
+ export const PI_STATE_DIR = join(TESTEIYA_HOME, "pi");
19
+ // pi reads this at import time to place sessions and its MCP cache, and a
20
+ // SessionManager is built before any session exists to read it from.
21
+ process.env.PI_CODING_AGENT_DIR = PI_STATE_DIR;
22
+ /**
23
+ * Fill gaps in process.env from `~/.testeiya/.env`, then from any `.env` found
24
+ * walking up from the working directory — so running in a repo picks up that
25
+ * repo's key. Exported variables always win; this only fills gaps.
26
+ *
27
+ * The walk starts at cwd, never at this file: an installed package sits under
28
+ * some node_modules whose ancestors are none of the agent's business, and
29
+ * silently adopting a key from there is a surprise, not a convenience.
30
+ *
31
+ * Returns the file each variable came from, which is what `doctor` reports.
32
+ */
33
+ export function loadEnvFiles() {
34
+ const sources = new Map();
35
+ loadFile(join(TESTEIYA_HOME, ".env"), sources);
36
+ let dir = process.cwd();
37
+ for (let i = 0; i < 8; i++) {
38
+ loadFile(join(dir, ".env"), sources);
39
+ const parent = dirname(dir);
40
+ if (parent === dir)
41
+ break;
42
+ dir = parent;
43
+ }
44
+ return sources;
45
+ }
46
+ export function parseEnv(content) {
47
+ const out = {};
48
+ for (const raw of content.split(/\r?\n/)) {
49
+ const line = raw.trim();
50
+ if (!line || line.startsWith("#"))
51
+ continue;
52
+ const eq = line.indexOf("=");
53
+ if (eq === -1)
54
+ continue;
55
+ const key = line.slice(0, eq).trim();
56
+ let val = line.slice(eq + 1).trim();
57
+ if ((val.startsWith('"') && val.endsWith('"')) ||
58
+ (val.startsWith("'") && val.endsWith("'"))) {
59
+ val = val.slice(1, -1);
60
+ }
61
+ if (key)
62
+ out[key] = val;
63
+ }
64
+ return out;
65
+ }
66
+ function loadFile(path, sources) {
67
+ if (!existsSync(path))
68
+ return;
69
+ let vars;
70
+ try {
71
+ vars = parseEnv(readFileSync(path, "utf8"));
72
+ }
73
+ catch {
74
+ return;
75
+ }
76
+ for (const [key, value] of Object.entries(vars)) {
77
+ if (process.env[key] !== undefined)
78
+ continue;
79
+ process.env[key] = value;
80
+ sources.set(key, path);
81
+ }
82
+ }
83
+ function packageRoot() {
84
+ let dir = import.meta.dirname;
85
+ while (!existsSync(join(dir, "package.json"))) {
86
+ const parent = dirname(dir);
87
+ if (parent === dir)
88
+ return import.meta.dirname;
89
+ dir = parent;
90
+ }
91
+ return dir;
92
+ }
93
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,EAAE,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI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C;QAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/C,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { mcpConfig, seedMetadataCache, vendorBundle } from "./mcp.js";
2
+ /** The MCP adapter, configured from the environment, as a pi extension. */
3
+ export default async function mcpExtension(pi) {
4
+ const config = mcpConfig();
5
+ await seedMetadataCache(config);
6
+ const { createMcpAdapter } = (await import(vendorBundle()));
7
+ await createMcpAdapter({ config })(pi);
8
+ }
9
+ //# sourceMappingURL=mcp-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-extension.js","sourceRoot":"","sources":["../../src/mcp-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtE,2EAA2E;AAC3E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,YAAY,CAAC,EAAW;IACpD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEhC,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC,CAEzD,CAAC;IACF,MAAM,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AACzC,CAAC"}