@mastra/core 1.16.0-alpha.2 → 1.16.0-alpha.3

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 (162) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/agent/agent.d.ts.map +1 -1
  3. package/dist/agent/index.cjs +8 -8
  4. package/dist/agent/index.js +1 -1
  5. package/dist/{chunk-4R7XCDYZ.js → chunk-26OOSNWN.js} +3 -3
  6. package/dist/{chunk-4R7XCDYZ.js.map → chunk-26OOSNWN.js.map} +1 -1
  7. package/dist/{chunk-373WBBIV.js → chunk-2CEWKM43.js} +3 -3
  8. package/dist/{chunk-373WBBIV.js.map → chunk-2CEWKM43.js.map} +1 -1
  9. package/dist/{chunk-6FFPNMST.cjs → chunk-2NDTZII6.cjs} +15 -15
  10. package/dist/{chunk-6FFPNMST.cjs.map → chunk-2NDTZII6.cjs.map} +1 -1
  11. package/dist/{chunk-4B2CHAMZ.cjs → chunk-4EZX3JLF.cjs} +9 -9
  12. package/dist/{chunk-4B2CHAMZ.cjs.map → chunk-4EZX3JLF.cjs.map} +1 -1
  13. package/dist/{chunk-L4AQYWBK.cjs → chunk-4LDSJHWQ.cjs} +7 -7
  14. package/dist/{chunk-L4AQYWBK.cjs.map → chunk-4LDSJHWQ.cjs.map} +1 -1
  15. package/dist/{chunk-UA5AY2ES.js → chunk-76GUV7TZ.js} +3 -3
  16. package/dist/{chunk-UA5AY2ES.js.map → chunk-76GUV7TZ.js.map} +1 -1
  17. package/dist/{chunk-JY32HS2J.js → chunk-7LMIK23W.js} +3 -3
  18. package/dist/{chunk-JY32HS2J.js.map → chunk-7LMIK23W.js.map} +1 -1
  19. package/dist/{chunk-FQJZIBZ2.js → chunk-A25ZFPG7.js} +6 -6
  20. package/dist/{chunk-FQJZIBZ2.js.map → chunk-A25ZFPG7.js.map} +1 -1
  21. package/dist/{chunk-TQTUU6QD.cjs → chunk-AVOGYFGK.cjs} +83 -83
  22. package/dist/{chunk-TQTUU6QD.cjs.map → chunk-AVOGYFGK.cjs.map} +1 -1
  23. package/dist/{chunk-PLWEBAHH.cjs → chunk-BF2JWKWL.cjs} +5 -5
  24. package/dist/{chunk-PLWEBAHH.cjs.map → chunk-BF2JWKWL.cjs.map} +1 -1
  25. package/dist/{chunk-DJLBGTUV.cjs → chunk-BXDWBXQW.cjs} +5 -5
  26. package/dist/{chunk-DJLBGTUV.cjs.map → chunk-BXDWBXQW.cjs.map} +1 -1
  27. package/dist/{chunk-CJVTGET7.js → chunk-GZWOMZ7C.js} +3 -3
  28. package/dist/{chunk-CJVTGET7.js.map → chunk-GZWOMZ7C.js.map} +1 -1
  29. package/dist/{chunk-HQKKB3UP.js → chunk-IS7VFXXN.js} +8 -8
  30. package/dist/{chunk-HQKKB3UP.js.map → chunk-IS7VFXXN.js.map} +1 -1
  31. package/dist/{chunk-4DW75LWG.js → chunk-JBAMLTYP.js} +4 -4
  32. package/dist/{chunk-4DW75LWG.js.map → chunk-JBAMLTYP.js.map} +1 -1
  33. package/dist/{chunk-3OZVV5J7.js → chunk-JO36CQSY.js} +4 -4
  34. package/dist/{chunk-3OZVV5J7.js.map → chunk-JO36CQSY.js.map} +1 -1
  35. package/dist/{chunk-55W2K42G.js → chunk-MLCFE6MR.js} +15 -3
  36. package/dist/chunk-MLCFE6MR.js.map +1 -0
  37. package/dist/{chunk-GXAKTLZ3.cjs → chunk-MQ2YFSTS.cjs} +185 -185
  38. package/dist/{chunk-GXAKTLZ3.cjs.map → chunk-MQ2YFSTS.cjs.map} +1 -1
  39. package/dist/{chunk-4MG6J5RS.cjs → chunk-Q7B3NPO3.cjs} +3 -3
  40. package/dist/{chunk-4MG6J5RS.cjs.map → chunk-Q7B3NPO3.cjs.map} +1 -1
  41. package/dist/{chunk-4TMCYZ72.cjs → chunk-RKGUSDHX.cjs} +53 -53
  42. package/dist/{chunk-4TMCYZ72.cjs.map → chunk-RKGUSDHX.cjs.map} +1 -1
  43. package/dist/{chunk-563KV7S2.js → chunk-STU7CG7E.js} +5 -5
  44. package/dist/{chunk-563KV7S2.js.map → chunk-STU7CG7E.js.map} +1 -1
  45. package/dist/{chunk-GZ2ZPBMU.js → chunk-TKGXEXRR.js} +21 -12
  46. package/dist/chunk-TKGXEXRR.js.map +1 -0
  47. package/dist/{chunk-O3WTNJXV.js → chunk-TQO7BSJX.js} +3 -3
  48. package/dist/{chunk-O3WTNJXV.js.map → chunk-TQO7BSJX.js.map} +1 -1
  49. package/dist/{chunk-D5DBRZH3.js → chunk-TUSCHVH3.js} +5 -4
  50. package/dist/chunk-TUSCHVH3.js.map +1 -0
  51. package/dist/{chunk-325Q6NH6.cjs → chunk-V7KMU6NL.cjs} +7 -7
  52. package/dist/{chunk-325Q6NH6.cjs.map → chunk-V7KMU6NL.cjs.map} +1 -1
  53. package/dist/{chunk-2DPHD6NF.cjs → chunk-VQMIFPSC.cjs} +70 -61
  54. package/dist/chunk-VQMIFPSC.cjs.map +1 -0
  55. package/dist/{chunk-L53XY7WT.js → chunk-WEKILIGZ.js} +161 -63
  56. package/dist/chunk-WEKILIGZ.js.map +1 -0
  57. package/dist/{chunk-KWQ4YIWP.cjs → chunk-WZ2EJZ7R.cjs} +6 -6
  58. package/dist/{chunk-KWQ4YIWP.cjs.map → chunk-WZ2EJZ7R.cjs.map} +1 -1
  59. package/dist/{chunk-P7KTLFJM.js → chunk-WZQ2AJZV.js} +8 -8
  60. package/dist/{chunk-P7KTLFJM.js.map → chunk-WZQ2AJZV.js.map} +1 -1
  61. package/dist/{chunk-GYLHNAH7.cjs → chunk-XME4PQE7.cjs} +15 -3
  62. package/dist/chunk-XME4PQE7.cjs.map +1 -0
  63. package/dist/{chunk-Q7EDK6IW.cjs → chunk-XYT5D2T7.cjs} +9 -9
  64. package/dist/{chunk-Q7EDK6IW.cjs.map → chunk-XYT5D2T7.cjs.map} +1 -1
  65. package/dist/{chunk-KQ3SJZG5.cjs → chunk-YSPKTAYB.cjs} +182 -84
  66. package/dist/chunk-YSPKTAYB.cjs.map +1 -0
  67. package/dist/{chunk-3XWXW2YI.cjs → chunk-YVFTL5BS.cjs} +17 -16
  68. package/dist/chunk-YVFTL5BS.cjs.map +1 -0
  69. package/dist/datasets/index.cjs +17 -17
  70. package/dist/datasets/index.js +2 -2
  71. package/dist/docs/SKILL.md +1 -1
  72. package/dist/docs/assets/SOURCE_MAP.json +226 -226
  73. package/dist/docs/references/docs-observability-tracing-exporters-datadog.md +132 -2
  74. package/dist/docs/references/docs-workspace-skills.md +23 -0
  75. package/dist/docs/references/reference-tools-create-tool.md +1 -1
  76. package/dist/docs/references/reference-workspace-workspace-class.md +13 -1
  77. package/dist/evals/index.cjs +5 -5
  78. package/dist/evals/index.js +2 -2
  79. package/dist/evals/scoreTraces/index.cjs +3 -3
  80. package/dist/evals/scoreTraces/index.js +1 -1
  81. package/dist/harness/index.cjs +17 -17
  82. package/dist/harness/index.js +7 -7
  83. package/dist/index.cjs +2 -2
  84. package/dist/index.js +1 -1
  85. package/dist/integration/index.cjs +2 -2
  86. package/dist/integration/index.js +1 -1
  87. package/dist/llm/index.cjs +16 -16
  88. package/dist/llm/index.js +5 -5
  89. package/dist/loop/index.cjs +14 -14
  90. package/dist/loop/index.js +1 -1
  91. package/dist/loop/network/index.d.ts.map +1 -1
  92. package/dist/mastra/index.cjs +2 -2
  93. package/dist/mastra/index.js +1 -1
  94. package/dist/memory/index.cjs +14 -14
  95. package/dist/memory/index.js +1 -1
  96. package/dist/models-dev-2FOUJALF.cjs +12 -0
  97. package/dist/{models-dev-OFI5OSM7.cjs.map → models-dev-2FOUJALF.cjs.map} +1 -1
  98. package/dist/models-dev-A55UVGDD.js +3 -0
  99. package/dist/{models-dev-OU3ACSEQ.js.map → models-dev-A55UVGDD.js.map} +1 -1
  100. package/dist/netlify-I3P5QPXG.cjs +12 -0
  101. package/dist/{netlify-YVCTG2Z3.cjs.map → netlify-I3P5QPXG.cjs.map} +1 -1
  102. package/dist/netlify-MF3L2BRE.js +3 -0
  103. package/dist/{netlify-OPNSZBGQ.js.map → netlify-MF3L2BRE.js.map} +1 -1
  104. package/dist/processor-provider/index.cjs +10 -10
  105. package/dist/processor-provider/index.js +1 -1
  106. package/dist/processors/index.cjs +42 -42
  107. package/dist/processors/index.js +1 -1
  108. package/dist/processors/processors/skills.d.ts.map +1 -1
  109. package/dist/provider-registry-J76YNM72.js +3 -0
  110. package/dist/{provider-registry-KYR3I44P.js.map → provider-registry-J76YNM72.js.map} +1 -1
  111. package/dist/provider-registry-QB6DEJ7U.cjs +40 -0
  112. package/dist/{provider-registry-73NPBVKH.cjs.map → provider-registry-QB6DEJ7U.cjs.map} +1 -1
  113. package/dist/relevance/index.cjs +3 -3
  114. package/dist/relevance/index.js +1 -1
  115. package/dist/storage/index.cjs +74 -74
  116. package/dist/storage/index.js +1 -1
  117. package/dist/stream/index.cjs +8 -8
  118. package/dist/stream/index.js +1 -1
  119. package/dist/test-utils/llm-mock.cjs +4 -4
  120. package/dist/test-utils/llm-mock.js +1 -1
  121. package/dist/tool-loop-agent/index.cjs +4 -4
  122. package/dist/tool-loop-agent/index.js +1 -1
  123. package/dist/tools/index.cjs +7 -7
  124. package/dist/tools/index.js +1 -1
  125. package/dist/tools/is-vercel-tool.cjs +2 -2
  126. package/dist/tools/is-vercel-tool.js +1 -1
  127. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  128. package/dist/tools/tool.d.ts.map +1 -1
  129. package/dist/tools/types.d.ts +1 -0
  130. package/dist/tools/types.d.ts.map +1 -1
  131. package/dist/utils.cjs +23 -23
  132. package/dist/utils.d.ts +1 -0
  133. package/dist/utils.d.ts.map +1 -1
  134. package/dist/utils.js +1 -1
  135. package/dist/vector/index.cjs +7 -7
  136. package/dist/vector/index.js +1 -1
  137. package/dist/workflows/evented/index.cjs +10 -10
  138. package/dist/workflows/evented/index.js +1 -1
  139. package/dist/workflows/index.cjs +24 -24
  140. package/dist/workflows/index.js +1 -1
  141. package/dist/workspace/index.cjs +68 -68
  142. package/dist/workspace/index.js +1 -1
  143. package/dist/workspace/skills/tools.d.ts.map +1 -1
  144. package/dist/workspace/skills/types.d.ts +9 -5
  145. package/dist/workspace/skills/types.d.ts.map +1 -1
  146. package/dist/workspace/skills/workspace-skills.d.ts.map +1 -1
  147. package/dist/workspace/workspace.d.ts +1 -1
  148. package/package.json +7 -7
  149. package/dist/chunk-2DPHD6NF.cjs.map +0 -1
  150. package/dist/chunk-3XWXW2YI.cjs.map +0 -1
  151. package/dist/chunk-55W2K42G.js.map +0 -1
  152. package/dist/chunk-D5DBRZH3.js.map +0 -1
  153. package/dist/chunk-GYLHNAH7.cjs.map +0 -1
  154. package/dist/chunk-GZ2ZPBMU.js.map +0 -1
  155. package/dist/chunk-KQ3SJZG5.cjs.map +0 -1
  156. package/dist/chunk-L53XY7WT.js.map +0 -1
  157. package/dist/models-dev-OFI5OSM7.cjs +0 -12
  158. package/dist/models-dev-OU3ACSEQ.js +0 -3
  159. package/dist/netlify-OPNSZBGQ.js +0 -3
  160. package/dist/netlify-YVCTG2Z3.cjs +0 -12
  161. package/dist/provider-registry-73NPBVKH.cjs +0 -40
  162. package/dist/provider-registry-KYR3I44P.js +0 -3
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkGYLHNAH7_cjs = require('./chunk-GYLHNAH7.cjs');
3
+ var chunkXME4PQE7_cjs = require('./chunk-XME4PQE7.cjs');
4
4
  var chunkRO47SMI7_cjs = require('./chunk-RO47SMI7.cjs');
