testeiya 0.2.1 → 0.3.1-5.1

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 (405) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +325 -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 +70 -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 +224 -0
  20. package/dist/src/args.js.map +1 -0
  21. package/dist/src/cli.js +105 -0
  22. package/dist/src/cli.js.map +1 -0
  23. package/dist/src/doctor.js +171 -0
  24. package/dist/src/doctor.js.map +1 -0
  25. package/dist/src/env.js +103 -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 +216 -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 +313 -0
  40. package/dist/src/run.js.map +1 -0
  41. package/dist/src/session.js +98 -0
  42. package/dist/src/session.js.map +1 -0
  43. package/dist/src/sessions.js +72 -0
  44. package/dist/src/sessions.js.map +1 -0
  45. package/dist/src/skills.js +130 -0
  46. package/dist/src/skills.js.map +1 -0
  47. package/dist/vendor/mcp.js +14801 -0
  48. package/mcp-tools.json +2967 -0
  49. package/package.json +34 -43
  50. package/prompt/context.ts +101 -0
  51. package/prompt/index.ts +102 -0
  52. package/prompt/print.ts +32 -0
  53. package/prompt/project-info.ts +30 -0
  54. package/prompt/system-prompt.ts +187 -0
  55. package/{src/prompt → prompt}/testomatio.ts +120 -9
  56. package/prompt/tools.ts +72 -0
  57. package/prompt/vocab.ts +7 -0
  58. package/skills/codeceptjs/ci-fix-tests/SKILL.md +7 -8
  59. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +47 -64
  60. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +56 -47
  61. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +144 -106
  62. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +50 -57
  63. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +88 -196
  64. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +4 -5
  65. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +25 -36
  66. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +23 -36
  67. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +23 -36
  68. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +23 -35
  69. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +50 -53
  70. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +87 -191
  71. package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/SKILL.md +1 -1
  72. package/{skills.lock.json → skills/skills.lock.json} +45 -37
  73. package/skills/skills.yaml +35 -0
  74. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +49 -61
  75. package/skills/testomatio/explorbot/explorbot-fundamentals/references/no-install.md +36 -0
  76. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +20 -7
  77. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +41 -289
  78. package/skills/testomatio/explorbot/prima/SKILL.md +87 -0
  79. package/skills/testomatio/qa-process/qa-explain-behavior/SKILL.md +111 -0
  80. package/skills/testomatio/qa-process/qa-explain-behavior/references/answer-shapes.md +116 -0
  81. package/skills/testomatio/qa-process/qa-explain-behavior/references/examples.md +157 -0
  82. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/SKILL.md +91 -0
  83. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/references/output-format.md +71 -0
  84. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +227 -0
  85. package/skills/testomatio/test-automation/qa-data-seeder/SKILL.md +83 -0
  86. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +5 -3
  87. package/skills/testomatio/test-automation/setup-change-aware-pr-testing/SKILL.md +190 -0
  88. package/skills/testomatio/test-automation/setup-ci-automation/SKILL.md +76 -0
  89. package/skills/testomatio/test-management/qa-split-testing-levels-pyramid/SKILL.md +55 -0
  90. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/SKILL.md +220 -0
  91. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/references/qa-sprint-report.md +126 -0
  92. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +1 -1
  93. package/skills/testomatio/test-management/qa-thinking/SKILL.md +25 -25
  94. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +14 -1
  95. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +8 -0
  96. package/assets/testeiya-logo-dark.svg +0 -16
  97. package/assets/testeiya-logo.svg +0 -15
  98. package/models.catalog.json +0 -6963
  99. package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
  100. package/skills/playwright-best-practices-skill/README.md +0 -147
  101. package/skills/testeiya/README.md +0 -29
  102. package/skills/testeiya/answer-formatting/SKILL.md +0 -30
  103. package/skills/testeiya/check-cucumber/SKILL.md +0 -200
  104. package/skills/testeiya/check-tests/SKILL.md +0 -260
  105. package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
  106. package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
  107. package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
  108. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
  109. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
  110. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
  111. package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
  112. package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
  113. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
  114. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
  115. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
  116. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
  117. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
  118. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
  119. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
  120. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
  121. package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
  122. package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
  123. package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
  124. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
  125. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
  126. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
  127. package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
  128. package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
  129. package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
  130. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
  131. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
  132. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
  133. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
  134. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
  135. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
  136. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
  137. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
  138. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
  139. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
  140. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
  141. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
  142. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
  143. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
  144. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
  145. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
  146. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
  147. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
  148. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
  149. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
  150. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
  151. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
  152. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
  153. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
  154. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
  155. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
  156. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
  157. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
  158. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
  159. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
  160. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
  161. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
  162. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
  163. package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
  164. package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
  165. package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
  166. package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
  167. package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
  168. package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
  169. package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
  170. package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
  171. package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
  172. package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
  173. package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
  174. package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
  175. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
  176. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
  177. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
  178. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
  179. package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
  180. package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
  181. package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
  182. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
  183. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
  184. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
  185. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
  186. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
  187. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
  188. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
  189. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
  190. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
  191. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
  192. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
  193. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
  194. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
  195. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
  196. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
  197. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
  198. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
  199. package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
  200. package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
  201. package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
  202. package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
  203. package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
  204. package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
  205. package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
  206. package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
  207. package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
  208. package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
  209. package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
  210. package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
  211. package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
  212. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
  213. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
  214. package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
  215. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
  216. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
  217. package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
  218. package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
  219. package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
  220. package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
  221. package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
  222. package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
  223. package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
  224. package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
  225. package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
  226. package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
  227. package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
  228. package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
  229. package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
  230. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
  231. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
  232. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
  233. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
  234. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
  235. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
  236. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
  237. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
  238. package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
  239. package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
  240. package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
  241. package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
  242. package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
  243. package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
  244. package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
  245. package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
  246. package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
  247. package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
  248. package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
  249. package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
  250. package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
  251. package/skills.yaml +0 -21
  252. package/src/ai-debug.ts +0 -188
  253. package/src/api/agent-get.ts +0 -22
  254. package/src/api/agent-start.ts +0 -384
  255. package/src/api/client-log.ts +0 -29
  256. package/src/api/context.ts +0 -332
  257. package/src/api/debug-layout.ts +0 -47
  258. package/src/api/debug-report.ts +0 -29
  259. package/src/api/debug-snapshot.ts +0 -30
  260. package/src/api/debug-stream.ts +0 -52
  261. package/src/api/files-delete.ts +0 -184
  262. package/src/api/files-read.ts +0 -41
  263. package/src/api/files-rename.ts +0 -99
  264. package/src/api/files-tree.ts +0 -292
  265. package/src/api/files-write.ts +0 -41
  266. package/src/api/mcp.ts +0 -603
  267. package/src/api/memory.ts +0 -69
  268. package/src/api/open-external.ts +0 -39
  269. package/src/api/playwright-cli.ts +0 -606
  270. package/src/api/providers.ts +0 -457
  271. package/src/api/read-env-token.ts +0 -33
  272. package/src/api/sessions.ts +0 -79
  273. package/src/api/settings.ts +0 -120
  274. package/src/api/skills.ts +0 -58
  275. package/src/api/testomatio-attachment.ts +0 -89
  276. package/src/api/testomatio-auth.ts +0 -284
  277. package/src/api/testomatio-proxy.ts +0 -197
  278. package/src/api/testomatio-run-stats.ts +0 -81
  279. package/src/api/testomatio-target.ts +0 -225
  280. package/src/api/testomatio-transcription.ts +0 -82
  281. package/src/api/workspace-search.ts +0 -96
  282. package/src/api/workspace-sync.ts +0 -151
  283. package/src/api/workspace.ts +0 -165
  284. package/src/app-server.ts +0 -556
  285. package/src/bridge.ts +0 -251
  286. package/src/check-tests.ts +0 -156
  287. package/src/cli.ts +0 -17
  288. package/src/commands.ts +0 -244
  289. package/src/config.ts +0 -183
  290. package/src/connection.ts +0 -658
  291. package/src/context-store.ts +0 -265
  292. package/src/debug-bus.ts +0 -405
  293. package/src/extensions/tool-gate.ts +0 -220
  294. package/src/extensions/webui/ask-channel.ts +0 -52
  295. package/src/extensions/webui/index.ts +0 -184
  296. package/src/extensions/webui/tools/ask-question.ts +0 -88
  297. package/src/extensions/webui/tools/query-result.ts +0 -79
  298. package/src/extensions/webui/tools/render-chart.ts +0 -53
  299. package/src/extensions/webui/tools/render-item.ts +0 -61
  300. package/src/extensions/webui/tools/render-list.ts +0 -170
  301. package/src/extensions/webui/tools/render-result.ts +0 -85
  302. package/src/extensions/webui/tools/render-tree.ts +0 -71
  303. package/src/extensions/webui/tools/ui-widget.ts +0 -54
  304. package/src/extensions/webui/tools/widget-result.ts +0 -13
  305. package/src/extensions/webui/widget-channel.ts +0 -50
  306. package/src/file-log.ts +0 -196
  307. package/src/git-tracked.ts +0 -68
  308. package/src/gitignore.ts +0 -53
  309. package/src/json-store.ts +0 -43
  310. package/src/load-env.ts +0 -70
  311. package/src/loader-style.ts +0 -96
  312. package/src/main.ts +0 -140
  313. package/src/mcp-catalog.ts +0 -96
  314. package/src/models-catalog.ts +0 -72
  315. package/src/permissions.ts +0 -120
  316. package/src/project-dir.ts +0 -189
  317. package/src/project-info.ts +0 -108
  318. package/src/prompt/app-ui.ts +0 -59
  319. package/src/prompt/browser.ts +0 -27
  320. package/src/prompt/index.ts +0 -62
  321. package/src/prompt/tools.ts +0 -27
  322. package/src/server-info.ts +0 -62
  323. package/src/session-factory.ts +0 -442
  324. package/src/session-store.ts +0 -115
  325. package/src/shell-env.ts +0 -45
  326. package/src/skills.ts +0 -163
  327. package/src/sync-snapshot.ts +0 -140
  328. package/src/telemetry.ts +0 -239
  329. package/src/testomatio-auth.ts +0 -299
  330. package/src/testomatio.ts +0 -98
  331. package/src/theme.ts +0 -30
  332. package/src/user-env.ts +0 -94
  333. package/src/welcome.ts +0 -194
  334. package/src/workspace/safe-path.ts +0 -85
  335. package/src/workspace/test-md.ts +0 -70
  336. package/src/workspace-model.ts +0 -440
  337. package/testeiya.config.json +0 -14
  338. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication-flows.md +0 -0
  339. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication.md +0 -0
  340. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/clock-mocking.md +0 -0
  341. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/mobile-testing.md +0 -0
  342. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-context.md +0 -0
  343. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-user.md +0 -0
  344. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/network-advanced.md +0 -0
  345. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/third-party.md +0 -0
  346. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/pom-vs-fixtures.md +0 -0
  347. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/test-architecture.md +0 -0
  348. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/when-to-mock.md +0 -0
  349. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/browser-apis.md +0 -0
  350. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/iframes.md +0 -0
  351. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/service-workers.md +0 -0
  352. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/websockets.md +0 -0
  353. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/annotations.md +0 -0
  354. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/assertions-waiting.md +0 -0
  355. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/configuration.md +0 -0
  356. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/fixtures-hooks.md +0 -0
  357. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/global-setup.md +0 -0
  358. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/locators.md +0 -0
  359. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/page-object-model.md +0 -0
  360. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/projects-dependencies.md +0 -0
  361. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-data.md +0 -0
  362. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-suite-structure.md +0 -0
  363. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-tags.md +0 -0
  364. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/console-errors.md +0 -0
  365. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/debugging.md +0 -0
  366. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/error-testing.md +0 -0
  367. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/flaky-tests.md +0 -0
  368. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/angular.md +0 -0
  369. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/nextjs.md +0 -0
  370. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/react.md +0 -0
  371. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/vue.md +0 -0
  372. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/ci-cd.md +0 -0
  373. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/docker.md +0 -0
  374. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/github-actions.md +0 -0
  375. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/gitlab.md +0 -0
  376. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/other-providers.md +0 -0
  377. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/parallel-sharding.md +0 -0
  378. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/performance.md +0 -0
  379. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/reporting.md +0 -0
  380. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/test-coverage.md +0 -0
  381. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/accessibility.md +0 -0
  382. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/api-testing.md +0 -0
  383. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/browser-extensions.md +0 -0
  384. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/canvas-webgl.md +0 -0
  385. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/component-testing.md +0 -0
  386. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/drag-drop.md +0 -0
  387. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/electron.md +0 -0
  388. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-operations.md +0 -0
  389. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-upload-download.md +0 -0
  390. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/forms-validation.md +0 -0
  391. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/graphql-testing.md +0 -0
  392. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/i18n.md +0 -0
  393. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/performance-testing.md +0 -0
  394. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/security-testing.md +0 -0
  395. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/visual-regression.md +0 -0
  396. /package/skills/{playwright-cli → playwright/playwright-cli}/SKILL.md +0 -0
  397. /package/skills/{playwright-cli → playwright/playwright-cli}/references/element-attributes.md +0 -0
  398. /package/skills/{playwright-cli → playwright/playwright-cli}/references/playwright-tests.md +0 -0
  399. /package/skills/{playwright-cli → playwright/playwright-cli}/references/request-mocking.md +0 -0
  400. /package/skills/{playwright-cli → playwright/playwright-cli}/references/running-code.md +0 -0
  401. /package/skills/{playwright-cli → playwright/playwright-cli}/references/session-management.md +0 -0
  402. /package/skills/{playwright-cli → playwright/playwright-cli}/references/storage-state.md +0 -0
  403. /package/skills/{playwright-cli → playwright/playwright-cli}/references/test-generation.md +0 -0
  404. /package/skills/{playwright-cli → playwright/playwright-cli}/references/tracing.md +0 -0
  405. /package/skills/{playwright-cli → playwright/playwright-cli}/references/video-recording.md +0 -0
