axiom 0.43.0 → 0.44.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 (43) hide show
  1. package/dist/bin.cjs +28 -14
  2. package/dist/bin.cjs.map +1 -1
  3. package/dist/bin.js +6 -5
  4. package/dist/bin.js.map +1 -1
  5. package/dist/{chunk-QSI2ES43.js → chunk-56V2A6IW.js} +4 -4
  6. package/dist/chunk-56V2A6IW.js.map +1 -0
  7. package/dist/{chunk-T7DGZCOP.js → chunk-7NTVK3F4.js} +72 -355
  8. package/dist/chunk-7NTVK3F4.js.map +1 -0
  9. package/dist/{chunk-KPQJE7AU.js → chunk-AAYRMTT6.js} +33 -12
  10. package/dist/chunk-AAYRMTT6.js.map +1 -0
  11. package/dist/chunk-HW6E4M7S.js +302 -0
  12. package/dist/chunk-HW6E4M7S.js.map +1 -0
  13. package/dist/{chunk-N4LWNPI5.js → chunk-MCKVQ2IB.js} +2 -2
  14. package/dist/{chunk-3THTOTTP.js → chunk-TWE3LIRZ.js} +4 -2
  15. package/dist/chunk-TWE3LIRZ.js.map +1 -0
  16. package/dist/{chunk-OGWPMUHQ.js → chunk-U3JDCQ3Y.js} +29 -14
  17. package/dist/chunk-U3JDCQ3Y.js.map +1 -0
  18. package/dist/evals/online.cjs +244 -21
  19. package/dist/evals/online.cjs.map +1 -1
  20. package/dist/evals/online.js +3 -2
  21. package/dist/evals/online.js.map +1 -1
  22. package/dist/evals/scorers.cjs +3 -1
  23. package/dist/evals/scorers.cjs.map +1 -1
  24. package/dist/evals/scorers.js +2 -2
  25. package/dist/evals.cjs +348 -167
  26. package/dist/evals.cjs.map +1 -1
  27. package/dist/evals.d.cts +10 -2
  28. package/dist/evals.d.ts +10 -2
  29. package/dist/evals.js +324 -159
  30. package/dist/evals.js.map +1 -1
  31. package/dist/index.cjs +34 -13
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.js +12 -10
  34. package/dist/index.js.map +1 -1
  35. package/dist/{run-vitest-ZLJB4UJX.js → run-vitest-4OEEDEHV.js} +6 -5
  36. package/dist/{run-vitest-ZLJB4UJX.js.map → run-vitest-4OEEDEHV.js.map} +1 -1
  37. package/package.json +3 -2
  38. package/dist/chunk-3THTOTTP.js.map +0 -1
  39. package/dist/chunk-KPQJE7AU.js.map +0 -1
  40. package/dist/chunk-OGWPMUHQ.js.map +0 -1
  41. package/dist/chunk-QSI2ES43.js.map +0 -1
  42. package/dist/chunk-T7DGZCOP.js.map +0 -1
  43. /package/dist/{chunk-N4LWNPI5.js.map → chunk-MCKVQ2IB.js.map} +0 -0
