@mastra/core 1.18.1-alpha.0 → 1.19.0-alpha.2

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 (225) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/agent/agent-legacy.d.ts +3 -1
  3. package/dist/agent/agent-legacy.d.ts.map +1 -1
  4. package/dist/agent/agent.d.ts +3 -1
  5. package/dist/agent/agent.d.ts.map +1 -1
  6. package/dist/agent/index.cjs +8 -8
  7. package/dist/agent/index.js +1 -1
  8. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
  9. package/dist/{chunk-AV4YSAZL.cjs → chunk-2OYWVA6F.cjs} +17 -2
  10. package/dist/chunk-2OYWVA6F.cjs.map +1 -0
  11. package/dist/{chunk-45LU555A.cjs → chunk-2RTFET56.cjs} +7 -7
  12. package/dist/{chunk-45LU555A.cjs.map → chunk-2RTFET56.cjs.map} +1 -1
  13. package/dist/{chunk-LKZQG2ZZ.cjs → chunk-4TUILCMR.cjs} +7 -6
  14. package/dist/chunk-4TUILCMR.cjs.map +1 -0
  15. package/dist/{chunk-NMDKJUHA.cjs → chunk-5OBBDZBA.cjs} +185 -185
  16. package/dist/{chunk-NMDKJUHA.cjs.map → chunk-5OBBDZBA.cjs.map} +1 -1
  17. package/dist/{chunk-OF7ELKXY.js → chunk-6TEEIOHA.js} +4 -4
  18. package/dist/{chunk-OF7ELKXY.js.map → chunk-6TEEIOHA.js.map} +1 -1
  19. package/dist/{chunk-KG5NOH3Z.js → chunk-6XYHMM2X.js} +8 -8
  20. package/dist/{chunk-KG5NOH3Z.js.map → chunk-6XYHMM2X.js.map} +1 -1
  21. package/dist/{chunk-IVXAQT6H.js → chunk-BS5UESNT.js} +93 -42
  22. package/dist/chunk-BS5UESNT.js.map +1 -0
  23. package/dist/{chunk-NRIT3KHS.js → chunk-CSIKD56W.js} +3 -3
  24. package/dist/{chunk-NRIT3KHS.js.map → chunk-CSIKD56W.js.map} +1 -1
  25. package/dist/{chunk-KEYCLRBI.js → chunk-D5EXC3XM.js} +4 -4
  26. package/dist/{chunk-KEYCLRBI.js.map → chunk-D5EXC3XM.js.map} +1 -1
  27. package/dist/{chunk-XQRTJIC7.cjs → chunk-E2SMTTP6.cjs} +45 -16
  28. package/dist/chunk-E2SMTTP6.cjs.map +1 -0
  29. package/dist/{chunk-RVBOSWN5.cjs → chunk-E3JUOJME.cjs} +5 -5
  30. package/dist/{chunk-RVBOSWN5.cjs.map → chunk-E3JUOJME.cjs.map} +1 -1
  31. package/dist/{chunk-FA4PTEBK.js → chunk-EWPUWV33.js} +18 -3
  32. package/dist/chunk-EWPUWV33.js.map +1 -0
  33. package/dist/{chunk-BWRB3RPC.js → chunk-F4PVOQKD.js} +3 -3
  34. package/dist/{chunk-BWRB3RPC.js.map → chunk-F4PVOQKD.js.map} +1 -1
  35. package/dist/{chunk-TJNYXDI7.cjs → chunk-GFQPMPSV.cjs} +7 -113
  36. package/dist/chunk-GFQPMPSV.cjs.map +1 -0
  37. package/dist/{chunk-V2NQOABM.cjs → chunk-GNA52EF4.cjs} +9 -9
  38. package/dist/{chunk-V2NQOABM.cjs.map → chunk-GNA52EF4.cjs.map} +1 -1
  39. package/dist/{chunk-GALW5K2E.js → chunk-IOHKSHT4.js} +3 -3
  40. package/dist/{chunk-GALW5K2E.js.map → chunk-IOHKSHT4.js.map} +1 -1
  41. package/dist/{chunk-Z7DO2WCR.cjs → chunk-IQV2SVCE.cjs} +52 -52
  42. package/dist/{chunk-Z7DO2WCR.cjs.map → chunk-IQV2SVCE.cjs.map} +1 -1
  43. package/dist/{chunk-GXXNF6NF.cjs → chunk-L2FL7HMV.cjs} +35 -30
  44. package/dist/chunk-L2FL7HMV.cjs.map +1 -0
  45. package/dist/{chunk-HZI7AYCD.js → chunk-M62LMDHE.js} +8 -7
  46. package/dist/chunk-M62LMDHE.js.map +1 -0
  47. package/dist/{chunk-TPE5VTVF.cjs → chunk-MN7WNZE6.cjs} +6 -6
  48. package/dist/{chunk-TPE5VTVF.cjs.map → chunk-MN7WNZE6.cjs.map} +1 -1
  49. package/dist/{chunk-7W6PDCOH.cjs → chunk-NWOPWLJ3.cjs} +83 -82
  50. package/dist/chunk-NWOPWLJ3.cjs.map +1 -0
  51. package/dist/{chunk-CJ4RMDJJ.cjs → chunk-O542TXPV.cjs} +145 -94
  52. package/dist/chunk-O542TXPV.cjs.map +1 -0
  53. package/dist/{chunk-4FMKWOPC.js → chunk-OZHBY6NY.js} +32 -5
  54. package/dist/chunk-OZHBY6NY.js.map +1 -0
  55. package/dist/{chunk-MJF7NZEF.js → chunk-PPCEPCG7.js} +3 -3
  56. package/dist/{chunk-MJF7NZEF.js.map → chunk-PPCEPCG7.js.map} +1 -1
  57. package/dist/{chunk-CU764D5P.cjs → chunk-QB4YHCVA.cjs} +15 -15
  58. package/dist/{chunk-CU764D5P.cjs.map → chunk-QB4YHCVA.cjs.map} +1 -1
  59. package/dist/{chunk-K7AE4BHR.js → chunk-QIOD3LOP.js} +4 -3
  60. package/dist/chunk-QIOD3LOP.js.map +1 -0
  61. package/dist/{chunk-DTT543MP.cjs → chunk-RD76XK7E.cjs} +3 -3
  62. package/dist/{chunk-DTT543MP.cjs.map → chunk-RD76XK7E.cjs.map} +1 -1
  63. package/dist/{chunk-HRT662B6.js → chunk-SVIEJH5H.js} +13 -8
  64. package/dist/chunk-SVIEJH5H.js.map +1 -0
  65. package/dist/{chunk-KFL6ZGWG.js → chunk-VYZRHQUD.js} +5 -5
  66. package/dist/{chunk-KFL6ZGWG.js.map → chunk-VYZRHQUD.js.map} +1 -1
  67. package/dist/{chunk-H5ZOJOQ2.cjs → chunk-WKAEIA42.cjs} +9 -9
  68. package/dist/{chunk-H5ZOJOQ2.cjs.map → chunk-WKAEIA42.cjs.map} +1 -1
  69. package/dist/{chunk-L3V6LSQF.js → chunk-X5BBF6AG.js} +3 -3
  70. package/dist/{chunk-L3V6LSQF.js.map → chunk-X5BBF6AG.js.map} +1 -1
  71. package/dist/{chunk-WGJL6F3F.js → chunk-Z6I5PBGG.js} +6 -112
  72. package/dist/chunk-Z6I5PBGG.js.map +1 -0
  73. package/dist/datasets/index.cjs +17 -17
  74. package/dist/datasets/index.js +2 -2
  75. package/dist/docs/SKILL.md +8 -18
  76. package/dist/docs/assets/SOURCE_MAP.json +266 -266
  77. package/dist/docs/references/docs-agents-overview.md +4 -4
  78. package/dist/docs/references/docs-agents-processors.md +1 -1
  79. package/dist/docs/references/{docs-observability-datasets-overview.md → docs-evals-datasets-overview.md} +12 -12
  80. package/dist/docs/references/{docs-observability-datasets-running-experiments.md → docs-evals-datasets-running-experiments.md} +9 -9
  81. package/dist/docs/references/docs-evals-overview.md +8 -9
  82. package/dist/docs/references/docs-memory-observational-memory.md +20 -11
  83. package/dist/docs/references/docs-memory-overview.md +4 -4
  84. package/dist/docs/references/docs-memory-semantic-recall.md +28 -19
  85. package/dist/docs/references/docs-memory-storage.md +4 -4
  86. package/dist/docs/references/docs-rag-chunking-and-embedding.md +2 -2
  87. package/dist/docs/references/docs-server-auth-composite-auth.md +1 -7
  88. package/dist/docs/references/docs-server-auth-custom-auth-provider.md +2 -4
  89. package/dist/docs/references/docs-server-auth-jwt.md +1 -1
  90. package/dist/docs/references/docs-server-auth-simple-auth.md +1 -7
  91. package/dist/docs/references/docs-server-custom-adapters.md +3 -1
  92. package/dist/docs/references/docs-server-custom-api-routes.md +1 -1
  93. package/dist/docs/references/docs-server-mastra-client.md +1 -3
  94. package/dist/docs/references/docs-server-mastra-server.md +8 -0
  95. package/dist/docs/references/docs-server-request-context.md +17 -17
  96. package/dist/docs/references/docs-streaming-events.md +1 -90
  97. package/dist/docs/references/docs-studio-auth.md +142 -0
  98. package/dist/docs/references/docs-studio-deployment.md +260 -0
  99. package/dist/docs/references/docs-studio-observability.md +98 -0
  100. package/dist/docs/references/docs-studio-overview.md +127 -0
  101. package/dist/docs/references/docs-workflows-agents-and-tools.md +7 -10
  102. package/dist/docs/references/docs-workflows-control-flow.md +1 -1
  103. package/dist/docs/references/docs-workflows-overview.md +12 -7
  104. package/dist/docs/references/docs-workflows-suspend-and-resume.md +1 -1
  105. package/dist/docs/references/guides-concepts-multi-agent-systems.md +4 -4
  106. package/dist/docs/references/reference-agents-agent.md +1 -1
  107. package/dist/docs/references/reference-configuration.md +4 -4
  108. package/dist/docs/references/reference-memory-observational-memory.md +1 -1
  109. package/dist/docs/references/reference-storage-cloudflare-d1.md +1 -1
  110. package/dist/docs/references/reference-storage-lance.md +1 -1
  111. package/dist/docs/references/reference-storage-upstash.md +1 -1
  112. package/dist/docs/references/reference.md +16 -14
  113. package/dist/evals/index.cjs +5 -5
  114. package/dist/evals/index.js +2 -2
  115. package/dist/evals/scoreTraces/index.cjs +3 -3
  116. package/dist/evals/scoreTraces/index.js +1 -1
  117. package/dist/harness/harness.d.ts.map +1 -1
  118. package/dist/harness/index.cjs +19 -18
  119. package/dist/harness/index.cjs.map +1 -1
  120. package/dist/harness/index.js +9 -8
  121. package/dist/harness/index.js.map +1 -1
  122. package/dist/index.cjs +2 -2
  123. package/dist/index.js +1 -1
  124. package/dist/integration/index.cjs +2 -2
  125. package/dist/integration/index.js +1 -1
  126. package/dist/llm/index.cjs +16 -16
  127. package/dist/llm/index.js +5 -5
  128. package/dist/llm/model/aisdk/v5/model.d.ts +5 -0
  129. package/dist/llm/model/aisdk/v5/model.d.ts.map +1 -1
  130. package/dist/llm/model/aisdk/v6/model.d.ts +5 -0
  131. package/dist/llm/model/aisdk/v6/model.d.ts.map +1 -1
  132. package/dist/llm/model/provider-types.generated.d.ts +1 -50
  133. package/dist/loop/index.cjs +14 -14
  134. package/dist/loop/index.js +1 -1
  135. package/dist/loop/network/validation.d.ts.map +1 -1
  136. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
  137. package/dist/mastra/index.cjs +2 -2
  138. package/dist/mastra/index.js +1 -1
  139. package/dist/memory/index.cjs +14 -14
  140. package/dist/memory/index.js +1 -1
  141. package/dist/models-dev-VAVD7BDV.cjs +12 -0
  142. package/dist/{models-dev-674ULLFE.cjs.map → models-dev-VAVD7BDV.cjs.map} +1 -1
  143. package/dist/models-dev-VFIUOVG4.js +3 -0
  144. package/dist/{models-dev-AVV7SNWL.js.map → models-dev-VFIUOVG4.js.map} +1 -1
  145. package/dist/netlify-KL3UR26O.cjs +12 -0
  146. package/dist/{netlify-QP3MZ4FK.cjs.map → netlify-KL3UR26O.cjs.map} +1 -1
  147. package/dist/netlify-Q3SJTV4U.js +3 -0
  148. package/dist/{netlify-KWEJPG27.js.map → netlify-Q3SJTV4U.js.map} +1 -1
  149. package/dist/processor-provider/index.cjs +10 -10
  150. package/dist/processor-provider/index.js +1 -1
  151. package/dist/processors/index.cjs +44 -44
  152. package/dist/processors/index.js +1 -1
  153. package/dist/provider-registry-COX4XKGI.js +3 -0
  154. package/dist/{provider-registry-L3LFTZUA.js.map → provider-registry-COX4XKGI.js.map} +1 -1
  155. package/dist/provider-registry-IAU4XHVY.cjs +40 -0
  156. package/dist/{provider-registry-KZN4FOFE.cjs.map → provider-registry-IAU4XHVY.cjs.map} +1 -1
  157. package/dist/provider-registry.json +2 -108
  158. package/dist/relevance/index.cjs +3 -3
  159. package/dist/relevance/index.js +1 -1
  160. package/dist/storage/index.cjs +74 -74
  161. package/dist/storage/index.js +1 -1
  162. package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts.map +1 -1
  163. package/dist/stream/index.cjs +8 -8
  164. package/dist/stream/index.js +1 -1
  165. package/dist/test-utils/llm-mock.cjs +4 -4
  166. package/dist/test-utils/llm-mock.js +1 -1
  167. package/dist/tool-loop-agent/index.cjs +4 -4
  168. package/dist/tool-loop-agent/index.js +1 -1
  169. package/dist/tools/index.cjs +8 -8
  170. package/dist/tools/index.js +1 -1
  171. package/dist/tools/is-vercel-tool.cjs +2 -2
  172. package/dist/tools/is-vercel-tool.js +1 -1
  173. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  174. package/dist/tools/validation.d.ts.map +1 -1
  175. package/dist/utils.cjs +31 -23
  176. package/dist/utils.d.ts +10 -0
  177. package/dist/utils.d.ts.map +1 -1
  178. package/dist/utils.js +1 -1
  179. package/dist/vector/index.cjs +7 -7
  180. package/dist/vector/index.js +1 -1
  181. package/dist/workflows/evented/index.cjs +10 -10
  182. package/dist/workflows/evented/index.js +1 -1
  183. package/dist/workflows/index.cjs +24 -24
  184. package/dist/workflows/index.js +1 -1
  185. package/dist/workflows/workflow.d.ts.map +1 -1
  186. package/dist/workspace/index.cjs +68 -68
  187. package/dist/workspace/index.js +1 -1
  188. package/dist/workspace/workspace.d.ts +1 -0
  189. package/dist/workspace/workspace.d.ts.map +1 -1
  190. package/package.json +5 -5
  191. package/src/llm/model/provider-types.generated.d.ts +1 -50
  192. package/dist/chunk-4FMKWOPC.js.map +0 -1
  193. package/dist/chunk-7W6PDCOH.cjs.map +0 -1
  194. package/dist/chunk-AV4YSAZL.cjs.map +0 -1
  195. package/dist/chunk-CJ4RMDJJ.cjs.map +0 -1
  196. package/dist/chunk-FA4PTEBK.js.map +0 -1
  197. package/dist/chunk-GXXNF6NF.cjs.map +0 -1
  198. package/dist/chunk-HRT662B6.js.map +0 -1
  199. package/dist/chunk-HZI7AYCD.js.map +0 -1
  200. package/dist/chunk-IVXAQT6H.js.map +0 -1
  201. package/dist/chunk-K7AE4BHR.js.map +0 -1
  202. package/dist/chunk-LKZQG2ZZ.cjs.map +0 -1
  203. package/dist/chunk-TJNYXDI7.cjs.map +0 -1
  204. package/dist/chunk-WGJL6F3F.js.map +0 -1
  205. package/dist/chunk-XQRTJIC7.cjs.map +0 -1
  206. package/dist/docs/references/docs-observability-logging.md +0 -99
  207. package/dist/docs/references/docs-observability-overview.md +0 -70
  208. package/dist/docs/references/docs-observability-tracing-bridges-otel.md +0 -209
  209. package/dist/docs/references/docs-observability-tracing-exporters-arize.md +0 -272
  210. package/dist/docs/references/docs-observability-tracing-exporters-braintrust.md +0 -126
  211. package/dist/docs/references/docs-observability-tracing-exporters-cloud.md +0 -127
  212. package/dist/docs/references/docs-observability-tracing-exporters-datadog.md +0 -317
  213. package/dist/docs/references/docs-observability-tracing-exporters-default.md +0 -209
  214. package/dist/docs/references/docs-observability-tracing-exporters-laminar.md +0 -100
  215. package/dist/docs/references/docs-observability-tracing-exporters-langfuse.md +0 -213
  216. package/dist/docs/references/docs-observability-tracing-exporters-langsmith.md +0 -198
  217. package/dist/docs/references/docs-observability-tracing-exporters-otel.md +0 -476
  218. package/dist/docs/references/docs-observability-tracing-exporters-posthog.md +0 -148
  219. package/dist/docs/references/docs-observability-tracing-overview.md +0 -1112
  220. package/dist/models-dev-674ULLFE.cjs +0 -12
  221. package/dist/models-dev-AVV7SNWL.js +0 -3
  222. package/dist/netlify-KWEJPG27.js +0 -3
  223. package/dist/netlify-QP3MZ4FK.cjs +0 -12
  224. package/dist/provider-registry-KZN4FOFE.cjs +0 -40
  225. package/dist/provider-registry-L3LFTZUA.js +0 -3
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkAV4YSAZL_cjs = require('./chunk-AV4YSAZL.cjs');
3
+ var chunk2OYWVA6F_cjs = require('./chunk-2OYWVA6F.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-GXXNF6NF.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-L2FL7HMV.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-GXXNF6NF.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-L2FL7HMV.cjs', document.baseURI).href)));
1602
1602
  const jsonrpc = req("vscode-jsonrpc/node");
