@jevitate/cli 0.1.0 → 0.3.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 (410) hide show
  1. package/README.md +23 -0
  2. package/dist/ai-cli.d.ts +31 -11
  3. package/dist/ai-cli.js +131 -88
  4. package/dist/ai-cli.js.map +1 -1
  5. package/dist/author-journey-cli.d.ts +4 -0
  6. package/dist/author-journey-cli.js +111 -0
  7. package/dist/author-journey-cli.js.map +1 -0
  8. package/dist/bin.js +60349 -16477
  9. package/dist/bin.js.map +1 -1
  10. package/dist/browser-run-options.d.ts +89 -0
  11. package/dist/browser-run-options.js +175 -0
  12. package/dist/browser-run-options.js.map +1 -0
  13. package/dist/build-info.generated.d.ts +2 -0
  14. package/dist/build-info.generated.js +10 -0
  15. package/dist/build-info.generated.js.map +1 -0
  16. package/dist/campaign-api.d.ts +151 -0
  17. package/dist/campaign-api.js +446 -0
  18. package/dist/campaign-api.js.map +1 -0
  19. package/dist/campaign-cli.d.ts +6 -0
  20. package/dist/campaign-cli.js +66 -0
  21. package/dist/campaign-cli.js.map +1 -0
  22. package/dist/check-api.d.ts +5 -0
  23. package/dist/check-api.js +234 -0
  24. package/dist/check-api.js.map +1 -0
  25. package/dist/check-budget.d.ts +26 -0
  26. package/dist/check-budget.js +90 -0
  27. package/dist/check-budget.js.map +1 -0
  28. package/dist/check-cli.d.ts +31 -0
  29. package/dist/check-cli.js +109 -0
  30. package/dist/check-cli.js.map +1 -0
  31. package/dist/check-execute.d.ts +29 -0
  32. package/dist/check-execute.js +420 -0
  33. package/dist/check-execute.js.map +1 -0
  34. package/dist/check-plan.d.ts +118 -0
  35. package/dist/check-plan.js +516 -0
  36. package/dist/check-plan.js.map +1 -0
  37. package/dist/check-suite.d.ts +184 -0
  38. package/dist/check-suite.js +540 -0
  39. package/dist/check-suite.js.map +1 -0
  40. package/dist/check-types.d.ts +181 -0
  41. package/dist/check-types.js +35 -0
  42. package/dist/check-types.js.map +1 -0
  43. package/dist/cli-args.d.ts +26 -0
  44. package/dist/cli-args.js +50 -0
  45. package/dist/cli-args.js.map +1 -0
  46. package/dist/cli-output.d.ts +106 -0
  47. package/dist/cli-output.js +563 -0
  48. package/dist/cli-output.js.map +1 -0
  49. package/dist/cli-reference.d.ts +3 -0
  50. package/dist/cli-reference.js +81 -0
  51. package/dist/cli-reference.js.map +1 -0
  52. package/dist/cli-refusal.d.ts +12 -0
  53. package/dist/cli-refusal.js +52 -0
  54. package/dist/cli-refusal.js.map +1 -0
  55. package/dist/cli-shared.d.ts +340 -0
  56. package/dist/cli-shared.js +537 -0
  57. package/dist/cli-shared.js.map +1 -0
  58. package/dist/cli-surface.d.ts +33 -0
  59. package/dist/cli-surface.js +48 -0
  60. package/dist/cli-surface.js.map +1 -0
  61. package/dist/conversation-options.d.ts +15 -0
  62. package/dist/conversation-options.js +10 -0
  63. package/dist/conversation-options.js.map +1 -0
  64. package/dist/credentials-file.d.ts +15 -0
  65. package/dist/credentials-file.js +56 -0
  66. package/dist/credentials-file.js.map +1 -0
  67. package/dist/data-dir.d.ts +1 -1
  68. package/dist/data-dir.js +1 -1
  69. package/dist/defect-evidence.d.ts +141 -0
  70. package/dist/defect-evidence.js +505 -0
  71. package/dist/defect-evidence.js.map +1 -0
  72. package/dist/demo-aspect-api.d.ts +209 -0
  73. package/dist/demo-aspect-api.js +398 -0
  74. package/dist/demo-aspect-api.js.map +1 -0
  75. package/dist/demo-aspect-cli.d.ts +3 -0
  76. package/dist/demo-aspect-cli.js +243 -0
  77. package/dist/demo-aspect-cli.js.map +1 -0
  78. package/dist/demo-capture.d.ts +142 -0
  79. package/dist/demo-capture.js +537 -0
  80. package/dist/demo-capture.js.map +1 -0
  81. package/dist/engine.d.ts +35 -0
  82. package/dist/engine.js +25 -0
  83. package/dist/engine.js.map +1 -0
  84. package/dist/environments.d.ts +155 -0
  85. package/dist/environments.js +364 -0
  86. package/dist/environments.js.map +1 -0
  87. package/dist/exit-codes.d.ts +46 -0
  88. package/dist/exit-codes.js +91 -0
  89. package/dist/exit-codes.js.map +1 -0
  90. package/dist/explore-adversarial.d.ts +144 -0
  91. package/dist/explore-adversarial.js +227 -0
  92. package/dist/explore-adversarial.js.map +1 -0
  93. package/dist/explore-api.d.ts +7 -187
  94. package/dist/explore-api.js +7 -301
  95. package/dist/explore-api.js.map +1 -1
  96. package/dist/explore-author.d.ts +79 -0
  97. package/dist/explore-author.js +86 -0
  98. package/dist/explore-author.js.map +1 -0
  99. package/dist/explore-cli.d.ts +7 -0
  100. package/dist/explore-cli.js +1199 -0
  101. package/dist/explore-cli.js.map +1 -0
  102. package/dist/explore-coverage.d.ts +173 -0
  103. package/dist/explore-coverage.js +246 -0
  104. package/dist/explore-coverage.js.map +1 -0
  105. package/dist/explore-feature.d.ts +125 -0
  106. package/dist/explore-feature.js +218 -0
  107. package/dist/explore-feature.js.map +1 -0
  108. package/dist/explore-goal.d.ts +271 -0
  109. package/dist/explore-goal.js +417 -0
  110. package/dist/explore-goal.js.map +1 -0
  111. package/dist/explore-shared.d.ts +177 -0
  112. package/dist/explore-shared.js +149 -0
  113. package/dist/explore-shared.js.map +1 -0
  114. package/dist/explore-specs.d.ts +53 -0
  115. package/dist/explore-specs.js +333 -0
  116. package/dist/explore-specs.js.map +1 -0
  117. package/dist/findings-filing.d.ts +64 -0
  118. package/dist/findings-filing.js +108 -0
  119. package/dist/findings-filing.js.map +1 -0
  120. package/dist/fixture-auth.d.ts +63 -0
  121. package/dist/fixture-auth.js +95 -0
  122. package/dist/fixture-auth.js.map +1 -0
  123. package/dist/fixture-cli.d.ts +99 -0
  124. package/dist/fixture-cli.js +292 -0
  125. package/dist/fixture-cli.js.map +1 -0
  126. package/dist/github-issue-filer.d.ts +62 -0
  127. package/dist/github-issue-filer.js +189 -0
  128. package/dist/github-issue-filer.js.map +1 -0
  129. package/dist/host-health-run.d.ts +25 -0
  130. package/dist/host-health-run.js +33 -0
  131. package/dist/host-health-run.js.map +1 -0
  132. package/dist/http-5xx-outcome.d.ts +6 -0
  133. package/dist/http-5xx-outcome.js +39 -0
  134. package/dist/http-5xx-outcome.js.map +1 -0
  135. package/dist/inbox-cli.d.ts +7 -0
  136. package/dist/inbox-cli.js +197 -0
  137. package/dist/inbox-cli.js.map +1 -0
  138. package/dist/index.d.ts +1 -0
  139. package/dist/index.js +1 -0
  140. package/dist/index.js.map +1 -1
  141. package/dist/init-cli.d.ts +4 -0
  142. package/dist/init-cli.js +156 -0
  143. package/dist/init-cli.js.map +1 -0
  144. package/dist/init-keys.d.ts +30 -2
  145. package/dist/init-keys.js +19 -5
  146. package/dist/init-keys.js.map +1 -1
  147. package/dist/init-next-steps.d.ts +35 -0
  148. package/dist/init-next-steps.js +79 -0
  149. package/dist/init-next-steps.js.map +1 -0
  150. package/dist/invariants-file.d.ts +34 -0
  151. package/dist/invariants-file.js +68 -0
  152. package/dist/invariants-file.js.map +1 -0
  153. package/dist/invariants-validate.d.ts +30 -0
  154. package/dist/invariants-validate.js +105 -0
  155. package/dist/invariants-validate.js.map +1 -0
  156. package/dist/journey-annotate-api.d.ts +76 -0
  157. package/dist/journey-annotate-api.js +269 -0
  158. package/dist/journey-annotate-api.js.map +1 -0
  159. package/dist/journey-annotate-cli.d.ts +9 -0
  160. package/dist/journey-annotate-cli.js +181 -0
  161. package/dist/journey-annotate-cli.js.map +1 -0
  162. package/dist/journey-api.d.ts +104 -2
  163. package/dist/journey-api.js +163 -20
  164. package/dist/journey-api.js.map +1 -1
  165. package/dist/journey-cli.d.ts +4 -0
  166. package/dist/journey-cli.js +411 -0
  167. package/dist/journey-cli.js.map +1 -0
  168. package/dist/journey-demo-api.d.ts +114 -0
  169. package/dist/journey-demo-api.js +405 -0
  170. package/dist/journey-demo-api.js.map +1 -0
  171. package/dist/journey-demo-cli.d.ts +10 -0
  172. package/dist/journey-demo-cli.js +158 -0
  173. package/dist/journey-demo-cli.js.map +1 -0
  174. package/dist/journey-prefix.d.ts +194 -0
  175. package/dist/journey-prefix.js +279 -0
  176. package/dist/journey-prefix.js.map +1 -0
  177. package/dist/key-report.d.ts +49 -0
  178. package/dist/key-report.js +101 -0
  179. package/dist/key-report.js.map +1 -0
  180. package/dist/kill-signal.d.ts +193 -0
  181. package/dist/kill-signal.js +283 -0
  182. package/dist/kill-signal.js.map +1 -0
  183. package/dist/launch-armed.d.ts +37 -0
  184. package/dist/launch-armed.js +31 -0
  185. package/dist/launch-armed.js.map +1 -0
  186. package/dist/ledger-api.d.ts +106 -0
  187. package/dist/ledger-api.js +239 -0
  188. package/dist/ledger-api.js.map +1 -0
  189. package/dist/ledger-cli.d.ts +18 -0
  190. package/dist/ledger-cli.js +107 -0
  191. package/dist/ledger-cli.js.map +1 -0
  192. package/dist/load-api.d.ts +29 -11
  193. package/dist/load-api.js +23 -15
  194. package/dist/load-api.js.map +1 -1
  195. package/dist/load-cli.d.ts +4 -0
  196. package/dist/load-cli.js +97 -0
  197. package/dist/load-cli.js.map +1 -0
  198. package/dist/log-correlation.d.ts +200 -0
  199. package/dist/log-correlation.js +394 -0
  200. package/dist/log-correlation.js.map +1 -0
  201. package/dist/log-lines.d.ts +131 -0
  202. package/dist/log-lines.js +389 -0
  203. package/dist/log-lines.js.map +1 -0
  204. package/dist/log-sources.d.ts +71 -0
  205. package/dist/log-sources.js +236 -0
  206. package/dist/log-sources.js.map +1 -0
  207. package/dist/log-trace.d.ts +80 -0
  208. package/dist/log-trace.js +210 -0
  209. package/dist/log-trace.js.map +1 -0
  210. package/dist/logs-cli.d.ts +3 -0
  211. package/dist/logs-cli.js +51 -0
  212. package/dist/logs-cli.js.map +1 -0
  213. package/dist/logs-retention.d.ts +28 -0
  214. package/dist/logs-retention.js +85 -0
  215. package/dist/logs-retention.js.map +1 -0
  216. package/dist/masked-input.d.ts +22 -0
  217. package/dist/masked-input.js +99 -0
  218. package/dist/masked-input.js.map +1 -0
  219. package/dist/mcp-api.d.ts +91 -1
  220. package/dist/mcp-api.js +514 -18
  221. package/dist/mcp-api.js.map +1 -1
  222. package/dist/mcp-args.d.ts +50 -0
  223. package/dist/mcp-args.js +164 -0
  224. package/dist/mcp-args.js.map +1 -0
  225. package/dist/mcp-cli-bridge.d.ts +34 -0
  226. package/dist/mcp-cli-bridge.js +62 -0
  227. package/dist/mcp-cli-bridge.js.map +1 -0
  228. package/dist/mcp-cli-runner.d.ts +29 -0
  229. package/dist/mcp-cli-runner.js +44 -0
  230. package/dist/mcp-cli-runner.js.map +1 -0
  231. package/dist/mcp-cli-tools.d.ts +129 -0
  232. package/dist/mcp-cli-tools.js +737 -0
  233. package/dist/mcp-cli-tools.js.map +1 -0
  234. package/dist/mcp-paths.d.ts +28 -0
  235. package/dist/mcp-paths.js +76 -0
  236. package/dist/mcp-paths.js.map +1 -0
  237. package/dist/mission-actors.d.ts +40 -0
  238. package/dist/mission-actors.js +72 -0
  239. package/dist/mission-actors.js.map +1 -0
  240. package/dist/mission-api.d.ts +35 -0
  241. package/dist/mission-api.js +60 -3
  242. package/dist/mission-api.js.map +1 -1
  243. package/dist/mission-cli.d.ts +4 -0
  244. package/dist/mission-cli.js +248 -0
  245. package/dist/mission-cli.js.map +1 -0
  246. package/dist/mission-exit.d.ts +22 -0
  247. package/dist/mission-exit.js +26 -0
  248. package/dist/mission-exit.js.map +1 -0
  249. package/dist/mission-fixtures.d.ts +234 -0
  250. package/dist/mission-fixtures.js +862 -0
  251. package/dist/mission-fixtures.js.map +1 -0
  252. package/dist/mission-journal.d.ts +60 -0
  253. package/dist/mission-journal.js +115 -0
  254. package/dist/mission-journal.js.map +1 -0
  255. package/dist/mission-queue-cli.d.ts +10 -0
  256. package/dist/mission-queue-cli.js +198 -0
  257. package/dist/mission-queue-cli.js.map +1 -0
  258. package/dist/mission-queue-runner.d.ts +126 -0
  259. package/dist/mission-queue-runner.js +406 -0
  260. package/dist/mission-queue-runner.js.map +1 -0
  261. package/dist/multi-run-cli.d.ts +37 -0
  262. package/dist/multi-run-cli.js +116 -0
  263. package/dist/multi-run-cli.js.map +1 -0
  264. package/dist/multi-run.d.ts +339 -0
  265. package/dist/multi-run.js +619 -0
  266. package/dist/multi-run.js.map +1 -0
  267. package/dist/openrouter-call.d.ts +22 -0
  268. package/dist/openrouter-call.js +64 -0
  269. package/dist/openrouter-call.js.map +1 -0
  270. package/dist/profile-cli.d.ts +4 -0
  271. package/dist/profile-cli.js +57 -0
  272. package/dist/profile-cli.js.map +1 -0
  273. package/dist/program.d.ts +3 -75
  274. package/dist/program.js +123 -1921
  275. package/dist/program.js.map +1 -1
  276. package/dist/project-dir.d.ts +96 -0
  277. package/dist/project-dir.js +221 -0
  278. package/dist/project-dir.js.map +1 -0
  279. package/dist/record-api.d.ts +13 -7
  280. package/dist/record-api.js +44 -30
  281. package/dist/record-api.js.map +1 -1
  282. package/dist/record-cli.d.ts +4 -0
  283. package/dist/record-cli.js +76 -0
  284. package/dist/record-cli.js.map +1 -0
  285. package/dist/recording-cli.d.ts +4 -0
  286. package/dist/recording-cli.js +248 -0
  287. package/dist/recording-cli.js.map +1 -0
  288. package/dist/regression-api.d.ts +107 -0
  289. package/dist/regression-api.js +387 -6
  290. package/dist/regression-api.js.map +1 -1
  291. package/dist/regression-cli.d.ts +4 -0
  292. package/dist/regression-cli.js +284 -0
  293. package/dist/regression-cli.js.map +1 -0
  294. package/dist/report-api.d.ts +146 -0
  295. package/dist/report-api.js +431 -0
  296. package/dist/report-api.js.map +1 -0
  297. package/dist/report-cli.d.ts +12 -0
  298. package/dist/report-cli.js +147 -0
  299. package/dist/report-cli.js.map +1 -0
  300. package/dist/resource-preflight.d.ts +87 -0
  301. package/dist/resource-preflight.js +160 -0
  302. package/dist/resource-preflight.js.map +1 -0
  303. package/dist/result-schema.d.ts +22 -0
  304. package/dist/result-schema.js +28 -0
  305. package/dist/result-schema.js.map +1 -0
  306. package/dist/run-index.d.ts +29 -0
  307. package/dist/run-index.js +70 -0
  308. package/dist/run-index.js.map +1 -0
  309. package/dist/run-key-preflight.d.ts +42 -0
  310. package/dist/run-key-preflight.js +82 -0
  311. package/dist/run-key-preflight.js.map +1 -0
  312. package/dist/run-screenshots.d.ts +123 -0
  313. package/dist/run-screenshots.js +235 -0
  314. package/dist/run-screenshots.js.map +1 -0
  315. package/dist/runtime-env.d.ts +8 -0
  316. package/dist/runtime-env.js +23 -0
  317. package/dist/runtime-env.js.map +1 -0
  318. package/dist/secret-args.d.ts +23 -0
  319. package/dist/secret-args.js +45 -0
  320. package/dist/secret-args.js.map +1 -0
  321. package/dist/serve-cli.d.ts +4 -0
  322. package/dist/serve-cli.js +95 -0
  323. package/dist/serve-cli.js.map +1 -0
  324. package/dist/server-log-verify.d.ts +36 -0
  325. package/dist/server-log-verify.js +120 -0
  326. package/dist/server-log-verify.js.map +1 -0
  327. package/dist/session-check.d.ts +14 -0
  328. package/dist/session-check.js +44 -0
  329. package/dist/session-check.js.map +1 -0
  330. package/dist/site-cli.d.ts +4 -0
  331. package/dist/site-cli.js +127 -0
  332. package/dist/site-cli.js.map +1 -0
  333. package/dist/site-gate-cli.d.ts +28 -0
  334. package/dist/site-gate-cli.js +59 -0
  335. package/dist/site-gate-cli.js.map +1 -0
  336. package/dist/source-api.js +20 -4
  337. package/dist/source-api.js.map +1 -1
  338. package/dist/source-cli.d.ts +4 -0
  339. package/dist/source-cli.js +284 -0
  340. package/dist/source-cli.js.map +1 -0
  341. package/dist/source-run-api.d.ts +27 -1
  342. package/dist/source-run-api.js +22 -11
  343. package/dist/source-run-api.js.map +1 -1
  344. package/dist/storage-state-snapshot.d.ts +50 -0
  345. package/dist/storage-state-snapshot.js +87 -0
  346. package/dist/storage-state-snapshot.js.map +1 -0
  347. package/dist/suite-explore-options.d.ts +321 -0
  348. package/dist/suite-explore-options.js +162 -0
  349. package/dist/suite-explore-options.js.map +1 -0
  350. package/dist/target-config.d.ts +115 -0
  351. package/dist/target-config.js +225 -0
  352. package/dist/target-config.js.map +1 -0
  353. package/dist/transcript-file.d.ts +12 -0
  354. package/dist/transcript-file.js +23 -0
  355. package/dist/transcript-file.js.map +1 -0
  356. package/dist/type-fixture-file.d.ts +9 -0
  357. package/dist/type-fixture-file.js +48 -0
  358. package/dist/type-fixture-file.js.map +1 -0
  359. package/dist/ui-api.d.ts +3 -0
  360. package/dist/ui-api.js +11 -4
  361. package/dist/ui-api.js.map +1 -1
  362. package/dist/usability-capture.d.ts +43 -0
  363. package/dist/usability-capture.js +327 -0
  364. package/dist/usability-capture.js.map +1 -0
  365. package/dist/usage-config.d.ts +36 -0
  366. package/dist/usage-config.js +114 -0
  367. package/dist/usage-config.js.map +1 -0
  368. package/dist/ux-api.d.ts +3 -75
  369. package/dist/ux-api.js +3 -220
  370. package/dist/ux-api.js.map +1 -1
  371. package/dist/ux-claim-probe.d.ts +45 -0
  372. package/dist/ux-claim-probe.js +386 -0
  373. package/dist/ux-claim-probe.js.map +1 -0
  374. package/dist/ux-cli.d.ts +4 -0
  375. package/dist/ux-cli.js +109 -0
  376. package/dist/ux-cli.js.map +1 -0
  377. package/dist/ux-config.d.ts +29 -0
  378. package/dist/ux-config.js +103 -0
  379. package/dist/ux-config.js.map +1 -0
  380. package/dist/ux-evidence.d.ts +54 -0
  381. package/dist/ux-evidence.js +197 -0
  382. package/dist/ux-evidence.js.map +1 -0
  383. package/dist/ux-product.d.ts +14 -0
  384. package/dist/ux-product.js +39 -0
  385. package/dist/ux-product.js.map +1 -0
  386. package/dist/ux-review.d.ts +116 -0
  387. package/dist/ux-review.js +171 -0
  388. package/dist/ux-review.js.map +1 -0
  389. package/dist/ux-usability.d.ts +263 -0
  390. package/dist/ux-usability.js +580 -0
  391. package/dist/ux-usability.js.map +1 -0
  392. package/dist/verify-fix-api.d.ts +194 -0
  393. package/dist/verify-fix-api.js +506 -0
  394. package/dist/verify-fix-api.js.map +1 -0
  395. package/dist/verify-fix-cli.d.ts +4 -0
  396. package/dist/verify-fix-cli.js +115 -0
  397. package/dist/verify-fix-cli.js.map +1 -0
  398. package/package.json +23 -18
  399. package/skills/jevitate-ci-check/SKILL.md +77 -0
  400. package/skills/jevitate-demo/SKILL.md +61 -0
  401. package/skills/jevitate-explore/SKILL.md +96 -87
  402. package/skills/jevitate-getting-started/SKILL.md +89 -0
  403. package/skills/jevitate-load-test/SKILL.md +11 -2
  404. package/skills/jevitate-mission-scope/SKILL.md +19 -11
  405. package/skills/jevitate-record/SKILL.md +23 -5
  406. package/skills/jevitate-run-journey/SKILL.md +61 -17
  407. package/skills/jevitate-sources/SKILL.md +57 -14
  408. package/skills/jevitate-test-campaign/SKILL.md +203 -0
  409. package/skills/jevitate-ux-review/SKILL.md +106 -16
  410. package/skills/jevitate-verify-fix/SKILL.md +76 -0
