testeiya 0.2.1 → 0.3.9

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 (414) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -213
  3. package/dist/prompt/context.js +79 -0
  4. package/dist/prompt/context.js.map +1 -0
  5. package/dist/prompt/index.js +56 -0
  6. package/dist/prompt/index.js.map +1 -0
  7. package/dist/prompt/print.js +22 -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} +24 -21
  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 +49 -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 +72 -0
  20. package/dist/src/args.js.map +1 -0
  21. package/dist/src/cli.js +61 -0
  22. package/dist/src/cli.js.map +1 -0
  23. package/dist/src/env.js +69 -0
  24. package/dist/src/env.js.map +1 -0
  25. package/dist/src/mcp-extension.js +9 -0
  26. package/dist/src/mcp-extension.js.map +1 -0
  27. package/dist/src/mcp.js +139 -0
  28. package/dist/src/mcp.js.map +1 -0
  29. package/dist/src/model.js +66 -0
  30. package/dist/src/model.js.map +1 -0
  31. package/dist/src/result.js +41 -0
  32. package/dist/src/result.js.map +1 -0
  33. package/dist/src/run.js +199 -0
  34. package/dist/src/run.js.map +1 -0
  35. package/dist/src/session.js +77 -0
  36. package/dist/src/session.js.map +1 -0
  37. package/dist/vendor/mcp.js +14801 -0
  38. package/mcp-tools.json +2967 -0
  39. package/package.json +29 -42
  40. package/prompt/context.ts +101 -0
  41. package/prompt/index.ts +93 -0
  42. package/prompt/print.ts +23 -0
  43. package/prompt/project-info.ts +30 -0
  44. package/prompt/system-prompt.ts +173 -0
  45. package/{src/prompt → prompt}/testomatio.ts +119 -8
  46. package/{src/prompt → prompt}/tools.ts +30 -8
  47. package/prompt/vocab.ts +7 -0
  48. package/{skills.lock.json → skills/skills.lock.json} +11 -7
  49. package/skills/skills.yaml +34 -0
  50. package/assets/testeiya-logo-dark.svg +0 -16
  51. package/assets/testeiya-logo.svg +0 -15
  52. package/models.catalog.json +0 -6963
  53. package/skills/codeceptjs/ci-fix-tests/SKILL.md +0 -120
  54. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +0 -158
  55. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +0 -91
  56. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +0 -158
  57. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +0 -90
  58. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +0 -234
  59. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +0 -110
  60. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +0 -306
  61. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +0 -352
  62. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +0 -472
  63. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +0 -350
  64. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +0 -81
  65. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +0 -206
  66. package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
  67. package/skills/playwright-best-practices-skill/README.md +0 -147
  68. package/skills/playwright-best-practices-skill/SKILL.md +0 -303
  69. package/skills/playwright-best-practices-skill/advanced/authentication-flows.md +0 -360
  70. package/skills/playwright-best-practices-skill/advanced/authentication.md +0 -871
  71. package/skills/playwright-best-practices-skill/advanced/clock-mocking.md +0 -364
  72. package/skills/playwright-best-practices-skill/advanced/mobile-testing.md +0 -409
  73. package/skills/playwright-best-practices-skill/advanced/multi-context.md +0 -288
  74. package/skills/playwright-best-practices-skill/advanced/multi-user.md +0 -393
  75. package/skills/playwright-best-practices-skill/advanced/network-advanced.md +0 -452
  76. package/skills/playwright-best-practices-skill/advanced/third-party.md +0 -464
  77. package/skills/playwright-best-practices-skill/architecture/pom-vs-fixtures.md +0 -363
  78. package/skills/playwright-best-practices-skill/architecture/test-architecture.md +0 -369
  79. package/skills/playwright-best-practices-skill/architecture/when-to-mock.md +0 -383
  80. package/skills/playwright-best-practices-skill/browser-apis/browser-apis.md +0 -391
  81. package/skills/playwright-best-practices-skill/browser-apis/iframes.md +0 -403
  82. package/skills/playwright-best-practices-skill/browser-apis/service-workers.md +0 -504
  83. package/skills/playwright-best-practices-skill/browser-apis/websockets.md +0 -403
  84. package/skills/playwright-best-practices-skill/core/annotations.md +0 -424
  85. package/skills/playwright-best-practices-skill/core/assertions-waiting.md +0 -361
  86. package/skills/playwright-best-practices-skill/core/configuration.md +0 -452
  87. package/skills/playwright-best-practices-skill/core/fixtures-hooks.md +0 -417
  88. package/skills/playwright-best-practices-skill/core/global-setup.md +0 -434
  89. package/skills/playwright-best-practices-skill/core/locators.md +0 -242
  90. package/skills/playwright-best-practices-skill/core/page-object-model.md +0 -315
  91. package/skills/playwright-best-practices-skill/core/projects-dependencies.md +0 -453
  92. package/skills/playwright-best-practices-skill/core/test-data.md +0 -492
  93. package/skills/playwright-best-practices-skill/core/test-suite-structure.md +0 -361
  94. package/skills/playwright-best-practices-skill/core/test-tags.md +0 -298
  95. package/skills/playwright-best-practices-skill/debugging/console-errors.md +0 -420
  96. package/skills/playwright-best-practices-skill/debugging/debugging.md +0 -504
  97. package/skills/playwright-best-practices-skill/debugging/error-testing.md +0 -360
  98. package/skills/playwright-best-practices-skill/debugging/flaky-tests.md +0 -496
  99. package/skills/playwright-best-practices-skill/frameworks/angular.md +0 -530
  100. package/skills/playwright-best-practices-skill/frameworks/nextjs.md +0 -469
  101. package/skills/playwright-best-practices-skill/frameworks/react.md +0 -531
  102. package/skills/playwright-best-practices-skill/frameworks/vue.md +0 -574
  103. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/ci-cd.md +0 -468
  104. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/docker.md +0 -283
  105. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/github-actions.md +0 -546
  106. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/gitlab.md +0 -397
  107. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/other-providers.md +0 -521
  108. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/parallel-sharding.md +0 -371
  109. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/performance.md +0 -453
  110. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/reporting.md +0 -424
  111. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/test-coverage.md +0 -497
  112. package/skills/playwright-best-practices-skill/testing-patterns/accessibility.md +0 -359
  113. package/skills/playwright-best-practices-skill/testing-patterns/api-testing.md +0 -719
  114. package/skills/playwright-best-practices-skill/testing-patterns/browser-extensions.md +0 -506
  115. package/skills/playwright-best-practices-skill/testing-patterns/canvas-webgl.md +0 -493
  116. package/skills/playwright-best-practices-skill/testing-patterns/component-testing.md +0 -500
  117. package/skills/playwright-best-practices-skill/testing-patterns/drag-drop.md +0 -576
  118. package/skills/playwright-best-practices-skill/testing-patterns/electron.md +0 -509
  119. package/skills/playwright-best-practices-skill/testing-patterns/file-operations.md +0 -377
  120. package/skills/playwright-best-practices-skill/testing-patterns/file-upload-download.md +0 -562
  121. package/skills/playwright-best-practices-skill/testing-patterns/forms-validation.md +0 -561
  122. package/skills/playwright-best-practices-skill/testing-patterns/graphql-testing.md +0 -331
  123. package/skills/playwright-best-practices-skill/testing-patterns/i18n.md +0 -508
  124. package/skills/playwright-best-practices-skill/testing-patterns/performance-testing.md +0 -476
  125. package/skills/playwright-best-practices-skill/testing-patterns/security-testing.md +0 -430
  126. package/skills/playwright-best-practices-skill/testing-patterns/visual-regression.md +0 -634
  127. package/skills/playwright-cli/SKILL.md +0 -420
  128. package/skills/playwright-cli/references/element-attributes.md +0 -23
  129. package/skills/playwright-cli/references/playwright-tests.md +0 -39
  130. package/skills/playwright-cli/references/request-mocking.md +0 -87
  131. package/skills/playwright-cli/references/running-code.md +0 -241
  132. package/skills/playwright-cli/references/session-management.md +0 -225
  133. package/skills/playwright-cli/references/storage-state.md +0 -275
  134. package/skills/playwright-cli/references/test-generation.md +0 -433
  135. package/skills/playwright-cli/references/tracing.md +0 -139
  136. package/skills/playwright-cli/references/video-recording.md +0 -143
  137. package/skills/testeiya/README.md +0 -29
  138. package/skills/testeiya/answer-formatting/SKILL.md +0 -30
  139. package/skills/testeiya/check-cucumber/SKILL.md +0 -200
  140. package/skills/testeiya/check-tests/SKILL.md +0 -260
  141. package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
  142. package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
  143. package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
  144. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
  145. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
  146. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
  147. package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
  148. package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
  149. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
  150. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
  151. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
  152. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
  153. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
  154. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
  155. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
  156. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
  157. package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
  158. package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
  159. package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
  160. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
  161. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
  162. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
  163. package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
  164. package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
  165. package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
  166. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
  167. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
  168. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
  169. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
  170. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
  171. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
  172. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
  173. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
  174. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
  175. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
  176. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
  177. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
  178. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
  179. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
  180. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
  181. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
  182. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
  183. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
  184. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
  185. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
  186. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
  187. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
  188. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
  189. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
  190. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
  191. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
  192. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
  193. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
  194. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
  195. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
  196. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
  197. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
  198. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
  199. package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
  200. package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
  201. package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
  202. package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
  203. package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
  204. package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
  205. package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
  206. package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
  207. package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
  208. package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
  209. package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
  210. package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
  211. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
  212. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
  213. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
  214. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
  215. package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
  216. package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
  217. package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
  218. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
  219. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
  220. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
  221. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
  222. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
  223. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
  224. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
  225. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
  226. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
  227. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
  228. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
  229. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
  230. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
  231. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
  232. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
  233. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
  234. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
  235. package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
  236. package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
  237. package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
  238. package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
  239. package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
  240. package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
  241. package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
  242. package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
  243. package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
  244. package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
  245. package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
  246. package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
  247. package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
  248. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
  249. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
  250. package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
  251. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
  252. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
  253. package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
  254. package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
  255. package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
  256. package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
  257. package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
  258. package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
  259. package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
  260. package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
  261. package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
  262. package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
  263. package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
  264. package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
  265. package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
  266. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
  267. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
  268. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
  269. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
  270. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
  271. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
  272. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
  273. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
  274. package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
  275. package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
  276. package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
  277. package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
  278. package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
  279. package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
  280. package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
  281. package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
  282. package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
  283. package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
  284. package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
  285. package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
  286. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +0 -88
  287. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +0 -95
  288. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +0 -334
  289. package/skills/testomatio/test-automation/automate-manual-test-cases/CLAUDE.md +0 -56
  290. package/skills/testomatio/test-automation/automate-manual-test-cases/SKILL.md +0 -242
  291. package/skills/testomatio/test-automation/automate-manual-test-cases/references/CODECEPTJS_BEST_PRACTICES.md +0 -182
  292. package/skills/testomatio/test-automation/automate-manual-test-cases/references/FINAL_SUMMARY_TEMPLATE.md +0 -22
  293. package/skills/testomatio/test-automation/automate-manual-test-cases/references/PLAYWRIGHT_BEST_PRACTICES.md +0 -90
  294. package/skills/testomatio/test-automation/automate-manual-test-cases/references/POM_BEST_PRACTICES.md +0 -53
  295. package/skills/testomatio/test-automation/automate-manual-test-cases/references/TEST_DATA_MANAGEMENT.md +0 -52
  296. package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/SKILL.md +0 -107
  297. package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/references/DEBUGGING_QUICK_REFERENCE.md +0 -113
  298. package/skills/testomatio/test-automation/qa-automation-test-consolidation/SKILL.md +0 -29
  299. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +0 -151
  300. package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
  301. package/skills/testomatio/test-automation/testomat-allure-adapter/SKILL.md +0 -289
  302. package/skills/testomatio/test-management/detect-duplicate-test-cases/SKILL.md +0 -86
  303. package/skills/testomatio/test-management/detect-duplicate-test-cases/references/DUPLICATE_INSTRUCTIONS.md +0 -54
  304. package/skills/testomatio/test-management/improve-test-cases/SKILL.md +0 -114
  305. package/skills/testomatio/test-management/improve-test-cases/references/TESTOMAT_MARKDOWN_EXAMPLE.md +0 -66
  306. package/skills/testomatio/test-management/pull-request-diff-analyzer/SKILL.md +0 -141
  307. package/skills/testomatio/test-management/qa-e2e-tests-reporting/SKILL.md +0 -354
  308. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_ARTIFACTS.md +0 -82
  309. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_HTML_REPORT.md +0 -37
  310. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_REPORTERS_CONFIG.md +0 -118
  311. package/skills/testomatio/test-management/qa-pr-requirements-analyzer/SKILL.md +0 -149
  312. package/skills/testomatio/test-management/qa-pr-requirements-analyzer/references/summary-example.md +0 -54
  313. package/skills/testomatio/test-management/qa-requirement-reviewer/SKILL.md +0 -126
  314. package/skills/testomatio/test-management/qa-requirement-reviewer/references/requirements_reviewer_examples.md +0 -128
  315. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +0 -174
  316. package/skills/testomatio/test-management/qa-test-code-coverage/references/COVERAGE_FILE_FORMAT.md +0 -138
  317. package/skills/testomatio/test-management/qa-test-code-coverage/references/E2E_FRAMEWORKS.md +0 -65
  318. package/skills/testomatio/test-management/qa-test-code-coverage/scripts/check-coverage.mjs +0 -40
  319. package/skills/testomatio/test-management/qa-thinking/SKILL.md +0 -36
  320. package/skills/testomatio/test-management/qa-write-test-cases/SKILL.md +0 -267
  321. package/skills/testomatio/test-management/qa-write-test-cases/references/test-case-format.md +0 -387
  322. package/skills/testomatio/test-management/qa-write-test-cases/references/testomat-tms-guide.md +0 -72
  323. package/skills/testomatio/test-management/qa-write-test-cases/references/writing-rule.md +0 -159
  324. package/skills/testomatio/test-management/scan-automation-project/SKILL.md +0 -152
  325. package/skills/testomatio/test-management/sync-test-cases-with-tms/SKILL.md +0 -107
  326. package/skills/testomatio/test-management/sync-test-cases-with-tms/references/TESTOMATIO_CLI.md +0 -140
  327. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +0 -182
  328. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +0 -169
  329. package/skills.yaml +0 -21
  330. package/src/ai-debug.ts +0 -188
  331. package/src/api/agent-get.ts +0 -22
  332. package/src/api/agent-start.ts +0 -384
  333. package/src/api/client-log.ts +0 -29
  334. package/src/api/context.ts +0 -332
  335. package/src/api/debug-layout.ts +0 -47
  336. package/src/api/debug-report.ts +0 -29
  337. package/src/api/debug-snapshot.ts +0 -30
  338. package/src/api/debug-stream.ts +0 -52
  339. package/src/api/files-delete.ts +0 -184
  340. package/src/api/files-read.ts +0 -41
  341. package/src/api/files-rename.ts +0 -99
  342. package/src/api/files-tree.ts +0 -292
  343. package/src/api/files-write.ts +0 -41
  344. package/src/api/mcp.ts +0 -603
  345. package/src/api/memory.ts +0 -69
  346. package/src/api/open-external.ts +0 -39
  347. package/src/api/playwright-cli.ts +0 -606
  348. package/src/api/providers.ts +0 -457
  349. package/src/api/read-env-token.ts +0 -33
  350. package/src/api/sessions.ts +0 -79
  351. package/src/api/settings.ts +0 -120
  352. package/src/api/skills.ts +0 -58
  353. package/src/api/testomatio-attachment.ts +0 -89
  354. package/src/api/testomatio-auth.ts +0 -284
  355. package/src/api/testomatio-proxy.ts +0 -197
  356. package/src/api/testomatio-run-stats.ts +0 -81
  357. package/src/api/testomatio-target.ts +0 -225
  358. package/src/api/testomatio-transcription.ts +0 -82
  359. package/src/api/workspace-search.ts +0 -96
  360. package/src/api/workspace-sync.ts +0 -151
  361. package/src/api/workspace.ts +0 -165
  362. package/src/app-server.ts +0 -556
  363. package/src/bridge.ts +0 -251
  364. package/src/check-tests.ts +0 -156
  365. package/src/cli.ts +0 -17
  366. package/src/commands.ts +0 -244
  367. package/src/config.ts +0 -183
  368. package/src/connection.ts +0 -658
  369. package/src/context-store.ts +0 -265
  370. package/src/debug-bus.ts +0 -405
  371. package/src/extensions/tool-gate.ts +0 -220
  372. package/src/extensions/webui/ask-channel.ts +0 -52
  373. package/src/extensions/webui/index.ts +0 -184
  374. package/src/extensions/webui/tools/ask-question.ts +0 -88
  375. package/src/extensions/webui/tools/query-result.ts +0 -79
  376. package/src/extensions/webui/tools/render-chart.ts +0 -53
  377. package/src/extensions/webui/tools/render-item.ts +0 -61
  378. package/src/extensions/webui/tools/render-list.ts +0 -170
  379. package/src/extensions/webui/tools/render-result.ts +0 -85
  380. package/src/extensions/webui/tools/render-tree.ts +0 -71
  381. package/src/extensions/webui/tools/ui-widget.ts +0 -54
  382. package/src/extensions/webui/tools/widget-result.ts +0 -13
  383. package/src/extensions/webui/widget-channel.ts +0 -50
  384. package/src/file-log.ts +0 -196
  385. package/src/git-tracked.ts +0 -68
  386. package/src/gitignore.ts +0 -53
  387. package/src/json-store.ts +0 -43
  388. package/src/load-env.ts +0 -70
  389. package/src/loader-style.ts +0 -96
  390. package/src/main.ts +0 -140
  391. package/src/mcp-catalog.ts +0 -96
  392. package/src/models-catalog.ts +0 -72
  393. package/src/permissions.ts +0 -120
  394. package/src/project-dir.ts +0 -189
  395. package/src/project-info.ts +0 -108
  396. package/src/prompt/app-ui.ts +0 -59
  397. package/src/prompt/browser.ts +0 -27
  398. package/src/prompt/index.ts +0 -62
  399. package/src/server-info.ts +0 -62
  400. package/src/session-factory.ts +0 -442
  401. package/src/session-store.ts +0 -115
  402. package/src/shell-env.ts +0 -45
  403. package/src/skills.ts +0 -163
  404. package/src/sync-snapshot.ts +0 -140
  405. package/src/telemetry.ts +0 -239
  406. package/src/testomatio-auth.ts +0 -299
  407. package/src/testomatio.ts +0 -98
  408. package/src/theme.ts +0 -30
  409. package/src/user-env.ts +0 -94
  410. package/src/welcome.ts +0 -194
  411. package/src/workspace/safe-path.ts +0 -85
  412. package/src/workspace/test-md.ts +0 -70
  413. package/src/workspace-model.ts +0 -440
  414. package/testeiya.config.json +0 -14