1603
1603
  const protocol = req("vscode-languageserver-protocol");
1604
1604
  jsonrpcModule = {
@@ -6069,7 +6069,7 @@ async function resolveSkill(skills, identifier) {
6069
6069
  return { notFound: `Skill "${identifier}" not found. Available skills: ${skillEntries.join(", ")}` };
6070
6070
  }
6071
6071
  function createSkillTool(skills) {
6072
- const tool = chunkAV4YSAZL_cjs.createTool({
6072
+ const tool = chunk2OYWVA6F_cjs.createTool({
6073
6073
  id: "skill",
6074
6074
  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.",
6075
6075
  inputSchema: v4.z.object({
@@ -6104,7 +6104,7 @@ ${skill.assets.map((a) => `- assets/${a}`).join("\n")}`);
6104
6104
  return tool;
6105
6105
  }
6106
6106
  function createSkillSearchTool(skills) {
6107
- const tool = chunkAV4YSAZL_cjs.createTool({
6107
+ const tool = chunk2OYWVA6F_cjs.createTool({
6108
6108
  id: "skill_search",
6109
6109
  description: "Search across skill content to find relevant information. Useful when you need to find specific details within skills.",
6110
6110
  inputSchema: v4.z.object({
@@ -6128,7 +6128,7 @@ ${preview}`;
6128
6128
  return tool;
6129
6129
  }
6130
6130
  function createSkillReadTool(skills) {
6131
- const tool = chunkAV4YSAZL_cjs.createTool({
6131
+ const tool = chunk2OYWVA6F_cjs.createTool({
6132
6132
  id: "skill_read",
6133
6133
  description: "Read a file from a skill directory (references, scripts, or assets). The path is relative to the skill root.",
6134
6134
  inputSchema: v4.z.object({
@@ -6181,6 +6181,7 @@ var Workspace = class {
6181
6181
  _searchEngine;
6182
6182
  _skills;
6183
6183
  _lsp;
6184
+ _logger;
6184
6185
  constructor(config) {
6185
6186
  this.id = config.id ?? this.generateId();
6186
6187
  this.name = config.name ?? `workspace-${this.id.slice(0, 8)}`;
@@ -6477,13 +6478,16 @@ var Workspace = class {
6477
6478
  * Index a single file for search. Skips files that can't be read as text.
6478
6479
  */
6479
6480
  async indexFileForSearch(filePath) {
6481
+ let content;
6480
6482
  try {
6481
- const content = await this._fs.readFile(filePath, { encoding: "utf-8" });
6482
- await this._searchEngine.index({
6483
- id: filePath,
6484
- content
6485
- });
6483
+ content = await this._fs.readFile(filePath, { encoding: "utf-8" });
6486
6484
  } catch {
6485
+ return;
6486
+ }
6487
+ try {
6488
+ await this._searchEngine.index({ id: filePath, content });
6489
+ } catch (error) {
6490
+ this._logger?.warn(`Failed to index file "${filePath}" for search`, { error });
6487
6491
  }
6488
6492
  }
6489
6493
  async getAllFiles(dir, depth = 0, maxDepth = 10) {
@@ -6673,6 +6677,7 @@ ${workspaceOnly.join("\n")}`
6673
6677
  * @internal
6674
6678
  */
6675
6679
  __setLogger(logger) {
6680
+ this._logger = logger;
6676
6681
  if (this._fs instanceof MastraFilesystem) {
6677
6682
  this._fs.__setLogger(logger);
6678
6683
  }
@@ -6828,7 +6833,7 @@ function isAstGrepAvailable() {
6828
6833
  return astGrepModule !== null;
6829
6834
  }
6830
6835
  try {
6831
- const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-GXXNF6NF.cjs', document.baseURI).href)));
6836
+ const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-L2FL7HMV.cjs', document.baseURI).href)));
6832
6837
  req.resolve("@ast-grep/napi");
6833
6838
  return true;
6834
6839
  } catch {
@@ -6998,7 +7003,7 @@ function patternReplace(content, root, pattern, replacement) {
6998
7003
  }
6999
7004
  return { content: modifiedContent, count };
7000
7005
  }
7001
- var astEditTool = chunkAV4YSAZL_cjs.createTool({
7006
+ var astEditTool = chunk2OYWVA6F_cjs.createTool({
7002
7007
  id: WORKSPACE_TOOLS.FILESYSTEM.AST_EDIT,
7003
7008
  description: `Edit code using AST-based analysis for intelligent transformations.
7004
7009
 
@@ -7117,7 +7122,7 @@ Pattern replace (for everything else):
7117
7122
  return output;
7118
7123
  }
7119
7124
  });
7120
- var deleteFileTool = chunkAV4YSAZL_cjs.createTool({
7125
+ var deleteFileTool = chunk2OYWVA6F_cjs.createTool({
7121
7126
  id: WORKSPACE_TOOLS.FILESYSTEM.DELETE,
7122
7127
  description: "Delete a file or directory from the workspace filesystem",
7123
7128
  inputSchema: v4.z.object({
@@ -7139,7 +7144,7 @@ var deleteFileTool = chunkAV4YSAZL_cjs.createTool({
7139
7144
  return `Deleted ${path8}`;
7140
7145
  }
7141
7146
  });
7142
- var editFileTool = chunkAV4YSAZL_cjs.createTool({
7147
+ var editFileTool = chunk2OYWVA6F_cjs.createTool({
7143
7148
  id: WORKSPACE_TOOLS.FILESYSTEM.EDIT_FILE,
7144
7149
  description: `Edit a file by replacing specific text. The old_string must match exactly and be unique in the file.
7145
7150
 
@@ -7401,14 +7406,14 @@ Usage:
7401
7406
  - Always quote file paths that contain spaces (e.g., cd "/path/with spaces").
7402
7407
  - Use the timeout parameter (in seconds) to limit execution time. Behavior when omitted depends on the sandbox provider.
7403
7408
  - Optionally use cwd to override the working directory. Commands run from the sandbox default if omitted.`;
7404
- var executeCommandTool = chunkAV4YSAZL_cjs.createTool({
7409
+ var executeCommandTool = chunk2OYWVA6F_cjs.createTool({
7405
7410
  id: WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND,
7406
7411
  description: baseDescription,
7407
7412
  inputSchema: executeCommandInputSchema,
7408
7413
  execute: executeCommand,
7409
7414
  toModelOutput: sandboxToModelOutput
7410
7415
  });
7411
- var executeCommandWithBackgroundTool = chunkAV4YSAZL_cjs.createTool({
7416
+ var executeCommandWithBackgroundTool = chunk2OYWVA6F_cjs.createTool({
7412
7417
  id: WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND,
7413
7418
  description: `${baseDescription}
7414
7419
 
@@ -7417,7 +7422,7 @@ Set background: true to run long-running commands (dev servers, watchers) withou
7417
7422
  execute: executeCommand,
7418
7423
  toModelOutput: sandboxToModelOutput
7419
7424
  });
7420
- var fileStatTool = chunkAV4YSAZL_cjs.createTool({
7425
+ var fileStatTool = chunk2OYWVA6F_cjs.createTool({
7421
7426
  id: WORKSPACE_TOOLS.FILESYSTEM.FILE_STAT,
7422
7427
  description: "Get file or directory metadata from the workspace. Returns existence, type, size, and modification time.",
7423
7428
  inputSchema: v4.z.object({
@@ -7441,7 +7446,7 @@ var fileStatTool = chunkAV4YSAZL_cjs.createTool({
7441
7446
  }
7442
7447
  }
7443
7448
  });
7444
- var getProcessOutputTool = chunkAV4YSAZL_cjs.createTool({
7449
+ var getProcessOutputTool = chunk2OYWVA6F_cjs.createTool({
7445
7450
  id: WORKSPACE_TOOLS.SANDBOX.GET_PROCESS_OUTPUT,
7446
7451
  description: `Get the current output (stdout, stderr) and status of a background process by its PID.
7447
7452
 
@@ -7539,7 +7544,7 @@ async function loadGitignore(filesystem) {
7539
7544
  }
7540
7545
 
7541
7546
  // src/workspace/tools/grep.ts
7542
- var grepTool = chunkAV4YSAZL_cjs.createTool({
7547
+ var grepTool = chunk2OYWVA6F_cjs.createTool({
7543
7548
  id: WORKSPACE_TOOLS.FILESYSTEM.GREP,
7544
7549
  description: `Search file contents using a regex pattern. Walks the filesystem and returns matching lines with file paths and line numbers.
7545
7550
 
@@ -7693,7 +7698,7 @@ Usage:
7693
7698
  );
7694
7699
  }
7695
7700
  });
7696
- var indexContentTool = chunkAV4YSAZL_cjs.createTool({
7701
+ var indexContentTool = chunk2OYWVA6F_cjs.createTool({
7697
7702
  id: WORKSPACE_TOOLS.SEARCH.INDEX,
7698
7703
  description: "Index content for search. The path becomes the document ID in search results.",
7699
7704
  inputSchema: v4.z.object({
@@ -7709,7 +7714,7 @@ var indexContentTool = chunkAV4YSAZL_cjs.createTool({
7709
7714
  }
7710
7715
  });
7711
7716
  var KILL_TAIL_LINES = 50;
7712
- var killProcessTool = chunkAV4YSAZL_cjs.createTool({
7717
+ var killProcessTool = chunk2OYWVA6F_cjs.createTool({
7713
7718
  id: WORKSPACE_TOOLS.SANDBOX.KILL_PROCESS,
7714
7719
  description: `Kill a background process by its PID.
7715
7720
 
@@ -7898,7 +7903,7 @@ function joinPath2(base, name) {
7898
7903
  }
7899
7904
 
7900
7905
  // src/workspace/tools/list-files.ts
7901
- var listFilesTool = chunkAV4YSAZL_cjs.createTool({
7906
+ var listFilesTool = chunk2OYWVA6F_cjs.createTool({
7902
7907
  id: WORKSPACE_TOOLS.FILESYSTEM.LIST_FILES,
7903
7908
  description: `List files and directories in the workspace filesystem.
7904
7909
  Returns a compact tab-indented listing for efficient token usage.
@@ -7986,7 +7991,7 @@ function compressPath(filePath) {
7986
7991
  }
7987
7992
  return filePath;
7988
7993
  }
7989
- var lspInspectTool = chunkAV4YSAZL_cjs.createTool({
7994
+ var lspInspectTool = chunk2OYWVA6F_cjs.createTool({
7990
7995
  id: WORKSPACE_TOOLS.LSP.LSP_INSPECT,
7991
7996
  description: "Inspect code at a specific symbol position using the Language Server Protocol. Provide an absolute file path, a 1-indexed line number, and the exact line content with <<< marking the cursor position. Exactly one <<< marker is required. Returns hover information, any diagnostics reported on that line, plus definition and implementation locations when available. Use this for type information, symbol navigation, and go-to-definition; use view to read the surrounding implementation.",
7992
7997
  inputSchema: v4.z.object({
@@ -8133,7 +8138,7 @@ var lspInspectTool = chunkAV4YSAZL_cjs.createTool({
8133
8138
  return result;
8134
8139
  }
8135
8140
  });
8136
- var mkdirTool = chunkAV4YSAZL_cjs.createTool({
8141
+ var mkdirTool = chunk2OYWVA6F_cjs.createTool({
8137
8142
  id: WORKSPACE_TOOLS.FILESYSTEM.MKDIR,
8138
8143
  description: "Create a directory in the workspace filesystem",
8139
8144
  inputSchema: v4.z.object({
@@ -8150,7 +8155,7 @@ var mkdirTool = chunkAV4YSAZL_cjs.createTool({
8150
8155
  return `Created directory ${path8}`;
8151
8156
  }
8152
8157
  });
8153
- var readFileTool = chunkAV4YSAZL_cjs.createTool({
8158
+ var readFileTool = chunk2OYWVA6F_cjs.createTool({
8154
8159
  id: WORKSPACE_TOOLS.FILESYSTEM.READ_FILE,
8155
8160
  description: "Read the contents of a file from the workspace filesystem. Use offset/limit parameters to read specific line ranges for large files.",
8156
8161
  inputSchema: v4.z.object({
@@ -8198,7 +8203,7 @@ ${fullContent.toString("base64")}`,
8198
8203
  ${formattedContent}`, tokenLimit, "end");
8199
8204
  }
8200
8205
  });
8201
- var searchTool = chunkAV4YSAZL_cjs.createTool({
8206
+ var searchTool = chunk2OYWVA6F_cjs.createTool({
8202
8207
  id: WORKSPACE_TOOLS.SEARCH.SEARCH,
8203
8208
  description: "Search indexed content in the workspace. Supports keyword (BM25), semantic (vector), and hybrid search modes.",
8204
8209
  inputSchema: v4.z.object({
@@ -8225,7 +8230,7 @@ var searchTool = chunkAV4YSAZL_cjs.createTool({
8225
8230
  return lines.join("\n");
8226
8231
  }
8227
8232
  });
8228
- var writeFileTool = chunkAV4YSAZL_cjs.createTool({
8233
+ var writeFileTool = chunk2OYWVA6F_cjs.createTool({
8229
8234
  id: WORKSPACE_TOOLS.FILESYSTEM.WRITE_FILE,
8230
8235
  description: "Write content to a file in the workspace filesystem. Creates parent directories if needed.",
8231
8236
  inputSchema: v4.z.object({
@@ -8473,5 +8478,5 @@ exports.requireWorkspace = requireWorkspace;
8473
8478
  exports.resolveToolConfig = resolveToolConfig;
8474
8479
  exports.searchTool = searchTool;
8475
8480
  exports.writeFileTool = writeFileTool;
8476
- //# sourceMappingURL=chunk-GXXNF6NF.cjs.map
8477
- //# sourceMappingURL=chunk-GXXNF6NF.cjs.map
8481
+ //# sourceMappingURL=chunk-L2FL7HMV.cjs.map
8482
+ //# sourceMappingURL=chunk-L2FL7HMV.cjs.map