@@ -0,0 +1,103 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { resolveDataDir } from "./data-dir.js";
3
+ /**
4
+ * The UX-review slice of `~/.jevitate/config.json`:
5
+ *
6
+ * ```json
7
+ * { "ux": { "minConfidence": 0.75, "show": ["actionable", "relevant-minor"] } }
8
+ * ```
9
+ *
10
+ * A missing file (or missing key) is "not configured"; a malformed file or a non-numeric value
11
+ * fails closed — it is never silently replaced by the default.
12
+ */
13
+ export class UxConfigError extends Error {
14
+ code = "E_UX_CONFIG";
15
+ }
16
+ /** The parsed `ux` object of the config file (undefined when the file or key is absent). */
17
+ function loadUxSection(path) {
18
+ let raw;
19
+ try {
20
+ raw = readFileSync(path, "utf8");
21
+ }
22
+ catch (e) {
23
+ if (typeof e === "object" && e !== null && "code" in e && e.code === "ENOENT")
24
+ return undefined;
25
+ throw new UxConfigError(`cannot read ${path}: ${e instanceof Error ? e.message : String(e)}`);
26
+ }
27
+ let parsed;
28
+ try {
29
+ parsed = JSON.parse(raw);
30
+ }
31
+ catch {
32
+ throw new UxConfigError(`${path} is not valid JSON`);
33
+ }
34
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
35
+ throw new UxConfigError(`${path} must be a JSON object`);
36
+ }
37
+ const ux = parsed.ux;
38
+ if (ux === undefined)
39
+ return undefined;
40
+ if (ux === null || typeof ux !== "object" || Array.isArray(ux))
41
+ throw new UxConfigError(`${path}: "ux" must be an object`);
42
+ return ux;
43
+ }
44
+ export function loadUxMinConfidence(path = resolveDataDir(["config.json"])) {
45
+ const v = loadUxSection(path)?.minConfidence;
46
+ if (v === undefined)
47
+ return undefined;
48
+ if (typeof v !== "number" || !Number.isFinite(v) || v < 0 || v > 1) {
49
+ throw new UxConfigError(`${path}: ux.minConfidence must be a number in [0,1]`);
50
+ }
51
+ return v;
52
+ }
53
+ /**
54
+ * `ux.minConfidenceByAppClass` — per-`--app-class` cutoff defaults (issue #97), e.g.:
55
+ * `{ "ux": { "minConfidenceByAppClass": { "consumer": 0.3, "admin": 0.5 } } }`. Looked up
56
+ * case-insensitively by `appClass`; falls through to `resolveMinConfidence`'s next precedence
57
+ * level (`DEFAULT_MIN_CONFIDENCE`) when `appClass` has no entry — today's behavior is unchanged
58
+ * where no app-class-specific data exists.
59
+ */
60
+ export function loadUxMinConfidenceByAppClass(path = resolveDataDir(["config.json"]), appClass) {
61
+ if (!appClass)
62
+ return undefined;
63
+ const v = loadUxSection(path)?.minConfidenceByAppClass;
64
+ if (v === undefined)
65
+ return undefined;
66
+ if (v === null || typeof v !== "object" || Array.isArray(v)) {
67
+ throw new UxConfigError(`${path}: ux.minConfidenceByAppClass must be an object keyed by app class`);
68
+ }
69
+ const rec = v;
70
+ const wanted = appClass.trim().toLowerCase();
71
+ const key = Object.keys(rec).find((k) => k.trim().toLowerCase() === wanted);
72
+ if (key === undefined)
73
+ return undefined;
74
+ const n = rec[key];
75
+ if (typeof n !== "number" || !Number.isFinite(n) || n < 0 || n > 1) {
76
+ throw new UxConfigError(`${path}: ux.minConfidenceByAppClass.${key} must be a number in [0,1]`);
77
+ }
78
+ return n;
79
+ }
80
+ /** `ux.show` — the quality grades a UX report shows (validated by `resolveQualityPolicy`). */
81
+ export function loadUxShow(path = resolveDataDir(["config.json"])) {
82
+ const v = loadUxSection(path)?.show;
83
+ if (v === undefined)
84
+ return undefined;
85
+ if (!Array.isArray(v) || !v.every((x) => typeof x === "string")) {
86
+ throw new UxConfigError(`${path}: ux.show must be an array of quality labels`);
87
+ }
88
+ return v;
89
+ }
90
+ /**
91
+ * `ux.maxFindingsPerPage` — the per-route finding cap (issue #198 interim, 0.2.0; validated by
92
+ * `resolveMaxFindingsPerRoute`).
93
+ */
94
+ export function loadUxMaxFindingsPerPage(path = resolveDataDir(["config.json"])) {
95
+ const v = loadUxSection(path)?.maxFindingsPerPage;
96
+ if (v === undefined)
97
+ return undefined;
98
+ if (typeof v !== "number" || !Number.isInteger(v) || v < 1) {
99
+ throw new UxConfigError(`${path}: ux.maxFindingsPerPage must be a positive integer`);
100
+ }
101
+ return v;
102
+ }
103
+ //# sourceMappingURL=ux-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux-config.js","sourceRoot":"","sources":["../src/ux-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,GAAG,aAAsB,CAAC;CACxC;AAED,4FAA4F;AAC5F,SAAS,aAAa,CAAC,IAAY;IACjC,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QAChG,MAAM,IAAI,aAAa,CAAC,eAAe,IAAI,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChG,CAAC;IAC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,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,aAAa,CAAC,GAAG,IAAI,8CAA8C,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,CAAa,CAAC;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAI,GAAG,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC;IAC7E,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAClD,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,aAAa,CAAC,GAAG,IAAI,oDAAoD,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type { Recording, TargetDescriptor } from "@jevitate/recording";
2
+ import { type Snapshot } from "@jevitate/explore";
3
+ import { type AppContext, type RunSignalCapture, type ScreenRef, type UxEvidence } from "@jevitate/ux";
4
+ export declare const DEFAULT_JUDGMENT_BUDGET = 40;
5
+ /** A live Snapshot (+ extracted page text) → one screen's UxEvidence. */
6
+ export declare function snapshotToEvidence(snap: Snapshot, visibleText: string, appContext: AppContext, job: string | undefined, history: readonly ScreenRef[]): UxEvidence;
7
+ /**
8
+ * Values the run itself typed or selected — a Recording's own `fill`/`select` steps whose value
9
+ * was NOT redacted (a secret field's value is always `{redacted:true}` and never surfaces here).
10
+ * #85 item 1: feeds the vocabulary/jargon tier (nielsen-2) so a quote/label that is really the
11
+ * user's own content (e.g. a piece title echoed back onto a card) is not mistaken for app copy.
12
+ */
13
+ export declare function extractTypedValues(recording: Recording): string[];
14
+ /**
15
+ * The minimal shape of a mission transcript entry `recordingToEvidence` needs — duck-typed against
16
+ * `@jevitate/explore`'s `TranscriptEntry` (this file already imports plenty from there; kept
17
+ * separate so `recordingToEvidence` itself stays decoupled from the live explore-control shape).
18
+ */
19
+ export interface MissionTranscriptEntryLike {
20
+ readonly step?: number;
21
+ readonly op?: string | null;
22
+ readonly target?: string | null;
23
+ readonly actOk: boolean;
24
+ readonly reason?: string;
25
+ readonly url: string;
26
+ readonly signature?: string;
27
+ readonly descriptor?: TargetDescriptor;
28
+ readonly value?: string;
29
+ readonly message?: string;
30
+ readonly reply?: {
31
+ readonly received?: boolean;
32
+ readonly text?: string;
33
+ };
34
+ readonly screenshot?: string;
35
+ }
36
+ /**
37
+ * #134: the run-signal capture a transcript ALONE supports (no visible text, no requests) — enough
38
+ * for the journey friction (retries, dead ends, waits, backtracks, abandoned fields) and repeated
39
+ * replies, NOT for the oracles that need requests or page text (they would misfire on the blanks).
40
+ */
41
+ export declare function captureFromTranscript(transcript: readonly MissionTranscriptEntryLike[]): RunSignalCapture;
42
+ /**
43
+ * A saved Recording → per-page UxEvidence. A Recording is deterministic and
44
+ * thin: it carries the CONTROLS the user touched (via each step's descriptor)
45
+ * and the page url, but NOT the full visible text or a11y geometry. So offline
46
+ * analysis is honestly partial — items needing `visibleText`/`a11yFacts` Skip,
47
+ * and coverage reports it. (The live mode carries the rich per-screen snapshot.)
48
+ *
49
+ * `missionTranscript` (#85 item 2, optional) adds blocked/disabled-target controls the Recording
50
+ * itself cannot carry, on whichever screen(s) share the blocked action's url — the same evidence a
51
+ * live usability run gets from its snapshot. `typedValues` (every screen's own #85 item 1 input)
52
+ * is always derived from the Recording, with or without a transcript.
53
+ */
54
+ export declare function recordingToEvidence(recording: Recording, appContext: AppContext, job?: string, missionTranscript?: readonly MissionTranscriptEntryLike[]): UxEvidence[];
@@ -0,0 +1,197 @@
1
+ export const DEFAULT_JUDGMENT_BUDGET = 40;
2
+ function emptyBehavior() {
3
+ return { noProgress: false, backtracks: 0, formReentry: 0, dwellMs: 0, errors: 0 };
4
+ }
5
+ /** explore's live `Control` → ux `Control` (same shape by design; drop `stability`). */
6
+ function toUxControl(c) {
7
+ return {
8
+ index: c.index,
9
+ role: c.role,
10
+ name: c.name,
11
+ tag: c.tag,
12
+ inputType: c.inputType,
13
+ enabled: c.enabled,
14
+ summary: c.summary,
15
+ descriptor: c.descriptor,
16
+ };
17
+ }
18
+ /** a11y facts computable from a live snapshot's controls (honest subset). */
19
+ function a11yFactsFromControls(controls) {
20
+ return {
21
+ controls: controls.map((c) => ({
22
+ controlRef: `control:${c.index}`,
23
+ accessibleName: c.name.trim().length > 0 ? c.name : null,
24
+ focusOrder: c.index,
25
+ targetSize: null,
26
+ contrastRatio: null,
27
+ })),
28
+ };
29
+ }
30
+ /** A live Snapshot (+ extracted page text) → one screen's UxEvidence. */
31
+ export function snapshotToEvidence(snap, visibleText, appContext, job, history) {
32
+ const controls = snap.controls.map(toUxControl);
33
+ return {
34
+ screenId: snap.signature,
35
+ url: snap.url,
36
+ controls,
37
+ visibleText,
38
+ appContext,
39
+ ...(job !== undefined ? { job } : {}),
40
+ history,
41
+ behavior: emptyBehavior(),
42
+ a11yFacts: a11yFactsFromControls(controls),
43
+ };
44
+ }
45
+ function descriptorSummary(d) {
46
+ const parts = [d.role, d.name ?? d.testId ?? d.text].filter((s) => !!s);
47
+ return parts.join(" ") || "control";
48
+ }
49
+ function stepTarget(step) {
50
+ if ("target" in step && step.target)
51
+ return step.target;
52
+ return undefined;
53
+ }
54
+ /**
55
+ * Values the run itself typed or selected — a Recording's own `fill`/`select` steps whose value
56
+ * was NOT redacted (a secret field's value is always `{redacted:true}` and never surfaces here).
57
+ * #85 item 1: feeds the vocabulary/jargon tier (nielsen-2) so a quote/label that is really the
58
+ * user's own content (e.g. a piece title echoed back onto a card) is not mistaken for app copy.
59
+ */
60
+ export function extractTypedValues(recording) {
61
+ const values = [];
62
+ for (const page of recording.pages) {
63
+ for (const rs of page.steps) {
64
+ const step = rs.step;
65
+ if ((step.kind === "fill" || step.kind === "select") && !("var" in step.value) && !step.value.redacted) {
66
+ values.push(step.value.value);
67
+ }
68
+ }
69
+ }
70
+ return [...new Set(values)];
71
+ }
72
+ /**
73
+ * #134: the run-signal capture a transcript ALONE supports (no visible text, no requests) — enough
74
+ * for the journey friction (retries, dead ends, waits, backtracks, abandoned fields) and repeated
75
+ * replies, NOT for the oracles that need requests or page text (they would misfire on the blanks).
76
+ */
77
+ export function captureFromTranscript(transcript) {
78
+ const steps = transcript.map((t, i) => ({
79
+ step: t.step ?? i + 1,
80
+ op: t.op ?? null,
81
+ target: t.target ?? null,
82
+ actOk: t.actOk,
83
+ url: t.url,
84
+ ...(t.descriptor === undefined ? {} : { descriptor: t.descriptor }),
85
+ ...(t.reason === undefined ? {} : { reason: t.reason }),
86
+ ...(t.value === undefined ? {} : { value: t.value }),
87
+ ...(t.message === undefined ? {} : { message: t.message }),
88
+ ...(t.reply?.text === undefined || t.reply.received === false ? {} : { reply: t.reply.text }),
89
+ }));
90
+ const screens = transcript.map((t, i) => ({
91
+ index: i,
92
+ step: t.step ?? i + 1,
93
+ at: 0,
94
+ url: t.url,
95
+ signature: t.signature ?? `step:${t.step ?? i + 1}`,
96
+ visibleText: "",
97
+ busy: false,
98
+ ...(t.screenshot === undefined ? {} : { screenshot: t.screenshot }),
99
+ }));
100
+ return { steps, requests: [], screens, endedAt: 0 };
101
+ }
102
+ const ACTIONABLE_OPS = new Set(["click", "type", "select"]);
103
+ /**
104
+ * Blocked/disabled-target controls derived from a mission transcript (#85 item 2), grouped by the
105
+ * page url they were observed on. A failed action is never recorded as a Recording step (see #81:
106
+ * `RunRecorder` records only successful actions), so this is the only source that gives offline
107
+ * `jevitate ux` the same evidence a LIVE usability run sees for free via `Control.enabled` on its
108
+ * snapshot — e.g. a "Pay" button that stayed disabled.
109
+ */
110
+ function blockedControlsByUrl(transcript, startIndex) {
111
+ const byUrl = new Map();
112
+ const seen = new Set();
113
+ let idx = startIndex;
114
+ for (const t of transcript) {
115
+ if (t.actOk || t.descriptor === undefined || !t.op || !ACTIONABLE_OPS.has(t.op))
116
+ continue;
117
+ const key = `${t.url}|${JSON.stringify(t.descriptor)}`;
118
+ if (seen.has(key))
119
+ continue;
120
+ seen.add(key);
121
+ const d = t.descriptor;
122
+ const list = byUrl.get(t.url) ?? [];
123
+ list.push({
124
+ index: idx++,
125
+ role: d.role ?? "",
126
+ name: d.name ?? d.testId ?? d.text ?? "",
127
+ tag: "",
128
+ inputType: null,
129
+ enabled: false,
130
+ summary: `${descriptorSummary(d)} (blocked: ${t.reason ?? "action did not succeed"})`,
131
+ descriptor: d,
132
+ });
133
+ byUrl.set(t.url, list);
134
+ }
135
+ return byUrl;
136
+ }
137
+ /**
138
+ * A saved Recording → per-page UxEvidence. A Recording is deterministic and
139
+ * thin: it carries the CONTROLS the user touched (via each step's descriptor)
140
+ * and the page url, but NOT the full visible text or a11y geometry. So offline
141
+ * analysis is honestly partial — items needing `visibleText`/`a11yFacts` Skip,
142
+ * and coverage reports it. (The live mode carries the rich per-screen snapshot.)
143
+ *
144
+ * `missionTranscript` (#85 item 2, optional) adds blocked/disabled-target controls the Recording
145
+ * itself cannot carry, on whichever screen(s) share the blocked action's url — the same evidence a
146
+ * live usability run gets from its snapshot. `typedValues` (every screen's own #85 item 1 input)
147
+ * is always derived from the Recording, with or without a transcript.
148
+ */
149
+ export function recordingToEvidence(recording, appContext, job, missionTranscript) {
150
+ const screens = [];
151
+ const history = [];
152
+ const typedValues = extractTypedValues(recording);
153
+ const blockedByUrl = blockedControlsByUrl(missionTranscript ?? [], recording.pages.reduce((n, p) => n + p.steps.length, 0) + 1000);
154
+ for (let i = 0; i < recording.pages.length; i++) {
155
+ const page = recording.pages[i];
156
+ const controls = [];
157
+ let idx = 0;
158
+ const seen = new Set();
159
+ for (const rs of page.steps) {
160
+ const d = stepTarget(rs.step);
161
+ if (!d)
162
+ continue;
163
+ const key = JSON.stringify(d);
164
+ if (seen.has(key))
165
+ continue;
166
+ seen.add(key);
167
+ controls.push({
168
+ index: idx++,
169
+ role: d.role ?? "",
170
+ name: d.name ?? d.testId ?? d.text ?? "",
171
+ tag: "",
172
+ inputType: null,
173
+ enabled: true,
174
+ summary: descriptorSummary(d),
175
+ descriptor: d,
176
+ });
177
+ }
178
+ for (const blocked of blockedByUrl.get(page.url) ?? [])
179
+ controls.push(blocked);
180
+ const screenId = `${page.url}#${i}`;
181
+ screens.push({
182
+ screenId,
183
+ url: page.url,
184
+ controls,
185
+ visibleText: "",
186
+ appContext,
187
+ ...(job !== undefined ? { job } : {}),
188
+ history: [...history],
189
+ behavior: emptyBehavior(),
190
+ a11yFacts: { controls: [] },
191
+ ...(typedValues.length > 0 ? { typedValues } : {}),
192
+ });
193
+ history.push({ screenId, url: page.url });
194
+ }
195
+ return screens;
196
+ }
197
+ //# sourceMappingURL=ux-evidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux-evidence.js","sourceRoot":"","sources":["../src/ux-evidence.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,SAAS,aAAa;IACpB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAC;AAC9F,CAAC;AAED,wFAAwF;AACxF,SAAS,WAAW,CAAC,CAAiB;IACpC,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,GAAG,EAAE,CAAC,CAAC,GAAG;QACV,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,OAAO,EAAE,CAAC,CAAC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rB,QAAQ,EAAE,aAAa,EAAE;YACzB,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC3B,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnD,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type ProductFacts } from "@jevitate/ux";
2
+ import { type LayoutDeps } from "./project-dir.js";
3
+ export declare const PRODUCT_FACTS_FILE = "product.json";
4
+ export interface LoadedProductFacts {
5
+ readonly facts?: ProductFacts;
6
+ /** The file read, when one was. */
7
+ readonly path?: string;
8
+ }
9
+ /** The facts file to read: the flag, else `<project>/.jevitate/product.json` when present. */
10
+ export declare function productFactsPath(flag: string | undefined, deps?: LayoutDeps): string | undefined;
11
+ /** Reads and validates the product facts. Throws `ProductFactsError` for a missing/invalid file. */
12
+ export declare function loadProductFacts(flag: string | undefined, deps?: LayoutDeps): Promise<LoadedProductFacts>;
13
+ /** The report caveat when no facts were available (prices and intended next steps went unchecked). */
14
+ export declare const NO_PRODUCT_FACTS_CAVEAT = "no product facts (.jevitate/product.json or --product): prices, trial lengths and each page's intended next step were not checked against the product's own facts (docs/ux-findings.md).";
@@ -0,0 +1,39 @@
1
+ // ux-product.ts — finding and loading the product facts file for the UX review (#198).
2
+ //
3
+ // `--product <file>` wins; otherwise the project's `.jevitate/product.json` (found by walking up
4
+ // from the working directory, like every other in-repo `.jevitate/` file) is used when it exists.
5
+ // An unreadable or invalid file is a typed refusal (`E_UX_PRODUCT_INPUT`, usage error) BEFORE any
6
+ // browser opens — never a silently ignored file.
7
+ import { existsSync, statSync } from "node:fs";
8
+ import { readFile } from "node:fs/promises";
9
+ import { join } from "node:path";
10
+ import { ProductFactsError, parseProductFactsText } from "@jevitate/ux";
11
+ import { findProjectDir } from "./project-dir.js";
12
+ export const PRODUCT_FACTS_FILE = "product.json";
13
+ /** The facts file to read: the flag, else `<project>/.jevitate/product.json` when present. */
14
+ export function productFactsPath(flag, deps = {}) {
15
+ if (flag !== undefined)
16
+ return flag;
17
+ const dir = findProjectDir(deps);
18
+ if (dir === null)
19
+ return undefined;
20
+ const p = join(dir, PRODUCT_FACTS_FILE);
21
+ return existsSync(p) && statSync(p).isFile() ? p : undefined;
22
+ }
23
+ /** Reads and validates the product facts. Throws `ProductFactsError` for a missing/invalid file. */
24
+ export async function loadProductFacts(flag, deps = {}) {
25
+ const path = productFactsPath(flag, deps);
26
+ if (path === undefined)
27
+ return {};
28
+ let text;
29
+ try {
30
+ text = await readFile(path, "utf8");
31
+ }
32
+ catch (err) {
33
+ throw new ProductFactsError(path, [`cannot read the file: ${err instanceof Error ? err.message : String(err)}`]);
34
+ }
35
+ return { facts: parseProductFactsText(text, path), path };
36
+ }
37
+ /** The report caveat when no facts were available (prices and intended next steps went unchecked). */
38
+ export const NO_PRODUCT_FACTS_CAVEAT = "no product facts (.jevitate/product.json or --product): prices, trial lengths and each page's intended next step were not checked against the product's own facts (docs/ux-findings.md).";
39
+ //# sourceMappingURL=ux-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux-product.js","sourceRoot":"","sources":["../src/ux-product.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,EAAE;AACF,iGAAiG;AACjG,kGAAkG;AAClG,kGAAkG;AAClG,iDAAiD;AACjD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAC3F,OAAO,EA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C,MAAM,uBAAuB,GAClC,0LAA0L,CAAC"}
@@ -0,0 +1,116 @@
1
+ import type { JudgmentPort, GenerationPort, UsageTracker, UsageCounts } from "@jevitate/ai-core";
2
+ import type { Recording } from "@jevitate/recording";
3
+ import { type AppContext, type JourneyOutcome, type SignalOptions, type UxEvidenceFile, type UxReport } from "@jevitate/ux";
4
+ import { type MissionTranscriptEntryLike } from "./ux-evidence.js";
5
+ export interface RunUxReviewOptions {
6
+ readonly recording: Recording;
7
+ readonly appContext: AppContext;
8
+ readonly judge: JudgmentPort;
9
+ /** Structured-output specifics (observation / implicated controls / fix) for flagged items. */
10
+ readonly gen: GenerationPort;
11
+ /**
12
+ * Usage accounting (#100): when supplied, its snapshot (judgments/generations/tokens/`usd`) lands
13
+ * in the result as `usage`. The CLI builds one per invocation and hands it to `judge`/`gen`.
14
+ */
15
+ readonly usage?: UsageTracker;
16
+ /**
17
+ * Report cutoff; findings below it are suppressed (counted in `report.suppressed`). Precedence:
18
+ * this (CLI `--min-confidence`) > `JEVITATE_UX_MIN_CONFIDENCE` > config `ux.minConfidence`
19
+ * (`~/.jevitate/config.json`) > `DEFAULT_MIN_CONFIDENCE`.
20
+ */
21
+ readonly minConfidence?: number | string;
22
+ /**
23
+ * Quality grades to show, e.g. "actionable,relevant-minor". Precedence: this (CLI `--show`) >
24
+ * `JEVITATE_UX_SHOW` > config `ux.show` > every grade (#133: the uncalibrated grader labels, it does not filter).
25
+ */
26
+ readonly show?: string;
27
+ /**
28
+ * Cap on findings per route (issue #198 interim, 0.2.0). Precedence: this (CLI
29
+ * `--max-findings-per-page`) > `JEVITATE_UX_MAX_FINDINGS_PER_PAGE` > config
30
+ * `ux.maxFindingsPerPage` > `DEFAULT_MAX_FINDINGS_PER_ROUTE` (5).
31
+ */
32
+ readonly maxFindingsPerRoute?: number | string;
33
+ readonly env?: Readonly<Record<string, string | undefined>>;
34
+ /** Path of the config file holding `ux.minConfidence`. Default `~/.jevitate/config.json`. */
35
+ readonly configPath?: string;
36
+ readonly secrets?: readonly string[];
37
+ /** Local file the `upload` op attaches (CLI `--fixture`); validated before any browser opens. */
38
+ readonly fixture?: string;
39
+ readonly judgmentBudget?: number;
40
+ /** Where to write the report. Default `.jevitate/logs/<date>` (project, else `~/.jevitate`). */
41
+ readonly outDir?: string;
42
+ readonly nowIso?: () => string;
43
+ /**
44
+ * The source run's mission transcript (#85 item 2) — from `--result`'s `<recording>.result.json`
45
+ * (`result.transcript`), or the sibling `<recording>.transcript.json` directly. Gives offline
46
+ * analysis the same blocked/disabled-target evidence a live usability run sees. Absent, the
47
+ * report says so (`report.evidenceCaveats`) rather than silently seeing less.
48
+ */
49
+ readonly missionTranscript?: readonly MissionTranscriptEntryLike[];
50
+ /** Why `missionTranscript` is absent (e.g. no `--result` given, or the file could not be read) — becomes a report caveat. */
51
+ readonly missionTranscriptUnavailable?: string;
52
+ /** The source run's end state (a mission result's `outcome`), for the goal-not-reached friction (#132). */
53
+ readonly missionOutcome?: JourneyOutcome;
54
+ /**
55
+ * #134: the live usability run's evidence sidecar (`<stamp>.evidence.json`): every screen as the
56
+ * live analyzer saw it (redacted) and the run-signal capture. With it, offline review reproduces
57
+ * the live run's rubric AND signal findings; without it, the report says what it could not see.
58
+ */
59
+ readonly evidenceFile?: UxEvidenceFile;
60
+ /** Why no evidence sidecar was used (not found next to the Recording, or unreadable) — a report caveat. */
61
+ readonly evidenceUnavailable?: string;
62
+ /** Tuning of the run-signal oracles (#96/#131). */
63
+ readonly signals?: SignalOptions;
64
+ /** #198 `--product <file>`: product facts (default `.jevitate/product.json` in the project). */
65
+ readonly product?: string;
66
+ /** #198 `--polish`: polish each verified finding's recommendation with one generation call (opt-in). */
67
+ readonly polish?: boolean;
68
+ }
69
+ export interface RunUxReviewResult {
70
+ readonly report: UxReport;
71
+ readonly reportPath: string;
72
+ /** Judgment/generation call counts and tokens for this run (#100); present only when `opts.usage` was supplied. */
73
+ readonly usage?: UsageCounts;
74
+ }
75
+ /**
76
+ * Offline UX review. FAIL-FAST: an analyzer `failed` outcome throws
77
+ * `UxAnalysisFailedError` (the CLI maps it to a non-zero fail envelope) — never
78
+ * a fabricated "clean" report.
79
+ */
80
+ export declare function runUxReview(opts: RunUxReviewOptions): Promise<RunUxReviewResult>;
81
+ /** #134: the artifacts a run writes next to its Recording (`<stem>.recording.json`). */
82
+ export interface RecordingSidecars {
83
+ /** `<stem>.evidence.json` — the live usability run's evidence sidecar. */
84
+ readonly evidencePath?: string;
85
+ /** `<stem>.transcript.json` — the decision transcript (each step's screenshot). */
86
+ readonly transcriptPath?: string;
87
+ /** `<stem>.result.json` — a mission result (explore/adversarial), carrying transcript + outcome. */
88
+ readonly resultPath?: string;
89
+ /** `<stem>.screens/` — the per-step screenshots. */
90
+ readonly screenshotDir?: string;
91
+ }
92
+ /** Finds the sidecars that exist next to `recordingPath` (only `<stem>.recording.json` has a stem). */
93
+ export declare function discoverRecordingSidecars(recordingPath: string): RecordingSidecars;
94
+ /** What the discovered (or given) sidecars supply to `runUxReview`, and why anything is missing. */
95
+ export interface LoadedSidecars {
96
+ readonly evidenceFile?: UxEvidenceFile;
97
+ readonly evidenceUnavailable?: string;
98
+ readonly missionTranscript?: MissionTranscriptEntryLike[];
99
+ readonly missionTranscriptUnavailable?: string;
100
+ readonly missionOutcome?: JourneyOutcome;
101
+ }
102
+ /**
103
+ * Reads the evidence sidecar and the transcript/result (explicit paths win over discovered ones).
104
+ * Never throws: an unreadable file becomes the matching `…Unavailable` caveat.
105
+ */
106
+ export declare function loadRecordingSidecars(paths: {
107
+ readonly evidencePath?: string;
108
+ readonly resultPath?: string;
109
+ readonly transcriptPath?: string;
110
+ }): Promise<LoadedSidecars>;
111
+ export declare class UxAnalysisFailedError extends Error {
112
+ readonly screenId?: string | undefined;
113
+ readonly rubricItemId?: string | undefined;
114
+ readonly code: "E_UX_ANALYSIS";
115
+ constructor(reason: string, screenId?: string | undefined, rubricItemId?: string | undefined);
116
+ }