@agentv/core 4.27.0 → 4.28.0-next.1

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.
@@ -0,0 +1,7 @@
1
+ import {
2
+ AgentvProvider
3
+ } from "./chunk-YDFZ7XN3.js";
4
+ export {
5
+ AgentvProvider
6
+ };
7
+ //# sourceMappingURL=agentv-provider-AYXH7WLW.js.map
@@ -17,7 +17,7 @@ import {
17
17
  readTextFile,
18
18
  resolveDelegatedTargetDefinition,
19
19
  resolveTargetDefinition
20
- } from "./chunk-7LQI7772.js";
20
+ } from "./chunk-YFXMMBUG.js";
21
21
  import {
22
22
  execFileWithStdin,
23
23
  execShellWithStdin
@@ -29,7 +29,7 @@ import {
29
29
  GeminiProvider,
30
30
  OpenAIProvider,
31
31
  OpenRouterProvider
32
- } from "./chunk-M5X2KMEA.js";
32
+ } from "./chunk-YDFZ7XN3.js";
33
33
 
34
34
  // src/evaluation/loaders/ts-eval-loader.ts
35
35
  import path46 from "node:path";
@@ -4723,6 +4723,9 @@ var ClaudeCliProvider = class {
4723
4723
  "--include-partial-messages",
4724
4724
  "--verbose"
4725
4725
  ];
4726
+ if (this.config.bypassPermissions !== false) {
4727
+ args.push("--dangerously-skip-permissions");
4728
+ }
4726
4729
  if (this.config.model) {
4727
4730
  args.push("--model", this.config.model);
4728
4731
  }
