testeiya 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +312 -27
  2. package/dist/prompt/index.js +6 -2
  3. package/dist/prompt/index.js.map +1 -1
  4. package/dist/prompt/print.js +8 -0
  5. package/dist/prompt/print.js.map +1 -1
  6. package/dist/prompt/system-prompt.js +14 -4
  7. package/dist/prompt/system-prompt.js.map +1 -1
  8. package/dist/prompt/testomatio.js +3 -3
  9. package/dist/prompt/tools.js +15 -7
  10. package/dist/prompt/tools.js.map +1 -1
  11. package/dist/src/args.js +147 -47
  12. package/dist/src/args.js.map +1 -1
  13. package/dist/src/cli.js +50 -14
  14. package/dist/src/cli.js.map +1 -1
  15. package/dist/src/doctor.js +186 -0
  16. package/dist/src/doctor.js.map +1 -0
  17. package/dist/src/env.js +29 -5
  18. package/dist/src/env.js.map +1 -1
  19. package/dist/src/mcp.js +3 -3
  20. package/dist/src/mcp.js.map +1 -1
  21. package/dist/src/model.js +15 -10
  22. package/dist/src/model.js.map +1 -1
  23. package/dist/src/models.js +38 -0
  24. package/dist/src/models.js.map +1 -0
  25. package/dist/src/output.js +185 -0
  26. package/dist/src/output.js.map +1 -0
  27. package/dist/src/run.js +116 -24
  28. package/dist/src/run.js.map +1 -1
  29. package/dist/src/session.js +38 -23
  30. package/dist/src/session.js.map +1 -1
  31. package/dist/src/sessions.js +61 -0
  32. package/dist/src/sessions.js.map +1 -0
  33. package/package.json +7 -3
  34. package/prompt/index.ts +11 -2
  35. package/prompt/print.ts +9 -0
  36. package/prompt/system-prompt.ts +18 -4
  37. package/prompt/testomatio.ts +3 -3
  38. package/prompt/tools.ts +15 -7
  39. package/skills/codeceptjs/ci-fix-tests/SKILL.md +119 -0
  40. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +141 -0
  41. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +100 -0
  42. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +196 -0
  43. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +83 -0
  44. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +126 -0
  45. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +109 -0
  46. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +295 -0
  47. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +339 -0
  48. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +459 -0
  49. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +338 -0
  50. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +78 -0
  51. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +102 -0
  52. package/skills/playwright/playwright-best-practices/SKILL.md +303 -0
  53. package/skills/playwright/playwright-best-practices/advanced/authentication-flows.md +360 -0
  54. package/skills/playwright/playwright-best-practices/advanced/authentication.md +871 -0
  55. package/skills/playwright/playwright-best-practices/advanced/clock-mocking.md +364 -0
  56. package/skills/playwright/playwright-best-practices/advanced/mobile-testing.md +409 -0
  57. package/skills/playwright/playwright-best-practices/advanced/multi-context.md +288 -0
  58. package/skills/playwright/playwright-best-practices/advanced/multi-user.md +393 -0
  59. package/skills/playwright/playwright-best-practices/advanced/network-advanced.md +452 -0
  60. package/skills/playwright/playwright-best-practices/advanced/third-party.md +464 -0
  61. package/skills/playwright/playwright-best-practices/architecture/pom-vs-fixtures.md +363 -0
  62. package/skills/playwright/playwright-best-practices/architecture/test-architecture.md +369 -0
  63. package/skills/playwright/playwright-best-practices/architecture/when-to-mock.md +383 -0
  64. package/skills/playwright/playwright-best-practices/browser-apis/browser-apis.md +391 -0
  65. package/skills/playwright/playwright-best-practices/browser-apis/iframes.md +403 -0
  66. package/skills/playwright/playwright-best-practices/browser-apis/service-workers.md +504 -0
  67. package/skills/playwright/playwright-best-practices/browser-apis/websockets.md +403 -0
  68. package/skills/playwright/playwright-best-practices/core/annotations.md +424 -0
  69. package/skills/playwright/playwright-best-practices/core/assertions-waiting.md +361 -0
  70. package/skills/playwright/playwright-best-practices/core/configuration.md +452 -0
  71. package/skills/playwright/playwright-best-practices/core/fixtures-hooks.md +417 -0
  72. package/skills/playwright/playwright-best-practices/core/global-setup.md +434 -0
  73. package/skills/playwright/playwright-best-practices/core/locators.md +242 -0
  74. package/skills/playwright/playwright-best-practices/core/page-object-model.md +315 -0
  75. package/skills/playwright/playwright-best-practices/core/projects-dependencies.md +453 -0
  76. package/skills/playwright/playwright-best-practices/core/test-data.md +492 -0
  77. package/skills/playwright/playwright-best-practices/core/test-suite-structure.md +361 -0
  78. package/skills/playwright/playwright-best-practices/core/test-tags.md +298 -0
  79. package/skills/playwright/playwright-best-practices/debugging/console-errors.md +420 -0
  80. package/skills/playwright/playwright-best-practices/debugging/debugging.md +504 -0
  81. package/skills/playwright/playwright-best-practices/debugging/error-testing.md +360 -0
  82. package/skills/playwright/playwright-best-practices/debugging/flaky-tests.md +496 -0
  83. package/skills/playwright/playwright-best-practices/frameworks/angular.md +530 -0
  84. package/skills/playwright/playwright-best-practices/frameworks/nextjs.md +469 -0
  85. package/skills/playwright/playwright-best-practices/frameworks/react.md +531 -0
  86. package/skills/playwright/playwright-best-practices/frameworks/vue.md +574 -0
  87. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/ci-cd.md +468 -0
  88. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/docker.md +283 -0
  89. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/github-actions.md +546 -0
  90. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/gitlab.md +397 -0
  91. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/other-providers.md +521 -0
  92. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/parallel-sharding.md +371 -0
  93. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/performance.md +453 -0
  94. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/reporting.md +424 -0
  95. package/skills/playwright/playwright-best-practices/infrastructure-ci-cd/test-coverage.md +497 -0
  96. package/skills/playwright/playwright-best-practices/testing-patterns/accessibility.md +359 -0
  97. package/skills/playwright/playwright-best-practices/testing-patterns/api-testing.md +719 -0
  98. package/skills/playwright/playwright-best-practices/testing-patterns/browser-extensions.md +506 -0
  99. package/skills/playwright/playwright-best-practices/testing-patterns/canvas-webgl.md +493 -0
  100. package/skills/playwright/playwright-best-practices/testing-patterns/component-testing.md +500 -0
  101. package/skills/playwright/playwright-best-practices/testing-patterns/drag-drop.md +576 -0
  102. package/skills/playwright/playwright-best-practices/testing-patterns/electron.md +509 -0
  103. package/skills/playwright/playwright-best-practices/testing-patterns/file-operations.md +377 -0
  104. package/skills/playwright/playwright-best-practices/testing-patterns/file-upload-download.md +562 -0
  105. package/skills/playwright/playwright-best-practices/testing-patterns/forms-validation.md +561 -0
  106. package/skills/playwright/playwright-best-practices/testing-patterns/graphql-testing.md +331 -0
  107. package/skills/playwright/playwright-best-practices/testing-patterns/i18n.md +508 -0
  108. package/skills/playwright/playwright-best-practices/testing-patterns/performance-testing.md +476 -0
  109. package/skills/playwright/playwright-best-practices/testing-patterns/security-testing.md +430 -0
  110. package/skills/playwright/playwright-best-practices/testing-patterns/visual-regression.md +634 -0
  111. package/skills/playwright/playwright-cli/SKILL.md +420 -0
  112. package/skills/playwright/playwright-cli/references/element-attributes.md +23 -0
  113. package/skills/playwright/playwright-cli/references/playwright-tests.md +39 -0
  114. package/skills/playwright/playwright-cli/references/request-mocking.md +87 -0
  115. package/skills/playwright/playwright-cli/references/running-code.md +241 -0
  116. package/skills/playwright/playwright-cli/references/session-management.md +225 -0
  117. package/skills/playwright/playwright-cli/references/storage-state.md +275 -0
  118. package/skills/playwright/playwright-cli/references/test-generation.md +433 -0
  119. package/skills/playwright/playwright-cli/references/tracing.md +139 -0
  120. package/skills/playwright/playwright-cli/references/video-recording.md +143 -0
  121. package/skills/skills.lock.json +39 -36
  122. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +76 -0
  123. package/skills/testomatio/explorbot/explorbot-fundamentals/references/no-install.md +36 -0
  124. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +108 -0
  125. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +86 -0
  126. package/skills/testomatio/qa-process/qa-explain-behavior/SKILL.md +111 -0
  127. package/skills/testomatio/qa-process/qa-explain-behavior/references/answer-shapes.md +116 -0
  128. package/skills/testomatio/qa-process/qa-explain-behavior/references/examples.md +157 -0
  129. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/SKILL.md +91 -0
  130. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/references/output-format.md +71 -0
  131. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +227 -0
  132. package/skills/testomatio/test-automation/automate-manual-test-cases/CLAUDE.md +56 -0
  133. package/skills/testomatio/test-automation/automate-manual-test-cases/SKILL.md +242 -0
  134. package/skills/testomatio/test-automation/automate-manual-test-cases/references/CODECEPTJS_BEST_PRACTICES.md +182 -0
  135. package/skills/testomatio/test-automation/automate-manual-test-cases/references/FINAL_SUMMARY_TEMPLATE.md +22 -0
  136. package/skills/testomatio/test-automation/automate-manual-test-cases/references/PLAYWRIGHT_BEST_PRACTICES.md +90 -0
  137. package/skills/testomatio/test-automation/automate-manual-test-cases/references/POM_BEST_PRACTICES.md +53 -0
  138. package/skills/testomatio/test-automation/automate-manual-test-cases/references/TEST_DATA_MANAGEMENT.md +52 -0
  139. package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/SKILL.md +107 -0
  140. package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/references/DEBUGGING_QUICK_REFERENCE.md +113 -0
  141. package/skills/testomatio/test-automation/qa-automation-test-consolidation/SKILL.md +29 -0
  142. package/skills/testomatio/test-automation/qa-data-seeder/SKILL.md +83 -0
  143. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +153 -0
  144. package/skills/testomatio/test-automation/setup-change-aware-pr-testing/SKILL.md +190 -0
  145. package/skills/testomatio/test-automation/setup-ci-automation/SKILL.md +76 -0
  146. package/skills/testomatio/test-automation/testomat-allure-adapter/SKILL.md +289 -0
  147. package/skills/testomatio/test-management/detect-duplicate-test-cases/SKILL.md +86 -0
  148. package/skills/testomatio/test-management/detect-duplicate-test-cases/references/DUPLICATE_INSTRUCTIONS.md +54 -0
  149. package/skills/testomatio/test-management/improve-test-cases/SKILL.md +114 -0
  150. package/skills/testomatio/test-management/improve-test-cases/references/TESTOMAT_MARKDOWN_EXAMPLE.md +66 -0
  151. package/skills/testomatio/test-management/pull-request-diff-analyzer/SKILL.md +141 -0
  152. package/skills/testomatio/test-management/qa-e2e-tests-reporting/SKILL.md +354 -0
  153. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_ARTIFACTS.md +82 -0
  154. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_HTML_REPORT.md +37 -0
  155. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_REPORTERS_CONFIG.md +118 -0
  156. package/skills/testomatio/test-management/qa-pr-requirements-analyzer/SKILL.md +149 -0
  157. package/skills/testomatio/test-management/qa-pr-requirements-analyzer/references/summary-example.md +54 -0
  158. package/skills/testomatio/test-management/qa-requirement-reviewer/SKILL.md +126 -0
  159. package/skills/testomatio/test-management/qa-requirement-reviewer/references/requirements_reviewer_examples.md +128 -0
  160. package/skills/testomatio/test-management/qa-split-testing-levels-pyramid/SKILL.md +55 -0
  161. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/SKILL.md +220 -0
  162. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/references/qa-sprint-report.md +126 -0
  163. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +174 -0
  164. package/skills/testomatio/test-management/qa-test-code-coverage/references/COVERAGE_FILE_FORMAT.md +138 -0
  165. package/skills/testomatio/test-management/qa-test-code-coverage/references/E2E_FRAMEWORKS.md +65 -0
  166. package/skills/testomatio/test-management/qa-test-code-coverage/scripts/check-coverage.mjs +40 -0
  167. package/skills/testomatio/test-management/qa-thinking/SKILL.md +36 -0
  168. package/skills/testomatio/test-management/qa-write-test-cases/SKILL.md +267 -0
  169. package/skills/testomatio/test-management/qa-write-test-cases/references/test-case-format.md +387 -0
  170. package/skills/testomatio/test-management/qa-write-test-cases/references/testomat-tms-guide.md +72 -0
  171. package/skills/testomatio/test-management/qa-write-test-cases/references/writing-rule.md +159 -0
  172. package/skills/testomatio/test-management/scan-automation-project/SKILL.md +152 -0
  173. package/skills/testomatio/test-management/sync-test-cases-with-tms/SKILL.md +107 -0
  174. package/skills/testomatio/test-management/sync-test-cases-with-tms/references/TESTOMATIO_CLI.md +140 -0
  175. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +195 -0
  176. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +177 -0
