maka-agent 0.2.0-dev.27.20260910 → 0.2.0-dev.29.20260912

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 (559) hide show
  1. package/LICENSE +160 -3
  2. package/THIRD_PARTY_NOTICES.txt +14 -14
  3. package/dist/cli-core.js +7 -0
  4. package/dist/onboarding-catalog.js +1 -0
  5. package/dist/pi-tui-pickers.js +183 -21
  6. package/dist/pi-tui-runner.js +150 -18
  7. package/dist/runtime-host-onboarding.js +345 -5
  8. package/dist/runtime-host-run-command.js +15 -7
  9. package/dist/runtime-host-session-driver.js +18 -0
  10. package/dist/runtime-host-tui-command.js +21 -5
  11. package/dist/runtime-host-tui-context.js +19 -5
  12. package/dist/session-import-command.js +69 -0
  13. package/dist/tui-copy-catalog.js +93 -9
  14. package/native/runtime-host-peer/prebuilds/darwin-arm64/maka_runtime_host_peer.node +0 -0
  15. package/native/runtime-host-peer/prebuilds/linux-arm64/maka_runtime_host_peer.node +0 -0
  16. package/native/runtime-host-peer/prebuilds/linux-x64/maka_runtime_host_peer.node +0 -0
  17. package/native/runtime-host-peer/prebuilds/win32-x64/maka_runtime_host_peer.node +0 -0
  18. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  19. package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +66 -0
  20. package/node_modules/@ai-sdk/anthropic/dist/index.js +375 -197
  21. package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +181 -74
  22. package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +123 -43
  23. package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/CHANGELOG.md +32 -0
  24. package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/package.json +1 -1
  25. package/node_modules/@ai-sdk/anthropic/package.json +3 -3
  26. package/node_modules/@ai-sdk/cohere/CHANGELOG.md +53 -0
  27. package/node_modules/@ai-sdk/cohere/dist/index.js +1 -1
  28. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  29. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +1 -0
  30. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  31. package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +63 -0
  32. package/node_modules/@ai-sdk/cohere/package.json +3 -3
  33. package/node_modules/@ai-sdk/google/CHANGELOG.md +92 -0
  34. package/node_modules/@ai-sdk/google/dist/index.js +941 -420
  35. package/node_modules/@ai-sdk/google/dist/internal/index.js +394 -103
  36. package/node_modules/@ai-sdk/google/docs/15-google.mdx +195 -85
  37. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  38. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +1 -0
  39. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  40. package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +63 -0
  41. package/node_modules/@ai-sdk/google/package.json +3 -3
  42. package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +65 -0
  43. package/node_modules/@ai-sdk/open-responses/dist/index.js +51 -13
  44. package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +7 -0
  45. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  46. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/README.md +1 -0
  47. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  48. package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +63 -0
  49. package/node_modules/@ai-sdk/open-responses/package.json +3 -3
  50. package/node_modules/@ai-sdk/openai/CHANGELOG.md +118 -0
  51. package/node_modules/@ai-sdk/openai/dist/index.js +1080 -316
  52. package/node_modules/@ai-sdk/openai/dist/internal/index.js +549 -157
  53. package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +202 -66
  54. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  55. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +13 -0
  56. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +1 -0
  57. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  58. package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
  59. package/node_modules/@ai-sdk/openai/package.json +3 -3
  60. package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +60 -0
  61. package/node_modules/@ai-sdk/openai-compatible/dist/index.js +8 -2
  62. package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +0 -1
  63. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  64. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/LICENSE +13 -0
  65. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +1 -0
  66. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  67. package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +63 -0
  68. package/node_modules/@ai-sdk/openai-compatible/package.json +3 -3
  69. package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +48 -0
  70. package/node_modules/@ai-sdk/provider-utils/dist/index.js +485 -181
  71. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  72. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +13 -0
  73. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +1 -0
  74. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  75. package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
  76. package/node_modules/@ai-sdk/provider-utils/package.json +3 -3
  77. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -4
  78. package/node_modules/@maka/core/dist/chat-model-choice.js +1 -2
  79. package/node_modules/@maka/core/dist/collaboration.js +12 -0
  80. package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
  81. package/node_modules/@maka/core/dist/llm-connections.js +1 -1
  82. package/node_modules/@maka/core/dist/model-catalog.js +26 -103
  83. package/node_modules/@maka/core/dist/model-facts.js +0 -74
  84. package/node_modules/@maka/core/dist/model-thinking.js +70 -38
  85. package/node_modules/@maka/core/dist/permission-profile.js +17 -0
  86. package/node_modules/@maka/core/dist/provider-registry.js +1 -3
  87. package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +68 -46
  88. package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +21 -12
  89. package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +43 -4
  90. package/node_modules/@maka/core/dist/runtime-policy.js +3 -2
  91. package/node_modules/@maka/core/dist/scheduled-task.js +8 -2
  92. package/node_modules/@maka/core/dist/settings.js +12 -0
  93. package/node_modules/@maka/core/dist/text-sanitize.js +8 -2
  94. package/node_modules/@maka/runtime/dist/agent-run.js +8 -1
  95. package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
  96. package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +1 -0
  97. package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +50 -58
  98. package/node_modules/@maka/runtime/dist/archive-read-tool.js +3 -1
  99. package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
  100. package/node_modules/@maka/runtime/dist/bots/bot-test.js +2 -1
  101. package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +86 -19
  102. package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +24 -20
  103. package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +5 -3
  104. package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +87 -29
  105. package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +40 -36
  106. package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
  107. package/node_modules/@maka/runtime/dist/computer-use-tools.js +4 -1
  108. package/node_modules/@maka/runtime/dist/context-budget-policy.js +6 -24
  109. package/node_modules/@maka/runtime/dist/deep-research-tools.js +11 -5
  110. package/node_modules/@maka/runtime/dist/edit-replace.js +2 -2
  111. package/node_modules/@maka/runtime/dist/filesystem-worker/operations.js +5 -6
  112. package/node_modules/@maka/runtime/dist/memory-extraction-evidence.js +7 -1
  113. package/node_modules/@maka/runtime/dist/memory-extraction.js +12 -7
  114. package/node_modules/@maka/runtime/dist/model-adapter.js +13 -3
  115. package/node_modules/@maka/runtime/dist/model-factory.js +1 -1
  116. package/node_modules/@maka/runtime/dist/openai-responses-websocket.js +2 -5
  117. package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
  118. package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +11 -2
  119. package/node_modules/@maka/runtime/dist/request-customization-fetch.js +14 -7
  120. package/node_modules/@maka/runtime/dist/runtime-kernel.js +70 -14
  121. package/node_modules/@maka/runtime/dist/session-export.js +1 -0
  122. package/node_modules/@maka/runtime/dist/session-import.js +100 -0
  123. package/node_modules/@maka/runtime/dist/session-manager.js +143 -24
  124. package/node_modules/@maka/runtime/dist/session-trace-projection.js +22 -0
  125. package/node_modules/@maka/runtime/dist/shell-run-manager.js +9 -6
  126. package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +13 -6
  127. package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +43 -10
  128. package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
  129. package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -3
  130. package/node_modules/@maka/runtime/dist/subagent-tools.js +0 -3
  131. package/node_modules/@maka/runtime/dist/subscription-model-fetch.js +1 -4
  132. package/node_modules/@maka/runtime/dist/system-prompt/workspace-instructions.js +11 -6
  133. package/node_modules/@maka/runtime/dist/tavily-search.js +8 -2
  134. package/node_modules/@maka/runtime/dist/text-line-window.js +49 -0
  135. package/node_modules/@maka/runtime/dist/tool-availability.js +0 -1
  136. package/node_modules/@maka/runtime/dist/tool-output.js +35 -12
  137. package/node_modules/@maka/runtime/dist/tool-runtime.js +27 -3
  138. package/node_modules/@maka/runtime/dist/unified-diff.js +40 -10
  139. package/node_modules/@maka/runtime/dist/web-fetch-tool.js +4 -2
  140. package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +82 -33
  141. package/node_modules/@maka/runtime/dist/workspace-executor.js +2 -6
  142. package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +13 -0
  143. package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/run-code-mode.js +2 -0
  144. package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/package.json +3 -3
  145. package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/CHANGELOG.md +101 -0
  146. package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +13 -0
  147. package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/dist/index.js +309 -244
  148. package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/docs/00-ai-gateway.mdx +29 -16
  149. package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/package.json +3 -3
  150. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
  151. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +13 -0
  152. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +1 -0
  153. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +426 -0
  154. package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +63 -0
  155. package/node_modules/{ai → @maka/runtime/node_modules/ai}/CHANGELOG.md +152 -0
  156. package/node_modules/@maka/runtime/node_modules/ai/LICENSE +13 -0
  157. package/node_modules/{ai → @maka/runtime/node_modules/ai}/dist/index.js +2505 -1548
  158. package/node_modules/{ai → @maka/runtime/node_modules/ai}/dist/internal/index.js +129 -107
  159. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/02-providers-and-models.mdx +8 -1
  160. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/04-loop-control.mdx +5 -3
  161. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-policy-tool-approvals.mdx +2 -1
  162. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-tool-approvals.mdx +13 -7
  163. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/07-workflow-agent.mdx +94 -10
  164. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/10-generating-structured-data.mdx +15 -3
  165. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +2 -1
  166. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/16-mcp-tools.mdx +64 -1
  167. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/35-image-generation.mdx +11 -0
  168. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-transcription.mdx +36 -35
  169. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/37-speech.mdx +0 -17
  170. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/39-file-uploads.mdx +25 -0
  171. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +372 -0
  172. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/50-error-handling.mdx +83 -6
  173. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/60-telemetry.mdx +28 -5
  174. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/index.mdx +5 -0
  175. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +40 -0
  176. package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +47 -0
  177. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +23 -1
  178. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/20-streaming-data.mdx +11 -6
  179. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/50-stream-protocol.mdx +6 -2
  180. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/04-caching.mdx +7 -0
  181. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/11-secure-url-fetching.mdx +7 -1
  182. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +14 -0
  183. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +39 -5
  184. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/05-embed.mdx +31 -5
  185. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +32 -6
  186. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +19 -5
  187. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +2 -1
  188. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +37 -4
  189. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
  190. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
  191. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
  192. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
  193. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
  194. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/28-output.mdx +27 -1
  195. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +63 -0
  196. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +1 -1
  197. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/index.mdx +25 -0
  198. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
  199. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +4 -0
  200. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +6 -1
  201. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +101 -34
  202. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +6 -1
  203. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +7 -0
  204. package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
  205. package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/index.mdx +1 -0
  206. package/node_modules/{ai → @maka/runtime/node_modules/ai}/package.json +12 -12
  207. package/node_modules/@maka/runtime/package.json +11 -10
  208. package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +17 -36
  209. package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +5 -7
  210. package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +6 -6
  211. package/node_modules/@maka/runtime-host/dist/peer-mesh/node.js +7 -4
  212. package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +2 -2
  213. package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
  214. package/node_modules/@maka/runtime-host/dist/protocol/index.js +14 -1
  215. package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +23 -4
  216. package/node_modules/@maka/runtime-host/dist/protocol/operations.js +4 -1
  217. package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +16 -20
  218. package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
  219. package/node_modules/@maka/runtime-host/dist/protocol/session-transcript.js +3 -2
  220. package/node_modules/@maka/runtime-host/dist/protocol/skill-catalog.js +2 -1
  221. package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
  222. package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
  223. package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
  224. package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +12 -10
  225. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +85 -7
  226. package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +2 -2
  227. package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +4 -7
  228. package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
  229. package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +7 -7
  230. package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +6 -1
  231. package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +35 -4
  232. package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
  233. package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
  234. package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +24 -8
  235. package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +13 -1
  236. package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +11 -5
  237. package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +8 -6
  238. package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
  239. package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
  240. package/node_modules/@maka/runtime-host/dist/server/root-admission-owner.js +17 -8
  241. package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +23 -25
  242. package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +12 -18
  243. package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +15 -11
  244. package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +163 -0
  245. package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +24 -12
  246. package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +20 -21
  247. package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +1 -0
  248. package/node_modules/@maka/runtime-host/dist/server/session-transcript-pager.js +24 -2
  249. package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +18 -2
  250. package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
  251. package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +16 -19
  252. package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +1 -0
  253. package/node_modules/@maka/runtime-host/dist/transport/framed-byte-stream-transport.js +4 -1
  254. package/node_modules/@maka/runtime-host/dist/transport/local-ipc-framing.js +4 -2
  255. package/node_modules/@maka/runtime-host/dist/transport/peer-native.js +9 -8
  256. package/node_modules/@maka/runtime-host/dist/transport/resumable-peer-stream.js +14 -9
  257. package/node_modules/@maka/runtime-host/package.json +1 -0
  258. package/node_modules/@maka/storage/dist/context-offload-snapshot.js +70 -5
  259. package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
  260. package/node_modules/@maka/storage/dist/model-facts-store.js +5 -28
  261. package/node_modules/@maka/storage/dist/project-catalog.js +6 -0
  262. package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +111 -38
  263. package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +46 -61
  264. package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +25 -6
  265. package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +30 -14
  266. package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +10 -4
  267. package/node_modules/@maka/storage/dist/scheduled-task-store.js +8 -1
  268. package/node_modules/@maka/storage/dist/session-bundle-policy.js +680 -7
  269. package/node_modules/@maka/storage/dist/session-message-projection.js +8 -4
  270. package/node_modules/@maka/storage/dist/session-store.js +3 -0
  271. package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +18 -4
  272. package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +3 -7
  273. package/node_modules/@maka/storage/dist/stable-storage.js +2 -1
  274. package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +22 -5
  275. package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +22 -5
  276. package/node_modules/run/README.md +109 -18
  277. package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
  278. package/node_modules/run/dist/continuation-validation.js +116 -1
  279. package/node_modules/run/dist/errors.js +12 -2
  280. package/node_modules/run/dist/host-function-invocation.js +2 -1
  281. package/node_modules/run/dist/run.js +30 -4
  282. package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
  283. package/node_modules/run/dist/runtime/guest-sources.js +214 -56
  284. package/node_modules/run/dist/runtime/manager.js +575 -116
  285. package/node_modules/run/dist/runtime/max-workers.js +8 -4
  286. package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
  287. package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
  288. package/node_modules/run/dist/runtime/worker-source.js +1 -1
  289. package/node_modules/run/dist/utils/options.js +7 -0
  290. package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
  291. package/node_modules/run/dist/utils/serde.js +1 -7
  292. package/node_modules/run/dist/utils/source-cache.js +83 -13
  293. package/node_modules/run/package.json +6 -4
  294. package/node_modules/zod/v4/core/memoizer.cjs +12 -16
  295. package/node_modules/zod/v4/core/memoizer.js +12 -16
  296. package/package.json +1 -1
  297. package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +0 -45
  298. /package/node_modules/@ai-sdk/{code-mode → anthropic/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  299. /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/README.md +0 -0
  300. /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/dist/index.js +0 -0
  301. /package/node_modules/@ai-sdk/{gateway → cohere/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  302. /package/node_modules/@ai-sdk/{provider → google/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  303. /package/node_modules/{ai → @ai-sdk/open-responses/node_modules/@ai-sdk/provider}/LICENSE +0 -0
  304. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/README.md +0 -0
  305. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval-continuation.js +0 -0
  306. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval.js +0 -0
  307. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/code-mode-tool.js +0 -0
  308. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
  309. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
  310. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/errors.js +0 -0
  311. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
  312. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/index.js +0 -0
  313. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -0
  314. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
  315. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-prompt.js +0 -0
  316. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/types.js +0 -0
  317. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
  318. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/src/tsconfig.json +0 -0
  319. /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/README.md +0 -0
  320. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/README.md +0 -0
  321. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/00-introduction/index.mdx +0 -0
  322. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/01-overview.mdx +0 -0
  323. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/03-prompts.mdx +0 -0
  324. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/04-tools.mdx +0 -0
  325. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/05-streaming.mdx +0 -0
  326. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/06-provider-options.mdx +0 -0
  327. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/index.mdx +0 -0
  328. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/00-choosing-a-provider.mdx +0 -0
  329. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
  330. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/02-nextjs-app-router.mdx +0 -0
  331. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +0 -0
  332. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/04-svelte.mdx +0 -0
  333. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/05-nuxt.mdx +0 -0
  334. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/06-nodejs.mdx +0 -0
  335. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/07-expo.mdx +0 -0
  336. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/08-tanstack-start.mdx +0 -0
  337. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/09-coding-agents.mdx +0 -0
  338. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/index.mdx +0 -0
  339. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/01-overview.mdx +0 -0
  340. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/02-building-agents.mdx +0 -0
  341. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/03-workflows.mdx +0 -0
  342. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/05-configuring-call-options.mdx +0 -0
  343. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-memory.mdx +0 -0
  344. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-subagents.mdx +0 -0
  345. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/08-terminal-ui.mdx +0 -0
  346. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/index.mdx +0 -0
  347. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
  348. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/05-generating-text.mdx +0 -0
  349. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +0 -0
  350. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
  351. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/18-code-mode.mdx +0 -0
  352. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +0 -0
  353. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
  354. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/26-reasoning.mdx +0 -0
  355. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
  356. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/31-reranking.mdx +0 -0
  357. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-realtime.mdx +0 -0
  358. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
  359. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
  360. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/40-middleware.mdx +0 -0
  361. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +0 -0
  362. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/45-provider-management.mdx +0 -0
  363. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/55-testing.mdx +0 -0
  364. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-devtools.mdx +0 -0
  365. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +0 -0
  366. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +0 -0
  367. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +0 -0
  368. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -0
  369. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +0 -0
  370. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +0 -0
  371. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +0 -0
  372. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
  373. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/01-overview.mdx +0 -0
  374. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +0 -0
  375. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +0 -0
  376. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +0 -0
  377. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
  378. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/05-completion.mdx +0 -0
  379. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +0 -0
  380. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +0 -0
  381. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-transport.mdx +0 -0
  382. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
  383. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
  384. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
  385. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
  386. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +0 -0
  387. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
  388. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
  389. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +0 -0
  390. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
  391. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +0 -0
  392. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
  393. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
  394. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +0 -0
  395. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
  396. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
  397. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/02-stopping-streams.mdx +0 -0
  398. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/03-backpressure.mdx +0 -0
  399. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
  400. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
  401. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
  402. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
  403. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
  404. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
  405. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
  406. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/index.mdx +0 -0
  407. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
  408. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
  409. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +0 -0
  410. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +0 -0
  411. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
  412. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
  413. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
  414. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +0 -0
  415. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
  416. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +0 -0
  417. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -0
  418. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +0 -0
  419. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +0 -0
  420. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
  421. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
  422. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
  423. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
  424. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
  425. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
  426. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
  427. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
  428. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
  429. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +0 -0
  430. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +0 -0
  431. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
  432. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +0 -0
  433. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +0 -0
  434. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
  435. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +0 -0
  436. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +0 -0
  437. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
  438. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
  439. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
  440. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
  441. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
  442. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -0
  443. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
  444. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
  445. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
  446. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
  447. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
  448. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
  449. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
  450. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
  451. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
  452. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +0 -0
  453. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -0
  454. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +0 -0
  455. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
  456. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/42-pipe-ui-message-stream-to-response.mdx +0 -0
  457. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
  458. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
  459. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
  460. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
  461. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +0 -0
  462. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
  463. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +0 -0
  464. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +0 -0
  465. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +0 -0
  466. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
  467. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
  468. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
  469. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
  470. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
  471. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
  472. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
  473. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
  474. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
  475. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
  476. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +0 -0
  477. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +0 -0
  478. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -0
  479. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +0 -0
  480. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
  481. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
  482. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
  483. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
  484. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
  485. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
  486. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
  487. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +0 -0
  488. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
  489. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
  490. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
  491. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
  492. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
  493. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
  494. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
  495. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
  496. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
  497. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +0 -0
  498. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +0 -0
  499. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +0 -0
  500. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
  501. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
  502. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
  503. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
  504. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
  505. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +0 -0
  506. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-too-many-embedding-values-for-call-error.mdx +0 -0
  507. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-not-found-for-approval-error.mdx +0 -0
  508. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
  509. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
  510. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +0 -0
  511. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
  512. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +0 -0
  513. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
  514. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/index.mdx +0 -0
  515. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
  516. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
  517. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
  518. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
  519. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
  520. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
  521. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
  522. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +0 -0
  523. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
  524. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +0 -0
  525. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
  526. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
  527. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/index.mdx +0 -0
  528. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
  529. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
  530. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
  531. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
  532. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
  533. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
  534. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
  535. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
  536. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
  537. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
  538. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
  539. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
  540. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +0 -0
  541. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
  542. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
  543. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +0 -0
  544. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
  545. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
  546. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
  547. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
  548. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
  549. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +0 -0
  550. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
  551. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
  552. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
  553. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
  554. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
  555. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
  556. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
  557. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
  558. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +0 -0
  559. /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/index.mdx +0 -0
@@ -91,7 +91,7 @@ import {
91
91
  } from "@ai-sdk/provider-utils";
92
92
 
93
93
  // src/version.ts
94
- var VERSION = true ? "7.0.85" : "0.0.0-test";
94
+ var VERSION = true ? "7.0.99" : "0.0.0-test";
95
95
 
96
96
  // src/util/download/download.ts
97
97
  var download = async ({
@@ -1740,13 +1740,14 @@ var retryWithExponentialBackoffRespectingRetryHeaders = ({
1740
1740
  maxRetries = 2,
1741
1741
  initialDelayInMs = 2e3,
1742
1742
  backoffFactor = 2,
1743
- abortSignal
1743
+ abortSignal,
1744
+ additionalRetryableError
1744
1745
  } = {}) => retryWithExponentialBackoff({
1745
1746
  maxRetries,
1746
1747
  initialDelayInMs,
1747
1748
  backoffFactor,
1748
1749
  abortSignal,
1749
- shouldRetry: (error) => error instanceof Error && (APICallError.isInstance(error) && error.isRetryable === true || GatewayError.isInstance(error) && error.isRetryable === true),
1750
+ shouldRetry: async (error) => error instanceof Error && (APICallError.isInstance(error) && error.isRetryable === true || GatewayError.isInstance(error) && error.isRetryable === true) || additionalRetryableError != null && await additionalRetryableError(error),
1750
1751
  getDelayInMs: ({ error, exponentialBackoffDelay }) => getRetryDelayInMs({
1751
1752
  error,
1752
1753
  exponentialBackoffDelay
@@ -1757,30 +1758,34 @@ var retryWithExponentialBackoffRespectingRetryHeaders = ({
1757
1758
  // src/util/prepare-retries.ts
1758
1759
  function prepareRetries({
1759
1760
  maxRetries,
1760
- abortSignal
1761
+ abortSignal,
1762
+ additionalRetryableError,
1763
+ parameter = "maxRetries",
1764
+ defaultMaxRetries = 2
1761
1765
  }) {
1762
1766
  if (maxRetries != null) {
1763
1767
  if (!Number.isInteger(maxRetries)) {
1764
1768
  throw new InvalidArgumentError({
1765
- parameter: "maxRetries",
1769
+ parameter,
1766
1770
  value: maxRetries,
1767
- message: "maxRetries must be an integer"
1771
+ message: `${parameter} must be an integer`
1768
1772
  });
1769
1773
  }
1770
1774
  if (maxRetries < 0) {
1771
1775
  throw new InvalidArgumentError({
1772
- parameter: "maxRetries",
1776
+ parameter,
1773
1777
  value: maxRetries,
1774
- message: "maxRetries must be >= 0"
1778
+ message: `${parameter} must be >= 0`
1775
1779
  });
1776
1780
  }
1777
1781
  }
1778
- const maxRetriesResult = maxRetries != null ? maxRetries : 2;
1782
+ const maxRetriesResult = maxRetries != null ? maxRetries : defaultMaxRetries;
1779
1783
  return {
1780
1784
  maxRetries: maxRetriesResult,
1781
1785
  retry: retryWithExponentialBackoffRespectingRetryHeaders({
1782
1786
  maxRetries: maxRetriesResult,
1783
- abortSignal
1787
+ abortSignal,
1788
+ additionalRetryableError
1784
1789
  })
1785
1790
  };
1786
1791
  }
@@ -2340,7 +2345,7 @@ function getGlobalProvider() {
2340
2345
  import { filterNullable } from "@ai-sdk/provider-utils";
2341
2346
  function mergeAbortSignals(...signals) {
2342
2347
  const validSignals = filterNullable(...signals).map(
2343
- (signal) => signal instanceof AbortSignal ? signal : AbortSignal.timeout(signal)
2348
+ (signal) => typeof signal === "number" ? AbortSignal.timeout(signal) : signal
2344
2349
  );
2345
2350
  return validSignals.length === 0 ? void 0 : validSignals.length === 1 ? validSignals[0] : AbortSignal.any(validSignals);
2346
2351
  }
@@ -2623,6 +2628,21 @@ function createTelemetryDispatcher({
2623
2628
  };
2624
2629
  }
2625
2630
 
2631
+ // src/telemetry/filter-included-context.ts
2632
+ function filterIncludedContext({
2633
+ context,
2634
+ includeContext
2635
+ }) {
2636
+ if (context == null) {
2637
+ return {};
2638
+ }
2639
+ return Object.fromEntries(
2640
+ Object.entries(context).filter(
2641
+ ([key]) => (includeContext == null ? void 0 : includeContext[key]) === true
2642
+ )
2643
+ );
2644
+ }
2645
+
2626
2646
  // src/generate-text/reasoning.ts
2627
2647
  function asReasoningText(reasoningParts) {
2628
2648
  const reasoningText = reasoningParts.map((part) => "text" in part ? part.text : "").join("");
@@ -2730,19 +2750,6 @@ var DefaultStepResult = class {
2730
2750
  };
2731
2751
 
2732
2752
  // src/generate-text/restricted-telemetry-dispatcher.ts
2733
- function filterIncludedContext({
2734
- context,
2735
- includeContext
2736
- }) {
2737
- if (context == null) {
2738
- return {};
2739
- }
2740
- return Object.fromEntries(
2741
- Object.entries(context).filter(
2742
- ([key]) => (includeContext == null ? void 0 : includeContext[key]) === true
2743
- )
2744
- );
2745
- }
2746
2753
  function restrictStepResult({
2747
2754
  step,
2748
2755
  includeRuntimeContext,
@@ -3176,88 +3183,6 @@ function collectToolApprovals({
3176
3183
  return { approvedToolApprovals, deniedToolApprovals };
3177
3184
  }
3178
3185
 
3179
- // src/generate-text/validate-tool-approvals.ts
3180
- import {
3181
- asSchema as asSchema3,
3182
- isExecutableTool,
3183
- safeValidateTypes as safeValidateTypes3
3184
- } from "@ai-sdk/provider-utils";
3185
-
3186
- // src/generate-text/validate-tool-context.ts
3187
- import { validateTypes } from "@ai-sdk/provider-utils";
3188
- async function validateToolContext({
3189
- toolName,
3190
- context,
3191
- contextSchema
3192
- }) {
3193
- if (contextSchema == null) {
3194
- return context;
3195
- }
3196
- return await validateTypes({
3197
- value: context,
3198
- schema: contextSchema,
3199
- context: {
3200
- field: "tool context",
3201
- entityName: toolName
3202
- }
3203
- });
3204
- }
3205
-
3206
- // src/generate-text/resolve-tool-approval.ts
3207
- async function resolveToolApproval({
3208
- tools,
3209
- toolCall,
3210
- toolApproval,
3211
- messages,
3212
- toolsContext,
3213
- runtimeContext
3214
- }) {
3215
- if (toolApproval != null && typeof toolApproval === "function") {
3216
- return normalizeToolApprovalStatus(
3217
- await toolApproval({
3218
- toolCall,
3219
- tools,
3220
- toolsContext,
3221
- messages,
3222
- runtimeContext
3223
- })
3224
- );
3225
- }
3226
- const toolName = toolCall.toolName;
3227
- const tool = getOwn(tools, toolName);
3228
- const input = toolCall.input;
3229
- const userDefinedToolApprovalStatus = getOwn(toolApproval, toolName);
3230
- if (userDefinedToolApprovalStatus != null) {
3231
- const approvalStatus = typeof userDefinedToolApprovalStatus === "function" ? await userDefinedToolApprovalStatus(input, {
3232
- toolCallId: toolCall.toolCallId,
3233
- messages,
3234
- toolContext: await validateToolContext({
3235
- toolName,
3236
- context: getOwn(toolsContext, toolName),
3237
- contextSchema: tool == null ? void 0 : tool.contextSchema
3238
- }),
3239
- runtimeContext
3240
- }) : userDefinedToolApprovalStatus;
3241
- return normalizeToolApprovalStatus(approvalStatus);
3242
- }
3243
- if ((tool == null ? void 0 : tool.needsApproval) == null) {
3244
- return { type: "not-applicable" };
3245
- }
3246
- const needsApproval = typeof tool.needsApproval === "function" ? await tool.needsApproval(input, {
3247
- toolCallId: toolCall.toolCallId,
3248
- messages,
3249
- context: await validateToolContext({
3250
- toolName,
3251
- context: getOwn(toolsContext, toolName),
3252
- contextSchema: tool == null ? void 0 : tool.contextSchema
3253
- })
3254
- }) : tool.needsApproval;
3255
- return needsApproval ? { type: "user-approval" } : { type: "not-applicable" };
3256
- }
3257
- function normalizeToolApprovalStatus(status) {
3258
- return status === void 0 ? { type: "not-applicable" } : typeof status === "string" ? { type: status } : status;
3259
- }
3260
-
3261
3186
  // src/generate-text/tool-approval-signature.ts
3262
3187
  import { convertBase64ToUint8Array } from "@ai-sdk/provider-utils";
3263
3188
 
@@ -3325,6 +3250,19 @@ ${toolName}
3325
3250
  ${inputDigest}`
3326
3251
  );
3327
3252
  }
3253
+ async function signToolApproval({
3254
+ secret,
3255
+ approvalId,
3256
+ toolCallId,
3257
+ toolName,
3258
+ input
3259
+ }) {
3260
+ const key = await importKey(secret);
3261
+ const inputDigest = await hashCanonical(input);
3262
+ const payload = buildPayload(approvalId, toolCallId, toolName, inputDigest);
3263
+ const sig = await crypto.subtle.sign("HMAC", key, payload);
3264
+ return toBase64url(new Uint8Array(sig));
3265
+ }
3328
3266
  async function verifyToolApprovalSignature({
3329
3267
  secret,
3330
3268
  signature,
@@ -3352,6 +3290,88 @@ async function verifyToolApprovalSignature({
3352
3290
  return false;
3353
3291
  }
3354
3292
 
3293
+ // src/generate-text/validate-tool-approvals.ts
3294
+ import {
3295
+ asSchema as asSchema3,
3296
+ isExecutableTool,
3297
+ safeValidateTypes as safeValidateTypes3
3298
+ } from "@ai-sdk/provider-utils";
3299
+
3300
+ // src/generate-text/validate-tool-context.ts
3301
+ import { validateTypes } from "@ai-sdk/provider-utils";
3302
+ async function validateToolContext({
3303
+ toolName,
3304
+ context,
3305
+ contextSchema
3306
+ }) {
3307
+ if (contextSchema == null) {
3308
+ return context;
3309
+ }
3310
+ return await validateTypes({
3311
+ value: context,
3312
+ schema: contextSchema,
3313
+ context: {
3314
+ field: "tool context",
3315
+ entityName: toolName
3316
+ }
3317
+ });
3318
+ }
3319
+
3320
+ // src/generate-text/resolve-tool-approval.ts
3321
+ async function resolveToolApproval({
3322
+ tools,
3323
+ toolCall,
3324
+ toolApproval,
3325
+ messages,
3326
+ toolsContext,
3327
+ runtimeContext
3328
+ }) {
3329
+ if (toolApproval != null && typeof toolApproval === "function") {
3330
+ return normalizeToolApprovalStatus(
3331
+ await toolApproval({
3332
+ toolCall,
3333
+ tools,
3334
+ toolsContext,
3335
+ messages,
3336
+ runtimeContext
3337
+ })
3338
+ );
3339
+ }
3340
+ const toolName = toolCall.toolName;
3341
+ const tool = getOwn(tools, toolName);
3342
+ const input = toolCall.input;
3343
+ const userDefinedToolApprovalStatus = getOwn(toolApproval, toolName);
3344
+ if (userDefinedToolApprovalStatus != null) {
3345
+ const approvalStatus = typeof userDefinedToolApprovalStatus === "function" ? await userDefinedToolApprovalStatus(input, {
3346
+ toolCallId: toolCall.toolCallId,
3347
+ messages,
3348
+ toolContext: await validateToolContext({
3349
+ toolName,
3350
+ context: getOwn(toolsContext, toolName),
3351
+ contextSchema: tool == null ? void 0 : tool.contextSchema
3352
+ }),
3353
+ runtimeContext
3354
+ }) : userDefinedToolApprovalStatus;
3355
+ return normalizeToolApprovalStatus(approvalStatus);
3356
+ }
3357
+ if ((tool == null ? void 0 : tool.needsApproval) == null) {
3358
+ return { type: "not-applicable" };
3359
+ }
3360
+ const needsApproval = typeof tool.needsApproval === "function" ? await tool.needsApproval(input, {
3361
+ toolCallId: toolCall.toolCallId,
3362
+ messages,
3363
+ context: await validateToolContext({
3364
+ toolName,
3365
+ context: getOwn(toolsContext, toolName),
3366
+ contextSchema: tool == null ? void 0 : tool.contextSchema
3367
+ })
3368
+ }) : tool.needsApproval;
3369
+ return needsApproval ? { type: "user-approval" } : { type: "not-applicable" };
3370
+ }
3371
+ function normalizeToolApprovalStatus(status) {
3372
+ return status === void 0 ? { type: "not-applicable" } : typeof status === "string" ? { type: status } : status;
3373
+ }
3374
+
3355
3375
  // src/generate-text/validate-tool-approvals.ts
3356
3376
  async function validateApprovedToolApprovals({
3357
3377
  approvedToolApprovals,
@@ -3661,8 +3681,10 @@ export {
3661
3681
  prepareToolChoice,
3662
3682
  prepareTools,
3663
3683
  resolveLanguageModel,
3684
+ signToolApproval,
3664
3685
  standardizePrompt,
3665
3686
  toResponseMessages,
3666
- validateApprovedToolApprovals
3687
+ validateApprovedToolApprovals,
3688
+ verifyToolApprovalSignature
3667
3689
  };
3668
3690
  //# sourceMappingURL=index.js.map
@@ -44,7 +44,6 @@ The AI SDK comes with a wide range of providers that you can use to interact wit
44
44
  - [Groq Provider](/providers/ai-sdk-providers/groq) (`@ai-sdk/groq`)
45
45
  - [Perplexity Provider](/providers/ai-sdk-providers/perplexity) (`@ai-sdk/perplexity`)
46
46
  - [ElevenLabs Provider](/providers/ai-sdk-providers/elevenlabs) (`@ai-sdk/elevenlabs`)
47
- - [LMNT Provider](/providers/ai-sdk-providers/lmnt) (`@ai-sdk/lmnt`)
48
47
  - [Hume Provider](/providers/ai-sdk-providers/hume) (`@ai-sdk/hume`)
49
48
  - [Rev.ai Provider](/providers/ai-sdk-providers/revai) (`@ai-sdk/revai`)
50
49
  - [Deepgram Provider](/providers/ai-sdk-providers/deepgram) (`@ai-sdk/deepgram`)
@@ -98,6 +97,7 @@ The open-source community has created the following providers:
98
97
  - [Crusoe Provider](/providers/community-providers/crusoe) (`crusoe-ai-provider`)
99
98
  - [Neon AI Gateway Provider](/providers/community-providers/neon-ai-gateway) (`@neon/ai-sdk-provider`)
100
99
  - [Interfaze Provider](/providers/community-providers/interfaze) (`@interfaze-ai/ai-sdk`)
100
+ - [Telnyx Provider](/providers/community-providers/telnyx) (`@telnyx/ai-sdk-provider`)
101
101
 
102
102
  ## Self-Hosted Models
103
103
 
@@ -122,6 +122,7 @@ Here are the capabilities of popular models:
122
122
  | [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-4` | <Cross /> | <Check /> | <Check /> | <Check /> |
123
123
  | [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3` | <Cross /> | <Check /> | <Check /> | <Check /> |
124
124
  | [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3-mini` | <Cross /> | <Check /> | <Check /> | <Check /> |
125
+ | [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-6-astra` | <Check /> | <Check /> | <Check /> | <Check /> |
125
126
  | [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6` | <Check /> | <Check /> | <Check /> | <Check /> |
126
127
  | [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-luna` | <Check /> | <Check /> | <Check /> | <Check /> |
127
128
  | [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5.6-sol` | <Check /> | <Check /> | <Check /> | <Check /> |
@@ -145,6 +146,7 @@ Here are the capabilities of popular models:
145
146
  | [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5-codex` | <Check /> | <Check /> | <Check /> | <Check /> |
146
147
  | [OpenAI](/providers/ai-sdk-providers/openai) | `gpt-5-chat-latest` | <Check /> | <Check /> | <Check /> | <Check /> |
147
148
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-sonnet-5` | <Check /> | <Check /> | <Check /> | <Check /> |
149
+ | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-fable-5-1` | <Check /> | <Check /> | <Check /> | <Check /> |
148
150
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-fable-5` | <Check /> | <Check /> | <Check /> | <Check /> |
149
151
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-opus-4-8` | <Check /> | <Check /> | <Check /> | <Check /> |
150
152
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-opus-4-7` | <Check /> | <Check /> | <Check /> | <Check /> |
@@ -154,6 +156,11 @@ Here are the capabilities of popular models:
154
156
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-opus-4-1` | <Check /> | <Check /> | <Check /> | <Check /> |
155
157
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-opus-4-0` | <Check /> | <Check /> | <Check /> | <Check /> |
156
158
  | [Anthropic](/providers/ai-sdk-providers/anthropic) | `claude-sonnet-4-0` | <Check /> | <Check /> | <Check /> | <Check /> |
159
+ | [Google](/providers/ai-sdk-providers/google) | `gemini-3.8-flash` | <Check /> | <Check /> | <Check /> | <Check /> |
160
+ | [Google](/providers/ai-sdk-providers/google) | `gemini-3.1-pro-preview` | <Check /> | <Check /> | <Check /> | <Check /> |
161
+ | [Google](/providers/ai-sdk-providers/google) | `gemini-3-pro-preview` | <Check /> | <Check /> | <Check /> | <Check /> |
162
+ | [Google](/providers/ai-sdk-providers/google) | `gemini-2.5-pro` | <Check /> | <Check /> | <Check /> | <Check /> |
163
+ | [Google](/providers/ai-sdk-providers/google) | `gemini-2.5-flash` | <Check /> | <Check /> | <Check /> | <Check /> |
157
164
  | [Mistral](/providers/ai-sdk-providers/mistral) | `pixtral-large-latest` | <Check /> | <Check /> | <Check /> | <Check /> |
158
165
  | [Mistral](/providers/ai-sdk-providers/mistral) | `mistral-large-latest` | <Cross /> | <Check /> | <Check /> | <Check /> |
159
166
  | [Mistral](/providers/ai-sdk-providers/mistral) | `mistral-medium-latest` | <Cross /> | <Check /> | <Check /> | <Check /> |
@@ -16,7 +16,9 @@ The AI SDK provides built-in loop control through two parameters: `stopWhen` for
16
16
 
17
17
  ## Stop Conditions
18
18
 
19
- The `stopWhen` parameter controls when to stop execution when there are tool results in the last step. By default, agents stop after 20 steps using `isStepCount(20)`. This default is a safety measure to prevent runaway loops that could result in excessive API calls and costs.
19
+ The `stopWhen` parameter controls when to stop execution when there are tool results in the last step. By default, `ToolLoopAgent` stops after 20 steps using `isStepCount(20)`. This default is a safety measure to prevent runaway loops that could result in excessive API calls and costs.
20
+
21
+ `WorkflowAgent` does not apply a default step limit. It continues until the model stops calling tools or another natural termination condition is met. Configure an explicit condition such as `isStepCount(20)` when you need to bound its model calls. See [WorkflowAgent Loop Control](/docs/agents/workflow-agent#loop-control) for details.
20
22
 
21
23
  When you provide `stopWhen`, the agent continues executing after tool calls until a stopping condition is met. When the condition is an array, execution stops when any of the conditions are met.
22
24
 
@@ -39,7 +41,7 @@ const agent = new ToolLoopAgent({
39
41
  tools: {
40
42
  // your tools
41
43
  },
42
- stopWhen: isStepCount(50), // Increasing the default of 20 to 50.
44
+ stopWhen: isStepCount(50), // Increase ToolLoopAgent's default from 20 to 50.
43
45
  });
44
46
 
45
47
  const result = await agent.generate({
@@ -49,7 +51,7 @@ const result = await agent.generate({
49
51
 
50
52
  ### Run Until Finished
51
53
 
52
- If you want the agent to run until the model naturally stops making tool calls, use `isLoopFinished()`. This removes the default step limit:
54
+ If you want a `ToolLoopAgent` to run until the model naturally stops making tool calls, use `isLoopFinished()`. This removes its default step limit:
53
55
 
54
56
  ```ts
55
57
  import { ToolLoopAgent, isLoopFinished } from 'ai';
@@ -156,9 +156,10 @@ Run with `opa test policy.rego policy_test.rego`.
156
156
  ### Errors fail closed
157
157
 
158
158
  - If the backend errors (server unreachable, WASM fault, misbuilt bundle), `opaPolicy` returns `denied` with the error message as the reason.
159
+ - If the backend returns a present but unrecognized decision, such as an unknown `decision` value or a non-boolean legacy `allow` value, `opaPolicy` returns `denied`.
159
160
  - The error never rejects out of the callback and never aborts the run.
160
161
  - A backend outage blocks the affected call rather than silently allowing it.
161
- - This is distinct from a rule that returns no match, which normalizes to `not-applicable` (allow). Use a `default ... deny` rule if you want unmatched calls denied too.
162
+ - This is distinct from a rule that returns no match: `null` or `undefined` normalizes to `not-applicable` (allow). Use a `default ... deny` rule if you want unmatched calls denied too.
162
163
 
163
164
  ## Loading the policy
164
165
 
@@ -284,14 +284,17 @@ If your tools perform sensitive operations (modifying data, spending money, call
284
284
 
285
285
  ### Signing approvals with `experimental_toolApprovalSecret`
286
286
 
287
- When you provide a secret, the server HMAC-signs each approval request at issuance and verifies the signature when the approval is replayed. A forged or tampered approval is rejected before the tool executes.
287
+ When you provide a secret, the server HMAC-signs each approval request at issuance and verifies the signature when the approval is replayed. A forged or tampered approval is rejected before the tool executes. Configure the secret on `ToolLoopAgent` (or pass it directly to `generateText` or `streamText`).
288
288
 
289
- ```ts highlight="5"
290
- const result = await streamText({
289
+ ```ts highlight="6"
290
+ const agent = new ToolLoopAgent({
291
291
  model: __MODEL__,
292
292
  tools: { deleteFile, runQuery },
293
293
  toolApproval: { deleteFile: 'user-approval', runQuery: 'user-approval' },
294
294
  experimental_toolApprovalSecret: process.env.TOOL_APPROVAL_SECRET,
295
+ });
296
+
297
+ const result = await agent.generate({
295
298
  messages,
296
299
  });
297
300
  ```
@@ -308,7 +311,7 @@ The signature binds the approval to the exact tool name, tool call ID, and input
308
311
  ```
309
312
  TOOL_APPROVAL_SECRET=your-generated-secret-here
310
313
  ```
311
- 3. Pass it to `generateText` or `streamText` via `experimental_toolApprovalSecret`.
314
+ 3. Pass it to `ToolLoopAgent`, `generateText`, or `streamText` via `experimental_toolApprovalSecret`.
312
315
 
313
316
  Every serverless instance that might handle a request needs the same secret, since one instance signs the approval and a different instance may verify it on the next turn.
314
317
 
@@ -319,9 +322,12 @@ Every serverless instance that might handle a request needs the same secret, sin
319
322
  - The secret is never sent to the client or included in the stream
320
323
 
321
324
  <Note>
322
- `experimental_toolApprovalSecret` is not yet supported on `WorkflowAgent`. For
323
- durable workflows, the workflow runtime provides its own persistence layer
324
- that can be used to verify approvals.
325
+ `WorkflowAgent` also supports `experimental_toolApprovalSecret`. It signs in
326
+ a workflow step before writing the durable approval request. Pass an
327
+ environment variable reference, such as
328
+ `{ environmentVariable: 'TOOL_APPROVAL_SECRET' }`, so the raw secret is read
329
+ only inside signing and verification steps. Only the signature is persisted
330
+ and sent to the client.
325
331
  </Note>
326
332
 
327
333
  ## Related APIs
@@ -354,8 +354,61 @@ const agent = new WorkflowAgent({
354
354
 
355
355
  Because the workflow is durable, the approval request survives process restarts — the user can approve hours later and the agent will resume.
356
356
 
357
+ ### Signed Tool Approvals
358
+
359
+ Client-supplied message history can be modified before it is replayed to the
360
+ workflow. For tools that perform sensitive operations, configure
361
+ `experimental_toolApprovalSecret` to authenticate approval requests:
362
+
363
+ ```ts highlight="4"
364
+ const agent = new WorkflowAgent({
365
+ model: 'anthropic/claude-sonnet-4-6',
366
+ experimental_toolApprovalSecret: {
367
+ environmentVariable: 'TOOL_APPROVAL_SECRET',
368
+ },
369
+ tools: {
370
+ bookFlight: tool({
371
+ description: 'Book a flight',
372
+ inputSchema: z.object({ flightId: z.string() }),
373
+ needsApproval: true,
374
+ execute: bookFlightStep,
375
+ }),
376
+ },
377
+ });
378
+ ```
379
+
380
+ The agent HMAC-signs the approval ID, tool call ID, tool name, and validated
381
+ input. When approved message history is replayed, a missing or invalid
382
+ signature prevents the tool from executing. The signature is preserved through
383
+ the durable model-call stream, `createModelCallToUIChunkTransform()`,
384
+ `addToolApprovalResponse()`, and `convertToModelMessages()`.
385
+
386
+ Use a high-entropy secret of at least 32 bytes and make the same secret
387
+ available to every worker that can issue or resume an approval. Keep old keys
388
+ available while approvals signed with them are pending; changing the secret
389
+ invalidates those pending approvals.
390
+
391
+ `WorkflowAgent` passes only the environment variable name into signing and
392
+ verification steps. Each step reads the secret from its local environment, and
393
+ the raw value is never included in step arguments, durable stream parts,
394
+ callbacks, or telemetry events. Configure the environment variable on every
395
+ worker, and do not put the secret value in `runtimeContext` or `toolsContext`.
396
+
397
+ You can also provide `experimental_toolApprovalSecret` to `agent.stream()`.
398
+ The stream-level value overrides the constructor default.
399
+
357
400
  ## Loop Control
358
401
 
402
+ Unlike `ToolLoopAgent`, `WorkflowAgent` does not apply a default step limit.
403
+ When `stopWhen` is omitted, it continues until the model stops calling tools or
404
+ another natural termination condition is met.
405
+
406
+ <Note>
407
+ A model that repeatedly calls tools can make an unlimited number of model
408
+ calls. Configure an explicit stop condition when you need to bound execution
409
+ time and cost.
410
+ </Note>
411
+
359
412
  Control how many steps the agent can take:
360
413
 
361
414
  ```ts
@@ -367,7 +420,8 @@ const result = await agent.stream({
367
420
  });
368
421
  ```
369
422
 
370
- If you want the agent to keep running until it has finished calling tools, you can also use `isLoopFinished()`:
423
+ Omitting `stopWhen` already lets `WorkflowAgent` continue until it has finished
424
+ calling tools. You can make that intent explicit with `isLoopFinished()`:
371
425
 
372
426
  ```ts
373
427
  import { isLoopFinished } from 'ai';
@@ -378,9 +432,10 @@ const result = await agent.stream({
378
432
  });
379
433
  ```
380
434
 
381
- `isLoopFinished()` lets the agent run until all tool calls have completed, but you should still pair it with `maxSteps` to avoid runaway loops. See https://ai-sdk.dev/v7/docs/reference/ai-sdk-core/loop-finished#isloopfinished.
382
-
383
- By default, the agent loops until the model stops calling tools (no maximum).
435
+ `isLoopFinished()` is equivalent to omitting `stopWhen` for `WorkflowAgent`.
436
+ Use it with caution because a model that keeps calling tools can run
437
+ indefinitely and incur significant costs. See
438
+ [`isLoopFinished()`](/docs/reference/ai-sdk-core/loop-finished).
384
439
 
385
440
  ## Structured Output
386
441
 
@@ -544,11 +599,11 @@ Agents provide lifecycle callbacks for logging, observability, and custom teleme
544
599
  const agent = new WorkflowAgent({
545
600
  model: 'anthropic/claude-sonnet-4-6',
546
601
 
547
- experimental_onStart({ modelId, messages }) {
548
- console.log('Agent started');
602
+ onStart({ messages }) {
603
+ console.log(`Agent started with ${messages.length} messages`);
549
604
  },
550
605
 
551
- experimental_onStepStart({ stepNumber }) {
606
+ onStepStart({ stepNumber }) {
552
607
  console.log(`Step ${stepNumber} starting`);
553
608
  },
554
609
 
@@ -556,8 +611,11 @@ const agent = new WorkflowAgent({
556
611
  console.log(`Calling tool: ${toolCall.toolName}`);
557
612
  },
558
613
 
559
- onToolExecutionEnd({ toolCall, toolOutput }) {
560
- console.log(`Tool finished: ${toolCall.toolName}`);
614
+ onToolExecutionEnd({ toolCall, success, durationMs }) {
615
+ console.log(`Tool finished: ${toolCall.toolName}`, {
616
+ success,
617
+ durationMs,
618
+ });
561
619
  },
562
620
 
563
621
  onStepEnd({ usage, finishReason }) {
@@ -570,6 +628,32 @@ const agent = new WorkflowAgent({
570
628
  });
571
629
  ```
572
630
 
631
+ For concrete tool sets, `WorkflowAgentToolExecutionStartEvent` and
632
+ `WorkflowAgentToolExecutionEndEvent` preserve the relationship between each
633
+ tool name and its input, context, and output types. TypeScript narrows the
634
+ nested `toolCall` directly, but use `Extract` or a user-defined type guard when
635
+ you need to narrow the correlated `toolContext` or `output` fields by tool name.
636
+
637
+ Tool input callbacks (`onInputStart`, `onInputDelta`, and
638
+ `onInputAvailable`) are also preserved by `WorkflowAgent`. The model call runs
639
+ inside a durable step, while callback functions remain in the workflow
640
+ context because arbitrary functions cannot cross the step boundary. As a
641
+ result, `WorkflowAgent` records the callback events during the model step and
642
+ replays them in order immediately after that step completes, before tool
643
+ execution and step lifecycle callbacks. They do not run concurrently with
644
+ model generation and cannot provide in-flight cancellation or backpressure.
645
+ Each callback receives its tool's `toolsContext` entry after
646
+ `contextSchema` validation.
647
+
648
+ For highly fragmented tool inputs, `onInputDelta` replay data is part of the
649
+ durable model-step result. Only configure `onInputDelta` when each generated
650
+ delta is needed; omit it to avoid retaining delta replay data.
651
+
652
+ The deprecated `experimental_onStart` and `experimental_onStepStart` names
653
+ remain available for backwards compatibility. When both the stable and
654
+ experimental name are provided in the same constructor or `stream()` call, the
655
+ stable callback is used.
656
+
573
657
  ## Type Inference
574
658
 
575
659
  Infer the UI message type for type-safe client components:
@@ -721,7 +805,7 @@ For persistence, store `UIMessage[]` as your source of truth and call [`convertT
721
805
 
722
806
  ### Everything else
723
807
 
724
- Other options carry over with the same names: `prepareStep`, `onStepEnd`, `onEnd`, `onError`, `toolChoice`, `activeTools`, `timeout`, `repairToolCall`, `experimental_sandbox`, and the usual generation settings (`temperature`, `maxOutputTokens`, `topP`, …). `WorkflowAgent` additionally adds `prepareCall` (runs once before the loop) and the `experimental_onStart` / `experimental_onStepStart` / `onToolExecutionStart` / `onToolExecutionEnd` lifecycle callbacks documented above.
808
+ Other options carry over with the same names: `prepareStep`, `onStart`, `onStepStart`, `onStepEnd`, `onEnd`, `onError`, `toolChoice`, `activeTools`, `timeout`, `repairToolCall`, `experimental_sandbox`, and the usual generation settings (`temperature`, `maxOutputTokens`, `topP`, …). `WorkflowAgent` additionally adds `prepareCall` (runs once before the loop) and the `onToolExecutionStart` / `onToolExecutionEnd` lifecycle callbacks documented above. The deprecated `experimental_onStart` and `experimental_onStepStart` aliases remain available for backwards compatibility.
725
809
 
726
810
  ## Next Steps
727
811
 
@@ -177,7 +177,9 @@ const { output } = await generateText({
177
177
 
178
178
  ### `Output.array()`
179
179
 
180
- Use `Output.array({ element })` to specify that you expect an array of typed objects from the model, where each element should conform to a schema (defined in the `element` property).
180
+ Use `Output.array({ element, minItems, maxItems })` to specify that you expect
181
+ an array of typed objects from the model. Each element must conform to the
182
+ `element` schema, and the optional bounds constrain the number of elements.
181
183
 
182
184
  ```ts
183
185
  import { generateText, Output } from 'ai';
@@ -191,6 +193,8 @@ const { output } = await generateText({
191
193
  temperature: z.number(),
192
194
  condition: z.string(),
193
195
  }),
196
+ minItems: 2,
197
+ maxItems: 2,
194
198
  }),
195
199
  prompt: 'List the weather for San Francisco and Paris.',
196
200
  });
@@ -201,6 +205,11 @@ const { output } = await generateText({
201
205
  // ]
202
206
  ```
203
207
 
208
+ `minItems` and `maxItems` must be non-negative integers, and `minItems` cannot
209
+ be greater than `maxItems`. Use the same value for both options to require an
210
+ exact length. The bounds are sent to providers as part of the structured output
211
+ schema when supported, and the AI SDK independently validates the final output.
212
+
204
213
  When streaming arrays with `streamText`, you can use `elementStream` to receive each completed element as it is generated:
205
214
 
206
215
  ```ts
@@ -227,7 +236,10 @@ for await (const hero of elementStream) {
227
236
  <Note>
228
237
  Each element emitted by `elementStream` is complete and validated against your
229
238
  element schema. This differs from `partialOutputStream`, which streams the
230
- entire partial array including incomplete elements.
239
+ entire partial array including incomplete elements. If the model generates
240
+ more than `maxItems`, `elementStream` errors before emitting the first excess
241
+ element. This does not automatically abort provider generation, and the final
242
+ `output` promise rejects.
231
243
  </Note>
232
244
 
233
245
  ### `Output.choice()`
@@ -378,7 +390,7 @@ const { output } = await generateText({
378
390
  This works with all output types that support structured generation:
379
391
 
380
392
  - `Output.object({ name, description, schema })`
381
- - `Output.array({ name, description, element })`
393
+ - `Output.array({ name, description, element, minItems, maxItems })`
382
394
  - `Output.choice({ name, description, options })`
383
395
  - `Output.json({ name, description })`
384
396