package/dist/bin.cjs CHANGED
@@ -553,7 +553,7 @@ var init_package = __esm({
553
553
  "package.json"() {
554
554
  package_default = {
555
555
  name: "axiom",
556
- version: "0.43.0",
556
+ version: "0.44.0",
557
557
  type: "module",
558
558
  author: "Axiom, Inc.",
559
559
  contributors: [
@@ -563,7 +563,8 @@ var init_package = __esm({
563
563
  ],
564
564
  scripts: {
565
565
  dev: "tsup --watch",
566
- build: "tsup && chmod +x dist/bin.js",
566
+ build: "tsup && chmod +x dist/bin.js && pnpm check:vitest-entrypoints",
567
+ "check:vitest-entrypoints": "node ./scripts/check-vitest-entrypoints.mjs",
567
568
  format: "prettier --write .",
568
569
  "format:check": "prettier --check .",
569
570
  lint: "eslint './**/*.{js,ts}'",
@@ -2228,16 +2229,29 @@ function printFinalReport({
2228
2229
  logger("");
2229
2230
  logger(u.bgBlue(u.white(" FINAL EVALUATION REPORT ")));
2230
2231
  logger("");
2231
- for (const suite of suiteData) {
2232
- const scorerAverages = calculateScorerAverages(suite);
2233
- const flagDiff = calculateFlagDiff(suite);
2234
- printSuiteBox({ suite, scorerAverages, calculateBaselineScorerAverage, flagDiff, logger });
2235
- logger("");
2236
- }
2237
2232
  const runId = suiteData[0]?.runId;
2238
2233
  const orgId = suiteData[0]?.orgId;
2239
2234
  const anyRegistered = registrationStatus.some((s2) => s2.registered);
2240
2235
  const anyFailed = registrationStatus.some((s2) => !s2.registered);
2236
+ const allFailed = registrationStatus.length > 0 && registrationStatus.every((s2) => !s2.registered);
2237
+ const hasAnyScores = suiteData.some(
2238
+ (suite) => suite.cases.some((caseData) => Object.keys(caseData.scores ?? {}).length > 0)
2239
+ );
2240
+ const shouldPrintSuiteBoxes = isDebug || !allFailed || hasAnyScores;
2241
+ if (shouldPrintSuiteBoxes) {
2242
+ for (const suite of suiteData) {
2243
+ const scorerAverages = calculateScorerAverages(suite);
2244
+ const flagDiff = calculateFlagDiff(suite);
2245
+ printSuiteBox({
2246
+ suite,
2247
+ scorerAverages,
2248
+ calculateBaselineScorerAverage,
2249
+ flagDiff,
2250
+ logger
2251
+ });
2252
+ logger("");
2253
+ }
2254
+ }
2241
2255
  if (anyRegistered && orgId && config?.consoleEndpointUrl) {
2242
2256
  if (suiteData.length === 1) {
2243
2257
  const suite = suiteData[0];
@@ -2500,11 +2514,11 @@ function setupEvalProvider(connection) {
2500
2514
  axiomProvider = new import_sdk_trace_node.NodeTracerProvider({
2501
2515
  resource: (0, import_resources.resourceFromAttributes)({
2502
2516
  ["service.name"]: "axiom",
2503
- ["service.version"]: "0.43.0"
2517
+ ["service.version"]: "0.44.0"
2504
2518
  }),
2505
2519
  spanProcessors: [processor]
2506
2520
  });
2507
- axiomTracer = axiomProvider.getTracer("axiom", "0.43.0");
2521
+ axiomTracer = axiomProvider.getTracer("axiom", "0.44.0");
2508
2522
  }
2509
2523
  async function initInstrumentation(config) {
2510
2524
  if (initialized) {
@@ -2516,7 +2530,7 @@ async function initInstrumentation(config) {
2516
2530
  }
2517
2531
  initializationPromise = (async () => {
2518
2532
  if (!config.enabled) {
2519
- axiomTracer = import_api10.trace.getTracer("axiom", "0.43.0");
2533
+ axiomTracer = import_api10.trace.getTracer("axiom", "0.44.0");
2520
2534
  initialized = true;
2521
2535
  return;
2522
2536
  }
@@ -2778,7 +2792,7 @@ var init_eval_command = __esm({
2778
2792
  ".",
2779
2793
  "any *.eval.ts file in current directory"
2780
2794
  )
2781
- ).option("-w, --watch true", "keep server running and watch for changes", false).option("-t, --token <TOKEN>", "axiom token", getDefaultToken).option("-d, --dataset <DATASET>", "axiom dataset name", process.env.AXIOM_DATASET).option("-u, --url <AXIOM URL>", "axiom url", getDefaultUrl).option("-o, --org-id <ORG ID>", "axiom organization id", getDefaultOrgId).option("-b, --baseline <BASELINE ID>", "id of baseline evaluation to compare against").option("--debug", "run locally without any network operations", false).option("--list", "list evaluations and test cases without running them", false).addOption(new import_commander.Option("-c, --console-url <URL>", "console url override").hideHelp()).action(async (target, options) => {
2795
+ ).option("-w, --watch true", "keep server running and watch for changes", false).option("-t, --token <TOKEN>", "axiom token", getDefaultToken).option("-d, --dataset <DATASET>", "axiom dataset name").option("-u, --url <AXIOM URL>", "axiom url", getDefaultUrl).option("-o, --org-id <ORG ID>", "axiom organization id", getDefaultOrgId).option("-b, --baseline <BASELINE ID>", "id of baseline evaluation to compare against").option("--debug", "run locally without any network operations", false).option("--list", "list evaluations and test cases without running them", false).addOption(new import_commander.Option("-c, --console-url <URL>", "console url override").hideHelp()).action(async (target, options) => {
2782
2796
  try {
2783
2797
  if (options.debug) {
2784
2798
  process.env.AXIOM_DEBUG = "true";
@@ -3259,7 +3273,7 @@ var import_commander2 = require("commander");
3259
3273
  var loadVersionCommand = (program2) => {
3260
3274
  return program2.addCommand(
3261
3275
  new import_commander2.Command("version").description("cli version").action(() => {
3262
- console.log("0.43.0");
3276
+ console.log("0.44.0");
3263
3277
  })
3264
3278
  );
3265
3279
  };
@@ -3269,7 +3283,7 @@ var { loadEnvConfig } = import_env.default;
3269
3283
  loadEnvConfig(process.cwd());
3270
3284
  var { cleanedArgv, overrides } = extractOverrides(process.argv.slice(2));
3271
3285
  var program = new import_commander3.Command();
3272
- program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.43.0");
3286
+ program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.44.0");
3273
3287
  program.hook("preAction", async (_, actionCommand) => {
3274
3288
  const commandName = actionCommand.name();
3275
3289
  const parentCommand = actionCommand.parent;