@google/gemini-cli 0.36.0 → 0.37.0-preview.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.
Files changed (74) hide show
  1. package/bundle/{chunk-UNM3DGTG.js → chunk-33B2YA3V.js} +711 -240
  2. package/bundle/{chunk-2OFO4ODK.js → chunk-43UUP7VO.js} +6717 -4203
  3. package/bundle/{chunk-MYI75E6G.js → chunk-5OOT636U.js} +262 -92
  4. package/bundle/{chunk-GHJNEZXJ.js → chunk-BLL44IGV.js} +777 -294
  5. package/bundle/{chunk-S2IQOR7T.js → chunk-JS5WSGB2.js} +243 -88
  6. package/bundle/{chunk-QVTX2M5J.js → chunk-PPWUMHZT.js} +6355 -4117
  7. package/bundle/chunk-TSSVZ7RZ.js +98376 -0
  8. package/bundle/chunk-U4FACSVX.js +30 -0
  9. package/bundle/{chunk-VB55KQW3.js → chunk-VSXV53B7.js} +11735 -14377
  10. package/bundle/{chunk-EAXTBDLN.js → chunk-WZB27TDF.js} +711 -240
  11. package/bundle/chunk-ZB4UQCX5.js +356418 -0
  12. package/bundle/{core-6V2OYDRU.js → core-RMRIZ3E5.js} +60 -4
  13. package/bundle/{devtoolsService-ZKU2HLK2.js → devtoolsService-2ULAA43E.js} +20 -3
  14. package/bundle/{devtoolsService-UL6JE436.js → devtoolsService-AWVCG2N2.js} +22 -4
  15. package/bundle/devtoolsService-IWSTJYRB.js +871 -0
  16. package/bundle/{devtoolsService-QTW7GHQP.js → devtoolsService-SZYXXACN.js} +20 -3
  17. package/bundle/{core-BMLL5RF4.js → dist-4FKFY6XB.js} +60 -4
  18. package/bundle/{dist-PYC2JXAJ.js → dist-PRDBNGX2.js} +60 -4
  19. package/bundle/dist-TCCEQJDV.js +1942 -0
  20. package/bundle/docs/CONTRIBUTING.md +10 -7
  21. package/bundle/docs/assets/theme-tokyonight-dark.png +0 -0
  22. package/bundle/docs/changelogs/index.md +24 -0
  23. package/bundle/docs/changelogs/latest.md +366 -459
  24. package/bundle/docs/changelogs/preview.md +362 -356
  25. package/bundle/docs/cli/acp-mode.md +126 -0
  26. package/bundle/docs/cli/cli-reference.md +1 -1
  27. package/bundle/docs/cli/notifications.md +5 -5
  28. package/bundle/docs/cli/plan-mode.md +22 -11
  29. package/bundle/docs/cli/sandbox.md +1 -1
  30. package/bundle/docs/cli/settings.md +14 -13
  31. package/bundle/docs/cli/themes.md +5 -0
  32. package/bundle/docs/core/index.md +2 -2
  33. package/bundle/docs/core/subagents.md +134 -23
  34. package/bundle/docs/get-started/gemini-3.md +1 -1
  35. package/bundle/docs/get-started/index.md +127 -1
  36. package/bundle/docs/ide-integration/index.md +99 -24
  37. package/bundle/docs/index.md +0 -2
  38. package/bundle/docs/redirects.json +1 -0
  39. package/bundle/docs/reference/commands.md +1 -3
  40. package/bundle/docs/reference/configuration.md +182 -91
  41. package/bundle/docs/reference/keyboard-shortcuts.md +14 -6
  42. package/bundle/docs/reference/policy-engine.md +36 -31
  43. package/bundle/docs/reference/tools.md +56 -23
  44. package/bundle/docs/resources/quota-and-pricing.md +23 -9
  45. package/bundle/docs/sidebar.json +11 -4
  46. package/bundle/docs/tools/planning.md +6 -4
  47. package/bundle/events-CLX3JQHP.js +12 -0
  48. package/bundle/gemini.js +342 -52
  49. package/bundle/{interactiveCli-VLQHRXHU.js → interactiveCli-24VGI5NV.js} +5066 -4010
  50. package/bundle/{interactiveCli-A6HZ2TDO.js → interactiveCli-D2MTTARB.js} +5066 -4010
  51. package/bundle/{interactiveCli-DWMSDCKV.js → interactiveCli-DX76MWWT.js} +5296 -4223
  52. package/bundle/interactiveCli-VNDJAKWG.js +50355 -0
  53. package/bundle/{memoryDiscovery-BQGYT4OD.js → memoryDiscovery-A265O6ML.js} +3 -1
  54. package/bundle/{memoryDiscovery-FCEPFZ3M.js → memoryDiscovery-H6J7KIH2.js} +3 -1
  55. package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +26 -19
  56. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +1 -1
  57. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +1 -1
  58. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +1 -1
  59. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +35 -1
  60. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js.map +1 -1
  61. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  62. package/bundle/{oauth2-provider-5ENESIRQ.js → oauth2-provider-FZUTS3SV.js} +2 -2
  63. package/bundle/{oauth2-provider-CAKFQRQV.js → oauth2-provider-K25DXIWC.js} +2 -2
  64. package/bundle/{oauth2-provider-RVED6DAZ.js → oauth2-provider-N73M7SQI.js} +39 -73
  65. package/bundle/oauth2-provider-RMDEEXSP.js +237 -0
  66. package/bundle/policies/discovered.toml +7 -0
  67. package/bundle/policies/non-interactive.toml +7 -0
  68. package/bundle/policies/plan.toml +25 -0
  69. package/bundle/policies/read-only.toml +6 -0
  70. package/bundle/policies/sandbox-default.toml +3 -2
  71. package/bundle/policies/write.toml +21 -0
  72. package/bundle/policies/yolo.toml +1 -1
  73. package/package.json +1 -1
  74. package/bundle/docs/get-started/examples.md +0 -141
@@ -40785,26 +40785,6 @@ function getApiKeyFromEnv() {
40785
40785
  return envGoogleApiKey || envGeminiApiKey || void 0;
40786
40786
  }
40787
40787
 
