vieval 0.0.1 → 0.0.4

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 (51) hide show
  1. package/README.md +8 -5
  2. package/dist/cli/index.d.mts +1 -1
  3. package/dist/cli/index.mjs +1232 -83
  4. package/dist/cli/index.mjs.map +1 -1
  5. package/dist/{config-D2fe1SnT.mjs → config-CHN24egi.mjs} +1 -1
  6. package/dist/{config-D2fe1SnT.mjs.map → config-CHN24egi.mjs.map} +1 -1
  7. package/dist/config.d.mts +2 -3
  8. package/dist/config.mjs +2 -2
  9. package/dist/core/assertions/index.d.mts +1 -1
  10. package/dist/core/inference-executors/index.d.mts +1 -45
  11. package/dist/core/inference-executors/index.mjs +1 -38
  12. package/dist/core/inference-executors/index.mjs.map +1 -1
  13. package/dist/core/processors/results/index.d.mts +1 -1
  14. package/dist/core/runner/index.d.mts +2 -2
  15. package/dist/core/runner/index.mjs +2 -2
  16. package/dist/env-C7X81PWa.mjs +41 -0
  17. package/dist/env-C7X81PWa.mjs.map +1 -0
  18. package/dist/env-DtpjACOW.d.mts +47 -0
  19. package/dist/expect-B2vaoRVZ.d.mts +10 -0
  20. package/dist/{expect-i9WZWGrA.mjs → expect-CaXiUkwY.mjs} +3 -3
  21. package/dist/expect-CaXiUkwY.mjs.map +1 -0
  22. package/dist/expect-extensions-BOzwV5EJ.mjs +197 -0
  23. package/dist/expect-extensions-BOzwV5EJ.mjs.map +1 -0
  24. package/dist/expect.d.mts +1 -1
  25. package/dist/expect.mjs +1 -1
  26. package/dist/{index-DP7jsORl.d.mts → index-BDMEAmf2.d.mts} +246 -3
  27. package/dist/{index-oSXhM1zx.d.mts → index-C3gPFmcR.d.mts} +2 -2
  28. package/dist/index.d.mts +326 -6
  29. package/dist/index.mjs +65 -23
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/{models-D_MsBtYw.mjs → models-DIGdOUpJ.mjs} +1 -1
  32. package/dist/{models-D_MsBtYw.mjs.map → models-DIGdOUpJ.mjs.map} +1 -1
  33. package/dist/plugins/chat-models/index.d.mts +465 -6
  34. package/dist/plugins/chat-models/index.mjs +469 -6
  35. package/dist/plugins/chat-models/index.mjs.map +1 -1
  36. package/dist/{registry-ChOjjdEC.mjs → registry-CHJcTN2W.mjs} +75 -16
  37. package/dist/registry-CHJcTN2W.mjs.map +1 -0
  38. package/dist/{runner-4ZsOveoY.mjs → runner-Dpy-eivM.mjs} +177 -21
  39. package/dist/runner-Dpy-eivM.mjs.map +1 -0
  40. package/dist/testing/expect-extensions.d.mts +44 -38
  41. package/dist/testing/expect-extensions.mjs +1 -1
  42. package/package.json +11 -4
  43. package/dist/expect-0jPJ7Zio.d.mts +0 -2318
  44. package/dist/expect-extensions-CwPtgTz8.mjs +0 -13471
  45. package/dist/expect-extensions-CwPtgTz8.mjs.map +0 -1
  46. package/dist/expect-i9WZWGrA.mjs.map +0 -1
  47. package/dist/magic-string.es-CH1jwzMg.mjs +0 -1013
  48. package/dist/magic-string.es-CH1jwzMg.mjs.map +0 -1
  49. package/dist/plugin-DVaRZY2x.d.mts +0 -84
  50. package/dist/registry-ChOjjdEC.mjs.map +0 -1
  51. package/dist/runner-4ZsOveoY.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { f as ToolCall } from "../index-oSXhM1zx.mjs";
1
+ import { f as ToolCall } from "../index-C3gPFmcR.mjs";
2
2
 
3
3
  //#region src/testing/expect-extensions.d.ts
4
4
  /**
@@ -42,44 +42,50 @@ interface ToolCallContainer {
42
42
  * - callers want native `.not` chaining with the same matchers
43
43
  */
44
44
  declare function installVievalExpectMatchers(): void;