package/README.md CHANGED
@@ -1,73 +1,358 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/testomatio/testeiya-app/main/assets/testeiya-cli-logo.png" alt="Testeiya" width="220">
3
+ </p>
4
+
1
5
  # Testeiya
2
6
 
7
+ [![npm](https://img.shields.io/npm/v/testeiya)](https://www.npmjs.com/package/testeiya)
8
+ [![licence](https://img.shields.io/npm/l/testeiya)](LICENSE)
9
+
3
10
  An agent, app, and the goddess of testing.
4
11
 
5
- Testeiya is a QA-focused AI agent. It reads and writes manual test cases as markdown, works with automated test code, and talks to [Testomat.io](https://testomat.io) as a test management system. It ships as a desktop app, a web app, and the command-line agent in this repository.
12
+ Testeiya is an autonomous QA agent. It reacts to triggers a pull request, a new
13
+ issue, a failed test run, a deploy — runs exactly one analysis, and delivers its
14
+ verdict where your team works: a PR comment, a markdown report, or a Testomat.io
15
+ project. There is no interactive mode and no human in the loop. That is the point:
16
+ you wire it into CI once, and every event that should get QA thinking gets it.
6
17
 
7
- This repository holds the parts of Testeiya that shape how the agent thinks:
18
+ It ships as a desktop app, a web app, and the command-line agent in this repository.
8
19
 
9
20
  | Folder | What it is |
10
21
  |---|---|
11
- | `prompt/` | The system-prompt fragments the agent's role, rules, tool guidance, Testomat.io operating rules, and the report contract |
12
- | `skills/` | The manifest of skills the agent can invoke every folder is fetched from its own upstream repository |
22
+ | `prompt/` | System-prompt fragments: the agent's role, rules, tool guidance, Testomat.io operating rules, and the report contract |
23
+ | `skills/` | The manifest of skills the agent can invoke. Every folder is fetched from its own upstream repository |
13
24
  | `src/` | The `testeiya` command-line agent (Node) |
14
25
 
15
- The desktop and web harness servers, session management, sync, UI — is not open source.
26
+ The desktop and web harness is not open source. That covers the servers, session management, sync, and UI.
27
+
28
+ ## Install
16
29
 
17
- ## Install and use
30
+ Requires Node 22.19 or newer, an LLM provider key, and a model.
18
31
 
19
32
  ```bash
20
- npx testeiya "Review the manual tests in this folder and list the gaps" \
21
- --model openrouter/anthropic/claude-sonnet-5 --output report.md
33
+ npx testeiya doctor
22
34
  ```
23
35
 
24
- The agent runs one task and exits — there is no interactive mode. Progress goes to stderr, the report to `--output` (or stdout when you omit it). Exit codes: `0` pass, `1` failed run or negative verdict, `2` bad usage, `130` interruptedso it drops into CI as-is.
36
+ `doctor` reports which key won, which skills loaded, and whether Testomat.io is reachablewithout spending a token.
25
37
 
26
- Requires Node 22.19 or newer, a model, and an LLM provider key.
38
+ The key comes from the environment (`OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`,
39
+ `OPENAI_API_KEY`, `GEMINI_API_KEY`), from `~/.testeiya/.env`, or from
40
+ `~/.testeiya/auth.json`. That last file is the one the desktop app's Settings
41
+ dialog writes, so configuring it once covers both.
27
42
 
28
- There is no default model. Name one with `--model <provider>/<id>` or `TESTEIYA_MODEL`; a run that names none exits `2` rather than spending your money on a model nobody chose.
29
-
30
- The key comes from the environment (`OPENROUTER_API_KEY` and friends), `~/.testeiya/.env`, or `~/.testeiya/auth.json` — the same file the desktop app's Settings dialog writes, so configuring it once covers both.
43
+ There is no default model. Name one with `--model <provider>/<id>` or
44
+ `TESTEIYA_MODEL`. CI usually has neither set, so a run that resolves no model
45
+ exits `2` rather than picking one for you.
31
46
 
32
47
  ```bash
33
- testeiya --help # every flag
34
48
  export TESTEIYA_MODEL=openrouter/anthropic/claude-sonnet-5
35
- testeiya "<task>"
36
- cat task.md | testeiya --output report.md
49
+ testeiya models anthropic # list what your key can reach
50
+ ```
51
+
52
+ ## How it runs
53
+
54
+ ```bash
55
+ testeiya task "<task>" # run one task, deliver a report, exit
56
+ testeiya ask "<question>" # answer a question, no report
57
+ testeiya sessions # list saved sessions for this folder
58
+ ```
59
+
60
+ The agent runs one task and exits. Progress goes to stderr, so a run drops into CI as-is:
61
+
62
+ | Exit code | Meaning |
63
+ |---|---|
64
+ | `0` | pass, or a positive verdict from the agent |
65
+ | `1` | failed run, or a negative verdict — findings that need a human |
66
+ | `2` | bad usage |
67
+ | `130` | interrupted |
68
+
69
+ A task can come from stdin too:
70
+
71
+ ```bash
72
+ cat issue-42.md | testeiya task --output report.md
73
+ ```
74
+
75
+ Every command takes `--json` for machine-readable output of the run envelope
76
+ (verdict, reason, tokens, session id). `testeiya --help` lists all options;
77
+ `testeiya help` is the full guide.
78
+
79
+ ## Scenarios
80
+
81
+ Each scenario below is a single unattended run. Nobody answers questions; the
82
+ agent reads what the trigger gives it and acts on its own judgement. If its
83
+ verdict is negative, the job fails — that failure *is* the signal.
84
+
85
+ ### Grill a pull request
86
+
87
+ Every PR gets a QA review before merge. The agent loads the branch's diff,
88
+ analyzes it through the `qa-thinking` skill — edge cases, negative flows,
89
+ abuses, data-consistency risks — and posts the findings as a PR comment:
90
+
91
+ ```bash
92
+ git fetch origin "$PR_BRANCH"
93
+ git checkout "$PR_BRANCH"
94
+ testeiya task "Review this pull request as a QA engineer. What could go wrong?" \
95
+ --output gh:pr-comment --output review.json
96
+ ```
97
+
98
+ Exit code `1` means the agent found real risk, so you can gate the merge on it.
99
+
100
+ ### Write test cases from a pull request
101
+
102
+ Same trigger, different deliverable: the `qa-write-test-cases` skill turns the
103
+ change into test cases in Testomat.io markdown format, written as a build
104
+ artifact ready to commit or import:
105
+
106
+ ```bash
107
+ testeiya task "Create test cases covering the changes in this pull request" \
108
+ --output testcases/
109
+ ```
110
+
111
+ With `TESTOMATIO` and the project id set, add
112
+ `sync them to Testomat.io` to the task and they land straight in the TMS via
113
+ `sync-test-cases-with-tms`.
114
+
115
+ ### Create test cases from a new issue
116
+
117
+ A requirements text arrives from the issue tracker — piped in, no human
118
+ summarizing it first. The agent writes a checklist and test cases from it:
119
+
120
+ ```bash
121
+ gh issue view 57 --json title,body -q '.title + "\n\n" + .body' \
122
+ | testeiya task --output testcases/issue-57.md
37
123
  ```
38
124
 
39
- Set `TESTOMATIO` to a project API key and the agent can read and write that project's tests, suites, runs and plans through `check-tests` and the REST API. Add the project id as well and it also gets the Testomat.io tools:
125
+ ### Explore a deployed app with Explorbot
126
+
127
+ After a deploy, point [Explorbot](https://github.com/testomatio/explorbot) — the
128
+ autonomous browser-testing CLI the agent drives through the `explorbot-*`
129
+ skills — at the staging URL. It researches, plans, and tests the live app in
130
+ its own browser, then reports what broke:
40
131
 
41
132
  ```bash
42
- TESTOMATIO=tstmt_xxx testeiya --project my-project "Which suites have no tests?"
133
+ testeiya task "Run explorbot against https://staging.example.com, max 10 tests, report failures" \
134
+ --output explorbot-report.md
43
135
  ```
44
136
 
45
- The id can come from `--project` or `TESTOMATIO_PROJECT_ID`. The MCP server needs it: a token alone does not tell it which project to talk to.
137
+ ### Repair failing tests after a red build
138
+
139
+ On a failed CodeceptJS run, the `ci-fix-tests` skill attempts safe fixes only —
140
+ locator drift, missing waits — reruns just the failing scenarios, rolls back any
141
+ edit that did not help, and always writes `output/ci-fix.md` for the next job:
142
+
143
+ ```bash
144
+ testeiya task "Fix the failed CodeceptJS tests using ci-fix-tests. No refactors." \
145
+ --no-session
146
+ ```
147
+
148
+ ### Audit the test suite on a schedule
149
+
150
+ Nightly, the agent walks the Testomat.io project and reports gaps — suites with
151
+ no tests, cases gone stale against the current code, coverage holes:
152
+
153
+ ```bash
154
+ TESTOMATIO=tstmt_xxx testeiya task \
155
+ "Audit this project: which suites have no automated tests, and which manual cases look automatable?" \
156
+ --output audits/$(date +%F).md
157
+ ```
158
+
159
+ ## CI setup
160
+
161
+ Testeiya needs three things in any CI system: a provider key, a model name, and
162
+ the checkout of whatever the task reads. Everything else is standard.
163
+
164
+ ### GitHub Actions
165
+
166
+ GitHub runners ship the [GitHub CLI](https://cli.github.com), so posting back to
167
+ the PR is one flag. `GITHUB_TOKEN` authenticates it; keep the LLM key in
168
+ repository secrets.
169
+
170
+ ```yaml
171
+ name: qa-review
172
+ on:
173
+ pull_request:
174
+ types: [opened, synchronize]
175
+
176
+ permissions:
177
+ pull-requests: write
178
+ contents: read
179
+
180
+ jobs:
181
+ grill:
182
+ runs-on: ubuntu-latest
183
+ env:
184
+ GH_TOKEN: ${{ github.token }}
185
+ OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
186
+ TESTEIYA_MODEL: openrouter/anthropic/claude-sonnet-5
187
+ # optional, for scenarios that touch Testomat.io
188
+ TESTOMATIO: ${{ secrets.TESTOMATIO }}
189
+ TESTOMATIO_PROJECT_ID: my-project
190
+ steps:
191
+ - uses: actions/checkout@v4
192
+ with:
193
+ fetch-depth: 0
194
+ - uses: actions/setup-node@v4
195
+ with:
196
+ node-version: 22
197
+ - run: npx testeiya@latest doctor
198
+ - run: |
199
+ npx testeiya@latest task \
200
+ "Review this pull request as a QA engineer. What could go wrong?" \
201
+ --output gh:pr-comment --output review.json
202
+ - uses: actions/upload-artifact@v4
203
+ if: always()
204
+ with:
205
+ name: review
206
+ path: review.json
207
+ ```
208
+
209
+ The same shape works for the other scenarios: trigger on `issues` and pipe the
210
+ body in for test-case generation, or run on a `schedule` for the nightly audit.
211
+
212
+ ### GitLab CI
213
+
214
+ GitLab runners do not ship `gh`, so the report goes to job artifacts — visible
215
+ in the merge request pipeline page. Exit code `1` fails the job and blocks the
216
+ merge when you mark it required.
217
+
218
+ ```yaml
219
+ qa-review:
220
+ image: node:22
221
+ rules:
222
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
223
+ variables:
224
+ TESTEIYA_MODEL: openrouter/anthropic/claude-sonnet-5
225
+ TESTOMATIO_PROJECT_ID: my-project
226
+ script:
227
+ - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
228
+ - npx testeiya@latest doctor
229
+ - npx testeiya@latest task
230
+ "Review this merge request as a QA engineer. What could go wrong?"
231
+ --output review/report.md --output review/envelope.json
232
+ artifacts:
233
+ when: always
234
+ paths:
235
+ - review/
236
+ parallel:
237
+ # secrets go to Settings > CI/CD > Variables:
238
+ # OPENROUTER_API_KEY (masked), TESTOMATIO (masked, protected)
239
+ ```
240
+
241
+ For posting back to the merge request, hand the envelope's report to GitLab's
242
+ API in a follow-up step, or install `gh` plus a token mirror if the project is
243
+ also on GitHub.
244
+
245
+ ### Anywhere else
246
+
247
+ Any scheduler that can run a container works — the contract is just stdin,
248
+ stdout, and an exit code:
249
+
250
+ ```bash
251
+ echo "Audit the checkout suite for gaps" | testeiya task --output audit.md
252
+ case $? in
253
+ 0) echo "clean" ;;
254
+ 1) echo "findings need review" ;;
255
+ esac
256
+ ```
257
+
258
+ ## Where the report goes
259
+
260
+ `--output` names a destination and can repeat. Without one the report goes to stdout.
261
+
262
+ ```bash
263
+ testeiya task "<task>" --output report.md --output run.json --output gh:pr-comment
264
+ ```
265
+
266
+ | Destination | What happens |
267
+ |---|---|
268
+ | `report.md` | the agent writes the report there |
269
+ | `run.json` | the run envelope: verdict, reason, report, tokens, session id |
270
+ | `gh:pr-comment` | posted on this branch's pull request |
271
+ | `gh:pr#123` | posted on that pull request |
272
+
273
+ Posting uses the GitHub CLI and resolves the PR number from `GITHUB_EVENT_PATH`,
274
+ `GITHUB_REF`, or `gh pr view` — so inside Actions it just works. Every
275
+ destination is checked before the run starts, so a missing `gh` costs no tokens.
276
+
277
+ ## Sessions
278
+
279
+ Runs are saved under `~/.testeiya`, so a follow-up picks up where the last one
280
+ stopped. A resumed run reuses its session's model.
281
+
282
+ ```bash
283
+ testeiya task "Review the checkout suite" --name checkout-review --output report.md
284
+ testeiya task "Now write the missing cases" -c
285
+ testeiya sessions
286
+ testeiya task "<task>" --resume <id>
287
+ ```
288
+
289
+ Pass `--name` to label a session and `--no-session` to save nothing. In CI,
290
+ `--no-session` keeps runners stateless unless you deliberately chain `-c` steps.
291
+
292
+ ## Testomat.io
293
+
294
+ Set `TESTOMATIO` to a project API key. The agent can then read and write that
295
+ project's tests, suites, runs and plans through `check-tests` and the REST API.
296
+
297
+ ```bash
298
+ TESTOMATIO=tstmt_xxx testeiya task --project my-project "Which suites have no tests?"
299
+ ```
300
+
301
+ Add the project id and the agent also gets the Testomat.io MCP tools. The id
302
+ comes from `--project` or from `TESTOMATIO_PROJECT_ID`; the MCP server needs it,
303
+ because a token alone does not say which project to talk to. `TESTOMATIO_URL`
304
+ points at a self-hosted instance.
46
305
 
47
306
  ## Skills
48
307
 
49
- A skill is a folder with a `SKILL.md`. The agent loads them all and invokes the ones a task calls for.
308
+ A skill is a folder with a `SKILL.md`. The agent loads them all and invokes the
309
+ ones a task calls for — you never pick a skill explicitly, the task phrasing
310
+ does.
311
+
312
+ What ships today, vendored from upstream repositories:
313
+
314
+ | Category | Skills |
315
+ |---|---|
316
+ | QA process | `testing-workflow`, `qa-explain-behavior`, `qa-lead-strategy-advisor` |
317
+ | Test management | `qa-write-test-cases`, `sync-test-cases-with-tms`, `qa-sprint-report-by-testomatio`, `qa-split-testing-levels-pyramid`, `qa-thinking` |
318
+ | Test automation | `automate-manual-test-cases`, `setup-change-aware-pr-testing`, `run-tests-with-testomatio-reporter`, `setup-ci-automation`, `debug-fix-failed-flaky-autotests`, `qa-data-seeder`, `qa-automation-test-consolidation`, `testomat-allure-adapter` |
319
+ | Explorbot | `explorbot-fundamentals`, `explorbot-setup`, `explorbot-plan` |
320
+ | Playwright | `playwright-best-practices`, `playwright-cli` |
321
+ | CodeceptJS | writing, refactoring, debugging, run analysis, migrations from Cypress/TestCafe/Selenium/Protractor, `ci-fix-tests` |
50
322
 
51
- Every skill here is vendored from its own upstream repository, declared in `skills/skills.yaml` and pinned to a commit in `skills/skills.lock.json`. The vendored folders are deliberately **not** committed — they belong to their authors, under their own licences. A clone of this repository has the manifest and nothing else; the tree is fetched by the upstream release tooling, which is where the desktop app gets its full set.
323
+ Sources are declared in `skills/skills.yaml` and pinned in
324
+ `skills/skills.lock.json`. The vendored folders are deliberately not committed —
325
+ they belong to their authors, under their own licences. A clone has the manifest
326
+ and nothing else; `node scripts/vendor-skills.js` fills the tree. Every release
327
+ runs it, so the published `testeiya` package ships each skill as current on
328
+ release day.
52
329
 
53
- The published `testeiya` package therefore ships no skills of its own: `skillsOverride` in `src/session.ts` keeps only what is found under the bundled tree, so a fresh `npx testeiya` run has none until that tree is filled. To add your own, point `additionalSkillPaths` at your folder — [EXTENDING.md](EXTENDING.md) covers both hooks. The first-party skills the desktop app bundles are written against tools only that harness has, so they live with it, in the private repository.
330
+ `skillsOverride` in `src/session.ts` keeps only what is found under that tree,
331
+ so an arbitrary clone cannot hand the model its own skills. To add yours, point
332
+ `additionalSkillPaths` at your folder. [EXTENDING.md](EXTENDING.md) covers both hooks.
54
333
 
55
- To propose a new source, add its line to `skills/skills.yaml` see [CONTRIBUTING.md](CONTRIBUTING.md).
334
+ To propose a new source, add its line to `skills/skills.yaml`. See [CONTRIBUTING.md](CONTRIBUTING.md).
56
335
 
57
336
  ## Building your own agent
58
337
 
59
- The CLI is a thin composition over [pi](https://pi.dev): under 850 lines wiring the SDK to the prompt and skills here. A fork can add pi extensions and custom tools, or swap the one-shot run loop for pi's full interactive TUI — [EXTENDING.md](EXTENDING.md) walks through both.
338
+ The CLI is a thin composition over [pi](https://pi.dev): about 1,500 lines wiring
339
+ the SDK to the prompt and skills here. A fork can add pi extensions and custom
340
+ tools, or swap the one-shot run loop for pi's full interactive TUI.
341
+ [EXTENDING.md](EXTENDING.md) walks through both.
60
342
 
61
343
  ## Contributing
62
344
 
63
- Prompt wording is exactly what an outside contributor can improve, and a change to it changes how the agent behaves for everyone. Read [CONTRIBUTING.md](CONTRIBUTING.md) first — it covers what belongs here and what belongs upstream, in the repository that owns a given skill.
345
+ Prompt wording is exactly what an outside contributor can improve, and a change
346
+ to it changes how the agent behaves for everyone. Read
347
+ [CONTRIBUTING.md](CONTRIBUTING.md) first. It covers what belongs here and what
348
+ belongs upstream, in the repository that owns a given skill.
64
349
 
65
350
  ## Issues
66
351
 
67
352
  This repository is also the public issue tracker for both surfaces:
68
353
 
69
- - **Testeiya Desktop app** the packaged desktop application
70
- - **Testeiya CLI** the command-line agent in `src/`
354
+ - Testeiya Desktop app, the packaged desktop application
355
+ - Testeiya CLI, the command-line agent in `src/`
71
356
 
72
357
  ## Licence
73
358
 
@@ -1,6 +1,6 @@
1
1
  import { getSystemPrompt } from "./system-prompt.js";
2
2
  import { testomatioTms, testomatioConnection, testomatioNotConnected, projectSettings, } from "./testomatio.js";
3
- import { nonInteractive, reportOutput } from "./print.js";
3
+ import { briefAnswer, nonInteractive, reportOutput } from "./print.js";
4
4
  import { contextPromptSection, } from "./context.js";
5
5
  export function buildSystemPrompt(options) {
6
6
  const mode = options?.mode ?? "tui";
@@ -15,6 +15,8 @@ export function buildSystemPrompt(options) {
15
15
  interactive,
16
16
  toolBullets: options?.toolBullets,
17
17
  rules: options?.rules,
18
+ connectedClis: options?.connectedClis,
19
+ supportedMcps: options?.supportedMcps,
18
20
  }),
19
21
  ];
20
22
  const tokenSlugs = options?.tokens ? Object.keys(options.tokens) : [];
@@ -48,7 +50,9 @@ export function buildSystemPrompt(options) {
48
50
  else if (mode === "web" || mode === "print") {
49
51
  parts.push(testomatioNotConnected());
50
52
  }
51
- // The report contract goes last so it is the final instruction the model reads.
53
+ // The answer contract goes last so it is the final instruction the model reads.
54
+ if (options?.brief)
55
+ parts.push(briefAnswer);
52
56
  if (options?.outputFile)
53
57
  parts.push(reportOutput(options.outputFile));
54
58
  return parts.join("\n\n");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../prompt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,GAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,oBAAoB,GAGrB,MAAM,cAAc,CAAC;AAGtB,MAAM,UAAU,iBAAiB,CAAC,OAA6B;IAC7D,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,KAAK,CAAC;IACpC,MAAM,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC;IAErC,+EAA+E;IAC/E,gFAAgF;IAChF,6EAA6E;IAC7E,oEAAoE;IACpE,8CAA8C;IAC9C,MAAM,KAAK,GAAa;QACtB,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE;YAC5B,WAAW;YACX,WAAW,EAAE,OAAO,EAAE,WAAW;YACjC,KAAK,EAAE,OAAO,EAAE,KAAK;SACtB,CAAC;KACH,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,yEAAyE;IACzE,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,EAAE,cAAc,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IACpF,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,YAAY,CAAC;IACzC,6EAA6E;IAC7E,6EAA6E;IAC7E,qEAAqE;IACrE,IAAI,cAAc,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,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I,CAAC,WAAW,CAAC,CAAC;IAC5C,IAAI,OAAO,EAAE,UAAU;QAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAEtE,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
@@ -19,4 +19,12 @@ export function reportOutput(path) {
19
19
  </final-report>
20
20
  `;
21
21
  }
22
+ export const briefAnswer = dedent `
23
+ <answer>
24
+ * You were asked a question, not given a task. Answer it.
25
+ * Lead with the answer in one line, then the evidence you checked.
26
+ * A few sentences. No report file, no headings, no plan.
27
+ * Say plainly when what you found does not settle the question.
28
+ </answer>
29
+ `;
22
30
  //# sourceMappingURL=print.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"print.js","sourceRoot":"","sources":["../../prompt/print.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAA;;;;;;;;;CASnC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,MAAM,CAAA;;4CAE6B,IAAI;;;;;CAK/C,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"print.js","sourceRoot":"","sources":["../../prompt/print.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAA;;;;;;;;;CASnC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,MAAM,CAAA;;4CAE6B,IAAI;;;;;CAK/C,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAA;;;;;;;CAOhC,CAAC"}
@@ -9,6 +9,8 @@ export function getSystemPrompt(cwd, options) {
9
9
  let extraRules = "";
10
10
  for (const rule of options?.rules ?? [])
11
11
  extraRules += ` * ${rule}\n`;
12
+ let cliList = (options?.connectedClis ?? []).join(", ") || "none connected yet";
13
+ let mcpList = (options?.supportedMcps ?? []).join(", ") || "none connected yet";
12
14
  return dedent `
13
15
  <role>
14
16
  You are Testeiya, an AI agent that helps with QA tasks.
@@ -87,6 +89,16 @@ export function getSystemPrompt(cwd, options) {
87
89
 
88
90
  ${tools({ extra: options?.toolBullets })}
89
91
 
92
+ <connections>
93
+ Testeiya connects external tools for you — CLI tools and MCP servers. This session has:
94
+
95
+ * **Connected CLIs:** ${cliList}
96
+ * **Supported MCP servers:** ${mcpList}
97
+
98
+ * **Missing Connection — Ask, Never Improvise:** When a task needs a tool that is not in the lists above, STOP and ask the user to connect it in Testeiya (Settings → Connections). Never reach the service sideways: no raw REST/GraphQL calls against its API, no scraping credentials from dotfiles or env dumps, no installing binaries on your own.
99
+ * If a task needs both a CLI and an MCP server, ask once for both and say that Testeiya supports them both as connections — the user installs them side by side there.
100
+ </connections>
101
+
90
102
  <goals>
91
103
  You help in variety of tasks related to software testing, including writing test cases, analyzing test results, and providing feedback.
92
104
  You have skills to perform QA tasks on user demand.
@@ -98,10 +110,8 @@ export function getSystemPrompt(cwd, options) {
98
110
  * Assisting with manual test execution
99
111
  * Manage tests with TMS Testomat.io
100
112
  * Setting up CI pipelines for continuous testing
101
- * Analyzing requirements
102
- * Automating manual test cases
103
- * Launching automated exploratory tests via explorbot
104
- * Analyzing test results and providing feedback
113
+ * Analyzing requirements and issues
114
+ * Analyzing test results
105
115
 
106
116
  This is what you can do.
107
117
  </goals>
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../prompt/system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,UAAU,eAAe,CAAC,GAAY,EAAE,OAAuB;IACnE,MAAM,WAAW,GAAG,OAA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CAAC,CAAC,CAAC,6EAA6E;;;;;;;;;;;;;;;;;;;EAmBlM,UAAU,6HAA6H,mBAAmB;;;;;gFAK5E,iBAAiB;;;;GAI9F,CAAC;AACJ,CAAC;AAeD;;;;;;;;;;;;;;;;;;;;EAoBE"}
@@ -32,7 +32,7 @@ const tmsViaDirectTools = dedent `
32
32
  | Runs, testruns, plans, labels, issues, analytics | MCP \`testomatio-*\` tools |
33
33
  | Creating/updating tests or suites | edit the markdown file, then \`npx check-tests push\` |
34
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
35
+ | Launching automated or mixed Run remotely on CI | Use npx -y @testomatio/reporter@latest run --remote <profile>, raise error if no CI profiles configured
36
36
  | Running automated Run | Use local test runner with testomatio reporter attached to report to current project
37
37
 
38
38
  ---
@@ -69,7 +69,7 @@ const tmsViaProxy = dedent `
69
69
  | Runs, testruns, plans, labels, issues, analytics | \`mcp({ search: … })\`, then \`mcp({ tool: … })\` |
70
70
  | Creating/updating tests or suites | edit the markdown file, then \`npx check-tests push\` |
71
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 |
72
+ | Launching automated or mixed Run remotely on CI | Use npx -y @testomatio/reporter@latest run --remote <profile>, raise error if no CI profiles configured |
73
73
  | Running automated Run | Use local test runner with testomatio reporter attached to report to current project |
74
74
 
75
75
  ---
@@ -101,7 +101,7 @@ const tmsViaCli = dedent `
101
101
  | Suite hierarchy / structure / which files exist | \`ls\` / \`find\` |
102
102
  | Runs, testruns, plans, labels, issues, analytics | \`curl\` against \`/api/v2\` |
103
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 |
104
+ | Launching automated or mixed Run remotely on CI | Use npx -y @testomatio/reporter@latest run --remote <profile>, raise error if no CI profiles configured |
105
105
  | Running automated Run | Use local test runner with testomatio reporter attached to report to current project |
106
106
 
107
107
  ---
@@ -9,11 +9,19 @@ import dedent from 'dedent';
9
9
  */
10
10
  export function tools(options) {
11
11
  const extra = (options?.extra ?? []).join('');
12
- let github = ' - GitHub: issues and projects through MCP.';
13
- if (hasGh()) {
14
- github +=
12
+ let routing = ' - GitHub: issues and projects through MCP.';
13
+ if (onPath('gh')) {
14
+ routing +=
15
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
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
+ }
17
25
  return dedent `
18
26
  <available-tools>
19
27
  You have these tools available:
@@ -25,7 +33,7 @@ ${extra} * **Internal Skills:** For QA-related tasks, check available skills fi
25
33
  * **External Integrations:** Use MCP tools when they provide superior data or specialized integrations.
26
34
  - Primary MCP (Testomat.io): Use Testomat.io MCP tools to extend functionality.
27
35
  - Secondary MCP (Jira, GitHub, etc.): Invoke only when user explicitly asks or when remote context exploration is required.
28
- ${github}
36
+ ${routing}
29
37
 
30
38
  <tool-governance>
31
39
  * **Prioritize Specificity:** Use \`read\` instead of \`cat\`, and \`edit\` instead of \`sed\`. Dedicated tools provide better error tracking and safety.
@@ -36,12 +44,12 @@ ${github}
36
44
  </available-tools>
37
45
  `;
38
46
  }
39
- /** Is the `gh` CLI on PATH? Never tell the agent to use a binary this machine lacks. */
40
- function hasGh() {
47
+ /** Is this CLI on PATH? Never tell the agent to use a binary this machine lacks. */
48
+ function onPath(bin) {
41
49
  for (const dir of (process.env.PATH ?? '').split(delimiter)) {
42
50
  if (!dir)
43
51
  continue;
44
- if (existsSync(join(dir, 'gh')) || existsSync(join(dir, 'gh.exe')))
52
+ if (existsSync(join(dir, bin)) || existsSync(join(dir, `${bin}.exe`)))
45
53
  return true;
46
54
  }
47
55
  return false;
@@ -1 +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"}
1
+ {"version":3,"file":"tools.js","sourceRoot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