agentv 2.5.7 → 2.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.
@@ -1047,9 +1047,6 @@ var require_dist = __commonJS({
1047
1047
  }
1048
1048
  });
1049
1049
 
1050
- // src/index.ts
1051
- import { readFileSync as readFileSync5 } from "node:fs";
1052
-
1053
1050
  // ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
1054
1051
  var ANSI_BACKGROUND_OFFSET = 10;
1055
1052
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -2857,6 +2854,52 @@ function oneOf(literals) {
2857
2854
  };
2858
2855
  }
2859
2856
 
2857
+ // package.json
2858
+ var package_default = {
2859
+ name: "agentv",
2860
+ version: "2.6.0",
2861
+ description: "CLI entry point for AgentV",
2862
+ type: "module",
2863
+ repository: {
2864
+ type: "git",
2865
+ url: "https://github.com/EntityProcess/agentv.git"
2866
+ },
2867
+ homepage: "https://github.com/EntityProcess/agentv#readme",
2868
+ bugs: {
2869
+ url: "https://github.com/EntityProcess/agentv/issues"
2870
+ },
2871
+ bin: {
2872
+ agentv: "./dist/cli.js"
2873
+ },
2874
+ files: ["dist", "README.md"],
2875
+ scripts: {
2876
+ dev: "bun --watch src/index.ts",
2877
+ build: "tsup && bun run copy-readme",
2878
+ "copy-readme": `bun -e "import { cpSync } from 'fs'; cpSync('../../README.md', 'README.md')"`,
2879
+ prepublishOnly: "bun run copy-readme",
2880
+ typecheck: "tsc --noEmit",
2881
+ lint: "biome check .",
2882
+ format: "biome format --write .",
2883
+ fix: "biome check --write .",
2884
+ test: "bun test",
2885
+ "test:watch": "bun test --watch"
2886
+ },
2887
+ dependencies: {
2888
+ "@agentv/core": "workspace:*",
2889
+ "@mariozechner/pi-agent-core": "^0.50.9",
2890
+ "@mariozechner/pi-ai": "^0.50.9",
2891
+ "cmd-ts": "^0.14.3",
2892
+ dotenv: "^16.4.5",
2893
+ "fast-glob": "^3.3.3",
2894
+ json5: "^2.2.3",
2895
+ micromatch: "^4.0.8",
2896
+ yaml: "^2.6.1"
2897
+ },
2898
+ devDependencies: {
2899
+ execa: "^9.3.0"
2900
+ }
2901
+ };
2902
+
2860
2903
  // src/commands/compare/index.ts
2861
2904
  import { readFileSync } from "node:fs";
2862
2905
 