5
5
  var chunk7XAECHYL_cjs = require('./chunk-7XAECHYL.cjs');
6
6
  var nodePath = require('path');
@@ -1584,7 +1584,7 @@ function isLSPAvailable() {
1584
1584
  return jsonrpcModule !== null;
1585
1585
  }
1586
1586
  try {
1587
- const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-KQ3SJZG5.cjs', document.baseURI).href)));
1587
+ const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-YSPKTAYB.cjs', document.baseURI).href)));
1588
1588
  req.resolve("vscode-jsonrpc/node");
1589
1589
  req.resolve("vscode-languageserver-protocol");
1590
1590
  return true;
@@ -1598,7 +1598,7 @@ async function loadLSPDeps() {
1598
1598
  return { ...jsonrpcModule, ...lspProtocolModule };
1599
1599
  }
1600
1600
  try {
1601
- const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-KQ3SJZG5.cjs', document.baseURI).href)));
1601
+ const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-YSPKTAYB.cjs', document.baseURI).href)));
1602
1602
  const jsonrpc = req("vscode-jsonrpc/node");
1603
1603
  const protocol = req("vscode-languageserver-protocol");
1604
1604
  jsonrpcModule = {
@@ -5023,7 +5023,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5023
5023
  #skillsResolver;
5024
5024
  #searchEngine;
5025
5025
  #validateOnLoad;
5026
- /** Map of skill name -> full skill data */
5026
+ /** Map of skill name -> array of candidates (supports same-named skills from different sources) */
5027
5027
  #skills = /* @__PURE__ */ new Map();
5028
5028
  /** Whether skills have been discovered */
5029
5029
  #initialized = false;
@@ -5051,28 +5051,91 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5051
5051
  // ===========================================================================
5052
5052
  async list() {
5053
5053
  await this.#ensureInitialized();
5054
- return Array.from(this.#skills.values()).map((skill) => ({
5055
- name: skill.name,
5056
- description: skill.description,
5057
- license: skill.license,
5058
- compatibility: skill.compatibility,
5059
- metadata: skill.metadata
5060
- }));
5054
+ const results = [];
5055
+ for (const candidates of this.#skills.values()) {
5056
+ for (const skill of candidates) {
5057
+ results.push({
5058
+ name: skill.name,
5059
+ path: skill.path,
5060
+ description: skill.description,
5061
+ license: skill.license,
5062
+ compatibility: skill.compatibility,
5063
+ metadata: skill.metadata
5064
+ });
5065
+ }
5066
+ }
5067
+ return results;
5061
5068
  }
5062
5069
  async get(name) {
5063
5070
  await this.#ensureInitialized();
5064
- const skill = this.#skills.get(name);
5071
+ const skill = this.#resolveByName(name) ?? this.#resolveByPath(name);
5065
5072
  if (!skill) return null;
5066
5073
  const { indexableContent: _, ...skillData } = skill;
5067
5074
  return skillData;
5068
5075
  }
5069
5076
  async has(name) {
5070
5077
  await this.#ensureInitialized();
5071
- return this.#skills.has(name);
5078
+ return (this.#resolveByName(name) ?? this.#resolveByPath(name)) !== null;
5079
+ }
5080
+ // ===========================================================================
5081
+ // Skill Resolution (Private)
5082
+ // ===========================================================================
5083
+ /**
5084
+ * Resolve a skill by name with tie-breaking when multiple candidates exist.
5085
+ * Priority: local > managed > external, then alphabetical path.
5086
+ */
5087
+ #resolveByName(name) {
5088
+ const candidates = this.#skills.get(name);
5089
+ if (!candidates || candidates.length === 0) return null;
5090
+ return this.#tieBreak(candidates);
5091
+ }
5092
+ /**
5093
+ * Resolve a skill by exact path (escape hatch for disambiguation).
5094
+ * Searches across all candidate arrays.
5095
+ */
5096
+ #resolveByPath(skillPath) {
5097
+ for (const candidates of this.#skills.values()) {
5098
+ const match = candidates.find((s) => s.path === skillPath);
5099
+ if (match) return match;
5100
+ }
5101
+ return null;
5102
+ }
5103
+ /**
5104
+ * Pick the winning skill from an array of same-named candidates.
5105
+ * When there's only one candidate, returns it directly (no warning).
5106
+ * When there are multiple, applies source-type priority and warns.
5107
+ *
5108
+ * Priority: local (0) > managed (1) > external (2).
5109
+ * Throws if source-type priority can't resolve the tie (e.g., two local skills with same name).
5110
+ */
5111
+ #tieBreak(candidates) {
5112
+ if (candidates.length === 0) return null;
5113
+ if (candidates.length === 1) return candidates[0];
5114
+ const SOURCE_PRIORITY = { local: 0, managed: 1, external: 2 };
5115
+ const sorted = [...candidates].sort((a, b) => {
5116
+ const aPri = SOURCE_PRIORITY[a.source.type] ?? 99;
5117
+ const bPri = SOURCE_PRIORITY[b.source.type] ?? 99;
5118
+ if (aPri !== bPri) return aPri - bPri;
5119
+ return a.path.localeCompare(b.path);
5120
+ });
5121
+ const winner = sorted[0];
5122
+ const runnerUp = sorted[1];
5123
+ if (winner.source.type === runnerUp.source.type) {
5124
+ const paths = sorted.filter((s) => s.source.type === winner.source.type).map((s) => `"${s.path}"`).join(", ");
5125
+ throw new Error(
5126
+ `[WorkspaceSkills] Cannot resolve skill "${winner.name}": multiple ${winner.source.type} skills found at ${paths}. Rename one or move it to a different source type.`
5127
+ );
5128
+ }
5129
+ console.warn(
5130
+ `[WorkspaceSkills] Multiple skills named "${winner.name}" found. Using "${winner.path}" (source: ${winner.source.type}). Other candidates: ${sorted.slice(1).map((s) => `"${s.path}" (${s.source.type})`).join(", ")}`
5131
+ );
5132
+ return winner;
5072
5133
  }
