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
|
@@ -132,7 +132,14 @@ export class AiSdkCompaction {
|
|
|
132
132
|
if (previousCheckpoint) {
|
|
133
133
|
const match = matchHistoryCompactCheckpointPrefix(previousCheckpoint, runtimeContext);
|
|
134
134
|
if (!match.reason && match.successorRuntimeEvents.length === 0) {
|
|
135
|
-
|
|
135
|
+
// Raw identity is not enough: a projection transition committed
|
|
136
|
+
// after the fold rewrites the covered span's effective view without
|
|
137
|
+
// touching the raw ledger, so reuse requires the pinned effective
|
|
138
|
+
// digest to still match — the same gate the pre-send path applies
|
|
139
|
+
// (#5929). On drift, fall through to the planner, whose roll-forward
|
|
140
|
+
// currency check discards the stale checkpoint and re-summarizes.
|
|
141
|
+
const effectiveCovered = await this.foldEffectiveModelHistory(match.coveredRuntimeEvents);
|
|
142
|
+
if (this.checkpointEffectiveCoverageMatches(previousCheckpoint, effectiveCovered)) {
|
|
136
143
|
const projectedEvents = projectHistoryCompactCheckpointReplay(previousCheckpoint, match.coveredRuntimeEvents, []);
|
|
137
144
|
return {
|
|
138
145
|
outcome: { kind: 'unchanged', reason: 'already_compacted' },
|
|
@@ -799,14 +806,21 @@ export class AiSdkCompaction {
|
|
|
799
806
|
});
|
|
800
807
|
if (plan.decision === 'fail_open') {
|
|
801
808
|
const diagnosticReason = plan.diagnosticReason ?? plan.reason;
|
|
802
|
-
// Latch
|
|
809
|
+
// Latch only a fail-open the summarizer actually produced. The baseline
|
|
803
810
|
// that fired this trigger survives a fail-open, so without the latch the
|
|
804
811
|
// next step evaluates the same condition and dispatches the same doomed
|
|
805
812
|
// summarizer call: a provider that answers slowly and fails (kimi's HTTP
|
|
806
813
|
// 200 with an error body) produced 15 such calls over 47 minutes before
|
|
807
814
|
// one main request (#4634). The latch covers the whole Turn and only
|
|
808
815
|
// fail-opens; a successful fold spends no part of it (#4559).
|
|
809
|
-
|
|
816
|
+
//
|
|
817
|
+
// no_safe_completed_span is not a summarizer failure — no call was made.
|
|
818
|
+
// It describes the event pool at this step, and a pool that has since
|
|
819
|
+
// grown a completed tool pair can present a safe cut, so the next
|
|
820
|
+
// attempt must re-read the ledger rather than inherit this miss (#5790).
|
|
821
|
+
if (plan.reason === 'summarizer_failed') {
|
|
822
|
+
state.summarizerFailure = diagnosticReason;
|
|
823
|
+
}
|
|
810
824
|
return {
|
|
811
825
|
decision: 'fail',
|
|
812
826
|
diagnosticReason,
|
|
@@ -1042,7 +1056,12 @@ export class MidTurnCapacityCompactState {
|
|
|
1042
1056
|
flushedSteps = 0;
|
|
1043
1057
|
/** Exact historical image results omitted after a provider overflow. */
|
|
1044
1058
|
omittedImageToolResults = new Map();
|
|
1045
|
-
/**
|
|
1059
|
+
/**
|
|
1060
|
+
* One bounded retry budget for the whole Turn, spent only by a failure the
|
|
1061
|
+
* summarizer actually produced (#4634). A structural miss like
|
|
1062
|
+
* no_safe_completed_span never reaches it: the pool may grow a safe cut, so
|
|
1063
|
+
* the next attempt re-reads the ledger instead of short-circuiting (#5790).
|
|
1064
|
+
*/
|
|
1046
1065
|
summarizerFailure;
|
|
1047
1066
|
constructor(headAnchor, priorContentEvents, priorInvocations,
|
|
1048
1067
|
/**
|
|
@@ -24,6 +24,7 @@ import { admitProviderReasoningReplayItems, buildRuntimeEventReplayTimeline, for
|
|
|
24
24
|
import { openAiChatReasoningFieldFromProviderOptions } from './openai-chat-reasoning-transport.js';
|
|
25
25
|
import { decodePlaintextResponsesReasoningState, replayPlaintextResponsesProviderOptions, } from './responses-reasoning-state.js';
|
|
26
26
|
import { toolResultOutput } from './tool-result-output.js';
|
|
27
|
+
import { deepSeekWebSearchReplayItem, deepSeekWebSearchReplayOptions, } from './deepseek-web-search-codec.js';
|
|
27
28
|
function isRedactedThinking(providerOptions) {
|
|
28
29
|
const anthropic = providerOptions?.anthropic;
|
|
29
30
|
return (!!anthropic &&
|
|
@@ -118,6 +119,7 @@ export class AiSdkMessageProjection {
|
|
|
118
119
|
}
|
|
119
120
|
canReplayProviderNative(plan) {
|
|
120
121
|
const support = this.input.modelAdapter.runtimeEventReplaySupport();
|
|
122
|
+
const replayableDeepSeekPairs = this.replayableDeepSeekPairIds(plan);
|
|
121
123
|
for (const item of plan.items) {
|
|
122
124
|
if (item.kind === 'tool_call' && !support.toolCalls)
|
|
123
125
|
return false;
|
|
@@ -125,7 +127,8 @@ export class AiSdkMessageProjection {
|
|
|
125
127
|
return false;
|
|
126
128
|
if ((item.kind === 'tool_call' || item.kind === 'tool_result') &&
|
|
127
129
|
item.providerExecuted === true &&
|
|
128
|
-
!support.providerExecutedTools
|
|
130
|
+
!support.providerExecutedTools &&
|
|
131
|
+
!replayableDeepSeekPairs.has(item.eventId)) {
|
|
129
132
|
return false;
|
|
130
133
|
}
|
|
131
134
|
if (item.kind === 'thinking' && item.signature && !support.signedThinking)
|
|
@@ -142,19 +145,38 @@ export class AiSdkMessageProjection {
|
|
|
142
145
|
*/
|
|
143
146
|
dropUnsupportedReplayItems(plan) {
|
|
144
147
|
const support = this.input.modelAdapter.runtimeEventReplaySupport();
|
|
148
|
+
const replayableDeepSeekPairs = this.replayableDeepSeekPairIds(plan);
|
|
145
149
|
return {
|
|
146
150
|
...plan,
|
|
147
151
|
items: plan.items.filter((item) => {
|
|
148
152
|
if (item.kind === 'tool_call' || item.kind === 'tool_result') {
|
|
149
153
|
if (!support.toolCalls || !support.toolResults)
|
|
150
154
|
return false;
|
|
151
|
-
if (item.providerExecuted === true &&
|
|
155
|
+
if (item.providerExecuted === true &&
|
|
156
|
+
!support.providerExecutedTools &&
|
|
157
|
+
!replayableDeepSeekPairs.has(item.eventId))
|
|
152
158
|
return false;
|
|
153
159
|
}
|
|
154
160
|
return true;
|
|
155
161
|
}),
|
|
156
162
|
};
|
|
157
163
|
}
|
|
164
|
+
replayableDeepSeekPairIds(plan) {
|
|
165
|
+
const ids = new Set();
|
|
166
|
+
if (!this.input.modelAdapter.supportsDeepSeekWebSearchReplay())
|
|
167
|
+
return ids;
|
|
168
|
+
for (const entry of buildRuntimeEventReplayTimeline(plan.items)) {
|
|
169
|
+
if (entry.kind !== 'assistant_step')
|
|
170
|
+
continue;
|
|
171
|
+
for (const { call, result } of entry.calls) {
|
|
172
|
+
if (result?.providerExecuted !== true || !deepSeekWebSearchReplayItem(call))
|
|
173
|
+
continue;
|
|
174
|
+
ids.add(call.eventId);
|
|
175
|
+
ids.add(result.eventId);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return ids;
|
|
179
|
+
}
|
|
158
180
|
/**
|
|
159
181
|
* Materialize a replay plan into provider messages, grouping each assistant
|
|
160
182
|
* step's reasoning + text + tool calls into ONE assistant message (Anthropic
|
|
@@ -310,12 +332,19 @@ export class AiSdkMessageProjection {
|
|
|
310
332
|
for (const { call, result } of exchanges) {
|
|
311
333
|
if (call.providerExecuted !== true)
|
|
312
334
|
continue;
|
|
335
|
+
const deepSeekItem = result?.providerExecuted === true &&
|
|
336
|
+
this.input.modelAdapter.supportsDeepSeekWebSearchReplay()
|
|
337
|
+
? deepSeekWebSearchReplayItem(call)
|
|
338
|
+
: undefined;
|
|
339
|
+
const replayOptions = deepSeekItem
|
|
340
|
+
? deepSeekWebSearchReplayOptions(deepSeekItem)
|
|
341
|
+
: call.providerOptions;
|
|
313
342
|
content.push({
|
|
314
343
|
type: 'tool-call',
|
|
315
344
|
toolCallId: call.toolCallId,
|
|
316
345
|
toolName: call.toolName,
|
|
317
346
|
input: call.input,
|
|
318
|
-
...(
|
|
347
|
+
...(replayOptions !== undefined ? { providerOptions: replayOptions } : {}),
|
|
319
348
|
providerExecuted: true,
|
|
320
349
|
});
|
|
321
350
|
if (!result || result.providerExecuted !== true)
|
|
@@ -326,6 +355,7 @@ export class AiSdkMessageProjection {
|
|
|
326
355
|
toolCallId: result.toolCallId,
|
|
327
356
|
toolName: result.toolName,
|
|
328
357
|
output: await materializeReplayToolResult(result, call.toolName),
|
|
358
|
+
...(deepSeekItem ? { providerOptions: replayOptions } : {}),
|
|
329
359
|
});
|
|
330
360
|
}
|
|
331
361
|
if (text && text.content.length > 0) {
|
|
@@ -529,6 +529,12 @@ export async function cloneConversationRuntimeLedger(input) {
|
|
|
529
529
|
await input.runStore.appendEvent(input.referenceMap.targetSessionId, runId, clonedEvent);
|
|
530
530
|
}
|
|
531
531
|
if (plan.terminal.kind === 'fact' && terminalEvent) {
|
|
532
|
+
// The preflight rejects handoff lineage before a plan reaches cloning,
|
|
533
|
+
// so a handed-off run never gets here; the guard keeps the outcome type
|
|
534
|
+
// honest at the boundary.
|
|
535
|
+
if (plan.terminal.fact.runStatus === 'handed_off') {
|
|
536
|
+
throw new Error(`Copied AgentRun ${plan.run.runId} carries unresolved handoff lineage`);
|
|
537
|
+
}
|
|
532
538
|
await commitTerminalRunWithRuntimeFact({
|
|
533
539
|
runtimeEventStore: input.runtimeEventStore,
|
|
534
540
|
newId: input.newId,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
const EXTENSION_ID = 'deepseek.web_search';
|
|
20
|
+
function isRecord(value) {
|
|
21
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
22
|
+
}
|
|
23
|
+
function completedWebSearchItem(value) {
|
|
24
|
+
if (!isRecord(value) || value.type !== 'web_search_call' || value.status !== 'completed') {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return typeof value.id === 'string' && value.id.length > 0 && isRecord(value.action);
|
|
28
|
+
}
|
|
29
|
+
/** Only original, completed provider output is eligible for exact replay. */
|
|
30
|
+
export function deepSeekWebSearchReplayItem(call) {
|
|
31
|
+
if (call.providerExecuted !== true || call.toolName !== 'WebSearch')
|
|
32
|
+
return undefined;
|
|
33
|
+
const deepseek = call.providerOptions?.deepseek;
|
|
34
|
+
const item = isRecord(deepseek) ? deepseek.makaWebSearchItem : undefined;
|
|
35
|
+
return completedWebSearchItem(item) && item.id === call.toolCallId ? item : undefined;
|
|
36
|
+
}
|
|
37
|
+
export function deepSeekWebSearchReplayOptions(item) {
|
|
38
|
+
return { deepseek: { openResponsesExtension: { id: EXTENSION_ID, item } } };
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Decode historical DeepSeek Responses web search output. Current DeepSeek
|
|
42
|
+
* models ignore built-in web_search; this codec declares no outgoing tool.
|
|
43
|
+
*/
|
|
44
|
+
export const deepSeekWebSearchCodec = {
|
|
45
|
+
id: EXTENSION_ID,
|
|
46
|
+
allowBareTypes: true,
|
|
47
|
+
bareItemTypes: ['web_search_call'],
|
|
48
|
+
decodeItem: ({ item }) => {
|
|
49
|
+
if (!completedWebSearchItem(item))
|
|
50
|
+
return undefined;
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
type: 'tool-call',
|
|
54
|
+
toolCallId: item.id,
|
|
55
|
+
toolName: 'WebSearch',
|
|
56
|
+
input: JSON.stringify(item.action),
|
|
57
|
+
providerExecuted: true,
|
|
58
|
+
providerMetadata: { deepseek: { makaWebSearchItem: item } },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'tool-result',
|
|
62
|
+
toolCallId: item.id,
|
|
63
|
+
toolName: 'WebSearch',
|
|
64
|
+
result: {
|
|
65
|
+
action: item.action ?? null,
|
|
66
|
+
sources: item.sources ?? (isRecord(item.action) ? item.action.sources : undefined) ?? [],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -150,6 +150,13 @@ export async function planHistoryCompaction(input) {
|
|
|
150
150
|
if (phase !== 'standalone' && headAnchorIndex < 0) {
|
|
151
151
|
return { decision: 'fail_open', reason: 'no_safe_completed_span' };
|
|
152
152
|
}
|
|
153
|
+
// After a retreat the summarizer has already been called and refused, so a
|
|
154
|
+
// smaller window with nothing safe to fold is that failure, not a pool that
|
|
155
|
+
// never reached the summarizer (#5790 review).
|
|
156
|
+
let retreated = false;
|
|
157
|
+
const noSafeSpan = () => retreated
|
|
158
|
+
? { decision: 'fail_open', reason: 'summarizer_failed', diagnosticReason: 'input_too_large' }
|
|
159
|
+
: { decision: 'fail_open', reason: 'no_safe_completed_span' };
|
|
153
160
|
let maxCoveredCount = input.orderedEvents.length;
|
|
154
161
|
while (maxCoveredCount > 0) {
|
|
155
162
|
const boundary = selectSafeCompactionPrefix(input.orderedEvents, {
|
|
@@ -169,9 +176,8 @@ export async function planHistoryCompaction(input) {
|
|
|
169
176
|
: phase === 'mid_turn'
|
|
170
177
|
? boundary.ok && boundary.coveredCount > headAnchorIndex && boundary.coveredCount >= 2
|
|
171
178
|
: boundary.ok && boundary.coveredCount > 0 && boundary.coveredCount <= headAnchorIndex;
|
|
172
|
-
if (!boundary.ok || !hasSafeCoverage)
|
|
173
|
-
return
|
|
174
|
-
}
|
|
179
|
+
if (!boundary.ok || !hasSafeCoverage)
|
|
180
|
+
return noSafeSpan();
|
|
175
181
|
const coveredRuntimeEvents = input.orderedEvents.slice(0, boundary.coveredCount);
|
|
176
182
|
const tailRuntimeEvents = input.orderedEvents.slice(boundary.coveredCount);
|
|
177
183
|
// Roll forward from a previous checkpoint when it is an exact prefix of the
|
|
@@ -239,6 +245,7 @@ export async function planHistoryCompaction(input) {
|
|
|
239
245
|
};
|
|
240
246
|
}
|
|
241
247
|
maxCoveredCount = proven;
|
|
248
|
+
retreated = true;
|
|
242
249
|
continue;
|
|
243
250
|
}
|
|
244
251
|
return {
|
|
@@ -295,7 +302,7 @@ export async function planHistoryCompaction(input) {
|
|
|
295
302
|
estimatedTokensAfter,
|
|
296
303
|
};
|
|
297
304
|
}
|
|
298
|
-
return
|
|
305
|
+
return noSafeSpan();
|
|
299
306
|
}
|
|
300
307
|
/** Replay the latest durable checkpoint when it exactly covers the ledger prefix. */
|
|
301
308
|
export function applyRuntimeEventHistoryCompact(events, policy, charsPerToken = 4) {
|
|
@@ -50,11 +50,9 @@ export class ModelAdapter {
|
|
|
50
50
|
return {
|
|
51
51
|
toolCalls: true,
|
|
52
52
|
toolResults: true,
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
// leaving a dangling function_call on the wire. Fail closed until the
|
|
57
|
-
// upstream extension seam (vercel/ai#18899) can round-trip the pair.
|
|
53
|
+
// General Open Responses provider tool replay remains unsupported.
|
|
54
|
+
// AiSdkMessageProjection admits only DeepSeek calls with a paired,
|
|
55
|
+
// original web_search_call item through its narrower per-item check.
|
|
58
56
|
providerExecutedTools: this.runtime.reasoningReplay.kind !== 'responses' ||
|
|
59
57
|
this.runtime.reasoningReplay.contract.adapter !== 'open-responses',
|
|
60
58
|
signedThinking: this.runtime.reasoningReplay.kind === 'anthropic-signed',
|
|
@@ -78,6 +76,12 @@ export class ModelAdapter {
|
|
|
78
76
|
: 'none',
|
|
79
77
|
};
|
|
80
78
|
}
|
|
79
|
+
supportsDeepSeekWebSearchReplay() {
|
|
80
|
+
return (this.input.connection.providerType === 'deepseek' &&
|
|
81
|
+
this.runtime.wire === 'openai-responses' &&
|
|
82
|
+
this.runtime.reasoningReplay.kind === 'responses' &&
|
|
83
|
+
this.runtime.reasoningReplay.contract.adapter === 'open-responses');
|
|
84
|
+
}
|
|
81
85
|
resolveModel() {
|
|
82
86
|
if (providerAuthRequiresSecret(this.input.connection.providerType) && !this.input.apiKey) {
|
|
83
87
|
throw new Error(`No API key stored for connection "${this.input.connection.slug}"`);
|
|
@@ -31,6 +31,7 @@ import { modelOverride, resolveThinkingLevel, THINKING_LEVELS, supportsCustomFas
|
|
|
31
31
|
import { createOpenAiChatReasoningTransport, createOpenAiChatReasoningTransportState, } from './openai-chat-reasoning-transport.js';
|
|
32
32
|
import { openResponsesUrl } from './provider-urls.js';
|
|
33
33
|
import { createOpenResponsesCompatibilityFinalizer } from './open-responses-compatibility.js';
|
|
34
|
+
import { deepSeekWebSearchCodec } from './deepseek-web-search-codec.js';
|
|
34
35
|
import { resolveModelRuntime } from './model-runtime.js';
|
|
35
36
|
import { openAiCodexHeaders } from './subscription-auth.js';
|
|
36
37
|
import { createRequestCustomizationFetch } from './request-customization-fetch.js';
|
|
@@ -69,6 +70,9 @@ export function getAIModel(input) {
|
|
|
69
70
|
apiKey,
|
|
70
71
|
url: openResponsesUrl(baseURL),
|
|
71
72
|
fetch: responsesFetch,
|
|
73
|
+
...(connection.providerType === 'deepseek'
|
|
74
|
+
? { experimental_extensions: [deepSeekWebSearchCodec] }
|
|
75
|
+
: {}),
|
|
72
76
|
})(modelId);
|
|
73
77
|
};
|
|
74
78
|
switch (adapter.kind) {
|
|
@@ -19,26 +19,20 @@
|
|
|
19
19
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
20
20
|
import { Service } from './plugin-kernel.js';
|
|
21
21
|
import { pluginInvocationSignal } from './plugin-invocation-signal.js';
|
|
22
|
+
import { PluginRuntimeBinding } from './plugin-internals.js';
|
|
22
23
|
/** Agent registry and invocation carrier exposed to trusted Host plugins. */
|
|
23
24
|
export class PluginAgentService extends Service {
|
|
24
25
|
invocations = new AsyncLocalStorage();
|
|
25
|
-
|
|
26
|
+
runtimeBinding;
|
|
26
27
|
constructor(ctx) {
|
|
27
28
|
super(ctx, 'agents');
|
|
29
|
+
this.runtimeBinding = new PluginRuntimeBinding('agents', 'Agent');
|
|
28
30
|
ctx.accessor('agent', {
|
|
29
31
|
get: () => this.current(),
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
34
|
bindRuntime(runtime) {
|
|
33
|
-
|
|
34
|
-
throw new Error('Only the Host may bind the Agent Runtime');
|
|
35
|
-
if (this.agentRuntime)
|
|
36
|
-
throw new Error('Plugin Agent Runtime is already bound');
|
|
37
|
-
this.agentRuntime = runtime;
|
|
38
|
-
return this.ctx.effect(() => () => {
|
|
39
|
-
if (this.agentRuntime === runtime)
|
|
40
|
-
this.agentRuntime = undefined;
|
|
41
|
-
}, 'agents.bindRuntime()');
|
|
35
|
+
return this.runtimeBinding.bind(this.ctx, runtime);
|
|
42
36
|
}
|
|
43
37
|
currentInvocation() {
|
|
44
38
|
return this.invocations.getStore();
|
|
@@ -98,9 +92,7 @@ export class PluginAgentService extends Service {
|
|
|
98
92
|
return Object.freeze((await this.runtime().roots(invocation)).map((descriptor) => this.handle(descriptor, invocation)));
|
|
99
93
|
}
|
|
100
94
|
runtime() {
|
|
101
|
-
|
|
102
|
-
throw new Error('Plugin Agent Runtime is unavailable');
|
|
103
|
-
return this.agentRuntime;
|
|
95
|
+
return this.runtimeBinding.get();
|
|
104
96
|
}
|
|
105
97
|
handle(descriptor, invocation = this.requireInvocation()) {
|
|
106
98
|
const service = this;
|
|
@@ -17,24 +17,18 @@
|
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
19
|
import { Service } from './plugin-kernel.js';
|
|
20
|
+
import { PluginRuntimeBinding } from './plugin-internals.js';
|
|
20
21
|
/** Session-owned rich result publication and retrieval. */
|
|
21
22
|
export class PluginAttachmentService extends Service {
|
|
22
23
|
agents;
|
|
23
|
-
|
|
24
|
+
runtimeBinding;
|
|
24
25
|
constructor(ctx, agents) {
|
|
25
26
|
super(ctx, 'attachments');
|
|
26
27
|
this.agents = agents;
|
|
28
|
+
this.runtimeBinding = new PluginRuntimeBinding('attachments', 'Attachment');
|
|
27
29
|
}
|
|
28
30
|
bindRuntime(runtime) {
|
|
29
|
-
|
|
30
|
-
throw new Error('Only the Host may bind the Attachment Runtime');
|
|
31
|
-
if (this.attachmentRuntime)
|
|
32
|
-
throw new Error('Plugin Attachment Runtime is already bound');
|
|
33
|
-
this.attachmentRuntime = runtime;
|
|
34
|
-
return this.ctx.effect(() => () => {
|
|
35
|
-
if (this.attachmentRuntime === runtime)
|
|
36
|
-
this.attachmentRuntime = undefined;
|
|
37
|
-
}, 'attachments.bindRuntime()');
|
|
31
|
+
return this.runtimeBinding.bind(this.ctx, runtime);
|
|
38
32
|
}
|
|
39
33
|
create(input) {
|
|
40
34
|
return this.runtime().create(input, this.agents.requireInvocation());
|
|
@@ -46,8 +40,6 @@ export class PluginAttachmentService extends Service {
|
|
|
46
40
|
return this.runtime().list(this.agents.requireInvocation());
|
|
47
41
|
}
|
|
48
42
|
runtime() {
|
|
49
|
-
|
|
50
|
-
throw new Error('Plugin Attachment Runtime is unavailable');
|
|
51
|
-
return this.attachmentRuntime;
|
|
43
|
+
return this.runtimeBinding.get();
|
|
52
44
|
}
|
|
53
45
|
}
|
|
@@ -17,10 +17,9 @@
|
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
19
|
/// <reference lib="es2023.collection" />
|
|
20
|
-
import { Context } from './plugin-kernel.js';
|
|
20
|
+
import { Context, FiberState } from './plugin-kernel.js';
|
|
21
|
+
import { freezeCompositionEntry, walkCompositionEntry } from './plugin-internals.js';
|
|
21
22
|
import { fiberStateName, MakaPluginRuntimeError, MakaPluginTransactionBuffer, validateCompositionEntry, validatePluginPackage, validatePluginRootId, } from './plugin-runtime.js';
|
|
22
|
-
const FIBER_PENDING = 0;
|
|
23
|
-
const FIBER_FAILED = 3;
|
|
24
23
|
export class MakaCompositionLoader {
|
|
25
24
|
root;
|
|
26
25
|
#packages = new Map();
|
|
@@ -161,7 +160,7 @@ export class MakaCompositionLoader {
|
|
|
161
160
|
}
|
|
162
161
|
validateCompositionEntry(entry);
|
|
163
162
|
const descendantIds = new Set();
|
|
164
|
-
for (const item of
|
|
163
|
+
for (const item of walkCompositionEntry(entry)) {
|
|
165
164
|
if (descendantIds.has(item.id)) {
|
|
166
165
|
throw new MakaPluginRuntimeError('entry_exists', `Replacement subtree repeats entry ${item.id}`);
|
|
167
166
|
}
|
|
@@ -171,7 +170,7 @@ export class MakaCompositionLoader {
|
|
|
171
170
|
throw new MakaPluginRuntimeError('entry_exists', `Composition entry already exists: ${item.id}`);
|
|
172
171
|
}
|
|
173
172
|
}
|
|
174
|
-
const inspection = await this.#replace(current,
|
|
173
|
+
const inspection = await this.#replace(current, freezeCompositionEntry(entry));
|
|
175
174
|
this.#compositionGeneration += 1;
|
|
176
175
|
return inspection;
|
|
177
176
|
});
|
|
@@ -249,7 +248,7 @@ export class MakaCompositionLoader {
|
|
|
249
248
|
...Object.entries(state.roots.sessions).map(([id, entries]) => [`session:${id}`, entries]),
|
|
250
249
|
]);
|
|
251
250
|
const recoverEntry = async (spec, rootId, parent, parentContext, ancestorDisabled) => {
|
|
252
|
-
for (const item of
|
|
251
|
+
for (const item of walkCompositionEntry(spec)) {
|
|
253
252
|
if (stagedIds.has(item.id)) {
|
|
254
253
|
failures.push(Object.freeze({
|
|
255
254
|
entryId: spec.id,
|
|
@@ -258,7 +257,7 @@ export class MakaCompositionLoader {
|
|
|
258
257
|
return undefined;
|
|
259
258
|
}
|
|
260
259
|
}
|
|
261
|
-
const shallow =
|
|
260
|
+
const shallow = freezeCompositionEntry({ ...spec, children: [] });
|
|
262
261
|
let live;
|
|
263
262
|
try {
|
|
264
263
|
validateCompositionEntry(shallow);
|
|
@@ -278,7 +277,10 @@ export class MakaCompositionLoader {
|
|
|
278
277
|
if (recovered)
|
|
279
278
|
live.children.push(recovered);
|
|
280
279
|
}
|
|
281
|
-
live.spec =
|
|
280
|
+
live.spec = freezeCompositionEntry({
|
|
281
|
+
...live.spec,
|
|
282
|
+
children: live.children.map(serialize),
|
|
283
|
+
});
|
|
282
284
|
return live;
|
|
283
285
|
};
|
|
284
286
|
try {
|
|
@@ -331,7 +333,7 @@ export class MakaCompositionLoader {
|
|
|
331
333
|
stagedRoots.set(rootId, root);
|
|
332
334
|
for (const spec of entries) {
|
|
333
335
|
validateCompositionEntry(spec);
|
|
334
|
-
for (const item of
|
|
336
|
+
for (const item of walkCompositionEntry(spec)) {
|
|
335
337
|
if (stagedIds.has(item.id))
|
|
336
338
|
throw new MakaPluginRuntimeError('entry_exists', `Composition entry already exists: ${item.id}`);
|
|
337
339
|
stagedIds.add(item.id);
|
|
@@ -453,7 +455,13 @@ export class MakaCompositionLoader {
|
|
|
453
455
|
}
|
|
454
456
|
for (const [service, config] of Object.entries(spec.intercept ?? {}))
|
|
455
457
|
context = context.intercept(service, config);
|
|
456
|
-
const live = {
|
|
458
|
+
const live = {
|
|
459
|
+
spec: freezeCompositionEntry(spec),
|
|
460
|
+
rootId,
|
|
461
|
+
parent,
|
|
462
|
+
context,
|
|
463
|
+
children: [],
|
|
464
|
+
};
|
|
457
465
|
const disabled = ancestorDisabled || spec.disabled === true;
|
|
458
466
|
if (!disabled && spec.packageId) {
|
|
459
467
|
const pkg = this.#packages.get(spec.packageId);
|
|
@@ -471,16 +479,16 @@ export class MakaCompositionLoader {
|
|
|
471
479
|
});
|
|
472
480
|
context = context.extend({ maka: metadata });
|
|
473
481
|
const transaction = this.#transaction?.(context) ?? new MakaPluginTransactionBuffer(context);
|
|
474
|
-
|
|
475
|
-
context = context.extend({ makaTransaction: transaction });
|
|
482
|
+
context = context.extend({ makaTransaction: transaction });
|
|
476
483
|
live.context = context;
|
|
477
484
|
live.generation = generation;
|
|
478
485
|
const plugin = entryPlugin(selectedPlugin, spec.inject);
|
|
479
486
|
live.fiber = context.plugin(plugin, spec.config);
|
|
480
487
|
try {
|
|
481
488
|
await live.fiber.await();
|
|
482
|
-
if (live.fiber.state ===
|
|
489
|
+
if (live.fiber.state === FiberState.FAILED) {
|
|
483
490
|
throw new Error(`Plugin Fiber failed: ${spec.id}`);
|
|
491
|
+
}
|
|
484
492
|
}
|
|
485
493
|
catch (error) {
|
|
486
494
|
live.diagnostic = diagnostic(error);
|
|
@@ -492,7 +500,7 @@ export class MakaCompositionLoader {
|
|
|
492
500
|
cleanupErrors.push(cleanupError);
|
|
493
501
|
}
|
|
494
502
|
try {
|
|
495
|
-
await transaction
|
|
503
|
+
await transaction.rollback();
|
|
496
504
|
}
|
|
497
505
|
catch (cleanupError) {
|
|
498
506
|
cleanupErrors.push(cleanupError);
|
|
@@ -592,7 +600,7 @@ export class MakaCompositionLoader {
|
|
|
592
600
|
}
|
|
593
601
|
async #update(entryId, patch) {
|
|
594
602
|
const current = this.#requireEntry(entryId);
|
|
595
|
-
const next =
|
|
603
|
+
const next = freezeCompositionEntry({
|
|
596
604
|
...current.spec,
|
|
597
605
|
...patch,
|
|
598
606
|
id: current.spec.id,
|
|
@@ -637,7 +645,7 @@ export class MakaCompositionLoader {
|
|
|
637
645
|
}
|
|
638
646
|
#assertUniqueSubtree(entry) {
|
|
639
647
|
const local = new Set();
|
|
640
|
-
for (const item of
|
|
648
|
+
for (const item of walkCompositionEntry(entry)) {
|
|
641
649
|
if (local.has(item.id) || this.#entries.has(item.id))
|
|
642
650
|
throw new MakaPluginRuntimeError('entry_exists', `Composition entry already exists: ${item.id}`);
|
|
643
651
|
local.add(item.id);
|
|
@@ -658,7 +666,7 @@ export class MakaCompositionLoader {
|
|
|
658
666
|
const inject = Array.isArray(sourceInject)
|
|
659
667
|
? sourceInject
|
|
660
668
|
: Object.keys(sourceInject ?? {});
|
|
661
|
-
const waitingFor = entry.fiber?.state ===
|
|
669
|
+
const waitingFor = entry.fiber?.state === FiberState.PENDING
|
|
662
670
|
? inject.filter((name) => entry.context.get(name) === undefined)
|
|
663
671
|
: [];
|
|
664
672
|
return Object.freeze({
|
|
@@ -732,21 +740,8 @@ function mergeInject(left, right) {
|
|
|
732
740
|
function freezePackage(pkg) {
|
|
733
741
|
return Object.freeze({ ...pkg, contributions: Object.freeze([...(pkg.contributions ?? [])]) });
|
|
734
742
|
}
|
|
735
|
-
function freezeEntry(entry) {
|
|
736
|
-
return Object.freeze({
|
|
737
|
-
...entry,
|
|
738
|
-
...(entry.inject && !Array.isArray(entry.inject)
|
|
739
|
-
? { inject: Object.freeze({ ...entry.inject }) }
|
|
740
|
-
: entry.inject
|
|
741
|
-
? { inject: Object.freeze([...entry.inject]) }
|
|
742
|
-
: {}),
|
|
743
|
-
...(entry.isolate ? { isolate: Object.freeze({ ...entry.isolate }) } : {}),
|
|
744
|
-
...(entry.intercept ? { intercept: Object.freeze({ ...entry.intercept }) } : {}),
|
|
745
|
-
children: Object.freeze((entry.children ?? []).map(freezeEntry)),
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
743
|
function serialize(entry) {
|
|
749
|
-
return
|
|
744
|
+
return freezeCompositionEntry({ ...entry.spec, children: entry.children.map(serialize) });
|
|
750
745
|
}
|
|
751
746
|
function shallowCompositionEqual(left, right) {
|
|
752
747
|
if (Object.is(left, right))
|
|
@@ -759,11 +754,6 @@ function shallowCompositionEqual(left, right) {
|
|
|
759
754
|
leftEntries.every(([key, value]) => Object.hasOwn(right, key) &&
|
|
760
755
|
Object.is(value, right[key])));
|
|
761
756
|
}
|
|
762
|
-
function* walk(entry) {
|
|
763
|
-
yield entry;
|
|
764
|
-
for (const child of entry.children ?? [])
|
|
765
|
-
yield* walk(child);
|
|
766
|
-
}
|
|
767
757
|
function* walkLive(entry) {
|
|
768
758
|
yield entry;
|
|
769
759
|
for (const child of entry.children)
|
|
@@ -18,28 +18,20 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { Service } from './plugin-kernel.js';
|
|
20
20
|
import { pluginIdentity, registerPluginContribution } from './plugin-runtime.js';
|
|
21
|
+
import { PluginRuntimeBinding } from './plugin-internals.js';
|
|
21
22
|
class PluginNamespacedDataService extends Service {
|
|
22
23
|
domain;
|
|
23
|
-
|
|
24
|
+
runtimeBinding;
|
|
24
25
|
constructor(ctx, name, domain) {
|
|
25
26
|
super(ctx, name);
|
|
26
27
|
this.domain = domain;
|
|
28
|
+
this.runtimeBinding = new PluginRuntimeBinding(name, domain, `Plugin ${domain}`);
|
|
27
29
|
}
|
|
28
30
|
bindRuntime(runtime) {
|
|
29
|
-
|
|
30
|
-
throw new Error(`Only the Host may bind the Plugin ${this.domain} Runtime`);
|
|
31
|
-
if (this.dataRuntime)
|
|
32
|
-
throw new Error(`Plugin ${this.domain} Runtime is already bound`);
|
|
33
|
-
this.dataRuntime = runtime;
|
|
34
|
-
return this.ctx.effect(() => () => {
|
|
35
|
-
if (this.dataRuntime === runtime)
|
|
36
|
-
this.dataRuntime = undefined;
|
|
37
|
-
}, `${this.domain}.bindRuntime()`);
|
|
31
|
+
return this.runtimeBinding.bind(this.ctx, runtime);
|
|
38
32
|
}
|
|
39
33
|
runtime() {
|
|
40
|
-
|
|
41
|
-
throw new Error(`Plugin ${this.domain} Runtime is unavailable`);
|
|
42
|
-
return this.dataRuntime;
|
|
34
|
+
return this.runtimeBinding.get();
|
|
43
35
|
}
|
|
44
36
|
namespace() {
|
|
45
37
|
const { extensionId, scopeId } = pluginIdentity(this.ctx);
|
|
@@ -158,21 +150,14 @@ export class PluginStorageService extends PluginNamespacedDataService {
|
|
|
158
150
|
const authorizationCommit = Symbol('authorizationCommit');
|
|
159
151
|
/** Declared Secret Slots. Values stay in Host custody and are never enumerable. */
|
|
160
152
|
export class PluginCredentialService extends Service {
|
|
161
|
-
|
|
153
|
+
runtimeBinding;
|
|
162
154
|
slots = new Map();
|
|
163
155
|
constructor(ctx) {
|
|
164
156
|
super(ctx, 'credentials');
|
|
157
|
+
this.runtimeBinding = new PluginRuntimeBinding('credentials', 'Credential');
|
|
165
158
|
}
|
|
166
159
|
bindRuntime(runtime) {
|
|
167
|
-
|
|
168
|
-
throw new Error('Only the Host may bind the Credential Runtime');
|
|
169
|
-
if (this.dataRuntime)
|
|
170
|
-
throw new Error('Plugin Credential Runtime is already bound');
|
|
171
|
-
this.dataRuntime = runtime;
|
|
172
|
-
return this.ctx.effect(() => () => {
|
|
173
|
-
if (this.dataRuntime === runtime)
|
|
174
|
-
this.dataRuntime = undefined;
|
|
175
|
-
}, 'credentials.bindRuntime()');
|
|
160
|
+
return this.runtimeBinding.bind(this.ctx, runtime);
|
|
176
161
|
}
|
|
177
162
|
declare(slot) {
|
|
178
163
|
validateSlot(slot);
|
|
@@ -215,9 +200,7 @@ export class PluginCredentialService extends Service {
|
|
|
215
200
|
return slot;
|
|
216
201
|
}
|
|
217
202
|
runtime() {
|
|
218
|
-
|
|
219
|
-
throw new Error('Plugin Credential Runtime is unavailable');
|
|
220
|
-
return this.dataRuntime;
|
|
203
|
+
return this.runtimeBinding.get();
|
|
221
204
|
}
|
|
222
205
|
}
|
|
223
206
|
/** Effect-owned authorization flows with one cancellable attempt per Secret Slot. */
|