llm-testrunner-components 1.0.6 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/README.md +101 -100
  2. package/dist/cjs/app-chips_5.cjs.entry.js +158 -0
  3. package/dist/cjs/app-chips_5.cjs.entry.js.map +1 -0
  4. package/dist/cjs/app-globals-Chb-oJtg.js +34 -0
  5. package/dist/cjs/app-globals-Chb-oJtg.js.map +1 -0
  6. package/dist/cjs/index-By1scwl6.js +25542 -0
  7. package/dist/cjs/index-By1scwl6.js.map +1 -0
  8. package/dist/cjs/index-CgmLNwZO.js +21460 -0
  9. package/dist/cjs/index-CgmLNwZO.js.map +1 -0
  10. package/dist/cjs/index.cjs.js +5 -483
  11. package/dist/cjs/index.cjs.js.map +1 -1
  12. package/dist/cjs/llm-testrunner.cjs.js +6 -4
  13. package/dist/cjs/llm-testrunner.cjs.js.map +1 -1
  14. package/dist/cjs/loader.cjs.js +5 -3
  15. package/dist/collection/collection-manifest.json +8 -3
  16. package/dist/collection/components/error-message/error-message.css +34 -0
  17. package/dist/collection/components/error-message/error-message.js +2 -2
  18. package/dist/collection/components/error-message/error-message.js.map +1 -1
  19. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.css +60 -0
  20. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.js +18 -0
  21. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.js.map +1 -0
  22. package/dist/collection/components/llm-test-runner/llm-test-runner.css +17 -657
  23. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js +253 -0
  24. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js.map +1 -0
  25. package/dist/collection/components/llm-test-runner/llm-test-runner.js +191 -200
  26. package/dist/collection/components/llm-test-runner/llm-test-runner.js.map +1 -1
  27. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.css +28 -0
  28. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.js +6 -0
  29. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.js.map +1 -0
  30. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.css +67 -0
  31. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.js +5 -0
  32. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.js.map +1 -0
  33. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.css +42 -0
  34. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js +39 -0
  35. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js.map +1 -0
  36. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.css +39 -0
  37. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js +7 -0
  38. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js.map +1 -0
  39. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.css +51 -0
  40. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js +5 -0
  41. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js.map +1 -0
  42. package/dist/collection/global/env.js +3 -1
  43. package/dist/collection/global/env.js.map +1 -1
  44. package/dist/collection/index.js.map +1 -1
  45. package/dist/collection/lib/evaluation/constants.js +14 -0
  46. package/dist/collection/lib/evaluation/constants.js.map +1 -0
  47. package/dist/collection/lib/evaluation/evaluation-engine.js +45 -45
  48. package/dist/collection/lib/evaluation/evaluation-engine.js.map +1 -1
  49. package/dist/collection/lib/evaluation/evaluation-service.js +33 -0
  50. package/dist/collection/lib/evaluation/evaluation-service.js.map +1 -0
  51. package/dist/collection/lib/evaluation/evaluators/bleu/bleu-evaluator.js +116 -0
  52. package/dist/collection/lib/evaluation/evaluators/bleu/bleu-evaluator.js.map +1 -0
  53. package/dist/collection/lib/evaluation/evaluators/bleu/tests/bleu.test.js +352 -0
  54. package/dist/collection/lib/evaluation/evaluators/bleu/tests/bleu.test.js.map +1 -0
  55. package/dist/collection/lib/evaluation/evaluators/exact/exact.js +44 -0
  56. package/dist/collection/lib/evaluation/evaluators/exact/exact.js.map +1 -0
  57. package/dist/collection/lib/evaluation/evaluators/rouge1-evaluator.js +88 -0
  58. package/dist/collection/lib/evaluation/evaluators/rouge1-evaluator.js.map +1 -0
  59. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.js +82 -0
  60. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.js.map +1 -0
  61. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.test.js +326 -0
  62. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.test.js.map +1 -0
  63. package/dist/collection/lib/evaluation/evaluators/semantic/SemanticEvaluator.js +69 -0
  64. package/dist/collection/lib/evaluation/evaluators/semantic/SemanticEvaluator.js.map +1 -0
  65. package/dist/collection/lib/evaluation/evaluators/semantic/evaluate-keywords.js +56 -0
  66. package/dist/collection/lib/evaluation/evaluators/semantic/evaluate-keywords.js.map +1 -0
  67. package/dist/collection/lib/evaluation/evaluators/semantic/index.js +7 -0
  68. package/dist/collection/lib/evaluation/evaluators/semantic/index.js.map +1 -0
  69. package/dist/collection/lib/evaluation/evaluators/semantic/model-loader.js +19 -0
  70. package/dist/collection/lib/evaluation/evaluators/semantic/model-loader.js.map +1 -0
  71. package/dist/collection/lib/evaluation/evaluators/semantic/similarity-utils.js +16 -0
  72. package/dist/collection/lib/evaluation/evaluators/semantic/similarity-utils.js.map +1 -0
  73. package/dist/collection/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.js +65 -0
  74. package/dist/collection/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.js.map +1 -0
  75. package/dist/collection/lib/evaluation/evaluators/semantic/text-utils.js +5 -0
  76. package/dist/collection/lib/evaluation/evaluators/semantic/text-utils.js.map +1 -0
  77. package/dist/collection/lib/evaluation/index.js.map +1 -1
  78. package/dist/collection/lib/evaluation/rouge1-evaluator.test.js +117 -0
  79. package/dist/collection/lib/evaluation/rouge1-evaluator.test.js.map +1 -0
  80. package/dist/collection/lib/evaluation/types.js.map +1 -1
  81. package/dist/collection/lib/file/file-download.js +18 -0
  82. package/dist/collection/lib/file/file-download.js.map +1 -0
  83. package/dist/collection/lib/file/file-reader.js +14 -0
  84. package/dist/collection/lib/file/file-reader.js.map +1 -0
  85. package/dist/collection/lib/form/components/app-chips.css +97 -0
  86. package/dist/collection/lib/form/components/app-chips.js +155 -0
  87. package/dist/collection/lib/form/components/app-chips.js.map +1 -0
  88. package/dist/collection/lib/form/components/app-select.css +28 -0
  89. package/dist/collection/lib/form/components/app-select.js +101 -0
  90. package/dist/collection/lib/form/components/app-select.js.map +1 -0
  91. package/dist/collection/lib/form/components/app-textarea.css +38 -0
  92. package/dist/collection/lib/form/components/app-textarea.js +126 -0
  93. package/dist/collection/lib/form/components/app-textarea.js.map +1 -0
  94. package/dist/collection/lib/form/form-builder.js +171 -0
  95. package/dist/collection/lib/form/form-builder.js.map +1 -0
  96. package/dist/collection/lib/form/schema/base-input-field-config.js +2 -0
  97. package/dist/collection/lib/form/schema/base-input-field-config.js.map +1 -0
  98. package/dist/collection/lib/form/schema/form-control-config.js +2 -0
  99. package/dist/collection/lib/form/schema/form-control-config.js.map +1 -0
  100. package/dist/collection/lib/form/schema/index.js +8 -0
  101. package/dist/collection/lib/form/schema/index.js.map +1 -0
  102. package/dist/collection/lib/import-export/test-results-csv.js +65 -0
  103. package/dist/collection/lib/import-export/test-results-csv.js.map +1 -0
  104. package/dist/collection/lib/import-export/test-suite-exporter.js +15 -0
  105. package/dist/collection/lib/import-export/test-suite-exporter.js.map +1 -0
  106. package/dist/collection/lib/import-export/test-suite-importer.js +44 -0
  107. package/dist/collection/lib/import-export/test-suite-importer.js.map +1 -0
  108. package/dist/collection/lib/rate-limited-fetcher/rate-limited-fetcher.js +6 -6
  109. package/dist/collection/lib/rate-limited-fetcher/rate-limited-fetcher.js.map +1 -1
  110. package/dist/collection/lib/test-cases/test-case-factory.js +56 -0
  111. package/dist/collection/lib/test-cases/test-case-factory.js.map +1 -0
  112. package/dist/collection/lib/test-cases/test-case-mutations.js +16 -0
  113. package/dist/collection/lib/test-cases/test-case-mutations.js.map +1 -0
  114. package/dist/collection/lib/ui/button/button.css +113 -0
  115. package/dist/collection/lib/ui/button/button.js +21 -0
  116. package/dist/collection/lib/ui/button/button.js.map +1 -0
  117. package/dist/collection/lib/ui/button/index.js +2 -0
  118. package/dist/collection/lib/ui/button/index.js.map +1 -0
  119. package/dist/collection/lib/ui/icon-button/icon-button.css +77 -0
  120. package/dist/collection/lib/ui/icon-button/icon-button.js +19 -0
  121. package/dist/collection/lib/ui/icon-button/icon-button.js.map +1 -0
  122. package/dist/collection/lib/ui/icon-button/index.js +2 -0
  123. package/dist/collection/lib/ui/icon-button/index.js.map +1 -0
  124. package/dist/collection/services/adapters.js +2 -0
  125. package/dist/collection/services/adapters.js.map +1 -0
  126. package/dist/collection/services/models/gemini.js +17 -0
  127. package/dist/collection/services/models/gemini.js.map +1 -0
  128. package/dist/collection/styles/tokens.css +180 -0
  129. package/dist/collection/types/evaluation.js +2 -0
  130. package/dist/collection/types/evaluation.js.map +1 -0
  131. package/dist/collection/types/llm-test-runner.js +2 -0
  132. package/dist/collection/types/llm-test-runner.js.map +1 -0
  133. package/dist/components/app-chips.d.ts +11 -0
  134. package/dist/components/app-chips.js +2 -0
  135. package/dist/components/app-chips.js.map +1 -0
  136. package/dist/components/app-select.d.ts +11 -0
  137. package/dist/components/app-select.js +2 -0
  138. package/dist/components/app-select.js.map +1 -0
  139. package/dist/components/app-textarea.d.ts +11 -0
  140. package/dist/components/app-textarea.js +2 -0
  141. package/dist/components/app-textarea.js.map +1 -0
  142. package/dist/components/form-builder.d.ts +11 -0
  143. package/dist/components/form-builder.js +2 -0
  144. package/dist/components/form-builder.js.map +1 -0
  145. package/dist/components/index.d.ts +2 -0
  146. package/dist/components/index.js +1 -13
  147. package/dist/components/index.js.map +1 -1
  148. package/dist/components/llm-test-runner.js +1 -8
  149. package/dist/components/llm-test-runner.js.map +1 -1
  150. package/dist/components/p--2rdv_J9.js +2 -0
  151. package/dist/components/p--2rdv_J9.js.map +1 -0
  152. package/dist/components/p-B7J48VNq.js +2 -0
  153. package/dist/components/p-B7J48VNq.js.map +1 -0
  154. package/dist/components/p-BCB1rjPS.js +7 -0
  155. package/dist/components/p-BCB1rjPS.js.map +1 -0
  156. package/dist/components/p-BQhb2H_a.js +2 -0
  157. package/dist/components/p-BQhb2H_a.js.map +1 -0
  158. package/dist/components/p-D9BrlHdP.js +297 -0
  159. package/dist/components/p-D9BrlHdP.js.map +1 -0
  160. package/dist/components/p-DtCkZ1g2.js +2 -0
  161. package/dist/components/p-DtCkZ1g2.js.map +1 -0
  162. package/dist/esm/app-chips_5.entry.js +153 -0
  163. package/dist/esm/app-chips_5.entry.js.map +1 -0
  164. package/dist/esm/app-globals-DbR5vV7d.js +32 -0
  165. package/dist/esm/app-globals-DbR5vV7d.js.map +1 -0
  166. package/dist/esm/index-Bvg6mh1M.js +25539 -0
  167. package/dist/esm/index-Bvg6mh1M.js.map +1 -0
  168. package/dist/esm/index-DxzhGhec.js +21450 -0
  169. package/dist/esm/index-DxzhGhec.js.map +1 -0
  170. package/dist/esm/index.js +4 -486
  171. package/dist/esm/index.js.map +1 -1
  172. package/dist/esm/llm-testrunner.js +7 -5
  173. package/dist/esm/llm-testrunner.js.map +1 -1
  174. package/dist/esm/loader.js +6 -4
  175. package/dist/llm-testrunner/index.esm.js +1 -1
  176. package/dist/llm-testrunner/index.esm.js.map +1 -1
  177. package/dist/llm-testrunner/llm-testrunner.esm.js +1 -1
  178. package/dist/llm-testrunner/llm-testrunner.esm.js.map +1 -1
  179. package/dist/llm-testrunner/p-3f04b0fb.entry.js +2 -0
  180. package/dist/llm-testrunner/p-3f04b0fb.entry.js.map +1 -0
  181. package/dist/llm-testrunner/p-DFds8y01.js +7 -0
  182. package/dist/llm-testrunner/p-DFds8y01.js.map +1 -0
  183. package/dist/llm-testrunner/p-DxzhGhec.js +298 -0
  184. package/dist/llm-testrunner/p-DxzhGhec.js.map +1 -0
  185. package/dist/llm-testrunner/p-GQwFOmwJ.js +2 -0
  186. package/dist/llm-testrunner/p-GQwFOmwJ.js.map +1 -0
  187. package/dist/react/components.d.ts +32 -2
  188. package/dist/react/components.d.ts.map +1 -1
  189. package/dist/react/components.js +44 -2
  190. package/dist/types/components/llm-test-runner/header/llm-test-runner-header.d.ts +14 -0
  191. package/dist/types/components/llm-test-runner/llm-test-runner.d.ts +13 -29
  192. package/dist/types/components/llm-test-runner/llm-test-runner.import-export.test.d.ts +1 -0
  193. package/dist/types/components/llm-test-runner/test-cases/actions/row-actions.d.ts +8 -0
  194. package/dist/types/components/llm-test-runner/test-cases/evaluation/evaluation-summary.d.ts +7 -0
  195. package/dist/types/components/llm-test-runner/test-cases/llm-test-case-row.d.ts +25 -0
  196. package/dist/types/components/llm-test-runner/test-cases/llm-test-cases.d.ts +26 -0
  197. package/dist/types/components/llm-test-runner/test-cases/output/response-output.d.ts +6 -0
  198. package/dist/types/components.d.ts +199 -4
  199. package/dist/types/global/env.d.ts +2 -0
  200. package/dist/types/index.d.ts +1 -1
  201. package/dist/types/lib/evaluation/constants.d.ts +11 -0
  202. package/dist/types/lib/evaluation/evaluation-engine.d.ts +0 -4
  203. package/dist/types/lib/evaluation/evaluation-service.d.ts +15 -0
  204. package/dist/types/lib/evaluation/evaluators/bleu/bleu-evaluator.d.ts +18 -0
  205. package/dist/types/lib/evaluation/evaluators/bleu/tests/bleu.test.d.ts +1 -0
  206. package/dist/types/lib/evaluation/evaluators/exact/exact.d.ts +2 -0
  207. package/dist/types/lib/evaluation/evaluators/rouge1-evaluator.d.ts +17 -0
  208. package/dist/types/lib/evaluation/evaluators/rougeL-evaluator.d.ts +2 -0
  209. package/dist/types/lib/evaluation/evaluators/rougeL-evaluator.test.d.ts +1 -0
  210. package/dist/types/lib/evaluation/evaluators/semantic/SemanticEvaluator.d.ts +6 -0
  211. package/dist/types/lib/evaluation/evaluators/semantic/evaluate-keywords.d.ts +7 -0
  212. package/dist/types/lib/evaluation/evaluators/semantic/index.d.ts +2 -0
  213. package/dist/types/lib/evaluation/evaluators/semantic/model-loader.d.ts +1 -0
  214. package/dist/types/lib/evaluation/evaluators/semantic/similarity-utils.d.ts +1 -0
  215. package/dist/types/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.d.ts +1 -0
  216. package/dist/types/lib/evaluation/evaluators/semantic/text-utils.d.ts +1 -0
  217. package/dist/types/lib/evaluation/index.d.ts +2 -2
  218. package/dist/types/lib/evaluation/rouge1-evaluator.test.d.ts +1 -0
  219. package/dist/types/lib/evaluation/types.d.ts +19 -7
  220. package/dist/types/lib/file/file-download.d.ts +7 -0
  221. package/dist/types/lib/file/file-reader.d.ts +6 -0
  222. package/dist/types/lib/form/components/app-chips.d.ts +20 -0
  223. package/dist/types/lib/form/components/app-select.d.ts +7 -0
  224. package/dist/types/lib/form/components/app-textarea.d.ts +14 -0
  225. package/dist/types/lib/form/form-builder.d.ts +24 -0
  226. package/dist/types/lib/form/schema/base-input-field-config.d.ts +37 -0
  227. package/dist/types/lib/form/schema/form-control-config.d.ts +13 -0
  228. package/dist/types/lib/form/schema/index.d.ts +9 -0
  229. package/dist/types/lib/import-export/test-results-csv.d.ts +13 -0
  230. package/dist/types/lib/import-export/test-suite-exporter.d.ts +16 -0
  231. package/dist/types/lib/import-export/test-suite-importer.d.ts +12 -0
  232. package/dist/types/lib/rate-limited-fetcher/rate-limited-fetcher.d.ts +1 -1
  233. package/dist/types/lib/test-cases/test-case-factory.d.ts +12 -0
  234. package/dist/types/lib/test-cases/test-case-mutations.d.ts +9 -0
  235. package/dist/types/lib/ui/button/button.d.ts +13 -0
  236. package/dist/types/lib/ui/button/index.d.ts +2 -0
  237. package/dist/types/lib/ui/icon-button/icon-button.d.ts +11 -0
  238. package/dist/types/lib/ui/icon-button/index.d.ts +2 -0
  239. package/dist/types/services/adapters.d.ts +3 -0
  240. package/dist/types/services/models/gemini.d.ts +11 -0
  241. package/dist/types/stencil-public-runtime.d.ts +110 -6
  242. package/dist/types/types/evaluation.d.ts +9 -0
  243. package/dist/types/types/llm-test-runner.d.ts +22 -0
  244. package/package.json +30 -6
  245. package/dist/cjs/app-globals-CbbEbofA.js +0 -14
  246. package/dist/cjs/app-globals-CbbEbofA.js.map +0 -1
  247. package/dist/cjs/index-D-FySkoV.js +0 -1470
  248. package/dist/cjs/index-D-FySkoV.js.map +0 -1
  249. package/dist/cjs/llm-test-runner.cjs.entry.js +0 -9
  250. package/dist/cjs/llm-test-runner.entry.cjs.js.map +0 -1
  251. package/dist/components/p-CYUbsbxt.js +0 -1770
  252. package/dist/components/p-CYUbsbxt.js.map +0 -1
  253. package/dist/esm/app-globals-BOQOUavG.js +0 -12
  254. package/dist/esm/app-globals-BOQOUavG.js.map +0 -1
  255. package/dist/esm/index-cncubhtM.js +0 -1463
  256. package/dist/esm/index-cncubhtM.js.map +0 -1
  257. package/dist/esm/llm-test-runner.entry.js +0 -3
  258. package/dist/esm/llm-test-runner.entry.js.map +0 -1
  259. package/dist/llm-testrunner/llm-test-runner.entry.esm.js.map +0 -1
  260. package/dist/llm-testrunner/loader.esm.js.map +0 -1
  261. package/dist/llm-testrunner/p-BOQOUavG.js +0 -2
  262. package/dist/llm-testrunner/p-BOQOUavG.js.map +0 -1
  263. package/dist/llm-testrunner/p-cncubhtM.js +0 -3
  264. package/dist/llm-testrunner/p-cncubhtM.js.map +0 -1
  265. package/dist/llm-testrunner/p-f68fd660.entry.js +0 -2
  266. package/dist/llm-testrunner/p-f68fd660.entry.js.map +0 -1
