agentv 0.20.0 → 0.20.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.
@@ -4874,7 +4874,7 @@ function isAgentProvider(provider) {
4874
4874
  import { readFile as readFile5 } from "node:fs/promises";
4875
4875
  import path62 from "node:path";
4876
4876
  import { parse as parse22 } from "yaml";
4877
- import { readFile as readFile6 } from "node:fs/promises";
4877
+ import { readFile as readFile4 } from "node:fs/promises";
4878
4878
  import path22 from "node:path";
4879
4879
  import micromatch from "micromatch";
4880
4880
  import { parse as parse5 } from "yaml";
@@ -32488,11 +32488,11 @@ import { promisify as promisify22 } from "node:util";
32488
32488
  import path82 from "node:path";
32489
32489
  import path102 from "node:path";
32490
32490
 
32491
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/agentDispatch.js
32491
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/agentDispatch.js
32492
32492
  import { stat as stat3, writeFile as writeFile3 } from "node:fs/promises";
32493
32493
  import path10 from "node:path";
32494
32494
 
32495
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/utils/fs.js
32495
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/utils/fs.js
32496
32496
  import { constants as constants2 } from "node:fs";
32497
32497
  import { access as access2, mkdir, readdir, rm, stat } from "node:fs/promises";
32498
32498
  import path2 from "node:path";
@@ -32525,7 +32525,7 @@ async function removeIfExists(target) {
32525
32525
  }
32526
32526
  }
32527
32527
 
32528
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/utils/path.js
32528
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/utils/path.js
32529
32529
  import path3 from "node:path";
