@inluxc/propmaster 0.0.0-stage → 1.0.0

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 (444) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +696 -2
  3. package/dist/src/annotations/index.d.ts +11 -0
  4. package/dist/src/annotations/index.d.ts.map +1 -0
  5. package/dist/src/annotations/index.js +11 -0
  6. package/dist/src/annotations/index.js.map +1 -0
  7. package/dist/src/annotations/recorder.d.ts +57 -0
  8. package/dist/src/annotations/recorder.d.ts.map +1 -0
  9. package/dist/src/annotations/recorder.js +100 -0
  10. package/dist/src/annotations/recorder.js.map +1 -0
  11. package/dist/src/annotations/truncation.d.ts +34 -0
  12. package/dist/src/annotations/truncation.d.ts.map +1 -0
  13. package/dist/src/annotations/truncation.js +54 -0
  14. package/dist/src/annotations/truncation.js.map +1 -0
  15. package/dist/src/auth/apply.d.ts +15 -0
  16. package/dist/src/auth/apply.d.ts.map +1 -0
  17. package/dist/src/auth/apply.js +21 -0
  18. package/dist/src/auth/apply.js.map +1 -0
  19. package/dist/src/auth/setup.d.ts +56 -0
  20. package/dist/src/auth/setup.d.ts.map +1 -0
  21. package/dist/src/auth/setup.js +79 -0
  22. package/dist/src/auth/setup.js.map +1 -0
  23. package/dist/src/auth/state-file.d.ts +8 -0
  24. package/dist/src/auth/state-file.d.ts.map +1 -0
  25. package/dist/src/auth/state-file.js +13 -0
  26. package/dist/src/auth/state-file.js.map +1 -0
  27. package/dist/src/auth/token-manager.d.ts +61 -0
  28. package/dist/src/auth/token-manager.d.ts.map +1 -0
  29. package/dist/src/auth/token-manager.js +200 -0
  30. package/dist/src/auth/token-manager.js.map +1 -0
  31. package/dist/src/cli/banner.d.ts +23 -0
  32. package/dist/src/cli/banner.d.ts.map +1 -0
  33. package/dist/src/cli/banner.js +67 -0
  34. package/dist/src/cli/banner.js.map +1 -0
  35. package/dist/src/cli/check-tests.d.ts +143 -0
  36. package/dist/src/cli/check-tests.d.ts.map +1 -0
  37. package/dist/src/cli/check-tests.js +541 -0
  38. package/dist/src/cli/check-tests.js.map +1 -0
  39. package/dist/src/cli/coverage.d.ts +14 -0
  40. package/dist/src/cli/coverage.d.ts.map +1 -0
  41. package/dist/src/cli/coverage.js +97 -0
  42. package/dist/src/cli/coverage.js.map +1 -0
  43. package/dist/src/cli/doctor.d.ts +82 -0
  44. package/dist/src/cli/doctor.d.ts.map +1 -0
  45. package/dist/src/cli/doctor.js +656 -0
  46. package/dist/src/cli/doctor.js.map +1 -0
  47. package/dist/src/cli/env.d.ts +76 -0
  48. package/dist/src/cli/env.d.ts.map +1 -0
  49. package/dist/src/cli/env.js +344 -0
  50. package/dist/src/cli/env.js.map +1 -0
  51. package/dist/src/cli/failures.d.ts +29 -0
  52. package/dist/src/cli/failures.d.ts.map +1 -0
  53. package/dist/src/cli/failures.js +114 -0
  54. package/dist/src/cli/failures.js.map +1 -0
  55. package/dist/src/cli/fixture-catalog.d.ts +83 -0
  56. package/dist/src/cli/fixture-catalog.d.ts.map +1 -0
  57. package/dist/src/cli/fixture-catalog.js +773 -0
  58. package/dist/src/cli/fixture-catalog.js.map +1 -0
  59. package/dist/src/cli/fixture.d.ts +149 -0
  60. package/dist/src/cli/fixture.d.ts.map +1 -0
  61. package/dist/src/cli/fixture.js +742 -0
  62. package/dist/src/cli/fixture.js.map +1 -0
  63. package/dist/src/cli/flaky.d.ts +25 -0
  64. package/dist/src/cli/flaky.d.ts.map +1 -0
  65. package/dist/src/cli/flaky.js +96 -0
  66. package/dist/src/cli/flaky.js.map +1 -0
  67. package/dist/src/cli/generate.d.ts +37 -0
  68. package/dist/src/cli/generate.d.ts.map +1 -0
  69. package/dist/src/cli/generate.js +230 -0
  70. package/dist/src/cli/generate.js.map +1 -0
  71. package/dist/src/cli/init.d.ts +36 -0
  72. package/dist/src/cli/init.d.ts.map +1 -0
  73. package/dist/src/cli/init.js +1039 -0
  74. package/dist/src/cli/init.js.map +1 -0
  75. package/dist/src/cli/json-edit.d.ts +58 -0
  76. package/dist/src/cli/json-edit.d.ts.map +1 -0
  77. package/dist/src/cli/json-edit.js +250 -0
  78. package/dist/src/cli/json-edit.js.map +1 -0
  79. package/dist/src/cli/layout.d.ts +31 -0
  80. package/dist/src/cli/layout.d.ts.map +1 -0
  81. package/dist/src/cli/layout.js +175 -0
  82. package/dist/src/cli/layout.js.map +1 -0
  83. package/dist/src/cli/mcp-setup.d.ts +141 -0
  84. package/dist/src/cli/mcp-setup.d.ts.map +1 -0
  85. package/dist/src/cli/mcp-setup.js +548 -0
  86. package/dist/src/cli/mcp-setup.js.map +1 -0
  87. package/dist/src/cli/organize.d.ts +136 -0
  88. package/dist/src/cli/organize.d.ts.map +1 -0
  89. package/dist/src/cli/organize.js +467 -0
  90. package/dist/src/cli/organize.js.map +1 -0
  91. package/dist/src/cli/prompts.d.ts +102 -0
  92. package/dist/src/cli/prompts.d.ts.map +1 -0
  93. package/dist/src/cli/prompts.js +346 -0
  94. package/dist/src/cli/prompts.js.map +1 -0
  95. package/dist/src/cli/standards.d.ts +160 -0
  96. package/dist/src/cli/standards.d.ts.map +1 -0
  97. package/dist/src/cli/standards.js +389 -0
  98. package/dist/src/cli/standards.js.map +1 -0
  99. package/dist/src/cli/style.d.ts +28 -0
  100. package/dist/src/cli/style.d.ts.map +1 -0
  101. package/dist/src/cli/style.js +57 -0
  102. package/dist/src/cli/style.js.map +1 -0
  103. package/dist/src/config/env-loader.d.ts +33 -0
  104. package/dist/src/config/env-loader.d.ts.map +1 -0
  105. package/dist/src/config/env-loader.js +72 -0
  106. package/dist/src/config/env-loader.js.map +1 -0
  107. package/dist/src/config/index.d.ts +10 -0
  108. package/dist/src/config/index.d.ts.map +1 -0
  109. package/dist/src/config/index.js +10 -0
  110. package/dist/src/config/index.js.map +1 -0
  111. package/dist/src/config/loader.d.ts +66 -0
  112. package/dist/src/config/loader.d.ts.map +1 -0
  113. package/dist/src/config/loader.js +810 -0
  114. package/dist/src/config/loader.js.map +1 -0
  115. package/dist/src/config/schema.d.ts +596 -0
  116. package/dist/src/config/schema.d.ts.map +1 -0
  117. package/dist/src/config/schema.js +9 -0
  118. package/dist/src/config/schema.js.map +1 -0
  119. package/dist/src/containers/container-manager.d.ts +157 -0
  120. package/dist/src/containers/container-manager.d.ts.map +1 -0
  121. package/dist/src/containers/container-manager.js +627 -0
  122. package/dist/src/containers/container-manager.js.map +1 -0
  123. package/dist/src/coverage/code-coverage.d.ts +89 -0
  124. package/dist/src/coverage/code-coverage.d.ts.map +1 -0
  125. package/dist/src/coverage/code-coverage.js +395 -0
  126. package/dist/src/coverage/code-coverage.js.map +1 -0
  127. package/dist/src/coverage/inventory.d.ts +80 -0
  128. package/dist/src/coverage/inventory.d.ts.map +1 -0
  129. package/dist/src/coverage/inventory.js +417 -0
  130. package/dist/src/coverage/inventory.js.map +1 -0
  131. package/dist/src/coverage/languages.d.ts +34 -0
  132. package/dist/src/coverage/languages.d.ts.map +1 -0
  133. package/dist/src/coverage/languages.js +156 -0
  134. package/dist/src/coverage/languages.js.map +1 -0
  135. package/dist/src/coverage/report.d.ts +128 -0
  136. package/dist/src/coverage/report.d.ts.map +1 -0
  137. package/dist/src/coverage/report.js +472 -0
  138. package/dist/src/coverage/report.js.map +1 -0
  139. package/dist/src/errors.d.ts +164 -0
  140. package/dist/src/errors.d.ts.map +1 -0
  141. package/dist/src/errors.js +267 -0
  142. package/dist/src/errors.js.map +1 -0
  143. package/dist/src/fixtures/amqp.fixture.d.ts +163 -0
  144. package/dist/src/fixtures/amqp.fixture.d.ts.map +1 -0
  145. package/dist/src/fixtures/amqp.fixture.js +494 -0
  146. package/dist/src/fixtures/amqp.fixture.js.map +1 -0
  147. package/dist/src/fixtures/appium.fixture.d.ts +112 -0
  148. package/dist/src/fixtures/appium.fixture.d.ts.map +1 -0
  149. package/dist/src/fixtures/appium.fixture.js +309 -0
  150. package/dist/src/fixtures/appium.fixture.js.map +1 -0
  151. package/dist/src/fixtures/aws.d.ts +44 -0
  152. package/dist/src/fixtures/aws.d.ts.map +1 -0
  153. package/dist/src/fixtures/aws.js +93 -0
  154. package/dist/src/fixtures/aws.js.map +1 -0
  155. package/dist/src/fixtures/cassandra.fixture.d.ts +179 -0
  156. package/dist/src/fixtures/cassandra.fixture.d.ts.map +1 -0
  157. package/dist/src/fixtures/cassandra.fixture.js +489 -0
  158. package/dist/src/fixtures/cassandra.fixture.js.map +1 -0
  159. package/dist/src/fixtures/clickhouse.fixture.d.ts +171 -0
  160. package/dist/src/fixtures/clickhouse.fixture.d.ts.map +1 -0
  161. package/dist/src/fixtures/clickhouse.fixture.js +514 -0
  162. package/dist/src/fixtures/clickhouse.fixture.js.map +1 -0
  163. package/dist/src/fixtures/database.fixture.d.ts +63 -0
  164. package/dist/src/fixtures/database.fixture.d.ts.map +1 -0
  165. package/dist/src/fixtures/database.fixture.js +407 -0
  166. package/dist/src/fixtures/database.fixture.js.map +1 -0
  167. package/dist/src/fixtures/dynamodb.fixture.d.ts +243 -0
  168. package/dist/src/fixtures/dynamodb.fixture.d.ts.map +1 -0
  169. package/dist/src/fixtures/dynamodb.fixture.js +580 -0
  170. package/dist/src/fixtures/dynamodb.fixture.js.map +1 -0
  171. package/dist/src/fixtures/graphql.fixture.d.ts +107 -0
  172. package/dist/src/fixtures/graphql.fixture.d.ts.map +1 -0
  173. package/dist/src/fixtures/graphql.fixture.js +158 -0
  174. package/dist/src/fixtures/graphql.fixture.js.map +1 -0
  175. package/dist/src/fixtures/grpc.fixture.d.ts +167 -0
  176. package/dist/src/fixtures/grpc.fixture.d.ts.map +1 -0
  177. package/dist/src/fixtures/grpc.fixture.js +635 -0
  178. package/dist/src/fixtures/grpc.fixture.js.map +1 -0
  179. package/dist/src/fixtures/inbox.fixture.d.ts +136 -0
  180. package/dist/src/fixtures/inbox.fixture.d.ts.map +1 -0
  181. package/dist/src/fixtures/inbox.fixture.js +239 -0
  182. package/dist/src/fixtures/inbox.fixture.js.map +1 -0
  183. package/dist/src/fixtures/index.d.ts +174 -0
  184. package/dist/src/fixtures/index.d.ts.map +1 -0
  185. package/dist/src/fixtures/index.js +370 -0
  186. package/dist/src/fixtures/index.js.map +1 -0
  187. package/dist/src/fixtures/kafka-driver.d.ts +108 -0
  188. package/dist/src/fixtures/kafka-driver.d.ts.map +1 -0
  189. package/dist/src/fixtures/kafka-driver.js +113 -0
  190. package/dist/src/fixtures/kafka-driver.js.map +1 -0
  191. package/dist/src/fixtures/kafka.fixture.d.ts +75 -0
  192. package/dist/src/fixtures/kafka.fixture.d.ts.map +1 -0
  193. package/dist/src/fixtures/kafka.fixture.js +188 -0
  194. package/dist/src/fixtures/kafka.fixture.js.map +1 -0
  195. package/dist/src/fixtures/mock-server.fixture.d.ts +142 -0
  196. package/dist/src/fixtures/mock-server.fixture.d.ts.map +1 -0
  197. package/dist/src/fixtures/mock-server.fixture.js +271 -0
  198. package/dist/src/fixtures/mock-server.fixture.js.map +1 -0
  199. package/dist/src/fixtures/mongodb.fixture.d.ts +121 -0
  200. package/dist/src/fixtures/mongodb.fixture.d.ts.map +1 -0
  201. package/dist/src/fixtures/mongodb.fixture.js +258 -0
  202. package/dist/src/fixtures/mongodb.fixture.js.map +1 -0
  203. package/dist/src/fixtures/neo4j.fixture.d.ts +72 -0
  204. package/dist/src/fixtures/neo4j.fixture.d.ts.map +1 -0
  205. package/dist/src/fixtures/neo4j.fixture.js +202 -0
  206. package/dist/src/fixtures/neo4j.fixture.js.map +1 -0
  207. package/dist/src/fixtures/openapi.fixture.d.ts +101 -0
  208. package/dist/src/fixtures/openapi.fixture.d.ts.map +1 -0
  209. package/dist/src/fixtures/openapi.fixture.js +266 -0
  210. package/dist/src/fixtures/openapi.fixture.js.map +1 -0
  211. package/dist/src/fixtures/optional-package.d.ts +54 -0
  212. package/dist/src/fixtures/optional-package.d.ts.map +1 -0
  213. package/dist/src/fixtures/optional-package.js +79 -0
  214. package/dist/src/fixtures/optional-package.js.map +1 -0
  215. package/dist/src/fixtures/otp.fixture.d.ts +60 -0
  216. package/dist/src/fixtures/otp.fixture.d.ts.map +1 -0
  217. package/dist/src/fixtures/otp.fixture.js +101 -0
  218. package/dist/src/fixtures/otp.fixture.js.map +1 -0
  219. package/dist/src/fixtures/realtime.fixture.d.ts +205 -0
  220. package/dist/src/fixtures/realtime.fixture.d.ts.map +1 -0
  221. package/dist/src/fixtures/realtime.fixture.js +606 -0
  222. package/dist/src/fixtures/realtime.fixture.js.map +1 -0
  223. package/dist/src/fixtures/redis.fixture.d.ts +55 -0
  224. package/dist/src/fixtures/redis.fixture.d.ts.map +1 -0
  225. package/dist/src/fixtures/redis.fixture.js +209 -0
  226. package/dist/src/fixtures/redis.fixture.js.map +1 -0
  227. package/dist/src/fixtures/s3.fixture.d.ts +126 -0
  228. package/dist/src/fixtures/s3.fixture.d.ts.map +1 -0
  229. package/dist/src/fixtures/s3.fixture.js +296 -0
  230. package/dist/src/fixtures/s3.fixture.js.map +1 -0
  231. package/dist/src/fixtures/search.fixture.d.ts +178 -0
  232. package/dist/src/fixtures/search.fixture.d.ts.map +1 -0
  233. package/dist/src/fixtures/search.fixture.js +472 -0
  234. package/dist/src/fixtures/search.fixture.js.map +1 -0
  235. package/dist/src/fixtures/sqs.fixture.d.ts +172 -0
  236. package/dist/src/fixtures/sqs.fixture.d.ts.map +1 -0
  237. package/dist/src/fixtures/sqs.fixture.js +428 -0
  238. package/dist/src/fixtures/sqs.fixture.js.map +1 -0
  239. package/dist/src/index.d.ts +43 -0
  240. package/dist/src/index.d.ts.map +1 -0
  241. package/dist/src/index.js +48 -0
  242. package/dist/src/index.js.map +1 -0
  243. package/dist/src/mcp/guards.d.ts +21 -0
  244. package/dist/src/mcp/guards.d.ts.map +1 -0
  245. package/dist/src/mcp/guards.js +118 -0
  246. package/dist/src/mcp/guards.js.map +1 -0
  247. package/dist/src/mcp/project-tools.d.ts +14 -0
  248. package/dist/src/mcp/project-tools.d.ts.map +1 -0
  249. package/dist/src/mcp/project-tools.js +252 -0
  250. package/dist/src/mcp/project-tools.js.map +1 -0
  251. package/dist/src/mcp/protocol.d.ts +116 -0
  252. package/dist/src/mcp/protocol.d.ts.map +1 -0
  253. package/dist/src/mcp/protocol.js +199 -0
  254. package/dist/src/mcp/protocol.js.map +1 -0
  255. package/dist/src/mcp/server.d.ts +43 -0
  256. package/dist/src/mcp/server.d.ts.map +1 -0
  257. package/dist/src/mcp/server.js +244 -0
  258. package/dist/src/mcp/server.js.map +1 -0
  259. package/dist/src/mcp/test-tools.d.ts +65 -0
  260. package/dist/src/mcp/test-tools.d.ts.map +1 -0
  261. package/dist/src/mcp/test-tools.js +380 -0
  262. package/dist/src/mcp/test-tools.js.map +1 -0
  263. package/dist/src/mcp/tools.d.ts +49 -0
  264. package/dist/src/mcp/tools.d.ts.map +1 -0
  265. package/dist/src/mcp/tools.js +726 -0
  266. package/dist/src/mcp/tools.js.map +1 -0
  267. package/dist/src/network-error.d.ts +11 -0
  268. package/dist/src/network-error.d.ts.map +1 -0
  269. package/dist/src/network-error.js +34 -0
  270. package/dist/src/network-error.js.map +1 -0
  271. package/dist/src/openapi/contract.d.ts +98 -0
  272. package/dist/src/openapi/contract.d.ts.map +1 -0
  273. package/dist/src/openapi/contract.js +407 -0
  274. package/dist/src/openapi/contract.js.map +1 -0
  275. package/dist/src/openapi/generate.d.ts +89 -0
  276. package/dist/src/openapi/generate.d.ts.map +1 -0
  277. package/dist/src/openapi/generate.js +607 -0
  278. package/dist/src/openapi/generate.js.map +1 -0
  279. package/dist/src/openapi/load.d.ts +8 -0
  280. package/dist/src/openapi/load.d.ts.map +1 -0
  281. package/dist/src/openapi/load.js +26 -0
  282. package/dist/src/openapi/load.js.map +1 -0
  283. package/dist/src/package-manager.d.ts +58 -0
  284. package/dist/src/package-manager.d.ts.map +1 -0
  285. package/dist/src/package-manager.js +137 -0
  286. package/dist/src/package-manager.js.map +1 -0
  287. package/dist/src/reporter/history.d.ts +85 -0
  288. package/dist/src/reporter/history.d.ts.map +1 -0
  289. package/dist/src/reporter/history.js +147 -0
  290. package/dist/src/reporter/history.js.map +1 -0
  291. package/dist/src/reporter/index.d.ts +59 -0
  292. package/dist/src/reporter/index.d.ts.map +1 -0
  293. package/dist/src/reporter/index.js +201 -0
  294. package/dist/src/reporter/index.js.map +1 -0
  295. package/dist/src/reporter/last-run.d.ts +88 -0
  296. package/dist/src/reporter/last-run.d.ts.map +1 -0
  297. package/dist/src/reporter/last-run.js +133 -0
  298. package/dist/src/reporter/last-run.js.map +1 -0
  299. package/dist/src/reporter/quarantine.d.ts +62 -0
  300. package/dist/src/reporter/quarantine.d.ts.map +1 -0
  301. package/dist/src/reporter/quarantine.js +148 -0
  302. package/dist/src/reporter/quarantine.js.map +1 -0
  303. package/dist/src/secrets/index.d.ts +4 -0
  304. package/dist/src/secrets/index.d.ts.map +1 -0
  305. package/dist/src/secrets/index.js +3 -0
  306. package/dist/src/secrets/index.js.map +1 -0
  307. package/dist/src/secrets/provider.interface.d.ts +30 -0
  308. package/dist/src/secrets/provider.interface.d.ts.map +1 -0
  309. package/dist/src/secrets/provider.interface.js +2 -0
  310. package/dist/src/secrets/provider.interface.js.map +1 -0
  311. package/dist/src/secrets/providers/aws.provider.d.ts +33 -0
  312. package/dist/src/secrets/providers/aws.provider.d.ts.map +1 -0
  313. package/dist/src/secrets/providers/aws.provider.js +88 -0
  314. package/dist/src/secrets/providers/aws.provider.js.map +1 -0
  315. package/dist/src/secrets/providers/azure.provider.d.ts +26 -0
  316. package/dist/src/secrets/providers/azure.provider.d.ts.map +1 -0
  317. package/dist/src/secrets/providers/azure.provider.js +71 -0
  318. package/dist/src/secrets/providers/azure.provider.js.map +1 -0
  319. package/dist/src/secrets/providers/env-file.provider.d.ts +29 -0
  320. package/dist/src/secrets/providers/env-file.provider.d.ts.map +1 -0
  321. package/dist/src/secrets/providers/env-file.provider.js +56 -0
  322. package/dist/src/secrets/providers/env-file.provider.js.map +1 -0
  323. package/dist/src/secrets/providers/gitlab.provider.d.ts +26 -0
  324. package/dist/src/secrets/providers/gitlab.provider.d.ts.map +1 -0
  325. package/dist/src/secrets/providers/gitlab.provider.js +67 -0
  326. package/dist/src/secrets/providers/gitlab.provider.js.map +1 -0
  327. package/dist/src/secrets/providers/index.d.ts +52 -0
  328. package/dist/src/secrets/providers/index.d.ts.map +1 -0
  329. package/dist/src/secrets/providers/index.js +81 -0
  330. package/dist/src/secrets/providers/index.js.map +1 -0
  331. package/dist/src/secrets/providers/openbao.provider.d.ts +28 -0
  332. package/dist/src/secrets/providers/openbao.provider.d.ts.map +1 -0
  333. package/dist/src/secrets/providers/openbao.provider.js +29 -0
  334. package/dist/src/secrets/providers/openbao.provider.js.map +1 -0
  335. package/dist/src/secrets/providers/vault-compatible.d.ts +140 -0
  336. package/dist/src/secrets/providers/vault-compatible.d.ts.map +1 -0
  337. package/dist/src/secrets/providers/vault-compatible.js +405 -0
  338. package/dist/src/secrets/providers/vault-compatible.js.map +1 -0
  339. package/dist/src/secrets/providers/vault.provider.d.ts +27 -0
  340. package/dist/src/secrets/providers/vault.provider.d.ts.map +1 -0
  341. package/dist/src/secrets/providers/vault.provider.js +23 -0
  342. package/dist/src/secrets/providers/vault.provider.js.map +1 -0
  343. package/dist/src/secrets/secrets-manager.d.ts +67 -0
  344. package/dist/src/secrets/secrets-manager.d.ts.map +1 -0
  345. package/dist/src/secrets/secrets-manager.js +255 -0
  346. package/dist/src/secrets/secrets-manager.js.map +1 -0
  347. package/dist/src/steps/amqp.steps.d.ts +37 -0
  348. package/dist/src/steps/amqp.steps.d.ts.map +1 -0
  349. package/dist/src/steps/amqp.steps.js +86 -0
  350. package/dist/src/steps/amqp.steps.js.map +1 -0
  351. package/dist/src/steps/appium.steps.d.ts +53 -0
  352. package/dist/src/steps/appium.steps.d.ts.map +1 -0
  353. package/dist/src/steps/appium.steps.js +109 -0
  354. package/dist/src/steps/appium.steps.js.map +1 -0
  355. package/dist/src/steps/aws.steps.d.ts +47 -0
  356. package/dist/src/steps/aws.steps.d.ts.map +1 -0
  357. package/dist/src/steps/aws.steps.js +116 -0
  358. package/dist/src/steps/aws.steps.js.map +1 -0
  359. package/dist/src/steps/browser.steps.d.ts +54 -0
  360. package/dist/src/steps/browser.steps.d.ts.map +1 -0
  361. package/dist/src/steps/browser.steps.js +102 -0
  362. package/dist/src/steps/browser.steps.js.map +1 -0
  363. package/dist/src/steps/cassandra.steps.d.ts +32 -0
  364. package/dist/src/steps/cassandra.steps.d.ts.map +1 -0
  365. package/dist/src/steps/cassandra.steps.js +81 -0
  366. package/dist/src/steps/cassandra.steps.js.map +1 -0
  367. package/dist/src/steps/clickhouse.steps.d.ts +30 -0
  368. package/dist/src/steps/clickhouse.steps.d.ts.map +1 -0
  369. package/dist/src/steps/clickhouse.steps.js +73 -0
  370. package/dist/src/steps/clickhouse.steps.js.map +1 -0
  371. package/dist/src/steps/database.steps.d.ts +43 -0
  372. package/dist/src/steps/database.steps.d.ts.map +1 -0
  373. package/dist/src/steps/database.steps.js +79 -0
  374. package/dist/src/steps/database.steps.js.map +1 -0
  375. package/dist/src/steps/dynamodb.steps.d.ts +32 -0
  376. package/dist/src/steps/dynamodb.steps.d.ts.map +1 -0
  377. package/dist/src/steps/dynamodb.steps.js +89 -0
  378. package/dist/src/steps/dynamodb.steps.js.map +1 -0
  379. package/dist/src/steps/graphql.steps.d.ts +60 -0
  380. package/dist/src/steps/graphql.steps.d.ts.map +1 -0
  381. package/dist/src/steps/graphql.steps.js +76 -0
  382. package/dist/src/steps/graphql.steps.js.map +1 -0
  383. package/dist/src/steps/grpc.steps.d.ts +29 -0
  384. package/dist/src/steps/grpc.steps.d.ts.map +1 -0
  385. package/dist/src/steps/grpc.steps.js +68 -0
  386. package/dist/src/steps/grpc.steps.js.map +1 -0
  387. package/dist/src/steps/inbox.steps.d.ts +30 -0
  388. package/dist/src/steps/inbox.steps.d.ts.map +1 -0
  389. package/dist/src/steps/inbox.steps.js +72 -0
  390. package/dist/src/steps/inbox.steps.js.map +1 -0
  391. package/dist/src/steps/index.d.ts +43 -0
  392. package/dist/src/steps/index.d.ts.map +1 -0
  393. package/dist/src/steps/index.js +26 -0
  394. package/dist/src/steps/index.js.map +1 -0
  395. package/dist/src/steps/kafka.steps.d.ts +56 -0
  396. package/dist/src/steps/kafka.steps.d.ts.map +1 -0
  397. package/dist/src/steps/kafka.steps.js +61 -0
  398. package/dist/src/steps/kafka.steps.js.map +1 -0
  399. package/dist/src/steps/mock-server.steps.d.ts +21 -0
  400. package/dist/src/steps/mock-server.steps.d.ts.map +1 -0
  401. package/dist/src/steps/mock-server.steps.js +45 -0
  402. package/dist/src/steps/mock-server.steps.js.map +1 -0
  403. package/dist/src/steps/mongodb.steps.d.ts +107 -0
  404. package/dist/src/steps/mongodb.steps.d.ts.map +1 -0
  405. package/dist/src/steps/mongodb.steps.js +117 -0
  406. package/dist/src/steps/mongodb.steps.js.map +1 -0
  407. package/dist/src/steps/openapi.steps.d.ts +49 -0
  408. package/dist/src/steps/openapi.steps.d.ts.map +1 -0
  409. package/dist/src/steps/openapi.steps.js +113 -0
  410. package/dist/src/steps/openapi.steps.js.map +1 -0
  411. package/dist/src/steps/otp.steps.d.ts +43 -0
  412. package/dist/src/steps/otp.steps.d.ts.map +1 -0
  413. package/dist/src/steps/otp.steps.js +83 -0
  414. package/dist/src/steps/otp.steps.js.map +1 -0
  415. package/dist/src/steps/realtime.steps.d.ts +40 -0
  416. package/dist/src/steps/realtime.steps.d.ts.map +1 -0
  417. package/dist/src/steps/realtime.steps.js +116 -0
  418. package/dist/src/steps/realtime.steps.js.map +1 -0
  419. package/dist/src/steps/redis.steps.d.ts +54 -0
  420. package/dist/src/steps/redis.steps.d.ts.map +1 -0
  421. package/dist/src/steps/redis.steps.js +89 -0
  422. package/dist/src/steps/redis.steps.js.map +1 -0
  423. package/dist/src/steps/search.steps.d.ts +23 -0
  424. package/dist/src/steps/search.steps.d.ts.map +1 -0
  425. package/dist/src/steps/search.steps.js +54 -0
  426. package/dist/src/steps/search.steps.js.map +1 -0
  427. package/dist/src/test-data/factory.d.ts +82 -0
  428. package/dist/src/test-data/factory.d.ts.map +1 -0
  429. package/dist/src/test-data/factory.js +116 -0
  430. package/dist/src/test-data/factory.js.map +1 -0
  431. package/dist/src/test-data/index.d.ts +4 -0
  432. package/dist/src/test-data/index.d.ts.map +1 -0
  433. package/dist/src/test-data/index.js +4 -0
  434. package/dist/src/test-data/index.js.map +1 -0
  435. package/dist/src/test-data/registry.d.ts +37 -0
  436. package/dist/src/test-data/registry.d.ts.map +1 -0
  437. package/dist/src/test-data/registry.js +51 -0
  438. package/dist/src/test-data/registry.js.map +1 -0
  439. package/dist/src/test-data/tracking.d.ts +47 -0
  440. package/dist/src/test-data/tracking.d.ts.map +1 -0
  441. package/dist/src/test-data/tracking.js +166 -0
  442. package/dist/src/test-data/tracking.js.map +1 -0
  443. package/environments.json +263 -0
  444. package/package.json +299 -5