@@ -8930,7 +8933,7 @@ async function promptInstall() {
8930
8933
  try {
8931
8934
  return await new Promise((resolve) => {
8932
8935
  rl.question(
8933
- "@mariozechner/pi-coding-agent is not installed. Install it now? (y/N) ",
8936
+ "@earendil-works/pi-coding-agent is not installed. Install it now? (y/N) ",
8934
8937
  (answer) => resolve(answer.trim().toLowerCase() === "y")
8935
8938
  );
8936
8939
  });
@@ -8968,8 +8971,8 @@ function findAccessiblePath(paths) {
8968
8971
  async function tryImportLocalSdkModules() {
8969
8972
  try {
8970
8973
  [piCodingAgentModule, piAiModule] = await Promise.all([
8971
- import("@mariozechner/pi-coding-agent"),
8972
- import("@mariozechner/pi-ai")
8974
+ import("@earendil-works/pi-coding-agent"),
8975
+ import("@earendil-works/pi-ai")
8973
8976
  ]);
8974
8977
  return true;
8975
8978
  } catch {
@@ -8979,17 +8982,24 @@ async function tryImportLocalSdkModules() {
8979
8982
  async function tryImportManagedSdkModules() {
8980
8983
  const managedRoot = findManagedSdkInstallRoot();
8981
8984
  const piCodingAgentEntry = findAccessiblePath([
8982
- path16.join(managedRoot, "node_modules", "@mariozechner", "pi-coding-agent", "dist", "index.js")
8985
+ path16.join(
8986
+ managedRoot,
8987
+ "node_modules",
8988
+ "@earendil-works",
8989
+ "pi-coding-agent",
8990
+ "dist",
8991
+ "index.js"
8992
+ )
8983
8993
  ]);
8984
8994
  const piAiEntry = findAccessiblePath([
8985
- path16.join(managedRoot, "node_modules", "@mariozechner", "pi-ai", "dist", "index.js"),
8995
+ path16.join(managedRoot, "node_modules", "@earendil-works", "pi-ai", "dist", "index.js"),
8986
8996
  path16.join(
8987
8997
  managedRoot,
8988
8998
  "node_modules",
8989
- "@mariozechner",
8999
+ "@earendil-works",
8990
9000
  "pi-coding-agent",
8991
9001
  "node_modules",
8992
- "@mariozechner",
9002
+ "@earendil-works",
8993
9003
  "pi-ai",
8994
9004
  "dist",
8995
9005
  "index.js"
@@ -9010,16 +9020,16 @@ async function tryImportGlobalSdkModules() {
9010
9020
  const globalNpmRoot = resolveGlobalNpmRoot();
9011
9021
  if (!globalNpmRoot) return false;
9012
9022
  const piCodingAgentEntry = findAccessiblePath([
9013
- buildGlobalModuleEntry("@mariozechner/pi-coding-agent", globalNpmRoot)
9023
+ buildGlobalModuleEntry("@earendil-works/pi-coding-agent", globalNpmRoot)
9014
9024
  ]);
9015
9025
  const piAiEntry = findAccessiblePath([
9016
- buildGlobalModuleEntry("@mariozechner/pi-ai", globalNpmRoot),
9026
+ buildGlobalModuleEntry("@earendil-works/pi-ai", globalNpmRoot),
9017
9027
  path16.join(
9018
9028
  globalNpmRoot,
9019
- "@mariozechner",
9029
+ "@earendil-works",
9020
9030
  "pi-coding-agent",
9021
9031
  "node_modules",
9022
- "@mariozechner",
9032
+ "@earendil-works",
9023
9033
  "pi-ai",
9024
9034
  "dist",
9025
9035
  "index.js"
@@ -9037,9 +9047,9 @@ async function tryImportGlobalSdkModules() {
9037
9047
  }
9038
9048
  }
9039
9049
  function installSdkModules(installDir) {
9040
- console.error(`Installing @mariozechner/pi-coding-agent into ${installDir} via npm...`);
9050
+ console.error(`Installing @earendil-works/pi-coding-agent into ${installDir} via npm...`);
9041
9051
  mkdirSync(installDir, { recursive: true });
9042
- execSync2("npm install --no-save --no-package-lock @mariozechner/pi-coding-agent", {
9052
+ execSync2("npm install --no-save --no-package-lock @earendil-works/pi-coding-agent", {
9043
9053
  cwd: installDir,
9044
9054
  stdio: "inherit"
9045
9055
  });
@@ -9056,7 +9066,7 @@ async function doLoadSdkModules() {
9056
9066
  }
9057
9067
  }
9058
9068
  throw new Error(
9059
- "pi-coding-agent SDK is not installed. Install it with:\n npm install @mariozechner/pi-coding-agent"
9069
+ "pi-coding-agent SDK is not installed. Install it with:\n npm install @earendil-works/pi-coding-agent"
9060
9070
  );
9061
9071
  }
9062
9072
  async function loadSdkModules() {
@@ -12134,6 +12144,9 @@ function gitEnv2() {
12134
12144
  function getSourceUrl(source) {
12135
12145
  return source.type === "git" ? source.url : source.path;
12136
12146
  }
12147
+ function isFullCommitSha(ref) {
12148
+ return typeof ref === "string" && /^[0-9a-f]{40}$/i.test(ref);
12149
+ }
12137
12150
  async function git2(args, opts) {
12138
12151
  const { stdout } = await execFileAsync2("git", args, {
12139
12152
  cwd: opts?.cwd,
@@ -12244,8 +12257,10 @@ ${lines.join("\n")}`;
12244
12257
  }
12245
12258
  const ref = getRepoCheckoutRef(repo.checkout);
12246
12259
  const resolve = repo.checkout?.resolve ?? "remote";
12260
+ const baseCommit = repo.checkout?.base_commit;
12261
+ const shouldResolveLocally = resolve === "local" || repo.source.type === "git" && isFullCommitSha(baseCommit);
12247
12262
  let resolvedSha;
12248
- if (resolve === "remote" && repo.source.type === "git") {
12263
+ if (!shouldResolveLocally && repo.source.type === "git") {
12249
12264
  const url = getSourceUrl(repo.source);
12250
12265
  try {
12251
12266
  const lsOutput = await this.runGit(["ls-remote", url, ref]);
@@ -15707,7 +15722,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
15707
15722
  return { tests: await loadTestsFromAgentSkills(evalFilePath) };
15708
15723
  }
15709
15724
  if (format === "typescript") {
15710
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-BZ54W52K.js");
15725
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-EMSGL2BQ.js");
15711
15726
  return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
15712
15727
  }
15713
15728
  const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
@@ -15742,7 +15757,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
15742
15757
  return loadTestsFromAgentSkills(evalFilePath);
15743
15758
  }
15744
15759
  if (format === "typescript") {
15745
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-BZ54W52K.js");
15760
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-EMSGL2BQ.js");
15746
15761
  const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
15747
15762
  return suite.tests;
15748
15763
  }
@@ -16480,7 +16495,7 @@ async function runEvaluation(options) {
16480
16495
  if (!cliModel) {
16481
16496
  throw new Error('--grader-target "agentv" requires --model (e.g., "openai:gpt-5-mini")');
16482
16497
  }
16483
- const { AgentvProvider: AgentvProvider2 } = await import("./agentv-provider-7AMUD2GX.js");
16498
+ const { AgentvProvider: AgentvProvider2 } = await import("./agentv-provider-AYXH7WLW.js");
16484
16499
  return new AgentvProvider2("agentv", { model: cliModel, temperature: 0 });
16485
16500
  }
16486
16501
  const overrideTarget = resolveTargetByName(cliGraderTarget);
@@ -19617,4 +19632,4 @@ export {
19617
19632
  loadTestById,
19618
19633
  loadEvalCaseById
19619
19634
  };
19620
- //# sourceMappingURL=chunk-JNBHD34F.js.map
19635
+ //# sourceMappingURL=chunk-SCC35F3L.js.map