@@ -0,0 +1,264 @@
1
+ import dedent from "dedent";
2
+ const MAX_PROMPT_LABELS = 20;
3
+ const MAX_PROMPT_TAGS = 30;
4
+ const MAX_PROMPT_ENVS = 15;
5
+ const tmsViaDirectTools = dedent `
6
+ # Testomat.io-first operating rules (highest priority)
7
+
8
+ This agent works on Testomat.io projects. You have TWO sources of truth and they answer different kinds of questions:
9
+
10
+ 1. **The pulled markdown workspace (\`cwd\`)** — for **tests** and **suites**. Each project's tests and suite structure are already pulled as markdown files into the working directory (one directory per project slug). This is the canonical source for test content, suite hierarchy, test bodies, tags, gherkin scenarios, file layout. Use \`read\`, \`find\`, \`grep\`, \`ls\` — they're instant and don't hit the network.
11
+ 2. **MCP tools under \`testomatio-<slug>\`** — for **dynamic Testomat.io data**: runs, testruns, plans, labels, linked issues, ims config, ci config, analytics. These things don't live as files and MUST come from MCP.
12
+
13
+ **Prefer the filesystem for test/suite queries.** Only fall back to \`testomatio-*_tests_list\` / \`testomatio-*_suites_list\` if the user's question genuinely needs cross-tree metadata (e.g. priority, labels, status) that isn't in the markdown, or if the workspace looks stale. Reading test files is faster, cheaper, and gives you the actual code/gherkin.
14
+
15
+ **Never** ask the user for the **Testomat.io** API token — it's configured. (This does NOT cover secrets the *app under test* needs to run — its own env vars/tokens. If a test run is blocked by one of those, ask for it.)
16
+
17
+ **Statuses and counts are live** — runs change them at any time. Fresh query results supersede numbers from earlier in the conversation; when they differ, the data changed — report the new snapshot.
18
+
19
+ ## Banned moves
20
+
21
+ - Do NOT call an MCP \`*_tests_list\` or \`*_suites_list\` as your first action for a test/suite question — **read the filesystem first** (\`find\`, \`ls\`, \`grep\`, \`read\`). Fall back to MCP only if the metadata you need isn't in the markdown.
22
+ - Do NOT ask the user for the **Testomat.io** API token — it's already configured. (Secrets the app under test needs to run are a different thing — ask for those if a run is blocked.)
23
+ - Do NOT call \`bash\` / \`find\` / \`grep\` to answer questions about **runs, testruns, plans, labels, linked issues, analytics** — those don't exist as files. Use MCP.
24
+
25
+ ## Filesystem vs. MCP cheat sheet
26
+
27
+ | Question is about… | First action |
28
+ |---|---|
29
+ | Test content (code, steps, gherkin, description, file path, tags) | \`read\` / \`find\` / \`grep\` in \`cwd\` |
30
+ | Suite hierarchy / structure / which files exist | \`ls\` / \`find\` |
31
+ | Individual test metadata (priority, status flag, labels) | try filesystem; if missing, \`testomatio-*_tests_get\` |
32
+ | Runs, testruns, plans, labels, issues, analytics | MCP \`testomatio-*\` tools |
33
+ | Creating/updating tests or suites | edit the markdown file, then \`npx check-tests push\` |
34
+ | Creating/updating runs, linking issues | MCP create/update tools |
35
+ | Launching automated or mixed Run remotely on CI | Use npx @testomatio/reporter run --remote <profile>, raise error if no CI profiles configured
36
+ | Running automated Run | Use local test runner with testomatio reporter attached to report to current project
37
+
38
+ ---
39
+ `;
40
+ const tmsViaProxy = dedent `
41
+ # Testomat.io-first operating rules (highest priority)
42
+
43
+ This agent works on a Testomat.io project. You have TWO sources of truth and they answer different kinds of questions:
44
+
45
+ 1. **The pulled markdown workspace (\`cwd\`)** — for **tests** and **suites**. Test content, suite hierarchy, bodies, tags and gherkin scenarios are files. Use \`read\`, \`find\`, \`grep\`, \`ls\` — they are instant and hit no network.
46
+ 2. **The \`mcp\` tool** — for **dynamic Testomat.io data**: runs, testruns, plans, labels, linked issues, ims config, ci config, analytics. These do not live as files and MUST come from there.
47
+
48
+ Testomat.io is reached through **one \`mcp\` tool**, not a tool per operation. Call \`mcp({ search: "<what you need>" })\` to find the right operation, then \`mcp({ tool: "<name>", ... })\` to run it. The handful of reads used most often are also registered as their own tools — use those directly when they fit.
49
+
50
+ **Prefer the filesystem for test/suite queries.** Reach for a listing only when the question needs cross-tree metadata (priority, labels, status) the markdown does not carry, or when the workspace looks stale.
51
+
52
+ **Never** ask the user for the **Testomat.io** API token — it's configured. (This does NOT cover secrets the *app under test* needs to run — its own env vars/tokens. If a test run is blocked by one of those, report it.)
53
+
54
+ **Statuses and counts are live** — runs change them at any time. Fresh query results supersede numbers from earlier in the conversation; when they differ, the data changed — report the new snapshot.
55
+
56
+ ## Banned moves
57
+
58
+ - Do NOT search for an operation as your first action for a test/suite question — **read the filesystem first** (\`find\`, \`ls\`, \`grep\`, \`read\`). Fall back to a listing only if the metadata you need isn't in the markdown.
59
+ - Do NOT ask the user for the **Testomat.io** API token — it's already configured. (Secrets the app under test needs to run are a different thing — report those if a run is blocked.)
60
+ - Do NOT call \`bash\` / \`find\` / \`grep\` to answer questions about **runs, testruns, plans, labels, linked issues, analytics** — those don't exist as files.
61
+
62
+ ## Filesystem vs. Testomat.io cheat sheet
63
+
64
+ | Question is about… | First action |
65
+ |---|---|
66
+ | Test content (code, steps, gherkin, description, file path, tags) | \`read\` / \`find\` / \`grep\` in \`cwd\` |
67
+ | Suite hierarchy / structure / which files exist | \`ls\` / \`find\` |
68
+ | Individual test metadata (priority, status flag, labels) | try filesystem; if missing, \`mcp({ search: "get test" })\` |
69
+ | Runs, testruns, plans, labels, issues, analytics | \`mcp({ search: … })\`, then \`mcp({ tool: … })\` |
70
+ | Creating/updating tests or suites | edit the markdown file, then \`npx check-tests push\` |
71
+ | Creating/updating runs, linking issues | the matching \`mcp\` create/update operation |
72
+ | Launching automated or mixed Run remotely on CI | Use npx @testomatio/reporter run --remote <profile>, raise error if no CI profiles configured |
73
+ | Running automated Run | Use local test runner with testomatio reporter attached to report to current project |
74
+
75
+ ---
76
+ `;
77
+ const tmsViaCli = dedent `
78
+ # Testomat.io-first operating rules (highest priority)
79
+
80
+ This agent works on a Testomat.io project through the **shell only** — there are no Testomat.io tools in this session.
81
+
82
+ 1. **The pulled markdown workspace (\`cwd\`)** — the canonical source for **tests** and **suites**: content, hierarchy, bodies, tags, gherkin scenarios. Use \`read\`, \`find\`, \`grep\`, \`ls\`.
83
+ 2. **\`npx check-tests\`** — moves test cases between the markdown and Testomat.io (\`pull\`, \`push\`). It reads its credentials from the environment.
84
+ 3. **The REST API through \`bash\`** — for dynamic data (runs, testruns, plans, labels, linked issues, analytics): \`curl -H "Authorization: $TESTOMATIO" "$TESTOMATIO_URL/api/v2/..."\`.
85
+
86
+ **Never** ask the user for the **Testomat.io** API token — it's configured as \`TESTOMATIO\`. (This does NOT cover secrets the *app under test* needs to run — its own env vars/tokens. If a test run is blocked by one of those, report it.)
87
+
88
+ **Statuses and counts are live** — runs change them at any time. Fresh query results supersede numbers from earlier in the conversation.
89
+
90
+ ## Banned moves
91
+
92
+ - Do NOT shell out for test content that is already a file in \`cwd\` — read the file.
93
+ - Do NOT invent REST paths or parameters. Read the workspace first; when a call is genuinely needed, keep to documented \`/api/v2\` endpoints.
94
+ - Do NOT ask the user for the **Testomat.io** API token.
95
+
96
+ ## Filesystem vs. shell cheat sheet
97
+
98
+ | Question is about… | First action |
99
+ |---|---|
100
+ | Test content (code, steps, gherkin, description, file path, tags) | \`read\` / \`find\` / \`grep\` in \`cwd\` |
101
+ | Suite hierarchy / structure / which files exist | \`ls\` / \`find\` |
102
+ | Runs, testruns, plans, labels, issues, analytics | \`curl\` against \`/api/v2\` |
103
+ | Creating/updating tests or suites | edit the markdown file, then \`npx check-tests push\` |
104
+ | Launching automated or mixed Run remotely on CI | Use npx @testomatio/reporter run --remote <profile>, raise error if no CI profiles configured |
105
+ | Running automated Run | Use local test runner with testomatio reporter attached to report to current project |
106
+
107
+ ---
108
+ `;
109
+ /**
110
+ * How the agent reaches Testomat.io in this session. The rules are the same;
111
+ * the way to act on them is not, so the harness picks the matching wording.
112
+ */
113
+ export function testomatioTms(access) {
114
+ if (access === "mcp-proxy")
115
+ return tmsViaProxy;
116
+ if (access === "cli-only")
117
+ return tmsViaCli;
118
+ return tmsViaDirectTools;
119
+ }
120
+ export function testomatioConnection(tokenSlugs, backendUrl, connection, access = "mcp-direct") {
121
+ let urlSuffix = "";
122
+ if (backendUrl)
123
+ urlSuffix = ` (\`${backendUrl}\`)`;
124
+ if (tokenSlugs.length === 0) {
125
+ let project = "";
126
+ if (connection?.projectId)
127
+ project = ` \`${connection.projectId}\``;
128
+ if (connection?.title)
129
+ project += ` ("${connection.title}")`;
130
+ return dedent `
131
+ ## Testomat.io Connection (pre-configured)
132
+
133
+ This workspace is linked to the Testomat.io project${project}.
134
+
135
+ The project API key is **already set** as \`TESTOMATIO\` in the environment of every \`bash\` command you run, along with \`TESTOMATIO_URL\`${urlSuffix}. **Never ask the user for a Testomat.io token or API key** — it is already in scope.
136
+
137
+ Push or pull manual test cases with \`npx check-tests\` (or other \`npx @testomatio/*\` commands) — they pick the credentials up from the environment. ${envTokenActions(access)}
138
+
139
+ `;
140
+ }
141
+ if (tokenSlugs.length > 1) {
142
+ const projects = tokenSlugs.map((s) => `- ${s}`).join("\n");
143
+ return dedent `
144
+ ## Testomat.io Connection (pre-configured)
145
+
146
+ This session spans several Testomat.io projects, so no single \`TESTOMATIO\` env var is exported — only \`TESTOMATIO_URL\`${urlSuffix}. Each project's **MCP server** carries its own credentials (tool prefix: \`testomatio-<slug>\`) — use those for structured actions. **Never ask the user for a Testomat.io token or API key.** Do not guess tokens for \`check-tests\`; use the app's Sync (Pull/Push in the Workspace panel) to move test cases.
147
+
148
+ Projects pulled into this working directory (one dir per project):
149
+ ${projects}
150
+
151
+ `;
152
+ }
153
+ const projects = tokenSlugs.map((s) => `- ${s}`).join("\n");
154
+ return dedent `
155
+ ## Testomat.io Connection (pre-configured)
156
+
157
+ The Testomat.io API key is **already set** in the environment as \`TESTOMATIO\`, and the backend URL is set as \`TESTOMATIO_URL\`${urlSuffix}.
158
+
159
+ **Do not ask the user for a Testomat.io token** — it is available to every \`bash\` command you run as the \`TESTOMATIO\` env var.
160
+
161
+ Projects pulled into this working directory (one dir per project):
162
+ ${projects}
163
+
164
+ ${perProjectActions(access)}
165
+
166
+ When you need to push changes back, run \`npx check-tests push\` (or similar \`npx @testomatio/*\` commands) directly — credentials are already in scope.
167
+
168
+ `;
169
+ }
170
+ export function testomatioNotConnected() {
171
+ return dedent `
172
+ ## Testomat.io Connection (not connected)
173
+
174
+ This workspace is not linked to a Testomat.io project and no API key is available in the environment.
175
+
176
+ **Never ask the user to paste a Testomat.io API key or token into the chat.** If a task needs Testomat.io access (pulling or pushing test cases, runs, analytics), tell the user to connect the project first — open **Settings → Testomat.io connection** and link this workspace — then continue once connected. Parts of the task that only touch local files can proceed right away.
177
+ `;
178
+ }
179
+ /**
180
+ * Compact project-settings block for the system prompt, built from the cached
181
+ * `GET /api/v2/{id}/info` payload (`.testeiya/project-info.json`). Only present
182
+ * fields are rendered; labels/tags are capped with a pointer to the full file.
183
+ */
184
+ export function projectSettings(info) {
185
+ let heading = `**${info.title}** (\`${info.project_id}\`)`;
186
+ if (info.subscription)
187
+ heading += ` — ${info.subscription} plan`;
188
+ const lines = [];
189
+ const stack = [];
190
+ if (info.framework)
191
+ stack.push(`framework: ${info.framework}`);
192
+ if (info.language)
193
+ stack.push(`language: ${info.language}`);
194
+ if (stack.length > 0)
195
+ lines.push(`- Test stack — ${stack.join(", ")}`);
196
+ if (info.repository_url)
197
+ lines.push(`- Repository: ${info.repository_url}`);
198
+ if (info.artifacts_storage_enabled) {
199
+ lines.push("- Artifacts storage is enabled (test runs can attach screenshots/videos/logs)");
200
+ }
201
+ if (info.environments?.length > 0) {
202
+ const shown = info.environments.slice(0, MAX_PROMPT_ENVS);
203
+ lines.push(`- Environments: ${capped(shown, info.environments.length)}`);
204
+ }
205
+ if (info.features?.length > 0) {
206
+ lines.push(`- Enabled features: ${info.features.join(", ")}`);
207
+ }
208
+ if (info.labels?.length > 0) {
209
+ const shown = info.labels
210
+ .slice(0, MAX_PROMPT_LABELS)
211
+ .map((l) => `${l.title} (\`${l.slug}\`)`);
212
+ lines.push(`- Labels defined in this project: ${capped(shown, info.labels.length)}`);
213
+ }
214
+ if (info.tags?.length > 0) {
215
+ const shown = info.tags.slice(0, MAX_PROMPT_TAGS).map((t) => `@${t}`);
216
+ lines.push(`- Tags in use: ${capped(shown, info.tags.length)}`);
217
+ }
218
+ if (info.ci_profiles?.length > 0) {
219
+ const profiles = info.ci_profiles.map((p) => {
220
+ if (p.service)
221
+ return `"${p.profile_name}" (${p.service})`;
222
+ return `"${p.profile_name}"`;
223
+ });
224
+ lines.push(`- CI profiles configured (runs can be triggered through them): ${profiles.join(", ")}`);
225
+ }
226
+ let body = heading;
227
+ if (lines.length > 0)
228
+ body += `\n\n${lines.join("\n")}`;
229
+ return dedent `
230
+ ## Project Settings (Testomat.io)
231
+
232
+ ${body}
233
+
234
+ Use these when creating or editing tests: assign only labels that exist here, reuse the existing tags/environments before inventing new ones, and match the project's framework/language when generating automated tests. The full configuration JSON (every label, tag, and CI profile config) is cached at \`.testeiya/project-info.json\` — read that file when you need the complete lists.
235
+ `;
236
+ }
237
+ // How to act on a connection whose token comes from the environment.
238
+ function envTokenActions(access) {
239
+ if (access === "mcp-proxy") {
240
+ return "For structured actions (list/create/update tests, runs, labels, suites, etc.) prefer the `mcp` tool: `mcp({ search })` to find an operation, `mcp({ tool })` to run it.";
241
+ }
242
+ if (access === "cli-only") {
243
+ return "For runs, plans, labels and analytics use `curl` against `/api/v2` — there are no Testomat.io tools in this session.";
244
+ }
245
+ return "If `testomatio-*` MCP tools are available, prefer them for structured actions (list/create/update tests, runs, labels, suites, etc.).";
246
+ }
247
+ // The same, where the harness runs one MCP server per pulled project.
248
+ function perProjectActions(access) {
249
+ if (access === "mcp-proxy") {
250
+ return "The **Testomat.io MCP server** is also connected, reached through the `mcp` tool (`mcp({ search })` to find an operation, `mcp({ tool })` to run it). Prefer it for structured actions (list/create/update tests, runs, labels, suites, etc.) — those are typed, safer, and faster than shell calls. Fall back to `bash` + `check-tests` only for things it does not cover (e.g. pulling full markdown files).";
251
+ }
252
+ if (access === "cli-only") {
253
+ return "There are no Testomat.io tools in this session: use `npx check-tests` for test cases and `curl` against `/api/v2` for runs, plans and labels.";
254
+ }
255
+ return "The **Testomat.io MCP server** is also auto-connected, one instance per project (tool prefix: `testomatio-<slug>`). Prefer MCP tools for structured actions (list/create/update tests, runs, labels, suites, etc.) — they are typed, safer, and faster than shell calls. Fall back to `bash` + `check-tests` only for things the MCP does not cover (e.g. pulling full markdown files).";
256
+ }
257
+ function capped(shown, total) {
258
+ let suffix = "";
259
+ if (total > shown.length) {
260
+ suffix = ` … and ${total - shown.length} more (see \`.testeiya/project-info.json\`)`;
261
+ }
262
+ return shown.join(", ") + suffix;
263
+ }
264
+ //# sourceMappingURL=testomatio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testomatio.js","sourceRoot":"","sources":["../../prompt/testomatio.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,iBAAiB,GAAG,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC/B,CA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B,MAAM,GAAG,UAAU,KAAK,GAAG,KAAK,CAAC,MAAM,6CAA6C,CAAC;IACvF,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACnC,CAAC"}
@@ -0,0 +1,49 @@
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 github = ' - GitHub: issues and projects through MCP.';
13
+ if (hasGh()) {
14
+ github +=
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
+ return dedent `
18
+ <available-tools>
19
+ You have these tools available:
20
+ * **Read operations (use freely):** \`read\`, \`grep\`, \`ls\`.
21
+ - Use these aggressively to understand the system under test before proposing changes.
22
+ * **Write operations (restricted):** \`write\`, \`edit\`, \`bash\`.
23
+ - Requires explicit user confirmation for destructive or shared-state actions.
24
+ ${extra} * **Internal Skills:** For QA-related tasks, check available skills first and prefer using them when applicable.
25
+ * **External Integrations:** Use MCP tools when they provide superior data or specialized integrations.
26
+ - Primary MCP (Testomat.io): Use Testomat.io MCP tools to extend functionality.
27
+ - Secondary MCP (Jira, GitHub, etc.): Invoke only when user explicitly asks or when remote context exploration is required.
28
+ ${github}
29
+
30
+ <tool-governance>
31
+ * **Prioritize Specificity:** Use \`read\` instead of \`cat\`, and \`edit\` instead of \`sed\`. Dedicated tools provide better error tracking and safety.
32
+ * **Parallel Execution:** Call independent tools in parallel to minimize latency. Sequential calls are reserved for operations with data dependencies.
33
+ * **Atomic Updates:** Mark tasks as complete in your internal state immediately upon execution. Do not batch status updates.
34
+ * **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.
35
+ </tool-governance>
36
+ </available-tools>
37
+ `;
38
+ }
39
+ /** Is the `gh` CLI on PATH? Never tell the agent to use a binary this machine lacks. */
40
+ function hasGh() {
41
+ for (const dir of (process.env.PATH ?? '').split(delimiter)) {
42
+ if (!dir)
43
+ continue;
44
+ if (existsSync(join(dir, 'gh')) || existsSync(join(dir, 'gh.exe')))
45
+ return true;
46
+ }
47
+ return false;
48
+ }
49
+ //# 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,MAAM,GAAG,gDAAgD,CAAC;IAC9D,IAAI,KAAK,EAAE,EAAE,CAAC;QACZ,MAAM;YACJ,8JAA8J,CAAC;IACnK,CAAC;IACD,OAAO,MAAM,CAAA;;;;;;;EAOb,KAAK;;;;EAIL,MAAM;;;;;;;;;CASP,CAAC;AACF,CAAC;AAED,wFAAwF;AACxF,SAAS,KAAK;IACZ,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,IAAI,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAClF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,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,72 @@
1
+ import { parseArgs } from "node:util";
2
+ export const USAGE = `testeiya — AI testing agent
3
+
4
+ Usage:
5
+ testeiya "<task>" --model <provider>/<id> [--output <file>]
6
+ cat task.md | testeiya [--output <file>]
7
+
8
+ Options:
9
+ -o, --output <file.md> file the agent must write its report to
10
+ -p, --print <task> same as passing the task positionally
11
+ --model <id> provider/model to use, e.g. openrouter/anthropic/claude-sonnet-5
12
+ --project <id> Testomat.io project id (same as TESTOMATIO_PROJECT_ID)
13
+ -h, --help show this help
14
+ -v, --version show version
15
+
16
+ Runs show progress and errors on stderr; the result is the report file.
17
+ Without --output the agent's final answer is printed to stdout instead.
18
+
19
+ There is no default model: pass --model or set TESTEIYA_MODEL, or the run exits 2.
20
+ The provider API key comes from the environment, ~/.testeiya/.env, or
21
+ ~/.testeiya/auth.json.
22
+
23
+ Set TESTOMATIO to a project API key to work with that Testomat.io project. Add
24
+ the project id (--project or TESTOMATIO_PROJECT_ID) and the agent also gets the
25
+ Testomat.io tools; with the token alone it uses check-tests and the REST API.
26
+
27
+ A task starting with "-" must follow "--": testeiya -- "-weird task"
28
+
29
+ Exit codes: 0 pass · 1 failed run or verdict · 2 bad usage · 130 interrupted.`;
30
+ export function parseCliArgs(argv) {
31
+ let parsed;
32
+ try {
33
+ parsed = parseArgs({
34
+ args: argv,
35
+ options: {
36
+ output: { type: "string", short: "o" },
37
+ print: { type: "string", short: "p" },
38
+ model: { type: "string" },
39
+ project: { type: "string" },
40
+ help: { type: "boolean", short: "h" },
41
+ version: { type: "boolean", short: "v" },
42
+ },
43
+ allowPositionals: true,
44
+ strict: true,
45
+ });
46
+ }
47
+ catch (err) {
48
+ if (err instanceof Error)
49
+ return { error: err.message };
50
+ return { error: String(err) };
51
+ }
52
+ const { values, positionals } = parsed;
53
+ if (values.help)
54
+ return { help: true };
55
+ if (values.version)
56
+ return { version: true };
57
+ const parts = [...positionals];
58
+ if (values.print)
59
+ parts.unshift(values.print);
60
+ const prompt = parts.join(" ").trim();
61
+ const args = {};
62
+ if (prompt)
63
+ args.prompt = prompt;
64
+ if (values.output)
65
+ args.output = values.output;
66
+ if (values.model)
67
+ args.model = values.model;
68
+ if (values.project)
69
+ args.project = values.project;
70
+ return args;
71
+ }
72
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;8EA2ByD,CAAC;AAE/E,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,SAAS,CAAC;YACjB,IAAI,EAAE,IAAI;YACV,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;gBACtC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;gBACrC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,OAAO,E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O,GAAG,MAAM,CAAC,OAAO,CAAC;IAClD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import { parseCliArgs, USAGE } from "./args.js";
5
+ import { loadEnvFiles } from "./env.js";
6
+ import { UsageError } from "./model.js";
7
+ import { runPrint } from "./run.js";
8
+ main(process.argv.slice(2)).catch((err) => {
9
+ process.stderr.write(`${err?.message ?? err}\n`);
10
+ process.exit(1);
11
+ });
12
+ async function main(argv) {
13
+ process.title = "testeiya";
14
+ const args = parseCliArgs(argv);
15
+ if (args.error) {
16
+ process.stderr.write(`${args.error}\n\n${USAGE}\n`);
17
+ process.exit(2);
18
+ }
19
+ if (args.help) {
20
+ process.stdout.write(`${USAGE}\n`);
21
+ return;
22
+ }
23
+ if (args.version) {
24
+ process.stdout.write(`${version()}\n`);
25
+ return;
26
+ }
27
+ loadEnvFiles();
28
+ // --project is a spelling of the env var the MCP server needs, so the rest of
29
+ // the CLI only ever reads the environment.
30
+ if (args.project)
31
+ process.env.TESTOMATIO_PROJECT_ID = args.project;
32
+ // No task and nothing piped in: there is no interactive mode, so this is a
33
+ // usage error rather than a prompt.
34
+ const prompt = args.prompt ?? (await readStdin());
35
+ if (!prompt.trim()) {
36
+ process.stderr.write(`${USAGE}\n`);
37
+ process.exit(2);
38
+ }
39
+ try {
40
+ process.exit(await runPrint({ prompt, outputFile: args.output, model: args.model }));
41
+ }
42
+ catch (err) {
43
+ if (!(err instanceof UsageError))
44
+ throw err;
45
+ process.stderr.write(` ${err.message}\n`);
46
+ process.exit(2);
47
+ }
48
+ }
49
+ async function readStdin() {
50
+ if (process.stdin.isTTY)
51
+ return "";
52
+ const chunks = [];
53
+ for await (const chunk of process.stdin)
54
+ chunks.push(chunk);
55
+ return Buffer.concat(chunks).toString("utf8");
56
+ }
57
+ function version() {
58
+ const pkg = JSON.parse(readFileSync(join(import.meta.dirname, "..", "..", "package.json"), "utf8"));
59
+ return pkg.version;
60
+ }
61
+ //# 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,YAAY,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,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,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,OAAO,KAAK,IAAI,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;QACnC,OAAO;IACT,CAAC;IACD,IAAI,IAAI,CAAC,OAAO,EAAE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C,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,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAC5E,CAAC;IACF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC"}
@@ -0,0 +1,69 @@
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
+ * Where pi keeps its own state for this CLI. Deliberately not `~/.pi` — running
11
+ * `npx testeiya` must not write into a user's own pi installation.
12
+ */
13
+ export const PI_STATE_DIR = join(TESTEIYA_HOME, "pi");
14
+ /**
15
+ * Fill gaps in process.env from `~/.testeiya/.env`, then from any `.env` found
16
+ * walking up from the working directory — so running in a repo picks up that
17
+ * repo's key. Exported variables always win; this only fills gaps.
18
+ *
19
+ * The walk starts at cwd, never at this file: an installed package sits under
20
+ * some node_modules whose ancestors are none of the agent's business, and
21
+ * silently adopting a key from there is a surprise, not a convenience.
22
+ */
23
+ export function loadEnvFiles() {
24
+ loadFile(join(TESTEIYA_HOME, ".env"));
25
+ let dir = process.cwd();
26
+ for (let i = 0; i < 8; i++) {
27
+ loadFile(join(dir, ".env"));
28
+ const parent = dirname(dir);
29
+ if (parent === dir)
30
+ break;
31
+ dir = parent;
32
+ }
33
+ }
34
+ export function parseEnv(content) {
35
+ const out = {};
36
+ for (const raw of content.split(/\r?\n/)) {
37
+ const line = raw.trim();
38
+ if (!line || line.startsWith("#"))
39
+ continue;
40
+ const eq = line.indexOf("=");
41
+ if (eq === -1)
42
+ continue;
43
+ const key = line.slice(0, eq).trim();
44
+ let val = line.slice(eq + 1).trim();
45
+ if ((val.startsWith('"') && val.endsWith('"')) ||
46
+ (val.startsWith("'") && val.endsWith("'"))) {
47
+ val = val.slice(1, -1);
48
+ }
49
+ if (key)
50
+ out[key] = val;
51
+ }
52
+ return out;
53
+ }
54
+ function loadFile(path) {
55
+ if (!existsSync(path))
56
+ return;
57
+ let vars;
58
+ try {
59
+ vars = parseEnv(readFileSync(path, "utf8"));
60
+ }
61
+ catch {
62
+ return;
63
+ }
64
+ for (const [key, value] of Object.entries(vars)) {
65
+ if (process.env[key] === undefined)
66
+ process.env[key] = value;
67
+ }
68
+ }
69
+ //# 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,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY;IAC1B,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtC,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CA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AAC,IAAI,CAAC;QAAE,OAAO;IAC9B,IAAI,IAA4B,CAAC;IACjC,IAAI,CAAC;QACH,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC/D,CAAC;AACH,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"}