45
+ interface VievalCustomMatchers {
46
+ /**
47
+ * Asserts that text includes required keywords.
48
+ *
49
+ * Example:
50
+ * `expect('calm answer').toMustInclude(['calm'])`
51
+ */
52
+ toMustInclude: (keywords: string | readonly string[], options?: KeywordMatcherOptions) => void;
53
+ /**
54
+ * Asserts that text excludes forbidden keywords.
55
+ *
56
+ * Example:
57
+ * `expect('calm answer').toMustExclude(['bestmove'])`
58
+ */
59
+ toMustExclude: (keywords: string | readonly string[], options?: KeywordMatcherOptions) => void;
60
+ /**
61
+ * Asserts rubric score is greater than a threshold.
62
+ *
63
+ * Example:
64
+ * `expect({ score: 0.91 }).toScoreRubricGreaterThan(0.8)`
65
+ */
66
+ toScoreRubricGreaterThan: (threshold: number) => void;
67
+ /**
68
+ * Asserts structured output satisfies a validator.
69
+ *
70
+ * Example:
71
+ * `expect(value).toSatisfyStructuredOutput(isMyShape)`
72
+ */
73
+ toSatisfyStructuredOutput: <TValue>(validator: (value: unknown) => value is TValue) => void;
74
+ /**
75
+ * Asserts selected tool-call args satisfy validator.
76
+ *
77
+ * Example:
78
+ * `expect({ toolCalls }).toSatisfyToolCallArgs('builtIn_sparkCommand', isSparkArgs)`
79
+ */
80
+ toSatisfyToolCallArgs: (toolName: string, validator: (args: unknown) => boolean) => void;
81
+ }
82
+ declare module '@vitest/expect' {
83
+ interface Matchers<T = any> extends VievalCustomMatchers {}
84
+ interface Assertion<T = any> extends VievalCustomMatchers {}
85
+ }
45
86
  declare module 'vitest' {
46
- interface Assertion {
47
- /**
48
- * Asserts that text includes required keywords.
49
- *
50
- * Example:
51
- * `expect('calm answer').toMustInclude(['calm'])`
52
- */
53
- toMustInclude: (keywords: string | readonly string[], options?: KeywordMatcherOptions) => void;
54
- /**
55
- * Asserts that text excludes forbidden keywords.
56
- *
57
- * Example:
58
- * `expect('calm answer').toMustExclude(['bestmove'])`
59
- */
60
- toMustExclude: (keywords: string | readonly string[], options?: KeywordMatcherOptions) => void;
61
- /**
62
- * Asserts rubric score is greater than a threshold.
63
- *
64
- * Example:
65
- * `expect({ score: 0.91 }).toScoreRubricGreaterThan(0.8)`
66
- */
67
- toScoreRubricGreaterThan: (threshold: number) => void;
68
- /**
69
- * Asserts structured output satisfies a validator.
70
- *
71
- * Example:
72
- * `expect(value).toSatisfyStructuredOutput(isMyShape)`
73
- */
74
- toSatisfyStructuredOutput: <TValue>(validator: (value: unknown) => value is TValue) => void;
75
- /**
76
- * Asserts selected tool-call args satisfy validator.
77
- *
78
- * Example:
79
- * `expect({ toolCalls }).toSatisfyToolCallArgs('builtIn_sparkCommand', isSparkArgs)`
80
- */
81
- toSatisfyToolCallArgs: (toolName: string, validator: (args: unknown) => boolean) => void;
82
- }
87
+ interface Assertion extends VievalCustomMatchers {}
88
+ interface Matchers<T = any> extends VievalCustomMatchers {}
83
89
  }
84
90
  //#endregion
85
91
  export { KeywordMatcherOptions, ToolCallContainer, installVievalExpectMatchers };
@@ -1,2 +1,2 @@
1
- import { t as installVievalExpectMatchers } from "../expect-extensions-CwPtgTz8.mjs";
1
+ import { t as installVievalExpectMatchers } from "../expect-extensions-BOzwV5EJ.mjs";
2
2
  export { installVievalExpectMatchers };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vieval",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.4",
5
5
  "description": "Vitest-based evaluation framework for agents, models, and more.",
6
6
  "author": {
7
7
  "name": "Vieval Team",
@@ -9,6 +9,11 @@
9
9
  "url": "https://github.com/vieval-dev"
10
10
  },
11
11
  "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/vieval-dev/vieval.git",
15
+ "directory": "packages/vieval"
16
+ },
12
17
  "exports": {
13
18
  ".": {
14
19
  "types": "./dist/index.d.mts",
@@ -64,6 +69,8 @@
64
69
  "dependencies": {
65
70
  "@moeru/std": "0.1.0-beta.17",
66
71
  "@pnpm/find-workspace-dir": "^1000.1.5",
72
+ "@vitest/expect": "^4.1.4",
73
+ "@vitest/runner": "^4.1.4",
67
74
  "@xsai-ext/providers": "0.5.0-beta.2",
68
75
  "@xsai/generate-text": "0.5.0-beta.2",
69
76
  "c12": "^4.0.0-beta.4",
@@ -72,11 +79,11 @@
72
79
  "meow": "^14.1.0",
73
80
  "tinyglobby": "^0.2.16",
74
81
  "tinyrainbow": "^3.1.0",
75
- "vite": "^8.0.8"
82
+ "vite": "^8.0.8",
83
+ "vitest": "^4.1.4"
76
84
  },
77
85
  "devDependencies": {
78
- "typescript": "^6.0.2",
79
- "vitest": "^4.1.4"
86
+ "typescript": "^6.0.2"
80
87
  },
81
88
  "scripts": {
82
89
  "build": "tsdown",