axiom 0.42.0 → 0.43.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 (50) hide show
  1. package/README.md +2 -1
  2. package/dist/bin.cjs +18 -8
  3. package/dist/bin.cjs.map +1 -1
  4. package/dist/bin.js +4 -4
  5. package/dist/chunk-HCJKRSW4.js +28 -0
  6. package/dist/chunk-HCJKRSW4.js.map +1 -0
  7. package/dist/chunk-KPQJE7AU.js +219 -0
  8. package/dist/chunk-KPQJE7AU.js.map +1 -0
  9. package/dist/{chunk-N6WWQZ4E.js → chunk-N4LWNPI5.js} +1 -1
  10. package/dist/chunk-N4LWNPI5.js.map +1 -0
  11. package/dist/{chunk-AF26RXVP.js → chunk-OGWPMUHQ.js} +8 -8
  12. package/dist/chunk-OGWPMUHQ.js.map +1 -0
  13. package/dist/{chunk-7AIWUQUO.js → chunk-QSI2ES43.js} +3 -3
  14. package/dist/{chunk-DL77W2XP.js → chunk-T7DGZCOP.js} +12 -2
  15. package/dist/chunk-T7DGZCOP.js.map +1 -0
  16. package/dist/evals/online.cjs +539 -0
  17. package/dist/evals/online.cjs.map +1 -0
  18. package/dist/evals/online.d.cts +132 -0
  19. package/dist/evals/online.d.ts +132 -0
  20. package/dist/evals/online.js +14 -0
  21. package/dist/evals/online.js.map +1 -0
  22. package/dist/evals/scorers.cjs +2 -4
  23. package/dist/evals/scorers.cjs.map +1 -1
  24. package/dist/evals/scorers.d.cts +2 -1
  25. package/dist/evals/scorers.d.ts +2 -1
  26. package/dist/evals/scorers.js +2 -3
  27. package/dist/evals/scorers.js.map +1 -1
  28. package/dist/evals.cjs +34 -7
  29. package/dist/evals.cjs.map +1 -1
  30. package/dist/evals.d.cts +7 -3
  31. package/dist/evals.d.ts +7 -3
  32. package/dist/evals.js +22 -13
  33. package/dist/evals.js.map +1 -1
  34. package/dist/index.cjs +186 -50
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +15 -106
  37. package/dist/index.d.ts +15 -106
  38. package/dist/index.js +24 -117
  39. package/dist/index.js.map +1 -1
  40. package/dist/{run-vitest-TX7FOGF2.js → run-vitest-ZLJB4UJX.js} +4 -4
  41. package/dist/scorer.types-BY_ig9od.d.cts +38 -0
  42. package/dist/scorer.types-DMiCs7kl.d.ts +38 -0
  43. package/dist/{scorers-BQJ3Xrf7.d.ts → scorers-FD50_6M6.d.cts} +9 -40
  44. package/dist/{scorers-CiX7MIog.d.cts → scorers-ZbAJP2FN.d.ts} +9 -40
  45. package/package.json +11 -1
  46. package/dist/chunk-AF26RXVP.js.map +0 -1
  47. package/dist/chunk-DL77W2XP.js.map +0 -1
  48. package/dist/chunk-N6WWQZ4E.js.map +0 -1
  49. /package/dist/{chunk-7AIWUQUO.js.map → chunk-QSI2ES43.js.map} +0 -0
  50. /package/dist/{run-vitest-TX7FOGF2.js.map → run-vitest-ZLJB4UJX.js.map} +0 -0
