agentv 3.5.0 → 3.6.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.
package/README.md CHANGED
@@ -31,6 +31,11 @@ If you are not using Claude plugins, use the CLI directly.
31
31
 
32
32
  **1. Install:**
33
33
  ```bash
34
+ bun install -g agentv
35
+ ```
36
+
37
+ Or with npm:
38
+ ```bash
34
39
  npm install -g agentv
35
40
  ```
36
41
 
@@ -77,7 +82,7 @@ Learn more in the [examples/](examples/README.md) directory. For a detailed comp
77
82
 
78
83
  | Feature | AgentV | [LangWatch](https://github.com/langwatch/langwatch) | [LangSmith](https://github.com/langchain-ai/langsmith-sdk) | [LangFuse](https://github.com/langfuse/langfuse) |
79
84
  |---------|--------|-----------|-----------|----------|
80
- | **Setup** | `npm install agentv` | Cloud account + API key | Cloud account + API key | Cloud account + API key |
85
+ | **Setup** | `bun install -g agentv` | Cloud account + API key | Cloud account + API key | Cloud account + API key |
81
86
  | **Server** | None (local) | Managed cloud | Managed cloud | Managed cloud |
82
87
  | **Privacy** | All local | Cloud-hosted | Cloud-hosted | Cloud-hosted |
83
88
  | **CLI-first** | ✓ | ✗ | Limited | Limited |
@@ -562,10 +567,16 @@ Automatically retries on rate limits, transient 5xx errors, and network failures
562
567
 
563
568
  ## Troubleshooting
564
569
 
565
- ### `EACCES` permission error on global install
570
+ ### `EACCES` permission error on global install (npm)
566
571
 
567
- If you see `EACCES: permission denied` when running `npm install -g agentv`, npm is trying to write to a system directory. Fix this by configuring npm to use a user-owned directory:
572
+ If you see `EACCES: permission denied` when running `npm install -g agentv`, switch to bun (recommended) or configure npm to use a user-owned directory:
573
+
574
+ **Option 1 (recommended): Use bun instead**
575
+ ```bash
576
+ bun install -g agentv
577
+ ```
568
578
 
579
+ **Option 2: Fix npm permissions**
569
580
  ```bash
570
581
  mkdir -p ~/.npm-global
571
582
  npm config set prefix ~/.npm-global --location=user
@@ -16,7 +16,7 @@ import {
16
16
  validateEvalFile,
17
17
  validateFileReferences,
18
18
  validateTargetsFile
19
- } from "./chunk-RLL4QGNL.js";
19
+ } from "./chunk-UU5N43YS.js";
20
20
  import {
21
21
  createBuiltinRegistry,
22
22
  createProvider,
@@ -34,7 +34,7 @@ import {
34
34
  toSnakeCaseDeep as toSnakeCaseDeep2,
35
35
  transpileEvalYamlFile,
36
36
  trimBaselineResult
37
- } from "./chunk-D6G4N2H2.js";
37
+ } from "./chunk-K4RXLQWV.js";
38
38
  import {
39
39
  __commonJS,
40
40
  __esm,
@@ -3493,9 +3493,9 @@ var ASSERTION_TEMPLATES = {
3493
3493
  default: `#!/usr/bin/env bun
3494
3494
  import { defineAssertion } from '@agentv/eval';
3495
3495
 
3496
- export default defineAssertion(({ answer }) => {
3496
+ export default defineAssertion(({ outputText }) => {
3497
3497
  // TODO: Implement your assertion logic
3498
- const pass = answer.length > 0;
3498
+ const pass = outputText.length > 0;
3499
3499
  return {
3500
3500
  pass,
3501
3501
  reasoning: pass ? 'Output has content' : 'Output is empty',
@@ -3505,9 +3505,9 @@ export default defineAssertion(({ answer }) => {
3505
3505
  score: `#!/usr/bin/env bun
3506
3506
  import { defineAssertion } from '@agentv/eval';
3507
3507
 
3508
- export default defineAssertion(({ answer }) => {
3508
+ export default defineAssertion(({ outputText }) => {
3509
3509
  // TODO: Implement your scoring logic (0.0 to 1.0)
3510
- const score = answer.length > 0 ? 1.0 : 0.0;
3510
+ const score = outputText.length > 0 ? 1.0 : 0.0;
3511
3511
  return {
3512
3512
  pass: score >= 0.5,
3513
3513
  score,
@@ -3967,7 +3967,6 @@ var evalAssertCommand = command({
3967
3967
  }
3968
3968
  const payload = JSON.stringify(
3969
3969
  {
3970
- answer: resolvedOutput,
3971
3970
  output: [{ role: "assistant", content: resolvedOutput }],
3972
3971
  input: [{ role: "user", content: resolvedInput }],
3973
3972
  question: resolvedInput,
@@ -4185,7 +4184,7 @@ var evalRunCommand = command({
4185
4184
  },
4186
4185
  handler: async (args) => {
4187
4186
  if (args.evalPaths.length === 0 && process.stdin.isTTY) {
4188
- const { launchInteractiveWizard } = await import("./interactive-J7SUWZH2.js");
4187
+ const { launchInteractiveWizard } = await import("./interactive-5S4ILY2Y.js");
4189
4188
  await launchInteractiveWizard();
4190
4189
  return;
4191
4190
  }
@@ -4707,10 +4706,10 @@ function exportResults(sourceFile, content, outputDir) {
4707
4706
  const outputsDir = path8.join(outputDir, "outputs");
4708
4707
  mkdirSync2(outputsDir, { recursive: true });
4709
4708
  for (const result of patched) {
4710
- const answer = result.answer;
4711
- if (answer) {
4709
+ const outputText = result.outputText;
4710
+ if (outputText) {
4712
4711
  const id = safeTestId(result);
4713
- writeFileSync3(path8.join(outputsDir, `${id}.txt`), answer);
4712
+ writeFileSync3(path8.join(outputsDir, `${id}.txt`), outputText);
4714
4713
  }
4715
4714
  }
4716
4715
  }
@@ -5022,7 +5021,7 @@ function toTraceSummary(raw) {
5022
5021
  return toCamelCaseDeep(raw.trace);
5023
5022
  }
5024
5023
  function extractCandidate(raw) {
5025
- if (raw.answer !== void 0) return raw.answer;
5024
+ if (raw.output_text !== void 0) return raw.output_text;
5026
5025
  if (raw.output !== void 0)
5027
5026
  return typeof raw.output === "string" ? raw.output : JSON.stringify(raw.output);
5028
5027
  return "";
@@ -6278,4 +6277,4 @@ export {
6278
6277
  preprocessArgv,
6279
6278
  runCli
6280
6279
  };
6281
- //# sourceMappingURL=chunk-5GG6DDP5.js.map
6280
+ //# sourceMappingURL=chunk-IP5BO54H.js.map