40788
- // packages/core/src/confirmation-bus/types.ts
40789
- var MessageBusType = /* @__PURE__ */ ((MessageBusType2) => {
40790
- MessageBusType2["TOOL_CONFIRMATION_REQUEST"] = "tool-confirmation-request";
40791
- MessageBusType2["TOOL_CONFIRMATION_RESPONSE"] = "tool-confirmation-response";
40792
- MessageBusType2["TOOL_POLICY_REJECTION"] = "tool-policy-rejection";
40793
- MessageBusType2["TOOL_EXECUTION_SUCCESS"] = "tool-execution-success";
40794
- MessageBusType2["TOOL_EXECUTION_FAILURE"] = "tool-execution-failure";
40795
- MessageBusType2["UPDATE_POLICY"] = "update-policy";
40796
- MessageBusType2["TOOL_CALLS_UPDATE"] = "tool-calls-update";
40797
- MessageBusType2["ASK_USER_REQUEST"] = "ask-user-request";
40798
- MessageBusType2["ASK_USER_RESPONSE"] = "ask-user-response";
40799
- return MessageBusType2;
40800
- })(MessageBusType || {});
40801
- var QuestionType = /* @__PURE__ */ ((QuestionType2) => {
40802
- QuestionType2["CHOICE"] = "choice";
40803
- QuestionType2["TEXT"] = "text";
40804
- QuestionType2["YESNO"] = "yesno";
40805
- return QuestionType2;
40806
- })(QuestionType || {});
40807
-
40808
40788
  // packages/core/src/policy/types.ts
