@mastra/mcp-docs-server 1.1.7 → 1.1.8-alpha.0

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 (276) hide show
  1. package/.docs/docs/agents/agent-approval.md +61 -31
  2. package/.docs/docs/agents/supervisor-agents.md +1 -1
  3. package/.docs/docs/getting-started/manual-install.md +1 -1
  4. package/.docs/docs/index.md +68 -24
  5. package/.docs/docs/mastra-cloud/setup.md +1 -1
  6. package/.docs/docs/memory/observational-memory.md +9 -0
  7. package/.docs/docs/memory/semantic-recall.md +17 -1
  8. package/.docs/docs/workspace/skills.md +7 -5
  9. package/.docs/guides/deployment/aws-lambda.md +76 -165
  10. package/.docs/guides/deployment/azure-app-services.md +38 -61
  11. package/.docs/guides/deployment/cloudflare.md +1 -1
  12. package/.docs/guides/deployment/netlify.md +1 -1
  13. package/.docs/guides/deployment/vercel.md +1 -1
  14. package/.docs/models/gateways/netlify.md +5 -1
  15. package/.docs/models/index.md +1 -1
  16. package/.docs/models/providers/anthropic.md +9 -9
  17. package/.docs/models/providers/deepseek.md +1 -1
  18. package/.docs/models/providers/google.md +11 -11
  19. package/.docs/models/providers/openai.md +19 -19
  20. package/.docs/models/providers/opencode.md +33 -33
  21. package/.docs/models/providers/xai.md +3 -3
  22. package/.docs/reference/agents/agent.md +20 -20
  23. package/.docs/reference/agents/generate.md +200 -66
  24. package/.docs/reference/agents/generateLegacy.md +77 -35
  25. package/.docs/reference/agents/getDefaultGenerateOptions.md +4 -6
  26. package/.docs/reference/agents/getDefaultOptions.md +4 -6
  27. package/.docs/reference/agents/getDefaultStreamOptions.md +4 -6
  28. package/.docs/reference/agents/getDescription.md +1 -1
  29. package/.docs/reference/agents/getInstructions.md +4 -6
  30. package/.docs/reference/agents/getLLM.md +6 -8
  31. package/.docs/reference/agents/getMemory.md +4 -6
  32. package/.docs/reference/agents/getModel.md +4 -6
  33. package/.docs/reference/agents/getTools.md +5 -7
  34. package/.docs/reference/agents/getVoice.md +4 -6
  35. package/.docs/reference/agents/listAgents.md +4 -6
  36. package/.docs/reference/agents/listScorers.md +4 -6
  37. package/.docs/reference/agents/listTools.md +4 -6
  38. package/.docs/reference/agents/listWorkflows.md +4 -6
  39. package/.docs/reference/agents/network.md +69 -23
  40. package/.docs/reference/ai-sdk/chat-route.md +7 -7
  41. package/.docs/reference/ai-sdk/handle-chat-stream.md +12 -12
  42. package/.docs/reference/ai-sdk/handle-network-stream.md +4 -4
  43. package/.docs/reference/ai-sdk/handle-workflow-stream.md +11 -11
  44. package/.docs/reference/ai-sdk/network-route.md +3 -3
  45. package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +9 -9
  46. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +9 -9
  47. package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +5 -5
  48. package/.docs/reference/ai-sdk/with-mastra.md +12 -12
  49. package/.docs/reference/ai-sdk/workflow-route.md +3 -3
  50. package/.docs/reference/auth/auth0.md +6 -6
  51. package/.docs/reference/auth/better-auth.md +5 -5
  52. package/.docs/reference/auth/clerk.md +5 -5
  53. package/.docs/reference/auth/firebase.md +7 -7
  54. package/.docs/reference/auth/jwt.md +1 -1
  55. package/.docs/reference/auth/supabase.md +4 -4
  56. package/.docs/reference/auth/workos.md +6 -6
  57. package/.docs/reference/cli/create-mastra.md +14 -14
  58. package/.docs/reference/client-js/mastra-client.md +23 -23
  59. package/.docs/reference/client-js/workflows.md +3 -3
  60. package/.docs/reference/core/addGateway.md +2 -2
  61. package/.docs/reference/core/getAgent.md +2 -2
  62. package/.docs/reference/core/getAgentById.md +2 -2
  63. package/.docs/reference/core/getDeployer.md +1 -1
  64. package/.docs/reference/core/getGateway.md +2 -2
  65. package/.docs/reference/core/getGatewayById.md +2 -2
  66. package/.docs/reference/core/getLogger.md +1 -1
  67. package/.docs/reference/core/getMCPServer.md +2 -2
  68. package/.docs/reference/core/getMCPServerById.md +3 -3
  69. package/.docs/reference/core/getMemory.md +2 -2
  70. package/.docs/reference/core/getScorer.md +2 -2
  71. package/.docs/reference/core/getScorerById.md +2 -2
  72. package/.docs/reference/core/getServer.md +1 -1
  73. package/.docs/reference/core/getStorage.md +1 -1
  74. package/.docs/reference/core/getStoredAgentById.md +18 -20
  75. package/.docs/reference/core/getTelemetry.md +1 -1
  76. package/.docs/reference/core/getVector.md +2 -2
  77. package/.docs/reference/core/getWorkflow.md +3 -3
  78. package/.docs/reference/core/listAgents.md +1 -1
  79. package/.docs/reference/core/listGateways.md +1 -1
  80. package/.docs/reference/core/listLogs.md +9 -11
  81. package/.docs/reference/core/listLogsByRunId.md +9 -9
  82. package/.docs/reference/core/listMCPServers.md +1 -1
  83. package/.docs/reference/core/listMemory.md +1 -1
  84. package/.docs/reference/core/listScorers.md +1 -1
  85. package/.docs/reference/core/listStoredAgents.md +9 -11
  86. package/.docs/reference/core/listVectors.md +1 -1
  87. package/.docs/reference/core/listWorkflows.md +2 -2
  88. package/.docs/reference/core/mastra-class.md +17 -17
  89. package/.docs/reference/core/mastra-model-gateway.md +15 -15
  90. package/.docs/reference/core/setLogger.md +2 -4
  91. package/.docs/reference/core/setStorage.md +1 -1
  92. package/.docs/reference/datasets/addItem.md +20 -4
  93. package/.docs/reference/datasets/addItems.md +8 -2
  94. package/.docs/reference/datasets/compareExperiments.md +15 -3
  95. package/.docs/reference/datasets/create.md +6 -6
  96. package/.docs/reference/datasets/dataset.md +1 -1
  97. package/.docs/reference/datasets/delete.md +2 -2
  98. package/.docs/reference/datasets/deleteExperiment.md +2 -2
  99. package/.docs/reference/datasets/deleteItem.md +2 -2
  100. package/.docs/reference/datasets/deleteItems.md +2 -2
  101. package/.docs/reference/datasets/get.md +2 -2
  102. package/.docs/reference/datasets/getDetails.md +9 -9
  103. package/.docs/reference/datasets/getExperiment.md +2 -2
  104. package/.docs/reference/datasets/getItem.md +3 -3
  105. package/.docs/reference/datasets/getItemHistory.md +22 -2
  106. package/.docs/reference/datasets/list.md +7 -3
  107. package/.docs/reference/datasets/listExperimentResults.md +34 -4
  108. package/.docs/reference/datasets/listExperiments.md +41 -3
  109. package/.docs/reference/datasets/listItems.md +18 -6
  110. package/.docs/reference/datasets/listVersions.md +23 -3
  111. package/.docs/reference/datasets/startExperiment.md +62 -12
  112. package/.docs/reference/datasets/startExperimentAsync.md +5 -1
  113. package/.docs/reference/datasets/update.md +6 -6
  114. package/.docs/reference/datasets/updateItem.md +5 -5
  115. package/.docs/reference/deployer.md +8 -8
  116. package/.docs/reference/evals/answer-relevancy.md +11 -11
  117. package/.docs/reference/evals/answer-similarity.md +17 -19
  118. package/.docs/reference/evals/bias.md +10 -10
  119. package/.docs/reference/evals/completeness.md +3 -3
  120. package/.docs/reference/evals/content-similarity.md +6 -6
  121. package/.docs/reference/evals/context-precision.md +4 -4
  122. package/.docs/reference/evals/context-relevance.md +4 -4
  123. package/.docs/reference/evals/create-scorer.md +47 -49
  124. package/.docs/reference/evals/faithfulness.md +11 -11
  125. package/.docs/reference/evals/hallucination.md +17 -21
  126. package/.docs/reference/evals/keyword-coverage.md +4 -4
  127. package/.docs/reference/evals/mastra-scorer.md +14 -14
  128. package/.docs/reference/evals/noise-sensitivity.md +4 -4
  129. package/.docs/reference/evals/prompt-alignment.md +4 -4
  130. package/.docs/reference/evals/run-evals.md +16 -16
  131. package/.docs/reference/evals/scorer-utils.md +3 -3
  132. package/.docs/reference/evals/textual-difference.md +3 -3
  133. package/.docs/reference/evals/tone-consistency.md +3 -3
  134. package/.docs/reference/evals/tool-call-accuracy.md +5 -5
  135. package/.docs/reference/evals/toxicity.md +8 -8
  136. package/.docs/reference/harness/harness-class.md +34 -42
  137. package/.docs/reference/logging/pino-logger.md +5 -5
  138. package/.docs/reference/memory/clone-utilities.md +5 -5
  139. package/.docs/reference/memory/cloneThread.md +17 -21
  140. package/.docs/reference/memory/createThread.md +10 -10
  141. package/.docs/reference/memory/deleteMessages.md +2 -2
  142. package/.docs/reference/memory/getThreadById.md +2 -2
  143. package/.docs/reference/memory/listThreads.md +5 -5
  144. package/.docs/reference/memory/memory-class.md +12 -14
  145. package/.docs/reference/memory/observational-memory.md +102 -94
  146. package/.docs/reference/memory/recall.md +14 -16
  147. package/.docs/reference/observability/tracing/configuration.md +27 -10
  148. package/.docs/reference/observability/tracing/exporters/console-exporter.md +4 -7
  149. package/.docs/reference/processors/batch-parts-processor.md +8 -10
  150. package/.docs/reference/processors/language-detector.md +14 -16
  151. package/.docs/reference/processors/message-history-processor.md +7 -9
  152. package/.docs/reference/processors/moderation-processor.md +13 -15
  153. package/.docs/reference/processors/pii-detector.md +14 -16
  154. package/.docs/reference/processors/processor-interface.md +62 -62
  155. package/.docs/reference/processors/prompt-injection-detector.md +11 -13
  156. package/.docs/reference/processors/semantic-recall-processor.md +14 -16
  157. package/.docs/reference/processors/system-prompt-scrubber.md +12 -14
  158. package/.docs/reference/processors/token-limiter-processor.md +11 -13
  159. package/.docs/reference/processors/tool-call-filter.md +5 -7
  160. package/.docs/reference/processors/tool-search-processor.md +9 -11
  161. package/.docs/reference/processors/unicode-normalizer.md +8 -10
  162. package/.docs/reference/processors/working-memory-processor.md +14 -18
  163. package/.docs/reference/rag/chunk.md +38 -38
  164. package/.docs/reference/rag/database-config.md +11 -7
  165. package/.docs/reference/rag/document.md +2 -2
  166. package/.docs/reference/rag/embeddings.md +12 -12
  167. package/.docs/reference/rag/extract-params.md +23 -23
  168. package/.docs/reference/rag/graph-rag.md +12 -12
  169. package/.docs/reference/rag/rerank.md +25 -17
  170. package/.docs/reference/rag/rerankWithScorer.md +25 -17
  171. package/.docs/reference/server/create-route.md +14 -14
  172. package/.docs/reference/server/express-adapter.md +10 -10
  173. package/.docs/reference/server/fastify-adapter.md +10 -10
  174. package/.docs/reference/server/hono-adapter.md +10 -10
  175. package/.docs/reference/server/koa-adapter.md +10 -10
  176. package/.docs/reference/server/mastra-server.md +10 -10
  177. package/.docs/reference/server/register-api-route.md +13 -13
  178. package/.docs/reference/storage/cloudflare-d1.md +5 -5
  179. package/.docs/reference/storage/cloudflare.md +6 -6
  180. package/.docs/reference/storage/composite.md +9 -9
  181. package/.docs/reference/storage/convex.md +3 -3
  182. package/.docs/reference/storage/dynamodb.md +9 -9
  183. package/.docs/reference/storage/lance.md +3 -3
  184. package/.docs/reference/storage/libsql.md +2 -2
  185. package/.docs/reference/storage/mongodb.md +5 -5
  186. package/.docs/reference/storage/mssql.md +2 -2
  187. package/.docs/reference/storage/postgresql.md +25 -25
  188. package/.docs/reference/storage/upstash.md +3 -3
  189. package/.docs/reference/streaming/ChunkType.md +251 -59
  190. package/.docs/reference/streaming/agents/MastraModelOutput.md +86 -16
  191. package/.docs/reference/streaming/agents/stream.md +155 -43
  192. package/.docs/reference/streaming/agents/streamLegacy.md +79 -39
  193. package/.docs/reference/streaming/workflows/resumeStream.md +18 -8
  194. package/.docs/reference/streaming/workflows/stream.md +21 -9
  195. package/.docs/reference/streaming/workflows/timeTravelStream.md +4 -4
  196. package/.docs/reference/tools/create-tool.md +25 -21
  197. package/.docs/reference/tools/document-chunker-tool.md +7 -7
  198. package/.docs/reference/tools/graph-rag-tool.md +16 -18
  199. package/.docs/reference/tools/mcp-client.md +38 -27
  200. package/.docs/reference/tools/mcp-server.md +45 -45
  201. package/.docs/reference/tools/vector-query-tool.md +34 -22
  202. package/.docs/reference/vectors/astra.md +22 -22
  203. package/.docs/reference/vectors/chroma.md +44 -44
  204. package/.docs/reference/vectors/convex.md +26 -26
  205. package/.docs/reference/vectors/couchbase.md +30 -30
  206. package/.docs/reference/vectors/duckdb.md +29 -29
  207. package/.docs/reference/vectors/elasticsearch.md +27 -27
  208. package/.docs/reference/vectors/lance.md +46 -38
  209. package/.docs/reference/vectors/libsql.md +31 -31
  210. package/.docs/reference/vectors/mongodb.md +32 -32
  211. package/.docs/reference/vectors/opensearch.md +27 -27
  212. package/.docs/reference/vectors/pg.md +60 -44
  213. package/.docs/reference/vectors/pinecone.md +38 -38
  214. package/.docs/reference/vectors/qdrant.md +36 -36
  215. package/.docs/reference/vectors/s3vectors.md +24 -24
  216. package/.docs/reference/vectors/turbopuffer.md +29 -29
  217. package/.docs/reference/vectors/upstash.md +25 -25
  218. package/.docs/reference/vectors/vectorize.md +27 -27
  219. package/.docs/reference/voice/azure.md +19 -15
  220. package/.docs/reference/voice/cloudflare.md +10 -12
  221. package/.docs/reference/voice/composite-voice.md +10 -10
  222. package/.docs/reference/voice/deepgram.md +20 -14
  223. package/.docs/reference/voice/elevenlabs.md +20 -22
  224. package/.docs/reference/voice/google-gemini-live.md +42 -44
  225. package/.docs/reference/voice/google.md +25 -21
  226. package/.docs/reference/voice/mastra-voice.md +20 -20
  227. package/.docs/reference/voice/murf.md +24 -28
  228. package/.docs/reference/voice/openai-realtime.md +26 -26
  229. package/.docs/reference/voice/openai.md +14 -12
  230. package/.docs/reference/voice/playai.md +13 -15
  231. package/.docs/reference/voice/sarvam.md +21 -25
  232. package/.docs/reference/voice/speechify.md +11 -13
  233. package/.docs/reference/voice/voice.addInstructions.md +1 -1
  234. package/.docs/reference/voice/voice.addTools.md +1 -1
  235. package/.docs/reference/voice/voice.answer.md +1 -1
  236. package/.docs/reference/voice/voice.connect.md +3 -3
  237. package/.docs/reference/voice/voice.events.md +11 -11
  238. package/.docs/reference/voice/voice.getSpeakers.md +30 -30
  239. package/.docs/reference/voice/voice.listen.md +9 -9
  240. package/.docs/reference/voice/voice.off.md +2 -2
  241. package/.docs/reference/voice/voice.on.md +2 -2
  242. package/.docs/reference/voice/voice.send.md +1 -1
  243. package/.docs/reference/voice/voice.speak.md +11 -11
  244. package/.docs/reference/voice/voice.updateConfig.md +3 -3
  245. package/.docs/reference/workflows/run-methods/cancel.md +2 -2
  246. package/.docs/reference/workflows/run-methods/restart.md +17 -5
  247. package/.docs/reference/workflows/run-methods/resume.md +23 -9
  248. package/.docs/reference/workflows/run-methods/start.md +22 -8
  249. package/.docs/reference/workflows/run-methods/startAsync.md +12 -6
  250. package/.docs/reference/workflows/run-methods/timeTravel.md +29 -13
  251. package/.docs/reference/workflows/run.md +12 -12
  252. package/.docs/reference/workflows/step.md +24 -26
  253. package/.docs/reference/workflows/workflow-methods/branch.md +2 -2
  254. package/.docs/reference/workflows/workflow-methods/commit.md +1 -1
  255. package/.docs/reference/workflows/workflow-methods/create-run.md +4 -4
  256. package/.docs/reference/workflows/workflow-methods/dountil.md +3 -3
  257. package/.docs/reference/workflows/workflow-methods/dowhile.md +3 -3
  258. package/.docs/reference/workflows/workflow-methods/foreach.md +9 -9
  259. package/.docs/reference/workflows/workflow-methods/map.md +2 -2
  260. package/.docs/reference/workflows/workflow-methods/parallel.md +2 -2
  261. package/.docs/reference/workflows/workflow-methods/sleep.md +2 -2
  262. package/.docs/reference/workflows/workflow-methods/sleepUntil.md +2 -2
  263. package/.docs/reference/workflows/workflow-methods/then.md +2 -2
  264. package/.docs/reference/workflows/workflow.md +40 -50
  265. package/.docs/reference/workspace/daytona-sandbox.md +33 -33
  266. package/.docs/reference/workspace/e2b-sandbox.md +20 -20
  267. package/.docs/reference/workspace/filesystem.md +22 -22
  268. package/.docs/reference/workspace/gcs-filesystem.md +15 -15
  269. package/.docs/reference/workspace/local-filesystem.md +35 -35
  270. package/.docs/reference/workspace/local-sandbox.md +26 -26
  271. package/.docs/reference/workspace/s3-filesystem.md +18 -18
  272. package/.docs/reference/workspace/sandbox.md +8 -8
  273. package/.docs/reference/workspace/workspace-class.md +30 -34
  274. package/CHANGELOG.md +8 -0
  275. package/package.json +6 -6
  276. package/.docs/docs/getting-started/start.md +0 -28
