@mastra/mcp-docs-server 1.1.7-alpha.0 → 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 +16 -0
  275. package/package.json +6 -6
  276. package/.docs/docs/getting-started/start.md +0 -28
@@ -41,35 +41,35 @@ const storage = new PostgresStore({
41
41
 
42
42
  ## Parameters
43
43
 
44
- **id:** (`string`): Unique identifier for this storage instance.
44
+ **id** (`string`): Unique identifier for this storage instance.
45
45
 
46
- **connectionString?:** (`string`): PostgreSQL connection string (e.g., postgresql://user:pass\@host:5432/dbname). Required unless using \`pool\` or individual host-based parameters (\`host\`, \`port\`, \`database\`, \`user\`, \`password\`).
46
+ **connectionString** (`string`): PostgreSQL connection string (e.g., postgresql://user:pass\@host:5432/dbname). Required unless using \`pool\` or individual host-based parameters (\`host\`, \`port\`, \`database\`, \`user\`, \`password\`).
47
47
 
48
- **host?:** (`string`): Database server hostname or IP address. Used with other host-based parameters as an alternative to connectionString.
48
+ **host** (`string`): Database server hostname or IP address. Used with other host-based parameters as an alternative to connectionString.
49
49
 
50
- **port?:** (`number`): Database server port number. Defaults to 5432 if not specified.
50
+ **port** (`number`): Database server port number. Defaults to 5432 if not specified.
51
51
 
52
- **database?:** (`string`): Name of the database to connect to.
52
+ **database** (`string`): Name of the database to connect to.
53
53
 
54
- **user?:** (`string`): Database user for authentication.
54
+ **user** (`string`): Database user for authentication.
55
55
 
56
- **password?:** (`string`): Password for the database user.
56
+ **password** (`string`): Password for the database user.
57
57
 
58
- **pool?:** (`pg.Pool`): Pre-configured pg.Pool instance. Use this to reuse an existing connection pool. When provided, Mastra will not create its own pool and will not close it when \`store.close()\` is called.
58
+ **pool** (`pg.Pool`): Pre-configured pg.Pool instance. Use this to reuse an existing connection pool. When provided, Mastra will not create its own pool and will not close it when \`store.close()\` is called.
59
59
 
60
- **schemaName?:** (`string`): The name of the schema you want the storage to use. Defaults to 'public'.
60
+ **schemaName** (`string`): The name of the schema you want the storage to use. Defaults to 'public'.
61
61
 
62
- **ssl?:** (`boolean | ConnectionOptions`): SSL configuration for the connection; set to true to use default SSL or provide a ConnectionOptions object for custom SSL settings.
62
+ **ssl** (`boolean | ConnectionOptions`): SSL configuration for the connection; set to true to use default SSL or provide a ConnectionOptions object for custom SSL settings.
63
63
 
64
- **max?:** (`number`): Maximum number of connections in the pool. Defaults to 20.
64
+ **max** (`number`): Maximum number of connections in the pool. Defaults to 20.
65
65
 
66
- **idleTimeoutMillis?:** (`number`): How long a connection can sit idle before being closed. Defaults to 30000 (30 seconds).
66
+ **idleTimeoutMillis** (`number`): How long a connection can sit idle before being closed. Defaults to 30000 (30 seconds).
67
67
 
68
- **disableInit?:** (`boolean`): When true, automatic table creation/migrations are disabled. Useful for CI/CD pipelines where migrations are run separately.
68
+ **disableInit** (`boolean`): When true, automatic table creation/migrations are disabled. Useful for CI/CD pipelines where migrations are run separately.
69
69
 
70
- **skipDefaultIndexes?:** (`boolean`): When true, default indexes will not be created during initialization.
70
+ **skipDefaultIndexes** (`boolean`): When true, default indexes will not be created during initialization.
71
71
 
72
- **indexes?:** (`CreateIndexOptions[]`): Custom indexes to create during initialization.
72
+ **indexes** (`CreateIndexOptions[]`): Custom indexes to create during initialization.
73
73
 
74
74
  ## Constructor Examples
75
75
 
@@ -448,25 +448,25 @@ For advanced index types, you can specify additional options:
448
448
 
449
449
  ### Index Options
450
450
 
451
- **name:** (`string`): Unique name for the index
451
+ **name** (`string`): Unique name for the index
452
452
 
453
- **table:** (`string`): Table name (e.g., 'mastra\_threads')
453
+ **table** (`string`): Table name (e.g., 'mastra\_threads')
454
454
 
455
- **columns:** (`string[]`): Array of column names with optional sort order (e.g., \['id', 'createdAt DESC'])
455
+ **columns** (`string[]`): Array of column names with optional sort order (e.g., \['id', 'createdAt DESC'])
456
456
 
457
- **unique?:** (`boolean`): Creates a unique constraint index
457
+ **unique** (`boolean`): Creates a unique constraint index
458
458
 
459
- **concurrent?:** (`boolean`): Creates index without locking table (default: true)
459
+ **concurrent** (`boolean`): Creates index without locking table (default: true)
460
460
 
461
- **where?:** (`string`): Partial index condition (PostgreSQL specific)
461
+ **where** (`string`): Partial index condition (PostgreSQL specific)
462
462
 
463
- **method?:** (`'btree' | 'hash' | 'gin' | 'gist' | 'spgist' | 'brin'`): Index method (default: 'btree')
463
+ **method** (`'btree' | 'hash' | 'gin' | 'gist' | 'spgist' | 'brin'`): Index method (default: 'btree')
464
464
 
465
- **opclass?:** (`string`): Operator class for GIN/GIST indexes
465
+ **opclass** (`string`): Operator class for GIN/GIST indexes
466
466
 
467
- **storage?:** (`Record<string, any>`): Storage parameters (e.g., { fillfactor: 90 })
467
+ **storage** (`Record<string, any>`): Storage parameters (e.g., { fillfactor: 90 })
468
468
 
469
- **tablespace?:** (`string`): Tablespace name for index placement
469
+ **tablespace** (`string`): Tablespace name for index placement
470
470
 
471
471
  ### Schema-Specific Indexes
472
472
 
@@ -46,11 +46,11 @@ const storage = new UpstashStore({
46
46
 
47
47
  ## Parameters
48
48
 
49
- **url:** (`string`): Upstash Redis URL
49
+ **url** (`string`): Upstash Redis URL
50
50
 
51
- **token:** (`string`): Upstash Redis authentication token
51
+ **token** (`string`): Upstash Redis authentication token
52
52
 
53
- **prefix?:** (`string`): Key prefix for all stored items (Default: `mastra:`)
53
+ **prefix** (`string`): Key prefix for all stored items (Default: `mastra:`)
54
54
 
55
55
  ## Additional Notes
56
56
 
@@ -6,11 +6,19 @@ The `ChunkType` type defines the mastra format of stream chunks that can be emit
6
6
 
7
7
  All chunks include these base properties:
8
8
 
9
- **type:** (`string`): The specific chunk type identifier
9
+ **type** (`string`): The specific chunk type identifier
10
10
 
11
- **runId:** (`string`): Unique identifier for this execution run
11
+ **runId** (`string`): Unique identifier for this execution run
12
12
 
13
- **from:** (`ChunkFrom`): enumAGENT:'AGENT'Chunk from agent executionUSER:'USER'Chunk from user inputSYSTEM:'SYSTEM'Chunk from system processesWORKFLOW:'WORKFLOW'Chunk from workflow execution
13
+ **from** (`ChunkFrom`): Source of the chunk
14
+
15
+ **from.AGENT** (`'AGENT'`): Chunk from agent execution
16
+
17
+ **from.USER** (`'USER'`): Chunk from user input
18
+
19
+ **from.SYSTEM** (`'SYSTEM'`): Chunk from system processes
20
+
21
+ **from.WORKFLOW** (`'WORKFLOW'`): Chunk from workflow execution
14
22
 
15
23
  ## Text Chunks
16
24
 
@@ -18,25 +26,39 @@ All chunks include these base properties:
18
26
 
19
27
  Signals the beginning of text generation.
20
28
 
21
- **type:** (`"text-start"`): Chunk type identifier
29
+ **type** (`"text-start"`): Chunk type identifier
30
+
31
+ **payload** (`TextStartPayload`): Text start information
32
+
33
+ **payload.id** (`string`): Unique identifier for this text generation
22
34
 
23
- **payload:** (`TextStartPayload`): TextStartPayloadid:stringUnique identifier for this text generationproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
35
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
24
36
 
25
37
  ### text-delta
26
38
 
27
39
  Incremental text content during generation.
28
40
 
29
- **type:** (`"text-delta"`): Chunk type identifier
41
+ **type** (`"text-delta"`): Chunk type identifier
30
42
 
31
- **payload:** (`TextDeltaPayload`): TextDeltaPayloadid:stringUnique identifier for this text generationtext:stringThe incremental text contentproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
43
+ **payload** (`TextDeltaPayload`): Incremental text content
44
+
45
+ **payload.id** (`string`): Unique identifier for this text generation
46
+
47
+ **payload.text** (`string`): The incremental text content
48
+
49
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
32
50
 
33
51
  ### text-end
34
52
 
35
53
  Signals the end of text generation.
36
54
 
37
- **type:** (`"text-end"`): Chunk type identifier
55
+ **type** (`"text-end"`): Chunk type identifier
38
56
 
39
- **payload:** (`TextEndPayload`): TextEndPayloadid:stringUnique identifier for this text generationproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
57
+ **payload** (`TextEndPayload`): Text end information
58
+
59
+ **payload.id** (`string`): Unique identifier for this text generation
60
+
61
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
40
62
 
41
63
  ## Reasoning Chunks
42
64
 
@@ -44,33 +66,57 @@ Signals the end of text generation.
44
66
 
45
67
  Signals the beginning of reasoning generation (for models that support reasoning).
46
68
 
47
- **type:** (`"reasoning-start"`): Chunk type identifier
69
+ **type** (`"reasoning-start"`): Chunk type identifier
70
+
71
+ **payload** (`ReasoningStartPayload`): Reasoning start information
48
72
 
49
- **payload:** (`ReasoningStartPayload`): ReasoningStartPayloadid:stringUnique identifier for this reasoning generationsignature?:stringReasoning signature if availableproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
73
+ **payload.id** (`string`): Unique identifier for this reasoning generation
74
+
75
+ **payload.signature** (`string`): Reasoning signature if available
76
+
77
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
50
78
 
51
79
  ### reasoning-delta
52
80
 
53
81
  Incremental reasoning text during generation.
54
82
 
55
- **type:** (`"reasoning-delta"`): Chunk type identifier
83
+ **type** (`"reasoning-delta"`): Chunk type identifier
84
+
85
+ **payload** (`ReasoningDeltaPayload`): Incremental reasoning content
56
86
 
57
- **payload:** (`ReasoningDeltaPayload`): ReasoningDeltaPayloadid:stringUnique identifier for this reasoning generationtext:stringThe incremental reasoning textproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
87
+ **payload.id** (`string`): Unique identifier for this reasoning generation
88
+
89
+ **payload.text** (`string`): The incremental reasoning text
90
+
91
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
58
92
 
59
93
  ### reasoning-end
60
94
 
61
95
  Signals the end of reasoning generation.
62
96
 
63
- **type:** (`"reasoning-end"`): Chunk type identifier
97
+ **type** (`"reasoning-end"`): Chunk type identifier
98
+
99
+ **payload** (`ReasoningEndPayload`): Reasoning end information
64
100
 
65
- **payload:** (`ReasoningEndPayload`): ReasoningEndPayloadid:stringUnique identifier for this reasoning generationsignature?:stringFinal reasoning signature if availableproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
101
+ **payload.id** (`string`): Unique identifier for this reasoning generation
102
+
103
+ **payload.signature** (`string`): Final reasoning signature if available
104
+
105
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
66
106
 
67
107
  ### reasoning-signature
68
108
 
69
109
  Contains the reasoning signature from models that support advanced reasoning (like OpenAI's o1 series). The signature represents metadata about the model's internal reasoning process, such as effort level or reasoning approach, but not the actual reasoning content itself.
70
110
 
71
- **type:** (`"reasoning-signature"`): Chunk type identifier
111
+ **type** (`"reasoning-signature"`): Chunk type identifier
112
+
113
+ **payload** (`ReasoningSignaturePayload`): Metadata about the model's reasoning process characteristics
72
114
 
73
- **payload:** (`ReasoningSignaturePayload`): ReasoningSignaturePayloadid:stringUnique identifier for the reasoning sessionsignature:stringSignature describing the reasoning approach or effort level (e.g., reasoning effort settings)providerMetadata?:SharedV2ProviderMetadataProvider-specific metadata
115
+ **payload.id** (`string`): Unique identifier for the reasoning session
116
+
117
+ **payload.signature** (`string`): Signature describing the reasoning approach or effort level (e.g., reasoning effort settings)
118
+
119
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
74
120
 
75
121
  ## Tool Chunks
76
122
 
@@ -78,49 +124,111 @@ Contains the reasoning signature from models that support advanced reasoning (li
78
124
 
79
125
  A tool is being called.
80
126
 
81
- **type:** (`"tool-call"`): Chunk type identifier
127
+ **type** (`"tool-call"`): Chunk type identifier
128
+
129
+ **payload** (`ToolCallPayload`): Tool call information
82
130
 
83
- **payload:** (`ToolCallPayload`): ToolCallPayloadtoolCallId:stringUnique identifier for this tool calltoolName:stringName of the tool being calledargs?:Record\<string, any>Arguments passed to the toolproviderExecuted?:booleanWhether the provider executed the tooloutput?:anyTool output if availableproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
131
+ **payload.toolCallId** (`string`): Unique identifier for this tool call
132
+
133
+ **payload.toolName** (`string`): Name of the tool being called
134
+
135
+ **payload.args** (`Record<string, any>`): Arguments passed to the tool
136
+
137
+ **payload.providerExecuted** (`boolean`): Whether the provider executed the tool
138
+
139
+ **payload.output** (`any`): Tool output if available
140
+
141
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
84
142
 
85
143
  ### tool-result
86
144
 
87
145
  Result from a tool execution.
88
146
 
89
- **type:** (`"tool-result"`): Chunk type identifier
147
+ **type** (`"tool-result"`): Chunk type identifier
148
+
149
+ **payload** (`ToolResultPayload`): Tool execution result
150
+
151
+ **payload.toolCallId** (`string`): Unique identifier for the tool call
152
+
153
+ **payload.toolName** (`string`): Name of the executed tool
154
+
155
+ **payload.result** (`any`): The result of the tool execution
156
+
157
+ **payload.isError** (`boolean`): Whether the result is an error
158
+
159
+ **payload.providerExecuted** (`boolean`): Whether the provider executed the tool
160
+
161
+ **payload.args** (`Record<string, any>`): Arguments that were passed to the tool
90
162
 
91
- **payload:** (`ToolResultPayload`): ToolResultPayloadtoolCallId:stringUnique identifier for the tool calltoolName:stringName of the executed toolresult:anyThe result of the tool executionisError?:booleanWhether the result is an errorproviderExecuted?:booleanWhether the provider executed the toolargs?:Record\<string, any>Arguments that were passed to the toolproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
163
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
92
164
 
93
165
  ### tool-call-input-streaming-start
94
166
 
95
167
  Signals the start of streaming tool call arguments.
96
168
 
97
- **type:** (`"tool-call-input-streaming-start"`): Chunk type identifier
169
+ **type** (`"tool-call-input-streaming-start"`): Chunk type identifier
98
170
 
99
- **payload:** (`ToolCallInputStreamingStartPayload`): ToolCallInputStreamingStartPayloadtoolCallId:stringUnique identifier for this tool calltoolName:stringName of the tool being calledproviderExecuted?:booleanWhether the provider executed the tooldynamic?:booleanWhether the tool call is dynamicproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
171
+ **payload** (`ToolCallInputStreamingStartPayload`): Tool call input streaming start information
172
+
173
+ **payload.toolCallId** (`string`): Unique identifier for this tool call
174
+
175
+ **payload.toolName** (`string`): Name of the tool being called
176
+
177
+ **payload.providerExecuted** (`boolean`): Whether the provider executed the tool
178
+
179
+ **payload.dynamic** (`boolean`): Whether the tool call is dynamic
180
+
181
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
100
182
 
101
183
  ### tool-call-delta
102
184
 
103
185
  Incremental tool call arguments during streaming.
104
186
 
105
- **type:** (`"tool-call-delta"`): Chunk type identifier
187
+ **type** (`"tool-call-delta"`): Chunk type identifier
188
+
189
+ **payload** (`ToolCallDeltaPayload`): Incremental tool call arguments
106
190
 
107
- **payload:** (`ToolCallDeltaPayload`): ToolCallDeltaPayloadargsTextDelta:stringIncremental text delta for tool argumentstoolCallId:stringUnique identifier for this tool calltoolName?:stringName of the tool being calledproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
191
+ **payload.argsTextDelta** (`string`): Incremental text delta for tool arguments
192
+
193
+ **payload.toolCallId** (`string`): Unique identifier for this tool call
194
+
195
+ **payload.toolName** (`string`): Name of the tool being called
196
+
197
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
108
198
 
109
199
  ### tool-call-input-streaming-end
110
200
 
111
201
  Signals the end of streaming tool call arguments.
112
202
 
113
- **type:** (`"tool-call-input-streaming-end"`): Chunk type identifier
203
+ **type** (`"tool-call-input-streaming-end"`): Chunk type identifier
114
204
 
115
- **payload:** (`ToolCallInputStreamingEndPayload`): ToolCallInputStreamingEndPayloadtoolCallId:stringUnique identifier for this tool callproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
205
+ **payload** (`ToolCallInputStreamingEndPayload`): Tool call input streaming end information
206
+
207
+ **payload.toolCallId** (`string`): Unique identifier for this tool call
208
+
209
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
116
210
 
117
211
  ### tool-error
118
212
 
119
213
  An error occurred during tool execution.
120
214
 
121
- **type:** (`"tool-error"`): Chunk type identifier
215
+ **type** (`"tool-error"`): Chunk type identifier
216
+
217
+ **payload** (`ToolErrorPayload`): Tool error information
122
218
 
123
- **payload:** (`ToolErrorPayload`): ToolErrorPayloadid?:stringOptional identifiertoolCallId:stringUnique identifier for the tool calltoolName:stringName of the tool that failedargs?:Record\<string, any>Arguments that were passed to the toolerror:unknownThe error that occurredproviderExecuted?:booleanWhether the provider executed the toolproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
219
+ **payload.id** (`string`): Optional identifier
220
+
221
+ **payload.toolCallId** (`string`): Unique identifier for the tool call
222
+
223
+ **payload.toolName** (`string`): Name of the tool that failed
224
+
225
+ **payload.args** (`Record<string, any>`): Arguments that were passed to the tool
226
+
227
+ **payload.error** (`unknown`): The error that occurred
228
+
229
+ **payload.providerExecuted** (`boolean`): Whether the provider executed the tool
230
+
231
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
124
232
 
125
233
  ## Source and File Chunks
126
234
 
@@ -128,17 +236,39 @@ An error occurred during tool execution.
128
236
 
129
237
  Contains source information for content.
130
238
 
131
- **type:** (`"source"`): Chunk type identifier
239
+ **type** (`"source"`): Chunk type identifier
240
+
241
+ **payload** (`SourcePayload`): Source information
242
+
243
+ **payload.id** (`string`): Unique identifier
244
+
245
+ **payload.sourceType** (`'url' | 'document'`): Type of source
246
+
247
+ **payload.title** (`string`): Title of the source
248
+
249
+ **payload.mimeType** (`string`): MIME type of the source
250
+
251
+ **payload.filename** (`string`): Filename if applicable
132
252
 
133
- **payload:** (`SourcePayload`): SourcePayloadid:stringUnique identifiersourceType:'url' | 'document'Type of sourcetitle:stringTitle of the sourcemimeType?:stringMIME type of the sourcefilename?:stringFilename if applicableurl?:stringURL if applicableproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
253
+ **payload.url** (`string`): URL if applicable
254
+
255
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
134
256
 
135
257
  ### file
136
258
 
137
259
  Contains file data.
138
260
 
139
- **type:** (`"file"`): Chunk type identifier
261
+ **type** (`"file"`): Chunk type identifier
262
+
263
+ **payload** (`FilePayload`): File data
264
+
265
+ **payload.data** (`string | Uint8Array`): The file data
140
266
 
141
- **payload:** (`FilePayload`): FilePayloaddata:string | Uint8ArrayThe file database64?:stringBase64 encoded data if applicablemimeType:stringMIME type of the fileproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
267
+ **payload.base64** (`string`): Base64 encoded data if applicable
268
+
269
+ **payload.mimeType** (`string`): MIME type of the file
270
+
271
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
142
272
 
143
273
  ## Control Chunks
144
274
 
@@ -146,57 +276,97 @@ Contains file data.
146
276
 
147
277
  Signals the start of streaming.
148
278
 
149
- **type:** (`"start"`): Chunk type identifier
279
+ **type** (`"start"`): Chunk type identifier
280
+
281
+ **payload** (`StartPayload`): Start information
150
282
 
151
- **payload:** (`StartPayload`): StartPayload\[key: string]:anyAdditional start data
283
+ **payload.\[key: string]** (`any`): Additional start data
152
284
 
153
285
  ### step-start
154
286
 
155
287
  Signals the start of a processing step.
156
288
 
157
- **type:** (`"step-start"`): Chunk type identifier
289
+ **type** (`"step-start"`): Chunk type identifier
158
290
 
159
- **payload:** (`StepStartPayload`): StepStartPayloadmessageId?:stringOptional message identifierrequest:objectRequest information including body and other datawarnings?:LanguageModelV2CallWarning\[]Any warnings from the language model call
291
+ **payload** (`StepStartPayload`): Step start information
292
+
293
+ **payload.messageId** (`string`): Optional message identifier
294
+
295
+ **payload.request** (`object`): Request information including body and other data
296
+
297
+ **payload.warnings** (`LanguageModelV2CallWarning[]`): Any warnings from the language model call
160
298
 
161
299
  ### step-finish
162
300
 
163
301
  Signals the completion of a processing step.
164
302
 
165
- **type:** (`"step-finish"`): Chunk type identifier
303
+ **type** (`"step-finish"`): Chunk type identifier
304
+
305
+ **payload** (`StepFinishPayload`): Step completion information
306
+
307
+ **payload.id** (`string`): Optional identifier
308
+
309
+ **payload.messageId** (`string`): Optional message identifier
166
310
 
167
- **payload:** (`StepFinishPayload`): StepFinishPayloadid?:stringOptional identifiermessageId?:stringOptional message identifierstepResult:objectStep execution result with reason, warnings, and continuation infooutput:objectOutput information including usage statisticsmetadata:objectExecution metadata including request and provider infototalUsage?:LanguageModelV2UsageTotal usage statisticsresponse?:LanguageModelV2ResponseMetadataResponse metadataproviderMetadata?:SharedV2ProviderMetadataProvider-specific metadata
311
+ **payload.stepResult** (`object`): Step execution result with reason, warnings, and continuation info
312
+
313
+ **payload.output** (`object`): Output information including usage statistics
314
+
315
+ **payload.metadata** (`object`): Execution metadata including request and provider info
316
+
317
+ **payload.totalUsage** (`LanguageModelV2Usage`): Total usage statistics
318
+
319
+ **payload.response** (`LanguageModelV2ResponseMetadata`): Response metadata
320
+
321
+ **payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
168
322
 
169
323
  ### raw
170
324
 
171
325
  Contains raw data from the provider.
172
326
 
173
- **type:** (`"raw"`): Chunk type identifier
327
+ **type** (`"raw"`): Chunk type identifier
328
+
329
+ **payload** (`RawPayload`): Raw provider data
174
330
 
175
- **payload:** (`RawPayload`): RawPayload\[key: string]:anyRaw data from the provider
331
+ **payload.\[key: string]** (`any`): Raw data from the provider
176
332
 
177
333
  ### finish
178
334
 
179
335
  Stream has completed successfully.
180
336
 
181
- **type:** (`"finish"`): Chunk type identifier
337
+ **type** (`"finish"`): Chunk type identifier
182
338
 
183
- **payload:** (`FinishPayload`): FinishPayloadstepResult:objectStep execution resultoutput:objectOutput information including usagemetadata:objectExecution metadatamessages:objectMessage historyresponse:objectResponse metadata and messages from the model provider
339
+ **payload** (`FinishPayload`): Completion information
340
+
341
+ **payload.stepResult** (`object`): Step execution result
342
+
343
+ **payload.output** (`object`): Output information including usage
344
+
345
+ **payload.metadata** (`object`): Execution metadata
346
+
347
+ **payload.messages** (`object`): Message history
348
+
349
+ **payload.response** (`object`): Response metadata and messages from the model provider
184
350
 
185
351
  ### error
186
352
 
187
353
  An error occurred during streaming.
188
354
 
189
- **type:** (`"error"`): Chunk type identifier
355
+ **type** (`"error"`): Chunk type identifier
356
+
357
+ **payload** (`ErrorPayload`): Error information
190
358
 
191
- **payload:** (`ErrorPayload`): ErrorPayloaderror:unknownThe error that occurred
359
+ **payload.error** (`unknown`): The error that occurred
192
360
 
193
361
  ### abort
194
362
 
195
363
  Stream was aborted.
196
364
 
197
- **type:** (`"abort"`): Chunk type identifier
365
+ **type** (`"abort"`): Chunk type identifier
198
366
 
199
- **payload:** (`AbortPayload`): AbortPayload\[key: string]:anyAdditional abort data
367
+ **payload** (`AbortPayload`): Abort information
368
+
369
+ **payload.\[key: string]** (`any`): Additional abort data
200
370
 
201
371
  ## Object and Output Chunks
202
372
 
@@ -204,25 +374,29 @@ Stream was aborted.
204
374
 
205
375
  Emitted when using output generation with defined schemas. Contains partial or complete structured data that conforms to the specified Zod or JSON schema. This chunk is typically skipped in some execution contexts and used for streaming structured object generation.
206
376
 
207
- **type:** (`"object"`): Chunk type identifier
377
+ **type** (`"object"`): Chunk type identifier
208
378
 
209
- **object:** (`Partial<OUTPUT>`): Partial or complete structured data matching the defined schema. The type is determined by the OUTPUT schema parameter.
379
+ **object** (`Partial<OUTPUT>`): Partial or complete structured data matching the defined schema. The type is determined by the OUTPUT schema parameter.
210
380
 
211
381
  ### tool-output
212
382
 
213
383
  Contains output from agent or workflow execution, particularly used for tracking usage statistics and completion events. Often wraps other chunk types (like finish chunks) to provide nested execution context.
214
384
 
215
- **type:** (`"tool-output"`): Chunk type identifier
385
+ **type** (`"tool-output"`): Chunk type identifier
386
+
387
+ **payload** (`ToolOutputPayload`): Wrapped execution output with metadata
216
388
 
217
- **payload:** (`ToolOutputPayload`): ToolOutputPayloadoutput:ChunkTypeNested chunk data, often containing finish events with usage statistics
389
+ **payload.output** (`ChunkType`): Nested chunk data, often containing finish events with usage statistics
218
390
 
219
391
  ### step-output
220
392
 
221
393
  Contains output from workflow step execution, used primarily for usage tracking and step completion events. Similar to tool-output but specifically for individual workflow steps.
222
394
 
223
- **type:** (`"step-output"`): Chunk type identifier
395
+ **type** (`"step-output"`): Chunk type identifier
396
+
397
+ **payload** (`StepOutputPayload`): Workflow step execution output with metadata
224
398
 
225
- **payload:** (`StepOutputPayload`): StepOutputPayloadoutput:ChunkTypeNested chunk data from step execution, typically containing finish events or other step results
399
+ **payload.output** (`ChunkType`): Nested chunk data from step execution, typically containing finish events or other step results
226
400
 
227
401
  ## Metadata and Special Chunks
228
402
 
@@ -230,25 +404,43 @@ Contains output from workflow step execution, used primarily for usage tracking
230
404
 
231
405
  Contains metadata about the LLM provider's response. Emitted by some providers after text generation to provide additional context like model ID, timestamps, and response headers. This chunk is used internally for state tracking and doesn't affect message assembly.
232
406
 
233
- **type:** (`"response-metadata"`): Chunk type identifier
407
+ **type** (`"response-metadata"`): Chunk type identifier
234
408
 
235
- **payload:** (`ResponseMetadataPayload`): ResponseMetadataPayloadsignature?:stringResponse signature if available\[key: string]:anyAdditional provider-specific metadata fields (e.g., id, modelId, timestamp, headers)
409
+ **payload** (`ResponseMetadataPayload`): Provider response metadata for tracking and debugging
410
+
411
+ **payload.signature** (`string`): Response signature if available
412
+
413
+ **payload.\[key: string]** (`any`): Additional provider-specific metadata fields (e.g., id, modelId, timestamp, headers)
236
414
 
237
415
  ### watch
238
416
 
239
417
  Contains monitoring and observability data from agent execution. Can include workflow state information, execution progress, or other runtime details depending on the context where `stream()` is used.
240
418
 
241
- **type:** (`"watch"`): Chunk type identifier
419
+ **type** (`"watch"`): Chunk type identifier
420
+
421
+ **payload** (`WatchPayload`): Monitoring data for observability and debugging of agent execution
242
422
 
243
- **payload:** (`WatchPayload`): WatchPayloadworkflowState?:objectCurrent workflow execution state (when used in workflows)eventTimestamp?:numberTimestamp when the event occurred\[key: string]:anyAdditional monitoring and execution data
423
+ **payload.workflowState** (`object`): Current workflow execution state (when used in workflows)
424
+
425
+ **payload.eventTimestamp** (`number`): Timestamp when the event occurred
426
+
427
+ **payload.\[key: string]** (`any`): Additional monitoring and execution data
244
428
 
245
429
  ### tripwire
246
430
 
247
431
  Emitted when the stream is forcibly terminated due to content being blocked by a processor. This acts as a safety mechanism to prevent harmful or inappropriate content from being streamed. The payload includes information about why the content was blocked and whether a retry was requested.
248
432
 
249
- **type:** (`"tripwire"`): Chunk type identifier
433
+ **type** (`"tripwire"`): Chunk type identifier
434
+
435
+ **payload** (`TripwirePayload`): Information about why the stream was terminated by safety mechanisms
436
+
437
+ **payload.reason** (`string`): Explanation of why the content was blocked (e.g., 'Output processor blocked content')
438
+
439
+ **payload.retry** (`boolean`): Whether the processor requested a retry of the step
440
+
441
+ **payload.metadata** (`unknown`): Additional metadata from the processor (e.g., scores, categories)
250
442
 
251
- **payload:** (`TripwirePayload`): TripwirePayloadreason:stringExplanation of why the content was blocked (e.g., 'Output processor blocked content')retry?:booleanWhether the processor requested a retry of the stepmetadata?:unknownAdditional metadata from the processor (e.g., scores, categories)processorId?:stringID of the processor that triggered the tripwire
443
+ **payload.processorId** (`string`): ID of the processor that triggered the tripwire
252
444
 
253
445
  ## Usage Example
254
446