@agentv/core 4.26.0-next.1 → 4.26.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.
@@ -4262,6 +4262,26 @@ import { createWriteStream } from "node:fs";
4262
4262
  import { mkdir } from "node:fs/promises";
4263
4263
  import path5 from "node:path";
4264
4264
 
4265
+ // src/runtime/child-tracker.ts
4266
+ var tracked = /* @__PURE__ */ new Set();
4267
+ function trackChild(child) {
4268
+ tracked.add(child);
4269
+ child.once("close", () => {
4270
+ tracked.delete(child);
4271
+ });
4272
+ }
4273
+ function killAllTrackedChildren(signal = "SIGTERM") {
4274
+ for (const child of tracked) {
4275
+ try {
4276
+ child.kill(signal);
4277
+ } catch {
4278
+ }
4279
+ }
4280
+ }
4281
+ function trackedChildCount() {
4282
+ return tracked.size;
4283
+ }
4284
+
4265
4285
  // src/evaluation/providers/claude-content.ts
4266
4286
  function toContentArray(content) {
4267
4287
  if (!Array.isArray(content)) return void 0;
@@ -4774,6 +4794,7 @@ var ClaudeCliProvider = class {
4774
4794
  spawnOptions.cwd = options.cwd;
4775
4795
  }
4776
4796
  const child = spawn(this.config.executable, options.args, spawnOptions);
4797
+ trackChild(child);
4777
4798
  let stdout = "";
4778
4799
  let stderr = "";
4779
4800
  let timedOut = false;
@@ -6832,6 +6853,7 @@ var CopilotCliProvider = class {
6832
6853
  const agentProcess = spawn2(executable, args, {
6833
6854
  stdio: ["pipe", "pipe", "inherit"]
6834
6855
  });
6856
+ trackChild(agentProcess);
6835
6857
  await waitForProcessSpawn(agentProcess, executable, this.targetName);
6836
6858
  const toolCallsInProgress = /* @__PURE__ */ new Map();
6837
6859
  const completedToolCalls = [];
@@ -8838,6 +8860,7 @@ async function defaultPiRunner(options) {
8838
8860
  env: options.env,
8839
8861
  stdio: ["pipe", "pipe", "pipe"]
8840
8862
  });
8863
+ trackChild(child);
8841
8864
  let stdout = "";
8842
8865
  let stderr = "";
8843
8866
  let timedOut = false;
@@ -9848,6 +9871,7 @@ function spawnVsCode(vscodeCmd, args, options) {
9848
9871
  shell: useShell,
9849
9872
  detached: false
9850
9873
  });
9874
+ trackChild(child);
9851
9875
  child.on("error", (error) => {
9852
9876
  const label = options?.label ?? "spawn";
9853
9877
  const renderedArgs = args.map((value) => JSON.stringify(value)).join(" ");
@@ -15683,7 +15707,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
15683
15707
  return { tests: await loadTestsFromAgentSkills(evalFilePath) };
15684
15708
  }
15685
15709
  if (format === "typescript") {
15686
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-E6N374V2.js");
15710
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-BZ54W52K.js");
15687
15711
  return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
15688
15712
  }
15689
15713
  const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
@@ -15718,7 +15742,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
15718
15742
  return loadTestsFromAgentSkills(evalFilePath);
15719
15743
  }
15720
15744
  if (format === "typescript") {
15721
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-E6N374V2.js");
15745
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-BZ54W52K.js");
15722
15746
  const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
15723
15747
  return suite.tests;
15724
15748
  }
@@ -19537,6 +19561,9 @@ export {
19537
19561
  runRegexAssertion,
19538
19562
  runIsJsonAssertion,
19539
19563
  runEqualsAssertion,
19564
+ trackChild,
19565
+ killAllTrackedChildren,
19566
+ trackedChildCount,
19540
19567
  consumeClaudeLogEntries,
19541
19568
  subscribeToClaudeLogEntries,
19542
19569
  normalizeToolCall,
@@ -19590,4 +19617,4 @@ export {
19590
19617
  loadTestById,
19591
19618
  loadEvalCaseById
19592
19619
  };
19593
- //# sourceMappingURL=chunk-46TUI4JM.js.map
19620
+ //# sourceMappingURL=chunk-JNBHD34F.js.map