@@ -10,13 +10,13 @@ workflow.dowhile(step1, async ({ inputData }) => true)
10
10
 
11
11
  ## Parameters
12
12
 
13
- **step:** (`Step`): The step instance to execute in the loop
13
+ **step** (`Step`): The step instance to execute in the loop
14
14
 
15
- **condition:** (`(params : ExecuteParams & { iterationCount: number }) => Promise<boolean>`): A function that returns a boolean indicating whether to continue the loop. The function receives the execution parameters and the iteration count.
15
+ **condition** (`(params : ExecuteParams & { iterationCount: number }) => Promise<boolean>`): A function that returns a boolean indicating whether to continue the loop. The function receives the execution parameters and the iteration count.
16
16
 
17
17
  ## Returns
18
18
 
19
- **workflow:** (`Workflow`): The workflow instance for method chaining
19
+ **workflow** (`Workflow`): The workflow instance for method chaining
20
20
 
21
21
  ## Related
22
22
 
@@ -10,13 +10,13 @@ workflow.foreach(step1, { concurrency: 2 })
10
10
 
11
11
  ## Parameters
12
12
 
13
- **step:** (`Step`): The step instance to execute in the loop. The previous step must return an array type.
13
+ **step** (`Step`): The step instance to execute in the loop. The previous step must return an array type.
14
14
 
