maka-agent 0.2.0-dev.62.20260928 → 0.2.0-dev.67.20261002
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 +16 -16
- package/THIRD_PARTY_NOTICES.txt +29 -29
- package/dist/pi-tui-runner.js +26 -29
- package/dist/tui-copy-catalog.js +9 -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/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +12 -12
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +5 -4
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +7 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +51 -8
- package/node_modules/@agentclientprotocol/sdk/package.json +2 -2
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +90 -2
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +103 -12
- package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +140 -0
- package/node_modules/@ai-sdk/anthropic/README.md +1 -1
- package/node_modules/@ai-sdk/anthropic/dist/index.js +1622 -868
- package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +1516 -763
- package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +483 -62
- package/node_modules/@ai-sdk/anthropic/package.json +4 -4
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/approval-continuation.js +0 -1
- package/node_modules/@ai-sdk/code-mode/dist/code-mode-tool.js +59 -0
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/errors.js +0 -8
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -2
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/tool-prompt.js +43 -15
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/package.json +3 -3
- package/node_modules/@ai-sdk/cohere/CHANGELOG.md +99 -0
- package/node_modules/@ai-sdk/cohere/README.md +1 -1
- package/node_modules/@ai-sdk/cohere/dist/index.js +35 -49
- package/node_modules/@ai-sdk/cohere/docs/25-cohere.mdx +11 -9
- package/node_modules/@ai-sdk/cohere/package.json +4 -4
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/gateway/CHANGELOG.md +183 -0
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/gateway/README.md +1 -1
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/gateway/dist/index.js +587 -245
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/gateway/docs/00-ai-gateway.mdx +235 -30
- package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/gateway/package.json +4 -4
- package/node_modules/@ai-sdk/google/CHANGELOG.md +180 -0
- package/node_modules/@ai-sdk/google/README.md +1 -1
- package/node_modules/@ai-sdk/google/dist/index.js +1147 -1130
- package/node_modules/@ai-sdk/google/dist/internal/index.js +809 -889
- package/node_modules/@ai-sdk/google/docs/15-google.mdx +224 -41
- package/node_modules/@ai-sdk/google/package.json +4 -4
- package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +109 -0
- package/node_modules/@ai-sdk/open-responses/dist/index.js +419 -183
- package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +121 -6
- package/node_modules/@ai-sdk/open-responses/package.json +4 -4
- package/node_modules/@ai-sdk/openai/CHANGELOG.md +147 -0
- package/node_modules/@ai-sdk/openai/README.md +27 -2
- package/node_modules/@ai-sdk/openai/dist/index.js +2445 -1828
- package/node_modules/@ai-sdk/openai/dist/internal/index.js +2170 -2041
- package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +311 -102
- package/node_modules/@ai-sdk/openai/package.json +4 -4
- package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +110 -0
- package/node_modules/@ai-sdk/openai-compatible/dist/index.js +120 -130
- package/node_modules/@ai-sdk/openai-compatible/dist/internal/index.js +22 -14
- package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +2 -0
- package/node_modules/@ai-sdk/openai-compatible/package.json +4 -4
- package/node_modules/@ai-sdk/{anthropic/node_modules/@ai-sdk/provider → provider}/CHANGELOG.md +47 -0
- package/node_modules/@ai-sdk/{cohere/node_modules/@ai-sdk/provider → provider}/dist/index.js +127 -102
- package/node_modules/@ai-sdk/{anthropic/node_modules/@ai-sdk/provider → provider}/package.json +1 -1
- package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +99 -0
- package/node_modules/@ai-sdk/provider-utils/dist/experimental-evaluation/index.js +1618 -0
- package/node_modules/@ai-sdk/provider-utils/dist/index.js +470 -268
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +3 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Dispatcher.md +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h2.js +84 -19
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/retry-handler.js +109 -23
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/decompress.js +338 -46
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/connection.js +19 -9
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/package.json +1 -1
- package/node_modules/@ai-sdk/provider-utils/package.json +7 -2
- package/node_modules/@earendil-works/pi-tui/README.md +8 -2
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +18 -11
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +7 -6
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +23 -22
- package/node_modules/@earendil-works/pi-tui/dist/index.js +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/latex.js +109 -16
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +3 -44
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +42 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +2 -20
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +25 -6
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +4 -0
- package/node_modules/@earendil-works/pi-tui/native/clipboard.h +170 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +8 -6
- package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +12 -5
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-modifiers.node → darwin-platform.node} +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-modifiers.node → darwin-platform.node} +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +93 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/README.md +23 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +65 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +70 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +274 -0
- package/node_modules/@earendil-works/pi-tui/native/napi.h +89 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/README.md +16 -7
- package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +7 -4
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +241 -0
- package/node_modules/@earendil-works/pi-tui/package.json +11 -4
- package/node_modules/@larksuiteoapi/node-sdk/README.md +20 -0
- package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +20 -0
- package/node_modules/@larksuiteoapi/node-sdk/es/index.js +33 -1
- package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +33 -1
- package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
- package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +17 -0
- package/node_modules/@maka/acp-executor-plugin/package.json +1 -1
- package/node_modules/@maka/core/dist/model-web-search.js +2 -3
- package/node_modules/@maka/core/dist/relative-time.js +19 -20
- package/node_modules/@maka/core/dist/settings.js +2 -2
- package/node_modules/@maka/core/dist/tool-ledger-scanner.js +53 -150
- package/node_modules/@maka/eval/harbor/egress_filter.py +64 -47
- package/node_modules/@maka/eval/harbor/eval_framework.py +3 -3
- package/node_modules/@maka/eval/harbor/run_trial.py +2 -2
- package/node_modules/@maka/eval/node_modules/undici/README.md +10 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +6 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +5 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +72 -13
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/cache.js +4 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/decompress.js +236 -69
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/index.js +46 -25
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/@maka/eval/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/@maka/eval/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/mcp/package.json +1 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +23 -4
- package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +33 -3
- package/node_modules/@maka/runtime/dist/conversation-copy.js +6 -0
- package/node_modules/@maka/runtime/dist/deepseek-web-search-codec.js +71 -0
- package/node_modules/@maka/runtime/dist/history-compaction.js +11 -4
- package/node_modules/@maka/runtime/dist/model-adapter.js +9 -5
- package/node_modules/@maka/runtime/dist/model-factory.js +4 -0
- package/node_modules/@maka/runtime/dist/plugin-agent-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-attachment-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +26 -36
- package/node_modules/@maka/runtime/dist/plugin-data-services.js +9 -26
- package/node_modules/@maka/runtime/dist/plugin-fs-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-goal-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-internals.js +78 -0
- package/node_modules/@maka/runtime/dist/plugin-llm-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-runtime.js +4 -32
- package/node_modules/@maka/runtime/dist/plugin-session-query-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-shell-service.js +5 -13
- package/node_modules/@maka/runtime/dist/plugin-web-service.js +5 -13
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +17 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +25 -40
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +82 -16
- package/node_modules/@maka/runtime/dist/stream-graph-projection.js +64 -0
- package/node_modules/@maka/runtime/dist/stream-graph-read-model.js +138 -20
- package/node_modules/@maka/runtime/dist/tool-availability.js +10 -3
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +161 -104
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +3 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/Dispatcher.md +1 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h2.js +84 -19
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/retry-handler.js +109 -23
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/decompress.js +338 -46
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/connection.js +19 -9
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/README.md +10 -1
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +6 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +5 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +72 -13
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/cache.js +4 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/decompress.js +236 -69
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/index.js +46 -25
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/@maka/runtime/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/runtime/package.json +11 -11
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +3 -7
- package/node_modules/@maka/runtime-host/dist/candidate-cli.js +7 -7
- package/node_modules/@maka/runtime-host/dist/candidate-entry.js +15 -0
- package/node_modules/@maka/runtime-host/dist/candidate-startup-failure.js +5 -0
- package/node_modules/@maka/runtime-host/dist/client/session-catalog-summary.js +1 -0
- package/node_modules/@maka/runtime-host/dist/client/startup-error.js +5 -0
- package/node_modules/@maka/runtime-host/dist/protocol/agent-graph.js +46 -1
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +14 -1
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +5 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +12 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-retirement.js +46 -10
- package/node_modules/@maka/runtime-host/dist/protocol/storage-usage.js +155 -0
- package/node_modules/@maka/runtime-host/dist/protocol/turn.js +20 -8
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +23 -0
- package/node_modules/@maka/runtime-host/dist/server/canonical-turn-snapshot.js +5 -0
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +27 -6
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +2 -0
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +107 -63
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +1 -3
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +6 -0
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +51 -16
- package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +112 -36
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +27 -1
- package/node_modules/@maka/runtime-host/dist/server/storage-usage-coordinator.js +67 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-inspection-tool.js +208 -0
- package/node_modules/@maka/runtime-host/package.json +2 -2
- package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +3 -1
- package/node_modules/@maka/storage/dist/operational-state-store.js +0 -13
- package/node_modules/@maka/storage/dist/project-catalog.js +13 -20
- package/node_modules/@maka/storage/dist/session-store.js +9 -6
- package/node_modules/@maka/storage/dist/sqlite-file-set.js +22 -0
- package/node_modules/@maka/storage/dist/sqlite-long-term-memory-store.js +1 -3
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +10 -260
- package/node_modules/@maka/storage/dist/sqlite-session-catalog-query.js +1 -0
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +18 -6
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +28 -6
- package/node_modules/@maka/storage/dist/storage-footprint.js +239 -0
- package/node_modules/@maka/storage/dist/storage-writer-composition.js +10 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-BCtJi0p5.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-CEk3qkZM.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +375 -60
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +369 -61
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/{src-NAgB4Mp8.cjs → src-D0qEN74R.cjs} +111 -38
- package/node_modules/@modelcontextprotocol/client/dist/{src-D_zzAWoS.mjs → src-DDAAhLnO.mjs} +106 -33
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +8 -2
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +8 -2
- package/node_modules/@modelcontextprotocol/{core/dist/auth-hYtaIUZm.d.cts.map → client/node_modules/@modelcontextprotocol/core/dist/auth--n_Yzytt.d.cts.map} +1 -1
- package/node_modules/@modelcontextprotocol/{core/dist/auth-CfDMXiII.cjs → client/node_modules/@modelcontextprotocol/core/dist/auth-4-zilcqg.cjs} +3 -2
- package/node_modules/@modelcontextprotocol/{core/dist/auth-CUe6YdwF.mjs → client/node_modules/@modelcontextprotocol/core/dist/auth-CGP0BDVq.mjs} +3 -2
- package/node_modules/@modelcontextprotocol/{core/dist/auth-BWdKR39I.d.mts.map → client/node_modules/@modelcontextprotocol/core/dist/auth-YUQV3RRv.d.mts.map} +1 -1
- package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/index.cjs +1 -1
- package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/index.mjs +1 -1
- package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/internal.cjs +1 -1
- package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/internal.mjs +1 -1
- package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/package.json +1 -1
- package/node_modules/@modelcontextprotocol/client/package.json +4 -4
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/package.json +2 -17
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/CHANGELOG.md +311 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/README.md +6 -6
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/dist/index.js +4830 -1974
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/dist/internal/index.js +694 -332
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/00-introduction/index.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/02-providers-and-models.mdx +5 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/03-prompts.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/04-tools.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/06-provider-options.mdx +11 -11
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/00-choosing-a-provider.mdx +4 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/02-nextjs-app-router.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +4 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/04-svelte.mdx +7 -7
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/05-nuxt.mdx +8 -8
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/06-nodejs.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/07-expo.mdx +10 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/08-tanstack-start.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/09-coding-agents.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/02-building-agents.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/03-workflows.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/04-loop-control.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/05-configuring-call-options.mdx +4 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/06-memory.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/06-policy-tool-approvals.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/06-tool-approvals.mdx +16 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/07-workflow-agent.mdx +12 -12
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/08-terminal-ui.mdx +14 -10
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/05-generating-text.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +6 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/16-mcp-tools.mdx +31 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/18-code-mode.mdx +50 -0
- package/node_modules/ai/docs/03-ai-sdk-core/19-tool-search.mdx +82 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/26-reasoning.mdx +15 -14
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/31-reranking.mdx +12 -10
- package/node_modules/ai/docs/03-ai-sdk-core/32-evaluation.mdx +287 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/35-image-generation.mdx +40 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/36-realtime.mdx +41 -18
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/36-transcription.mdx +1 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/37-speech.mdx +8 -6
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/39-file-uploads.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/40-middleware.mdx +92 -7
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/42-batch.mdx +2 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/45-provider-management.mdx +31 -21
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/55-testing.mdx +75 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/60-telemetry.mdx +57 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/65-devtools.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +132 -7
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/index.mdx +6 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +3 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +151 -112
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +47 -22
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +43 -9
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +33 -30
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +8 -6
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/01-overview.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +47 -21
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +46 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +11 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +10 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/05-completion.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +4 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +28 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/21-transport.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +5 -5
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/02-stopping-streams.mdx +8 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/04-caching.mdx +2 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/11-secure-url-fetching.mdx +47 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +13 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +16 -7
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +5 -5
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +3 -3
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-evaluate.mdx +74 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +4 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +7 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +7 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-tool-search.mdx +76 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +30 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +12 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +19 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +22 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +17 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/index.mdx +6 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +4 -1
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +563 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +12 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +9 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +2 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +8 -8
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +4 -4
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +4 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-evaluation-unsupported-question-type-error.mdx +31 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +4 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +4 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +6 -2
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +138 -0
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +13 -9
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +5 -5
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +3 -3
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +1 -1
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +2 -2
- package/node_modules/{@maka/runtime/node_modules/ai → ai}/package.json +13 -13
- package/node_modules/axios/CHANGELOG.md +62 -0
- package/node_modules/axios/README.md +297 -5
- package/node_modules/axios/dist/axios.js +728 -170
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/browser/axios.cjs +871 -188
- package/node_modules/axios/dist/esm/axios.js +871 -188
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/node/axios.cjs +1037 -225
- package/node_modules/axios/lib/adapters/fetch.js +64 -11
- package/node_modules/axios/lib/adapters/http.js +140 -67
- package/node_modules/axios/lib/adapters/xhr.js +52 -3
- package/node_modules/axios/lib/core/Axios.js +43 -20
- package/node_modules/axios/lib/core/AxiosError.js +33 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +124 -1
- package/node_modules/axios/lib/core/InterceptorManager.js +107 -8
- package/node_modules/axios/lib/core/buildFullPath.js +41 -15
- package/node_modules/axios/lib/core/dispatchRequest.js +8 -2
- package/node_modules/axios/lib/core/mergeConfig.js +19 -4
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/defaults/index.js +2 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +12 -1
- package/node_modules/axios/lib/helpers/combineURLs.js +11 -3
- package/node_modules/axios/lib/helpers/composeSignals.js +12 -1
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +115 -54
- package/node_modules/axios/lib/helpers/formDataToJSON.js +11 -5
- package/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +5 -3
- package/node_modules/axios/lib/helpers/progressEventReducer.js +4 -4
- package/node_modules/axios/lib/helpers/resolveConfig.js +5 -17
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +300 -5
- package/node_modules/axios/lib/helpers/throttle.js +3 -2
- package/node_modules/axios/lib/helpers/toFormData.js +17 -23
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/utils.js +151 -18
- package/node_modules/axios/package.json +21 -19
- package/node_modules/brace-expansion/dist/commonjs/index.js +69 -25
- package/node_modules/brace-expansion/dist/esm/index.js +68 -24
- package/node_modules/brace-expansion/package.json +2 -1
- package/node_modules/fast-uri/index.js +10 -6
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/image-dimensions/cli.js +18 -3
- package/node_modules/image-dimensions/index.js +7 -5
- package/node_modules/image-dimensions/package.json +4 -1
- package/node_modules/image-dimensions/readme.md +2 -1
- package/node_modules/image-dimensions/types/avif.js +2 -24
- package/node_modules/image-dimensions/types/heic.js +2 -24
- package/node_modules/image-dimensions/types/jpeg.js +28 -7
- package/node_modules/image-dimensions/types/png.js +13 -2
- package/node_modules/image-dimensions/types/webp.js +20 -36
- package/node_modules/image-dimensions/utilities.js +184 -60
- package/node_modules/ip-address/README.md +145 -135
- package/node_modules/ip-address/dist/common.js +48 -0
- package/node_modules/ip-address/dist/ipv4.js +117 -11
- package/node_modules/ip-address/dist/ipv6.js +162 -48
- package/node_modules/ip-address/dist/v4/constants.js +40 -1
- package/node_modules/ip-address/dist/v6/constants.js +47 -1
- package/node_modules/ip-address/package.json +1 -1
- package/node_modules/marked/README.md +1 -0
- package/node_modules/marked/lib/marked.esm.js +30 -29
- package/node_modules/marked/lib/marked.umd.js +30 -29
- package/node_modules/marked/man/marked.1 +1 -1
- package/node_modules/marked/package.json +11 -11
- package/node_modules/systeminformation/lib/battery.js +32 -11
- package/node_modules/systeminformation/lib/cpu.js +23 -23
- package/node_modules/systeminformation/lib/filesystem.js +14 -8
- package/node_modules/systeminformation/lib/memory.js +3 -5
- package/node_modules/systeminformation/lib/network.js +8 -2
- package/node_modules/systeminformation/lib/osinfo.js +17 -3
- package/node_modules/systeminformation/lib/util.js +7 -0
- package/node_modules/systeminformation/package.json +1 -1
- package/node_modules/undici/README.md +10 -1
- package/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
- package/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
- package/node_modules/undici/lib/dispatcher/client.js +6 -1
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
- package/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
- package/node_modules/undici/lib/handler/redirect-handler.js +5 -0
- package/node_modules/undici/lib/handler/retry-handler.js +72 -13
- package/node_modules/undici/lib/interceptor/cache.js +4 -1
- package/node_modules/undici/lib/interceptor/decompress.js +236 -69
- package/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
- package/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/undici/lib/web/fetch/index.js +46 -25
- package/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/undici/package.json +1 -1
- package/package.json +4 -4
- package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +0 -13
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/LICENSE +0 -13
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +0 -13
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +0 -70
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +0 -119
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +0 -13
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/dist/code-mode-tool.js +0 -40
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +0 -13
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1262
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +0 -13
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@maka/runtime/node_modules/ai/LICENSE +0 -13
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -247
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +0 -43
- package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts.map +0 -1
- /package/node_modules/@ai-sdk/{anthropic/node_modules/@ai-sdk/provider → code-mode}/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/approval.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/run-code-mode.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/types.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@ai-sdk → @ai-sdk}/code-mode/src/tsconfig.json +0 -0
- /package/node_modules/@ai-sdk/{cohere/node_modules/@ai-sdk/provider → gateway}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{google/node_modules/@ai-sdk/provider → provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{anthropic/node_modules/@ai-sdk/provider → provider}/README.md +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/LICENSE +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/README.md +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/internal.d.cts.map +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/internal.d.mts.map +0 -0
- /package/node_modules/{@ai-sdk/open-responses/node_modules/@ai-sdk/provider → ai}/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/01-overview.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/05-streaming.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-foundations/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/02-getting-started/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/01-overview.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/06-subagents.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-agents/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/10-generating-structured-data.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-core/50-error-handling.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/20-streaming-data.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/50-stream-protocol.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/03-backpressure.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/06-advanced/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/05-embed.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/28-output.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/42-pipe-ui-message-stream-to-response.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-too-many-embedding-values-for-call-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-not-found-for-approval-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/07-reference/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/08-migration-guides/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/ai → ai}/docs/09-troubleshooting/index.mdx +0 -0
|
@@ -24,7 +24,7 @@ function toCamelCase(str) {
|
|
|
24
24
|
}
|
|
25
25
|
function resolveProviderOptionsKey(rawName, providerOptions) {
|
|
26
26
|
const camelName = toCamelCase(rawName);
|
|
27
|
-
if (camelName !== rawName &&
|
|
27
|
+
if (camelName !== rawName && providerOptions?.[camelName] != null) {
|
|
28
28
|
return camelName;
|
|
29
29
|
}
|
|
30
30
|
return rawName;
|
|
@@ -35,7 +35,7 @@ function warnIfDeprecatedProviderOptionsKey({
|
|
|
35
35
|
warnings
|
|
36
36
|
}) {
|
|
37
37
|
const camelName = toCamelCase(rawName);
|
|
38
|
-
if (camelName !== rawName &&
|
|
38
|
+
if (camelName !== rawName && providerOptions?.[rawName] != null) {
|
|
39
39
|
warnings.push({
|
|
40
40
|
type: "deprecated",
|
|
41
41
|
setting: `providerOptions key '${rawName}'`,
|
|
@@ -65,14 +65,13 @@ var defaultOpenAICompatibleErrorStructure = {
|
|
|
65
65
|
// src/chat/convert-openai-compatible-chat-usage.ts
|
|
66
66
|
import { createNullLanguageModelUsage } from "@ai-sdk/provider-utils";
|
|
67
67
|
function convertOpenAICompatibleChatUsage(usage) {
|
|
68
|
-
var _a, _b, _c, _d, _e, _f;
|
|
69
68
|
if (usage == null) {
|
|
70
69
|
return createNullLanguageModelUsage();
|
|
71
70
|
}
|
|
72
|
-
const promptTokens =
|
|
73
|
-
const completionTokens =
|
|
74
|
-
const cacheReadTokens =
|
|
75
|
-
const reasoningTokens =
|
|
71
|
+
const promptTokens = usage.prompt_tokens ?? 0;
|
|
72
|
+
const completionTokens = usage.completion_tokens ?? 0;
|
|
73
|
+
const cacheReadTokens = usage.prompt_tokens_details?.cached_tokens ?? 0;
|
|
74
|
+
const reasoningTokens = usage.completion_tokens_details?.reasoning_tokens ?? 0;
|
|
76
75
|
return {
|
|
77
76
|
inputTokens: {
|
|
78
77
|
total: promptTokens,
|
|
@@ -100,8 +99,7 @@ import {
|
|
|
100
99
|
resolveFullMediaType
|
|
101
100
|
} from "@ai-sdk/provider-utils";
|
|
102
101
|
function getOpenAIMetadata(message) {
|
|
103
|
-
|
|
104
|
-
return (_b = (_a = message == null ? void 0 : message.providerOptions) == null ? void 0 : _a.openaiCompatible) != null ? _b : {};
|
|
102
|
+
return message?.providerOptions?.openaiCompatible ?? {};
|
|
105
103
|
}
|
|
106
104
|
function getAudioFormat(mediaType) {
|
|
107
105
|
switch (mediaType) {
|
|
@@ -115,7 +113,6 @@ function getAudioFormat(mediaType) {
|
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
115
|
function convertToOpenAICompatibleChatMessages(prompt, { providerOptionsKey = "google" } = {}) {
|
|
118
|
-
var _a, _b, _c, _d, _e, _f;
|
|
119
116
|
const messages = [];
|
|
120
117
|
for (const { role, content, ...message } of prompt) {
|
|
121
118
|
const metadata = getOpenAIMetadata({ ...message });
|
|
@@ -136,7 +133,6 @@ function convertToOpenAICompatibleChatMessages(prompt, { providerOptionsKey = "g
|
|
|
136
133
|
messages.push({
|
|
137
134
|
role: "user",
|
|
138
135
|
content: content.map((part) => {
|
|
139
|
-
var _a2;
|
|
140
136
|
const partMetadata = getOpenAIMetadata(part);
|
|
141
137
|
switch (part.type) {
|
|
142
138
|
case "text": {
|
|
@@ -212,7 +208,7 @@ function convertToOpenAICompatibleChatMessages(prompt, { providerOptionsKey = "g
|
|
|
212
208
|
return {
|
|
213
209
|
type: "file",
|
|
214
210
|
file: {
|
|
215
|
-
filename:
|
|
211
|
+
filename: part.filename ?? "document.pdf",
|
|
216
212
|
file_data: `data:application/pdf;base64,${convertToBase64(part.data.data)}`
|
|
217
213
|
},
|
|
218
214
|
...partMetadata
|
|
@@ -256,7 +252,7 @@ function convertToOpenAICompatibleChatMessages(prompt, { providerOptionsKey = "g
|
|
|
256
252
|
break;
|
|
257
253
|
}
|
|
258
254
|
case "tool-call": {
|
|
259
|
-
const thoughtSignature =
|
|
255
|
+
const thoughtSignature = part.providerOptions?.[providerOptionsKey]?.thoughtSignature ?? part.providerOptions?.google?.thoughtSignature;
|
|
260
256
|
toolCalls.push({
|
|
261
257
|
id: part.toolCallId,
|
|
262
258
|
type: "function",
|
|
@@ -300,7 +296,7 @@ function convertToOpenAICompatibleChatMessages(prompt, { providerOptionsKey = "g
|
|
|
300
296
|
contentValue = output.value;
|
|
301
297
|
break;
|
|
302
298
|
case "execution-denied":
|
|
303
|
-
contentValue =
|
|
299
|
+
contentValue = output.reason ?? "Tool call execution denied.";
|
|
304
300
|
break;
|
|
305
301
|
case "content":
|
|
306
302
|
case "json":
|
|
@@ -329,6 +325,18 @@ function convertToOpenAICompatibleChatMessages(prompt, { providerOptionsKey = "g
|
|
|
329
325
|
|
|
330
326
|
// src/chat/get-response-metadata.ts
|
|
331
327
|
import { createLanguageModelResponseMetadata } from "@ai-sdk/provider-utils";
|
|
328
|
+
function getResponseMetadata({
|
|
329
|
+
id,
|
|
330
|
+
model,
|
|
331
|
+
created
|
|
332
|
+
}) {
|
|
333
|
+
return createLanguageModelResponseMetadata({
|
|
334
|
+
id,
|
|
335
|
+
model,
|
|
336
|
+
// Some OpenAI-compatible providers use 0 as a placeholder timestamp.
|
|
337
|
+
created: created || void 0
|
|
338
|
+
});
|
|
339
|
+
}
|
|
332
340
|
|
|
333
341
|
// src/chat/map-openai-compatible-finish-reason.ts
|
|
334
342
|
function mapOpenAICompatibleFinishReason(finishReason) {
|
|
@@ -381,7 +389,7 @@ function prepareTools({
|
|
|
381
389
|
tools,
|
|
382
390
|
toolChoice
|
|
383
391
|
}) {
|
|
384
|
-
tools =
|
|
392
|
+
tools = tools?.length ? tools : void 0;
|
|
385
393
|
const toolWarnings = [];
|
|
386
394
|
if (tools == null) {
|
|
387
395
|
return { tools: void 0, toolChoice: void 0, toolWarnings };
|
|
@@ -436,15 +444,14 @@ function prepareTools({
|
|
|
436
444
|
var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel {
|
|
437
445
|
constructor(modelId, config) {
|
|
438
446
|
this.specificationVersion = "v4";
|
|
439
|
-
var _a, _b;
|
|
440
447
|
this.modelId = modelId;
|
|
441
448
|
this.config = config;
|
|
442
|
-
const errorStructure =
|
|
449
|
+
const errorStructure = config.errorStructure ?? defaultOpenAICompatibleErrorStructure;
|
|
443
450
|
this.chunkSchema = createOpenAICompatibleChatChunkSchema(
|
|
444
451
|
errorStructure.errorSchema
|
|
445
452
|
);
|
|
446
453
|
this.failedResponseHandler = createJsonErrorResponseHandler(errorStructure);
|
|
447
|
-
this.supportsStructuredOutputs =
|
|
454
|
+
this.supportsStructuredOutputs = config.supportsStructuredOutputs ?? false;
|
|
448
455
|
}
|
|
449
456
|
// type inferred via constructor
|
|
450
457
|
static [WORKFLOW_SERIALIZE](model) {
|
|
@@ -466,16 +473,13 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
466
473
|
return this.config.provider.split(".")[0].trim();
|
|
467
474
|
}
|
|
468
475
|
get supportedUrls() {
|
|
469
|
-
|
|
470
|
-
return (_c = (_b = (_a = this.config).supportedUrls) == null ? void 0 : _b.call(_a)) != null ? _c : {};
|
|
476
|
+
return this.config.supportedUrls?.() ?? {};
|
|
471
477
|
}
|
|
472
478
|
transformRequestBody(args) {
|
|
473
|
-
|
|
474
|
-
return (_c = (_b = (_a = this.config).transformRequestBody) == null ? void 0 : _b.call(_a, args)) != null ? _c : args;
|
|
479
|
+
return this.config.transformRequestBody?.(args) ?? args;
|
|
475
480
|
}
|
|
476
481
|
convertUsage(usage) {
|
|
477
|
-
|
|
478
|
-
return (_c = (_b = (_a = this.config).convertUsage) == null ? void 0 : _b.call(_a, usage)) != null ? _c : convertOpenAICompatibleChatUsage(usage);
|
|
482
|
+
return this.config.convertUsage?.(usage) ?? convertOpenAICompatibleChatUsage(usage);
|
|
479
483
|
}
|
|
480
484
|
async getArgs({
|
|
481
485
|
prompt,
|
|
@@ -493,7 +497,6 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
493
497
|
toolChoice,
|
|
494
498
|
tools
|
|
495
499
|
}) {
|
|
496
|
-
var _a, _b, _c, _d, _e, _f;
|
|
497
500
|
const warnings = [];
|
|
498
501
|
const deprecatedOptions = await parseProviderOptions({
|
|
499
502
|
provider: "openai-compatible",
|
|
@@ -513,28 +516,28 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
513
516
|
warnings
|
|
514
517
|
});
|
|
515
518
|
const compatibleOptions = Object.assign(
|
|
516
|
-
deprecatedOptions
|
|
517
|
-
|
|
519
|
+
deprecatedOptions ?? {},
|
|
520
|
+
await parseProviderOptions({
|
|
518
521
|
provider: "openaiCompatible",
|
|
519
522
|
providerOptions,
|
|
520
523
|
schema: openaiCompatibleLanguageModelChatOptions
|
|
521
|
-
})
|
|
522
|
-
|
|
524
|
+
}) ?? {},
|
|
525
|
+
await parseProviderOptions({
|
|
523
526
|
provider: this.providerOptionsName,
|
|
524
527
|
providerOptions,
|
|
525
528
|
schema: openaiCompatibleLanguageModelChatOptions
|
|
526
|
-
})
|
|
527
|
-
|
|
529
|
+
}) ?? {},
|
|
530
|
+
await parseProviderOptions({
|
|
528
531
|
provider: toCamelCase(this.providerOptionsName),
|
|
529
532
|
providerOptions,
|
|
530
533
|
schema: openaiCompatibleLanguageModelChatOptions
|
|
531
|
-
})
|
|
534
|
+
}) ?? {}
|
|
532
535
|
);
|
|
533
|
-
const strictJsonSchema =
|
|
536
|
+
const strictJsonSchema = compatibleOptions?.strictJsonSchema ?? true;
|
|
534
537
|
if (topK != null) {
|
|
535
538
|
warnings.push({ type: "unsupported", feature: "topK" });
|
|
536
539
|
}
|
|
537
|
-
if (
|
|
540
|
+
if (responseFormat?.type === "json" && responseFormat.schema != null && !this.supportsStructuredOutputs) {
|
|
538
541
|
warnings.push({
|
|
539
542
|
type: "unsupported",
|
|
540
543
|
feature: "responseFormat",
|
|
@@ -566,12 +569,12 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
566
569
|
top_p: topP,
|
|
567
570
|
frequency_penalty: frequencyPenalty,
|
|
568
571
|
presence_penalty: presencePenalty,
|
|
569
|
-
response_format:
|
|
572
|
+
response_format: responseFormat?.type === "json" ? this.supportsStructuredOutputs === true && responseFormat.schema != null ? {
|
|
570
573
|
type: "json_schema",
|
|
571
574
|
json_schema: {
|
|
572
575
|
schema: responseFormat.schema,
|
|
573
576
|
strict: strictJsonSchema,
|
|
574
|
-
name:
|
|
577
|
+
name: responseFormat.name ?? "response",
|
|
575
578
|
description: responseFormat.description
|
|
576
579
|
}
|
|
577
580
|
} : { type: "json_object" } : void 0,
|
|
@@ -579,15 +582,15 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
579
582
|
seed,
|
|
580
583
|
...Object.fromEntries(
|
|
581
584
|
Object.entries({
|
|
582
|
-
...providerOptions
|
|
583
|
-
...providerOptions
|
|
585
|
+
...providerOptions?.[this.providerOptionsName],
|
|
586
|
+
...providerOptions?.[toCamelCase(this.providerOptionsName)]
|
|
584
587
|
}).filter(
|
|
585
588
|
([key]) => !Object.keys(
|
|
586
589
|
openaiCompatibleLanguageModelChatOptions.shape
|
|
587
590
|
).includes(key)
|
|
588
591
|
)
|
|
589
592
|
),
|
|
590
|
-
reasoning_effort:
|
|
593
|
+
reasoning_effort: compatibleOptions.reasoningEffort ?? (isCustomReasoning(reasoning) ? reasoning : void 0),
|
|
591
594
|
verbosity: compatibleOptions.textVerbosity,
|
|
592
595
|
// messages:
|
|
593
596
|
messages: convertToOpenAICompatibleChatMessages(prompt, {
|
|
@@ -601,7 +604,6 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
601
604
|
};
|
|
602
605
|
}
|
|
603
606
|
async doGenerate(options) {
|
|
604
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
605
607
|
const { args, warnings, metadataKey } = await this.getArgs({ ...options });
|
|
606
608
|
const transformedBody = this.transformRequestBody(args);
|
|
607
609
|
const body = JSON.stringify(transformedBody);
|
|
@@ -614,7 +616,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
614
616
|
path: "/chat/completions",
|
|
615
617
|
modelId: this.modelId
|
|
616
618
|
}),
|
|
617
|
-
headers: combineHeaders(
|
|
619
|
+
headers: combineHeaders(this.config.headers?.(), options.headers),
|
|
618
620
|
body: transformedBody,
|
|
619
621
|
failedResponseHandler: this.failedResponseHandler,
|
|
620
622
|
successfulResponseHandler: createJsonResponseHandler(
|
|
@@ -632,7 +634,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
632
634
|
}
|
|
633
635
|
const content = [];
|
|
634
636
|
content.push(...convertOpenAICompatibleContent(choice.message.content));
|
|
635
|
-
const reasoning =
|
|
637
|
+
const reasoning = choice.message.reasoning_content ?? choice.message.reasoning;
|
|
636
638
|
if (reasoning != null && reasoning.length > 0) {
|
|
637
639
|
content.push({
|
|
638
640
|
type: "reasoning",
|
|
@@ -641,7 +643,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
641
643
|
}
|
|
642
644
|
if (choice.message.tool_calls != null) {
|
|
643
645
|
for (const toolCall of choice.message.tool_calls) {
|
|
644
|
-
const thoughtSignature =
|
|
646
|
+
const thoughtSignature = toolCall.extra_content?.google?.thought_signature;
|
|
645
647
|
content.push({
|
|
646
648
|
type: "tool-call",
|
|
647
649
|
toolCallId: toolCall.id || generateId(),
|
|
@@ -657,28 +659,28 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
657
659
|
}
|
|
658
660
|
const providerMetadata = {
|
|
659
661
|
[metadataKey]: {},
|
|
660
|
-
...await
|
|
662
|
+
...await this.config.metadataExtractor?.extractMetadata?.({
|
|
661
663
|
parsedBody: rawResponse
|
|
662
|
-
})
|
|
664
|
+
})
|
|
663
665
|
};
|
|
664
|
-
const completionTokenDetails =
|
|
665
|
-
if (
|
|
666
|
-
providerMetadata[metadataKey].acceptedPredictionTokens = completionTokenDetails
|
|
666
|
+
const completionTokenDetails = responseBody.usage?.completion_tokens_details;
|
|
667
|
+
if (completionTokenDetails?.accepted_prediction_tokens != null) {
|
|
668
|
+
providerMetadata[metadataKey].acceptedPredictionTokens = completionTokenDetails?.accepted_prediction_tokens;
|
|
667
669
|
}
|
|
668
|
-
if (
|
|
669
|
-
providerMetadata[metadataKey].rejectedPredictionTokens = completionTokenDetails
|
|
670
|
+
if (completionTokenDetails?.rejected_prediction_tokens != null) {
|
|
671
|
+
providerMetadata[metadataKey].rejectedPredictionTokens = completionTokenDetails?.rejected_prediction_tokens;
|
|
670
672
|
}
|
|
671
673
|
return {
|
|
672
674
|
content,
|
|
673
675
|
finishReason: {
|
|
674
676
|
unified: mapOpenAICompatibleFinishReason(choice.finish_reason),
|
|
675
|
-
raw:
|
|
677
|
+
raw: choice.finish_reason ?? void 0
|
|
676
678
|
},
|
|
677
679
|
usage: this.convertUsage(responseBody.usage),
|
|
678
680
|
providerMetadata,
|
|
679
681
|
request: { body },
|
|
680
682
|
response: {
|
|
681
|
-
...
|
|
683
|
+
...getResponseMetadata(responseBody),
|
|
682
684
|
headers: responseHeaders,
|
|
683
685
|
body: rawResponse
|
|
684
686
|
},
|
|
@@ -686,7 +688,6 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
686
688
|
};
|
|
687
689
|
}
|
|
688
690
|
async doStream(options) {
|
|
689
|
-
var _a, _b, _c;
|
|
690
691
|
const { args, warnings, metadataKey } = await this.getArgs({
|
|
691
692
|
...options
|
|
692
693
|
});
|
|
@@ -696,13 +697,13 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
696
697
|
// only include stream_options when in strict compatibility mode:
|
|
697
698
|
stream_options: this.config.includeUsage ? { include_usage: true } : void 0
|
|
698
699
|
});
|
|
699
|
-
const metadataExtractor =
|
|
700
|
+
const metadataExtractor = this.config.metadataExtractor?.createStreamExtractor();
|
|
700
701
|
const { responseHeaders, value: response } = await postJsonToApi({
|
|
701
702
|
url: this.config.url({
|
|
702
703
|
path: "/chat/completions",
|
|
703
704
|
modelId: this.modelId
|
|
704
705
|
}),
|
|
705
|
-
headers: combineHeaders(
|
|
706
|
+
headers: combineHeaders(this.config.headers?.(), options.headers),
|
|
706
707
|
body,
|
|
707
708
|
failedResponseHandler: this.failedResponseHandler,
|
|
708
709
|
successfulResponseHandler: createEventSourceResponseHandler(
|
|
@@ -716,7 +717,6 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
716
717
|
const pendingToolCalls = /* @__PURE__ */ new Map();
|
|
717
718
|
const forwardedToolCallIndices = /* @__PURE__ */ new Set();
|
|
718
719
|
const processToolCallDelta = (toolCallDelta) => {
|
|
719
|
-
var _a2, _b2, _c2, _d, _e;
|
|
720
720
|
const index = toolCallDelta.index;
|
|
721
721
|
if (index == null || forwardedToolCallIndices.has(index)) {
|
|
722
722
|
toolCallTracker.processDelta(toolCallDelta);
|
|
@@ -725,9 +725,9 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
725
725
|
let pending = pendingToolCalls.get(index);
|
|
726
726
|
if (pending == null) {
|
|
727
727
|
pending = {
|
|
728
|
-
id:
|
|
728
|
+
id: toolCallDelta.id ?? null,
|
|
729
729
|
bufferedArguments: "",
|
|
730
|
-
extraContent:
|
|
730
|
+
extraContent: toolCallDelta.extra_content ?? null
|
|
731
731
|
};
|
|
732
732
|
pendingToolCalls.set(index, pending);
|
|
733
733
|
} else {
|
|
@@ -738,11 +738,11 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
738
738
|
pending.extraContent = toolCallDelta.extra_content;
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
const argumentsDelta =
|
|
741
|
+
const argumentsDelta = toolCallDelta.function?.arguments;
|
|
742
742
|
if (argumentsDelta != null) {
|
|
743
743
|
pending.bufferedArguments += argumentsDelta;
|
|
744
744
|
}
|
|
745
|
-
const name =
|
|
745
|
+
const name = toolCallDelta.function?.name;
|
|
746
746
|
if (name != null) {
|
|
747
747
|
const forwardDelta = {
|
|
748
748
|
index,
|
|
@@ -751,7 +751,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
751
751
|
name,
|
|
752
752
|
arguments: pending.bufferedArguments
|
|
753
753
|
},
|
|
754
|
-
extra_content:
|
|
754
|
+
extra_content: pending.extraContent ?? void 0
|
|
755
755
|
};
|
|
756
756
|
toolCallTracker.processDelta(forwardDelta);
|
|
757
757
|
pendingToolCalls.delete(index);
|
|
@@ -760,7 +760,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
760
760
|
};
|
|
761
761
|
let finishReason;
|
|
762
762
|
let usage = void 0;
|
|
763
|
-
let
|
|
763
|
+
let metadataExtracted = false;
|
|
764
764
|
let isActiveReasoning = false;
|
|
765
765
|
let isActiveText = false;
|
|
766
766
|
const convertUsage = (usage2) => this.convertUsage(usage2);
|
|
@@ -773,8 +773,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
773
773
|
{
|
|
774
774
|
generateId,
|
|
775
775
|
extractMetadata: (delta) => {
|
|
776
|
-
|
|
777
|
-
const thoughtSignature = (_b2 = (_a2 = delta.extra_content) == null ? void 0 : _a2.google) == null ? void 0 : _b2.thought_signature;
|
|
776
|
+
const thoughtSignature = delta.extra_content?.google?.thought_signature;
|
|
778
777
|
return thoughtSignature ? { [providerOptionsName]: { thoughtSignature } } : void 0;
|
|
779
778
|
},
|
|
780
779
|
buildToolCallProviderMetadata: (metadata) => metadata
|
|
@@ -783,7 +782,6 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
783
782
|
controller.enqueue({ type: "stream-start", warnings });
|
|
784
783
|
},
|
|
785
784
|
transform(chunk, controller) {
|
|
786
|
-
var _a2, _b2;
|
|
787
785
|
if (options.includeRawChunks) {
|
|
788
786
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
789
787
|
}
|
|
@@ -792,7 +790,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
792
790
|
controller.enqueue({ type: "error", error: chunk.error });
|
|
793
791
|
return;
|
|
794
792
|
}
|
|
795
|
-
metadataExtractor
|
|
793
|
+
metadataExtractor?.processChunk(chunk.rawValue);
|
|
796
794
|
if ("error" in chunk.value) {
|
|
797
795
|
finishReason = { unified: "error", raw: void 0 };
|
|
798
796
|
controller.enqueue({
|
|
@@ -802,24 +800,27 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
802
800
|
return;
|
|
803
801
|
}
|
|
804
802
|
const value = chunk.value;
|
|
805
|
-
if (
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
803
|
+
if (!metadataExtracted) {
|
|
804
|
+
const metadata = getResponseMetadata(value);
|
|
805
|
+
if (Object.values(metadata).some(Boolean)) {
|
|
806
|
+
metadataExtracted = true;
|
|
807
|
+
controller.enqueue({
|
|
808
|
+
type: "response-metadata",
|
|
809
|
+
...metadata
|
|
810
|
+
});
|
|
811
|
+
}
|
|
811
812
|
}
|
|
812
813
|
if (value.usage != null) {
|
|
813
814
|
usage = value.usage;
|
|
814
815
|
}
|
|
815
816
|
const choice = value.choices[0];
|
|
816
|
-
if (
|
|
817
|
+
if (choice?.finish_reason != null) {
|
|
817
818
|
finishReason = {
|
|
818
819
|
unified: mapOpenAICompatibleFinishReason(choice.finish_reason),
|
|
819
|
-
raw:
|
|
820
|
+
raw: choice.finish_reason ?? void 0
|
|
820
821
|
};
|
|
821
822
|
}
|
|
822
|
-
if (
|
|
823
|
+
if (choice?.delta == null) {
|
|
823
824
|
return;
|
|
824
825
|
}
|
|
825
826
|
const delta = choice.delta;
|
|
@@ -859,7 +860,7 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
859
860
|
delta: textDelta
|
|
860
861
|
});
|
|
861
862
|
};
|
|
862
|
-
const reasoningContent =
|
|
863
|
+
const reasoningContent = delta.reasoning_content ?? delta.reasoning;
|
|
863
864
|
if (reasoningContent) {
|
|
864
865
|
enqueueReasoningDelta(reasoningContent);
|
|
865
866
|
}
|
|
@@ -886,7 +887,6 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
886
887
|
}
|
|
887
888
|
},
|
|
888
889
|
flush(controller) {
|
|
889
|
-
var _a2, _b2, _c2, _d;
|
|
890
890
|
if (isActiveReasoning) {
|
|
891
891
|
controller.enqueue({ type: "reasoning-end", id: "reasoning-0" });
|
|
892
892
|
}
|
|
@@ -914,13 +914,13 @@ var OpenAICompatibleChatLanguageModel = class _OpenAICompatibleChatLanguageModel
|
|
|
914
914
|
}
|
|
915
915
|
const providerMetadata = {
|
|
916
916
|
[providerOptionsName]: {},
|
|
917
|
-
...metadataExtractor
|
|
917
|
+
...metadataExtractor?.buildMetadata()
|
|
918
918
|
};
|
|
919
|
-
if (
|
|
920
|
-
providerMetadata[providerOptionsName].acceptedPredictionTokens =
|
|
919
|
+
if (usage?.completion_tokens_details?.accepted_prediction_tokens != null) {
|
|
920
|
+
providerMetadata[providerOptionsName].acceptedPredictionTokens = usage?.completion_tokens_details?.accepted_prediction_tokens;
|
|
921
921
|
}
|
|
922
|
-
if (
|
|
923
|
-
providerMetadata[providerOptionsName].rejectedPredictionTokens =
|
|
922
|
+
if (usage?.completion_tokens_details?.rejected_prediction_tokens != null) {
|
|
923
|
+
providerMetadata[providerOptionsName].rejectedPredictionTokens = usage?.completion_tokens_details?.rejected_prediction_tokens;
|
|
924
924
|
}
|
|
925
925
|
controller.enqueue({
|
|
926
926
|
type: "finish",
|
|
@@ -1068,12 +1068,11 @@ import { z as z5 } from "zod/v4";
|
|
|
1068
1068
|
// src/completion/convert-openai-compatible-completion-usage.ts
|
|
1069
1069
|
import { createNullLanguageModelUsage as createNullLanguageModelUsage2 } from "@ai-sdk/provider-utils";
|
|
1070
1070
|
function convertOpenAICompatibleCompletionUsage(usage) {
|
|
1071
|
-
var _a, _b;
|
|
1072
1071
|
if (usage == null) {
|
|
1073
1072
|
return createNullLanguageModelUsage2();
|
|
1074
1073
|
}
|
|
1075
|
-
const promptTokens =
|
|
1076
|
-
const completionTokens =
|
|
1074
|
+
const promptTokens = usage.prompt_tokens ?? 0;
|
|
1075
|
+
const completionTokens = usage.completion_tokens ?? 0;
|
|
1077
1076
|
return {
|
|
1078
1077
|
inputTokens: {
|
|
1079
1078
|
total: promptTokens,
|
|
@@ -1217,10 +1216,9 @@ var openaiCompatibleLanguageModelCompletionOptions = z4.object({
|
|
|
1217
1216
|
var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionLanguageModel {
|
|
1218
1217
|
constructor(modelId, config) {
|
|
1219
1218
|
this.specificationVersion = "v4";
|
|
1220
|
-
var _a;
|
|
1221
1219
|
this.modelId = modelId;
|
|
1222
1220
|
this.config = config;
|
|
1223
|
-
const errorStructure =
|
|
1221
|
+
const errorStructure = config.errorStructure ?? defaultOpenAICompatibleErrorStructure;
|
|
1224
1222
|
this.chunkSchema = createOpenAICompatibleCompletionChunkSchema(
|
|
1225
1223
|
errorStructure.errorSchema
|
|
1226
1224
|
);
|
|
@@ -1246,8 +1244,7 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1246
1244
|
return this.config.provider.split(".")[0].trim();
|
|
1247
1245
|
}
|
|
1248
1246
|
get supportedUrls() {
|
|
1249
|
-
|
|
1250
|
-
return (_c = (_b = (_a = this.config).supportedUrls) == null ? void 0 : _b.call(_a)) != null ? _c : {};
|
|
1247
|
+
return this.config.supportedUrls?.() ?? {};
|
|
1251
1248
|
}
|
|
1252
1249
|
async getArgs({
|
|
1253
1250
|
prompt,
|
|
@@ -1264,7 +1261,6 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1264
1261
|
tools,
|
|
1265
1262
|
toolChoice
|
|
1266
1263
|
}) {
|
|
1267
|
-
var _a, _b;
|
|
1268
1264
|
const warnings = [];
|
|
1269
1265
|
warnIfDeprecatedProviderOptionsKey({
|
|
1270
1266
|
rawName: this.providerOptionsName,
|
|
@@ -1272,21 +1268,21 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1272
1268
|
warnings
|
|
1273
1269
|
});
|
|
1274
1270
|
const completionOptions = Object.assign(
|
|
1275
|
-
|
|
1271
|
+
await parseProviderOptions2({
|
|
1276
1272
|
provider: this.providerOptionsName,
|
|
1277
1273
|
providerOptions,
|
|
1278
1274
|
schema: openaiCompatibleLanguageModelCompletionOptions
|
|
1279
|
-
})
|
|
1280
|
-
|
|
1275
|
+
}) ?? {},
|
|
1276
|
+
await parseProviderOptions2({
|
|
1281
1277
|
provider: toCamelCase(this.providerOptionsName),
|
|
1282
1278
|
providerOptions,
|
|
1283
1279
|
schema: openaiCompatibleLanguageModelCompletionOptions
|
|
1284
|
-
})
|
|
1280
|
+
}) ?? {}
|
|
1285
1281
|
);
|
|
1286
1282
|
if (topK != null) {
|
|
1287
1283
|
warnings.push({ type: "unsupported", feature: "topK" });
|
|
1288
1284
|
}
|
|
1289
|
-
if (tools
|
|
1285
|
+
if (tools?.length) {
|
|
1290
1286
|
warnings.push({ type: "unsupported", feature: "tools" });
|
|
1291
1287
|
}
|
|
1292
1288
|
if (toolChoice != null) {
|
|
@@ -1300,7 +1296,7 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1300
1296
|
});
|
|
1301
1297
|
}
|
|
1302
1298
|
const { prompt: completionPrompt, stopSequences } = convertToOpenAICompatibleCompletionPrompt({ prompt });
|
|
1303
|
-
const stop = [...stopSequences
|
|
1299
|
+
const stop = [...stopSequences ?? [], ...userStopSequences ?? []];
|
|
1304
1300
|
return {
|
|
1305
1301
|
args: {
|
|
1306
1302
|
// model id:
|
|
@@ -1317,8 +1313,8 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1317
1313
|
frequency_penalty: frequencyPenalty,
|
|
1318
1314
|
presence_penalty: presencePenalty,
|
|
1319
1315
|
seed,
|
|
1320
|
-
...providerOptions
|
|
1321
|
-
...providerOptions
|
|
1316
|
+
...providerOptions?.[this.providerOptionsName],
|
|
1317
|
+
...providerOptions?.[toCamelCase(this.providerOptionsName)],
|
|
1322
1318
|
// prompt:
|
|
1323
1319
|
prompt: completionPrompt,
|
|
1324
1320
|
// stop sequences:
|
|
@@ -1328,7 +1324,6 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1328
1324
|
};
|
|
1329
1325
|
}
|
|
1330
1326
|
async doGenerate(options) {
|
|
1331
|
-
var _a, _b;
|
|
1332
1327
|
const { args, warnings } = await this.getArgs(options);
|
|
1333
1328
|
const {
|
|
1334
1329
|
responseHeaders,
|
|
@@ -1339,7 +1334,7 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1339
1334
|
path: "/completions",
|
|
1340
1335
|
modelId: this.modelId
|
|
1341
1336
|
}),
|
|
1342
|
-
headers: combineHeaders2(
|
|
1337
|
+
headers: combineHeaders2(this.config.headers?.(), options.headers),
|
|
1343
1338
|
body: args,
|
|
1344
1339
|
failedResponseHandler: this.failedResponseHandler,
|
|
1345
1340
|
successfulResponseHandler: createJsonResponseHandler2(
|
|
@@ -1370,7 +1365,6 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1370
1365
|
};
|
|
1371
1366
|
}
|
|
1372
1367
|
async doStream(options) {
|
|
1373
|
-
var _a, _b;
|
|
1374
1368
|
const { args, warnings } = await this.getArgs(options);
|
|
1375
1369
|
const body = {
|
|
1376
1370
|
...args,
|
|
@@ -1383,7 +1377,7 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1383
1377
|
path: "/completions",
|
|
1384
1378
|
modelId: this.modelId
|
|
1385
1379
|
}),
|
|
1386
|
-
headers: combineHeaders2(
|
|
1380
|
+
headers: combineHeaders2(this.config.headers?.(), options.headers),
|
|
1387
1381
|
body,
|
|
1388
1382
|
failedResponseHandler: this.failedResponseHandler,
|
|
1389
1383
|
successfulResponseHandler: createEventSourceResponseHandler2(
|
|
@@ -1405,7 +1399,6 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1405
1399
|
controller.enqueue({ type: "stream-start", warnings });
|
|
1406
1400
|
},
|
|
1407
1401
|
transform(chunk, controller) {
|
|
1408
|
-
var _a2;
|
|
1409
1402
|
if (options.includeRawChunks) {
|
|
1410
1403
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
1411
1404
|
}
|
|
@@ -1435,13 +1428,13 @@ var OpenAICompatibleCompletionLanguageModel = class _OpenAICompatibleCompletionL
|
|
|
1435
1428
|
usage = value.usage;
|
|
1436
1429
|
}
|
|
1437
1430
|
const choice = value.choices[0];
|
|
1438
|
-
if (
|
|
1431
|
+
if (choice?.finish_reason != null) {
|
|
1439
1432
|
finishReason = {
|
|
1440
1433
|
unified: mapOpenAICompatibleFinishReason2(choice.finish_reason),
|
|
1441
|
-
raw:
|
|
1434
|
+
raw: choice.finish_reason ?? void 0
|
|
1442
1435
|
};
|
|
1443
1436
|
}
|
|
1444
|
-
if (
|
|
1437
|
+
if (choice?.text != null) {
|
|
1445
1438
|
controller.enqueue({
|
|
1446
1439
|
type: "text-delta",
|
|
1447
1440
|
id: "0",
|
|
@@ -1542,12 +1535,10 @@ var OpenAICompatibleEmbeddingModel = class _OpenAICompatibleEmbeddingModel {
|
|
|
1542
1535
|
return this.config.provider;
|
|
1543
1536
|
}
|
|
1544
1537
|
get maxEmbeddingsPerCall() {
|
|
1545
|
-
|
|
1546
|
-
return (_a = this.config.maxEmbeddingsPerCall) != null ? _a : 2048;
|
|
1538
|
+
return this.config.maxEmbeddingsPerCall ?? 2048;
|
|
1547
1539
|
}
|
|
1548
1540
|
get supportsParallelCalls() {
|
|
1549
|
-
|
|
1550
|
-
return (_a = this.config.supportsParallelCalls) != null ? _a : true;
|
|
1541
|
+
return this.config.supportsParallelCalls ?? true;
|
|
1551
1542
|
}
|
|
1552
1543
|
static [WORKFLOW_SERIALIZE3](model) {
|
|
1553
1544
|
return serializeModelOptions3({
|
|
@@ -1567,7 +1558,6 @@ var OpenAICompatibleEmbeddingModel = class _OpenAICompatibleEmbeddingModel {
|
|
|
1567
1558
|
abortSignal,
|
|
1568
1559
|
providerOptions
|
|
1569
1560
|
}) {
|
|
1570
|
-
var _a, _b, _c, _d, _e;
|
|
1571
1561
|
const warnings = [];
|
|
1572
1562
|
const deprecatedOptions = await parseProviderOptions3({
|
|
1573
1563
|
provider: "openai-compatible",
|
|
@@ -1587,17 +1577,17 @@ var OpenAICompatibleEmbeddingModel = class _OpenAICompatibleEmbeddingModel {
|
|
|
1587
1577
|
warnings
|
|
1588
1578
|
});
|
|
1589
1579
|
const compatibleOptions = Object.assign(
|
|
1590
|
-
deprecatedOptions
|
|
1591
|
-
|
|
1580
|
+
deprecatedOptions ?? {},
|
|
1581
|
+
await parseProviderOptions3({
|
|
1592
1582
|
provider: "openaiCompatible",
|
|
1593
1583
|
providerOptions,
|
|
1594
1584
|
schema: openaiCompatibleEmbeddingModelOptions
|
|
1595
|
-
})
|
|
1596
|
-
|
|
1585
|
+
}) ?? {},
|
|
1586
|
+
await parseProviderOptions3({
|
|
1597
1587
|
provider: this.providerOptionsName,
|
|
1598
1588
|
providerOptions,
|
|
1599
1589
|
schema: openaiCompatibleEmbeddingModelOptions
|
|
1600
|
-
})
|
|
1590
|
+
}) ?? {}
|
|
1601
1591
|
);
|
|
1602
1592
|
if (values.length > this.maxEmbeddingsPerCall) {
|
|
1603
1593
|
throw new TooManyEmbeddingValuesForCallError({
|
|
@@ -1616,7 +1606,7 @@ var OpenAICompatibleEmbeddingModel = class _OpenAICompatibleEmbeddingModel {
|
|
|
1616
1606
|
path: "/embeddings",
|
|
1617
1607
|
modelId: this.modelId
|
|
1618
1608
|
}),
|
|
1619
|
-
headers: combineHeaders3(
|
|
1609
|
+
headers: combineHeaders3(this.config.headers?.(), headers),
|
|
1620
1610
|
body: {
|
|
1621
1611
|
model: this.modelId,
|
|
1622
1612
|
input: values,
|
|
@@ -1625,7 +1615,7 @@ var OpenAICompatibleEmbeddingModel = class _OpenAICompatibleEmbeddingModel {
|
|
|
1625
1615
|
user: compatibleOptions.user
|
|
1626
1616
|
},
|
|
1627
1617
|
failedResponseHandler: createJsonErrorResponseHandler3(
|
|
1628
|
-
|
|
1618
|
+
this.config.errorStructure ?? defaultOpenAICompatibleErrorStructure
|
|
1629
1619
|
),
|
|
1630
1620
|
successfulResponseHandler: createJsonResponseHandler3(
|
|
1631
1621
|
openaiTextEmbeddingResponseSchema
|
|
@@ -1669,6 +1659,8 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1669
1659
|
this.config = config;
|
|
1670
1660
|
this.specificationVersion = "v4";
|
|
1671
1661
|
this.maxImagesPerCall = 10;
|
|
1662
|
+
this.supportsFileInputs = void 0;
|
|
1663
|
+
this.supportsMaskInputs = void 0;
|
|
1672
1664
|
}
|
|
1673
1665
|
get provider() {
|
|
1674
1666
|
return this.config.provider;
|
|
@@ -1711,7 +1703,6 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1711
1703
|
files,
|
|
1712
1704
|
mask
|
|
1713
1705
|
}) {
|
|
1714
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1715
1706
|
const warnings = [];
|
|
1716
1707
|
if (aspectRatio != null) {
|
|
1717
1708
|
warnings.push({
|
|
@@ -1723,7 +1714,7 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1723
1714
|
if (seed != null) {
|
|
1724
1715
|
warnings.push({ type: "unsupported", feature: "seed" });
|
|
1725
1716
|
}
|
|
1726
|
-
const currentDate =
|
|
1717
|
+
const currentDate = this.config._internal?.currentDate?.() ?? /* @__PURE__ */ new Date();
|
|
1727
1718
|
const args = this.getArgs(providerOptions, warnings);
|
|
1728
1719
|
if (files != null && files.length > 0) {
|
|
1729
1720
|
const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
|
|
@@ -1731,7 +1722,7 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1731
1722
|
path: "/images/edits",
|
|
1732
1723
|
modelId: this.modelId
|
|
1733
1724
|
}),
|
|
1734
|
-
headers: combineHeaders4(
|
|
1725
|
+
headers: combineHeaders4(this.config.headers?.(), headers),
|
|
1735
1726
|
formData: convertToFormData({
|
|
1736
1727
|
model: this.modelId,
|
|
1737
1728
|
prompt,
|
|
@@ -1742,7 +1733,7 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1742
1733
|
...args
|
|
1743
1734
|
}),
|
|
1744
1735
|
failedResponseHandler: createJsonErrorResponseHandler4(
|
|
1745
|
-
|
|
1736
|
+
this.config.errorStructure ?? defaultOpenAICompatibleErrorStructure
|
|
1746
1737
|
),
|
|
1747
1738
|
successfulResponseHandler: createJsonResponseHandler4(
|
|
1748
1739
|
openaiCompatibleImageResponseSchema
|
|
@@ -1766,7 +1757,7 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1766
1757
|
path: "/images/generations",
|
|
1767
1758
|
modelId: this.modelId
|
|
1768
1759
|
}),
|
|
1769
|
-
headers: combineHeaders4(
|
|
1760
|
+
headers: combineHeaders4(this.config.headers?.(), headers),
|
|
1770
1761
|
body: {
|
|
1771
1762
|
model: this.modelId,
|
|
1772
1763
|
prompt,
|
|
@@ -1775,7 +1766,7 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1775
1766
|
...args
|
|
1776
1767
|
},
|
|
1777
1768
|
failedResponseHandler: createJsonErrorResponseHandler4(
|
|
1778
|
-
|
|
1769
|
+
this.config.errorStructure ?? defaultOpenAICompatibleErrorStructure
|
|
1779
1770
|
),
|
|
1780
1771
|
successfulResponseHandler: createJsonResponseHandler4(
|
|
1781
1772
|
openaiCompatibleImageResponseSchema
|
|
@@ -1796,11 +1787,10 @@ var OpenAICompatibleImageModel = class _OpenAICompatibleImageModel {
|
|
|
1796
1787
|
}
|
|
1797
1788
|
};
|
|
1798
1789
|
function mapImageUsage(usage) {
|
|
1799
|
-
var _a, _b, _c;
|
|
1800
1790
|
return usage == null ? void 0 : {
|
|
1801
|
-
inputTokens:
|
|
1802
|
-
outputTokens:
|
|
1803
|
-
totalTokens:
|
|
1791
|
+
inputTokens: usage.input_tokens ?? void 0,
|
|
1792
|
+
outputTokens: usage.output_tokens ?? void 0,
|
|
1793
|
+
totalTokens: usage.total_tokens ?? void 0
|
|
1804
1794
|
};
|
|
1805
1795
|
}
|
|
1806
1796
|
var openaiCompatibleImageResponseSchema = z8.object({
|
|
@@ -1826,7 +1816,7 @@ import {
|
|
|
1826
1816
|
} from "@ai-sdk/provider-utils";
|
|
1827
1817
|
|
|
1828
1818
|
// src/version.ts
|
|
1829
|
-
var VERSION = true ? "3.0.
|
|
1819
|
+
var VERSION = true ? "3.0.59" : "0.0.0-test";
|
|
1830
1820
|
|
|
1831
1821
|
// src/openai-compatible-provider.ts
|
|
1832
1822
|
function createOpenAICompatible(options) {
|
|
@@ -1836,7 +1826,7 @@ function createOpenAICompatible(options) {
|
|
|
1836
1826
|
...options.apiKey && { Authorization: `Bearer ${options.apiKey}` },
|
|
1837
1827
|
...options.headers
|
|
1838
1828
|
};
|
|
1839
|
-
const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk
|
|
1829
|
+
const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk-openai-compatible/${VERSION}`);
|
|
1840
1830
|
const getCommonModelConfig = (modelType) => ({
|
|
1841
1831
|
provider: `${providerName}.${modelType}`,
|
|
1842
1832
|
url: ({ path }) => {
|