@@ -0,0 +1,65 @@
1
+ /**
2
+ * MCP tools for the test loop: run tests and read why they failed
3
+ * (run_tests, last_failures), the flake ranking (flaky_tests), what the tests
4
+ * cover per layer (coverage_report) and the API tests the OpenAPI spec gives
5
+ * (generate_api_tests).
6
+ *
7
+ * run_tests runs `playwright test` in the project with the Propmaster
8
+ * reporter, which writes the failures with their steps and errors to the
9
+ * last-run file; the tool reads that file back. It has a time limit and isn't
10
+ * offered for a production environment.
11
+ */
12
+ import { type LastRunTest } from '../reporter/last-run.js';
13
+ import type { FrameworkConfig } from '../config/schema.js';
14
+ import { type ToolDefinition } from './protocol.js';
15
+ export declare const DEFAULT_RUN_TIMEOUT_S = 300;
16
+ export declare const MAX_RUN_TIMEOUT_S = 1800;
17
+ export interface RunTestsOptions {
18
+ ids?: string[];
19
+ files?: string[];
20
+ projects?: string[];
21
+ grep?: string;
22
+ /** Seconds for the whole run. */
23
+ timeout?: number;
24
+ retries?: number;
25
+ workers?: number;
26
+ /** Add the run to the test history (default false: runs while writing a test aren't flakes). */
27
+ history?: boolean;
28
+ environment?: string;
29
+ }
30
+ export interface RunTestsResult {
31
+ ok: boolean;
32
+ status: string;
33
+ exitCode: number | null;
34
+ durationMs: number;
35
+ counts?: {
36
+ total: number;
37
+ passed: number;
38
+ flaky: number;
39
+ failed: number;
40
+ skipped: number;
41
+ };
42
+ failures: LastRunTest[];
43
+ moreFailures?: number;
44
+ flaky: Array<Pick<LastRunTest, 'id' | 'title' | 'location' | 'project' | 'failedStep'>>;
45
+ errors: string[];
46
+ timedOut?: true;
47
+ /** The same run in a terminal. */
48
+ command: string;
49
+ /** The end of Playwright's output, when the run didn't report (config errors and the like). */
50
+ output?: string;
51
+ }
52
+ /** The arguments to `playwright test` for the options. Throws ToolInputError for a bad one. */
53
+ export declare function playwrightArgs(options: RunTestsOptions, reporter: string): string[];
54
+ /** Runs the tests and reads the failures back from the last-run file. */
55
+ export declare function runTests(root: string, options: RunTestsOptions): Promise<RunTestsResult>;
56
+ export interface TestToolsContext {
57
+ root: string;
58
+ environment: string;
59
+ /** A production environment: run_tests isn't offered. */
60
+ production: boolean;
61
+ /** The environment's config: the OpenAPI spec and which backends are configured, for coverage_report. */
62
+ config?: FrameworkConfig;
63
+ }
64
+ export declare function testTools(ctx: TestToolsContext): ToolDefinition[];
65
+ //# sourceMappingURL=test-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/test-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpE,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAStC,MAAM,WAAW,eAAe;IAC5B,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAA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MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,UAAU,EAAE,OAAO,CAAC;IACpB,yGAAyG;IACzG,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,cAAc,EAAE,CA6KjE"}
@@ -0,0 +1,380 @@
1
+ /**
2
+ * MCP tools for the test loop: run tests and read why they failed
3
+ * (run_tests, last_failures), the flake ranking (flaky_tests), what the tests
4
+ * cover per layer (coverage_report) and the API tests the OpenAPI spec gives
5
+ * (generate_api_tests).
6
+ *
7
+ * run_tests runs `playwright test` in the project with the Propmaster
8
+ * reporter, which writes the failures with their steps and errors to the
9
+ * last-run file; the tool reads that file back. It has a time limit and isn't
10
+ * offered for a production environment.
11
+ */
12
+ import { spawn } from 'node:child_process';
13
+ import { installedPackageDir, packageCommand, packageManager } from '../package-manager.js';
14
+ import { createRequire } from 'node:module';
15
+ import { extname, isAbsolute, join, relative } from 'node:path';
16
+ import { fileURLToPath } from 'node:url';
17
+ import { readLastRun } from '../reporter/last-run.js';
18
+ import { lastFailures, lastRunFile } from '../cli/failures.js';
19
+ import { flakyRows } from '../cli/flaky.js';
20
+ import { generateOpenApiTests } from '../cli/generate.js';
21
+ import { coverageReport } from '../coverage/report.js';
22
+ import { LAYERS } from '../coverage/inventory.js';
23
+ import { ToolInputError } from './protocol.js';
24
+ export const DEFAULT_RUN_TIMEOUT_S = 300;
25
+ export const MAX_RUN_TIMEOUT_S = 1800;
26
+ const MAX_FAILURES = 20;
27
+ const MAX_OUTPUT = 4000;
28
+ const MAX_FILE_CONTENT = 20_000;
29
+ /** After the global timeout: how long Playwright gets to stop and report before it's killed. */
30
+ const KILL_GRACE_MS = 30_000;
31
+ const TEST_ID = /^TC-[A-Z][A-Z0-9]{1,5}-\d{3,}$/;
32
+ const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
33
+ /** The arguments to `playwright test` for the options. Throws ToolInputError for a bad one. */
34
+ export function playwrightArgs(options, reporter) {
35
+ const args = ['test'];
36
+ for (const file of options.files ?? []) {
37
+ if (typeof file !== 'string' || !file || file.startsWith('-'))
38
+ throw new ToolInputError(`files must be test file paths or patterns, not "${String(file)}"`);
39
+ args.push(file);
40
+ }
41
+ if (options.ids?.length && options.grep)
42
+ throw new ToolInputError('Pass ids or grep, not both');
43
+ if (options.ids?.length) {
44
+ const bad = options.ids.filter((id) => typeof id !== 'string' || !TEST_ID.test(id));
45
+ if (bad.length)
46
+ throw new ToolInputError(`Not TestCaseIDs: ${bad.join(', ')} (expected TC-XXX-NNN)`);
47
+ // The ID is in the title ([TC-API-001]) and the tag (@TC-API-001); (?!\d) keeps TC-API-001 from matching TC-API-0010.
48
+ args.push(`--grep=(${options.ids.map((id) => `${escapeRegExp(id)}(?!\\d)`).join('|')})`);
49
+ }
50
+ else if (options.grep) {
51
+ args.push(`--grep=${options.grep}`);
52
+ }
53
+ for (const project of options.projects ?? []) {
54
+ if (typeof project !== 'string' || !project)
55
+ throw new ToolInputError('projects must be project names');
56
+ args.push(`--project=${project}`);
57
+ }
58
+ if (options.retries !== undefined)
59
+ args.push(`--retries=${options.retries}`);
60
+ if (options.workers !== undefined)
61
+ args.push(`--workers=${options.workers}`);
62
+ args.push(`--global-timeout=${(options.timeout ?? DEFAULT_RUN_TIMEOUT_S) * 1000}`);
63
+ args.push(`--reporter=dot,${reporter}`);
64
+ return args;
65
+ }
66
+ /** The Propmaster reporter of this copy of Propmaster (TypeScript under tsx, JavaScript once built). */
67
+ function reporterPath() {
68
+ const ext = extname(fileURLToPath(import.meta.url));
69
+ return fileURLToPath(new URL(`../reporter/index${ext}`, import.meta.url));
70
+ }
71
+ function playwrightCli(root) {
72
+ try {
73
+ const dir = installedPackageDir(root, '@playwright/test');
74
+ if (!dir)
75
+ throw new Error('not installed');
76
+ return createRequire(join(dir, 'package.json')).resolve('@playwright/test/cli');
77
+ }
78
+ catch {
79
+ throw new ToolInputError(`@playwright/test isn't installed in ${root}: ${packageCommand(packageManager(root), 'install', ['@playwright/test']).join(' ')}`);
80
+ }
81
+ }
82
+ /** The environment for the run: Playwright's own worker variables are dropped, so a run from inside a test starts clean. */
83
+ function childEnv(environment, lastRun, history) {
84
+ const env = Object.fromEntries(Object.entries(process.env).filter(([k]) => !/^(TEST_|PW_TEST_|PW_TS_)/.test(k)));
85
+ return {
86
+ ...env,
87
+ ...(environment ? { PW_ENVIRONMENT: environment } : {}),
88
+ FORCE_COLOR: '0',
89
+ PW_LAST_RUN_FILE: lastRun,
90
+ ...(history ? {} : { PW_TEST_HISTORY: 'false' }),
91
+ };
92
+ }
93
+ const quote = (arg) => (/^[\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`);
94
+ /** Runs the tests and reads the failures back from the last-run file. */
95
+ export async function runTests(root, options) {
96
+ const timeout = options.timeout ?? DEFAULT_RUN_TIMEOUT_S;
97
+ const cli = playwrightCli(root);
98
+ const args = playwrightArgs(options, reporterPath());
99
+ const lastRun = lastRunFile(root);
100
+ const started = Date.now();
101
+ let output = '';
102
+ let timedOut = false;
103
+ const exitCode = await new Promise((resolveExit, reject) => {
104
+ const child = spawn(process.execPath, [cli, ...args], {
105
+ cwd: root,
106
+ env: childEnv(options.environment, lastRun, options.history === true),
107
+ stdio: ['ignore', 'pipe', 'pipe'],
108
+ // Its own process group, so a run that doesn't stop is killed with its workers.
109
+ detached: process.platform !== 'win32',
110
+ });
111
+ const collect = (chunk) => {
112
+ output = (output + chunk.toString()).slice(-MAX_OUTPUT * 4);
113
+ };
114
+ child.stdout.on('data', collect);
115
+ child.stderr.on('data', collect);
116
+ const kill = (signal) => {
117
+ try {
118
+ if (process.platform !== 'win32' && child.pid)
119
+ process.kill(-child.pid, signal);
120
+ else
121
+ child.kill(signal);
122
+ }
123
+ catch {
124
+ // already gone
125
+ }
126
+ };
127
+ // Playwright stops itself at --global-timeout and reports; this is for a run that hangs anyway.
128
+ const hard = setTimeout(() => {
129
+ timedOut = true;
130
+ kill('SIGINT');
131
+ setTimeout(() => kill('SIGKILL'), 5000).unref();
132
+ }, timeout * 1000 + KILL_GRACE_MS);
133
+ child.on('error', (error) => {
134
+ clearTimeout(hard);
135
+ reject(error);
136
+ });
137
+ child.on('close', (code) => {
138
+ clearTimeout(hard);
139
+ resolveExit(code);
140
+ });
141
+ });
142
+ const command = ['npx', 'playwright', ...args.filter((a) => !a.startsWith('--reporter=') && !a.startsWith('--global-timeout='))].map(quote).join(' ');
143
+ const durationMs = Date.now() - started;
144
+ const run = readLastRun(lastRun);
145
+ const fresh = run && Date.parse(run.startedAt) >= started - 1000 ? run : undefined;
146
+ const tail = output.trim().slice(-MAX_OUTPUT);
147
+ if (!fresh) {
148
+ return {
149
+ ok: false, status: timedOut ? 'timedout' : 'error', exitCode, durationMs, failures: [], flaky: [], errors: [],
150
+ ...(timedOut ? { timedOut: true } : {}),
151
+ command,
152
+ output: tail || '(no output)',
153
+ };
154
+ }
155
+ const failures = fresh.tests.filter((t) => t.outcome === 'failed');
156
+ const status = timedOut ? 'timedout' : fresh.status;
157
+ return {
158
+ // exit code 0 also covers a run whose only failures are quarantined
159
+ ok: exitCode === 0,
160
+ status,
161
+ exitCode,
162
+ durationMs,
163
+ counts: fresh.counts,
164
+ failures: failures.slice(0, MAX_FAILURES),
165
+ ...(failures.length > MAX_FAILURES ? { moreFailures: failures.length - MAX_FAILURES } : {}),
166
+ flaky: fresh.tests.filter((t) => t.outcome === 'flaky').map(({ id, title, location, project, failedStep }) => ({ id, title, location, project, ...(failedStep ? { failedStep } : {}) })),
167
+ errors: fresh.errors,
168
+ ...(timedOut || status === 'timedout' ? { timedOut: true } : {}),
169
+ command,
170
+ // Errors outside the tests (no tests found, a global setup) are clearer with Playwright's own words.
171
+ ...(fresh.errors.length || (exitCode !== 0 && !failures.length) ? { output: tail } : {}),
172
+ };
173
+ }
174
+ // ─── Argument helpers ───────────────────────────────────────────────────────
175
+ function strings(args, key) {
176
+ const v = args[key];
177
+ if (v === undefined || v === null)
178
+ return undefined;
179
+ if (typeof v === 'string')
180
+ return [v];
181
+ if (!Array.isArray(v) || !v.every((s) => typeof s === 'string'))
182
+ throw new ToolInputError(`${key} must be a list of strings`);
183
+ return v;
184
+ }
185
+ function integer(args, key, min, max) {
186
+ const v = args[key];
187
+ if (v === undefined || v === null)
188
+ return undefined;
189
+ if (typeof v !== 'number' || !Number.isInteger(v) || v < min || v > max)
190
+ throw new ToolInputError(`${key} must be a whole number from ${min} to ${max}`);
191
+ return v;
192
+ }
193
+ function flag(args, key, fallback) {
194
+ const v = args[key];
195
+ if (v === undefined)
196
+ return fallback;
197
+ if (typeof v !== 'boolean')
198
+ throw new ToolInputError(`${key} must be true or false`);
199
+ return v;
200
+ }
201
+ function text(args, key) {
202
+ const v = args[key];
203
+ if (v === undefined || v === null)
204
+ return undefined;
205
+ if (typeof v !== 'string' || !v)
206
+ throw new ToolInputError(`${key} must be a string`);
207
+ return v;
208
+ }
209
+ export function testTools(ctx) {
210
+ const tools = [];
211
+ if (!ctx.production) {
212
+ tools.push({
213
+ name: 'run_tests',
214
+ title: 'Run tests',
215
+ description: `Runs Playwright tests in the project for environment "${ctx.environment}" and returns, for each test that failed, the test.step() that failed, the error message, where it was thrown with the code around it, and the trace to open; flaky tests (passed on a retry) are listed too. Select tests by TestCaseID (ids), file, project or grep; with none, every test runs. The run stops after timeout seconds (default ${DEFAULT_RUN_TIMEOUT_S}). Tests create and clean up their own data through the fixtures. Runs aren't added to the test history unless history is true. Never offered for a production environment.`,
216
+ inputSchema: {
217
+ type: 'object',
218
+ properties: {
219
+ ids: { type: 'array', items: { type: 'string' }, description: 'TestCaseIDs, e.g. ["TC-API-003"]' },
220
+ files: { type: 'array', items: { type: 'string' }, description: 'Test files or patterns, e.g. ["tests/api/orders.spec.ts"] or ["orders.spec.ts:42"]' },
221
+ projects: { type: 'array', items: { type: 'string' }, description: 'Playwright projects (default: all of them)' },
222
+ grep: { type: 'string', description: 'Only tests whose title matches this regular expression (not with ids)' },
223
+ timeout: { type: 'integer', minimum: 10, maximum: MAX_RUN_TIMEOUT_S, description: `Seconds for the whole run (default ${DEFAULT_RUN_TIMEOUT_S})` },
224
+ retries: { type: 'integer', minimum: 0, maximum: 5, description: "Retries for failed tests (default: the config's)" },
225
+ workers: { type: 'integer', minimum: 1, maximum: 32, description: "Parallel workers (default: the config's)" },
226
+ history: { type: 'boolean', description: 'Add this run to the test history (default false)' },
227
+ },
228
+ additionalProperties: false,
229
+ },
230
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
231
+ handler: async (args) => {
232
+ if (ctx.production)
233
+ throw new ToolInputError(`run_tests doesn't run in a production environment ("${ctx.environment}")`);
234
+ return runTests(ctx.root, {
235
+ ids: strings(args, 'ids'),
236
+ files: strings(args, 'files'),
237
+ projects: strings(args, 'projects'),
238
+ grep: text(args, 'grep'),
239
+ timeout: integer(args, 'timeout', 10, MAX_RUN_TIMEOUT_S),
240
+ retries: integer(args, 'retries', 0, 5),
241
+ workers: integer(args, 'workers', 1, 32),
242
+ history: flag(args, 'history', false),
243
+ environment: ctx.environment,
244
+ });
245
+ },
246
+ });
247
+ }
248
+ tools.push({
249
+ name: 'last_failures',
250
+ title: 'Last failures',
251
+ description: "The failed and flaky tests of the last run, whoever ran it (run_tests, a terminal, an IDE): the test.step() that failed, the error, where it was thrown, the trace, and the test's recent outcomes from the test history (✓ passed, ~ flaky, ✗ failed, oldest first), which tell a new failure from one that keeps coming back. Read from .propmaster/last-run.json, written by the Propmaster reporter.",
252
+ inputSchema: { type: 'object', properties: { flaky: { type: 'boolean', description: 'Include flaky tests (default true)' } }, additionalProperties: false },
253
+ annotations: { readOnlyHint: true, openWorldHint: false },
254
+ handler: async (args) => {
255
+ const result = lastFailures(ctx.root);
256
+ if (!flag(args, 'flaky', true))
257
+ result.flaky = [];
258
+ const more = result.failures.length - MAX_FAILURES;
259
+ return { ...result, failures: result.failures.slice(0, MAX_FAILURES), ...(more > 0 ? { moreFailures: more } : {}) };
260
+ },
261
+ }, {
262
+ name: 'flaky_tests',
263
+ title: 'Flaky tests',
264
+ description: 'Tests ranked by flake rate over the last runs in the test history, the same as npm run flaky: how often each was flaky (passed on a retry) or failed, its recent outcomes, and whether it is quarantined. Tests that never passed are listed last as failing (broken, not flaky). Fix the cause; quarantine.json only with an owner and an issue.',
265
+ inputSchema: {
266
+ type: 'object',
267
+ properties: {
268
+ runs: { type: 'integer', minimum: 1, maximum: 1000, description: 'How many of the newest runs to look at (default 30)' },
269
+ limit: { type: 'integer', minimum: 1, maximum: 200, description: 'Rows to return (default 20)' },
270
+ minRate: { type: 'number', minimum: 0, maximum: 1, description: 'Leave out tests below this flake rate, e.g. 0.1' },
271
+ },
272
+ additionalProperties: false,
273
+ },
274
+ annotations: { readOnlyHint: true, openWorldHint: false },
275
+ handler: async (args) => {
276
+ const minRate = args.minRate;
277
+ if (minRate !== undefined && (typeof minRate !== 'number' || minRate < 0 || minRate > 1))
278
+ throw new ToolInputError('minRate must be a number from 0 to 1');
279
+ const limit = integer(args, 'limit', 1, 200) ?? 20;
280
+ const { runs, rows } = flakyRows(ctx.root, { window: integer(args, 'runs', 1, 1000) ?? 30, minRate: minRate });
281
+ if (runs === 0)
282
+ return { runs, tests: [], message: 'No test history yet: add the Propmaster reporter to playwright.config.ts and run the tests.' };
283
+ return { runs, tests: rows.slice(0, limit), ...(rows.length > limit ? { more: rows.length - limit } : {}) };
284
+ },
285
+ }, {
286
+ name: 'coverage_report',
287
+ title: 'Coverage report',
288
+ description: "What the project's tests cover, per layer of the test pyramid: unit (no service, browser or device; property tests; Vitest/Jest files; the application's own tests in other languages), integration (API and backend clients) and e2e (browser and device). For each layer: tests, files, skipped/fixme tests, the last run and pass rate from the test history, the fixtures used and what the tests touch (API operations, HTTP paths, GraphQL operations, gRPC methods, tables, collections, topics, queues, indexes, routes, deep links). Then the OpenAPI operations and documented status codes no test asserts, backends configured for the environment that no test uses, tests that never ran or fail, and the code-coverage reports already in the project, from any language's tools (LCOV, Istanbul, Cobertura, JaCoCo, Clover, OpenCover, Go cover profiles, coverage.py JSON, SimpleCov), with their least-covered files. The application can be in any language: its own tests in Python, Go, Java/Kotlin/Scala, C#, Ruby, PHP, Rust, Swift and Elixir are counted and layered, and their HTTP calls are matched to the spec's operations by method and path. Read statically from files: runs nothing, touches no backend. Use it to build a picture of coverage before deciding what to test next: weigh the gaps against the application code and the real backends (db_query, kafka_topics, openapi_operations), not by the numbers alone.",
289
+ inputSchema: {
290
+ type: 'object',
291
+ properties: {
292
+ layer: { type: 'string', enum: [...LAYERS], description: 'Only this layer (default: all three)' },
293
+ tests: { type: 'boolean', description: 'Include every test with its fixtures, what it touches, asserted statuses and recent outcomes (default false)' },
294
+ spec: { type: 'string', description: 'OpenAPI spec path or URL (default: openapi.specPath of the environment)' },
295
+ reports: { type: 'array', items: { type: 'string' }, description: 'Code-coverage report files, relative to the project (default: the ones found in the project)' },
296
+ runs: { type: 'integer', minimum: 1, maximum: 1000, description: 'Newest test-history runs to read (default 30)' },
297
+ limit: { type: 'integer', minimum: 1, maximum: 500, description: 'Most items in each list (default 50)' },
298
+ },
299
+ additionalProperties: false,
300
+ },
301
+ annotations: { readOnlyHint: true, openWorldHint: false },
302
+ handler: async (args) => {
303
+ const layer = text(args, 'layer');
304
+ if (layer !== undefined && !LAYERS.includes(layer))
305
+ throw new ToolInputError(`layer must be one of ${LAYERS.join(', ')}`);
306
+ const reports = strings(args, 'reports');
307
+ for (const r of reports ?? []) {
308
+ if (isAbsolute(r) || r.split(/[\\/]/).includes('..'))
309
+ throw new ToolInputError(`reports must be paths inside the project, not "${r}"`);
310
+ }
311
+ return coverageReport({
312
+ root: ctx.root,
313
+ config: ctx.config,
314
+ spec: text(args, 'spec'),
315
+ layer: layer,
316
+ reports,
317
+ runs: integer(args, 'runs', 1, 1000),
318
+ tests: flag(args, 'tests', false),
319
+ limit: integer(args, 'limit', 1, 500),
320
+ });
321
+ },
322
+ }, {
323
+ name: 'generate_api_tests',
324
+ title: 'Generate API tests',
325
+ description: 'The API tests `propmaster generate openapi` would write from the OpenAPI spec: one file per tag, a test per operation and documented status code, with fresh TestCaseIDs and test.step() blocks. Operation/status pairs that already have a test are left out. Returns the files and their content as a preview; with apply: true it writes them (never over an existing file). Replace the example values with data the API has before running them.',
326
+ inputSchema: {
327
+ type: 'object',
328
+ properties: {
329
+ tags: { type: 'array', items: { type: 'string' }, description: 'Only operations with these tags' },
330
+ operations: { type: 'array', items: { type: 'string' }, description: 'Only these operationIds' },
331
+ spec: { type: 'string', description: 'Spec path or URL (default: openapi.specPath of the environment)' },
332
+ out: { type: 'string', description: 'Output folder (default tests/api)' },
333
+ category: { type: 'string', description: 'TestCaseID category (default API)' },
334
+ prism: { type: 'boolean', description: 'Every status code runs against a Prism mock (Prefer: code=<status>)' },
335
+ content: { type: 'boolean', description: "Include each file's content (default true)" },
336
+ apply: { type: 'boolean', description: 'Write the files (default false: only the preview)' },
337
+ },
338
+ additionalProperties: false,
339
+ },
340
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
341
+ handler: async (args) => {
342
+ const category = (text(args, 'category') ?? 'API').toUpperCase();
343
+ if (!/^[A-Z][A-Z0-9]{1,5}$/.test(category))
344
+ throw new ToolInputError('category must be 2–6 capital letters or digits, starting with a letter');
345
+ const out = text(args, 'out') ?? 'tests/api';
346
+ const apply = flag(args, 'apply', false);
347
+ const run = await generateOpenApiTests({
348
+ root: ctx.root,
349
+ spec: text(args, 'spec'),
350
+ tags: strings(args, 'tags') ?? [],
351
+ operations: strings(args, 'operations') ?? [],
352
+ out,
353
+ category,
354
+ prism: flag(args, 'prism', false),
355
+ importFrom: '@inluxc/propmaster',
356
+ environment: ctx.environment,
357
+ dryRun: !apply,
358
+ }).catch((error) => {
359
+ throw new ToolInputError(error instanceof Error ? error.message : String(error));
360
+ });
361
+ const withContent = flag(args, 'content', true);
362
+ const rel = (p) => relative(ctx.root, p).split('\\').join('/');
363
+ return {
364
+ applied: apply && run.written.length > 0,
365
+ ...(apply ? { written: run.written.map(rel) } : { reason: run.result.files.length ? 'Preview. Call again with apply: true to write these files.' : 'Nothing to generate.' }),
366
+ files: run.result.files.map((f) => ({
367
+ file: rel(join(run.outDir, f.fileName)),
368
+ tag: f.tag,
369
+ tests: f.tests,
370
+ ...(withContent ? { content: f.content.length > MAX_FILE_CONTENT ? `${f.content.slice(0, MAX_FILE_CONTENT)}\n// … ${f.content.length - MAX_FILE_CONTENT} more characters` : f.content } : {}),
371
+ })),
372
+ ...(run.result.alreadyCovered.length ? { alreadyCovered: run.result.alreadyCovered } : {}),
373
+ ...(run.result.skipped.length ? { skipped: run.result.skipped } : {}),
374
+ ...(run.contractNote ? { note: run.contractNote } : {}),
375
+ };
376
+ },
377
+ });
378
+ return tools;
379
+ }
380
+ //# sourceMappingURL=test-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-tools.js","sourceRoot":"","sources":["../../../src/mcp/test-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oB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
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The tools the Propmaster MCP server offers: read tools for every configured
3
+ * backend, the test-convention tools, and write tools when writes are allowed.
4
+ *
5
+ * Each backend connects on its first call and stays connected until the server
6
+ * stops. A backend that isn't configured answers with how to configure it.
7
+ */
8
+ import type { FrameworkConfig } from '../config/schema.js';
9
+ import { type ToolDefinition } from './protocol.js';
10
+ export interface McpContext {
11
+ /** Project root: where environments.json and the tests live. */
12
+ root: string;
13
+ /** Active environment name. */
14
+ environment: string;
15
+ /** The loaded configuration, or undefined when it couldn't be loaded. */
16
+ config: FrameworkConfig | undefined;
17
+ /** Why the configuration couldn't be loaded. */
18
+ configError?: string;
19
+ /** Write tools are offered. */
20
+ allowWrites: boolean;
21
+ /** A production environment: no write tools, and no run_tests. */
22
+ production?: boolean;
23
+ }
24
+ /** Holds each backend's connection, opened on first use. */
25
+ export declare class Connections {
26
+ private readonly open;
27
+ private readonly closers;
28
+ get<T>(name: string, connect: () => Promise<{
29
+ value: T;
30
+ close: () => Promise<void>;
31
+ }>): Promise<T>;
32
+ closeAll(): Promise<void>;
33
+ }
34
+ export declare function createTools(ctx: McpContext, connections: Connections): ToolDefinition[];
35
+ /** Configured backends with where they point, without credentials. */
36
+ export declare function describeBackends(config: FrameworkConfig | undefined): Record<string, unknown>;
37
+ interface OperationSummary {
38
+ operationId?: string;
39
+ method: string;
40
+ path: string;
41
+ summary?: string;
42
+ tags?: string[];
43
+ parameters?: string[];
44
+ requestBody?: string[];
45
+ responses: string[];
46
+ }
47
+ export declare function listOperations(document: Record<string, unknown>, filter?: string): OperationSummary[];
48
+ export {};
49
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAe3D,OAAO,EAAkB,KAAK,cAAc,EA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