5073
5134
  async refresh() {
5074
- for (const skill of this.#skills.values()) {
5075
- await this.#removeSkillFromIndex(skill);
5135
+ for (const candidates of this.#skills.values()) {
5136
+ for (const skill of candidates) {
5137
+ await this.#removeSkillFromIndex(skill);
5138
+ }
5076
5139
  }
5077
5140
  this.#skills.clear();
5078
5141
  this.#initialized = false;
@@ -5107,20 +5170,31 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5107
5170
  }
5108
5171
  const source = this.#inferSource(skillPath);
5109
5172
  const skill = await this.#parseSkillFile(skillFilePath, dirName, source);
5110
- const existing = this.#skills.get(skill.name);
5111
- if (existing) {
5112
- await this.#removeSkillFromIndex(existing);
5173
+ const candidates = this.#skills.get(skill.name) ?? [];
5174
+ const existingIdx = candidates.findIndex((s) => s.path === skill.path);
5175
+ if (existingIdx >= 0) {
5176
+ await this.#removeSkillFromIndex(candidates[existingIdx]);
5177
+ candidates[existingIdx] = skill;
5178
+ } else {
5179
+ candidates.push(skill);
5113
5180
  }
5114
- this.#skills.set(skill.name, skill);
5181
+ this.#skills.set(skill.name, candidates);
5115
5182
  await this.#indexSkill(skill);
5116
5183
  this.#lastDiscoveryTime = Date.now();
5117
5184
  }
5118
5185
  async removeSkill(skillName) {
5119
5186
  await this.#ensureInitialized();
5120
- const skill = this.#skills.get(skillName);
5187
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5121
5188
  if (!skill) return;
5122
5189
  await this.#removeSkillFromIndex(skill);
5123
- this.#skills.delete(skillName);
5190
+ const candidates = this.#skills.get(skill.name);
5191
+ if (candidates) {
5192
+ const idx = candidates.findIndex((s) => s.path === skill.path);
5193
+ if (idx >= 0) candidates.splice(idx, 1);
5194
+ if (candidates.length === 0) {
5195
+ this.#skills.delete(skill.name);
5196
+ }
5197
+ }
5124
5198
  this.#lastDiscoveryTime = Date.now();
5125
5199
  }
5126
5200
  /**
@@ -5158,17 +5232,20 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5158
5232
  });
5159
5233
  const results = [];
5160
5234
  for (const result of searchResults) {
5161
- const skillName = result.metadata?.skillName;
5235
+ const skillPath = result.metadata?.skillPath;
5162
5236
  const source = result.metadata?.source;
5163
- if (!skillName || !source) continue;
5164
- if (skillNames && !skillNames.includes(skillName)) {
5237
+ if (!skillPath || !source) continue;
5238
+ const skill = this.#resolveByPath(skillPath);
5239
+ if (!skill) continue;
5240
+ if (skillNames && !skillNames.includes(skill.name)) {
5165
5241
  continue;
5166
5242
  }
5167
5243
  if (!includeReferences && source !== "SKILL.md") {
5168
5244
  continue;
5169
5245
  }
5170
5246
  results.push({
5171
- skillName,
5247
+ skillName: skill.name,
5248
+ skillPath: skill.path,
5172
5249
  source,
5173
5250
  content: result.content,
5174
5251
  score: result.score,
@@ -5184,7 +5261,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5184
5261
  // ===========================================================================
5185
5262
  async getReference(skillName, referencePath) {
5186
5263
  await this.#ensureInitialized();
5187
- const skill = this.#skills.get(skillName);
5264
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5188
5265
  if (!skill) return null;
5189
5266
  const safeRefPath = this.#assertRelativePath(referencePath, "reference");
5190
5267
  const refFilePath = this.#joinPath(skill.path, safeRefPath);
@@ -5200,7 +5277,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5200
5277
  }
5201
5278
  async getScript(skillName, scriptPath) {
5202
5279
  await this.#ensureInitialized();
5203
- const skill = this.#skills.get(skillName);
5280
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5204
5281
  if (!skill) return null;
5205
5282
  const safeScriptPath = this.#assertRelativePath(scriptPath, "script");
5206
5283
  const scriptFilePath = this.#joinPath(skill.path, safeScriptPath);
@@ -5216,7 +5293,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5216
5293
  }
5217
5294
  async getAsset(skillName, assetPath) {
5218
5295
  await this.#ensureInitialized();
5219
- const skill = this.#skills.get(skillName);
5296
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5220
5297
  if (!skill) return null;
5221
5298
  const safeAssetPath = this.#assertRelativePath(assetPath, "asset");
5222
5299
  const assetFilePath = this.#joinPath(skill.path, safeAssetPath);
@@ -5235,17 +5312,17 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5235
5312
  // ===========================================================================
5236
5313
  async listReferences(skillName) {
5237
5314
  await this.#ensureInitialized();
5238
- const skill = this.#skills.get(skillName);
5315
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5239
5316
  return skill?.references ?? [];
5240
5317
  }
5241
5318
  async listScripts(skillName) {
5242
5319
  await this.#ensureInitialized();
5243
- const skill = this.#skills.get(skillName);
5320
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5244
5321
  return skill?.scripts ?? [];
5245
5322
  }
5246
5323
  async listAssets(skillName) {
5247
5324
  await this.#ensureInitialized();
5248
- const skill = this.#skills.get(skillName);
5325
+ const skill = this.#resolveByName(skillName) ?? this.#resolveByPath(skillName);
5249
5326
  return skill?.assets ?? [];
5250
5327
  }
5251
5328
  // ===========================================================================
@@ -5276,6 +5353,20 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5276
5353
  })();
5277
5354
  await this.#initPromise;
5278
5355
  }
5356
+ /**
5357
+ * Add a skill to the candidates map, keyed by name.
5358
+ * Replaces an existing entry at the same path (update case), otherwise appends.
5359
+ */
5360
+ #addToSkillsMap(skill) {
5361
+ const candidates = this.#skills.get(skill.name) ?? [];
5362
+ const idx = candidates.findIndex((s) => s.path === skill.path);
5363
+ if (idx >= 0) {
5364
+ candidates[idx] = skill;
5365
+ } else {
5366
+ candidates.push(skill);
5367
+ }
5368
+ this.#skills.set(skill.name, candidates);
5369
+ }
5279
5370
  /**
5280
5371
  * Discover skills from all skills paths.
5281
5372
  * Uses currently resolved paths (must be set before calling).
@@ -5360,7 +5451,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5360
5451
  if (await this.#source.exists(skillFilePath)) {
5361
5452
  try {
5362
5453
  const skill = await this.#parseSkillFile(skillFilePath, entry.name, source);
5363
- this.#skills.set(skill.name, skill);
5454
+ this.#addToSkillsMap(skill);
5364
5455
  await this.#indexSkill(skill);
5365
5456
  } catch (error) {
5366
5457
  if (error instanceof Error) {
@@ -5395,7 +5486,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5395
5486
  const dirName = skillDir.split("/").pop() || skillDir;
5396
5487
  try {
5397
5488
  const skill = await this.#parseSkillFile(skillsPath, dirName, source);
5398
- this.#skills.set(skill.name, skill);
5489
+ this.#addToSkillsMap(skill);
5399
5490
  await this.#indexSkill(skill);
5400
5491
  } catch (error) {
5401
5492
  if (error instanceof Error) {
@@ -5410,7 +5501,7 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5410
5501
  const dirName = skillsPath.split("/").pop() || skillsPath;
5411
5502
  try {
5412
5503
  const skill = await this.#parseSkillFile(skillFilePath, dirName, source);
5413
- this.#skills.set(skill.name, skill);
5504
+ this.#addToSkillsMap(skill);
5414
5505
  await this.#indexSkill(skill);
5415
5506
  } catch (error) {
5416
5507
  if (error instanceof Error) {
@@ -5502,8 +5593,10 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5502
5593
  const parsed = matter__default.default(content);
5503
5594
  const frontmatter = parsed.data;
5504
5595
  const body = parsed.content.trim();
5596
+ const skillPath = this.#getParentPath(filePath);
5505
5597
  const metadata = {
5506
5598
  name: frontmatter.name,
5599
+ path: skillPath,
5507
5600
  description: frontmatter.description,
5508
5601
  license: frontmatter.license,
5509
5602
  compatibility: frontmatter.compatibility,
@@ -5516,14 +5609,12 @@ var WorkspaceSkillsImpl = class _WorkspaceSkillsImpl {
5516
5609
  ${validation.errors.join("\n")}`);
5517
5610
  }
5518
5611
  }
5519
- const skillPath = this.#getParentPath(filePath);
5520
5612
  const references = await this.#discoverFilesInSubdir(skillPath, "references");
5521
5613
  const scripts = await this.#discoverFilesInSubdir(skillPath, "scripts");
5522
5614
  const assets = await this.#discoverFilesInSubdir(skillPath, "assets");
5523
5615
  const indexableContent = await this.#buildIndexableContent(body, skillPath, references);
5524
5616
  return {
5525
5617
  ...metadata,
5526
- path: skillPath,
5527
5618
  instructions: body,
5528
5619
  source,
5529
5620
  references,
@@ -5601,7 +5692,7 @@ ${validation.errors.join("\n")}`);
5601
5692
  */