@@ -3087,7 +3130,7 @@ var compareCommand = command({
3087
3130
  import { readFileSync as readFileSync2, writeFileSync } from "node:fs";
3088
3131
  import path27 from "node:path";
3089
3132
 
3090
- // ../../packages/core/dist/chunk-LGQ5OPJD.js
3133
+ // ../../packages/core/dist/chunk-SSPAANFZ.js
3091
3134
  import { constants } from "node:fs";
3092
3135
  import { access, readFile } from "node:fs/promises";
3093
3136
  import path from "node:path";
@@ -7134,7 +7177,7 @@ var coerce = {
7134
7177
  };
7135
7178
  var NEVER = INVALID;
7136
7179
 
7137
- // ../../packages/core/dist/chunk-LGQ5OPJD.js
7180
+ // ../../packages/core/dist/chunk-SSPAANFZ.js
7138
7181
  async function fileExists(filePath) {
7139
7182
  try {
7140
7183
  await access(filePath, constants.F_OK);
@@ -40778,13 +40821,13 @@ async function loadPiModules() {
40778
40821
  if (!piAgentModule || !piAiModule) {
40779
40822
  try {
40780
40823
  [piAgentModule, piAiModule] = await Promise.all([
40781
- import("@mariozechner/pi-agent"),
40824
+ import("@mariozechner/pi-agent-core"),
40782
40825
  import("@mariozechner/pi-ai")
40783
40826
  ]);
40784
40827
  } catch (error40) {
40785
40828
  throw new Error(
40786
40829
  `Failed to load pi-agent-sdk dependencies. Please install them:
40787
- npm install @mariozechner/pi-agent @mariozechner/pi-ai
40830
+ npm install @mariozechner/pi-agent-core @mariozechner/pi-ai
40788
40831
 
40789
40832
  Original error: ${error40 instanceof Error ? error40.message : String(error40)}`
40790
40833
  );
@@ -40792,7 +40835,6 @@ Original error: ${error40 instanceof Error ? error40.message : String(error40)}`
40792
40835
  }
40793
40836
  return {
40794
40837
  Agent: piAgentModule.Agent,
40795
- ProviderTransport: piAgentModule.ProviderTransport,
40796
40838
  getModel: piAiModule.getModel,
40797
40839
  getEnvApiKey: piAiModule.getEnvApiKey
40798
40840
  };
@@ -40812,17 +40854,12 @@ var PiAgentSdkProvider = class {
40812
40854
  if (request.signal?.aborted) {
40813
40855
  throw new Error("Pi agent SDK request was aborted before execution");
40814
40856
  }
40815
- const { Agent, ProviderTransport, getModel, getEnvApiKey } = await loadPiModules();
40857
+ const { Agent, getModel, getEnvApiKey } = await loadPiModules();
40816
40858
  const startTime = Date.now();
40817
40859
  const providerName = this.config.provider ?? "anthropic";
40818
40860
  const modelId = this.config.model ?? "claude-sonnet-4-20250514";
40819
40861
  const model = getModel(providerName, modelId);
40820
40862
  const systemPrompt = this.config.systemPrompt ?? "Answer directly and concisely.";
40821
- const transport = new ProviderTransport({
40822
- getApiKey: async (provider) => {
40823
- return this.config.apiKey ?? getEnvApiKey(provider) ?? void 0;
40824
- }
40825
- });
40826
40863
  const agent = new Agent({
40827
40864
  initialState: {
40828
40865
  systemPrompt,
@@ -40831,7 +40868,9 @@ var PiAgentSdkProvider = class {
40831
40868
  // No tools for simple Q&A
40832
40869
  messages: []
40833
40870
  },
40834
- transport
40871
+ getApiKey: async (provider) => {
40872
+ return this.config.apiKey ?? getEnvApiKey(provider) ?? void 0;
40873
+ }
40835
40874
  });
40836
40875
  const outputMessages = [];
40837
40876
  let finalAssistantContent = "";
@@ -40921,10 +40960,10 @@ function extractToolCalls2(content) {
40921
40960
  continue;
40922
40961
  }
40923
40962
  const p = part;
40924
- if (p.type === "tool_use" && typeof p.name === "string") {
40963
+ if (p.type === "toolCall" && typeof p.name === "string") {
40925
40964
  toolCalls.push({
40926
40965
  tool: p.name,
40927
- input: p.input,
40966
+ input: p.arguments,
40928
40967
  id: typeof p.id === "string" ? p.id : void 0
40929
40968
  });
40930
40969
  }
@@ -44500,6 +44539,7 @@ var FieldAccuracyEvaluator = class {
44500
44539
  score: clampScore(score),
44501
44540
  verdict: scoreToVerdict(score),
44502
44541
  hits: hits.slice(0, 4),
44542
+ // Cap at 4 to keep output concise
44503
44543
  misses: misses.slice(0, 4),
44504
44544
  expectedAspectCount: results.length,
44505
44545
  reasoning
@@ -49097,10 +49137,6 @@ var initCmdTsCommand = command({
49097
49137
 
49098
49138
  // src/commands/self/index.ts
49099
49139
  import { spawn as spawn6 } from "node:child_process";
49100
- import { readFileSync as readFileSync4 } from "node:fs";
49101
- var packageJson = JSON.parse(
49102
- readFileSync4(new URL("../../../package.json", import.meta.url), "utf8")
49103
- );
49104
49140
  function detectPackageManagerFromPath(scriptPath) {
49105
49141
  if (scriptPath.includes(".bun")) {
49106
49142
  return "bun";
@@ -49142,7 +49178,7 @@ var updateCommand = command({
49142
49178
  } else {
49143
49179
  pm = detectPackageManager();
49144
49180
  }
49145
- const currentVersion = packageJson.version;
49181
+ const currentVersion = package_default.version;
49146
49182
  console.log(`Current version: ${currentVersion}`);
49147
49183
  console.log(`Updating agentv using ${pm}...
49148
49184
  `);
@@ -49392,11 +49428,10 @@ var validateCommand = command({
49392
49428
  });
49393
49429
 
49394
49430
  // src/index.ts
49395
- var packageJson2 = JSON.parse(readFileSync5(new URL("../package.json", import.meta.url), "utf8"));
49396
49431
  var app = subcommands({
49397
49432
  name: "agentv",
49398
49433
  description: "AgentV CLI",
49399
- version: packageJson2.version,
49434
+ version: package_default.version,
49400
49435
  cmds: {
49401
49436
  compare: compareCommand,
49402
49437
  convert: convertCommand,
@@ -49415,4 +49450,4 @@ export {
49415
49450
  app,
49416
49451
  runCli
49417
49452
  };
49418
- //# sourceMappingURL=chunk-KM7W27VC.js.map
49453
+ //# sourceMappingURL=chunk-MGK6HHRR.js.map