32530
32530
  function pathToFileUri(filePath) {
32531
32531
  const absolutePath = path3.isAbsolute(filePath) ? filePath : path3.resolve(filePath);
@@ -32536,11 +32536,10 @@ function pathToFileUri(filePath) {
32536
32536
  return `file://${normalizedPath}`;
32537
32537
  }
32538
32538
 
32539
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/promptBuilder.js
32540
- import { readFile as readFile2 } from "node:fs/promises";
32539
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/promptBuilder.js
32541
32540
  import path4 from "node:path";
32542
32541
 
32543
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/utils/template.js
32542
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/utils/template.js
32544
32543
  function renderTemplate(content, variables) {
32545
32544
  if (!content) {
32546
32545
  return content;
@@ -32561,8 +32560,12 @@ function renderTemplate(content, variables) {
32561
32560
  return result;
32562
32561
  }
32563
32562
 
32564
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/templates.js
32565
- var DEFAULT_REQUEST_TEMPLATE = `[[ ## system_instructions ## ]]
32563
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/templates.js
32564
+ var DEFAULT_REQUEST_TEMPLATE = `[[ ## task ## ]]
32565
+
32566
+ {{userQuery}}
32567
+
32568
+ [[ ## system_instructions ## ]]
32566
32569
 
32567
32570
  **IMPORTANT**: Follow these exact steps:
32568
32571
  1. Create and write your complete response to: {{responseFileTmp}}
@@ -32573,21 +32576,17 @@ if (Test-Path subagent.lock) { del subagent.lock }
32573
32576
  \`\`\`
32574
32577
 
32575
32578
  Do not proceed to step 2 until your response is completely written to the temporary file.
32576
-
32577
- [[ ## task ## ]]
32579
+ `;
32580
+ var DEFAULT_BATCH_REQUEST_TEMPLATE = `[[ ## task ## ]]
32578
32581
 
32579
32582
  {{userQuery}}
32580
- `;
32581
- var DEFAULT_BATCH_REQUEST_TEMPLATE = `[[ ## system_instructions ## ]]
32583
+
32584
+ [[ ## system_instructions ## ]]
32582
32585
 
32583
32586
  **IMPORTANT**: Follow these exact steps:
32584
32587
  1. Create and write your complete response to: {{responseFileTmp}}
32585
32588
  2. When completely finished and the response is stable, rename it to: {{responseFileFinal}}
32586
- 5. Do not unlock the workspace from this request; batch orchestration will handle unlocking after all responses are ready.
32587
-
32588
- [[ ## task ## ]]
32589
-
32590
- {{userQuery}}
32589
+ 3. Do not unlock the workspace from this request; batch orchestration will handle unlocking after all responses are ready.
32591
32590
  `;
32592
32591
  var DEFAULT_BATCH_ORCHESTRATOR_TEMPLATE = `MANDATORY: Run #runSubagent tool in your Available Actions for each request file to process them in isolated contexts.
32593
32592
  DO NOT read the request files yourself - only pass the file paths to each subagent:
@@ -32603,14 +32602,7 @@ if ($missing.Count -eq 0) { del subagent.lock }
32603
32602
  \`\`\`
32604
32603
  `;
32605
32604
 
32606
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/promptBuilder.js
32607
- async function loadTemplateFile(filePath) {
32608
- try {
32609
- return await readFile2(filePath, "utf8");
32610
- } catch (error40) {
32611
- throw new Error(`Failed to load template file '${filePath}': ${error40.message}`);
32612
- }
32613
- }
32605
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/promptBuilder.js
32614
32606
  function loadDefaultRequestTemplate() {
32615
32607
  return DEFAULT_REQUEST_TEMPLATE;
32616
32608
  }
@@ -32643,18 +32635,18 @@ function createBatchOrchestratorPrompt(requestFiles, responseFiles, templateCont
32643
32635
  });
32644
32636
  }
32645
32637
 
32646
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/responseWaiter.js
32647
- import { readFile as readFile3 } from "node:fs/promises";
32638
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/responseWaiter.js
32639
+ import { readFile as readFile2 } from "node:fs/promises";
32648
32640
  import path5 from "node:path";
32649
32641
 
32650
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/utils/time.js
32642
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/utils/time.js
32651
32643
  function sleep(ms) {
32652
32644
  return new Promise((resolve2) => {
32653
32645
  setTimeout(resolve2, ms);
32654
32646
  });
32655
32647
  }
32656
32648
 
32657
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/responseWaiter.js
32649
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/responseWaiter.js
32658
32650
  async function waitForResponseOutput(responseFileFinal, pollInterval = 1e3, silent = false) {
32659
32651
  if (!silent) {
32660
32652
  console.error(`waiting for agent to finish: ${responseFileFinal}`);
@@ -32673,7 +32665,7 @@ async function waitForResponseOutput(responseFileFinal, pollInterval = 1e3, sile
32673
32665
  const maxAttempts = 10;
32674
32666
  while (attempts < maxAttempts) {
32675
32667
  try {
32676
- const content = await readFile3(responseFileFinal, { encoding: "utf8" });
32668
+ const content = await readFile2(responseFileFinal, { encoding: "utf8" });
32677
32669
  if (!silent) {
32678
32670
  process.stdout.write(`${content}
32679
32671
  `);
@@ -32720,7 +32712,7 @@ async function waitForBatchResponses(responseFilesFinal, pollInterval = 1e3, sil
32720
32712
  const maxAttempts = 10;
32721
32713
  while (attempts < maxAttempts) {
32722
32714
  try {
32723
- const content = await readFile3(file2, { encoding: "utf8" });
32715
+ const content = await readFile2(file2, { encoding: "utf8" });
32724
32716
  if (!silent) {
32725
32717
  process.stdout.write(`${content}
32726
32718
  `);
@@ -32741,13 +32733,13 @@ async function waitForBatchResponses(responseFilesFinal, pollInterval = 1e3, sil
32741
32733
  return true;
32742
32734
  }
32743
32735
 
32744
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/vscodeProcess.js
32736
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/vscodeProcess.js
32745
32737
  import { exec, spawn } from "node:child_process";
32746
32738
  import { mkdir as mkdir2, writeFile } from "node:fs/promises";
32747
32739
  import path7 from "node:path";
32748
32740
  import { promisify } from "node:util";
32749
32741
 
32750
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/constants.js
32742
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/constants.js
32751
32743
  import os from "node:os";
32752
32744
  import path6 from "node:path";
32753
32745
  var DEFAULT_LOCK_NAME = "subagent.lock";
@@ -32758,7 +32750,7 @@ function getDefaultSubagentRoot(vscodeCmd = "code") {
32758
32750
  }
32759
32751
  var DEFAULT_SUBAGENT_ROOT = getDefaultSubagentRoot();
32760
32752
 
32761
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/vscodeProcess.js
32753
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/vscodeProcess.js
32762
32754
  var execAsync = promisify(exec);
32763
32755
  var DEFAULT_WAKEUP_CONTENT = `---
32764
32756
  description: 'Wake-up Signal'
@@ -32857,11 +32849,11 @@ async function launchVsCodeWithBatchChat(subagentDir, chatId, attachmentPaths, c
32857
32849
  }
32858
32850
  }
32859
32851
 
32860
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/workspaceManager.js
32861
- import { copyFile, mkdir as mkdir3, readFile as readFile4, readdir as readdir2, stat as stat2, writeFile as writeFile2 } from "node:fs/promises";
32852
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/workspaceManager.js
32853
+ import { copyFile, mkdir as mkdir3, readFile as readFile3, readdir as readdir2, stat as stat2, writeFile as writeFile2 } from "node:fs/promises";
32862
32854
  import path9 from "node:path";
32863
32855
 
32864
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/utils/workspace.js
32856
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/utils/workspace.js
32865
32857
  import path8 from "node:path";
32866
32858
 
32867
32859
  // ../../node_modules/.bun/json5@2.2.3/node_modules/json5/dist/index.mjs
@@ -33949,7 +33941,7 @@ var JSON5 = {
33949
33941
  var lib = JSON5;
33950
33942
  var dist_default = lib;
33951
33943
 
33952
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/utils/workspace.js
33944
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/utils/workspace.js
33953
33945
  function transformWorkspacePaths(workspaceContent, templateDir) {
33954
33946
  let workspace;
33955
33947
  try {
@@ -34019,7 +34011,7 @@ function transformWorkspacePaths(workspaceContent, templateDir) {
34019
34011
  return JSON.stringify(transformedWorkspace, null, 2);
34020
34012
  }
34021
34013
 
34022
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/workspaceManager.js
34014
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/workspaceManager.js
34023
34015
  var DEFAULT_WORKSPACE_TEMPLATE = {
34024
34016
  folders: [
34025
34017
  {
@@ -34058,7 +34050,7 @@ async function copyAgentConfig(subagentDir, workspaceTemplate) {
34058
34050
  if (!stats.isFile()) {
34059
34051
  throw new Error(`workspace template must be a file, not a directory: ${workspaceSrc}`);
34060
34052
  }
34061
- const templateText = await readFile4(workspaceSrc, "utf8");
34053
+ const templateText = await readFile3(workspaceSrc, "utf8");
34062
34054
  workspaceContent = JSON.parse(templateText);
34063
34055
  } else {
34064
34056
  workspaceContent = DEFAULT_WORKSPACE_TEMPLATE;
@@ -34126,7 +34118,7 @@ async function prepareSubagentDirectory(subagentDir, promptFile, chatId, workspa
34126
34118
  return 0;
34127
34119
  }
34128
34120
 
34129
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/agentDispatch.js
34121
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/agentDispatch.js
34130
34122
  function generateTimestamp() {
34131
34123
  return (/* @__PURE__ */ new Date()).toISOString().replace(/[-:TZ.]/g, "").slice(0, 14);
34132
34124
  }
@@ -34170,15 +34162,7 @@ async function dispatchAgentSession(options) {
34170
34162
  error: error40.message
34171
34163
  };
34172
34164
  }
34173
- let templateContent;
34174
- try {
34175
- templateContent = requestTemplate ? await loadTemplateFile(path10.resolve(requestTemplate)) : loadDefaultRequestTemplate();
34176
- } catch (error40) {
34177
- return {
34178
- exitCode: 1,
34179
- error: error40.message
34180
- };
34181
- }
34165
+ const templateContent = requestTemplate ?? loadDefaultRequestTemplate();
34182
34166
  const subagentRootPath = subagentRoot ?? getSubagentRoot(vscodeCmd);
34183
34167
  const subagentDir = await findUnlockedSubagent(subagentRootPath);
34184
34168
  if (!subagentDir) {
@@ -34288,17 +34272,7 @@ async function dispatchBatchAgent(options) {
34288
34272
  error: error40.message
34289
34273
  };
34290
34274
  }
34291
- let batchRequestTemplateContent;
34292
- try {
34293
- batchRequestTemplateContent = requestTemplate ? await loadTemplateFile(path10.resolve(requestTemplate)) : loadDefaultBatchRequestTemplate();
34294
- } catch (error40) {
34295
- return {
34296
- exitCode: 1,
34297
- requestFiles,
34298
- queryCount,
34299
- error: error40.message
34300
- };
34301
- }
34275
+ const batchRequestTemplateContent = requestTemplate ?? loadDefaultBatchRequestTemplate();
34302
34276
  const orchestratorTemplateContent = loadDefaultBatchOrchestratorTemplate();
34303
34277
  const subagentRootPath = subagentRoot ?? getSubagentRoot(vscodeCmd);
34304
34278
  const subagentDir = await findUnlockedSubagent(subagentRootPath);
@@ -34406,7 +34380,7 @@ async function dispatchBatchAgent(options) {
34406
34380
  }
34407
34381
  }
34408
34382
 
34409
- // ../../node_modules/.bun/subagent@0.5.5/node_modules/subagent/dist/vscode/provision.js
34383
+ // ../../node_modules/.bun/subagent@0.5.6/node_modules/subagent/dist/vscode/provision.js
34410
34384
  import { writeFile as writeFile4 } from "node:fs/promises";
34411
34385
  import path11 from "node:path";
34412
34386
  var DEFAULT_WORKSPACE_TEMPLATE2 = {
@@ -34534,7 +34508,7 @@ async function provisionSubagents(options) {
34534
34508
 
34535
34509
  // ../../packages/core/dist/index.js
34536
34510
  import { constants as constants32 } from "node:fs";
34537
- import { access as access32, readFile as readFile62 } from "node:fs/promises";
34511
+ import { access as access32, readFile as readFile6 } from "node:fs/promises";
34538
34512
  import path112 from "node:path";
34539
34513
  import { parse as parse32 } from "yaml";
34540
34514
  import { createHash, randomUUID as randomUUID2 } from "node:crypto";
@@ -34767,7 +34741,7 @@ async function loadConfig(evalFilePath, repoRoot) {
34767
34741
  continue;
34768
34742
  }
34769
34743
  try {
34770
- const rawConfig = await readFile6(configPath, "utf8");
34744
+ const rawConfig = await readFile4(configPath, "utf8");
34771
34745
  const parsed = parse5(rawConfig);
34772
34746
  if (!isJsonObject(parsed)) {
34773
34747
  logWarning(`Invalid .agentv/config.yaml format at ${configPath}`);
@@ -36932,38 +36906,38 @@ var MockProvider = class {
36932
36906
  return this.delayMs;
36933
36907
  }
36934
36908
  };
36935
- var AGENTV_REQUEST_TEMPLATE = `[[ ## system_instructions ## ]]
36909
+ var AGENTV_REQUEST_TEMPLATE = `[[ ## task ## ]]
36936
36910
 
36937
- **IMPORTANT**: You are processing an evaluation request from AgentV. Follow these exact steps:
36911
+ {{userQuery}}
36938
36912
 
36939
- 1. Read and understand all guideline files and attachments provided above
36940
- 2. Process the user query below according to the guidelines
36941
- 3. Write your complete response to: {{responseFileTmp}}
36942
- 4. When completely finished, run these PowerShell commands to signal completion:
36943
- \`\`\`powershell
36913
+ [[ ## system_instructions ## ]]
36914
+
36915
+ **IMPORTANT**: Follow these exact steps:
36916
+ 1. Create and write your complete response to: {{responseFileTmp}}
36917
+ - Do NOT create any additional output files in the workspace.
36918
+ - All intended file outputs/changes MUST be written in your response file.
36919
+ - For each intended file, include the repo name, relative path and unified git diff following the convention \`diff --git ...\`.
36920
+ 2. When completely finished, run these PowerShell commands to signal completion:
36921
+ \`\`\`
36944
36922
  Move-Item -LiteralPath '{{responseFileTmp}}' -Destination '{{responseFileFinal}}'
36945
- if (Test-Path subagent.lock) { Remove-Item subagent.lock }
36923
+ if (Test-Path subagent.lock) { del subagent.lock }
36946
36924
  \`\`\`
36947
36925
 
36948
- Do not proceed to step 4 until your response is completely written to the temporary file.
36949
-
36950
- [[ ## task ## ]]
36951
-
36952
- {{userQuery}}
36926
+ Do not proceed to step 2 until your response is completely written to the temporary file.
36953
36927
  `;
36954
- var AGENTV_BATCH_REQUEST_TEMPLATE = `[[ ## system_instructions ## ]]
36928
+ var AGENTV_BATCH_REQUEST_TEMPLATE = `[[ ## task ## ]]
36955
36929
 
36956
- **IMPORTANT**: You are processing a batch evaluation request from AgentV. Follow these exact steps:
36957
-
36958
- 1. Read and understand all guideline files and attachments provided above
36959
- 2. Process the user query below according to the guidelines
36960
- 3. Write your complete response to: {{responseFileTmp}}
36961
- 4. When completely finished and the response is stable, rename it to: {{responseFileFinal}}
36962
- 5. Do not unlock the workspace from this request; batch orchestration will handle unlocking after all responses are ready.
36930
+ {{userQuery}}
36963
36931
 
36964
- [[ ## task ## ]]
36932
+ [[ ## system_instructions ## ]]
36965
36933
 
36966
- {{userQuery}}
36934
+ **IMPORTANT**: Follow these exact steps:
36935
+ 1. Create and write your complete response to: {{responseFileTmp}}
36936
+ - Do NOT create any additional output files in the workspace.
36937
+ - All intended file outputs/changes MUST be written in your response file.
36938
+ - For each intended file, include the repo name, relative path and unified git diff following the convention \`diff --git ...\`.
36939
+ 2. When completely finished and the response is stable, rename it to: {{responseFileFinal}}
36940
+ 3. Do not unlock the workspace from this request; batch orchestration will handle unlocking after all responses are ready.
36967
36941
  `;
36968
36942
  var VSCodeProvider = class {
36969
36943
  id;
@@ -37251,7 +37225,7 @@ async function readTargetDefinitions(filePath) {
37251
37225
  if (!await fileExists3(absolutePath)) {
37252
37226
  throw new Error(`targets.yaml not found at ${absolutePath}`);
37253
37227
  }
37254
- const raw = await readFile62(absolutePath, "utf8");
37228
+ const raw = await readFile6(absolutePath, "utf8");
37255
37229
  const parsed = parse32(raw);
37256
37230
  if (!isRecord(parsed)) {
37257
37231
  throw new Error(`targets.yaml at ${absolutePath} must be a YAML object with a 'targets' field`);
@@ -41163,4 +41137,4 @@ export {
41163
41137
  createProgram,
41164
41138
  runCli
41165
41139
  };
41166
- //# sourceMappingURL=chunk-N7M3URIJ.js.map
41140
+ //# sourceMappingURL=chunk-GDGNKNKP.js.map