@plune-ai/cairn 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +181 -0
  3. package/dist/agent/graph.d.ts +538 -0
  4. package/dist/agent/graph.d.ts.map +1 -0
  5. package/dist/agent/graph.js +0 -0
  6. package/dist/agent/graph.js.map +1 -0
  7. package/dist/agent/index.d.ts +83 -0
  8. package/dist/agent/index.d.ts.map +1 -0
  9. package/dist/agent/index.js +407 -0
  10. package/dist/agent/index.js.map +1 -0
  11. package/dist/analyze/index.d.ts +22 -0
  12. package/dist/analyze/index.d.ts.map +1 -0
  13. package/dist/analyze/index.js +39 -0
  14. package/dist/analyze/index.js.map +1 -0
  15. package/dist/artifacts/index.d.ts +29 -0
  16. package/dist/artifacts/index.d.ts.map +1 -0
  17. package/dist/artifacts/index.js +68 -0
  18. package/dist/artifacts/index.js.map +1 -0
  19. package/dist/artifacts/report.d.ts +21 -0
  20. package/dist/artifacts/report.d.ts.map +1 -0
  21. package/dist/artifacts/report.js +56 -0
  22. package/dist/artifacts/report.js.map +1 -0
  23. package/dist/artifacts/testcase-md.d.ts +37 -0
  24. package/dist/artifacts/testcase-md.d.ts.map +1 -0
  25. package/dist/artifacts/testcase-md.js +91 -0
  26. package/dist/artifacts/testcase-md.js.map +1 -0
  27. package/dist/browser/backends/playwright-cli.d.ts +23 -0
  28. package/dist/browser/backends/playwright-cli.d.ts.map +1 -0
  29. package/dist/browser/backends/playwright-cli.js +85 -0
  30. package/dist/browser/backends/playwright-cli.js.map +1 -0
  31. package/dist/browser/backends/playwright-lib.d.ts +32 -0
  32. package/dist/browser/backends/playwright-lib.d.ts.map +1 -0
  33. package/dist/browser/backends/playwright-lib.js +157 -0
  34. package/dist/browser/backends/playwright-lib.js.map +1 -0
  35. package/dist/browser/gateway.d.ts +33 -0
  36. package/dist/browser/gateway.d.ts.map +1 -0
  37. package/dist/browser/gateway.js +2 -0
  38. package/dist/browser/gateway.js.map +1 -0
  39. package/dist/browser/index.d.ts +15 -0
  40. package/dist/browser/index.d.ts.map +1 -0
  41. package/dist/browser/index.js +59 -0
  42. package/dist/browser/index.js.map +1 -0
  43. package/dist/browser/types.d.ts +99 -0
  44. package/dist/browser/types.d.ts.map +1 -0
  45. package/dist/browser/types.js +6 -0
  46. package/dist/browser/types.js.map +1 -0
  47. package/dist/checklist/index.d.ts +24 -0
  48. package/dist/checklist/index.d.ts.map +1 -0
  49. package/dist/checklist/index.js +65 -0
  50. package/dist/checklist/index.js.map +1 -0
  51. package/dist/cli/branding.d.ts +14 -0
  52. package/dist/cli/branding.d.ts.map +1 -0
  53. package/dist/cli/branding.js +14 -0
  54. package/dist/cli/branding.js.map +1 -0
  55. package/dist/cli/index.d.ts +12 -0
  56. package/dist/cli/index.d.ts.map +1 -0
  57. package/dist/cli/index.js +322 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/lex-bot.d.ts +3 -0
  60. package/dist/cli/lex-bot.d.ts.map +1 -0
  61. package/dist/cli/lex-bot.js +11 -0
  62. package/dist/cli/lex-bot.js.map +1 -0
  63. package/dist/codegen/index.d.ts +36 -0
  64. package/dist/codegen/index.d.ts.map +1 -0
  65. package/dist/codegen/index.js +63 -0
  66. package/dist/codegen/index.js.map +1 -0
  67. package/dist/codegen/schema.d.ts +14 -0
  68. package/dist/codegen/schema.d.ts.map +1 -0
  69. package/dist/codegen/schema.js +9 -0
  70. package/dist/codegen/schema.js.map +1 -0
  71. package/dist/config/env.d.ts +18 -0
  72. package/dist/config/env.d.ts.map +1 -0
  73. package/dist/config/env.js +42 -0
  74. package/dist/config/env.js.map +1 -0
  75. package/dist/config/index.d.ts +11 -0
  76. package/dist/config/index.d.ts.map +1 -0
  77. package/dist/config/index.js +74 -0
  78. package/dist/config/index.js.map +1 -0
  79. package/dist/config/profiles.d.ts +7 -0
  80. package/dist/config/profiles.d.ts.map +1 -0
  81. package/dist/config/profiles.js +28 -0
  82. package/dist/config/profiles.js.map +1 -0
  83. package/dist/config/schema.d.ts +91 -0
  84. package/dist/config/schema.d.ts.map +1 -0
  85. package/dist/config/schema.js +20 -0
  86. package/dist/config/schema.js.map +1 -0
  87. package/dist/design/index.d.ts +36 -0
  88. package/dist/design/index.d.ts.map +1 -0
  89. package/dist/design/index.js +35 -0
  90. package/dist/design/index.js.map +1 -0
  91. package/dist/design/schema.d.ts +109 -0
  92. package/dist/design/schema.d.ts.map +1 -0
  93. package/dist/design/schema.js +35 -0
  94. package/dist/design/schema.js.map +1 -0
  95. package/dist/eval/collect.d.ts +18 -0
  96. package/dist/eval/collect.d.ts.map +1 -0
  97. package/dist/eval/collect.js +53 -0
  98. package/dist/eval/collect.js.map +1 -0
  99. package/dist/eval/experiment.d.ts +49 -0
  100. package/dist/eval/experiment.d.ts.map +1 -0
  101. package/dist/eval/experiment.js +66 -0
  102. package/dist/eval/experiment.js.map +1 -0
  103. package/dist/eval/judge.d.ts +30 -0
  104. package/dist/eval/judge.d.ts.map +1 -0
  105. package/dist/eval/judge.js +47 -0
  106. package/dist/eval/judge.js.map +1 -0
  107. package/dist/eval/pilot.d.ts +21 -0
  108. package/dist/eval/pilot.d.ts.map +1 -0
  109. package/dist/eval/pilot.js +24 -0
  110. package/dist/eval/pilot.js.map +1 -0
  111. package/dist/eval/scorers.d.ts +23 -0
  112. package/dist/eval/scorers.d.ts.map +1 -0
  113. package/dist/eval/scorers.js +38 -0
  114. package/dist/eval/scorers.js.map +1 -0
  115. package/dist/index.d.ts +21 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +13 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/knowledge/index.d.ts +7 -0
  120. package/dist/knowledge/index.d.ts.map +1 -0
  121. package/dist/knowledge/index.js +39 -0
  122. package/dist/knowledge/index.js.map +1 -0
  123. package/dist/llm/factory.d.ts +31 -0
  124. package/dist/llm/factory.d.ts.map +1 -0
  125. package/dist/llm/factory.js +48 -0
  126. package/dist/llm/factory.js.map +1 -0
  127. package/dist/llm/index.d.ts +5 -0
  128. package/dist/llm/index.d.ts.map +1 -0
  129. package/dist/llm/index.js +3 -0
  130. package/dist/llm/index.js.map +1 -0
  131. package/dist/llm/structured.d.ts +30 -0
  132. package/dist/llm/structured.d.ts.map +1 -0
  133. package/dist/llm/structured.js +58 -0
  134. package/dist/llm/structured.js.map +1 -0
  135. package/dist/llm/vision.d.ts +16 -0
  136. package/dist/llm/vision.d.ts.map +1 -0
  137. package/dist/llm/vision.js +4 -0
  138. package/dist/llm/vision.js.map +1 -0
  139. package/dist/observe/index.d.ts +21 -0
  140. package/dist/observe/index.d.ts.map +1 -0
  141. package/dist/observe/index.js +18 -0
  142. package/dist/observe/index.js.map +1 -0
  143. package/dist/observe/parse-aria.d.ts +8 -0
  144. package/dist/observe/parse-aria.d.ts.map +1 -0
  145. package/dist/observe/parse-aria.js +71 -0
  146. package/dist/observe/parse-aria.js.map +1 -0
  147. package/dist/probe/index.d.ts +19 -0
  148. package/dist/probe/index.d.ts.map +1 -0
  149. package/dist/probe/index.js +38 -0
  150. package/dist/probe/index.js.map +1 -0
  151. package/dist/promote/index.d.ts +6 -0
  152. package/dist/promote/index.d.ts.map +1 -0
  153. package/dist/promote/index.js +4 -0
  154. package/dist/promote/index.js.map +1 -0
  155. package/dist/promote/promote-case.d.ts +12 -0
  156. package/dist/promote/promote-case.d.ts.map +1 -0
  157. package/dist/promote/promote-case.js +103 -0
  158. package/dist/promote/promote-case.js.map +1 -0
  159. package/dist/promote/selectors.d.ts +29 -0
  160. package/dist/promote/selectors.d.ts.map +1 -0
  161. package/dist/promote/selectors.js +58 -0
  162. package/dist/promote/selectors.js.map +1 -0
  163. package/dist/prompts/index.d.ts +32 -0
  164. package/dist/prompts/index.d.ts.map +1 -0
  165. package/dist/prompts/index.js +55 -0
  166. package/dist/prompts/index.js.map +1 -0
  167. package/dist/prompts/local/identify-elements.d.ts +6 -0
  168. package/dist/prompts/local/identify-elements.d.ts.map +1 -0
  169. package/dist/prompts/local/identify-elements.js +21 -0
  170. package/dist/prompts/local/identify-elements.js.map +1 -0
  171. package/dist/prompts/local/index.d.ts +3 -0
  172. package/dist/prompts/local/index.d.ts.map +1 -0
  173. package/dist/prompts/local/index.js +18 -0
  174. package/dist/prompts/local/index.js.map +1 -0
  175. package/dist/prompts/local/judge-checklist-coverage.d.ts +3 -0
  176. package/dist/prompts/local/judge-checklist-coverage.d.ts.map +1 -0
  177. package/dist/prompts/local/judge-checklist-coverage.js +11 -0
  178. package/dist/prompts/local/judge-checklist-coverage.js.map +1 -0
  179. package/dist/prompts/local/judge-test-cases.d.ts +3 -0
  180. package/dist/prompts/local/judge-test-cases.d.ts.map +1 -0
  181. package/dist/prompts/local/judge-test-cases.js +11 -0
  182. package/dist/prompts/local/judge-test-cases.js.map +1 -0
  183. package/dist/prompts/local/pilot-review.d.ts +3 -0
  184. package/dist/prompts/local/pilot-review.d.ts.map +1 -0
  185. package/dist/prompts/local/pilot-review.js +13 -0
  186. package/dist/prompts/local/pilot-review.js.map +1 -0
  187. package/dist/prompts/local/qa-manual-test-designer.d.ts +7 -0
  188. package/dist/prompts/local/qa-manual-test-designer.d.ts.map +1 -0
  189. package/dist/prompts/local/qa-manual-test-designer.js +13 -0
  190. package/dist/prompts/local/qa-manual-test-designer.js.map +1 -0
  191. package/dist/prompts/local/qa-playwright-ts-writer.d.ts +6 -0
  192. package/dist/prompts/local/qa-playwright-ts-writer.d.ts.map +1 -0
  193. package/dist/prompts/local/qa-playwright-ts-writer.js +40 -0
  194. package/dist/prompts/local/qa-playwright-ts-writer.js.map +1 -0
  195. package/dist/prompts/local/qa-testcase-from-ui.d.ts +6 -0
  196. package/dist/prompts/local/qa-testcase-from-ui.d.ts.map +1 -0
  197. package/dist/prompts/local/qa-testcase-from-ui.js +52 -0
  198. package/dist/prompts/local/qa-testcase-from-ui.js.map +1 -0
  199. package/dist/session/index.d.ts +27 -0
  200. package/dist/session/index.d.ts.map +1 -0
  201. package/dist/session/index.js +74 -0
  202. package/dist/session/index.js.map +1 -0
  203. package/dist/telemetry/index.d.ts +21 -0
  204. package/dist/telemetry/index.d.ts.map +1 -0
  205. package/dist/telemetry/index.js +26 -0
  206. package/dist/telemetry/index.js.map +1 -0
  207. package/dist/tui/App.d.ts +6 -0
  208. package/dist/tui/App.d.ts.map +1 -0
  209. package/dist/tui/App.js +61 -0
  210. package/dist/tui/App.js.map +1 -0
  211. package/dist/tui/components/error-boundary.d.ts +17 -0
  212. package/dist/tui/components/error-boundary.d.ts.map +1 -0
  213. package/dist/tui/components/error-boundary.js +20 -0
  214. package/dist/tui/components/error-boundary.js.map +1 -0
  215. package/dist/tui/components/field.d.ts +10 -0
  216. package/dist/tui/components/field.d.ts.map +1 -0
  217. package/dist/tui/components/field.js +8 -0
  218. package/dist/tui/components/field.js.map +1 -0
  219. package/dist/tui/components/help.d.ts +5 -0
  220. package/dist/tui/components/help.d.ts.map +1 -0
  221. package/dist/tui/components/help.js +7 -0
  222. package/dist/tui/components/help.js.map +1 -0
  223. package/dist/tui/components/log-pane.d.ts +6 -0
  224. package/dist/tui/components/log-pane.d.ts.map +1 -0
  225. package/dist/tui/components/log-pane.js +10 -0
  226. package/dist/tui/components/log-pane.js.map +1 -0
  227. package/dist/tui/components/node-checklist.d.ts +6 -0
  228. package/dist/tui/components/node-checklist.d.ts.map +1 -0
  229. package/dist/tui/components/node-checklist.js +9 -0
  230. package/dist/tui/components/node-checklist.js.map +1 -0
  231. package/dist/tui/components/pilot-badge.d.ts +6 -0
  232. package/dist/tui/components/pilot-badge.d.ts.map +1 -0
  233. package/dist/tui/components/pilot-badge.js +12 -0
  234. package/dist/tui/components/pilot-badge.js.map +1 -0
  235. package/dist/tui/components/scores-table.d.ts +6 -0
  236. package/dist/tui/components/scores-table.d.ts.map +1 -0
  237. package/dist/tui/components/scores-table.js +9 -0
  238. package/dist/tui/components/scores-table.js.map +1 -0
  239. package/dist/tui/components/scrollable-text.d.ts +6 -0
  240. package/dist/tui/components/scrollable-text.d.ts.map +1 -0
  241. package/dist/tui/components/scrollable-text.js +22 -0
  242. package/dist/tui/components/scrollable-text.js.map +1 -0
  243. package/dist/tui/components/session-picker.d.ts +5 -0
  244. package/dist/tui/components/session-picker.d.ts.map +1 -0
  245. package/dist/tui/components/session-picker.js +16 -0
  246. package/dist/tui/components/session-picker.js.map +1 -0
  247. package/dist/tui/components/test-case-list.d.ts +7 -0
  248. package/dist/tui/components/test-case-list.d.ts.map +1 -0
  249. package/dist/tui/components/test-case-list.js +10 -0
  250. package/dist/tui/components/test-case-list.js.map +1 -0
  251. package/dist/tui/hooks/use-run-artifacts.d.ts +14 -0
  252. package/dist/tui/hooks/use-run-artifacts.d.ts.map +1 -0
  253. package/dist/tui/hooks/use-run-artifacts.js +37 -0
  254. package/dist/tui/hooks/use-run-artifacts.js.map +1 -0
  255. package/dist/tui/hooks/use-runner.d.ts +25 -0
  256. package/dist/tui/hooks/use-runner.d.ts.map +1 -0
  257. package/dist/tui/hooks/use-runner.js +116 -0
  258. package/dist/tui/hooks/use-runner.js.map +1 -0
  259. package/dist/tui/hooks/use-runs.d.ts +14 -0
  260. package/dist/tui/hooks/use-runs.d.ts.map +1 -0
  261. package/dist/tui/hooks/use-runs.js +57 -0
  262. package/dist/tui/hooks/use-runs.js.map +1 -0
  263. package/dist/tui/hooks/use-sessions.d.ts +10 -0
  264. package/dist/tui/hooks/use-sessions.d.ts.map +1 -0
  265. package/dist/tui/hooks/use-sessions.js +32 -0
  266. package/dist/tui/hooks/use-sessions.js.map +1 -0
  267. package/dist/tui/hooks/use-stdout-dimensions.d.ts +3 -0
  268. package/dist/tui/hooks/use-stdout-dimensions.d.ts.map +1 -0
  269. package/dist/tui/hooks/use-stdout-dimensions.js +18 -0
  270. package/dist/tui/hooks/use-stdout-dimensions.js.map +1 -0
  271. package/dist/tui/index.d.ts +7 -0
  272. package/dist/tui/index.d.ts.map +1 -0
  273. package/dist/tui/index.js +13 -0
  274. package/dist/tui/index.js.map +1 -0
  275. package/dist/tui/router-context.d.ts +12 -0
  276. package/dist/tui/router-context.d.ts.map +1 -0
  277. package/dist/tui/router-context.js +14 -0
  278. package/dist/tui/router-context.js.map +1 -0
  279. package/dist/tui/router.d.ts +44 -0
  280. package/dist/tui/router.d.ts.map +1 -0
  281. package/dist/tui/router.js +22 -0
  282. package/dist/tui/router.js.map +1 -0
  283. package/dist/tui/screens/form-screen.d.ts +7 -0
  284. package/dist/tui/screens/form-screen.d.ts.map +1 -0
  285. package/dist/tui/screens/form-screen.js +104 -0
  286. package/dist/tui/screens/form-screen.js.map +1 -0
  287. package/dist/tui/screens/launcher-screen.d.ts +2 -0
  288. package/dist/tui/screens/launcher-screen.d.ts.map +1 -0
  289. package/dist/tui/screens/launcher-screen.js +28 -0
  290. package/dist/tui/screens/launcher-screen.js.map +1 -0
  291. package/dist/tui/screens/run-dashboard-screen.d.ts +7 -0
  292. package/dist/tui/screens/run-dashboard-screen.d.ts.map +1 -0
  293. package/dist/tui/screens/run-dashboard-screen.js +32 -0
  294. package/dist/tui/screens/run-dashboard-screen.js.map +1 -0
  295. package/dist/tui/screens/run-detail-screen.d.ts +5 -0
  296. package/dist/tui/screens/run-detail-screen.d.ts.map +1 -0
  297. package/dist/tui/screens/run-detail-screen.js +67 -0
  298. package/dist/tui/screens/run-detail-screen.js.map +1 -0
  299. package/dist/tui/screens/runs-list-screen.d.ts +2 -0
  300. package/dist/tui/screens/runs-list-screen.d.ts.map +1 -0
  301. package/dist/tui/screens/runs-list-screen.js +22 -0
  302. package/dist/tui/screens/runs-list-screen.js.map +1 -0
  303. package/dist/tui/screens/summary-screen.d.ts +6 -0
  304. package/dist/tui/screens/summary-screen.d.ts.map +1 -0
  305. package/dist/tui/screens/summary-screen.js +53 -0
  306. package/dist/tui/screens/summary-screen.js.map +1 -0
  307. package/dist/tui/theme.d.ts +31 -0
  308. package/dist/tui/theme.d.ts.map +1 -0
  309. package/dist/tui/theme.js +70 -0
  310. package/dist/tui/theme.js.map +1 -0
  311. package/dist/tui/types.d.ts +38 -0
  312. package/dist/tui/types.d.ts.map +1 -0
  313. package/dist/tui/types.js +2 -0
  314. package/dist/tui/types.js.map +1 -0
  315. package/dist/validate/index.d.ts +30 -0
  316. package/dist/validate/index.d.ts.map +1 -0
  317. package/dist/validate/index.js +39 -0
  318. package/dist/validate/index.js.map +1 -0
  319. package/dist/validate/runner.d.ts +15 -0
  320. package/dist/validate/runner.d.ts.map +1 -0
  321. package/dist/validate/runner.js +74 -0
  322. package/dist/validate/runner.js.map +1 -0
  323. package/package.json +97 -0