15
- **opts?:** (`object`): number
15
+ **opts** (`object`): Optional configuration for the loop. The concurrency option controls how many iterations can run in parallel (default: 1)
16
16
 
17
17
  ## Returns
18
18
 
19
- **workflow:** (`Workflow`): The workflow instance for method chaining. The output type is an array of the step's output type.
19
+ **workflow** (`Workflow`): The workflow instance for method chaining. The output type is an array of the step's output type.
20
20
 
21
21
  ## Behavior
22
22
 
@@ -101,17 +101,17 @@ for await (const chunk of stream) {
101
101
 
102
102
  Each progress event payload contains:
103
103
 
104
- **id:** (`string`): The step ID of the foreach step
104
+ **id** (`string`): The step ID of the foreach step
105
105
 
106
- **completedCount:** (`number`): Number of iterations completed so far
106
+ **completedCount** (`number`): Number of iterations completed so far
107
107
 
108
- **totalCount:** (`number`): Total number of iterations
108
+ **totalCount** (`number`): Total number of iterations
109
109
 
110
- **currentIndex:** (`number`): Index of the iteration that just completed
110
+ **currentIndex** (`number`): Index of the iteration that just completed
111
111
 
112
- **iterationStatus:** (`'success' | 'failed' | 'suspended'`): Status of the iteration that just completed
112
+ **iterationStatus** (`'success' | 'failed' | 'suspended'`): Status of the iteration that just completed
113
113
 
114
- **iterationOutput?:** (`Record<string, any>`): Output of the iteration (present when iterationStatus is 'success')
114
+ **iterationOutput** (`Record<string, any>`): Output of the iteration (present when iterationStatus is 'success')
115
115
 
116
116
  ## Related
117
117
 
@@ -10,11 +10,11 @@ workflow.map(async ({ inputData }) => `${inputData.value} - map`)
10
10
 
11
11
  ## Parameters
12
12
 
13
- **mappingFunction:** (`(params: { inputData: any }) => any`): Function that transforms input data and returns the mapped result
13
+ **mappingFunction** (`(params: { inputData: any }) => any`): Function that transforms input data and returns the mapped result
14
14
 
15
15
  ## Returns
16
16
 
17
- **workflow:** (`Workflow`): The workflow instance for method chaining
17
+ **workflow** (`Workflow`): The workflow instance for method chaining
18
18
 
19
19
  ## Using `inputData`
20
20
 
@@ -10,11 +10,11 @@ workflow.parallel([step1, step2])
10
10
 
11
11
  ## Parameters
12
12
 
13
- **steps:** (`Step[]`): The step instances to execute in parallel
13
+ **steps** (`Step[]`): The step instances to execute in parallel
14
14
 
15
15
  ## Returns
16
16
 
17
- **workflow:** (`Workflow`): The workflow instance for method chaining
17
+ **workflow** (`Workflow`): The workflow instance for method chaining
18
18
 
19
19
  ## Related
20
20
 
@@ -10,11 +10,11 @@ workflow.sleep(5000)
10
10
 
11
11
  ## Parameters
12
12
 
13
- **milliseconds:** (`number | ((context: { inputData: any }) => number | Promise<number>)`): The number of milliseconds to pause execution, or a callback that returns the delay
13
+ **milliseconds** (`number | ((context: { inputData: any }) => number | Promise<number>)`): The number of milliseconds to pause execution, or a callback that returns the delay
14
14
 
15
15
  ## Returns
16
16
 
17
- **workflow:** (`Workflow`): The workflow instance for method chaining
17
+ **workflow** (`Workflow`): The workflow instance for method chaining
18
18
 
19
19
  ## Extended usage example
20
20
 
@@ -10,11 +10,11 @@ workflow.sleepUntil(new Date(Date.now() + 5000))
10
10
 
11
11
  ## Parameters
12
12
 
13
- **dateOrCallback:** (`Date | ((params: ExecuteFunctionParams) => Promise<Date>)`): Either a Date object or a callback function that returns a Date. The callback receives execution context and can compute the target time dynamically based on input data.
13
+ **dateOrCallback** (`Date | ((params: ExecuteFunctionParams) => Promise<Date>)`): Either a Date object or a callback function that returns a Date. The callback receives execution context and can compute the target time dynamically based on input data.
14
14
 
15
15
  ## Returns
16
16
 
17
- **workflow:** (`Workflow`): The workflow instance for method chaining
17
+ **workflow** (`Workflow`): The workflow instance for method chaining
18
18
 
19
19
  ## Extended usage example
20
20
 
@@ -10,11 +10,11 @@ workflow.then(step1).then(step2)
10
10
 
11
11
  ## Parameters
12
12
 
13
- **step:** (`Step`): The step instance that should execute after the previous step completes
13
+ **step** (`Step`): The step instance that should execute after the previous step completes
14
14
 
15
15
  ## Returns
16
16
 
17
- **workflow:** (`NewWorkflow`): The workflow instance for method chaining
17
+ **workflow** (`NewWorkflow`): The workflow instance for method chaining
18
18
 
19
19
  ## Related
20
20
 
@@ -21,87 +21,77 @@ export const workflow = createWorkflow({
21
21
 
22
22
  ## Constructor parameters
23
23
 
24
- **id:** (`string`): Unique identifier for the workflow
24
+ **id** (`string`): Unique identifier for the workflow
25
25
 
26
- **inputSchema:** (`z.ZodType<any>`): Zod schema defining the input structure for the workflow
26
+ **inputSchema** (`z.ZodType<any>`): Zod schema defining the input structure for the workflow
27
27
 
28
- **outputSchema:** (`z.ZodType<any>`): Zod schema defining the output structure for the workflow
28
+ **outputSchema** (`z.ZodType<any>`): Zod schema defining the output structure for the workflow
29
29
 
30
- **stateSchema?:** (`z.ZodObject<any>`): Optional Zod schema for the workflow state. Automatically injected when using Mastra's state system. If not specified, type is 'any'.
30
+ **stateSchema** (`z.ZodObject<any>`): Optional Zod schema for the workflow state. Automatically injected when using Mastra's state system. If not specified, type is 'any'.
31
31
 
32
- **requestContextSchema?:** (`z.ZodType<any>`): Zod schema for validating request context values. When provided, the context is validated at the start of run.start(), throwing an error if validation fails.
32
+ **requestContextSchema** (`z.ZodType<any>`): Zod schema for validating request context values. When provided, the context is validated at the start of run.start(), throwing an error if validation fails.
33
33
 
34
- **options?:** (`WorkflowOptions`): Optional options for the workflow
34
+ **options** (`WorkflowOptions`): Optional options for the workflow
35
35
 
36
- ### WorkflowOptions
36
+ **options.tracingPolicy** (`TracingPolicy`): Optional tracing policy for the workflow
37
37
 
38
- **tracingPolicy?:** (`TracingPolicy`): Optional tracing policy for the workflow
38
+ **options.validateInputs** (`boolean`): Optional flag to determine whether to validate the workflow inputs. This also applies default values from zodSchemas on the workflow/step input/resume data. If input/resume data validation fails on start/resume, the workflow will not start/resume, it throws an error instead. If input data validation fails on a step execution, the step fails, causing the workflow to fail and the error is returned.
39
39
 
40
- **validateInputs?:** (`boolean`): Optional flag to determine whether to validate the workflow inputs. This also applies default values from zodSchemas on the workflow/step input/resume data. If input/resume data validation fails on start/resume, the workflow will not start/resume, it throws an error instead. If input data validation fails on a step execution, the step fails, causing the workflow to fail and the error is returned. (Default: `true`)
40
+ **options.shouldPersistSnapshot** (`(params: { stepResults: Record<string, StepResult<any, any, any, any>>; workflowStatus: WorkflowRunStatus }) => boolean`): Optional flag to determine whether to persist the workflow snapshot
41
41
 
42
- **shouldPersistSnapshot?:** (`(params: { stepResults: Record<string, StepResult<any, any, any, any>>; workflowStatus: WorkflowRunStatus }) => boolean`): Optional flag to determine whether to persist the workflow snapshot (Default: `() => true`)
42
+ **options.onFinish** (`(result: WorkflowFinishCallbackResult) => void | Promise<void>`): Callback invoked when workflow completes with any status (success, failed, suspended, tripwire). Receives the workflow result including status, output, error, and step results. Errors thrown in this callback are caught and logged, not propagated.
43
43
 
44
- **onFinish?:** (`(result: WorkflowFinishCallbackResult) => void | Promise<void>`): Callback invoked when workflow completes with any status (success, failed, suspended, tripwire). Receives the workflow result including status, output, error, and step results. Errors thrown in this callback are caught and logged, not propagated.
44
+ **options.onFinish.status** (`WorkflowRunStatus`): The workflow status: 'success', 'failed', 'suspended', or 'tripwire'
45
45
 
46
- **onError?:** (`(errorInfo: WorkflowErrorCallbackInfo) => void | Promise<void>`): Callback invoked only when workflow fails (failed or tripwire status). Receives error details and step results. Errors thrown in this callback are caught and logged, not propagated.
46
+ **options.onFinish.result** (`any`): The workflow output (when status is 'success')
47
47
 
48
- ### WorkflowFinishCallbackResult
48
+ **options.onFinish.error** (`SerializedError`): Error details (when status is 'failed')
49
49
 
50
- The result object passed to `onFinish` callbacks.
50
+ **options.onFinish.steps** (`Record<string, StepResult>`): Individual step results with their status and output
51
51
 
52
- **status:** (`WorkflowRunStatus`): The workflow status: 'success', 'failed', 'suspended', or 'tripwire'
52
+ **options.onFinish.tripwire** (`StepTripwireInfo`): Tripwire information (when status is 'tripwire')
53
53
 
54
- **result?:** (`any`): The workflow output (when status is 'success')
54
+ **options.onFinish.runId** (`string`): The unique identifier for this workflow run
55
55
 
56
- **error?:** (`SerializedError`): Error details (when status is 'failed')
56
+ **options.onFinish.workflowId** (`string`): The workflow's identifier
57
57
 
58
- **steps:** (`Record<string, StepResult>`): Individual step results with their status and output
58
+ **options.onFinish.resourceId** (`string`): Optional resource identifier (if provided when creating the run)
59
59
 
60
- **tripwire?:** (`StepTripwireInfo`): Tripwire information (when status is 'tripwire')
60
+ **options.onFinish.getInitData** (`() => any`): Function that returns the initial input data passed to the workflow
61
61
 
62
- **runId:** (`string`): The unique identifier for this workflow run
62
+ **options.onFinish.mastra** (`Mastra`): The Mastra instance (if workflow is registered with Mastra)
63
63
 
64
- **workflowId:** (`string`): The workflow's identifier
64
+ **options.onFinish.requestContext** (`RequestContext`): Request-scoped context data
65
65
 
66
- **resourceId?:** (`string`): Optional resource identifier (if provided when creating the run)
66
+ **options.onFinish.logger** (`IMastraLogger`): The workflow's logger instance
67
67
 
68
- **getInitData:** (`() => any`): Function that returns the initial input data passed to the workflow
68
+ **options.onFinish.state** (`Record<string, any>`): The workflow's current state object
69
69
 
70
- **mastra?:** (`Mastra`): The Mastra instance (if workflow is registered with Mastra)
70
+ **options.onError** (`(errorInfo: WorkflowErrorCallbackInfo) => void | Promise<void>`): Callback invoked only when workflow fails (failed or tripwire status). Receives error details and step results. Errors thrown in this callback are caught and logged, not propagated.
71
71
 
72
- **requestContext:** (`RequestContext`): Request-scoped context data
72
+ **options.onError.status** (`'failed' | 'tripwire'`): The workflow status (either 'failed' or 'tripwire')
73
73
 
74
- **logger:** (`IMastraLogger`): The workflow's logger instance
74
+ **options.onError.error** (`SerializedError`): Error details
75
75
 
76
- **state:** (`Record<string, any>`): The workflow's current state object
76
+ **options.onError.steps** (`Record<string, StepResult>`): Individual step results with their status and output
77
77
 
78
- ### WorkflowErrorCallbackInfo
78
+ **options.onError.tripwire** (`StepTripwireInfo`): Tripwire information (when status is 'tripwire')
79
79
 
80
- The error info object passed to `onError` callbacks.
80
+ **options.onError.runId** (`string`): The unique identifier for this workflow run
81
81
 
82
- **status:** (`'failed' | 'tripwire'`): The workflow status (either 'failed' or 'tripwire')
82
+ **options.onError.workflowId** (`string`): The workflow's identifier
83
83
 
84
- **error?:** (`SerializedError`): Error details
84
+ **options.onError.resourceId** (`string`): Optional resource identifier (if provided when creating the run)
85
85
 
86
- **steps:** (`Record<string, StepResult>`): Individual step results with their status and output
86
+ **options.onError.getInitData** (`() => any`): Function that returns the initial input data passed to the workflow
87
87
 
88
- **tripwire?:** (`StepTripwireInfo`): Tripwire information (when status is 'tripwire')
88
+ **options.onError.mastra** (`Mastra`): The Mastra instance (if workflow is registered with Mastra)
89
89
 
90
- **runId:** (`string`): The unique identifier for this workflow run
90
+ **options.onError.requestContext** (`RequestContext`): Request-scoped context data
91
91
 
92
- **workflowId:** (`string`): The workflow's identifier
92
+ **options.onError.logger** (`IMastraLogger`): The workflow's logger instance
93
93
 
94
- **resourceId?:** (`string`): Optional resource identifier (if provided when creating the run)
95
-
96
- **getInitData:** (`() => any`): Function that returns the initial input data passed to the workflow
97
-
98
- **mastra?:** (`Mastra`): The Mastra instance (if workflow is registered with Mastra)
99
-
100
- **requestContext:** (`RequestContext`): Request-scoped context data
101
-
102
- **logger:** (`IMastraLogger`): The workflow's logger instance
103
-
104
- **state:** (`Record<string, any>`): The workflow's current state object
94
+ **options.onError.state** (`Record<string, any>`): The workflow's current state object
105
95
 
106
96
  ## Running with initial state
107
97
 
@@ -125,13 +115,13 @@ The `initialState` object should match the structure defined in the workflow's `
125
115
 
126
116
  A workflow's `status` indicates its current execution state. The possible values are:
127
117
 
128
- **success:** (`string`): All steps finished executing successfully, with a valid result output
118
+ **success** (`string`): All steps finished executing successfully, with a valid result output
129
119
 
130
- **failed:** (`string`): Workflow encountered an error during execution, with error details available
120
+ **failed** (`string`): Workflow encountered an error during execution, with error details available
131
121
 
132
- **suspended:** (`string`): Workflow execution is paused waiting for resume, with suspended step information
122
+ **suspended** (`string`): Workflow execution is paused waiting for resume, with suspended step information
133
123
 
134
- **tripwire:** (`string`): Workflow was terminated by a processor tripwire. This occurs when an agent step within the workflow triggers a tripwire (e.g., content was blocked by a guardrail). The tripwire information is available on the result.
124
+ **tripwire** (`string`): Workflow was terminated by a processor tripwire. This occurs when an agent step within the workflow triggers a tripwire (e.g., content was blocked by a guardrail). The tripwire information is available on the result.
135
125
 
136
126
  ### Handling tripwire status
137
127
 
@@ -242,59 +242,59 @@ const workspace = new Workspace({
242
242
 
243
243
  ## Constructor parameters
244
244
 
245
- **id?:** (`string`): Unique identifier for this sandbox instance. (Default: `Auto-generated`)
245
+ **id** (`string`): Unique identifier for this sandbox instance. (Default: `Auto-generated`)
246
246
 
247
- **apiKey?:** (`string`): Daytona API key for authentication. Falls back to DAYTONA\_API\_KEY environment variable.
247
+ **apiKey** (`string`): Daytona API key for authentication. Falls back to DAYTONA\_API\_KEY environment variable.
248
248
 
249
- **apiUrl?:** (`string`): Daytona API endpoint. Falls back to DAYTONA\_API\_URL environment variable.
249
+ **apiUrl** (`string`): Daytona API endpoint. Falls back to DAYTONA\_API\_URL environment variable.
250
250
 
251
- **target?:** (`string`): Runner region. Falls back to DAYTONA\_TARGET environment variable.
251
+ **target** (`string`): Runner region. Falls back to DAYTONA\_TARGET environment variable.
252
252
 
253
- **timeout?:** (`number`): Default execution timeout in milliseconds. (Default: `300000 (5 minutes)`)
253
+ **timeout** (`number`): Default execution timeout in milliseconds. (Default: `300000 (5 minutes)`)
254
254
 
255
- **language?:** (`'typescript' | 'javascript' | 'python'`): Runtime language for the sandbox. (Default: `'typescript'`)
255
+ **language** (`'typescript' | 'javascript' | 'python'`): Runtime language for the sandbox. (Default: `'typescript'`)
256
256
 
257
- **snapshot?:** (`string`): Pre-built snapshot ID to create the sandbox from. Takes precedence over image.
257
+ **snapshot** (`string`): Pre-built snapshot ID to create the sandbox from. Takes precedence over image.
258
258
 
259
- **image?:** (`string`): Docker image for sandbox creation. Triggers image-based creation when set. Can be combined with resources. Ignored when snapshot is set.
259
+ **image** (`string`): Docker image for sandbox creation. Triggers image-based creation when set. Can be combined with resources. Ignored when snapshot is set.
260
260
 
261
- **resources?:** (`{ cpu?: number; memory?: number; disk?: number }`): Resource allocation for the sandbox (CPU cores, memory in GiB, disk in GiB). Only used when image is set.
261
+ **resources** (`{ cpu?: number; memory?: number; disk?: number }`): Resource allocation for the sandbox (CPU cores, memory in GiB, disk in GiB). Only used when image is set.
262
262
 
263
- **env?:** (`Record<string, string>`): Environment variables to set in the sandbox. (Default: `{}`)
263
+ **env** (`Record<string, string>`): Environment variables to set in the sandbox. (Default: `{}`)
264
264
 
265
- **labels?:** (`Record<string, string>`): Custom metadata labels. (Default: `{}`)
265
+ **labels** (`Record<string, string>`): Custom metadata labels. (Default: `{}`)
266
266
 
267
- **name?:** (`string`): Sandbox display name. (Default: `Sandbox id`)
267
+ **name** (`string`): Sandbox display name. (Default: `Sandbox id`)
268
268
 
269
- **user?:** (`string`): OS user to run commands as. (Default: `'daytona'`)
269
+ **user** (`string`): OS user to run commands as. (Default: `'daytona'`)
270
270
 
271
- **public?:** (`boolean`): Make port previews public. (Default: `false`)
271
+ **public** (`boolean`): Make port previews public. (Default: `false`)
272
272
 
273
- **ephemeral?:** (`boolean`): Delete sandbox immediately on stop. (Default: `false`)
273
+ **ephemeral** (`boolean`): Delete sandbox immediately on stop. (Default: `false`)
274
274
 
275
- **autoStopInterval?:** (`number`): Auto-stop interval in minutes. Set to 0 to disable. (Default: `15`)
275
+ **autoStopInterval** (`number`): Auto-stop interval in minutes. Set to 0 to disable. (Default: `15`)
276
276
 
277
- **autoArchiveInterval?:** (`number`): Auto-archive interval in minutes. Set to 0 for the maximum interval (7 days). (Default: `7 days`)
277
+ **autoArchiveInterval** (`number`): Auto-archive interval in minutes. Set to 0 for the maximum interval (7 days). (Default: `7 days`)
278
278
 
279
- **autoDeleteInterval?:** (`number`): Auto-delete interval in minutes. Negative values disable auto-delete. Set to 0 to delete on stop. (Default: `disabled`)
279
+ **autoDeleteInterval** (`number`): Auto-delete interval in minutes. Negative values disable auto-delete. Set to 0 to delete on stop. (Default: `disabled`)
280
280
 
281
- **volumes?:** (`Array<{ volumeId: string; mountPath: string }>`): Daytona volumes to attach at sandbox creation time.
281
+ **volumes** (`Array<{ volumeId: string; mountPath: string }>`): Daytona volumes to attach at sandbox creation time.
282
282
 
283
- **networkBlockAll?:** (`boolean`): Block all outbound network access from the sandbox. (Default: `false`)
283
+ **networkBlockAll** (`boolean`): Block all outbound network access from the sandbox. (Default: `false`)
284
284
 
285
- **networkAllowList?:** (`string`): Comma-separated list of allowed CIDR addresses when network access is restricted.
285
+ **networkAllowList** (`string`): Comma-separated list of allowed CIDR addresses when network access is restricted.
286
286
 
287
287
  ## Properties
288
288
 
289
- **id:** (`string`): Sandbox instance identifier.
289
+ **id** (`string`): Sandbox instance identifier.
290
290
 
291
- **name:** (`string`): Provider name ('DaytonaSandbox').
291
+ **name** (`string`): Provider name ('DaytonaSandbox').
292
292
 
293
- **provider:** (`string`): Provider identifier ('daytona').
293
+ **provider** (`string`): Provider identifier ('daytona').
294
294
 
295
- **status:** (`ProviderStatus`): 'pending' | 'initializing' | 'ready' | 'stopped' | 'destroyed' | 'error'
295
+ **status** (`ProviderStatus`): 'pending' | 'initializing' | 'ready' | 'stopped' | 'destroyed' | 'error'
296
296
 
297
- **instance:** (`Sandbox`): The underlying Daytona Sandbox instance. Throws SandboxNotReadyError if the sandbox has not been started.
297
+ **instance** (`Sandbox`): The underlying Daytona Sandbox instance. Throws SandboxNotReadyError if the sandbox has not been started.
298
298
 
299
299
  ## Methods
300
300
 
@@ -344,19 +344,19 @@ await sandbox.executeCommand('bash', ['-c', 'for i in 1 2 3; do echo "line $i";
344
344
 
345
345
  **Parameters:**
346
346
 
347
- **command:** (`string`): Command to execute.
347
+ **command** (`string`): Command to execute.
348
348
 
349
- **args?:** (`string[]`): Command arguments.
349
+ **args** (`string[]`): Command arguments.
350
350
 
351
- **options.timeout?:** (`number`): Execution timeout in milliseconds. Overrides the instance default.
351
+ **options.timeout** (`number`): Execution timeout in milliseconds. Overrides the instance default.
352
352
 
353
- **options.cwd?:** (`string`): Working directory for the command.
353
+ **options.cwd** (`string`): Working directory for the command.
354
354
 
355
- **options.env?:** (`Record<string, string>`): Additional environment variables for this command. Merged with instance-level env.
355
+ **options.env** (`Record<string, string>`): Additional environment variables for this command. Merged with instance-level env.
356
356
 
357
- **options.onStdout?:** (`(data: string) => void`): Callback for stdout streaming.
357
+ **options.onStdout** (`(data: string) => void`): Callback for stdout streaming.
358
358
 
359
- **options.onStderr?:** (`(data: string) => void`): Callback for stderr streaming.
359
+ **options.onStderr** (`(data: string) => void`): Callback for stderr streaming.
360
360
 
361
361
  ### `mount(filesystem, mountPath)`
362
362
 
@@ -35,33 +35,33 @@ const agent = new Agent({
35
35
 
36
36
  ## Constructor parameters
37
37
 
38
- **apiKey?:** (`string`): E2B API key. Falls back to E2B\_API\_KEY environment variable.
38
+ **apiKey** (`string`): E2B API key. Falls back to E2B\_API\_KEY environment variable.
39
39
 
40
- **timeout?:** (`number`): Execution timeout in milliseconds (Default: `300000 (5 minutes)`)
40
+ **timeout** (`number`): Execution timeout in milliseconds (Default: `300000 (5 minutes)`)
41
41
 
42
- **template?:** (`string | TemplateBuilder | function`): Sandbox template specification. Can be a template ID string, a TemplateBuilder, or a function that customizes the default template.
42
+ **template** (`string | TemplateBuilder | function`): Sandbox template specification. Can be a template ID string, a TemplateBuilder, or a function that customizes the default template.
43
43
 
44
- **env?:** (`Record<string, string>`): Environment variables to set in the sandbox
44
+ **env** (`Record<string, string>`): Environment variables to set in the sandbox
45
45
 
46
- **id?:** (`string`): Unique identifier for this sandbox instance (Default: `Auto-generated`)
46
+ **id** (`string`): Unique identifier for this sandbox instance (Default: `Auto-generated`)
47
47
 
48
- **domain?:** (`string`): Domain for self-hosted E2B. Falls back to E2B\_DOMAIN env var.
48
+ **domain** (`string`): Domain for self-hosted E2B. Falls back to E2B\_DOMAIN env var.
49
49
 
50
- **apiUrl?:** (`string`): API URL for self-hosted E2B. Falls back to E2B\_API\_URL env var.
50
+ **apiUrl** (`string`): API URL for self-hosted E2B. Falls back to E2B\_API\_URL env var.
51
51
 
52
- **accessToken?:** (`string`): Access token for authentication. Falls back to E2B\_ACCESS\_TOKEN env var.
52
+ **accessToken** (`string`): Access token for authentication. Falls back to E2B\_ACCESS\_TOKEN env var.
53
53
 
54
54
  ## Properties
55
55
 
56
- **id:** (`string`): Sandbox instance identifier
56
+ **id** (`string`): Sandbox instance identifier
57
57
 
58
- **name:** (`string`): Provider name ('E2BSandbox')
58
+ **name** (`string`): Provider name ('E2BSandbox')
59
59
 
60
- **provider:** (`string`): Provider identifier ('e2b')
60
+ **provider** (`string`): Provider identifier ('e2b')
61
61
 
62
- **status:** (`ProviderStatus`): 'pending' | 'initializing' | 'ready' | 'error'
62
+ **status** (`ProviderStatus`): 'pending' | 'initializing' | 'ready' | 'error'
63
63
 
64
- **supportsMounting:** (`boolean`): Always true - E2B sandboxes support mounting cloud filesystems
64
+ **supportsMounting** (`boolean`): Always true - E2B sandboxes support mounting cloud filesystems
65
65
 
66
66
  ## Methods
67
67
 
@@ -105,19 +105,19 @@ const npmResult = await sandbox.executeCommand('npm', ['install', 'lodash'], {
105
105
 
106
106
  **Parameters:**
107
107
 
108
- **command:** (`string`): Command to execute
108
+ **command** (`string`): Command to execute
109
109
 
110
- **args?:** (`string[]`): Command arguments
110
+ **args** (`string[]`): Command arguments
111
111
 
112
- **options.timeout?:** (`number`): Execution timeout in milliseconds
112
+ **options.timeout** (`number`): Execution timeout in milliseconds
113
113
 
114
- **options.cwd?:** (`string`): Working directory for the command
114
+ **options.cwd** (`string`): Working directory for the command
115
115
 
116
- **options.env?:** (`Record<string, string>`): Additional environment variables
116
+ **options.env** (`Record<string, string>`): Additional environment variables
117
117
 
118
- **options.onStdout?:** (`(data: string) => void`): Callback for stdout streaming
118
+ **options.onStdout** (`(data: string) => void`): Callback for stdout streaming
119
119
 
120
- **options.onStderr?:** (`(data: string) => void`): Callback for stderr streaming
120
+ **options.onStderr** (`(data: string) => void`): Callback for stderr streaming
121
121
 
122
122
  ### `canMount(filesystem)`
123
123
 
@@ -17,9 +17,9 @@ const buffer = await filesystem.readFile('/image.png', { encoding: 'binary' })
17
17
 
18
18
  **Parameters:**
19
19
 
20
- **path:** (`string`): File path relative to basePath
20
+ **path** (`string`): File path relative to basePath
21
21
 
22
- **options.encoding?:** (`'utf-8' | 'binary'`): Text or binary encoding (Default: `'utf-8'`)
22
+ **options.encoding** (`'utf-8' | 'binary'`): Text or binary encoding (Default: `'utf-8'`)
23
23
 
24
24
  **Returns:** `Promise<string | Buffer>`
25
25
 
@@ -34,13 +34,13 @@ await filesystem.writeFile('/nested/path/file.md', content, { recursive: true })
34
34
 
35
35
  **Parameters:**
36
36
 
37
- **path:** (`string`): File path relative to basePath
37
+ **path** (`string`): File path relative to basePath
38
38
 
39
- **content:** (`string | Buffer`): File content
39
+ **content** (`string | Buffer`): File content
40
40
 
41
- **options.recursive?:** (`boolean`): Create parent directories if they don't exist (Default: `false`)
41
+ **options.recursive** (`boolean`): Create parent directories if they don't exist (Default: `false`)
42
42
 
43
- **options.overwrite?:** (`boolean`): Overwrite existing file (Default: `true`)
43
+ **options.overwrite** (`boolean`): Overwrite existing file (Default: `true`)
44
44
 
45
45
  ### `deleteFile(path, options?)`
46
46
 
@@ -53,9 +53,9 @@ await filesystem.deleteFile('/docs/maybe.md', { force: true }) // Don't throw if
53
53
 
54
54
  **Parameters:**
55
55
 
56
- **path:** (`string`): File path
56
+ **path** (`string`): File path
57
57
 
58
- **options.force?:** (`boolean`): Don't throw error if file doesn't exist (Default: `false`)
58
+ **options.force** (`boolean`): Don't throw error if file doesn't exist (Default: `false`)
59
59
 
60
60
  ### `appendFile(path, content)`
61
61
 
@@ -67,9 +67,9 @@ await filesystem.appendFile('/logs/app.log', 'New log entry\n')
67
67
 
68
68
  **Parameters:**
69
69
 
70
- **path:** (`string`): File path
70
+ **path** (`string`): File path
71
71
 
72
- **content:** (`string | Buffer`): Content to append
72
+ **content** (`string | Buffer`): Content to append
73
73
 
74
74
  ### `copyFile(src, dest, options?)`
75
75
 
@@ -81,11 +81,11 @@ await filesystem.copyFile('/docs/template.md', '/docs/new-doc.md')
81
81
 
82
82
  **Parameters:**
83
83
 
84
- **src:** (`string`): Source file path
84
+ **src** (`string`): Source file path
85
85
 
86
- **dest:** (`string`): Destination file path
86
+ **dest** (`string`): Destination file path
87
87
 
88
- **options.overwrite?:** (`boolean`): Overwrite destination if it exists (Default: `true`)
88
+ **options.overwrite** (`boolean`): Overwrite destination if it exists (Default: `true`)
89
89
 
90
90
  ### `moveFile(src, dest, options?)`
91
91
 
@@ -97,11 +97,11 @@ await filesystem.moveFile('/docs/draft.md', '/docs/final.md')
97
97
 
98
98
  **Parameters:**
99
99
 
100
- **src:** (`string`): Source file path
100
+ **src** (`string`): Source file path
101
101
 
102
- **dest:** (`string`): Destination file path
102
+ **dest** (`string`): Destination file path
103
103
 
104
- **options.overwrite?:** (`boolean`): Overwrite destination if it exists (Default: `true`)
104
+ **options.overwrite** (`boolean`): Overwrite destination if it exists (Default: `true`)
105
105
 
106
106
  ### `readdir(path, options?)`
107
107
 
@@ -135,9 +135,9 @@ await filesystem.mkdir('/deeply/nested/path', { recursive: true })
135
135
 
136
136
  **Parameters:**
137
137
 
138
- **path:** (`string`): Directory path
138
+ **path** (`string`): Directory path
139
139
 
140
- **options.recursive?:** (`boolean`): Create parent directories (Default: `false`)
140
+ **options.recursive** (`boolean`): Create parent directories (Default: `false`)
141
141
 
142
142
  ### `rmdir(path, options?)`
143
143
 
@@ -150,11 +150,11 @@ await filesystem.rmdir('/docs/nested', { recursive: true })
150
150
 
151
151
  **Parameters:**
152
152
 
153
- **path:** (`string`): Directory path
153
+ **path** (`string`): Directory path
154
154
 
155
- **options.recursive?:** (`boolean`): Remove contents recursively (Default: `false`)
155
+ **options.recursive** (`boolean`): Remove contents recursively (Default: `false`)
156
156
 
157
- **options.force?:** (`boolean`): Don't throw if directory doesn't exist (Default: `false`)
157
+ **options.force** (`boolean`): Don't throw if directory doesn't exist (Default: `false`)
158
158
 
159
159
  ### `exists(path)`
160
160
 
@@ -245,7 +245,7 @@ const instructions = filesystem.getInstructions?.()
245
245
 
246
246
  **Parameters:**
247
247
 
248
- **opts.requestContext?:** (`RequestContext`): Forwarded to the \`instructions\` function if one was provided in the constructor.
248
+ **opts.requestContext** (`RequestContext`): Forwarded to the \`instructions\` function if one was provided in the constructor.
249
249
 
250
250
  **Returns:** `string`
251
251