@cogitator-ai/evals 0.1.4 → 0.1.11

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 (41) hide show
  1. package/LICENSE +21 -0
  2. package/dist/assertions/custom.d.ts +1 -1
  3. package/dist/assertions/index.d.ts +3 -3
  4. package/dist/assertions/index.js +3 -3
  5. package/dist/assertions/regression.d.ts +1 -1
  6. package/dist/assertions/threshold.d.ts +1 -1
  7. package/dist/datasets/csv-loader.d.ts +1 -1
  8. package/dist/datasets/csv-loader.js +1 -1
  9. package/dist/datasets/dataset.d.ts +1 -1
  10. package/dist/datasets/dataset.js +3 -3
  11. package/dist/datasets/index.d.ts +3 -3
  12. package/dist/datasets/index.js +3 -3
  13. package/dist/datasets/jsonl-loader.d.ts +1 -1
  14. package/dist/datasets/jsonl-loader.js +1 -1
  15. package/dist/eval-builder.d.ts +6 -6
  16. package/dist/eval-builder.js +1 -1
  17. package/dist/eval-comparison.d.ts +4 -4
  18. package/dist/eval-comparison.js +4 -4
  19. package/dist/eval-suite.d.ts +7 -7
  20. package/dist/eval-suite.js +4 -4
  21. package/dist/index.d.ts +29 -29
  22. package/dist/index.js +18 -18
  23. package/dist/metrics/custom.d.ts +1 -1
  24. package/dist/metrics/deterministic.d.ts +1 -1
  25. package/dist/metrics/index.d.ts +7 -7
  26. package/dist/metrics/index.js +4 -4
  27. package/dist/metrics/llm-judge.d.ts +2 -2
  28. package/dist/metrics/statistical.d.ts +1 -1
  29. package/dist/metrics/statistical.js +1 -1
  30. package/dist/metrics/types.d.ts +1 -1
  31. package/dist/reporters/ci.d.ts +1 -1
  32. package/dist/reporters/console.d.ts +1 -1
  33. package/dist/reporters/csv.d.ts +1 -1
  34. package/dist/reporters/index.d.ts +4 -4
  35. package/dist/reporters/index.js +8 -8
  36. package/dist/reporters/json.d.ts +1 -1
  37. package/dist/stats/index.d.ts +5 -5
  38. package/dist/stats/index.js +3 -3
  39. package/dist/stats/t-test.js +1 -1
  40. package/dist/tools.d.ts +1 -1
  41. package/package.json +14 -14
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Cogitator Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,4 +1,4 @@
1
- import type { AssertionFn, AggregatedMetric } from './index';
1
+ import type { AssertionFn, AggregatedMetric } from './index.js';
2
2
  export declare function assertion(opts: {
3
3
  name: string;
4
4
  check: (aggregated: Record<string, AggregatedMetric>, stats: {
@@ -21,7 +21,7 @@ export type AssertionFn = (aggregated: Record<string, AggregatedMetric>, stats:
21
21
  duration: number;
22
22
  cost: number;
23
23
  }) => AssertionResult;
24
- export { threshold } from './threshold';
25
- export { noRegression } from './regression';
26
- export { assertion } from './custom';
24
+ export { threshold } from './threshold.js';
25
+ export { noRegression } from './regression.js';
26
+ export { assertion } from './custom.js';
27
27
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export { threshold } from './threshold';
2
- export { noRegression } from './regression';
3
- export { assertion } from './custom';
1
+ export { threshold } from './threshold.js';
2
+ export { noRegression } from './regression.js';
3
+ export { assertion } from './custom.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import type { AssertionFn } from './index';
1
+ import type { AssertionFn } from './index.js';
2
2
  export declare function noRegression(baselinePath: string, opts?: {
3
3
  tolerance?: number;
4
4
  }): AssertionFn;
@@ -1,3 +1,3 @@
1
- import type { AssertionFn } from './index';
1
+ import type { AssertionFn } from './index.js';
2
2
  export declare function threshold(metricName: string, value: number): AssertionFn;
3
3
  //# sourceMappingURL=threshold.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { EvalCase } from '../schema';
1
+ import type { EvalCase } from '../schema.js';
2
2
  export declare function loadCsv(path: string): Promise<EvalCase[]>;
3
3
  //# sourceMappingURL=csv-loader.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { EvalCaseSchema } from '../schema';
2
+ import { EvalCaseSchema } from '../schema.js';
3
3
  export async function loadCsv(path) {
4
4
  let Papa;
5
5
  try {
@@ -1,4 +1,4 @@
1
- import type { EvalCase } from '../schema';
1
+ import type { EvalCase } from '../schema.js';
2
2
  export declare class Dataset {
3
3
  private readonly _cases;
4
4
  private constructor();
@@ -1,6 +1,6 @@
1
- import { EvalCaseSchema } from '../schema';
2
- import { loadJsonl } from './jsonl-loader';
3
- import { loadCsv } from './csv-loader';
1
+ import { EvalCaseSchema } from '../schema.js';
2
+ import { loadJsonl } from './jsonl-loader.js';
3
+ import { loadCsv } from './csv-loader.js';
4
4
  export class Dataset {
5
5
  _cases;
6
6
  constructor(cases) {
@@ -1,4 +1,4 @@
1
- export { Dataset } from './dataset';
2
- export { loadJsonl } from './jsonl-loader';
3
- export { loadCsv } from './csv-loader';
1
+ export { Dataset } from './dataset.js';
2
+ export { loadJsonl } from './jsonl-loader.js';
3
+ export { loadCsv } from './csv-loader.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export { Dataset } from './dataset';
2
- export { loadJsonl } from './jsonl-loader';
3
- export { loadCsv } from './csv-loader';
1
+ export { Dataset } from './dataset.js';
2
+ export { loadJsonl } from './jsonl-loader.js';
3
+ export { loadCsv } from './csv-loader.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- import type { EvalCase } from '../schema';
1
+ import type { EvalCase } from '../schema.js';
2
2
  export declare function loadJsonl(path: string): Promise<EvalCase[]>;
3
3
  //# sourceMappingURL=jsonl-loader.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { createReadStream } from 'node:fs';
2
2
  import { createInterface } from 'node:readline';
3
- import { EvalCaseSchema } from '../schema';
3
+ import { EvalCaseSchema } from '../schema.js';
4
4
  export async function loadJsonl(path) {
5
5
  const cases = [];
6
6
  let lineNumber = 0;
@@ -1,9 +1,9 @@
1
- import { EvalSuite } from './eval-suite';
2
- import type { EvalTarget, EvalSuiteOptions } from './eval-suite';
3
- import { Dataset } from './datasets';
4
- import type { MetricFn, StatisticalMetricFn } from './metrics/types';
5
- import type { JudgeConfig } from './schema';
6
- import type { AssertionFn } from './assertions';
1
+ import { EvalSuite } from './eval-suite.js';
2
+ import type { EvalTarget, EvalSuiteOptions } from './eval-suite.js';
3
+ import { Dataset } from './datasets/index.js';
4
+ import type { MetricFn, StatisticalMetricFn } from './metrics/types.js';
5
+ import type { JudgeConfig } from './schema.js';
6
+ import type { AssertionFn } from './assertions/index.js';
7
7
  export declare class EvalBuilder {
8
8
  private _dataset?;
9
9
  private _target?;
@@ -1,4 +1,4 @@
1
- import { EvalSuite, isLLMMetric } from './eval-suite';
1
+ import { EvalSuite, isLLMMetric } from './eval-suite.js';
2
2
  export class EvalBuilder {
3
3
  _dataset;
4
4
  _target;
@@ -1,7 +1,7 @@
1
- import type { EvalTarget, EvalSuiteResult } from './eval-suite';
2
- import type { MetricFn, StatisticalMetricFn } from './metrics/types';
3
- import type { JudgeConfig } from './schema';
4
- import { Dataset } from './datasets';
1
+ import type { EvalTarget, EvalSuiteResult } from './eval-suite.js';
2
+ import type { MetricFn, StatisticalMetricFn } from './metrics/types.js';
3
+ import type { JudgeConfig } from './schema.js';
4
+ import { Dataset } from './datasets/index.js';
5
5
  export interface EvalComparisonOptions {
6
6
  dataset: Dataset;
7
7
  targets: {
@@ -1,7 +1,7 @@
1
- import { EvalSuite } from './eval-suite';
2
- import { pairedTTest } from './stats/t-test';
3
- import { mcnemarsTest } from './stats/mcnemar';
4
- import { mean } from './stats/percentiles';
1
+ import { EvalSuite } from './eval-suite.js';
2
+ import { pairedTTest } from './stats/t-test.js';
3
+ import { mcnemarsTest } from './stats/mcnemar.js';
4
+ import { mean } from './stats/percentiles.js';
5
5
  function isBinary(scores) {
6
6
  return scores.every((s) => s === 0 || s === 1);
7
7
  }
@@ -1,10 +1,10 @@
1
- import { Dataset } from './datasets';
2
- import type { EvalCase } from './schema';
3
- import type { JudgeConfig } from './schema';
4
- import type { MetricFn, MetricScore, EvalCaseResult, StatisticalMetricFn } from './metrics/types';
5
- import type { LLMMetricFn } from './metrics/llm-judge';
6
- import type { AssertionFn, AssertionResult, AggregatedMetric } from './assertions';
7
- import type { ReporterType, ReporterOptions } from './reporters';
1
+ import { Dataset } from './datasets/index.js';
2
+ import type { EvalCase } from './schema.js';
3
+ import type { JudgeConfig } from './schema.js';
4
+ import type { MetricFn, MetricScore, EvalCaseResult, StatisticalMetricFn } from './metrics/types.js';
5
+ import type { LLMMetricFn } from './metrics/llm-judge.js';
6
+ import type { AssertionFn, AssertionResult, AggregatedMetric } from './assertions/index.js';
7
+ import type { ReporterType, ReporterOptions } from './reporters/index.js';
8
8
  export interface EvalTarget {
9
9
  agent?: unknown;
10
10
  cogitator?: unknown;
@@ -1,8 +1,8 @@
1
1
  import { writeFileSync } from 'node:fs';
2
- import { EvalSuiteConfigSchema } from './schema';
3
- import { bindJudgeContext } from './metrics/llm-judge';
4
- import { aggregate } from './stats';
5
- import { report } from './reporters';
2
+ import { EvalSuiteConfigSchema } from './schema.js';
3
+ import { bindJudgeContext } from './metrics/llm-judge.js';
4
+ import { aggregate } from './stats/index.js';
5
+ import { report } from './reporters/index.js';
6
6
  export function isLLMMetric(m) {
7
7
  return 'requiresJudge' in m && m.requiresJudge === true;
8
8
  }
package/dist/index.d.ts CHANGED
@@ -1,31 +1,31 @@
1
1
  export declare const VERSION = "0.1.0";
2
- export { EvalSuite, isLLMMetric } from './eval-suite';
3
- export type { EvalTarget, EvalProgress, EvalSuiteOptions, EvalSuiteResult } from './eval-suite';
4
- export { EvalComparison } from './eval-comparison';
5
- export type { EvalComparisonOptions, MetricComparison, ComparisonResult } from './eval-comparison';
6
- export { EvalBuilder } from './eval-builder';
7
- export { Dataset } from './datasets';
8
- export { loadJsonl } from './datasets';
9
- export { loadCsv } from './datasets';
10
- export { exactMatch, contains, regex, jsonSchema } from './metrics/deterministic';
11
- export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './metrics/llm-judge';
12
- export type { LLMMetricFn, JudgeContext } from './metrics/llm-judge';
13
- export { latency, cost, tokenUsage } from './metrics/statistical';
14
- export { metric } from './metrics/custom';
15
- export type { MetricFn, MetricScore, EvalCaseResult, StatisticalMetricFn } from './metrics/types';
16
- export type { CustomMetricConfig } from './metrics/custom';
17
- export { threshold } from './assertions';
18
- export { noRegression } from './assertions';
19
- export { assertion } from './assertions';
20
- export type { AssertionFn, AssertionResult, AggregatedMetric } from './assertions';
21
- export { report } from './reporters';
22
- export type { ReporterType, ReporterOptions } from './reporters';
23
- export { pairedTTest } from './stats/t-test';
24
- export type { TTestResult } from './stats/t-test';
25
- export { mcnemarsTest } from './stats/mcnemar';
26
- export type { McNemarResult } from './stats/mcnemar';
27
- export { mean, median, stdDev, percentile, aggregate } from './stats/percentiles';
28
- export type { EvalCase, EvalSuiteConfig, JudgeConfig, EvalComparisonConfig } from './schema';
29
- export { createRunEvalTool, evalTools } from './tools';
30
- export type { EvalTool } from './tools';
2
+ export { EvalSuite, isLLMMetric } from './eval-suite.js';
3
+ export type { EvalTarget, EvalProgress, EvalSuiteOptions, EvalSuiteResult } from './eval-suite.js';
4
+ export { EvalComparison } from './eval-comparison.js';
5
+ export type { EvalComparisonOptions, MetricComparison, ComparisonResult } from './eval-comparison.js';
6
+ export { EvalBuilder } from './eval-builder.js';
7
+ export { Dataset } from './datasets/index.js';
8
+ export { loadJsonl } from './datasets/index.js';
9
+ export { loadCsv } from './datasets/index.js';
10
+ export { exactMatch, contains, regex, jsonSchema } from './metrics/deterministic.js';
11
+ export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './metrics/llm-judge.js';
12
+ export type { LLMMetricFn, JudgeContext } from './metrics/llm-judge.js';
13
+ export { latency, cost, tokenUsage } from './metrics/statistical.js';
14
+ export { metric } from './metrics/custom.js';
15
+ export type { MetricFn, MetricScore, EvalCaseResult, StatisticalMetricFn } from './metrics/types.js';
16
+ export type { CustomMetricConfig } from './metrics/custom.js';
17
+ export { threshold } from './assertions/index.js';
18
+ export { noRegression } from './assertions/index.js';
19
+ export { assertion } from './assertions/index.js';
20
+ export type { AssertionFn, AssertionResult, AggregatedMetric } from './assertions/index.js';
21
+ export { report } from './reporters/index.js';
22
+ export type { ReporterType, ReporterOptions } from './reporters/index.js';
23
+ export { pairedTTest } from './stats/t-test.js';
24
+ export type { TTestResult } from './stats/t-test.js';
25
+ export { mcnemarsTest } from './stats/mcnemar.js';
26
+ export type { McNemarResult } from './stats/mcnemar.js';
27
+ export { mean, median, stdDev, percentile, aggregate } from './stats/percentiles.js';
28
+ export type { EvalCase, EvalSuiteConfig, JudgeConfig, EvalComparisonConfig } from './schema.js';
29
+ export { createRunEvalTool, evalTools } from './tools.js';
30
+ export type { EvalTool } from './tools.js';
31
31
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  export const VERSION = '0.1.0';
2
- export { EvalSuite, isLLMMetric } from './eval-suite';
3
- export { EvalComparison } from './eval-comparison';
4
- export { EvalBuilder } from './eval-builder';
5
- export { Dataset } from './datasets';
6
- export { loadJsonl } from './datasets';
7
- export { loadCsv } from './datasets';
8
- export { exactMatch, contains, regex, jsonSchema } from './metrics/deterministic';
9
- export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './metrics/llm-judge';
10
- export { latency, cost, tokenUsage } from './metrics/statistical';
11
- export { metric } from './metrics/custom';
12
- export { threshold } from './assertions';
13
- export { noRegression } from './assertions';
14
- export { assertion } from './assertions';
15
- export { report } from './reporters';
16
- export { pairedTTest } from './stats/t-test';
17
- export { mcnemarsTest } from './stats/mcnemar';
18
- export { mean, median, stdDev, percentile, aggregate } from './stats/percentiles';
19
- export { createRunEvalTool, evalTools } from './tools';
2
+ export { EvalSuite, isLLMMetric } from './eval-suite.js';
3
+ export { EvalComparison } from './eval-comparison.js';
4
+ export { EvalBuilder } from './eval-builder.js';
5
+ export { Dataset } from './datasets/index.js';
6
+ export { loadJsonl } from './datasets/index.js';
7
+ export { loadCsv } from './datasets/index.js';
8
+ export { exactMatch, contains, regex, jsonSchema } from './metrics/deterministic.js';
9
+ export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './metrics/llm-judge.js';
10
+ export { latency, cost, tokenUsage } from './metrics/statistical.js';
11
+ export { metric } from './metrics/custom.js';
12
+ export { threshold } from './assertions/index.js';
13
+ export { noRegression } from './assertions/index.js';
14
+ export { assertion } from './assertions/index.js';
15
+ export { report } from './reporters/index.js';
16
+ export { pairedTTest } from './stats/t-test.js';
17
+ export { mcnemarsTest } from './stats/mcnemar.js';
18
+ export { mean, median, stdDev, percentile, aggregate } from './stats/percentiles.js';
19
+ export { createRunEvalTool, evalTools } from './tools.js';
20
20
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import type { MetricFn } from './types';
1
+ import type { MetricFn } from './types.js';
2
2
  export interface CustomMetricConfig {
3
3
  name: string;
4
4
  evaluate: (data: {
@@ -1,5 +1,5 @@
1
1
  import type { ZodType } from 'zod';
2
- import type { MetricFn } from './types';
2
+ import type { MetricFn } from './types.js';
3
3
  interface MatchOptions {
4
4
  caseSensitive?: boolean;
5
5
  }
@@ -1,8 +1,8 @@
1
- export type { MetricScore, EvalCaseResult, MetricFn, StatisticalMetricFn } from './types';
2
- export { exactMatch, contains, regex, jsonSchema } from './deterministic';
3
- export { metric } from './custom';
4
- export type { CustomMetricConfig } from './custom';
5
- export { latency, cost, tokenUsage } from './statistical';
6
- export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './llm-judge';
7
- export type { JudgeContext, LLMMetricFn } from './llm-judge';
1
+ export type { MetricScore, EvalCaseResult, MetricFn, StatisticalMetricFn } from './types.js';
2
+ export { exactMatch, contains, regex, jsonSchema } from './deterministic.js';
3
+ export { metric } from './custom.js';
4
+ export type { CustomMetricConfig } from './custom.js';
5
+ export { latency, cost, tokenUsage } from './statistical.js';
6
+ export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './llm-judge.js';
7
+ export type { JudgeContext, LLMMetricFn } from './llm-judge.js';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export { exactMatch, contains, regex, jsonSchema } from './deterministic';
2
- export { metric } from './custom';
3
- export { latency, cost, tokenUsage } from './statistical';
4
- export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './llm-judge';
1
+ export { exactMatch, contains, regex, jsonSchema } from './deterministic.js';
2
+ export { metric } from './custom.js';
3
+ export { latency, cost, tokenUsage } from './statistical.js';
4
+ export { faithfulness, relevance, coherence, helpfulness, llmMetric, bindJudgeContext, } from './llm-judge.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { JudgeConfig } from '../schema';
2
- import type { MetricFn } from './types';
1
+ import type { JudgeConfig } from '../schema.js';
2
+ import type { MetricFn } from './types.js';
3
3
  export interface JudgeContext {
4
4
  cogitator: {
5
5
  run: (opts: {
@@ -1,4 +1,4 @@
1
- import type { StatisticalMetricFn } from './types';
1
+ import type { StatisticalMetricFn } from './types.js';
2
2
  export declare function latency(): StatisticalMetricFn;
3
3
  export declare function cost(): StatisticalMetricFn;
4
4
  export declare function tokenUsage(): StatisticalMetricFn;
@@ -1,4 +1,4 @@
1
- import { aggregate, mean } from '../stats';
1
+ import { aggregate, mean } from '../stats/index.js';
2
2
  function createStatisticalFn(name, fn) {
3
3
  const statFn = fn;
4
4
  statFn.metricName = name;
@@ -1,4 +1,4 @@
1
- import type { EvalCase } from '../schema';
1
+ import type { EvalCase } from '../schema.js';
2
2
  export interface MetricScore {
3
3
  name: string;
4
4
  score: number;
@@ -1,3 +1,3 @@
1
- import type { EvalSuiteResult } from './index';
1
+ import type { EvalSuiteResult } from './index.js';
2
2
  export declare function ciReport(result: EvalSuiteResult): void;
3
3
  //# sourceMappingURL=ci.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { EvalSuiteResult } from './index';
1
+ import type { EvalSuiteResult } from './index.js';
2
2
  export declare function consoleReport(result: EvalSuiteResult): void;
3
3
  //# sourceMappingURL=console.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { EvalSuiteResult } from './index';
1
+ import type { EvalSuiteResult } from './index.js';
2
2
  export declare function csvReport(result: EvalSuiteResult, options: {
3
3
  path: string;
4
4
  }): void;
@@ -43,8 +43,8 @@ export type ReporterOptions = {
43
43
  path?: string;
44
44
  };
45
45
  export declare function report(result: EvalSuiteResult, type: ReporterType | ReporterType[], options?: ReporterOptions): void;
46
- export { consoleReport } from './console';
47
- export { jsonReport } from './json';
48
- export { csvReport } from './csv';
49
- export { ciReport } from './ci';
46
+ export { consoleReport } from './console.js';
47
+ export { jsonReport } from './json.js';
48
+ export { csvReport } from './csv.js';
49
+ export { ciReport } from './ci.js';
50
50
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
- import { consoleReport } from './console';
2
- import { jsonReport } from './json';
3
- import { csvReport } from './csv';
4
- import { ciReport } from './ci';
1
+ import { consoleReport } from './console.js';
2
+ import { jsonReport } from './json.js';
3
+ import { csvReport } from './csv.js';
4
+ import { ciReport } from './ci.js';
5
5
  export function report(result, type, options) {
6
6
  const types = Array.isArray(type) ? type : [type];
7
7
  for (const t of types) {
@@ -21,8 +21,8 @@ export function report(result, type, options) {
21
21
  }
22
22
  }
23
23
  }
24
- export { consoleReport } from './console';
25
- export { jsonReport } from './json';
26
- export { csvReport } from './csv';
27
- export { ciReport } from './ci';
24
+ export { consoleReport } from './console.js';
25
+ export { jsonReport } from './json.js';
26
+ export { csvReport } from './csv.js';
27
+ export { ciReport } from './ci.js';
28
28
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import type { EvalSuiteResult } from './index';
1
+ import type { EvalSuiteResult } from './index.js';
2
2
  export declare function jsonReport(result: EvalSuiteResult, options: {
3
3
  path: string;
4
4
  }): void;
@@ -1,6 +1,6 @@
1
- export { percentile, mean, median, stdDev, aggregate } from './percentiles';
2
- export { pairedTTest } from './t-test';
3
- export type { TTestResult } from './t-test';
4
- export { mcnemarsTest } from './mcnemar';
5
- export type { McNemarResult } from './mcnemar';
1
+ export { percentile, mean, median, stdDev, aggregate } from './percentiles.js';
2
+ export { pairedTTest } from './t-test.js';
3
+ export type { TTestResult } from './t-test.js';
4
+ export { mcnemarsTest } from './mcnemar.js';
5
+ export type { McNemarResult } from './mcnemar.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export { percentile, mean, median, stdDev, aggregate } from './percentiles';
2
- export { pairedTTest } from './t-test';
3
- export { mcnemarsTest } from './mcnemar';
1
+ export { percentile, mean, median, stdDev, aggregate } from './percentiles.js';
2
+ export { pairedTTest } from './t-test.js';
3
+ export { mcnemarsTest } from './mcnemar.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { mean, stdDev } from './percentiles';
1
+ import { mean, stdDev } from './percentiles.js';
2
2
  function lnGamma(z) {
3
3
  const g = 7;
4
4
  const coefficients = [
package/dist/tools.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { EvalSuite } from './eval-suite';
2
+ import type { EvalSuite } from './eval-suite.js';
3
3
  export interface EvalTool<TParams = unknown> {
4
4
  name: string;
5
5
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogitator-ai/evals",
3
- "version": "0.1.4",
3
+ "version": "0.1.11",
4
4
  "description": "Evaluation framework for Cogitator AI agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,19 +14,11 @@
14
14
  "files": [
15
15
  "dist"
16
16
  ],
17
- "scripts": {
18
- "build": "tsc",
19
- "dev": "tsc --watch",
20
- "clean": "rm -rf dist",
21
- "typecheck": "tsc --noEmit",
22
- "test": "vitest run",
23
- "test:watch": "vitest"
24
- },
25
17
  "dependencies": {
26
18
  "zod": "^4.3.6"
27
19
  },
28
20
  "peerDependencies": {
29
- "@cogitator-ai/core": "workspace:*"
21
+ "@cogitator-ai/core": "0.19.3"
30
22
  },
31
23
  "peerDependenciesMeta": {
32
24
  "@cogitator-ai/core": {
@@ -37,10 +29,10 @@
37
29
  "papaparse": "^5.5.0"
38
30
  },
39
31
  "devDependencies": {
40
- "@cogitator-ai/core": "workspace:*",
41
32
  "@types/papaparse": "^5.3.15",
42
33
  "typescript": "^5.7.2",
43
- "vitest": "^4.0.18"
34
+ "vitest": "^4.0.18",
35
+ "@cogitator-ai/core": "0.19.3"
44
36
  },
45
37
  "repository": {
46
38
  "type": "git",
@@ -51,5 +43,13 @@
51
43
  "access": "public",
52
44
  "registry": "https://npm.pkg.github.com"
53
45
  },
54
- "license": "MIT"
55
- }
46
+ "license": "MIT",
47
+ "scripts": {
48
+ "build": "tsc",
49
+ "dev": "tsc --watch",
50
+ "clean": "rm -rf dist",
51
+ "typecheck": "tsc --noEmit",
52
+ "test": "vitest run",
53
+ "test:watch": "vitest"
54
+ }
55
+ }