@@ -0,0 +1,18 @@
1
+ import { QA_TESTCASE_FROM_UI } from "./qa-testcase-from-ui.js";
2
+ import { QA_MANUAL_TEST_DESIGNER } from "./qa-manual-test-designer.js";
3
+ import { QA_PLAYWRIGHT_TS_WRITER } from "./qa-playwright-ts-writer.js";
4
+ import { IDENTIFY_ELEMENTS } from "./identify-elements.js";
5
+ import { JUDGE_TEST_CASES } from "./judge-test-cases.js";
6
+ import { JUDGE_CHECKLIST_COVERAGE } from "./judge-checklist-coverage.js";
7
+ import { PILOT_REVIEW } from "./pilot-review.js";
8
+ /** Local prompts (fallback, ADR-0004). Names match the Langfuse prompt names. */
9
+ export const LOCAL_PROMPTS = {
10
+ "qa-testcase-from-ui": QA_TESTCASE_FROM_UI,
11
+ "qa-manual-test-designer": QA_MANUAL_TEST_DESIGNER,
12
+ "qa-playwright-ts-writer": QA_PLAYWRIGHT_TS_WRITER,
13
+ "identify-elements": IDENTIFY_ELEMENTS,
14
+ "judge-test-cases": JUDGE_TEST_CASES,
15
+ "judge-checklist-coverage": JUDGE_CHECKLIST_COVERAGE,
16
+ "pilot-review": PILOT_REVIEW,
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/local/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,iFAAiF;AACjF,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,qBAAqB,EAAE,mBAAmB;IAC1C,yBAAyB,EAAE,uBAAuB;IAClD,yBAAyB,EAAE,uBAAuB;IAClD,mBAAmB,EAAE,iBAAiB;IACtC,kBAAkB,EAAE,gBAAgB;IACpC,0BAA0B,EAAE,wBAAwB;IACpD,cAAc,EAAE,YAAY;CAC7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Semantic checklist-coverage judge prompt (cross-language, ADR-0006). */
2
+ export declare const JUDGE_CHECKLIST_COVERAGE = "Evaluate the SEMANTIC coverage of the checklist by the generated cases. The checklist and the cases may be in DIFFERENT LANGUAGES \u2014 compare by MEANING, not by words.\n\nChecklist:\n{{items}}\n\nGenerated cases:\n{{cases}}\n\ncoverage \u2014 the fraction of checklist items covered by at least one case by meaning (0..1). uncovered \u2014 items with no coverage.";
3
+ //# sourceMappingURL=judge-checklist-coverage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"judge-checklist-coverage.d.ts","sourceRoot":"","sources":["../../../src/prompts/local/judge-checklist-coverage.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,mXAQ0F,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** Semantic checklist-coverage judge prompt (cross-language, ADR-0006). */
2
+ export const JUDGE_CHECKLIST_COVERAGE = `Evaluate the SEMANTIC coverage of the checklist by the generated cases. The checklist and the cases may be in DIFFERENT LANGUAGES — compare by MEANING, not by words.
3
+
4
+ Checklist:
5
+ {{items}}
6
+
7
+ Generated cases:
8
+ {{cases}}
9
+
10
+ coverage — the fraction of checklist items covered by at least one case by meaning (0..1). uncovered — items with no coverage.`;
11
+ //# sourceMappingURL=judge-checklist-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"judge-checklist-coverage.js","sourceRoot":"","sources":["../../../src/prompts/local/judge-checklist-coverage.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;+HAQuF,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Test-case quality judge prompt (ADR-0006). Versioned like the methodology prompts. */
2
+ export declare const JUDGE_TEST_CASES = "You are a QA test-case quality judge. Evaluate the cases for the page: {{pageSemantics}}\n\nCases:\n{{cases}}\n\nRate 0..1:\n- test_case_quality: clarity, completeness (happy + negative + edge), uniqueness, verifiability;\n- methodology_adherence: whether the cases reflect ISO/IEC/IEEE 29119-4 techniques (EP / BVA / decision-table / state-transition / error-guessing).\nReturn numbers + a short comment.";
3
+ //# sourceMappingURL=judge-test-cases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"judge-test-cases.d.ts","sourceRoot":"","sources":["../../../src/prompts/local/judge-test-cases.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,0ZAQK,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** Test-case quality judge prompt (ADR-0006). Versioned like the methodology prompts. */
2
+ export const JUDGE_TEST_CASES = `You are a QA test-case quality judge. Evaluate the cases for the page: {{pageSemantics}}
3
+
4
+ Cases:
5
+ {{cases}}
6
+
7
+ Rate 0..1:
8
+ - test_case_quality: clarity, completeness (happy + negative + edge), uniqueness, verifiability;
9
+ - methodology_adherence: whether the cases reflect ISO/IEC/IEEE 29119-4 techniques (EP / BVA / decision-table / state-transition / error-guessing).
10
+ Return numbers + a short comment.`;
11
+ //# sourceMappingURL=judge-test-cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"judge-test-cases.js","sourceRoot":"","sources":["../../../src/prompts/local/judge-test-cases.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;kCAQE,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Pilot supervisor prompt (idea from explorbot): holistic run verdict. */
2
+ export declare const PILOT_REVIEW = "You are the Pilot supervisor of a QA run. Review the result and issue a holistic verdict.\n\nPage: {{pageSemantics}}\nValidation: {{validation}}\nTest cases:\n{{cases}}\n\nReturn:\n- verdict: \"pass\" (run is sufficient and high-quality) | \"needs-work\" (gaps exist but not critical) | \"fail\" (serious problems);\n- reason: ONE sentence \u2014 the main basis for the verdict;\n- guidance: ONE concrete next step to improve.";
3
+ //# sourceMappingURL=pilot-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pilot-review.d.ts","sourceRoot":"","sources":["../../../src/prompts/local/pilot-review.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,eAAO,MAAM,YAAY,+aAUsB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /** Pilot supervisor prompt (idea from explorbot): holistic run verdict. */
2
+ export const PILOT_REVIEW = `You are the Pilot supervisor of a QA run. Review the result and issue a holistic verdict.
3
+
4
+ Page: {{pageSemantics}}
5
+ Validation: {{validation}}
6
+ Test cases:
7
+ {{cases}}
8
+
9
+ Return:
10
+ - verdict: "pass" (run is sufficient and high-quality) | "needs-work" (gaps exist but not critical) | "fail" (serious problems);
11
+ - reason: ONE sentence — the main basis for the verdict;
12
+ - guidance: ONE concrete next step to improve.`;
13
+ //# sourceMappingURL=pilot-review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pilot-review.js","sourceRoot":"","sources":["../../../src/prompts/local/pilot-review.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;+CAUmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Methodology block for test-case design (ISO/IEC/IEEE 29119-4).
3
+ * Provenance: ported from AZANIR/qa-skills → `qa-manual-test-designer` (GPL-3.0, author — the user). ADR-0008.
4
+ * Mixed into `qa-testcase-from-ui` via the {{methodology}} variable.
5
+ */
6
+ export declare const QA_MANUAL_TEST_DESIGNER = "Apply ISO/IEC/IEEE 29119-4 test design techniques where appropriate:\n- Equivalence Partitioning \u2014 equivalence classes for input fields (valid/invalid).\n- Boundary Value Analysis \u2014 boundaries of ranges, lengths, dates, numeric limits.\n- Decision Table \u2014 combinations of conditions (access rights, flags, modes).\n- State Transition \u2014 wizards, modal dialogs, status transitions.\n- Error Guessing / Exploratory \u2014 common defects, negative and edge scenarios.\nPrioritize cases by risk: critical | high | medium | low.";
7
+ //# sourceMappingURL=qa-manual-test-designer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-manual-test-designer.d.ts","sourceRoot":"","sources":["../../../src/prompts/local/qa-manual-test-designer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,miBAMsB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Methodology block for test-case design (ISO/IEC/IEEE 29119-4).
3
+ * Provenance: ported from AZANIR/qa-skills → `qa-manual-test-designer` (GPL-3.0, author — the user). ADR-0008.
4
+ * Mixed into `qa-testcase-from-ui` via the {{methodology}} variable.
5
+ */
6
+ export const QA_MANUAL_TEST_DESIGNER = `Apply ISO/IEC/IEEE 29119-4 test design techniques where appropriate:
7
+ - Equivalence Partitioning — equivalence classes for input fields (valid/invalid).
8
+ - Boundary Value Analysis — boundaries of ranges, lengths, dates, numeric limits.
9
+ - Decision Table — combinations of conditions (access rights, flags, modes).
10
+ - State Transition — wizards, modal dialogs, status transitions.
11
+ - Error Guessing / Exploratory — common defects, negative and edge scenarios.
12
+ Prioritize cases by risk: critical | high | medium | low.`;
13
+ //# sourceMappingURL=qa-manual-test-designer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-manual-test-designer.js","sourceRoot":"","sources":["../../../src/prompts/local/qa-manual-test-designer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;0DAMmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Prompt for generating @playwright/test code from test cases (ADR-0005).
3
+ * Provenance: ported from AZANIR/qa-skills → `qa-playwright-ts-writer` (GPL-3.0, author — the user). ADR-0008.
4
+ */
5
+ export declare const QA_PLAYWRIGHT_TS_WRITER = "You are an experienced Playwright test automation engineer (@playwright/test, TypeScript).\nGenerate RUNNABLE spec files covering the provided test cases.\n\nPage under test:\n- URL: {{baseUrl}}\n- Purpose: {{pageSemantics}}\n\nInteractive elements (ref \u00B7 role \u00B7 name; \u00D7N = repeated, several identical):\n{{elements}}\n\nTest cases to cover:\n{{testCases}}\n\nObserved state transitions (for state-transition assertions \u2014 use exactly these before\u2192after):\n{{transitions}}\n\nRules (STRICT):\n- Each file is complete valid TypeScript: import { test, expect } from '@playwright/test';\n- At the start of each test: await page.goto('{{baseUrl}}');\n- Locators ONLY user-facing by role+name: page.getByRole('button', { name: 'Sign In' }), getByLabel, getByText. NO CSS/XPath/testid.\n- Repeated elements (marked \u00D7N \u2014 list/table rows): the locator resolves to several \u2192 ALWAYS use .first() (or .nth(i)), e.g. page.getByRole('button', { name: 'Download PDF' }).first(). Otherwise Playwright throws a strict-mode error.\n- An element marked [first click tab \"X\"] lives behind a tab/view: first await page.getByRole(...{ name: 'X' }).click(), and ONLY then interact with it (otherwise it is not visible).\n- One test case \u2192 one test('<name>', async ({ page }) => { ... }) with verifiable await expect(...).\n- Wrap logical steps in await test.step('<step description>', async () => { ... }) \u2014 a more readable run report.\n- Assertions must match really observable behavior; do not invent elements outside the list.\n- Read-only assertions by default (toBeVisible/toBeEnabled/toBeChecked). For destructive controls (Delete, Submit, Convert, Log out, Add) \u2014 only await expect(...).toBeVisible(), do NOT click.\n- Each test() is INDEPENDENT: starts with await page.goto('{{baseUrl}}') (clean state); do NOT rely on state from another test.\n- One or two RELATED assertions per test; no brittle chains or mega-tests.\n- The code is self-contained and must parse with tsc.\n\nFILE STRUCTURE:\n- All STATIC cases (visibility/state checks, no actions) \u2192 ONE file static-checks.spec.ts (each case = a separate test() inside).\n- Each ACTIVE case (with actions) \u2192 a SEPARATE file, named after the case (e.g. add-user-flow.spec.ts).\n\nReturn files: an array of objects { path: '<name>.spec.ts', content: '<full file code>' }.";
6
+ //# sourceMappingURL=qa-playwright-ts-writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-playwright-ts-writer.d.ts","sourceRoot":"","sources":["../../../src/prompts/local/qa-playwright-ts-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,40EAkCuD,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Prompt for generating @playwright/test code from test cases (ADR-0005).
3
+ * Provenance: ported from AZANIR/qa-skills → `qa-playwright-ts-writer` (GPL-3.0, author — the user). ADR-0008.
4
+ */
5
+ export const QA_PLAYWRIGHT_TS_WRITER = `You are an experienced Playwright test automation engineer (@playwright/test, TypeScript).
6
+ Generate RUNNABLE spec files covering the provided test cases.
7
+
8
+ Page under test:
9
+ - URL: {{baseUrl}}
10
+ - Purpose: {{pageSemantics}}
11
+
12
+ Interactive elements (ref · role · name; ×N = repeated, several identical):
13
+ {{elements}}
14
+
15
+ Test cases to cover:
16
+ {{testCases}}
17
+
18
+ Observed state transitions (for state-transition assertions — use exactly these before→after):
19
+ {{transitions}}
20
+
21
+ Rules (STRICT):
22
+ - Each file is complete valid TypeScript: import { test, expect } from '@playwright/test';
23
+ - At the start of each test: await page.goto('{{baseUrl}}');
24
+ - Locators ONLY user-facing by role+name: page.getByRole('button', { name: 'Sign In' }), getByLabel, getByText. NO CSS/XPath/testid.
25
+ - Repeated elements (marked ×N — list/table rows): the locator resolves to several → ALWAYS use .first() (or .nth(i)), e.g. page.getByRole('button', { name: 'Download PDF' }).first(). Otherwise Playwright throws a strict-mode error.
26
+ - An element marked [first click tab "X"] lives behind a tab/view: first await page.getByRole(...{ name: 'X' }).click(), and ONLY then interact with it (otherwise it is not visible).
27
+ - One test case → one test('<name>', async ({ page }) => { ... }) with verifiable await expect(...).
28
+ - Wrap logical steps in await test.step('<step description>', async () => { ... }) — a more readable run report.
29
+ - Assertions must match really observable behavior; do not invent elements outside the list.
30
+ - Read-only assertions by default (toBeVisible/toBeEnabled/toBeChecked). For destructive controls (Delete, Submit, Convert, Log out, Add) — only await expect(...).toBeVisible(), do NOT click.
31
+ - Each test() is INDEPENDENT: starts with await page.goto('{{baseUrl}}') (clean state); do NOT rely on state from another test.
32
+ - One or two RELATED assertions per test; no brittle chains or mega-tests.
33
+ - The code is self-contained and must parse with tsc.
34
+
35
+ FILE STRUCTURE:
36
+ - All STATIC cases (visibility/state checks, no actions) → ONE file static-checks.spec.ts (each case = a separate test() inside).
37
+ - Each ACTIVE case (with actions) → a SEPARATE file, named after the case (e.g. add-user-flow.spec.ts).
38
+
39
+ Return files: an array of objects { path: '<name>.spec.ts', content: '<full file code>' }.`;
40
+ //# sourceMappingURL=qa-playwright-ts-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-playwright-ts-writer.js","sourceRoot":"","sources":["../../../src/prompts/local/qa-playwright-ts-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAkCoD,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Main prompt for generating test cases from a page.
3
+ * Provenance: ported from AZANIR/qa-skills → `qa-testcase-from-ui` (GPL-3.0, author — the user). ADR-0008.
4
+ */
5
+ export declare const QA_TESTCASE_FROM_UI = "You are an experienced QA engineer. Based on the explored page, generate UI test cases.\nIMPORTANT: write all title, steps, expected in {{language}} \u2014 do not mix languages (even if the checklist/page is in another language).\n\nPage purpose:\n{{pageSemantics}}\n\nInteractive elements (ref \u00B7 role \u00B7 name; \u00D7N = repeated, several identical on the page \u2014 e.g. list rows). All REALLY present. In elementRefs use ONLY these refs \u2014 do not invent or change them:\n{{elements}}\n\nObserved state transitions (act\u2192observe). GROUND state-transition assertions ON THESE \u2014 do not invent consequences:\n{{transitions}}\n\nDomain knowledge (credentials, validation rules, nuances \u2014 account for these in the cases):\n{{knowledge}}\n\n{{experience}}\n\n{{style}}\n\n{{methodology}}\n\n{{checklist}}\n\nGenerate clear, verifiable test cases. For each:\n- title \u2014 concise title;\n- technique \u2014 applied 29119-4 technique;\n- kind \u2014 \"static\" (visibility/state check only, no actions) or \"active\" (with actions: click/fill/navigation);\n- type \u2014 \"Positive\" (valid scenario) or \"Negative\" (invalid/erroneous input);\n- execution \u2014 \"auto\" (can be RELIABLY automated: read-only checks on verified locators) or \"manual\" (full generation/submit, security/XSS, UI-UX/visual/responsiveness, irreversible actions \u2014 the bot does NOT automate these);\n- preconditions \u2014 preconditions (e.g. \"user is logged in\", \"page X is open\");\n- steps \u2014 DETAILED unambiguous steps with REAL element labels (e.g. 'Click \"Generate CV\"', 'Enter text into the \"Vacancy text\" field');\n- expected \u2014 verifiable expected result;\n- priority \u2014 critical | high | medium | low;\n- elementRefs \u2014 real refs from the list above that the case touches.\n\nASSERTION SAFETY:\n- Read-only by default: check visibility/state (toBeVisible/toBeEnabled/toBeChecked), not the consequences of actions.\n- For destructive/irreversible controls (Delete, Remove, Submit, Convert, Log out, Add \u2014 anything that writes data or signs out) \u2014 only check that the element is VISIBLE; do NOT click or perform the action.\n\nSTABILITY (CRITICAL):\n- One case = ONE logical check (one expected). Do NOT combine many assertions in one case \u2014 a mega-test fails entirely if any single part is off.\n- Each case is INDEPENDENT and starts from a CLEAN page. Do NOT assume state left by another case.\n- Do NOT generate contradictory cases (e.g. one expects toggle=on, another toggle=off from a fresh start). For a toggle take EXACTLY ONE transition from the \"Observed state transitions\" (before\u2192after).\n\nCover happy path AND negative/edge scenarios. No duplicates or trivialities.\n\nFULL CHECKLIST COVERAGE: do NOT skip checklist items. If an item cannot be reliably automated (full generation/submit flow, security/XSS, UI-UX/visual/responsiveness, irreversible actions) \u2014 STILL create a case, but set execution=\"manual\" (it will not be automated, but it is documented for manual testing). Every checklist item \u2192 at least one case (auto or manual).";
6
+ //# sourceMappingURL=qa-testcase-from-ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-testcase-from-ui.d.ts","sourceRoot":"","sources":["../../../src/prompts/local/qa-testcase-from-ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,sjGA8C+U,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Main prompt for generating test cases from a page.
3
+ * Provenance: ported from AZANIR/qa-skills → `qa-testcase-from-ui` (GPL-3.0, author — the user). ADR-0008.
4
+ */
5
+ export const QA_TESTCASE_FROM_UI = `You are an experienced QA engineer. Based on the explored page, generate UI test cases.
6
+ IMPORTANT: write all title, steps, expected in {{language}} — do not mix languages (even if the checklist/page is in another language).
7
+
8
+ Page purpose:
9
+ {{pageSemantics}}
10
+
11
+ Interactive elements (ref · role · name; ×N = repeated, several identical on the page — e.g. list rows). All REALLY present. In elementRefs use ONLY these refs — do not invent or change them:
12
+ {{elements}}
13
+
14
+ Observed state transitions (act→observe). GROUND state-transition assertions ON THESE — do not invent consequences:
15
+ {{transitions}}
16
+
17
+ Domain knowledge (credentials, validation rules, nuances — account for these in the cases):
18
+ {{knowledge}}
19
+
20
+ {{experience}}
21
+
22
+ {{style}}
23
+
24
+ {{methodology}}
25
+
26
+ {{checklist}}
27
+
28
+ Generate clear, verifiable test cases. For each:
29
+ - title — concise title;
30
+ - technique — applied 29119-4 technique;
31
+ - kind — "static" (visibility/state check only, no actions) or "active" (with actions: click/fill/navigation);
32
+ - type — "Positive" (valid scenario) or "Negative" (invalid/erroneous input);
33
+ - execution — "auto" (can be RELIABLY automated: read-only checks on verified locators) or "manual" (full generation/submit, security/XSS, UI-UX/visual/responsiveness, irreversible actions — the bot does NOT automate these);
34
+ - preconditions — preconditions (e.g. "user is logged in", "page X is open");
35
+ - steps — DETAILED unambiguous steps with REAL element labels (e.g. 'Click "Generate CV"', 'Enter text into the "Vacancy text" field');
36
+ - expected — verifiable expected result;
37
+ - priority — critical | high | medium | low;
38
+ - elementRefs — real refs from the list above that the case touches.
39
+
40
+ ASSERTION SAFETY:
41
+ - Read-only by default: check visibility/state (toBeVisible/toBeEnabled/toBeChecked), not the consequences of actions.
42
+ - For destructive/irreversible controls (Delete, Remove, Submit, Convert, Log out, Add — anything that writes data or signs out) — only check that the element is VISIBLE; do NOT click or perform the action.
43
+
44
+ STABILITY (CRITICAL):
45
+ - One case = ONE logical check (one expected). Do NOT combine many assertions in one case — a mega-test fails entirely if any single part is off.
46
+ - Each case is INDEPENDENT and starts from a CLEAN page. Do NOT assume state left by another case.
47
+ - Do NOT generate contradictory cases (e.g. one expects toggle=on, another toggle=off from a fresh start). For a toggle take EXACTLY ONE transition from the "Observed state transitions" (before→after).
48
+
49
+ Cover happy path AND negative/edge scenarios. No duplicates or trivialities.
50
+
51
+ FULL CHECKLIST COVERAGE: do NOT skip checklist items. If an item cannot be reliably automated (full generation/submit flow, security/XSS, UI-UX/visual/responsiveness, irreversible actions) — STILL create a case, but set execution="manual" (it will not be automated, but it is documented for manual testing). Every checklist item → at least one case (auto or manual).`;
52
+ //# sourceMappingURL=qa-testcase-from-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-testcase-from-ui.js","sourceRoot":"","sources":["../../../src/prompts/local/qa-testcase-from-ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+WA8C4U,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { StorageState } from "../browser/types.js";
2
+ /**
3
+ * Browser session persistence (storageState: cookies + localStorage), ADR-0003.
4
+ * Files live outside git (.auth/ in .gitignore). Security: never commit them.
5
+ */
6
+ export declare class SessionStore {
7
+ private readonly dir;
8
+ constructor(dir: string);
9
+ pathFor(name: string): string;
10
+ save(name: string, state: StorageState): Promise<void>;
11
+ load(name: string): Promise<StorageState>;
12
+ /**
13
+ * Load storageState from an arbitrary file (names vary across projects) and NORMALIZE it:
14
+ * accepts the classic {cookies, origins}, as well as partial ones (cookies only / origins only → pads with []).
15
+ * If there are neither cookies nor origins (bare tokens) — throws a clear error.
16
+ */
17
+ loadFile(filePath: string): Promise<StorageState>;
18
+ exists(name: string): Promise<boolean>;
19
+ /** Structural check: must be { cookies: [], origins: [] }. */
20
+ isValid(state: unknown): state is StorageState;
21
+ }
22
+ /**
23
+ * A "this is a login page" heuristic — for detecting an EXPIRED session (a silent redirect to sign-in).
24
+ * Relies on the page semantics (the LLM description) or the dominance of a sign-in element when there are few elements.
25
+ */
26
+ export declare function looksLikeLoginPage(pageSemantics: string, elementNames: string[]): boolean;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;GAGG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,MAAM;IAExC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIvB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI/C;;;;OAIG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAqBjD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS5C,8DAA8D;IAC9D,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY;CAK/C;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAIzF"}
@@ -0,0 +1,74 @@
1
+ import { access, mkdir, readFile, writeFile } from "node:fs/promises";
2
+ import { dirname, join } from "node:path";
3
+ /**
4
+ * Browser session persistence (storageState: cookies + localStorage), ADR-0003.
5
+ * Files live outside git (.auth/ in .gitignore). Security: never commit them.
6
+ */
7
+ export class SessionStore {
8
+ dir;
9
+ constructor(dir) {
10
+ this.dir = dir;
11
+ }
12
+ pathFor(name) {
13
+ return join(this.dir, `${name}.storageState.json`);
14
+ }
15
+ async save(name, state) {
16
+ const file = this.pathFor(name);
17
+ await mkdir(dirname(file), { recursive: true });
18
+ await writeFile(file, JSON.stringify(state, null, 2), "utf8");
19
+ }
20
+ async load(name) {
21
+ return this.loadFile(this.pathFor(name));
22
+ }
23
+ /**
24
+ * Load storageState from an arbitrary file (names vary across projects) and NORMALIZE it:
25
+ * accepts the classic {cookies, origins}, as well as partial ones (cookies only / origins only → pads with []).
26
+ * If there are neither cookies nor origins (bare tokens) — throws a clear error.
27
+ */
28
+ async loadFile(filePath) {
29
+ const raw = await readFile(filePath, "utf8");
30
+ const parsed = JSON.parse(raw);
31
+ if (typeof parsed !== "object" || parsed === null) {
32
+ throw new Error(`File '${filePath}' is not a storageState JSON object.`);
33
+ }
34
+ const obj = parsed;
35
+ const hasCookies = Array.isArray(obj.cookies);
36
+ const hasOrigins = Array.isArray(obj.origins);
37
+ if (!hasCookies && !hasOrigins) {
38
+ throw new Error(`File '${filePath}' does not look like a Playwright storageState (no cookies/origins arrays). ` +
39
+ `Capture the session via 'npm run session:save' or convert it into the {cookies, origins} form.`);
40
+ }
41
+ return {
42
+ cookies: hasCookies ? obj.cookies : [],
43
+ origins: hasOrigins ? obj.origins : [],
44
+ };
45
+ }
46
+ async exists(name) {
47
+ try {
48
+ await access(this.pathFor(name));
49
+ return true;
50
+ }
51
+ catch {
52
+ return false;
53
+ }
54
+ }
55
+ /** Structural check: must be { cookies: [], origins: [] }. */
56
+ isValid(state) {
57
+ if (typeof state !== "object" || state === null)
58
+ return false;
59
+ const s = state;
60
+ return Array.isArray(s.cookies) && Array.isArray(s.origins);
61
+ }
62
+ }
63
+ const LOGIN_HINTS = /вхід|увійти|sign\s?in|log\s?in|авторизац|\blogin\b|запрошенн|invitation/i;
64
+ /**
65
+ * A "this is a login page" heuristic — for detecting an EXPIRED session (a silent redirect to sign-in).
66
+ * Relies on the page semantics (the LLM description) or the dominance of a sign-in element when there are few elements.
67
+ */
68
+ export function looksLikeLoginPage(pageSemantics, elementNames) {
69
+ if (LOGIN_HINTS.test(pageSemantics))
70
+ return true;
71
+ const hasSignIn = elementNames.some((n) => /sign\s?in|увійти|sign in with/i.test(n));
72
+ return hasSignIn && elementNames.length <= 3;
73
+ }
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,21 @@
1
+ import { CallbackHandler } from "@langfuse/langchain";
2
+ import { LangfuseClient } from "@langfuse/client";
3
+ import type { AppConfig } from "../config/index.js";
4
+ /**
5
+ * Bot telemetry (ADR-0006). Langfuse v5 — OTel-first:
6
+ * `LangfuseSpanProcessor` is registered in `NodeSDK` and exports spans to the self-hosted instance;
7
+ * `CallbackHandler` only emits OTel spans (its constructor does NOT take keys);
8
+ * `LangfuseClient` — for scores/datasets/prompts (SDK-side judges, ADR-0006).
9
+ */
10
+ export interface Telemetry {
11
+ enabled: boolean;
12
+ callbackHandler?: CallbackHandler;
13
+ client?: LangfuseClient;
14
+ shutdown: () => Promise<void>;
15
+ }
16
+ /**
17
+ * Telemetry bootstrap. If Langfuse is disabled (no keys) — returns a no-op so the bot
18
+ * works offline (ADR-0004/0006). The enabled path is verified by the live Spike S5.
19
+ */
20
+ export declare function initTelemetry(cfg: AppConfig): Telemetry;
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAqBvD"}
@@ -0,0 +1,26 @@
1
+ import { NodeSDK } from "@opentelemetry/sdk-node";
2
+ import { LangfuseSpanProcessor } from "@langfuse/otel";
3
+ import { CallbackHandler } from "@langfuse/langchain";
4
+ import { LangfuseClient } from "@langfuse/client";
5
+ /**
6
+ * Telemetry bootstrap. If Langfuse is disabled (no keys) — returns a no-op so the bot
7
+ * works offline (ADR-0004/0006). The enabled path is verified by the live Spike S5.
8
+ */
9
+ export function initTelemetry(cfg) {
10
+ if (!cfg.langfuse.enabled) {
11
+ return { enabled: false, shutdown: async () => { } };
12
+ }
13
+ const { baseUrl, publicKey, secretKey } = cfg.langfuse;
14
+ const spanProcessor = new LangfuseSpanProcessor({ publicKey, secretKey, baseUrl });
15
+ const sdk = new NodeSDK({ spanProcessors: [spanProcessor] });
16
+ sdk.start();
17
+ const client = new LangfuseClient({ publicKey, secretKey, baseUrl });
18
+ const callbackHandler = new CallbackHandler();
19
+ const shutdown = async () => {
20
+ await client.score.flush().catch(() => undefined); // flush remaining scores (B1)
21
+ await spanProcessor.forceFlush();
22
+ await sdk.shutdown();
23
+ };
24
+ return { enabled: true, callbackHandler, client, shutdown };
25
+ }
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBlD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAc;IAC1C,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QAC1B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,CAAC;IACtD,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC;IAEvD,MAAM,aAAa,GAAG,IAAI,qBAAqB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IACnF,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC7D,GAAG,CAAC,KAAK,EAAE,CAAC;IAEZ,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IACrE,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAE9C,MAAM,QAAQ,GAAG,KAAK,IAAmB,EAAE;QACzC,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,8BAA8B;QACjF,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;IACvB,CAAC,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Root component: holds router state, exposes navigation via context, and owns the
3
+ * global keys (q quit, esc back) — suppressed while a text field is focused.
4
+ */
5
+ export declare function App(): import("react").JSX.Element;
6
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAaA;;;GAGG;AACH,wBAAgB,GAAG,gCAmClB"}
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useReducer, useState } from "react";
3
+ import { Box, useApp, useInput } from "ink";
4
+ import { routerReducer, initialRouter, currentScreen, canGoBack } from "./router.js";
5
+ import { RouterProvider } from "./router-context.js";
6
+ import { ErrorBoundary } from "./components/error-boundary.js";
7
+ import { Help } from "./components/help.js";
8
+ import { LauncherScreen } from "./screens/launcher-screen.js";
9
+ import { FormScreen } from "./screens/form-screen.js";
10
+ import { RunDashboardScreen } from "./screens/run-dashboard-screen.js";
11
+ import { SummaryScreen } from "./screens/summary-screen.js";
12
+ import { RunsListScreen } from "./screens/runs-list-screen.js";
13
+ import { RunDetailScreen } from "./screens/run-detail-screen.js";
14
+ /**
15
+ * Root component: holds router state, exposes navigation via context, and owns the
16
+ * global keys (q quit, esc back) — suppressed while a text field is focused.
17
+ */
18
+ export function App() {
19
+ const { exit } = useApp();
20
+ const [router, dispatch] = useReducer(routerReducer, initialRouter);
21
+ const [inTextField, setInTextField] = useState(false);
22
+ const screen = currentScreen(router);
23
+ const backable = canGoBack(router);
24
+ const api = {
25
+ navigate: (s) => dispatch({ type: "go", screen: s }),
26
+ back: () => dispatch({ type: "back" }),
27
+ replace: (s) => dispatch({ type: "replace", screen: s }),
28
+ canGoBack: backable,
29
+ setInTextField,
30
+ };
31
+ useInput((input, key) => {
32
+ if (inTextField)
33
+ return; // text fields own their keystrokes
34
+ if (input === "q") {
35
+ exit();
36
+ return;
37
+ }
38
+ if (key.escape && backable)
39
+ dispatch({ type: "back" });
40
+ });
41
+ return (_jsx(RouterProvider, { value: api, children: _jsx(ErrorBoundary, { children: _jsxs(Box, { flexDirection: "column", padding: 1, children: [renderScreen(screen), screen.name !== "runDetail" ? _jsx(Help, { canGoBack: backable }) : null] }) }) }));
42
+ }
43
+ function renderScreen(screen) {
44
+ switch (screen.name) {
45
+ case "launcher":
46
+ return _jsx(LauncherScreen, {});
47
+ case "form":
48
+ return _jsx(FormScreen, { command: screen.command, initial: screen.initial });
49
+ case "dashboard":
50
+ return _jsx(RunDashboardScreen, { command: screen.command, values: screen.values });
51
+ case "summary":
52
+ return _jsx(SummaryScreen, { command: screen.command, result: screen.result });
53
+ case "runsList":
54
+ return _jsx(RunsListScreen, {});
55
+ case "runDetail":
56
+ return _jsx(RunDetailScreen, { runDir: screen.runDir });
57
+ default:
58
+ return null;
59
+ }
60
+ }
61
+ //# sourceMappingURL=App.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ interface ErrorBoundaryState {
3
+ error: Error | null;
4
+ }
5
+ /**
6
+ * React error boundary (must be a class — hooks can't catch render errors).
7
+ * Keeps a thrown render error from tearing down the whole Ink process; shows it instead.
8
+ */
9
+ export declare class ErrorBoundary extends React.Component<{
10
+ children: React.ReactNode;
11
+ }, ErrorBoundaryState> {
12
+ state: ErrorBoundaryState;
13
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
14
+ render(): React.ReactNode;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=error-boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../../src/tui/components/error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,kBAAkB;IAC1B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAChD;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,EAC7B,kBAAkB,CACnB;IACU,KAAK,EAAE,kBAAkB,CAAmB;IAErD,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIxD,MAAM,IAAI,KAAK,CAAC,SAAS;CAcnC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Box, Text } from "ink";
4
+ /**
5
+ * React error boundary (must be a class — hooks can't catch render errors).
6
+ * Keeps a thrown render error from tearing down the whole Ink process; shows it instead.
7
+ */
8
+ export class ErrorBoundary extends React.Component {
9
+ state = { error: null };
10
+ static getDerivedStateFromError(error) {
11
+ return { error };
12
+ }
13
+ render() {
14
+ if (this.state.error) {
15
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Text, { color: "red", bold: true, children: "TUI error" }), _jsx(Text, { children: this.state.error.message }), _jsx(Text, { dimColor: true, children: "Press Ctrl+C to exit." })] }));
16
+ }
17
+ return this.props.children;
18
+ }
19
+ }
20
+ //# sourceMappingURL=error-boundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.js","sourceRoot":"","sources":["../../../src/tui/components/error-boundary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAMhC;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAGxC;IACU,KAAK,GAAuB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAErD,MAAM,CAAC,wBAAwB,CAAC,KAAY;QAC1C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAEQ,MAAM;QACb,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,aACpC,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,gCAEf,EACP,KAAC,IAAI,cAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAQ,EACvC,KAAC,IAAI,IAAC,QAAQ,4CAA6B,IACvC,CACP,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ /** A labelled, controlled text field. `focus` drives whether it captures keystrokes. */
2
+ export declare function Field({ label, value, onChange, onSubmit, focus, placeholder, }: {
3
+ label: string;
4
+ value: string;
5
+ onChange: (v: string) => void;
6
+ onSubmit?: () => void;
7
+ focus?: boolean;
8
+ placeholder?: string;
9
+ }): import("react").JSX.Element;
10
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/tui/components/field.tsx"],"names":[],"mappings":"AAGA,wFAAwF;AACxF,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAY,EACZ,WAAW,GACZ,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,+BAeA"}
@@ -0,0 +1,8 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import TextInput from "ink-text-input";
4
+ /** A labelled, controlled text field. `focus` drives whether it captures keystrokes. */
5
+ export function Field({ label, value, onChange, onSubmit, focus = true, placeholder, }) {
6
+ return (_jsxs(Box, { children: [_jsx(Box, { width: 12, children: _jsxs(Text, { children: [label, ":"] }) }), _jsx(TextInput, { value: value, onChange: onChange, onSubmit: onSubmit, focus: focus, placeholder: placeholder })] }));
7
+ }
8
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/tui/components/field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,wFAAwF;AACxF,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,IAAI,EACZ,WAAW,GAQZ;IACC,OAAO,CACL,MAAC,GAAG,eACF,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,YACZ,MAAC,IAAI,eAAE,KAAK,SAAS,GACjB,EACN,KAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,GACxB,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** One-line key hints at the bottom of every screen. */
2
+ export declare function Help({ canGoBack }: {
3
+ canGoBack: boolean;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=help.d.ts.map