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.
- package/LICENSE +160 -3
- package/THIRD_PARTY_NOTICES.txt +14 -14
- package/dist/cli-core.js +7 -0
- package/dist/onboarding-catalog.js +1 -0
- package/dist/pi-tui-pickers.js +183 -21
- package/dist/pi-tui-runner.js +150 -18
- package/dist/runtime-host-onboarding.js +345 -5
- package/dist/runtime-host-run-command.js +15 -7
- package/dist/runtime-host-session-driver.js +18 -0
- package/dist/runtime-host-tui-command.js +21 -5
- package/dist/runtime-host-tui-context.js +19 -5
- package/dist/session-import-command.js +69 -0
- package/dist/tui-copy-catalog.js +93 -9
- package/native/runtime-host-peer/prebuilds/darwin-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/win32-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +66 -0
- package/node_modules/@ai-sdk/anthropic/dist/index.js +375 -197
- package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +181 -74
- package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +123 -43
- package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/CHANGELOG.md +32 -0
- package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/package.json +1 -1
- package/node_modules/@ai-sdk/anthropic/package.json +3 -3
- package/node_modules/@ai-sdk/cohere/CHANGELOG.md +53 -0
- package/node_modules/@ai-sdk/cohere/dist/index.js +1 -1
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/cohere/package.json +3 -3
- package/node_modules/@ai-sdk/google/CHANGELOG.md +92 -0
- package/node_modules/@ai-sdk/google/dist/index.js +941 -420
- package/node_modules/@ai-sdk/google/dist/internal/index.js +394 -103
- package/node_modules/@ai-sdk/google/docs/15-google.mdx +195 -85
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/google/package.json +3 -3
- package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +65 -0
- package/node_modules/@ai-sdk/open-responses/dist/index.js +51 -13
- package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +7 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/open-responses/package.json +3 -3
- package/node_modules/@ai-sdk/openai/CHANGELOG.md +118 -0
- package/node_modules/@ai-sdk/openai/dist/index.js +1080 -316
- package/node_modules/@ai-sdk/openai/dist/internal/index.js +549 -157
- package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +202 -66
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai/package.json +3 -3
- package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +60 -0
- package/node_modules/@ai-sdk/openai-compatible/dist/index.js +8 -2
- package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +0 -1
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai-compatible/package.json +3 -3
- package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +48 -0
- package/node_modules/@ai-sdk/provider-utils/dist/index.js +485 -181
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/provider-utils/package.json +3 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -4
- package/node_modules/@maka/core/dist/chat-model-choice.js +1 -2
- package/node_modules/@maka/core/dist/collaboration.js +12 -0
- package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
- package/node_modules/@maka/core/dist/llm-connections.js +1 -1
- package/node_modules/@maka/core/dist/model-catalog.js +26 -103
- package/node_modules/@maka/core/dist/model-facts.js +0 -74
- package/node_modules/@maka/core/dist/model-thinking.js +70 -38
- package/node_modules/@maka/core/dist/permission-profile.js +17 -0
- package/node_modules/@maka/core/dist/provider-registry.js +1 -3
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +68 -46
- package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +21 -12
- package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +43 -4
- package/node_modules/@maka/core/dist/runtime-policy.js +3 -2
- package/node_modules/@maka/core/dist/scheduled-task.js +8 -2
- package/node_modules/@maka/core/dist/settings.js +12 -0
- package/node_modules/@maka/core/dist/text-sanitize.js +8 -2
- package/node_modules/@maka/runtime/dist/agent-run.js +8 -1
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +1 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +50 -58
- package/node_modules/@maka/runtime/dist/archive-read-tool.js +3 -1
- package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/bots/bot-test.js +2 -1
- package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +86 -19
- package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +24 -20
- package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +5 -3
- package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +87 -29
- package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +40 -36
- package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
- package/node_modules/@maka/runtime/dist/computer-use-tools.js +4 -1
- package/node_modules/@maka/runtime/dist/context-budget-policy.js +6 -24
- package/node_modules/@maka/runtime/dist/deep-research-tools.js +11 -5
- package/node_modules/@maka/runtime/dist/edit-replace.js +2 -2
- package/node_modules/@maka/runtime/dist/filesystem-worker/operations.js +5 -6
- package/node_modules/@maka/runtime/dist/memory-extraction-evidence.js +7 -1
- package/node_modules/@maka/runtime/dist/memory-extraction.js +12 -7
- package/node_modules/@maka/runtime/dist/model-adapter.js +13 -3
- package/node_modules/@maka/runtime/dist/model-factory.js +1 -1
- package/node_modules/@maka/runtime/dist/openai-responses-websocket.js +2 -5
- package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +11 -2
- package/node_modules/@maka/runtime/dist/request-customization-fetch.js +14 -7
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +70 -14
- package/node_modules/@maka/runtime/dist/session-export.js +1 -0
- package/node_modules/@maka/runtime/dist/session-import.js +100 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +143 -24
- package/node_modules/@maka/runtime/dist/session-trace-projection.js +22 -0
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +9 -6
- package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +13 -6
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +43 -10
- package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/subagent-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/subscription-model-fetch.js +1 -4
- package/node_modules/@maka/runtime/dist/system-prompt/workspace-instructions.js +11 -6
- package/node_modules/@maka/runtime/dist/tavily-search.js +8 -2
- package/node_modules/@maka/runtime/dist/text-line-window.js +49 -0
- package/node_modules/@maka/runtime/dist/tool-availability.js +0 -1
- package/node_modules/@maka/runtime/dist/tool-output.js +35 -12
- package/node_modules/@maka/runtime/dist/tool-runtime.js +27 -3
- package/node_modules/@maka/runtime/dist/unified-diff.js +40 -10
- package/node_modules/@maka/runtime/dist/web-fetch-tool.js +4 -2
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +82 -33
- package/node_modules/@maka/runtime/dist/workspace-executor.js +2 -6
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +13 -0
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/run-code-mode.js +2 -0
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/package.json +3 -3
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/CHANGELOG.md +101 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +13 -0
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/dist/index.js +309 -244
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/docs/00-ai-gateway.mdx +29 -16
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/package.json +3 -3
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/CHANGELOG.md +152 -0
- package/node_modules/@maka/runtime/node_modules/ai/LICENSE +13 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/dist/index.js +2505 -1548
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/dist/internal/index.js +129 -107
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/02-providers-and-models.mdx +8 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/04-loop-control.mdx +5 -3
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-policy-tool-approvals.mdx +2 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-tool-approvals.mdx +13 -7
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/07-workflow-agent.mdx +94 -10
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/10-generating-structured-data.mdx +15 -3
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +2 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/16-mcp-tools.mdx +64 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/35-image-generation.mdx +11 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-transcription.mdx +36 -35
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/37-speech.mdx +0 -17
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/39-file-uploads.mdx +25 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +372 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/50-error-handling.mdx +83 -6
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/60-telemetry.mdx +28 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/index.mdx +5 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +40 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +47 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +23 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/20-streaming-data.mdx +11 -6
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/50-stream-protocol.mdx +6 -2
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/04-caching.mdx +7 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/11-secure-url-fetching.mdx +7 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +14 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +39 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/05-embed.mdx +31 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +32 -6
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +19 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +2 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +37 -4
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/28-output.mdx +27 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +63 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +1 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/index.mdx +25 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +4 -0
- 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
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +101 -34
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +6 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +7 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/index.mdx +1 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/package.json +12 -12
- package/node_modules/@maka/runtime/package.json +11 -10
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +17 -36
- package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +5 -7
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +6 -6
- package/node_modules/@maka/runtime-host/dist/peer-mesh/node.js +7 -4
- package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +2 -2
- package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +14 -1
- package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +23 -4
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +4 -1
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +16 -20
- package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-transcript.js +3 -2
- package/node_modules/@maka/runtime-host/dist/protocol/skill-catalog.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
- package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +12 -10
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +85 -7
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +2 -2
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +4 -7
- package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
- package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +7 -7
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +6 -1
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +35 -4
- package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
- package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +24 -8
- package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +13 -1
- package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +11 -5
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +8 -6
- package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
- package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
- package/node_modules/@maka/runtime-host/dist/server/root-admission-owner.js +17 -8
- package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +23 -25
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +12 -18
- package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +15 -11
- package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +163 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +24 -12
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +20 -21
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +1 -0
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-pager.js +24 -2
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +18 -2
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
- package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +16 -19
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +1 -0
- package/node_modules/@maka/runtime-host/dist/transport/framed-byte-stream-transport.js +4 -1
- package/node_modules/@maka/runtime-host/dist/transport/local-ipc-framing.js +4 -2
- package/node_modules/@maka/runtime-host/dist/transport/peer-native.js +9 -8
- package/node_modules/@maka/runtime-host/dist/transport/resumable-peer-stream.js +14 -9
- package/node_modules/@maka/runtime-host/package.json +1 -0
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +70 -5
- package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
- package/node_modules/@maka/storage/dist/model-facts-store.js +5 -28
- package/node_modules/@maka/storage/dist/project-catalog.js +6 -0
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +111 -38
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +46 -61
- package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +25 -6
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +30 -14
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +10 -4
- package/node_modules/@maka/storage/dist/scheduled-task-store.js +8 -1
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +680 -7
- package/node_modules/@maka/storage/dist/session-message-projection.js +8 -4
- package/node_modules/@maka/storage/dist/session-store.js +3 -0
- package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +18 -4
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +3 -7
- package/node_modules/@maka/storage/dist/stable-storage.js +2 -1
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +22 -5
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +22 -5
- package/node_modules/run/README.md +109 -18
- package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
- package/node_modules/run/dist/continuation-validation.js +116 -1
- package/node_modules/run/dist/errors.js +12 -2
- package/node_modules/run/dist/host-function-invocation.js +2 -1
- package/node_modules/run/dist/run.js +30 -4
- package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
- package/node_modules/run/dist/runtime/guest-sources.js +214 -56
- package/node_modules/run/dist/runtime/manager.js +575 -116
- package/node_modules/run/dist/runtime/max-workers.js +8 -4
- package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
- package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
- package/node_modules/run/dist/runtime/worker-source.js +1 -1
- package/node_modules/run/dist/utils/options.js +7 -0
- package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
- package/node_modules/run/dist/utils/serde.js +1 -7
- package/node_modules/run/dist/utils/source-cache.js +83 -13
- package/node_modules/run/package.json +6 -4
- package/node_modules/zod/v4/core/memoizer.cjs +12 -16
- package/node_modules/zod/v4/core/memoizer.js +12 -16
- package/package.json +1 -1
- package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +0 -45
- /package/node_modules/@ai-sdk/{code-mode → anthropic/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/README.md +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/dist/index.js +0 -0
- /package/node_modules/@ai-sdk/{gateway → cohere/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → google/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{ai → @ai-sdk/open-responses/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/README.md +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/code-mode-tool.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/errors.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/index.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-prompt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/types.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/src/tsconfig.json +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/00-introduction/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/03-prompts.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/04-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/05-streaming.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/06-provider-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/00-choosing-a-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/02-nextjs-app-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/04-svelte.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/05-nuxt.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/06-nodejs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/07-expo.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/08-tanstack-start.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/09-coding-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/02-building-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/03-workflows.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/05-configuring-call-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-memory.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-subagents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/05-generating-text.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/18-code-mode.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/26-reasoning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/31-reranking.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/40-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/45-provider-management.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/55-testing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-devtools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/05-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/02-stopping-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/03-backpressure.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
- /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
- /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
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
- /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
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
- /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
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
- /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
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +0 -0
- /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
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +0 -0
- /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
- /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
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +0 -0
- /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.
|
|
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
|
|
1769
|
+
parameter,
|
|
1766
1770
|
value: maxRetries,
|
|
1767
|
-
message:
|
|
1771
|
+
message: `${parameter} must be an integer`
|
|
1768
1772
|
});
|
|
1769
1773
|
}
|
|
1770
1774
|
if (maxRetries < 0) {
|
|
1771
1775
|
throw new InvalidArgumentError({
|
|
1772
|
-
parameter
|
|
1776
|
+
parameter,
|
|
1773
1777
|
value: maxRetries,
|
|
1774
|
-
message:
|
|
1778
|
+
message: `${parameter} must be >= 0`
|
|
1775
1779
|
});
|
|
1776
1780
|
}
|
|
1777
1781
|
}
|
|
1778
|
-
const maxRetriesResult = maxRetries != null ? maxRetries :
|
|
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
|
|
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 /> |
|
package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/04-loop-control.mdx
RENAMED
|
@@ -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,
|
|
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), //
|
|
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
|
|
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
|
|
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
|
|
package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-tool-approvals.mdx
RENAMED
|
@@ -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="
|
|
290
|
-
const
|
|
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
|
|
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
|
-
`
|
|
323
|
-
|
|
324
|
-
|
|
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
|
package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/07-workflow-agent.mdx
RENAMED
|
@@ -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
|
-
|
|
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()`
|
|
382
|
-
|
|
383
|
-
|
|
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
|
-
|
|
548
|
-
console.log(
|
|
602
|
+
onStart({ messages }) {
|
|
603
|
+
console.log(`Agent started with ${messages.length} messages`);
|
|
549
604
|
},
|
|
550
605
|
|
|
551
|
-
|
|
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,
|
|
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 `
|
|
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
|
|
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
|
|