5602
5693
  async #removeSkillFromIndex(skill) {
5603
5694
  if (!this.#searchEngine?.remove) return;
5604
- const ids = [`skill:${skill.name}:SKILL.md`, ...skill.references.map((r) => `skill:${skill.name}:${r}`)];
5695
+ const ids = [`skill:${skill.path}:SKILL.md`, ...skill.references.map((r) => `skill:${skill.path}:${r}`)];
5605
5696
  for (const id of ids) {
5606
5697
  try {
5607
5698
  await this.#searchEngine.remove(id);
@@ -5626,10 +5717,10 @@ ${validation.errors.join("\n")}`);
5626
5717
  async #indexSkill(skill) {
5627
5718
  if (!this.#searchEngine) return;
5628
5719
  await this.#searchEngine.index({
5629
- id: `skill:${skill.name}:SKILL.md`,
5720
+ id: `skill:${skill.path}:SKILL.md`,
5630
5721
  content: skill.instructions,
5631
5722
  metadata: {
5632
- skillName: skill.name,
5723
+ skillPath: skill.path,
5633
5724
  source: "SKILL.md"
5634
5725
  }
5635
5726
  });
@@ -5639,10 +5730,10 @@ ${validation.errors.join("\n")}`);
5639
5730
  const rawContent = await this.#source.readFile(fullPath);
5640
5731
  const content = typeof rawContent === "string" ? rawContent : rawContent.toString("utf-8");
5641
5732
  await this.#searchEngine.index({
5642
- id: `skill:${skill.name}:${refPath}`,
5733
+ id: `skill:${skill.path}:${refPath}`,
5643
5734
  content,
5644
5735
  metadata: {
5645
- skillName: skill.name,
5736
+ skillPath: skill.path,
5646
5737
  source: `references/${refPath}`
5647
5738
  }
5648
5739
  });