40809
40789
  var PolicyDecision = /* @__PURE__ */ ((PolicyDecision2) => {
40810
40790
  PolicyDecision2["ALLOW"] = "allow";
@@ -40833,6 +40813,12 @@ var ApprovalMode = /* @__PURE__ */ ((ApprovalMode2) => {
40833
40813
  ApprovalMode2["PLAN"] = "plan";
40834
40814
  return ApprovalMode2;
40835
40815
  })(ApprovalMode || {});
40816
+ var MODES_BY_PERMISSIVENESS = [
40817
+ "plan" /* PLAN */,
40818
+ "default" /* DEFAULT */,
40819
+ "autoEdit" /* AUTO_EDIT */,
40820
+ "yolo" /* YOLO */
40821
+ ];
40836
40822
  var InProcessCheckerType = /* @__PURE__ */ ((InProcessCheckerType2) => {
40837
40823
  InProcessCheckerType2["ALLOWED_PATH"] = "allowed-path";
40838
40824
  InProcessCheckerType2["CONSECA"] = "conseca";
@@ -40843,6 +40829,27 @@ var ALWAYS_ALLOW_PRIORITY_FRACTION = 950;
40843
40829
  var ALWAYS_ALLOW_PRIORITY_OFFSET = ALWAYS_ALLOW_PRIORITY_FRACTION / 1e3;
40844
40830
  var PRIORITY_YOLO_ALLOW_ALL = 998;
40845
40831
 
40832
+ // packages/core/src/confirmation-bus/types.ts
40833
+ var MessageBusType = /* @__PURE__ */ ((MessageBusType2) => {
40834
+ MessageBusType2["TOOL_CONFIRMATION_REQUEST"] = "tool-confirmation-request";
40835
+ MessageBusType2["TOOL_CONFIRMATION_RESPONSE"] = "tool-confirmation-response";
40836
+ MessageBusType2["TOOL_POLICY_REJECTION"] = "tool-policy-rejection";
40837
+ MessageBusType2["TOOL_EXECUTION_SUCCESS"] = "tool-execution-success";
40838
+ MessageBusType2["TOOL_EXECUTION_FAILURE"] = "tool-execution-failure";
40839
+ MessageBusType2["UPDATE_POLICY"] = "update-policy";
40840
+ MessageBusType2["TOOL_CALLS_UPDATE"] = "tool-calls-update";
40841
+ MessageBusType2["ASK_USER_REQUEST"] = "ask-user-request";
40842
+ MessageBusType2["ASK_USER_RESPONSE"] = "ask-user-response";
40843
+ MessageBusType2["SUBAGENT_ACTIVITY"] = "subagent-activity";
40844
+ return MessageBusType2;
40845
+ })(MessageBusType || {});
40846
+ var QuestionType = /* @__PURE__ */ ((QuestionType2) => {
40847
+ QuestionType2["CHOICE"] = "choice";
40848
+ QuestionType2["TEXT"] = "text";
40849
+ QuestionType2["YESNO"] = "yesno";
40850
+ return QuestionType2;
40851
+ })(QuestionType || {});
40852
+
40846
40853
  // packages/core/src/tools/tools.ts
40847
40854
  function isBackgroundExecutionData(data) {
40848
40855
  if (typeof data !== "object" || data === null) {
@@ -41012,6 +41019,11 @@ var BaseToolInvocation = class {
41012
41019
  }
41013
41020
  });
41014
41021
  }
41022
+ toJSON() {
41023
+ return {
41024
+ params: this.params
41025
+ };
41026
+ }
41015
41027
  };
41016
41028
  var DeclarativeTool = class {
41017
41029
  constructor(name, displayName, description, kind, parameterSchema, messageBus, isOutputMarkdown = true, canUpdateOutput = false, extensionName, extensionId) {
@@ -41041,6 +41053,15 @@ var DeclarativeTool = class {
41041
41053
  }
41042
41054
  return cloned;
41043
41055
  }
41056
+ toJSON() {
41057
+ return {
41058
+ name: this.name,
41059
+ displayName: this.displayName,
41060
+ description: this.description,
41061
+ kind: this.kind,
41062
+ parameterSchema: this.parameterSchema
41063
+ };
41064
+ }
41044
41065
  get isReadOnly() {
41045
41066
  return READ_ONLY_KINDS.includes(this.kind);
41046
41067
  }
@@ -41261,6 +41282,7 @@ function isStructuredToolResult(obj) {
41261
41282
  var hasSummary = (res) => isStructuredToolResult(res);
41262
41283
  var isGrepResult = (res) => isStructuredToolResult(res) && "matches" in res && Array.isArray(res.matches);
41263
41284
  var isListResult = (res) => isStructuredToolResult(res) && "files" in res && Array.isArray(res.files);
41285
+ var isReadManyFilesResult = (res) => isListResult(res) && "include" in res;
41264
41286
  var isFileDiff = (res) => typeof res === "object" && res !== null && "fileDiff" in res && "fileName" in res && "filePath" in res;
41265
41287
  var ToolConfirmationOutcome = /* @__PURE__ */ ((ToolConfirmationOutcome2) => {
41266
41288
  ToolConfirmationOutcome2["ProceedOnce"] = "proceed_once";
@@ -42019,6 +42041,10 @@ var Storage = class _Storage {
42019
42041
  const historyDir = path6.join(_Storage.getGlobalGeminiDir(), "history");
42020
42042
  return path6.join(historyDir, identifier);
42021
42043
  }
42044
+ getProjectMemoryDir() {
42045
+ const identifier = this.getProjectIdentifier();
42046
+ return path6.join(_Storage.getGlobalGeminiDir(), "memory", identifier);
42047
+ }
42022
42048
  getWorkspaceSettingsPath() {
42023
42049
  return path6.join(this.getGeminiDir(), "settings.json");
42024
42050
  }
@@ -43247,6 +43273,7 @@ var READ_MANY_PARAM_RECURSIVE = "recursive";
43247
43273
  var READ_MANY_PARAM_USE_DEFAULT_EXCLUDES = "useDefaultExcludes";
43248
43274
  var MEMORY_TOOL_NAME = "save_memory";
43249
43275
  var MEMORY_PARAM_FACT = "fact";
43276
+ var MEMORY_PARAM_SCOPE = "scope";
43250
43277
  var GET_INTERNAL_DOCS_TOOL_NAME = "get_internal_docs";
43251
43278
  var DOCS_PARAM_PATH = "path";
43252
43279
  var ACTIVATE_SKILL_TOOL_NAME = "activate_skill";
@@ -43266,6 +43293,11 @@ var EXIT_PLAN_PARAM_PLAN_FILENAME = "plan_filename";
43266
43293
  var ENTER_PLAN_MODE_TOOL_NAME = "enter_plan_mode";
43267
43294
  var PLAN_MODE_PARAM_REASON = "reason";
43268
43295
  var PARAM_ADDITIONAL_PERMISSIONS = "additional_permissions";
43296
+ var UPDATE_TOPIC_TOOL_NAME = "update_topic";
43297
+ var UPDATE_TOPIC_DISPLAY_NAME = "Update Topic Context";
43298
+ var TOPIC_PARAM_TITLE = "title";
43299
+ var TOPIC_PARAM_SUMMARY = "summary";
43300
+ var TOPIC_PARAM_STRATEGIC_INTENT = "strategic_intent";
43269
43301
 
43270
43302
  // packages/core/src/tools/definitions/dynamic-declaration-helpers.ts
43271
43303
  import * as os4 from "node:os";
@@ -48687,7 +48719,7 @@ function getShellDeclaration(enableInteractiveShell, enableEfficiency, enableToo
48687
48719
  function getExitPlanModeDeclaration() {
48688
48720
  return {
48689
48721
  name: EXIT_PLAN_MODE_TOOL_NAME,
48690
- 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.",
48722
+ description: "Finalizes the planning phase and transitions to implementation by presenting the plan for formal user approval. You MUST reach an informal agreement with the user in the chat regarding the proposed strategy BEFORE calling this tool. This tool MUST be used to exit Plan Mode before any source code edits can be performed.",
48691
48723
  parametersJsonSchema: {
48692
48724
  type: "object",
48693
48725
  required: [EXIT_PLAN_PARAM_PLAN_FILENAME],
@@ -48718,6 +48750,30 @@ function getActivateSkillDeclaration(skillNames) {
48718
48750
  parametersJsonSchema: zodToJsonSchema(schema)
48719
48751
  };
48720
48752
  }
48753
+ function getUpdateTopicDeclaration() {
48754
+ return {
48755
+ name: UPDATE_TOPIC_TOOL_NAME,
48756
+ description: "Manages your narrative flow. Include `title` and `summary` only when starting a new Chapter (logical phase) or shifting strategic intent.",
48757
+ parametersJsonSchema: {
48758
+ type: "object",
48759
+ properties: {
48760
+ [TOPIC_PARAM_TITLE]: {
48761
+ type: "string",
48762
+ description: "The title of the new topic or chapter."
48763
+ },
48764
+ [TOPIC_PARAM_SUMMARY]: {
48765
+ type: "string",
48766
+ description: "(OPTIONAL) A detailed summary (5-10 sentences) covering both the work completed in the previous topic and the strategic intent of the new topic. This is required when transitioning between topics to maintain continuity."
48767
+ },
48768
+ [TOPIC_PARAM_STRATEGIC_INTENT]: {
48769
+ type: "string",
48770
+ description: "A mandatory one-sentence statement of your immediate intent."
48771
+ }
48772
+ },
48773
+ required: [TOPIC_PARAM_STRATEGIC_INTENT]
48774
+ }
48775
+ };
48776
+ }
48721
48777
 
48722
48778
  // packages/core/src/tools/definitions/model-family-sets/default-legacy.ts
48723
48779
  var DEFAULT_LEGACY_SET = {
@@ -49091,19 +49147,24 @@ Use this tool when the user's query implies needing the content of several files
49091
49147
  save_memory: {
49092
49148
  name: MEMORY_TOOL_NAME,
49093
49149
  description: `
49094
- Saves concise global user context (preferences, facts) for use across ALL workspaces.
49150
+ Saves concise user context (preferences, facts) for use across future sessions.
49095
49151
 
49096
- ### CRITICAL: GLOBAL CONTEXT ONLY
49097
- NEVER save workspace-specific context, local paths, or commands (e.g. "The entry point is src/index.js", "The test command is npm test"). These are local to the current workspace and must NOT be saved globally. EXCLUSIVELY for context relevant across ALL workspaces.
49152
+ Supports two scopes:
49153
+ - **global** (default): Cross-project preferences loaded in every workspace. Use for "Remember X" or clear personal facts.
49154
+ - **project**: Facts specific to the current workspace, private to the user (not committed to the repo). Use for local dev setup notes, project-specific workflows, or personal reminders about this codebase.
49098
49155
 
49099
- - Use for "Remember X" or clear personal facts.
49100
- - Do NOT use for session context.`,
49156
+ Do NOT use for session-specific context or temporary data.`,
49101
49157
  parametersJsonSchema: {
49102
49158
  type: "object",
49103
49159
  properties: {
49104
49160
  [MEMORY_PARAM_FACT]: {
49105
49161
  type: "string",
49106
49162
  description: "The specific fact or piece of information to remember. Should be a clear, self-contained statement."
49163
+ },
49164
+ [MEMORY_PARAM_SCOPE]: {
49165
+ type: "string",
49166
+ enum: ["global", "project"],
49167
+ description: "Where to save the memory. 'global' (default) saves to a file loaded in every workspace. 'project' saves to a project-specific file private to the user, not committed to the repo."
49107
49168
  }
49108
49169
  },
49109
49170
  required: [MEMORY_PARAM_FACT],
@@ -49661,13 +49722,18 @@ Use this tool when the user's query implies needing the content of several files
49661
49722
  },
49662
49723
  save_memory: {
49663
49724
  name: MEMORY_TOOL_NAME,
49664
- description: `Persists global preferences or facts across ALL future sessions. Use this for recurring instructions like coding styles or tool aliases. Unlike '${WRITE_FILE_TOOL_NAME}', which is for project-specific files, this appends to a global memory file loaded in every workspace. If you are unsure whether a fact should be remembered globally, ask the user first. CRITICAL: Do not use for session-specific context or temporary data.`,
49725
+ description: `Persists preferences or facts across ALL future sessions. Supports two scopes: 'global' (default) for cross-project preferences loaded in every workspace, and 'project' for facts specific to the current workspace that are private to the user (not committed to the repo). Use 'project' scope for things like local dev setup notes, project-specific workflows, or personal reminders about this codebase. CRITICAL: Do not use for session-specific context or temporary data.`,
49665
49726
  parametersJsonSchema: {
49666
49727
  type: "object",
49667
49728
  properties: {
49668
49729
  [MEMORY_PARAM_FACT]: {
49669
49730
  type: "string",
49670
- description: "A concise, global fact or preference (e.g., 'I prefer using tabs'). Do not include local paths or project-specific names."
49731
+ description: "A concise fact or preference to remember. Should be a clear, self-contained statement."
49732
+ },
49733
+ [MEMORY_PARAM_SCOPE]: {
49734
+ type: "string",
49735
+ enum: ["global", "project"],
49736
+ description: "Where to save the memory. 'global' (default) saves to a file loaded in every workspace. 'project' saves to a project-specific file private to the user, not committed to the repo."
49671
49737
  }
49672
49738
  },
49673
49739
  required: [MEMORY_PARAM_FACT],
@@ -49870,7 +49936,8 @@ The agent did not use the todo list because this task could be completed by a ti
49870
49936
  }
49871
49937
  },
49872
49938
  exit_plan_mode: () => getExitPlanModeDeclaration(),
49873
- activate_skill: (skillNames) => getActivateSkillDeclaration(skillNames)
49939
+ activate_skill: (skillNames) => getActivateSkillDeclaration(skillNames),
49940
+ update_topic: getUpdateTopicDeclaration()
49874
49941
  };
49875
49942
 
49876
49943
  // packages/core/src/tools/definitions/coreTools.ts
@@ -50477,7 +50544,8 @@ var ALL_BUILTIN_TOOL_NAMES = [
50477
50544
  TRACKER_VISUALIZE_TOOL_NAME,
50478
50545
  GET_INTERNAL_DOCS_TOOL_NAME,
50479
50546
  ENTER_PLAN_MODE_TOOL_NAME,
50480
- EXIT_PLAN_MODE_TOOL_NAME
50547
+ EXIT_PLAN_MODE_TOOL_NAME,
50548
+ UPDATE_TOPIC_TOOL_NAME
50481
50549
  ];
50482
50550
  var PLAN_MODE_TOOLS = [
50483
50551
  GLOB_TOOL_NAME,
@@ -50488,6 +50556,7 @@ var PLAN_MODE_TOOLS = [
50488
50556
  ASK_USER_TOOL_NAME,
50489
50557
  ACTIVATE_SKILL_TOOL_NAME,
50490
50558
  GET_INTERNAL_DOCS_TOOL_NAME,
50559
+ UPDATE_TOPIC_TOOL_NAME,
50491
50560
  "codebase_investigator",
50492
50561
  "cli_help"
50493
50562
  ];
@@ -50573,6 +50642,9 @@ function getAllGeminiMdFilenames() {
50573
50642
  function getGlobalMemoryFilePath() {
50574
50643
  return path7.join(Storage.getGlobalGeminiDir(), getCurrentGeminiMdFilename());
50575
50644
  }
50645
+ function getProjectMemoryFilePath(storage) {
50646
+ return path7.join(storage.getProjectMemoryDir(), getCurrentGeminiMdFilename());
50647
+ }
50576
50648
  function ensureNewlineSeparation(currentContent) {
50577
50649
  if (currentContent.length === 0) return "";
50578
50650
  if (currentContent.endsWith("\n\n") || currentContent.endsWith("\r\n\r\n"))
@@ -50581,9 +50653,9 @@ function ensureNewlineSeparation(currentContent) {
50581
50653
  return "\n";
50582
50654
  return "\n\n";
50583
50655
  }
50584
- async function readMemoryFileContent() {
50656
+ async function readMemoryFileContent(filePath) {
50585
50657
  try {
50586
- return await fs8.readFile(getGlobalMemoryFilePath(), "utf-8");
50658
+ return await fs8.readFile(filePath, "utf-8");
50587
50659
  } catch (err) {
50588
50660
  const error = err;
50589
50661
  if (!(error instanceof Error) || error.code !== "ENOENT") throw err;
@@ -50622,20 +50694,28 @@ ${afterSectionMarker}`.trimEnd() + "\n";
50622
50694
  var MemoryToolInvocation = class _MemoryToolInvocation extends BaseToolInvocation {
50623
50695
  static allowlist = /* @__PURE__ */ new Set();
50624
50696
  proposedNewContent;
50625
- constructor(params, messageBus, toolName, displayName) {
50697
+ storage;
50698
+ constructor(params, messageBus, toolName, displayName, storage) {
50626
50699
  super(params, messageBus, toolName, displayName);
50700
+ this.storage = storage;
50701
+ }
50702
+ getMemoryFilePath() {
50703
+ if (this.params.scope === "project" && this.storage) {
50704
+ return getProjectMemoryFilePath(this.storage);
50705
+ }
50706
+ return getGlobalMemoryFilePath();
50627
50707
  }
50628
50708
  getDescription() {
50629
- const memoryFilePath = getGlobalMemoryFilePath();
50709
+ const memoryFilePath = this.getMemoryFilePath();
50630
50710
  return `in ${tildeifyPath(memoryFilePath)}`;
50631
50711
  }
50632
50712
  async getConfirmationDetails(_abortSignal) {
50633
- const memoryFilePath = getGlobalMemoryFilePath();
50713
+ const memoryFilePath = this.getMemoryFilePath();
50634
50714
  const allowlistKey = memoryFilePath;
50635
50715
  if (_MemoryToolInvocation.allowlist.has(allowlistKey)) {
50636
50716
  return false;
50637
50717
  }
50638
- const currentContent = await readMemoryFileContent();
50718
+ const currentContent = await readMemoryFileContent(memoryFilePath);
50639
50719
  const { fact, modified_by_user, modified_content } = this.params;
50640
50720
  const contentForDiff = modified_by_user && modified_content !== void 0 ? modified_content : computeNewContent(currentContent, fact);
50641
50721
  this.proposedNewContent = contentForDiff;
@@ -50666,6 +50746,7 @@ var MemoryToolInvocation = class _MemoryToolInvocation extends BaseToolInvocatio
50666
50746
  }
50667
50747
  async execute(_signal) {
50668
50748
  const { fact, modified_by_user, modified_content } = this.params;
50749
+ const memoryFilePath = this.getMemoryFilePath();
50669
50750
  try {
50670
50751
  let contentToWrite;
50671
50752
  let successMessage;
@@ -50675,16 +50756,16 @@ var MemoryToolInvocation = class _MemoryToolInvocation extends BaseToolInvocatio
50675
50756
  successMessage = `Okay, I've updated the memory file with your modifications.`;
50676
50757
  } else {
50677
50758
  if (this.proposedNewContent === void 0) {
50678
- const currentContent = await readMemoryFileContent();
50759
+ const currentContent = await readMemoryFileContent(memoryFilePath);
50679
50760
  this.proposedNewContent = computeNewContent(currentContent, fact);
50680
50761
  }
50681
50762
  contentToWrite = this.proposedNewContent;
50682
50763
  successMessage = `Okay, I've remembered that: "${sanitizedFact}"`;
50683
50764
  }
50684
- await fs8.mkdir(path7.dirname(getGlobalMemoryFilePath()), {
50765
+ await fs8.mkdir(path7.dirname(memoryFilePath), {
50685
50766
  recursive: true
50686
50767
  });
50687
- await fs8.writeFile(getGlobalMemoryFilePath(), contentToWrite, "utf-8");
50768
+ await fs8.writeFile(memoryFilePath, contentToWrite, "utf-8");
50688
50769
  return {
50689
50770
  llmContent: JSON.stringify({
50690
50771
  success: true,
@@ -50710,7 +50791,8 @@ var MemoryToolInvocation = class _MemoryToolInvocation extends BaseToolInvocatio
50710
50791
  };
50711
50792
  var MemoryTool = class _MemoryTool extends BaseDeclarativeTool {
50712
50793
  static Name = MEMORY_TOOL_NAME;
50713
- constructor(messageBus) {
50794
+ storage;
50795
+ constructor(messageBus, storage) {
50714
50796
  super(
50715
50797
  _MemoryTool.Name,
50716
50798
  "SaveMemory",
@@ -50721,11 +50803,21 @@ var MemoryTool = class _MemoryTool extends BaseDeclarativeTool {
50721
50803
  true,
50722
50804
  false
50723
50805
  );
50806
+ this.storage = storage;
50807
+ }
50808
+ resolveMemoryFilePath(params) {
50809
+ if (params.scope === "project" && this.storage) {
50810
+ return getProjectMemoryFilePath(this.storage);
50811
+ }
50812
+ return getGlobalMemoryFilePath();
50724
50813
  }
50725
50814
  validateToolParamValues(params) {
50726
50815
  if (params.fact.trim() === "") {
50727
50816
  return 'Parameter "fact" must be a non-empty string.';
50728
50817
  }
50818
+ if (params.scope === "project" && !this.storage) {
50819
+ return "Project-level memory is not available: storage is not initialized.";
50820
+ }
50729
50821
  return null;
50730
50822
  }
50731
50823
  createInvocation(params, messageBus, toolName, displayName) {
@@ -50733,7 +50825,8 @@ var MemoryTool = class _MemoryTool extends BaseDeclarativeTool {
50733
50825
  params,
50734
50826
  messageBus,
50735
50827
  toolName ?? this.name,
50736
- displayName ?? this.displayName
50828
+ displayName ?? this.displayName,
50829
+ this.storage
50737
50830
  );
50738
50831
  }
50739
50832
  getSchema(modelId) {
@@ -50741,10 +50834,11 @@ var MemoryTool = class _MemoryTool extends BaseDeclarativeTool {
50741
50834
  }
50742
50835
  getModifyContext(_abortSignal) {
50743
50836
  return {
50744
- getFilePath: (_params) => getGlobalMemoryFilePath(),
50745
- getCurrentContent: async (_params) => readMemoryFileContent(),
50837
+ getFilePath: (params) => this.resolveMemoryFilePath(params),
50838
+ getCurrentContent: async (params) => readMemoryFileContent(this.resolveMemoryFilePath(params)),
50746
50839
  getProposedContent: async (params) => {
50747
- const currentContent = await readMemoryFileContent();
50840
+ const filePath = this.resolveMemoryFilePath(params);
50841
+ const currentContent = await readMemoryFileContent(filePath);
50748
50842
  const { fact, modified_by_user, modified_content } = params;
50749
50843
  return modified_by_user && modified_content !== void 0 ? modified_content : computeNewContent(currentContent, fact);
50750
50844
  },
@@ -50768,14 +50862,22 @@ var logger2 = {
50768
50862
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
50769
50863
  error: (...args) => debugLogger.error("[ERROR] [ImportProcessor]", ...args)
50770
50864
  };
50771
- async function findProjectRoot(startDir) {
50865
+ async function findProjectRoot(startDir, boundaryMarkers = [".git"]) {
50866
+ if (boundaryMarkers.length === 0) {
50867
+ return path8.resolve(startDir);
50868
+ }
50772
50869
  let currentDir = path8.resolve(startDir);
50773
50870
  while (true) {
50774
- const gitPath = path8.join(currentDir, ".git");
50775
- try {
50776
- await fs9.access(gitPath);
50777
- return currentDir;
50778
- } catch {
50871
+ for (const marker of boundaryMarkers) {
50872
+ if (path8.isAbsolute(marker) || marker.includes("..")) {
50873
+ continue;
50874
+ }
50875
+ const markerPath = path8.join(currentDir, marker);
50876
+ try {
50877
+ await fs9.access(markerPath);
50878
+ return currentDir;
50879
+ } catch {
50880
+ }
50779
50881
  }
50780
50882
  const parentDir = path8.dirname(currentDir);
50781
50883
  if (parentDir === currentDir) {
@@ -50836,9 +50938,9 @@ async function processImports(content, basePath, debugMode = false, importState
50836
50938
  processedFiles: /* @__PURE__ */ new Set(),
50837
50939
  maxDepth: 5,
50838
50940
  currentDepth: 0
50839
- }, projectRoot, importFormat = "tree") {
50941
+ }, projectRoot, importFormat = "tree", boundaryMarkers = [".git"]) {
50840
50942
  if (!projectRoot) {
50841
- projectRoot = await findProjectRoot(basePath);
50943
+ projectRoot = await findProjectRoot(basePath, boundaryMarkers);
50842
50944
  }
50843
50945
  if (importState.currentDepth >= importState.maxDepth) {
50844
50946
  if (debugMode) {
@@ -50944,7 +51046,8 @@ ${f.content.trim()}
50944
51046
  debugMode,
50945
51047
  newImportState,
50946
51048
  projectRoot,
50947
- importFormat
51049
+ importFormat,
51050
+ boundaryMarkers
50948
51051
  );
50949
51052
  result += `<!-- Imported from: ${importPath} -->
50950
51053
  ${imported.content}
@@ -51362,47 +51465,56 @@ function getErrorMessage(error) {
51362
51465
  }
51363
51466
  function getErrorType(error) {
51364
51467
  if (!(error instanceof Error)) return "unknown";
51365
- return error.name === "Error" ? error.constructor?.name ?? "Error" : error.name;
51468
+ const name = error.name && error.name !== "Error" ? error.name : error.constructor?.name ?? "Error";
51469
+ return name.replace(/^_+/, "");
51366
51470
  }
51367
51471
  var FatalError = class extends Error {
51368
51472
  constructor(message, exitCode) {
51369
51473
  super(message);
51370
51474
  this.exitCode = exitCode;
51475
+ this.name = "FatalError";
51371
51476
  }
51372
51477
  };
51373
51478
  var FatalAuthenticationError = class extends FatalError {
51374
51479
  constructor(message) {
51375
51480
  super(message, 41);
51481
+ this.name = "FatalAuthenticationError";
51376
51482
  }
51377
51483
  };
51378
51484
  var FatalInputError = class extends FatalError {
51379
51485
  constructor(message) {
51380
51486
  super(message, 42);
51487
+ this.name = "FatalInputError";
51381
51488
  }
51382
51489
  };
51383
51490
  var FatalSandboxError = class extends FatalError {
51384
51491
  constructor(message) {
51385
51492
  super(message, 44);
51493
+ this.name = "FatalSandboxError";
51386
51494
  }
51387
51495
  };
51388
51496
  var FatalConfigError = class extends FatalError {
51389
51497
  constructor(message) {
51390
51498
  super(message, 52);
51499
+ this.name = "FatalConfigError";
51391
51500
  }
51392
51501
  };
51393
51502
  var FatalTurnLimitedError = class extends FatalError {
51394
51503
  constructor(message) {
51395
51504
  super(message, 53);
51505
+ this.name = "FatalTurnLimitedError";
51396
51506
  }
51397
51507
  };
51398
51508
  var FatalToolExecutionError = class extends FatalError {
51399
51509
  constructor(message) {
51400
51510
  super(message, 54);
51511
+ this.name = "FatalToolExecutionError";
51401
51512
  }
51402
51513
  };
51403
51514
  var FatalCancellationError = class extends FatalError {
51404
51515
  constructor(message) {
51405
51516
  super(message, 130);
51517
+ this.name = "FatalCancellationError";
51406
51518
  }
51407
51519
  };
51408
51520
  var CanceledError = class extends Error {
@@ -51412,6 +51524,10 @@ var CanceledError = class extends Error {
51412
51524
  }
51413
51525
  };
51414
51526
  var ForbiddenError = class extends Error {
51527
+ constructor(message) {
51528
+ super(message);
51529
+ this.name = "ForbiddenError";
51530
+ }
51415
51531
  };
51416
51532
  var AccountSuspendedError = class extends ForbiddenError {
51417
51533
  appealUrl;
@@ -51424,8 +51540,16 @@ var AccountSuspendedError = class extends ForbiddenError {
51424
51540
  }
51425
51541
  };
51426
51542
  var UnauthorizedError = class extends Error {
51543
+ constructor(message) {
51544
+ super(message);
51545
+ this.name = "UnauthorizedError";
51546
+ }
51427
51547
  };
51428
51548
  var BadRequestError = class extends Error {
51549
+ constructor(message) {
51550
+ super(message);
51551
+ this.name = "BadRequestError";
51552
+ }
51429
51553
  };
51430
51554
  var ChangeAuthRequestedError = class extends Error {
51431
51555
  constructor() {
@@ -51507,7 +51631,7 @@ function isAuthenticationError(error) {
51507
51631
  return true;
51508
51632
  }
51509
51633
  }
51510
- if (error instanceof Error && error.constructor.name === "UnauthorizedError") {
51634
+ if (error instanceof Error && error.name === "UnauthorizedError") {
51511
51635
  return true;
51512
51636
  }
51513
51637
  if (error instanceof UnauthorizedError) {
@@ -51606,27 +51730,35 @@ async function deduplicatePathsByFileIdentity(filePaths) {
51606
51730
  identityMap: pathToIdentityMap
51607
51731
  };
51608
51732
  }
51609
- async function findProjectRoot2(startDir) {
51733
+ async function findProjectRoot2(startDir, boundaryMarkers = [".git"]) {
51734
+ if (boundaryMarkers.length === 0) {
51735
+ return null;
51736
+ }
51610
51737
  let currentDir = normalizePath(startDir);
51611
51738
  while (true) {
51612
- const gitPath = path9.join(currentDir, ".git");
51613
- try {
51614
- await fs10.access(gitPath);
51615
- return currentDir;
51616
- } catch (error) {
51617
- const isENOENT = typeof error === "object" && error !== null && "code" in error && // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
51618
- error.code === "ENOENT";
51619
- const isTestEnv = process.env["NODE_ENV"] === "test" || process.env["VITEST"];
51620
- if (!isENOENT && !isTestEnv) {
51621
- if (typeof error === "object" && error !== null && "code" in error) {
51622
- const fsError = error;
51623
- logger3.warn(
51624
- `Error checking for .git at ${gitPath}: ${fsError.message}`
51625
- );
51626
- } else {
51627
- logger3.warn(
51628
- `Non-standard error checking for .git at ${gitPath}: ${String(error)}`
51629
- );
51739
+ for (const marker of boundaryMarkers) {
51740
+ if (path9.isAbsolute(marker) || marker.includes("..")) {
51741
+ continue;
51742
+ }
51743
+ const markerPath = path9.join(currentDir, marker);
51744
+ try {
51745
+ await fs10.access(markerPath);
51746
+ return currentDir;
51747
+ } catch (error) {
51748
+ const isENOENT = typeof error === "object" && error !== null && "code" in error && // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
51749
+ error.code === "ENOENT";
51750
+ const isTestEnv = process.env["NODE_ENV"] === "test" || process.env["VITEST"];
51751
+ if (!isENOENT && !isTestEnv) {
51752
+ if (typeof error === "object" && error !== null && "code" in error) {
51753
+ const fsError = error;
51754
+ logger3.warn(
51755
+ `Error checking for ${marker} at ${markerPath}: ${fsError.message}`
51756
+ );
51757
+ } else {
51758
+ logger3.warn(
51759
+ `Non-standard error checking for ${marker} at ${markerPath}: ${String(error)}`
51760
+ );
51761
+ }
51630
51762
  }
51631
51763
  }
51632
51764
  }
@@ -51637,7 +51769,7 @@ async function findProjectRoot2(startDir) {
51637
51769
  currentDir = parentDir;
51638
51770
  }
51639
51771
  }
51640
- async function getGeminiMdFilePathsInternal(currentWorkingDirectory, includeDirectoriesToReadGemini, userHomePath, fileService, folderTrust, fileFilteringOptions, maxDirs) {
51772
+ async function getGeminiMdFilePathsInternal(currentWorkingDirectory, includeDirectoriesToReadGemini, userHomePath, fileService, folderTrust, fileFilteringOptions, maxDirs, boundaryMarkers = [".git"]) {
51641
51773
  const dirs = /* @__PURE__ */ new Set([
51642
51774
  ...includeDirectoriesToReadGemini,
51643
51775
  currentWorkingDirectory
@@ -51655,7 +51787,8 @@ async function getGeminiMdFilePathsInternal(currentWorkingDirectory, includeDire
51655
51787
  fileService,
51656
51788
  folderTrust,
51657
51789
  fileFilteringOptions,
51658
- maxDirs
51790
+ maxDirs,
51791
+ boundaryMarkers
51659
51792
  )
51660
51793
  );
51661
51794
  const batchResults = await Promise.allSettled(batchPromises);
@@ -51675,7 +51808,7 @@ async function getGeminiMdFilePathsInternal(currentWorkingDirectory, includeDire
51675
51808
  project: Array.from(projectPaths)
51676
51809
  };
51677
51810
  }
51678
- async function getGeminiMdFilePathsInternalForEachDir(dir, userHomePath, fileService, folderTrust, fileFilteringOptions, maxDirs) {
51811
+ async function getGeminiMdFilePathsInternalForEachDir(dir, userHomePath, fileService, folderTrust, fileFilteringOptions, maxDirs, boundaryMarkers = [".git"]) {
51679
51812
  const globalPaths = /* @__PURE__ */ new Set();
51680
51813
  const projectPaths = /* @__PURE__ */ new Set();
51681
51814
  const geminiMdFilenames = getAllGeminiMdFilenames();
@@ -51703,7 +51836,7 @@ async function getGeminiMdFilePathsInternalForEachDir(dir, userHomePath, fileSer
51703
51836
  "starting from CWD:",
51704
51837
  resolvedCwd
51705
51838
  );
51706
- const projectRoot = await findProjectRoot2(resolvedCwd);
51839
+ const projectRoot = await findProjectRoot2(resolvedCwd, boundaryMarkers);
51707
51840
  debugLogger.debug(
51708
51841
  "[DEBUG] [MemoryDiscovery] Determined project root:",
51709
51842
  projectRoot ?? "None"
@@ -51752,7 +51885,7 @@ async function getGeminiMdFilePathsInternalForEachDir(dir, userHomePath, fileSer
51752
51885
  project: Array.from(projectPaths)
51753
51886
  };
51754
51887
  }
51755
- async function readGeminiMdFiles(filePaths, importFormat = "tree") {
51888
+ async function readGeminiMdFiles(filePaths, importFormat = "tree", boundaryMarkers = [".git"]) {
51756
51889
  const CONCURRENT_LIMIT = 20;
51757
51890
  const results = [];
51758
51891
  for (let i = 0; i < filePaths.length; i += CONCURRENT_LIMIT) {
@@ -51767,7 +51900,8 @@ async function readGeminiMdFiles(filePaths, importFormat = "tree") {
51767
51900
  false,
51768
51901
  void 0,
51769
51902
  void 0,
51770
- importFormat
51903
+ importFormat,
51904
+ boundaryMarkers
51771
51905
  );
51772
51906
  debugLogger.debug(
51773
51907
  "[DEBUG] [MemoryDiscovery] Successfully read and processed imports:",
@@ -51835,15 +51969,34 @@ async function getGlobalMemoryPaths() {
51835
51969
  (p) => p !== null
51836
51970
  );
51837
51971
  }
51972
+ async function getUserProjectMemoryPaths(projectMemoryDir) {
51973
+ const geminiMdFilenames = getAllGeminiMdFilenames();
51974
+ const accessChecks = geminiMdFilenames.map(async (filename) => {
51975
+ const memoryPath = normalizePath(path9.join(projectMemoryDir, filename));
51976
+ try {
51977
+ await fs10.access(memoryPath, fsSync2.constants.R_OK);
51978
+ debugLogger.debug(
51979
+ "[DEBUG] [MemoryDiscovery] Found user project memory file:",
51980
+ memoryPath
51981
+ );
51982
+ return memoryPath;
51983
+ } catch {
51984
+ return null;
51985
+ }
51986
+ });
51987
+ return (await Promise.all(accessChecks)).filter(
51988
+ (p) => p !== null
51989
+ );
51990
+ }
51838
51991
  function getExtensionMemoryPaths(extensionLoader) {
51839
51992
  const extensionPaths = extensionLoader.getExtensions().filter((ext) => ext.isActive).flatMap((ext) => ext.contextFiles).map((p) => normalizePath(p));
51840
51993
  return Array.from(new Set(extensionPaths)).sort();
51841
51994
  }
51842
- async function getEnvironmentMemoryPaths(trustedRoots) {
51995
+ async function getEnvironmentMemoryPaths(trustedRoots, boundaryMarkers = [".git"]) {
51843
51996
  const allPaths = /* @__PURE__ */ new Set();
51844
51997
  const traversalPromises = trustedRoots.map(async (root) => {
51845
51998
  const resolvedRoot = normalizePath(root);
51846
- const gitRoot = await findProjectRoot2(resolvedRoot);
51999
+ const gitRoot = await findProjectRoot2(resolvedRoot, boundaryMarkers);
51847
52000
  const ceiling = gitRoot ? normalizePath(gitRoot) : resolvedRoot;
51848
52001
  debugLogger.debug(
51849
52002
  "[DEBUG] [MemoryDiscovery] Loading environment memory for trusted root:",
@@ -51864,7 +52017,8 @@ function categorizeAndConcatenate(paths, contentsMap) {
51864
52017
  return {
51865
52018
  global: getConcatenated(paths.global),
51866
52019
  extension: getConcatenated(paths.extension),
51867
- project: getConcatenated(paths.project)
52020
+ project: getConcatenated(paths.project),
52021
+ userProjectMemory: getConcatenated(paths.userProjectMemory ?? [])
51868
52022
  };
51869
52023
  }
51870
52024
  async function findUpwardGeminiFiles(startDir, stopDir) {
@@ -51904,7 +52058,7 @@ async function findUpwardGeminiFiles(startDir, stopDir) {
51904
52058
  }
51905
52059
  return upwardPaths;
51906
52060
  }
51907
- async function loadServerHierarchicalMemory(currentWorkingDirectory, includeDirectoriesToReadGemini, fileService, extensionLoader, folderTrust, importFormat = "tree", fileFilteringOptions, maxDirs = 200) {
52061
+ async function loadServerHierarchicalMemory(currentWorkingDirectory, includeDirectoriesToReadGemini, fileService, extensionLoader, folderTrust, importFormat = "tree", fileFilteringOptions, maxDirs = 200, boundaryMarkers = [".git"]) {
51908
52062
  const realCwd = normalizePath(
51909
52063
  await fs10.realpath(path9.resolve(currentWorkingDirectory))
51910
52064
  );
@@ -51925,7 +52079,8 @@ async function loadServerHierarchicalMemory(currentWorkingDirectory, includeDire
51925
52079
  fileService,
51926
52080
  folderTrust,
51927
52081
  fileFilteringOptions || DEFAULT_MEMORY_FILE_FILTERING_OPTIONS,
51928
- maxDirs
52082
+ maxDirs,
52083
+ boundaryMarkers
51929
52084
  ),
51930
52085
  Promise.resolve(getExtensionMemoryPaths(extensionLoader))
51931
52086
  ]);
@@ -51959,7 +52114,11 @@ async function loadServerHierarchicalMemory(currentWorkingDirectory, includeDire
51959
52114
  filePaths: []
51960
52115
  };
51961
52116
  }
51962
- const allContents = await readGeminiMdFiles(allFilePaths, importFormat);
52117
+ const allContents = await readGeminiMdFiles(
52118
+ allFilePaths,
52119
+ importFormat,
52120
+ boundaryMarkers
52121
+ );
51963
52122
  const contentsMap = new Map(allContents.map((c) => [c.filePath, c]));
51964
52123
  const hierarchicalMemory = categorizeAndConcatenate(
51965
52124
  {
@@ -51984,7 +52143,8 @@ async function refreshServerHierarchicalMemory(config) {
51984
52143
  config.isTrustedFolder(),
51985
52144
  config.getImportFormat(),
51986
52145
  config.getFileFilteringOptions(),
51987
- config.getDiscoveryMaxDirs()
52146
+ config.getDiscoveryMaxDirs(),
52147
+ config.getMemoryBoundaryMarkers()
51988
52148
  );
51989
52149
  const mcpInstructions = config.getMcpClientManager()?.getMcpInstructions() || "";
51990
52150
  const finalMemory = {
@@ -51997,7 +52157,7 @@ async function refreshServerHierarchicalMemory(config) {
51997
52157
  coreEvents.emit("memory-changed" /* MemoryChanged */, { fileCount: result.fileCount });
51998
52158
  return result;
51999
52159
  }
52000
- async function loadJitSubdirectoryMemory(targetPath, trustedRoots, alreadyLoadedPaths, alreadyLoadedIdentities) {
52160
+ async function loadJitSubdirectoryMemory(targetPath, trustedRoots, alreadyLoadedPaths, alreadyLoadedIdentities, boundaryMarkers = [".git"]) {
52001
52161
  const resolvedTarget = normalizePath(targetPath);
52002
52162
  let bestRoot = null;
52003
52163
  for (const root of trustedRoots) {
@@ -52017,7 +52177,7 @@ async function loadJitSubdirectoryMemory(targetPath, trustedRoots, alreadyLoaded
52017
52177
  );
52018
52178
  return { files: [], fileIdentities: [] };
52019
52179
  }
52020
- const gitRoot = await findProjectRoot2(bestRoot);
52180
+ const gitRoot = await findProjectRoot2(bestRoot, boundaryMarkers);
52021
52181
  const resolvedCeiling = gitRoot ? normalizePath(gitRoot) : bestRoot;
52022
52182
  debugLogger.debug(
52023
52183
  "[DEBUG] [MemoryDiscovery] Loading JIT memory for",
@@ -52079,7 +52239,7 @@ async function loadJitSubdirectoryMemory(targetPath, trustedRoots, alreadyLoaded
52079
52239
  "[DEBUG] [MemoryDiscovery] Found new JIT memory files:",
52080
52240
  JSON.stringify(newPaths)
52081
52241
  );
52082
- const contents = await readGeminiMdFiles(newPaths, "tree");
52242
+ const contents = await readGeminiMdFiles(newPaths, "tree", boundaryMarkers);
52083
52243
  return {
52084
52244
  files: contents.filter((item) => item.content !== null).map((item) => ({
52085
52245
  path: item.filePath,
@@ -52117,16 +52277,17 @@ export {
52117
52277
  EmbedContentResponse,
52118
52278
  ApiError,
52119
52279
  GoogleGenAI,
52120
- MessageBusType,
52121
- QuestionType,
52122
52280
  PolicyDecision,
52123
52281
  getHookSource,
52124
52282
  ApprovalMode,
52283
+ MODES_BY_PERMISSIVENESS,
52125
52284
  InProcessCheckerType,
52126
52285
  PRIORITY_SUBAGENT_TOOL,
52127
52286
  ALWAYS_ALLOW_PRIORITY_FRACTION,
52128
52287
  ALWAYS_ALLOW_PRIORITY_OFFSET,
52129
52288
  PRIORITY_YOLO_ALLOW_ALL,
52289
+ MessageBusType,
52290
+ QuestionType,
52130
52291
  isBackgroundExecutionData,
52131
52292
  BaseToolInvocation,
52132
52293
  DeclarativeTool,
@@ -52137,6 +52298,7 @@ export {
52137
52298
  hasSummary,
52138
52299
  isGrepResult,
52139
52300
  isListResult,
52301
+ isReadManyFilesResult,
52140
52302
  isFileDiff,
52141
52303
  ToolConfirmationOutcome,
52142
52304
  Kind,
@@ -52263,7 +52425,13 @@ export {
52263
52425
  ENTER_PLAN_MODE_TOOL_NAME,
52264
52426
  PLAN_MODE_PARAM_REASON,
52265
52427
  PARAM_ADDITIONAL_PERMISSIONS,
52428
+ UPDATE_TOPIC_TOOL_NAME,
52429
+ UPDATE_TOPIC_DISPLAY_NAME,
52430
+ TOPIC_PARAM_TITLE,
52431
+ TOPIC_PARAM_SUMMARY,
52432
+ TOPIC_PARAM_STRATEGIC_INTENT,
52266
52433
  zodToJsonSchema,
52434
+ getUpdateTopicDeclaration,
52267
52435
  REFERENCE_CONTENT_START,
52268
52436
  REFERENCE_CONTENT_END,
52269
52437
  DEFAULT_MAX_LINES_TEXT_FILE,
@@ -52328,6 +52496,7 @@ export {
52328
52496
  getCurrentGeminiMdFilename,
52329
52497
  getAllGeminiMdFilenames,
52330
52498
  getGlobalMemoryFilePath,
52499
+ getProjectMemoryFilePath,
52331
52500
  MemoryTool,
52332
52501
  parseGoogleApiError,
52333
52502
  isNodeError,
@@ -52366,6 +52535,7 @@ export {
52366
52535
  readGeminiMdFiles,
52367
52536
  concatenateInstructions,
52368
52537
  getGlobalMemoryPaths,
52538
+ getUserProjectMemoryPaths,
52369
52539
  getExtensionMemoryPaths,
52370
52540
  getEnvironmentMemoryPaths,
52371
52541
  categorizeAndConcatenate,