@google/gemini-cli-a2a-server 0.35.0-preview.5 → 0.35.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.
@@ -1304,7 +1304,7 @@ var require_safe_stable_stringify = __commonJS({
1304
1304
  return circularValue;
1305
1305
  }
1306
1306
  let res = "";
1307
- let join34 = ",";
1307
+ let join35 = ",";
1308
1308
  const originalIndentation = indentation;
1309
1309
  if (Array.isArray(value)) {
1310
1310
  if (value.length === 0) {
@@ -1318,7 +1318,7 @@ var require_safe_stable_stringify = __commonJS({
1318
1318
  indentation += spacer;
1319
1319
  res += `
1320
1320
  ${indentation}`;
1321
- join34 = `,
1321
+ join35 = `,
1322
1322
  ${indentation}`;
1323
1323
  }
1324
1324
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -1326,13 +1326,13 @@ ${indentation}`;
1326
1326
  for (; i4 < maximumValuesToStringify - 1; i4++) {
1327
1327
  const tmp2 = stringifyFnReplacer(String(i4), value, stack, replacer, spacer, indentation);
1328
1328
  res += tmp2 !== void 0 ? tmp2 : "null";
1329
- res += join34;
1329
+ res += join35;
1330
1330
  }
1331
1331
  const tmp = stringifyFnReplacer(String(i4), value, stack, replacer, spacer, indentation);
1332
1332
  res += tmp !== void 0 ? tmp : "null";
1333
1333
  if (value.length - 1 > maximumBreadth) {
1334
1334
  const removedKeys = value.length - maximumBreadth - 1;
1335
- res += `${join34}"... ${getItemCount(removedKeys)} not stringified"`;
1335
+ res += `${join35}"... ${getItemCount(removedKeys)} not stringified"`;
1336
1336
  }
1337
1337
  if (spacer !== "") {
1338
1338
  res += `
@@ -1353,7 +1353,7 @@ ${originalIndentation}`;
1353
1353
  let separator = "";
1354
1354
  if (spacer !== "") {
1355
1355
  indentation += spacer;
1356
- join34 = `,
1356
+ join35 = `,
1357
1357
  ${indentation}`;
1358
1358
  whitespace = " ";
1359
1359
  }
@@ -1367,13 +1367,13 @@ ${indentation}`;
1367
1367
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
1368
1368
  if (tmp !== void 0) {
1369
1369
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
1370
- separator = join34;
1370
+ separator = join35;
1371
1371
  }
1372
1372
  }
1373
1373
  if (keyLength > maximumBreadth) {
1374
1374
  const removedKeys = keyLength - maximumBreadth;
1375
1375
  res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
1376
- separator = join34;
1376
+ separator = join35;
1377
1377
  }
1378
1378
  if (spacer !== "" && separator.length > 1) {
1379
1379
  res = `
@@ -1414,7 +1414,7 @@ ${originalIndentation}`;
1414
1414
  }
1415
1415
  const originalIndentation = indentation;
1416
1416
  let res = "";
1417
- let join34 = ",";
1417
+ let join35 = ",";
1418
1418
  if (Array.isArray(value)) {
1419
1419
  if (value.length === 0) {
1420
1420
  return "[]";
@@ -1427,7 +1427,7 @@ ${originalIndentation}`;
1427
1427
  indentation += spacer;
1428
1428
  res += `
1429
1429
  ${indentation}`;
1430
- join34 = `,
1430
+ join35 = `,
1431
1431
  ${indentation}`;
1432
1432
  }
1433
1433
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -1435,13 +1435,13 @@ ${indentation}`;
1435
1435
  for (; i4 < maximumValuesToStringify - 1; i4++) {
1436
1436
  const tmp2 = stringifyArrayReplacer(String(i4), value[i4], stack, replacer, spacer, indentation);
1437
1437
  res += tmp2 !== void 0 ? tmp2 : "null";
1438
- res += join34;
1438
+ res += join35;
1439
1439
  }
1440
1440
  const tmp = stringifyArrayReplacer(String(i4), value[i4], stack, replacer, spacer, indentation);
1441
1441
  res += tmp !== void 0 ? tmp : "null";
1442
1442
  if (value.length - 1 > maximumBreadth) {
1443
1443
  const removedKeys = value.length - maximumBreadth - 1;
1444
- res += `${join34}"... ${getItemCount(removedKeys)} not stringified"`;
1444
+ res += `${join35}"... ${getItemCount(removedKeys)} not stringified"`;
1445
1445
  }
1446
1446
  if (spacer !== "") {
1447
1447
  res += `
@@ -1454,7 +1454,7 @@ ${originalIndentation}`;
1454
1454
  let whitespace = "";
1455
1455
  if (spacer !== "") {
1456
1456
  indentation += spacer;
1457
- join34 = `,
1457
+ join35 = `,
1458
1458
  ${indentation}`;
1459
1459
  whitespace = " ";
1460
1460
  }
@@ -1463,7 +1463,7 @@ ${indentation}`;
1463
1463
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
1464
1464
  if (tmp !== void 0) {
1465
1465
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
1466
- separator = join34;
1466
+ separator = join35;
1467
1467
  }
1468
1468
  }
1469
1469
  if (spacer !== "" && separator.length > 1) {
@@ -1521,20 +1521,20 @@ ${originalIndentation}`;
1521
1521
  indentation += spacer;
1522
1522
  let res2 = `
1523
1523
  ${indentation}`;
1524
- const join35 = `,
1524
+ const join36 = `,
1525
1525
  ${indentation}`;
1526
1526
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
1527
1527
  let i4 = 0;
1528
1528
  for (; i4 < maximumValuesToStringify - 1; i4++) {
1529
1529
  const tmp2 = stringifyIndent(String(i4), value[i4], stack, spacer, indentation);
1530
1530
  res2 += tmp2 !== void 0 ? tmp2 : "null";
1531
- res2 += join35;
1531
+ res2 += join36;
1532
1532
  }
1533
1533
  const tmp = stringifyIndent(String(i4), value[i4], stack, spacer, indentation);
1534
1534
  res2 += tmp !== void 0 ? tmp : "null";
1535
1535
  if (value.length - 1 > maximumBreadth) {
1536
1536
  const removedKeys = value.length - maximumBreadth - 1;
1537
- res2 += `${join35}"... ${getItemCount(removedKeys)} not stringified"`;
1537
+ res2 += `${join36}"... ${getItemCount(removedKeys)} not stringified"`;
1538
1538
  }
1539
1539
  res2 += `
1540
1540
  ${originalIndentation}`;
@@ -1550,16 +1550,16 @@ ${originalIndentation}`;
1550
1550
  return '"[Object]"';
1551
1551
  }
1552
1552
  indentation += spacer;
1553
- const join34 = `,
1553
+ const join35 = `,
1554
1554
  ${indentation}`;
1555
1555
  let res = "";
1556
1556
  let separator = "";
1557
1557
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1558
1558
  if (isTypedArrayWithEntries(value)) {
1559
- res += stringifyTypedArray(value, join34, maximumBreadth);
1559
+ res += stringifyTypedArray(value, join35, maximumBreadth);
1560
1560
  keys = keys.slice(value.length);
1561
1561
  maximumPropertiesToStringify -= value.length;
1562
- separator = join34;
1562
+ separator = join35;
1563
1563
  }
1564
1564
  if (deterministic) {
1565
1565
  keys = sort(keys, comparator);
@@ -1570,13 +1570,13 @@ ${indentation}`;
1570
1570
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
1571
1571
  if (tmp !== void 0) {
1572
1572
  res += `${separator}${strEscape(key2)}: ${tmp}`;
1573
- separator = join34;
1573
+ separator = join35;
1574
1574
  }
1575
1575
  }
1576
1576
  if (keyLength > maximumBreadth) {
1577
1577
  const removedKeys = keyLength - maximumBreadth;
1578
1578
  res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
1579
- separator = join34;
1579
+ separator = join35;
1580
1580
  }
1581
1581
  if (separator !== "") {
1582
1582
  res = `
@@ -3144,7 +3144,7 @@ var require_buffer_list = __commonJS({
3144
3144
  }
3145
3145
  }, {
3146
3146
  key: "join",
3147
- value: function join34(s5) {
3147
+ value: function join35(s5) {
3148
3148
  if (this.length === 0) return "";
3149
3149
  var p2 = this.head;
3150
3150
  var ret = "" + p2.data;
@@ -33063,7 +33063,7 @@ var require_view = __commonJS({
33063
33063
  var dirname22 = path85.dirname;
33064
33064
  var basename13 = path85.basename;
33065
33065
  var extname2 = path85.extname;
33066
- var join34 = path85.join;
33066
+ var join35 = path85.join;
33067
33067
  var resolve21 = path85.resolve;
33068
33068
  module2.exports = View;
33069
33069
  function View(name3, options) {
@@ -33125,12 +33125,12 @@ var require_view = __commonJS({
33125
33125
  };
33126
33126
  View.prototype.resolve = function resolve22(dir, file) {
33127
33127
  var ext2 = this.ext;
33128
- var path86 = join34(dir, file);
33128
+ var path86 = join35(dir, file);
33129
33129
  var stat5 = tryStat(path86);
33130
33130
  if (stat5 && stat5.isFile()) {
33131
33131
  return path86;
33132
33132
  }
33133
- path86 = join34(dir, basename13(file, ext2), "index" + ext2);
33133
+ path86 = join35(dir, basename13(file, ext2), "index" + ext2);
33134
33134
  stat5 = tryStat(path86);
33135
33135
  if (stat5 && stat5.isFile()) {
33136
33136
  return path86;
@@ -36783,7 +36783,7 @@ var require_send = __commonJS({
36783
36783
  var Stream4 = __require("stream");
36784
36784
  var util5 = __require("util");
36785
36785
  var extname2 = path85.extname;
36786
- var join34 = path85.join;
36786
+ var join35 = path85.join;
36787
36787
  var normalize6 = path85.normalize;
36788
36788
  var resolve21 = path85.resolve;
36789
36789
  var sep7 = path85.sep;
@@ -36955,7 +36955,7 @@ var require_send = __commonJS({
36955
36955
  return res;
36956
36956
  }
36957
36957
  parts2 = path86.split(sep7);
36958
- path86 = normalize6(join34(root, path86));
36958
+ path86 = normalize6(join35(root, path86));
36959
36959
  } else {
36960
36960
  if (UP_PATH_REGEXP.test(path86)) {
36961
36961
  debug2('malicious path "%s"', path86);
@@ -37088,7 +37088,7 @@ var require_send = __commonJS({
37088
37088
  if (err2) return self2.onStatError(err2);
37089
37089
  return self2.error(404);
37090
37090
  }
37091
- var p2 = join34(path86, self2._index[i4]);
37091
+ var p2 = join35(path86, self2._index[i4]);
37092
37092
  debug2('stat "%s"', p2);
37093
37093
  fs70.stat(p2, function(err3, stat5) {
37094
37094
  if (err3) return next(err3);
@@ -176705,7 +176705,7 @@ var require_util11 = __commonJS({
176705
176705
  function getFilesInPath(source) {
176706
176706
  const lstatSync3 = fs70.lstatSync;
176707
176707
  const readdirSync4 = fs70.readdirSync;
176708
- const join34 = path85.join;
176708
+ const join35 = path85.join;
176709
176709
  function isDirectory(source2) {
176710
176710
  return lstatSync3(source2).isDirectory();
176711
176711
  }
@@ -176714,12 +176714,12 @@ var require_util11 = __commonJS({
176714
176714
  }
176715
176715
  function getDirectories(source2) {
176716
176716
  return readdirSync4(source2).map((name3) => {
176717
- return join34(source2, name3);
176717
+ return join35(source2, name3);
176718
176718
  }).filter(isDirectory);
176719
176719
  }
176720
176720
  function getFiles(source2) {
176721
176721
  return readdirSync4(source2).map((name3) => {
176722
- return join34(source2, name3);
176722
+ return join35(source2, name3);
176723
176723
  }).filter(isFile2);
176724
176724
  }
176725
176725
  function getFilesRecursively(source2) {
@@ -194274,7 +194274,7 @@ var init_modelFamilyService = __esm({
194274
194274
  });
194275
194275
 
194276
194276
  // packages/core/dist/src/tools/definitions/base-declarations.js
194277
- var PARAM_FILE_PATH, PARAM_DIR_PATH, PARAM_PATTERN, PARAM_CASE_SENSITIVE, PARAM_RESPECT_GIT_IGNORE, PARAM_RESPECT_GEMINI_IGNORE, PARAM_FILE_FILTERING_OPTIONS, PARAM_DESCRIPTION, GLOB_TOOL_NAME, GREP_TOOL_NAME, GREP_PARAM_INCLUDE_PATTERN, GREP_PARAM_EXCLUDE_PATTERN, GREP_PARAM_NAMES_ONLY, GREP_PARAM_MAX_MATCHES_PER_FILE, GREP_PARAM_TOTAL_MAX_MATCHES, GREP_PARAM_FIXED_STRINGS, GREP_PARAM_CONTEXT, GREP_PARAM_AFTER, GREP_PARAM_BEFORE, GREP_PARAM_NO_IGNORE, LS_TOOL_NAME, LS_PARAM_IGNORE, READ_FILE_TOOL_NAME, READ_FILE_PARAM_START_LINE, READ_FILE_PARAM_END_LINE, SHELL_TOOL_NAME, SHELL_PARAM_COMMAND, SHELL_PARAM_IS_BACKGROUND, WRITE_FILE_TOOL_NAME, WRITE_FILE_PARAM_CONTENT, EDIT_TOOL_NAME, EDIT_PARAM_INSTRUCTION, EDIT_PARAM_OLD_STRING, EDIT_PARAM_NEW_STRING, EDIT_PARAM_ALLOW_MULTIPLE, WEB_SEARCH_TOOL_NAME, WEB_SEARCH_PARAM_QUERY, WRITE_TODOS_TOOL_NAME, TODOS_PARAM_TODOS, TODOS_ITEM_PARAM_DESCRIPTION, TODOS_ITEM_PARAM_STATUS, WEB_FETCH_TOOL_NAME, WEB_FETCH_PARAM_PROMPT, READ_MANY_FILES_TOOL_NAME, READ_MANY_PARAM_INCLUDE, READ_MANY_PARAM_EXCLUDE, READ_MANY_PARAM_RECURSIVE, READ_MANY_PARAM_USE_DEFAULT_EXCLUDES, MEMORY_TOOL_NAME, MEMORY_PARAM_FACT, GET_INTERNAL_DOCS_TOOL_NAME, DOCS_PARAM_PATH, ACTIVATE_SKILL_TOOL_NAME, SKILL_PARAM_NAME, ASK_USER_TOOL_NAME, ASK_USER_PARAM_QUESTIONS, ASK_USER_QUESTION_PARAM_QUESTION, ASK_USER_QUESTION_PARAM_HEADER, ASK_USER_QUESTION_PARAM_TYPE, ASK_USER_QUESTION_PARAM_OPTIONS, ASK_USER_QUESTION_PARAM_MULTI_SELECT, ASK_USER_QUESTION_PARAM_PLACEHOLDER, ASK_USER_OPTION_PARAM_LABEL, ASK_USER_OPTION_PARAM_DESCRIPTION, EXIT_PLAN_MODE_TOOL_NAME, EXIT_PLAN_PARAM_PLAN_PATH, ENTER_PLAN_MODE_TOOL_NAME, PLAN_MODE_PARAM_REASON;
194277
+ var PARAM_FILE_PATH, PARAM_DIR_PATH, PARAM_PATTERN, PARAM_CASE_SENSITIVE, PARAM_RESPECT_GIT_IGNORE, PARAM_RESPECT_GEMINI_IGNORE, PARAM_FILE_FILTERING_OPTIONS, PARAM_DESCRIPTION, GLOB_TOOL_NAME, GREP_TOOL_NAME, GREP_PARAM_INCLUDE_PATTERN, GREP_PARAM_EXCLUDE_PATTERN, GREP_PARAM_NAMES_ONLY, GREP_PARAM_MAX_MATCHES_PER_FILE, GREP_PARAM_TOTAL_MAX_MATCHES, GREP_PARAM_FIXED_STRINGS, GREP_PARAM_CONTEXT, GREP_PARAM_AFTER, GREP_PARAM_BEFORE, GREP_PARAM_NO_IGNORE, LS_TOOL_NAME, LS_PARAM_IGNORE, READ_FILE_TOOL_NAME, READ_FILE_PARAM_START_LINE, READ_FILE_PARAM_END_LINE, SHELL_TOOL_NAME, SHELL_PARAM_COMMAND, SHELL_PARAM_IS_BACKGROUND, WRITE_FILE_TOOL_NAME, WRITE_FILE_PARAM_CONTENT, EDIT_TOOL_NAME, EDIT_PARAM_INSTRUCTION, EDIT_PARAM_OLD_STRING, EDIT_PARAM_NEW_STRING, EDIT_PARAM_ALLOW_MULTIPLE, WEB_SEARCH_TOOL_NAME, WEB_SEARCH_PARAM_QUERY, WRITE_TODOS_TOOL_NAME, TODOS_PARAM_TODOS, TODOS_ITEM_PARAM_DESCRIPTION, TODOS_ITEM_PARAM_STATUS, WEB_FETCH_TOOL_NAME, WEB_FETCH_PARAM_PROMPT, READ_MANY_FILES_TOOL_NAME, READ_MANY_PARAM_INCLUDE, READ_MANY_PARAM_EXCLUDE, READ_MANY_PARAM_RECURSIVE, READ_MANY_PARAM_USE_DEFAULT_EXCLUDES, MEMORY_TOOL_NAME, MEMORY_PARAM_FACT, GET_INTERNAL_DOCS_TOOL_NAME, DOCS_PARAM_PATH, ACTIVATE_SKILL_TOOL_NAME, SKILL_PARAM_NAME, ASK_USER_TOOL_NAME, ASK_USER_PARAM_QUESTIONS, ASK_USER_QUESTION_PARAM_QUESTION, ASK_USER_QUESTION_PARAM_HEADER, ASK_USER_QUESTION_PARAM_TYPE, ASK_USER_QUESTION_PARAM_OPTIONS, ASK_USER_QUESTION_PARAM_MULTI_SELECT, ASK_USER_QUESTION_PARAM_PLACEHOLDER, ASK_USER_OPTION_PARAM_LABEL, ASK_USER_OPTION_PARAM_DESCRIPTION, EXIT_PLAN_MODE_TOOL_NAME, EXIT_PLAN_PARAM_PLAN_FILENAME, ENTER_PLAN_MODE_TOOL_NAME, PLAN_MODE_PARAM_REASON;
194278
194278
  var init_base_declarations = __esm({
194279
194279
  "packages/core/dist/src/tools/definitions/base-declarations.js"() {
194280
194280
  "use strict";
@@ -194343,7 +194343,7 @@ var init_base_declarations = __esm({
194343
194343
  ASK_USER_OPTION_PARAM_LABEL = "label";
194344
194344
  ASK_USER_OPTION_PARAM_DESCRIPTION = "description";
194345
194345
  EXIT_PLAN_MODE_TOOL_NAME = "exit_plan_mode";
194346
- EXIT_PLAN_PARAM_PLAN_PATH = "plan_path";
194346
+ EXIT_PLAN_PARAM_PLAN_FILENAME = "plan_filename";
194347
194347
  ENTER_PLAN_MODE_TOOL_NAME = "enter_plan_mode";
194348
194348
  PLAN_MODE_PARAM_REASON = "reason";
194349
194349
  }
@@ -195989,17 +195989,17 @@ function getShellDeclaration(enableInteractiveShell, enableEfficiency) {
195989
195989
  }
195990
195990
  };
195991
195991
  }
195992
- function getExitPlanModeDeclaration(plansDir) {
195992
+ function getExitPlanModeDeclaration() {
195993
195993
  return {
195994
195994
  name: EXIT_PLAN_MODE_TOOL_NAME,
195995
195995
  description: "Finalizes the planning phase and transitions to implementation by presenting the plan for user approval. This tool MUST be used to exit Plan Mode before any source code edits can be performed. Call this whenever a plan is ready or the user requests implementation.",
195996
195996
  parametersJsonSchema: {
195997
195997
  type: "object",
195998
- required: [EXIT_PLAN_PARAM_PLAN_PATH],
195998
+ required: [EXIT_PLAN_PARAM_PLAN_FILENAME],
195999
195999
  properties: {
196000
- [EXIT_PLAN_PARAM_PLAN_PATH]: {
196000
+ [EXIT_PLAN_PARAM_PLAN_FILENAME]: {
196001
196001
  type: "string",
196002
- description: `The file path to the finalized plan (e.g., "${plansDir}/feature-x.md"). This path MUST be within the designated plans directory: ${plansDir}/`
196002
+ description: `The filename of the finalized plan (e.g., "feature-x.md"). Do not provide an absolute path.`
196003
196003
  }
196004
196004
  }
196005
196005
  }
@@ -196614,7 +196614,7 @@ The agent did not use the todo list because this task could be completed by a ti
196614
196614
  }
196615
196615
  }
196616
196616
  },
196617
- exit_plan_mode: (plansDir) => getExitPlanModeDeclaration(plansDir),
196617
+ exit_plan_mode: () => getExitPlanModeDeclaration(),
196618
196618
  activate_skill: (skillNames) => getActivateSkillDeclaration(skillNames)
196619
196619
  };
196620
196620
  }
@@ -197181,7 +197181,7 @@ The agent did not use the todo list because this task could be completed by a ti
197181
197181
  }
197182
197182
  }
197183
197183
  },
197184
- exit_plan_mode: (plansDir) => getExitPlanModeDeclaration(plansDir),
197184
+ exit_plan_mode: () => getExitPlanModeDeclaration(),
197185
197185
  activate_skill: (skillNames) => getActivateSkillDeclaration(skillNames)
197186
197186
  };
197187
197187
  }
@@ -197204,10 +197204,10 @@ function getShellDefinition(enableInteractiveShell, enableEfficiency) {
197204
197204
  overrides: (modelId) => getToolSet(modelId).run_shell_command(enableInteractiveShell, enableEfficiency)
197205
197205
  };
197206
197206
  }
197207
- function getExitPlanModeDefinition(plansDir) {
197207
+ function getExitPlanModeDefinition() {
197208
197208
  return {
197209
- base: getExitPlanModeDeclaration(plansDir),
197210
- overrides: (modelId) => getToolSet(modelId).exit_plan_mode(plansDir)
197209
+ base: getExitPlanModeDeclaration(),
197210
+ overrides: (modelId) => getToolSet(modelId).exit_plan_mode()
197211
197211
  };
197212
197212
  }
197213
197213
  function getActivateSkillDefinition(skillNames) {
@@ -198935,8 +198935,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
198935
198935
  var init_git_commit = __esm({
198936
198936
  "packages/core/dist/src/generated/git-commit.js"() {
198937
198937
  "use strict";
198938
- GIT_COMMIT_INFO = "e88b56bbc";
198939
- CLI_VERSION = "0.35.0-preview.5";
198938
+ GIT_COMMIT_INFO = "8804fb770";
198939
+ CLI_VERSION = "0.35.1";
198940
198940
  }
198941
198941
  });
198942
198942
 
@@ -322410,9 +322410,12 @@ var init_edit = __esm({
322410
322410
  config;
322411
322411
  resolvedPath;
322412
322412
  constructor(config3, params, messageBus, toolName, displayName) {
322413
- super(params, messageBus, toolName, displayName);
322413
+ super(params, messageBus, toolName, displayName, void 0, void 0);
322414
322414
  this.config = config3;
322415
- if (!path26.isAbsolute(this.params.file_path)) {
322415
+ if (this.config.isPlanMode()) {
322416
+ const safeFilename = path26.basename(this.params.file_path);
322417
+ this.resolvedPath = path26.join(this.config.storage.getPlansDir(), safeFilename);
322418
+ } else if (!path26.isAbsolute(this.params.file_path)) {
322416
322419
  const result2 = correctPath(this.params.file_path, this.config);
322417
322420
  if (result2.success) {
322418
322421
  this.resolvedPath = result2.correctedPath;
@@ -323074,9 +323077,14 @@ var init_write_file = __esm({
323074
323077
  config;
323075
323078
  resolvedPath;
323076
323079
  constructor(config3, params, messageBus, toolName, displayName) {
323077
- super(params, messageBus, toolName, displayName);
323080
+ super(params, messageBus, toolName, displayName, void 0, void 0);
323078
323081
  this.config = config3;
323079
- this.resolvedPath = path27.resolve(this.config.getTargetDir(), this.params.file_path);
323082
+ if (this.config.isPlanMode()) {
323083
+ const safeFilename = path27.basename(this.params.file_path);
323084
+ this.resolvedPath = path27.join(this.config.storage.getPlansDir(), safeFilename);
323085
+ } else {
323086
+ this.resolvedPath = path27.resolve(this.config.getTargetDir(), this.params.file_path);
323087
+ }
323080
323088
  }
323081
323089
  toolLocations() {
323082
323090
  return [{ path: this.resolvedPath }];
@@ -328503,7 +328511,7 @@ function getVersion() {
328503
328511
  }
328504
328512
  versionPromise = (async () => {
328505
328513
  const pkgJson = await getPackageJson(__dirname3);
328506
- return "0.35.0-preview.5";
328514
+ return "0.35.1";
328507
328515
  })();
328508
328516
  return versionPromise;
328509
328517
  }
@@ -357939,7 +357947,7 @@ var init_xdg_basedir = __esm({
357939
357947
 
357940
357948
  // node_modules/@joshua.litt/get-ripgrep/dist/downloadRipGrep.js
357941
357949
  import * as os23 from "node:os";
357942
- import { dirname as dirname9, join as join14 } from "node:path";
357950
+ import { dirname as dirname9, join as join15 } from "node:path";
357943
357951
  import { pipeline as pipeline3 } from "node:stream/promises";
357944
357952
  import { fileURLToPath as fileURLToPath11 } from "node:url";
357945
357953
  import path47 from "path";
@@ -357957,7 +357965,7 @@ var init_downloadRipGrep = __esm({
357957
357965
  __dirname5 = dirname9(fileURLToPath11(import.meta.url));
357958
357966
  REPOSITORY = `microsoft/ripgrep-prebuilt`;
357959
357967
  VERSION3 = process.env.RIPGREP_VERSION || "v13.0.0-10";
357960
- BIN_PATH = join14(__dirname5, "../bin");
357968
+ BIN_PATH = join15(__dirname5, "../bin");
357961
357969
  getTarget = () => {
357962
357970
  const arch4 = process.env.npm_config_arch || os23.arch();
357963
357971
  const platform11 = process.env.platform || os23.platform();
@@ -358052,14 +358060,14 @@ var init_downloadRipGrep = __esm({
358052
358060
  });
358053
358061
 
358054
358062
  // node_modules/@joshua.litt/get-ripgrep/dist/index.js
358055
- import { dirname as dirname10, join as join15 } from "node:path";
358063
+ import { dirname as dirname10, join as join16 } from "node:path";
358056
358064
  import { fileURLToPath as fileURLToPath12 } from "node:url";
358057
358065
  var __dirname6, rgPath;
358058
358066
  var init_dist5 = __esm({
358059
358067
  "node_modules/@joshua.litt/get-ripgrep/dist/index.js"() {
358060
358068
  init_downloadRipGrep();
358061
358069
  __dirname6 = dirname10(fileURLToPath12(import.meta.url));
358062
- rgPath = join15(__dirname6, "..", "bin", `rg${process.platform === "win32" ? ".exe" : ""}`);
358070
+ rgPath = join16(__dirname6, "..", "bin", `rg${process.platform === "win32" ? ".exe" : ""}`);
358063
358071
  }
358064
358072
  });
358065
358073
 
@@ -370968,8 +370976,8 @@ function many(p2) {
370968
370976
  function many1(p2) {
370969
370977
  return ab(p2, many(p2), (head, tail) => [head, ...tail]);
370970
370978
  }
370971
- function ab(pa, pb, join34) {
370972
- return (data, i4) => mapOuter(pa(data, i4), (ma) => mapInner(pb(data, ma.position), (vb, j2) => join34(ma.value, vb, data, i4, j2)));
370979
+ function ab(pa, pb, join35) {
370980
+ return (data, i4) => mapOuter(pa(data, i4), (ma) => mapInner(pb(data, ma.position), (vb, j2) => join35(ma.value, vb, data, i4, j2)));
370973
370981
  }
370974
370982
  function left(pa, pb) {
370975
370983
  return ab(pa, pb, (va) => va);
@@ -370977,8 +370985,8 @@ function left(pa, pb) {
370977
370985
  function right(pa, pb) {
370978
370986
  return ab(pa, pb, (va, vb) => vb);
370979
370987
  }
370980
- function abc(pa, pb, pc, join34) {
370981
- return (data, i4) => mapOuter(pa(data, i4), (ma) => mapOuter(pb(data, ma.position), (mb) => mapInner(pc(data, mb.position), (vc, j2) => join34(ma.value, mb.value, vc, data, i4, j2))));
370988
+ function abc(pa, pb, pc, join35) {
370989
+ return (data, i4) => mapOuter(pa(data, i4), (ma) => mapOuter(pb(data, ma.position), (mb) => mapInner(pc(data, mb.position), (vc, j2) => join35(ma.value, mb.value, vc, data, i4, j2))));
370982
370990
  }
370983
370991
  function middle(pa, pb, pc) {
370984
370992
  return abc(pa, pb, pc, (ra, rb) => rb);
@@ -376524,12 +376532,13 @@ ${answerEntries.map(([index, answer]) => {
376524
376532
 
376525
376533
  // packages/core/dist/src/utils/planUtils.js
376526
376534
  import path54 from "node:path";
376527
- async function validatePlanPath(planPath, plansDir, targetDir) {
376528
- const resolvedPath = path54.resolve(targetDir, planPath);
376535
+ async function validatePlanPath(planPath, plansDir) {
376536
+ const safeFilename = path54.basename(planPath);
376537
+ const resolvedPath = path54.join(plansDir, safeFilename);
376529
376538
  const realPath = resolveToRealPath(resolvedPath);
376530
376539
  const realPlansDir = resolveToRealPath(plansDir);
376531
376540
  if (!isSubpath(realPlansDir, realPath)) {
376532
- return PlanErrorMessages.PATH_ACCESS_DENIED;
376541
+ return PlanErrorMessages.PATH_ACCESS_DENIED(planPath, realPlansDir);
376533
376542
  }
376534
376543
  if (!await fileExists(resolvedPath)) {
376535
376544
  return PlanErrorMessages.FILE_NOT_FOUND(planPath);
@@ -376554,7 +376563,7 @@ var init_planUtils = __esm({
376554
376563
  init_fileUtils();
376555
376564
  init_paths();
376556
376565
  PlanErrorMessages = {
376557
- PATH_ACCESS_DENIED: "Access denied: plan path must be within the designated plans directory.",
376566
+ PATH_ACCESS_DENIED: (planPath, plansDir) => `Access denied: plan path (${planPath}) must be within the designated plans directory (${plansDir}).`,
376558
376567
  FILE_NOT_FOUND: (path85) => `Plan file does not exist: ${path85}. You must create the plan file before requesting approval.`,
376559
376568
  FILE_EMPTY: "Plan file is empty. You must write content to the plan file before requesting approval.",
376560
376569
  READ_FAILURE: (detail) => `Failed to read plan file: ${detail}`
@@ -376623,20 +376632,20 @@ var init_exit_plan_mode = __esm({
376623
376632
  config;
376624
376633
  static Name = EXIT_PLAN_MODE_TOOL_NAME;
376625
376634
  constructor(config3, messageBus) {
376626
- const plansDir = config3.storage.getPlansDir();
376627
- const definition = getExitPlanModeDefinition(plansDir);
376635
+ const definition = getExitPlanModeDefinition();
376628
376636
  super(_ExitPlanModeTool.Name, "Exit Plan Mode", definition.base.description, Kind.Plan, definition.base.parametersJsonSchema, messageBus);
376629
376637
  this.config = config3;
376630
376638
  }
376631
376639
  validateToolParamValues(params) {
376632
- if (!params.plan_path || params.plan_path.trim() === "") {
376633
- return "plan_path is required.";
376640
+ if (!params.plan_filename || params.plan_filename.trim() === "") {
376641
+ return "plan_filename is required.";
376634
376642
  }
376643
+ const safeFilename = path55.basename(params.plan_filename);
376635
376644
  const plansDir = resolveToRealPath(this.config.storage.getPlansDir());
376636
- const resolvedPath = path55.resolve(this.config.getTargetDir(), params.plan_path);
376645
+ const resolvedPath = path55.join(this.config.storage.getPlansDir(), safeFilename);
376637
376646
  const realPath = resolveToRealPath(resolvedPath);
376638
376647
  if (!isSubpath(plansDir, realPath)) {
376639
- return `Access denied: plan path must be within the designated plans directory.`;
376648
+ return `Access denied: plan path (${resolvedPath}) must be within the designated plans directory (${plansDir}).`;
376640
376649
  }
376641
376650
  return null;
376642
376651
  }
@@ -376644,8 +376653,7 @@ var init_exit_plan_mode = __esm({
376644
376653
  return new ExitPlanModeInvocation(params, messageBus, toolName, toolDisplayName, this.config);
376645
376654
  }
376646
376655
  getSchema(modelId) {
376647
- const plansDir = this.config.storage.getPlansDir();
376648
- return resolveToolDeclaration(getExitPlanModeDefinition(plansDir), modelId);
376656
+ return resolveToolDeclaration(getExitPlanModeDefinition(), modelId);
376649
376657
  }
376650
376658
  };
376651
376659
  ExitPlanModeInvocation = class extends BaseToolInvocation {
@@ -376659,7 +376667,7 @@ var init_exit_plan_mode = __esm({
376659
376667
  }
376660
376668
  async shouldConfirmExecute(abortSignal) {
376661
376669
  const resolvedPlanPath = this.getResolvedPlanPath();
376662
- const pathError = await validatePlanPath(this.params.plan_path, this.config.storage.getPlansDir(), this.config.getTargetDir());
376670
+ const pathError = await validatePlanPath(this.params.plan_filename, this.config.storage.getPlansDir());
376663
376671
  if (pathError) {
376664
376672
  this.planValidationError = pathError;
376665
376673
  return false;
@@ -376694,14 +376702,15 @@ var init_exit_plan_mode = __esm({
376694
376702
  };
376695
376703
  }
376696
376704
  getDescription() {
376697
- return `Requesting plan approval for: ${this.params.plan_path}`;
376705
+ return `Requesting plan approval for: ${path55.join(this.config.storage.getPlansDir(), this.params.plan_filename)}`;
376698
376706
  }
376699
376707
  /**
376700
376708
  * Returns the resolved plan path.
376701
376709
  * Note: Validation is done in validateToolParamValues, so this assumes the path is valid.
376702
376710
  */
376703
376711
  getResolvedPlanPath() {
376704
- return path55.resolve(this.config.getTargetDir(), this.params.plan_path);
376712
+ const safeFilename = path55.basename(this.params.plan_filename);
376713
+ return path55.join(this.config.storage.getPlansDir(), safeFilename);
376705
376714
  }
376706
376715
  async execute(_signal) {
376707
376716
  const resolvedPlanPath = this.getResolvedPlanPath();
@@ -431325,6 +431334,9 @@ ${sections.join("\n")}
431325
431334
  getApprovalMode() {
431326
431335
  return this.policyEngine.getApprovalMode();
431327
431336
  }
431337
+ isPlanMode() {
431338
+ return this.getApprovalMode() === ApprovalMode.PLAN;
431339
+ }
431328
431340
  getPolicyUpdateConfirmationRequest() {
431329
431341
  return this.policyUpdateConfirmationRequest;
431330
431342
  }
@@ -452650,7 +452662,7 @@ var wo = (s5) => {
452650
452662
  var fse = __toESM(require_lib7(), 1);
452651
452663
  init_dist7();
452652
452664
  import { promises as fsPromises12, createReadStream as createReadStream5 } from "node:fs";
452653
- import { join as join28 } from "node:path";
452665
+ import { join as join29 } from "node:path";
452654
452666
 
452655
452667
  // packages/a2a-server/src/config/config.ts
452656
452668
  var dotenv = __toESM(require_main2(), 1);
@@ -453007,7 +453019,7 @@ var GCSTaskStore = class {
453007
453019
  if (await fse.pathExists(workDir)) {
453008
453020
  const entries2 = await fsPromises12.readdir(workDir);
453009
453021
  if (entries2.length > 0) {
453010
- const tmpArchiveFile = join28(tmpdir(), getTmpArchiveFilename(taskId));
453022
+ const tmpArchiveFile = join29(tmpdir(), getTmpArchiveFilename(taskId));
453011
453023
  try {
453012
453024
  await zn(
453013
453025
  {
@@ -453129,7 +453141,7 @@ var GCSTaskStore = class {
453129
453141
  const workspaceFile = this.storage.bucket(this.bucketName).file(workspaceObjectPath);
453130
453142
  const [workspaceExists] = await workspaceFile.exists();
453131
453143
  if (workspaceExists) {
453132
- const tmpArchiveFile = join28(tmpdir(), getTmpArchiveFilename(taskId));
453144
+ const tmpArchiveFile = join29(tmpdir(), getTmpArchiveFilename(taskId));
453133
453145
  try {
453134
453146
  await workspaceFile.download({ destination: tmpArchiveFile });
453135
453147
  await lo({ file: tmpArchiveFile, cwd: workDir });