@@ -0,0 +1,6 @@
1
+ import { EvaluationResult, EvaluationRequest } from '../../types';
2
+ export declare class SemanticEvaluator {
3
+ private static extractor;
4
+ initialize(): Promise<void>;
5
+ performEvaluation(request: EvaluationRequest): Promise<EvaluationResult>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { KeywordMatch } from '../../types';
2
+ import { FeatureExtractionPipeline } from '@xenova/transformers';
3
+ /**
4
+ * Evaluates whether each keyword is semantically present in the response text.
5
+ * Uses embeddings and cosine similarity instead of direct string matching.
6
+ */
7
+ export declare function evaluateKeywordsSemantically(extractor: FeatureExtractionPipeline, response: string, keywords: string[], threshold: number): Promise<KeywordMatch[]>;
@@ -0,0 +1,2 @@
1
+ import { EvaluationRequest, EvaluationResult } from '../../types';
2
+ export declare function performSemanticEvaluation(request: EvaluationRequest): Promise<EvaluationResult>;
@@ -0,0 +1 @@
1
+ export declare function loadSemanticModel(): Promise<import("@xenova/transformers").FeatureExtractionPipeline>;
@@ -0,0 +1 @@
1
+ export declare function cosineSimilarity(vecA: number[], vecB: number[]): number;
@@ -0,0 +1 @@
1
+ export declare function splitIntoWords(text: string): string[];
@@ -1,5 +1,5 @@
1
1
  import { LLMEvaluationEngine } from './evaluation-engine';
2
- import type { EvaluationRequest, EvaluationResult, KeywordMatch, SourceLinkMatch, EvaluationCallback } from './types';
2
+ import type { EvaluationRequest, EvaluationResult, KeywordMatch, EvaluationCallback } from './types';
3
3
  export { LLMEvaluationEngine };
4
- export type { EvaluationRequest, EvaluationResult, KeywordMatch, SourceLinkMatch, EvaluationCallback };
4
+ export type { EvaluationRequest, EvaluationResult, KeywordMatch, EvaluationCallback, };
5
5
  export declare function evaluateLLMResponse(request: EvaluationRequest, callback: EvaluationCallback): Promise<void>;
@@ -1,23 +1,35 @@
1
+ import { EvaluationParameters, EvaluationApproachResult } from '../../types/evaluation';
1
2
  export interface EvaluationRequest {
2
3
  testCaseId: string;
3
4
  question: string;
4
- expectedKeywords: string[];
5
- expectedSourceLinks: string[];
5
+ expectedOutcome: string;
6
6
  actualResponse: string;
7
+ evaluationParameters: EvaluationParameters;
7
8
  }
8
9
  export interface EvaluationResult {
9
10
  testCaseId: string;
10
11
  passed: boolean;
11
12
  keywordMatches: KeywordMatch[];
12
- sourceLinkMatches: SourceLinkMatch[];
13
13
  timestamp?: string;
14
+ evaluationParameters: EvaluationParameters;
15
+ evaluationApproachResult: EvaluationApproachResult;
14
16
  }
15
17
  export interface KeywordMatch {
16
18
  keyword: string;
17
19
  found: boolean;
18
- }
19
- export interface SourceLinkMatch {
20
- link: string;
21
- found: boolean;
20
+ evaluationApproachResult: EvaluationApproachResult;
22
21
  }
23
22
  export type EvaluationCallback = (result: EvaluationResult) => void;
23
+ export interface RougeKeywordDetails {
24
+ rouge1: number;
25
+ rougeL: number;
26
+ scoreUsed: string;
27
+ approach: string;
28
+ }
29
+ export interface Rouge1OverallDetails {
30
+ keywordsPassed: number;
31
+ totalKeywords: number;
32
+ passRate: string;
33
+ thresholdUsed: number;
34
+ approach: string;
35
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Downloads a file to the user's device
3
+ * @param content - The content to download
4
+ * @param filename - The name of the file to download
5
+ * @param mimeType - The MIME type of the file
6
+ */
7
+ export declare function downloadFile(content: string, filename: string, mimeType: string): void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reads a file asynchronously and returns its content as a string
3
+ * @param file - The File object to read
4
+ * @returns Promise that resolves with the file content as a string
5
+ */
6
+ export declare function readFileAsync(file: File): Promise<string>;
@@ -0,0 +1,20 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ChipsConfig } from '../schema';
3
+ export declare class AppChips {
4
+ value: string[];
5
+ config: ChipsConfig;
6
+ testCaseId: string;
7
+ addChip: EventEmitter<{
8
+ key: string;
9
+ value: string;
10
+ testCaseId: string;
11
+ }>;
12
+ removeChip: EventEmitter<{
13
+ key: string;
14
+ index: number;
15
+ testCaseId: string;
16
+ }>;
17
+ private emitAddChip;
18
+ private emitRemoveChip;
19
+ render(): any;
20
+ }
@@ -0,0 +1,7 @@
1
+ import { SelectConfig } from '../schema';
2
+ export declare class AppSelect {
3
+ value: any;
4
+ onChange: (value: any) => void;
5
+ config: SelectConfig;
6
+ render(): any;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { TextAreaConfig } from '../schema';
3
+ export declare class AppTextarea {
4
+ testCaseId: string;
5
+ value: string;
6
+ config: TextAreaConfig;
7
+ valueChange: EventEmitter<{
8
+ key: string;
9
+ value: string;
10
+ testCaseId: string;
11
+ }>;
12
+ private handleChange;
13
+ render(): any;
14
+ }
@@ -0,0 +1,24 @@
1
+ import { FieldConfig } from './schema';
2
+ import { TestCase } from '../../types/llm-test-runner';
3
+ export declare class FormBuilder {
4
+ fields: FieldConfig[];
5
+ onUpdateApproach: (testCase: TestCase, approach: any) => void;
6
+ testCase: TestCase;
7
+ handleTestCaseChange: (e: CustomEvent<{
8
+ testCaseId: string;
9
+ key: string;
10
+ value: string;
11
+ }>) => void;
12
+ addChip: (e: CustomEvent<{
13
+ testCaseId: string;
14
+ key: string;
15
+ value: string;
16
+ }>) => void;
17
+ removeChip: (e: CustomEvent<{
18
+ testCaseId: string;
19
+ key: string;
20
+ index: number;
21
+ }>) => void;
22
+ renderField(field: FieldConfig): any;
23
+ render(): any;
24
+ }
@@ -0,0 +1,37 @@
1
+ import { FormFieldType } from '.';
2
+ /**
3
+ * - minLength / maxLength: character limits
4
+ * - min / max: numeric or date boundaries
5
+ * - step: allowed increment between numeric values (e.g., 0.5 → 0, 0.5, 1.0...)
6
+ * - custom: custom validator returning error message or null
7
+ */
8
+ export interface InputFieldValidation {
9
+ required?: boolean | string;
10
+ minLength?: number;
11
+ maxLength?: number;
12
+ pattern?: RegExp | string;
13
+ min?: number | string | Date;
14
+ max?: number | string | Date;
15
+ step?: number;
16
+ custom?: (value: any, allValues?: Record<string, any>) => string | null;
17
+ }
18
+ /**
19
+ * - helpText:Field Support text
20
+ */
21
+ export interface BaseInputFieldConfig {
22
+ name: string;
23
+ fieldType: FormFieldType;
24
+ type?: string;
25
+ label?: string;
26
+ placeholder?: string;
27
+ defaultValue?: any;
28
+ autocomplete?: string;
29
+ required?: boolean;
30
+ disabled?: boolean;
31
+ readOnly?: boolean;
32
+ helpText?: string;
33
+ validation?: InputFieldValidation;
34
+ hidden?: boolean;
35
+ className?: string;
36
+ style?: Record<string, any>;
37
+ }
@@ -0,0 +1,13 @@
1
+ import { FormFieldType } from '.';
2
+ import { BaseInputFieldConfig } from './base-input-field-config';
3
+ export interface TextAreaConfig extends BaseInputFieldConfig {
4
+ fieldType: FormFieldType.TEXT_AREA;
5
+ rows?: number;
6
+ }
7
+ export interface ChipsConfig extends BaseInputFieldConfig {
8
+ fieldType: FormFieldType.CHIPS;
9
+ }
10
+ export interface SelectConfig extends BaseInputFieldConfig {
11
+ fieldType: FormFieldType.SELECT;
12
+ optionList: any[];
13
+ }
@@ -0,0 +1,9 @@
1
+ import { InputFieldValidation, BaseInputFieldConfig } from './base-input-field-config';
2
+ import { ChipsConfig, TextAreaConfig, SelectConfig } from './form-control-config';
3
+ type FieldConfig = TextAreaConfig | ChipsConfig | SelectConfig;
4
+ declare enum FormFieldType {
5
+ TEXT_AREA = "textarea",
6
+ CHIPS = "chips",
7
+ SELECT = "select"
8
+ }
9
+ export { InputFieldValidation, BaseInputFieldConfig, TextAreaConfig, ChipsConfig, SelectConfig, FieldConfig, FormFieldType, };
@@ -0,0 +1,13 @@
1
+ import { TestCase } from '../../types/llm-test-runner';
2
+ /**
3
+ * Escapes a CSV field by wrapping it in quotes if it contains special characters
4
+ * @param field - The field to escape
5
+ * @returns Escaped field string
6
+ */
7
+ export declare function escapeCsvField(field: string): string;
8
+ /**
9
+ * Exports test results to a CSV string
10
+ * @param testCases - Array of test cases with results to export
11
+ * @returns CSV string representation of the test results
12
+ */
13
+ export declare function exportTestResultsToCsv(testCases: TestCase[]): string;
@@ -0,0 +1,16 @@
1
+ import { TestCase } from '../../types/llm-test-runner';
2
+ export interface TestSuiteExportData {
3
+ id: string;
4
+ question: string;
5
+ expectedOutcome: string;
6
+ evaluationParameters?: {
7
+ approach: string;
8
+ threshold?: number;
9
+ };
10
+ }
11
+ /**
12
+ * Formats test cases as a JSON string suitable for saving as a test suite
13
+ * @param testCases - Array of test cases to format
14
+ * @returns JSON string representation of the test suite
15
+ */
16
+ export declare function formatTestSuiteAsJson(testCases: TestCase[]): string;
@@ -0,0 +1,12 @@
1
+ import { TestCase } from '../../types/llm-test-runner';
2
+ export interface ImportValidationResult {
3
+ success: boolean;
4
+ testCases?: TestCase[];
5
+ error?: string;
6
+ }
7
+ /**
8
+ * Validates and imports test cases from JSON content
9
+ * @param jsonContent - The JSON string to parse and validate
10
+ * @returns Validation result with test cases or error message
11
+ */
12
+ export declare function importTestSuite(jsonContent: string): ImportValidationResult;
@@ -1,7 +1,7 @@
1
1
  export declare class RateLimitedFetcher {
2
2
  private queue;
3
3
  private delay;
4
- private intervalId?;
4
+ private timer?;
5
5
  constructor(delayMs: number);
6
6
  private startQueue;
7
7
  schedule<T>(task: () => Promise<T>): Promise<T>;
@@ -0,0 +1,12 @@
1
+ import { TestCase } from '../../types/llm-test-runner';
2
+ /**
3
+ * Creates a new test case with default values
4
+ * @returns A new TestCase object with a unique ID
5
+ */
6
+ export declare function createTestCase(): TestCase;
7
+ /**
8
+ * Creates a test case from imported data with defaults
9
+ * @param data - Partial test case data from import
10
+ * @returns A new TestCase object with defaults applied
11
+ */
12
+ export declare function createTestCaseFromImport(data: unknown): TestCase;
@@ -0,0 +1,9 @@
1
+ import { TestCase } from '../../types/llm-test-runner';
2
+ import { EvaluationApproach } from '../evaluation/constants';
3
+ /**
4
+ * Updates the evaluation approach for a test case
5
+ * @param testCase - The test case to update
6
+ * @param approach - The new evaluation approach
7
+ * @returns Updated test case with the new evaluation approach
8
+ */
9
+ export declare function updateApproach(testCase: TestCase, approach: EvaluationApproach): TestCase;
@@ -0,0 +1,13 @@
1
+ import { FunctionalComponent } from '../../../stencil-public-runtime';
2
+ export interface ButtonProps {
3
+ 'variant'?: 'primary' | 'secondary' | 'outline' | 'destructive';
4
+ 'size'?: 'sm' | 'md' | 'lg';
5
+ 'disabled'?: boolean;
6
+ 'loading'?: boolean;
7
+ 'onClick'?: (event: MouseEvent) => void;
8
+ 'type'?: 'button' | 'submit' | 'reset';
9
+ 'class'?: string;
10
+ 'icon'?: string;
11
+ 'aria-label'?: string;
12
+ }
13
+ export declare const Button: FunctionalComponent<ButtonProps>;
@@ -0,0 +1,2 @@
1
+ export { Button } from './button';
2
+ export type { ButtonProps } from './button';
@@ -0,0 +1,11 @@
1
+ import { FunctionalComponent } from '../../../stencil-public-runtime';
2
+ export interface IconButtonProps {
3
+ variant?: 'primary' | 'secondary' | 'outline' | 'destructive';
4
+ disabled?: boolean;
5
+ loading?: boolean;
6
+ onClick?: (event: MouseEvent) => void;
7
+ type?: 'button' | 'submit' | 'reset';
8
+ title?: string;
9
+ class?: string;
10
+ }
11
+ export declare const IconButton: FunctionalComponent<IconButtonProps>;
@@ -0,0 +1,2 @@
1
+ export { IconButton } from './icon-button';
2
+ export type { IconButtonProps } from './icon-button';
@@ -0,0 +1,3 @@
1
+ export interface LlmAdapter {
2
+ invoke: Awaited<unknown>;
3
+ }
@@ -0,0 +1,11 @@
1
+ import type { LlmAdapter } from '../adapters';
2
+ export declare const enum GeminiModels {
3
+ Gemini3Pro__Preview = "gemini-3-pro-preview",
4
+ Gemini3ProImage__Preview = "gemini-3-pro-image-preview",
5
+ Gemini3Flash__Preview = "gemini-3-flash-preview"
6
+ }
7
+ export declare class GeminiAdapter implements LlmAdapter {
8
+ private readonly sdk;
9
+ constructor(key: string);
10
+ invoke(text: string): Promise<any>;
11
+ }
@@ -63,6 +63,12 @@ export interface ShadowRootOptions {
63
63
  * focusable part is given focus, and the shadow host is given any available `:focus` styling.
64
64
  */
65
65
  delegatesFocus?: boolean;
66
+ /**
67
+ * Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
68
+ * slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
69
+ * declarative slotting behavior.
70
+ */
71
+ slotAssignment?: 'manual' | 'named';
66
72
  }
67
73
  export interface ModeStyles {
68
74
  [modeName: string]: string | string[];
@@ -119,12 +125,34 @@ export interface EventOptions {
119
125
  */
120
126
  composed?: boolean;
121
127
  }
128
+ export interface AttachInternalsOptions {
129
+ /**
130
+ * Initial custom states to set on the ElementInternals.states CustomStateSet.
131
+ * Each key is the state name and the value is the initial boolean state.
132
+ *
133
+ * These states can be targeted with the CSS `:state()` pseudo-class.
134
+ *
135
+ * @example
136
+ * ```tsx
137
+ * @AttachInternals({ states: { open: true, active: false } })
138
+ * internals: ElementInternals;
139
+ * ```
140
+ *
141
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
142
+ */
143
+ states?: {
144
+ [stateName: string]: boolean;
145
+ };
146
+ }
122
147
  export interface AttachInternalsDecorator {
123
- (): PropertyDecorator;
148
+ (opts?: AttachInternalsOptions): PropertyDecorator;
124
149
  }
125
150
  export interface ListenDecorator {
126
151
  (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
127
152
  }
153
+ export interface ResolveVarFunction {
154
+ <T>(variable: T): string;
155
+ }
128
156
  export interface ListenOptions {
129
157
  /**
130
158
  * Handlers can also be registered for an event other than the host itself.
@@ -153,7 +181,9 @@ export interface StateDecorator {
153
181
  (): PropertyDecorator;
154
182
  }
155
183
  export interface WatchDecorator {
156
- (propName: any): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
184
+ (propName: any, watchOptions?: {
185
+ immediate?: boolean;
186
+ }): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
157
187
  }
158
188
  export interface PropSerializeDecorator {
159
189
  (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
@@ -208,6 +238,24 @@ export declare const AttachInternals: AttachInternalsDecorator;
208
238
  * https://stenciljs.com/docs/events#listen-decorator
209
239
  */
210
240
  export declare const Listen: ListenDecorator;
241
+ /**
242
+ * The `resolveVar()` function is a compile-time utility that resolves const variables
243
+ * and object properties to their string literal values. This allows variables to be
244
+ * used in `@Listen` and `@Event` decorators instead of hardcoded strings.
245
+ *
246
+ * @example
247
+ * ```ts
248
+ * const MY_EVENT = 'myEvent';
249
+ * @Listen(resolveVar(MY_EVENT))
250
+ * ```
251
+ *
252
+ * @example
253
+ * ```ts
254
+ * const EVENTS = { MY_EVENT: 'myEvent' } as const;
255
+ * @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
256
+ * ```
257
+ */
258
+ export declare const resolveVar: ResolveVarFunction;
211
259
  /**
212
260
  * The `@Method()` decorator is used to expose methods on the public API.
213
261
  * Class methods decorated with the @Method() decorator can be called directly
@@ -339,7 +387,7 @@ export declare function forceUpdate(ref: any): void;
339
387
  * @returns the rendering ref
340
388
  */
341
389
  export declare function getRenderingRef(): any;
342
- export interface HTMLStencilElement extends Omit<HTMLElement, 'autocorrect'> {
390
+ export interface HTMLStencilElement extends HTMLElement {
343
391
  componentOnReady(): Promise<this>;
344
392
  }
345
393
  /**
@@ -365,6 +413,27 @@ export declare function readTask(task: RafCallback): void;
365
413
  * Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
366
414
  */
367
415
  export declare const setErrorHandler: (handler: ErrorHandler) => void;
416
+ export type TagTransformer = (tag: string) => string;
417
+ /**
418
+ * Sets a tag transformer to be used when rendering your custom elements.
419
+ * ```ts
420
+ * setTagTransformer((tag) => {
421
+ * if (tag.startsWith('my-')) return `new-${tag}`
422
+ * return tag;
423
+ * });
424
+ * ```
425
+ * Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
426
+ *
427
+ * @param transformer the transformer function to use which must return a string.
428
+ */
429
+ export declare function setTagTransformer(transformer: TagTransformer): void;
430
+ /**
431
+ * Transforms a tag name using a transformer set via `setTagTransformer`
432
+ *
433
+ * @param tag - the tag to transform e.g. `my-tag`
434
+ * @returns the transformed tag e.g. `new-my-tag`
435
+ */
436
+ export declare function transformTag(tag: string): string;
368
437
  /**
369
438
  * @deprecated - Use `MixedInCtor` instead:
370
439
  * ```ts
@@ -568,7 +637,7 @@ export interface FunctionalUtilities {
568
637
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
569
638
  }
570
639
  export interface FunctionalComponent<T = {}> {
571
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
640
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
572
641
  }
573
642
  /**
574
643
  * A Child VDOM node
@@ -610,6 +679,7 @@ export declare namespace h {
610
679
  function h(sel: any, data: VNodeData | null, text: string): VNode;
611
680
  function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
612
681
  function h(sel: any, data: VNodeData | null, children: VNode): VNode;
682
+ function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
613
683
  namespace JSX {
614
684
  interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
615
685
  [tagName: string]: any;
@@ -624,6 +694,36 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
624
694
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
625
695
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
626
696
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
697
+ export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
698
+ /**
699
+ * Automatic JSX runtime functions for TypeScript's react-jsx mode.
700
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsx".
701
+ * @param type type of node
702
+ * @param props properties of node
703
+ * @param key optional key for the node
704
+ * @returns a jsx vnode
705
+ */
706
+ export declare function jsx(type: any, props: any, key?: string): VNode;
707
+ /**
708
+ * Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
709
+ * @param type type of node
710
+ * @param props properties of node
711
+ * @param key optional key for the node
712
+ * @returns a jsx vnode
713
+ */
714
+ export declare function jsxs(type: any, props: any, key?: string): VNode;
715
+ /**
716
+ * Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
717
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
718
+ * @param type type of node
719
+ * @param props properties of node
720
+ * @param key optional key for the node
721
+ * @param isStaticChildren indicates if the children are static
722
+ * @param source source information
723
+ * @param self reference to the component instance
724
+ * @returns a jsx vnode
725
+ */
726
+ export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
627
727
  /**
628
728
  * A virtual DOM node
629
729
  */
@@ -653,7 +753,7 @@ declare namespace LocalJSX {
653
753
  export { LocalJSX as JSX };
654
754
  export declare namespace JSXBase {
655
755
  interface IntrinsicElements {
656
- slot: JSXBase.SlotAttributes;
756
+ slot: JSXBase.SlotAttributes<HTMLSlotElement>;
657
757
  a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
658
758
  abbr: JSXBase.HTMLAttributes;
659
759
  address: JSXBase.HTMLAttributes;
@@ -823,7 +923,7 @@ export declare namespace JSXBase {
823
923
  use: JSXBase.SVGAttributes;
824
924
  view: JSXBase.SVGAttributes;
825
925
  }
826
- interface SlotAttributes extends JSXAttributes {
926
+ interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
827
927
  name?: string;
828
928
  slot?: string;
829
929
  onSlotchange?: (event: Event) => void;
@@ -879,6 +979,9 @@ export declare namespace JSXBase {
879
979
  popoverTargetAction?: string;
880
980
  popoverTargetElement?: Element | null;
881
981
  popoverTarget?: string;
982
+ command?: string;
983
+ commandFor?: string;
984
+ commandfor?: string;
882
985
  }
883
986
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
884
987
  height?: number | string;
@@ -1747,6 +1850,7 @@ export interface CustomElementsDefineOptions {
1747
1850
  exclude?: string[];
1748
1851
  resourcesUrl?: string;
1749
1852
  syncQueue?: boolean;
1853
+ /** @deprecated in-favour of `setTagTransformer` and `transformTag` */
1750
1854
  transformTagName?: (tagName: string) => string;
1751
1855
  jmp?: (c: Function) => any;
1752
1856
  raf?: (c: FrameRequestCallback) => number;
@@ -0,0 +1,9 @@
1
+ import { EvaluationApproach } from '../lib/evaluation/constants';
2
+ export interface EvaluationParameters {
3
+ approach: EvaluationApproach;
4
+ threshold?: number;
5
+ }
6
+ export interface EvaluationApproachResult {
7
+ score: number;
8
+ approachUsed: EvaluationApproach;
9
+ }
@@ -0,0 +1,22 @@
1
+ import { EvaluationParameters } from './evaluation';
2
+ import { EvaluationResult } from '../lib/evaluation/types';
3
+ export interface TestCase {
4
+ id: string;
5
+ question: string;
6
+ expectedOutcome: string;
7
+ evaluationParameters?: EvaluationParameters;
8
+ output?: string;
9
+ isRunning?: boolean;
10
+ error?: string;
11
+ evaluationResult?: EvaluationResult;
12
+ responseTime?: number;
13
+ }
14
+ export interface LLMRequestPayload {
15
+ prompt: string;
16
+ resolve: (result: string) => void;
17
+ reject: (err: Error | unknown) => void;
18
+ }
19
+ export interface SavePayload {
20
+ timestamp: string;
21
+ testCases: TestCase[];
22
+ }