@@ -5657,13 +5748,16 @@ ${validation.errors.join("\n")}`);
5657
5748
  const { topK = 5, skillNames, includeReferences = true } = options;
5658
5749
  const queryLower = query.toLowerCase();
5659
5750
  const results = [];
5660
- for (const skill of this.#skills.values()) {
5751
+ for (const candidates of this.#skills.values()) {
5752
+ const skill = this.#tieBreak(candidates);
5753
+ if (!skill) continue;
5661
5754
  if (skillNames && !skillNames.includes(skill.name)) {
5662
5755
  continue;
5663
5756
  }
5664
5757
  if (skill.instructions.toLowerCase().includes(queryLower)) {
5665
5758
  results.push({
5666
5759
  skillName: skill.name,
5760
+ skillPath: skill.path,
5667
5761
  source: "SKILL.md",
5668
5762
  content: skill.instructions.substring(0, 200),
5669
5763
  score: 1
@@ -5676,6 +5770,7 @@ ${validation.errors.join("\n")}`);
5676
5770
  if (content && content.toLowerCase().includes(queryLower)) {
5677
5771
  results.push({
5678
5772
  skillName: skill.name,
5773
+ skillPath: skill.path,
5679
5774
  source: `references/${refPath}`,
5680
5775
  content: content.substring(0, 200),
5681
5776
  score: 0.8
@@ -5881,20 +5976,24 @@ function createSkillTools(skills) {
5881
5976
  skill_read: createSkillReadTool(skills)
5882
5977
  };
5883
5978
  }
5979
+ async function resolveSkill(skills, identifier) {
5980
+ const skill = await skills.get(identifier);
5981
+ if (skill) return { skill };
5982
+ const allSkills = await skills.list();
5983
+ const skillEntries = allSkills.map((s) => `${s.name} (${s.path})`);
5984
+ return { notFound: `Skill "${identifier}" not found. Available skills: ${skillEntries.join(", ")}` };
5985
+ }
5884
5986
  function createSkillTool(skills) {
5885
- const tool = chunkGYLHNAH7_cjs.createTool({
5987
+ const tool = chunkXME4PQE7_cjs.createTool({
5886
5988
  id: "skill",
5887
5989
  description: "Activate a skill to load its full instructions. You should activate skills proactively when they are relevant to the user's request without asking for permission first.",
5888
5990
  inputSchema: v4.z.object({
5889
- name: v4.z.string().describe("The name of the skill to activate")
5991
+ name: v4.z.string().describe("The name or path of the skill to activate. Use the path when multiple skills share the same name.")
5890
5992
  }),
5891
5993
  execute: async ({ name }) => {
5892
- const skill = await skills.get(name);
5893
- if (!skill) {
5894
- const skillsList = await skills.list();
5895
- const skillNames = skillsList.map((s) => s.name);
5896
- return `Skill "${name}" not found. Available skills: ${skillNames.join(", ")}`;
5897
- }
5994
+ const result = await resolveSkill(skills, name);
5995
+ if ("notFound" in result) return result.notFound;
5996
+ const { skill } = result;
5898
5997
  const parts = [skill.instructions];
5899
5998
  if (skill.references?.length) {
5900
5999
  parts.push(`
@@ -5920,7 +6019,7 @@ ${skill.assets.map((a) => `- assets/${a}`).join("\n")}`);
5920
6019
  return tool;
5921
6020
  }
5922
6021
  function createSkillSearchTool(skills) {
5923
- const tool = chunkGYLHNAH7_cjs.createTool({
6022
+ const tool = chunkXME4PQE7_cjs.createTool({
5924
6023
  id: "skill_search",
5925
6024
  description: "Search across skill content to find relevant information. Useful when you need to find specific details within skills.",
5926
6025
  inputSchema: v4.z.object({
@@ -5944,36 +6043,35 @@ ${preview}`;
5944
6043
  return tool;
5945
6044
  }
5946
6045
  function createSkillReadTool(skills) {
5947
- const tool = chunkGYLHNAH7_cjs.createTool({
6046
+ const tool = chunkXME4PQE7_cjs.createTool({
5948
6047
  id: "skill_read",
5949
6048
  description: "Read a file from a skill directory (references, scripts, or assets). The path is relative to the skill root.",
5950
6049
  inputSchema: v4.z.object({
5951
- skillName: v4.z.string().describe("The name of the skill"),
6050
+ skillName: v4.z.string().describe("The name or path of the skill. Use the path when multiple skills share the same name."),
5952
6051
  path: v4.z.string().describe('Path to the file relative to the skill root (e.g. "references/colors.md", "scripts/run.sh")'),
5953
6052
  startLine: v4.z.number().optional().describe("Starting line number (1-indexed). If omitted, starts from the beginning."),
5954
6053
  endLine: v4.z.number().optional().describe("Ending line number (1-indexed, inclusive). If omitted, reads to the end.")
5955
6054
  }),
5956
6055
  execute: async ({ skillName, path: path7, startLine, endLine }) => {
5957
- if (!await skills.has(skillName)) {
5958
- return `Skill "${skillName}" not found.`;
5959
- }
6056
+ const resolved = await resolveSkill(skills, skillName);
6057
+ if ("notFound" in resolved) return resolved.notFound;
6058
+ const resolvedPath = resolved.skill.path;
5960
6059
  let content = null;
5961
- content = await skills.getReference(skillName, path7);
5962
- if (content === null) content = await skills.getScript(skillName, path7);
5963
- if (content === null) content = await skills.getAsset(skillName, path7);
6060
+ content = await skills.getReference(resolvedPath, path7);
6061
+ if (content === null) content = await skills.getScript(resolvedPath, path7);
6062
+ if (content === null) content = await skills.getAsset(resolvedPath, path7);
5964
6063
  if (content === null) {
5965
- const refs = (await skills.listReferences(skillName)).map((f) => `references/${f}`);
5966
- const scripts = (await skills.listScripts(skillName)).map((f) => `scripts/${f}`);
5967
- const assets = (await skills.listAssets(skillName)).map((f) => `assets/${f}`);
5968
- const allFiles = [...refs, ...scripts, ...assets];
6064
+ const refs = (await skills.listReferences(resolvedPath)).map((f) => `references/${f}`);
6065
+ const scriptsList = (await skills.listScripts(resolvedPath)).map((f) => `scripts/${f}`);
6066
+ const assets = (await skills.listAssets(resolvedPath)).map((f) => `assets/${f}`);
6067
+ const allFiles = [...refs, ...scriptsList, ...assets];
5969
6068
  const fileList = allFiles.length > 0 ? `
5970
6069
  Available files: ${allFiles.join(", ")}` : "";
5971
6070
  return `File "${path7}" not found in skill "${skillName}".${fileList}`;
5972
6071
  }
5973
6072
  const textContent = typeof content === "string" ? content : content.toString("utf-8");
5974
6073
  if (textContent.slice(0, 1e3).includes("\0")) {
5975
- const skill = await skills.get(skillName);
5976
- const fullPath = skill ? `${skill.path}/${path7}` : path7;
6074
+ const fullPath = `${resolved.skill.path}/${path7}`;
5977
6075
  const size = typeof content === "string" ? Buffer.byteLength(content) : content.length;
5978
6076
  return `Binary file: ${fullPath} (${size} bytes)`;
5979
6077
  }
@@ -6154,7 +6252,7 @@ var Workspace = class {
6154
6252
  * @example
6155
6253
  * ```typescript
6156
6254
  * const skills = await workspace.skills?.list();
6157
- * const skill = await workspace.skills?.get('brand-guidelines');
6255
+ * const skill = await workspace.skills?.get('skills/brand-guidelines');
6158
6256
  * const results = await workspace.skills?.search('brand colors');
6159
6257
  * ```
6160
6258
  */
@@ -6642,7 +6740,7 @@ function isAstGrepAvailable() {
6642
6740
  return astGrepModule !== null;
6643
6741
  }
6644
6742
  try {
6645
- const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-KQ3SJZG5.cjs', document.baseURI).href)));
6743
+ const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-YSPKTAYB.cjs', document.baseURI).href)));
6646
6744
  req.resolve("@ast-grep/napi");
6647
6745
  return true;
6648
6746
  } catch {
@@ -6812,7 +6910,7 @@ function patternReplace(content, root, pattern, replacement) {
6812
6910
  }
6813
6911
  return { content: modifiedContent, count };
6814
6912
  }
6815
- var astEditTool = chunkGYLHNAH7_cjs.createTool({
6913
+ var astEditTool = chunkXME4PQE7_cjs.createTool({
6816
6914
  id: WORKSPACE_TOOLS.FILESYSTEM.AST_EDIT,
6817
6915
  description: `Edit code using AST-based analysis for intelligent transformations.
6818
6916
 
@@ -6931,7 +7029,7 @@ Pattern replace (for everything else):
6931
7029
  return output;
6932
7030
  }
6933
7031
  });
6934
- var deleteFileTool = chunkGYLHNAH7_cjs.createTool({
7032
+ var deleteFileTool = chunkXME4PQE7_cjs.createTool({
6935
7033
  id: WORKSPACE_TOOLS.FILESYSTEM.DELETE,
6936
7034
  description: "Delete a file or directory from the workspace filesystem",
6937
7035
  inputSchema: v4.z.object({
@@ -6953,7 +7051,7 @@ var deleteFileTool = chunkGYLHNAH7_cjs.createTool({
6953
7051
  return `Deleted ${path7}`;
6954
7052
  }
6955
7053
  });
6956
- var editFileTool = chunkGYLHNAH7_cjs.createTool({
7054
+ var editFileTool = chunkXME4PQE7_cjs.createTool({
6957
7055
  id: WORKSPACE_TOOLS.FILESYSTEM.EDIT_FILE,
6958
7056
  description: `Edit a file by replacing specific text. The old_string must match exactly and be unique in the file.
6959
7057
 
@@ -7215,14 +7313,14 @@ Usage:
7215
7313
  - Always quote file paths that contain spaces (e.g., cd "/path/with spaces").
7216
7314
  - Use the timeout parameter (in seconds) to limit execution time. Behavior when omitted depends on the sandbox provider.
7217
7315
  - Optionally use cwd to override the working directory. Commands run from the sandbox default if omitted.`;
7218
- var executeCommandTool = chunkGYLHNAH7_cjs.createTool({
7316
+ var executeCommandTool = chunkXME4PQE7_cjs.createTool({
7219
7317
  id: WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND,
7220
7318
  description: baseDescription,
7221
7319
  inputSchema: executeCommandInputSchema,
7222
7320
  execute: executeCommand,
7223
7321
  toModelOutput: sandboxToModelOutput
7224
7322
  });
7225
- var executeCommandWithBackgroundTool = chunkGYLHNAH7_cjs.createTool({
7323
+ var executeCommandWithBackgroundTool = chunkXME4PQE7_cjs.createTool({
7226
7324
  id: WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND,
7227
7325
  description: `${baseDescription}
7228
7326
 
@@ -7231,7 +7329,7 @@ Set background: true to run long-running commands (dev servers, watchers) withou
7231
7329
  execute: executeCommand,
7232
7330
  toModelOutput: sandboxToModelOutput
7233
7331
  });
7234
- var fileStatTool = chunkGYLHNAH7_cjs.createTool({
7332
+ var fileStatTool = chunkXME4PQE7_cjs.createTool({
7235
7333
  id: WORKSPACE_TOOLS.FILESYSTEM.FILE_STAT,
7236
7334
  description: "Get file or directory metadata from the workspace. Returns existence, type, size, and modification time.",
7237
7335
  inputSchema: v4.z.object({
@@ -7255,7 +7353,7 @@ var fileStatTool = chunkGYLHNAH7_cjs.createTool({
7255
7353
  }
7256
7354
  }
7257
7355
  });
7258
- var getProcessOutputTool = chunkGYLHNAH7_cjs.createTool({
7356
+ var getProcessOutputTool = chunkXME4PQE7_cjs.createTool({
7259
7357
  id: WORKSPACE_TOOLS.SANDBOX.GET_PROCESS_OUTPUT,
7260
7358
  description: `Get the current output (stdout, stderr) and status of a background process by its PID.
7261
7359
 
@@ -7353,7 +7451,7 @@ async function loadGitignore(filesystem) {
7353
7451
  }
7354
7452
 
7355
7453
  // src/workspace/tools/grep.ts
7356
- var grepTool = chunkGYLHNAH7_cjs.createTool({
7454
+ var grepTool = chunkXME4PQE7_cjs.createTool({
7357
7455
  id: WORKSPACE_TOOLS.FILESYSTEM.GREP,
7358
7456
  description: `Search file contents using a regex pattern. Walks the filesystem and returns matching lines with file paths and line numbers.
7359
7457
 
@@ -7507,7 +7605,7 @@ Usage:
7507
7605
  );
7508
7606
  }
7509
7607
  });
7510
- var indexContentTool = chunkGYLHNAH7_cjs.createTool({
7608
+ var indexContentTool = chunkXME4PQE7_cjs.createTool({
7511
7609
  id: WORKSPACE_TOOLS.SEARCH.INDEX,
7512
7610
  description: "Index content for search. The path becomes the document ID in search results.",
7513
7611
  inputSchema: v4.z.object({
@@ -7523,7 +7621,7 @@ var indexContentTool = chunkGYLHNAH7_cjs.createTool({
7523
7621
  }
7524
7622
  });
7525
7623
  var KILL_TAIL_LINES = 50;
7526
- var killProcessTool = chunkGYLHNAH7_cjs.createTool({
7624
+ var killProcessTool = chunkXME4PQE7_cjs.createTool({
7527
7625
  id: WORKSPACE_TOOLS.SANDBOX.KILL_PROCESS,
7528
7626
  description: `Kill a background process by its PID.
7529
7627
 
@@ -7712,7 +7810,7 @@ function joinPath2(base, name) {
7712
7810
  }
7713
7811
 
7714
7812
  // src/workspace/tools/list-files.ts
7715
- var listFilesTool = chunkGYLHNAH7_cjs.createTool({
7813
+ var listFilesTool = chunkXME4PQE7_cjs.createTool({
7716
7814
  id: WORKSPACE_TOOLS.FILESYSTEM.LIST_FILES,
7717
7815
  description: `List files and directories in the workspace filesystem.
7718
7816
  Returns a compact tab-indented listing for efficient token usage.
@@ -7759,7 +7857,7 @@ ${result.summary}`,
7759
7857
  );
7760
7858
  }
7761
7859
  });
7762
- var mkdirTool = chunkGYLHNAH7_cjs.createTool({
7860
+ var mkdirTool = chunkXME4PQE7_cjs.createTool({
7763
7861
  id: WORKSPACE_TOOLS.FILESYSTEM.MKDIR,
7764
7862
  description: "Create a directory in the workspace filesystem",
7765
7863
  inputSchema: v4.z.object({
@@ -7776,7 +7874,7 @@ var mkdirTool = chunkGYLHNAH7_cjs.createTool({
7776
7874
  return `Created directory ${path7}`;
7777
7875
  }
7778
7876
  });
7779
- var readFileTool = chunkGYLHNAH7_cjs.createTool({
7877
+ var readFileTool = chunkXME4PQE7_cjs.createTool({
7780
7878
  id: WORKSPACE_TOOLS.FILESYSTEM.READ_FILE,
7781
7879
  description: "Read the contents of a file from the workspace filesystem. Use offset/limit parameters to read specific line ranges for large files.",
7782
7880
  inputSchema: v4.z.object({
@@ -7824,7 +7922,7 @@ ${fullContent.toString("base64")}`,
7824
7922
  ${formattedContent}`, tokenLimit, "end");
7825
7923
  }
7826
7924
  });
7827
- var searchTool = chunkGYLHNAH7_cjs.createTool({
7925
+ var searchTool = chunkXME4PQE7_cjs.createTool({
7828
7926
  id: WORKSPACE_TOOLS.SEARCH.SEARCH,
7829
7927
  description: "Search indexed content in the workspace. Supports keyword (BM25), semantic (vector), and hybrid search modes.",
7830
7928
  inputSchema: v4.z.object({
@@ -7851,7 +7949,7 @@ var searchTool = chunkGYLHNAH7_cjs.createTool({
7851
7949
  return lines.join("\n");
7852
7950
  }
7853
7951
  });
7854
- var writeFileTool = chunkGYLHNAH7_cjs.createTool({
7952
+ var writeFileTool = chunkXME4PQE7_cjs.createTool({
7855
7953
  id: WORKSPACE_TOOLS.FILESYSTEM.WRITE_FILE,
7856
7954
  description: "Write content to a file in the workspace filesystem. Creates parent directories if needed.",
7857
7955
  inputSchema: v4.z.object({
@@ -8098,5 +8196,5 @@ exports.requireWorkspace = requireWorkspace;
8098
8196
  exports.resolveToolConfig = resolveToolConfig;
8099
8197
  exports.searchTool = searchTool;
8100
8198
  exports.writeFileTool = writeFileTool;
8101
- //# sourceMappingURL=chunk-KQ3SJZG5.cjs.map
8102
- //# sourceMappingURL=chunk-KQ3SJZG5.cjs.map
8199
+ //# sourceMappingURL=chunk-YSPKTAYB.cjs.map
8200
+ //# sourceMappingURL=chunk-YSPKTAYB.cjs.map