@@ -0,0 +1,70 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { delimiter, join } from 'node:path';
3
+ import dedent from 'dedent';
4
+ /**
5
+ * The tools every harness gives the agent. Anything a particular harness adds —
6
+ * a question tool, a browser it can drive for a watching user — arrives as an
7
+ * extra bullet from that harness, since the agent must not be told about a tool
8
+ * it does not have.
9
+ */
10
+ export function tools(options) {
11
+ const extra = (options?.extra ?? []).join('');
12
+ let routing = ' - GitHub: issues and projects through MCP.';
13
+ if (onPath('gh')) {
14
+ routing +=
15
+ '\n - Pull requests and repositories: `gh` in `bash`. When a PR question needs issue detail, query the issue through MCP — never infer it from a PR title.';
16
+ }
17
+ if (onPath('acli')) {
18
+ routing +=
19
+ '\n - Jira in bulk (many issues at once), boards, sprints and filters: `acli` in `bash`, per the `atlassian` skill. Confluence and attachments have no `acli` command and stay on MCP.';
20
+ }
21
+ if (onPath('glab')) {
22
+ routing +=
23
+ '\n - GitLab releases, labels, milestones, snippets, CI artifacts, and any endpoint with no MCP tool: `glab` in `bash`. Issues, merge requests, pipelines and code search stay on MCP, which covers them well.';
24
+ }
25
+ return dedent `
26
+ <available-tools>
27
+ You have these tools available:
28
+ * **Read operations (use freely):** \`read\`, \`grep\`, \`ls\`.
29
+ - Use these aggressively to understand the system under test before proposing changes.
30
+ * **Write operations (restricted):** \`write\`, \`edit\`, \`bash\`.
31
+ - Requires explicit user confirmation for destructive or shared-state actions.
32
+ ${extra} * **Internal Skills:** For QA-related tasks, check available skills first and prefer using them when applicable.
33
+ * **External Integrations:** Use MCP tools when they provide superior data or specialized integrations.
34
+ - Primary MCP (Testomat.io): Use Testomat.io MCP tools to extend functionality.
35
+ - Secondary MCP (Jira, GitHub, etc.): Invoke only when user explicitly asks or when remote context exploration is required.
36
+ ${routing}
37
+
38
+ <tool-governance>
39
+ * **Prioritize Specificity:** Use \`read\` instead of \`cat\`, and \`edit\` instead of \`sed\`. Dedicated tools provide better error tracking and safety.
40
+ * **Parallel Execution:** Call independent tools in parallel to minimize latency. Sequential calls are reserved for operations with data dependencies.
41
+ * **Atomic Updates:** Mark tasks as complete in your internal state immediately upon execution. Do not batch status updates.
42
+ * **Analysis-First:** Use your own reasoning to guide tool selection. Do not wait for step-by-step instructions if discovery tools can provide the answer.
43
+ </tool-governance>
44
+ </available-tools>
45
+ `;
46
+ }
47
+ /** Is this CLI on PATH? Never tell the agent to use a binary this machine lacks. */
48
+ function onPath(bin) {
49
+ for (const dir of (process.env.PATH ?? '').split(delimiter)) {
50
+ if (!dir)
51
+ continue;
52
+ if (existsSync(join(dir, bin)) || existsSync(join(dir, `${bin}.exe`)))
53
+ return true;
54
+ }
55
+ return false;
56
+ }
57
+ /**
58
+ * CLIs Testeiya knows how to connect, probed on PATH — the same trio routed in
59
+ * `<available-tools>` above. Shared with the prompt's connections section so
60
+ * the two can never disagree about whether `gh` etc. exist.
61
+ */
62
+ export const KNOWN_CLIS = [
63
+ { bin: 'gh', label: 'gh (GitHub CLI)' },
64
+ { bin: 'acli', label: 'acli (Atlassian CLI)' },
65
+ { bin: 'glab', label: 'glab (GitLab CLI)' },
66
+ ];
67
+ export function pathClis() {
68
+ return KNOWN_CLIS.filter((c) => onPath(c.bin)).map((c) => c.label);
69
+ }
70
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../prompt/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,OAA8B;IAClD,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9C,IAAI,OAAO,GAAG,gDAAgD,CAAC;IAC/D,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACjB,OAAO;YACL,8JAA8J,CAAC;IACnK,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QACnB,OAAO;YACL,0LAA0L,CAAC;IAC/L,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QACnB,OAAO;YACL,kNAAkN,CAAC;IACvN,CAAC;IACD,OAAO,MAAM,CAAA;;;;;;;EAOb,KAAK;;;;EAIL,OAAO;;;;;;;;;CASR,CAAC;AACF,CAAC;AAED,oFAAoF;AACpF,SAAS,MAAM,CAAC,GAAW;IACzB,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5D,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IACrF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqC;IAC1D,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACvC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,EAAE;IAC9C,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE;CAC5C,CAAC;AAEF,MAAM,UAAU,QAAQ;IACtB,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The per-project config directory name, as the agent knows it. Part of the
3
+ * vocabulary the system prompt teaches — every path the prompt names below it
4
+ * (`.testeiya/manual-tests`, `.testeiya/project-info.json`, …) is built from
5
+ * this constant, so the prompt and the harness can never disagree about it.
6
+ */
7
+ export const TESTEIYA_DIR_NAME = ".testeiya";
8
+ //# sourceMappingURL=vocab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vocab.js","sourceRoot":"","sources":["../../prompt/vocab.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC"}
@@ -0,0 +1,224 @@
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 skills [pattern] list the skills bundled with this package
20
+ testeiya sessions list saved sessions for this folder
21
+
22
+ Options:
23
+ -o, --output <dest> report destination, repeatable: file.md, file.json, gh:pr-comment
24
+ --model <id> provider/model to run
25
+ --project <id> Testomat.io project id
26
+ -c, --continue continue the last session in this folder
27
+ --resume <id> continue that session
28
+ --session <label> continue the session with that name, or start it
29
+ --name <label> name the session
30
+ --no-session do not save the session
31
+ --exit-zero a negative verdict exits 0
32
+ --header <text> line added above the report
33
+ --footer <text> line added under the report
34
+ --no-default-footer do not sign the report
35
+ --json machine-readable output
36
+ --probe doctor only: test the key with one request
37
+ -h, --help show this
38
+ -v, --version show version
39
+
40
+ Environment:
41
+ TESTEIYA_MODEL model to run, e.g. openrouter/anthropic/claude-sonnet-5
42
+ TESTEIYA_NO_DEFAULT_FOOTER do not sign the report
43
+ OPENROUTER_API_KEY provider key, also ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY
44
+ TESTOMATIO Testomat.io project API key
45
+ TESTOMATIO_PROJECT_ID Testomat.io project id, same as --project
46
+ TESTOMATIO_URL Testomat.io base url, for self-hosted
47
+
48
+ Run "testeiya help" for the full guide.`;
49
+ export const HELP = `${USAGE}
50
+
51
+ Running a task
52
+
53
+ The agent runs one task and exits. There is no interactive mode. Progress and
54
+ errors go to stderr, so a run drops into CI as-is.
55
+
56
+ A task can also come from stdin: cat task.md | testeiya task
57
+ A task starting with "-" must follow "--": testeiya task -- "-weird task"
58
+
59
+ Exit codes: 0 pass, 1 failed run or negative verdict, 2 bad usage, 130 interrupted.
60
+
61
+ --exit-zero keeps a negative verdict from failing the command: a broken run
62
+ still exits 1 and bad usage still exits 2. The verdict is still in the report
63
+ and in the run envelope, so a pipeline can gate on it when it wants to.
64
+
65
+ Where the report goes
66
+
67
+ --output names a destination and can repeat. Without one the report goes to
68
+ stdout. --json prints the run envelope to stdout instead.
69
+
70
+ report.md the agent writes the report there
71
+ run.json the run envelope: verdict, reason, report, tokens, session id
72
+ gh:pr-comment posted on this branch's pull request, through the GitHub CLI
73
+ gh:pr#123 posted on that pull request
74
+
75
+ --footer adds a line under the report and --header adds one above. Both go
76
+ wherever the report goes: stdout, the file, the posted comment. Use --footer
77
+ to say how to answer a comment, e.g. --footer "> Reply with /testeiya".
78
+
79
+ The report is signed, unless you write your own footer:
80
+
81
+ *🧚🏻‍♀️ Provided by [Testeiya QA Agent](https://testomat.ai/testeiya) & <model>*
82
+
83
+ --no-default-footer drops the signature, so does TESTEIYA_NO_DEFAULT_FOOTER.
84
+
85
+ Every destination is checked before the run starts, so a missing gh costs no
86
+ tokens.
87
+
88
+ Models and keys
89
+
90
+ There is no default model. Pass --model or set TESTEIYA_MODEL. A resumed run
91
+ reuses its session's model. "testeiya models" lists what your key can reach.
92
+
93
+ The provider key comes from the environment, from ~/.testeiya/.env, or from
94
+ ~/.testeiya/auth.json, which is the file the desktop app's Settings dialog
95
+ writes.
96
+
97
+ Sessions
98
+
99
+ Runs are saved under ~/.testeiya, so a follow-up picks up where the last one
100
+ stopped. -c continues the last session in this folder, --resume <id> picks
101
+ another, --name labels one, and --no-session saves nothing.
102
+
103
+ --session <label> is the one for a job that runs again and again: it continues
104
+ the session with that name, and starts it the first time. Give each thread its
105
+ own label and they never mix.
106
+
107
+ Skills
108
+
109
+ The package ships the skills the agent reads, and only those: skills found in
110
+ the folder it runs in are ignored, so a checkout cannot hand it its own.
111
+ "testeiya skills" lists them. Name one in the task with a slash and it is
112
+ loaded before the run, e.g. "/qa-thinking". A name we do not ship is left
113
+ alone, so a stray "/word" in the task is just a word.
114
+
115
+ Testomat.io
116
+
117
+ Set TESTOMATIO to a project API key and the agent reads and writes that
118
+ project's tests, suites, runs and plans through check-tests and the REST API.
119
+ Add the project id, with --project or TESTOMATIO_PROJECT_ID, and it also gets
120
+ the Testomat.io tools. The MCP server needs the id: a token alone does not say
121
+ which project to talk to.`;
122
+ export const COMMANDS = ["task", "ask", "models", "skills", "doctor", "sessions", "help"];
123
+ export function parseCliArgs(argv) {
124
+ const first = argv[0];
125
+ if (!first)
126
+ return { command: "welcome" };
127
+ if (first === "-h" || first === "--help")
128
+ return { command: "usage" };
129
+ if (first === "-v" || first === "--version")
130
+ return { command: "version" };
131
+ if (!isCommand(first))
132
+ return { error: unknownCommand(first) };
133
+ if (first === "help")
134
+ return { command: "help" };
135
+ const options = OPTIONS[first];
136
+ let parsed;
137
+ try {
138
+ parsed = parseArgs({ args: argv.slice(1), options, allowPositionals: true, strict: true });
139
+ }
140
+ catch (err) {
141
+ if (err instanceof Error)
142
+ return { error: err.message };
143
+ return { error: String(err) };
144
+ }
145
+ const values = parsed.values;
146
+ if (values.help)
147
+ return { command: "usage" };
148
+ const args = { command: first };
149
+ const text = parsed.positionals.join(" ").trim();
150
+ if ((first === "task" || first === "ask") && text)
151
+ args.prompt = text;
152
+ if ((first === "models" || first === "skills") && text)
153
+ args.pattern = text;
154
+ if (Array.isArray(values.output))
155
+ args.outputs = values.output;
156
+ if (values.json)
157
+ args.json = true;
158
+ if (values.probe)
159
+ args.probe = true;
160
+ if (typeof values.model === "string")
161
+ args.model = values.model;
162
+ if (typeof values.project === "string")
163
+ args.project = values.project;
164
+ if (values.continue)
165
+ args.continueLast = true;
166
+ if (typeof values.resume === "string")
167
+ args.resume = values.resume;
168
+ if (typeof values.session === "string")
169
+ args.session = values.session;
170
+ if (typeof values.name === "string")
171
+ args.name = values.name;
172
+ if (values["no-session"])
173
+ args.noSession = true;
174
+ if (values["exit-zero"])
175
+ args.exitZero = true;
176
+ if (typeof values.header === "string")
177
+ args.header = values.header;
178
+ if (typeof values.footer === "string")
179
+ args.footer = values.footer;
180
+ if (values["no-default-footer"])
181
+ args.noDefaultFooter = true;
182
+ if (args.session && (args.continueLast || args.resume || args.name || args.noSession)) {
183
+ return { error: "--session already names and continues a session" };
184
+ }
185
+ return args;
186
+ }
187
+ const HELP_FLAG = { type: "boolean", short: "h" };
188
+ const JSON_FLAG = { type: "boolean" };
189
+ const RUN_OPTIONS = {
190
+ output: { type: "string", short: "o", multiple: true },
191
+ json: JSON_FLAG,
192
+ model: { type: "string" },
193
+ project: { type: "string" },
194
+ continue: { type: "boolean", short: "c" },
195
+ resume: { type: "string" },
196
+ session: { type: "string" },
197
+ name: { type: "string" },
198
+ "no-session": { type: "boolean" },
199
+ "exit-zero": { type: "boolean" },
200
+ header: { type: "string" },
201
+ footer: { type: "string" },
202
+ "no-default-footer": { type: "boolean" },
203
+ help: HELP_FLAG,
204
+ };
205
+ const OPTIONS = {
206
+ task: RUN_OPTIONS,
207
+ ask: RUN_OPTIONS,
208
+ models: { json: JSON_FLAG, help: HELP_FLAG },
209
+ skills: { json: JSON_FLAG, help: HELP_FLAG },
210
+ doctor: { json: JSON_FLAG, probe: { type: "boolean" }, model: { type: "string" }, help: HELP_FLAG },
211
+ sessions: { json: JSON_FLAG, help: HELP_FLAG },
212
+ help: {},
213
+ };
214
+ function isCommand(value) {
215
+ return COMMANDS.includes(value);
216
+ }
217
+ // The task used to be the first positional, so a bare prompt is the mistake to
218
+ // expect. Name the fix rather than printing the whole usage at them.
219
+ function unknownCommand(value) {
220
+ if (value.startsWith("-"))
221
+ return `unknown option "${value}"`;
222
+ return `unknown command "${value}" — did you mean: testeiya task "${value}"`;
223
+ }
224
+ //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoCmB,CAAC;AAEzC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAwEA,CAAC;AAE7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAEnG,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC1C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IACtE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,WAAW;QAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC3E,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/D,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAEjD,MAAM,OAAO,GAAG,O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K,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACnG,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9C,IAAI,EAAE,EAAE;CACT,CAAC;AAEF,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAQ,QAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,+EAA+E;AAC/E,qEAAqE;AACrE,SAAS,cAAc,CAAC,KAAa;IACnC,IAAI,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,105 @@
1
+ #!/usr/bin/env node
2
+ import { HELP, parseCliArgs, USAGE, WELCOME } from "./args.js";
3
+ import { runDoctor } from "./doctor.js";
4
+ import { loadEnvFiles, VERSION } from "./env.js";
5
+ import { UsageError } from "./model.js";
6
+ import { runModels } from "./models.js";
7
+ import { runSkills } from "./skills.js";
8
+ import { parseDestinations, preflight } from "./output.js";
9
+ import { runPrint } from "./run.js";
10
+ import { openSessionManager, runSessions } from "./sessions.js";
11
+ main(process.argv.slice(2)).catch((err) => {
12
+ process.stderr.write(`${err?.message ?? err}\n`);
13
+ process.exit(1);
14
+ });
15
+ async function main(argv) {
16
+ process.title = "testeiya";
17
+ const args = parseCliArgs(argv);
18
+ if (args.error) {
19
+ process.stderr.write(`${args.error}\n\n${USAGE}\n`);
20
+ process.exit(2);
21
+ }
22
+ if (args.command === "welcome") {
23
+ process.stdout.write(`${WELCOME}\n`);
24
+ return;
25
+ }
26
+ if (args.command === "usage") {
27
+ process.stdout.write(`${USAGE}\n`);
28
+ return;
29
+ }
30
+ if (args.command === "help") {
31
+ process.stdout.write(`${HELP}\n`);
32
+ return;
33
+ }
34
+ if (args.command === "version") {
35
+ process.stdout.write(`${VERSION}\n`);
36
+ return;
37
+ }
38
+ const envSources = loadEnvFiles();
39
+ // --project is a spelling of the env var the MCP server needs, so the rest of
40
+ // the CLI only ever reads the environment.
41
+ if (args.project)
42
+ process.env.TESTOMATIO_PROJECT_ID = args.project;
43
+ try {
44
+ if (args.command === "models")
45
+ process.exit(await runModels(args.pattern, args.json));
46
+ if (args.command === "skills")
47
+ process.exit(await runSkills(args.pattern, args.json));
48
+ if (args.command === "doctor") {
49
+ process.exit(await runDoctor({ envSources, json: args.json, probe: args.probe, model: args.model }));
50
+ }
51
+ if (args.command === "sessions")
52
+ process.exit(await runSessions(process.cwd(), args.json));
53
+ process.exit(await task(args));
54
+ }
55
+ catch (err) {
56
+ if (!(err instanceof UsageError))
57
+ throw err;
58
+ process.stderr.write(` ${err.message}\n`);
59
+ process.exit(2);
60
+ }
61
+ }
62
+ async function task(args) {
63
+ const prompt = args.prompt ?? (await readStdin());
64
+ if (!prompt.trim()) {
65
+ process.stderr.write(` ${args.command} needs something to work on\n\n${USAGE}\n`);
66
+ process.exit(2);
67
+ }
68
+ const destinations = parseDestinations(args.outputs ?? [], args.json);
69
+ if (typeof destinations === "string")
70
+ throw new UsageError(destinations);
71
+ // Everything a destination needs is checked before a single token is spent.
72
+ const unreachable = await preflight(destinations);
73
+ if (unreachable)
74
+ throw new UsageError(unreachable);
75
+ const sessionManager = await openSessionManager(process.cwd(), args);
76
+ if (typeof sessionManager === "string")
77
+ throw new UsageError(sessionManager);
78
+ if (args.name)
79
+ sessionManager.appendSessionInfo(args.name);
80
+ let sessionId = null;
81
+ if (!args.noSession)
82
+ sessionId = sessionManager.getSessionId();
83
+ const brief = args.command === "ask";
84
+ return runPrint({
85
+ prompt,
86
+ destinations,
87
+ sessionManager,
88
+ sessionId,
89
+ brief,
90
+ model: args.model,
91
+ exitZero: args.exitZero,
92
+ header: args.header,
93
+ footer: args.footer,
94
+ noDefaultFooter: args.noDefaultFooter,
95
+ });
96
+ }
97
+ async function readStdin() {
98
+ if (process.stdin.isTTY)
99
+ return "";
100
+ const chunks = [];
101
+ for await (const chunk of process.stdin)
102
+ chunks.push(chunk);
103
+ return Buffer.concat(chunks).toString("utf8");
104
+ }
105
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC;IACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,IAAI,CAAC,IAAc;IAChC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC;IAE3B,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,IAAI,CAAC,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AM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,171 @@
1
+ import { existsSync } from "node:fs";
2
+ import { relative } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { TESTEIYA_HOME } from "./env.js";
5
+ import { hasMcp, hasTestomatio, metadataCachePath, vendorBundle } from "./mcp.js";
6
+ import { PROVIDER_KEYS, resolveModel, UsageError } from "./model.js";
7
+ import { loadBundledSkills } from "./skills.js";
8
+ import { BUNDLED_SKILLS_DIR, 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 { count, groups, diagnostics } = await loadBundledSkills();
85
+ const checks = [];
86
+ if (count === 0) {
87
+ checks.push({ name: "skills", status: "warn", detail: "none loaded" });
88
+ }
89
+ if (count > 0) {
90
+ checks.push({ name: "skills", status: "ok", detail: `${count} loaded` });
91
+ for (const { group, skills } of groups) {
92
+ const names = skills.map((skill) => skill.name);
93
+ checks.push({ name: "", status: "list", detail: `${group.padEnd(28)} ${summarize(names)}` });
94
+ }
95
+ }
96
+ // Collisions and parse errors were dropped on the floor before this command.
97
+ for (const diagnostic of diagnostics) {
98
+ const status = diagnostic.type === "error" ? "fail" : "warn";
99
+ let detail = diagnostic.message;
100
+ if (diagnostic.path)
101
+ detail = `${detail} — ${shorten(diagnostic.path)}`;
102
+ checks.push({ name: "skills", status, detail });
103
+ }
104
+ const listed = groups.map(({ group, skills }) => ({
105
+ group,
106
+ skills: skills.map((skill) => skill.name),
107
+ }));
108
+ return { checks, groups: listed };
109
+ }
110
+ function shorten(path) {
111
+ const inBundle = relative(BUNDLED_SKILLS_DIR, path);
112
+ if (inBundle.startsWith(".."))
113
+ return path;
114
+ return inBundle;
115
+ }
116
+ // The full list is `testeiya skills`; this line only proves the right set loaded.
117
+ function summarize(names) {
118
+ if (names.length <= 6)
119
+ return names.join(", ");
120
+ return `${names.slice(0, 6).join(", ")}, +${names.length - 6}`;
121
+ }
122
+ function testomatioCheck() {
123
+ if (!hasTestomatio()) {
124
+ return { name: "testomatio", status: "warn", detail: "no TESTOMATIO token, not connected" };
125
+ }
126
+ if (!hasMcp()) {
127
+ return {
128
+ name: "testomatio",
129
+ status: "warn",
130
+ detail: "token set, no project id — check-tests and REST only",
131
+ };
132
+ }
133
+ return { name: "testomatio", status: "ok", detail: "token and project id, MCP tools on" };
134
+ }
135
+ function mcpCacheCheck() {
136
+ if (!hasMcp())
137
+ return { name: "mcp", status: "ok", detail: "off" };
138
+ const bundle = fileURLToPath(vendorBundle());
139
+ if (!existsSync(bundle)) {
140
+ return { name: "mcp", status: "fail", detail: "vendor bundle missing — run npm run build" };
141
+ }
142
+ if (!existsSync(metadataCachePath())) {
143
+ return { name: "mcp", status: "warn", detail: "tool cache empty, first run is proxy-only" };
144
+ }
145
+ return { name: "mcp", status: "ok", detail: "direct tools and proxy" };
146
+ }
147
+ async function probeCheck(runtime, model) {
148
+ if (!model)
149
+ return { name: "probe", status: "warn", detail: "skipped, no model to probe" };
150
+ const message = await runtime
151
+ .completeSimple(model, { messages: [{ role: "user", content: "ping", timestamp: Date.now() }] })
152
+ .catch((err) => ({ stopReason: "error", errorMessage: String(err) }));
153
+ if (message.stopReason === "error") {
154
+ return { name: "probe", status: "fail", detail: message.errorMessage ?? "request failed" };
155
+ }
156
+ return { name: "probe", status: "ok", detail: "the key works" };
157
+ }
158
+ function worst(checks) {
159
+ if (checks.some((check) => check.status === "fail"))
160
+ return "fail";
161
+ if (checks.some((check) => check.status === "warn"))
162
+ return "warn";
163
+ return "ok";
164
+ }
165
+ const MARK = {
166
+ ok: "✓",
167
+ warn: "!",
168
+ fail: "✗",
169
+ list: " ",
170
+ };
171
+ //# 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,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,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,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEjE,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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