package/README.md CHANGED
@@ -82,8 +82,9 @@ const result = await withSpan(
82
82
  For running scorers in production (without vitest dependency):
83
83
 
84
84
  ```ts
85
- import { withSpan, onlineEval } from 'axiom/ai';
85
+ import { withSpan } from 'axiom/ai';
86
86
  import { Scorer } from 'axiom/ai/evals/scorers';
87
+ import { onlineEval } from 'axiom/ai/evals/online';
87
88
 
88
89
  const formatScorer = Scorer('format-check', ({ output }: { output: string }) => {
89
90
  return output.length > 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.42.0",
556
+ version: "0.43.0",
557
557
  type: "module",
558
558
  author: "Axiom, Inc.",
559
559
  contributors: [
@@ -619,6 +619,16 @@ var init_package = __esm({
619
619
  default: "./dist/evals/scorers.cjs"
620
620
  }
621
621
  },
622
+ "./ai/evals/online": {
623
+ import: {
624
+ types: "./dist/evals/online.d.ts",
625
+ default: "./dist/evals/online.js"
626
+ },
627
+ require: {
628
+ types: "./dist/evals/online.d.cts",
629
+ default: "./dist/evals/online.cjs"
630
+ }
631
+ },
622
632
  "./ai/config": {
623
633
  import: {
624
634
  types: "./dist/config.d.ts",
@@ -2234,11 +2244,11 @@ function printFinalReport({
2234
2244
  const baselineParam = suite.baseline?.traceId ? `?baselineId=${suite.baseline.traceId}` : "";
2235
2245
  logger("View eval result:");
2236
2246
  logger(
2237
- `${config.consoleEndpointUrl}/${orgId}/ai-engineering/evaluations/${suite.name}/${suite.version}${baselineParam}`
2247
+ `${config.consoleEndpointUrl}/${orgId}/ai/evaluations/${suite.name}/${suite.version}${baselineParam}`
2238
2248
  );
2239
2249
  } else {
2240
2250
  logger("View full report:");
2241
- logger(`${config.consoleEndpointUrl}/${orgId}/ai-engineering/evaluations?runId=${runId}`);
2251
+ logger(`${config.consoleEndpointUrl}/${orgId}/ai/evaluations?runId=${runId}`);
2242
2252
  }
2243
2253
  } else if (isDebug) {
2244
2254
  logger(u.dim("Results not uploaded to Axiom (debug mode)"));
@@ -2490,11 +2500,11 @@ function setupEvalProvider(connection) {
2490
2500
  axiomProvider = new import_sdk_trace_node.NodeTracerProvider({
2491
2501
  resource: (0, import_resources.resourceFromAttributes)({
2492
2502
  ["service.name"]: "axiom",
2493
- ["service.version"]: "0.42.0"
2503
+ ["service.version"]: "0.43.0"
2494
2504
  }),
2495
2505
  spanProcessors: [processor]
2496
2506
  });
2497
- axiomTracer = axiomProvider.getTracer("axiom", "0.42.0");
2507
+ axiomTracer = axiomProvider.getTracer("axiom", "0.43.0");
2498
2508
  }
2499
2509
  async function initInstrumentation(config) {
2500
2510
  if (initialized) {
@@ -2506,7 +2516,7 @@ async function initInstrumentation(config) {
2506
2516
  }
2507
2517
  initializationPromise = (async () => {
2508
2518
  if (!config.enabled) {
2509
- axiomTracer = import_api10.trace.getTracer("axiom", "0.42.0");
2519
+ axiomTracer = import_api10.trace.getTracer("axiom", "0.43.0");
2510
2520
  initialized = true;
2511
2521
  return;
2512
2522
  }
@@ -3249,7 +3259,7 @@ var import_commander2 = require("commander");
3249
3259
  var loadVersionCommand = (program2) => {
3250
3260
  return program2.addCommand(
3251
3261
  new import_commander2.Command("version").description("cli version").action(() => {
3252
- console.log("0.42.0");
3262
+ console.log("0.43.0");
3253
3263
  })
3254
3264
  );
3255
3265
  };
@@ -3259,7 +3269,7 @@ var { loadEnvConfig } = import_env.default;
3259
3269
  loadEnvConfig(process.cwd());
3260
3270
  var { cleanedArgv, overrides } = extractOverrides(process.argv.slice(2));
3261
3271
  var program = new import_commander3.Command();
3262
- program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.42.0");
3272
+ program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.43.0");
3263
3273
  program.hook("preAction", async (_, actionCommand) => {
3264
3274
  const commandName = actionCommand.name();
3265
3275
  const parentCommand = actionCommand.parent;