maka-agent 0.2.0-dev.3.20260830 → 0.2.0-dev.31.20260913
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 +242 -5
- package/README.md +38 -19
- package/README.zh-CN.md +34 -19
- package/RUNTIME_HOST_PEER_DEPENDENCIES.rust.tsv +70 -0
- package/RUNTIME_HOST_PEER_THIRD_PARTY_NOTICES.txt +1839 -140
- package/THIRD_PARTY_NOTICES.txt +477 -258
- package/dist/acp/maka-acp-agent.js +13 -3
- package/dist/acp/prompt-content.js +225 -0
- package/dist/acp/session-configuration.js +143 -0
- package/dist/acp/session-event-mapper.js +103 -0
- package/dist/acp/session-registry.js +1030 -0
- package/dist/acp/stdio-server.js +29 -1
- package/dist/activation-command.js +1 -2
- package/dist/cli-core.js +99 -102
- package/dist/cli-ui-locale.js +7 -2
- package/dist/eval-bundle-path.js +1 -1
- package/dist/mcp-capability-provider.js +8 -11
- package/dist/onboarding-catalog.js +4 -5
- package/dist/pi-transcript-tools.js +9 -2
- package/dist/pi-transcript.js +86 -31
- package/dist/pi-tui-form-interaction.js +497 -0
- package/dist/pi-tui-layout.js +60 -12
- package/dist/pi-tui-mcp-status.js +122 -124
- package/dist/pi-tui-pickers.js +562 -102
- package/dist/pi-tui-runner.js +722 -170
- package/dist/pi-tui-todo.js +221 -0
- package/dist/pi-tui-transcript-viewer.js +134 -7
- package/dist/run-command-core.js +6 -14
- package/dist/runtime-host-access-command.js +37 -4
- package/dist/runtime-host-capability-provider-command.js +16 -2
- package/dist/runtime-host-cli-context.js +300 -80
- package/dist/runtime-host-cli-installation.js +8 -2
- package/dist/runtime-host-cli.js +397 -67
- package/dist/runtime-host-handoff-surface.js +108 -0
- package/dist/runtime-host-help.js +244 -0
- package/dist/runtime-host-installed-update-activator.js +70 -33
- package/dist/runtime-host-installed-update-bootstrap.js +13 -0
- package/dist/runtime-host-installed-update-coordinator.js +44 -96
- package/dist/runtime-host-lifecycle-transaction.js +101 -28
- package/dist/runtime-host-local-handoff.js +215 -41
- package/dist/runtime-host-local-managed-activation.js +84 -0
- package/dist/runtime-host-local-source-retirement.js +119 -0
- package/dist/runtime-host-local-target-activation.js +141 -0
- package/dist/runtime-host-managed-deployment.js +158 -51
- package/dist/runtime-host-managed-lifecycle-manager.js +5 -6
- package/dist/runtime-host-onboarding.js +368 -21
- package/dist/runtime-host-openrc-service.js +469 -0
- package/dist/runtime-host-operator-retirement.js +50 -0
- package/dist/runtime-host-package-deployment.js +36 -2
- package/dist/runtime-host-peer-artifact.js +3 -3
- package/dist/runtime-host-peer-management-command.js +30 -12
- package/dist/runtime-host-peer-mesh-management-command.js +18 -1
- package/dist/runtime-host-plugin-command.js +101 -0
- package/dist/runtime-host-profile-command.js +1 -1
- package/dist/runtime-host-run-command.js +32 -57
- package/dist/runtime-host-service-command.js +3 -3
- package/dist/runtime-host-service-management-command.js +67 -17
- package/dist/runtime-host-service-manager.js +3 -3
- package/dist/runtime-host-session-channel.js +79 -9
- package/dist/runtime-host-session-driver.js +85 -32
- package/dist/runtime-host-session-update.js +62 -0
- package/dist/runtime-host-setup-command.js +103 -65
- package/dist/runtime-host-systemd-service.js +9 -3
- package/dist/runtime-host-task-readiness.js +2 -3
- package/dist/runtime-host-tui-command.js +58 -77
- package/dist/runtime-host-tui-context.js +56 -17
- package/dist/runtime-host-tui-owner.js +226 -0
- package/dist/runtime-host-update-command.js +131 -48
- package/dist/runtime-host-update-discovery.js +1 -0
- package/dist/runtime-host-update-reconciliation.js +7 -7
- package/dist/runtime-host-windows-service.js +166 -0
- package/dist/runtime-host-windows-task-launcher-artifact.js +75 -0
- package/dist/session-export-command.js +72 -0
- package/dist/session-import-command.js +69 -0
- package/dist/tui-autocomplete-layout.js +3 -1
- package/dist/tui-clipboard.js +86 -0
- package/dist/tui-context-refresh.js +103 -0
- package/dist/tui-copy-catalog.js +976 -14
- package/dist/tui-copy-command.js +103 -0
- package/dist/tui-editor-render.js +36 -0
- package/dist/tui-host-owner-copy.js +24 -0
- package/dist/tui-mcp-control.js +87 -10
- package/dist/tui-mcp-remote-publication.js +395 -0
- package/native/runtime-host-peer/prebuilds/darwin-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/win32-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +117 -0
- package/node_modules/@ai-sdk/anthropic/dist/index.js +937 -411
- package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +335 -160
- package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +132 -43
- package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/anthropic/package.json +6 -6
- package/node_modules/@ai-sdk/cohere/CHANGELOG.md +105 -0
- package/node_modules/@ai-sdk/cohere/dist/index.js +20 -22
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/cohere/package.json +6 -6
- package/node_modules/@ai-sdk/google/CHANGELOG.md +176 -0
- package/node_modules/@ai-sdk/google/dist/index.js +4441 -2801
- package/node_modules/@ai-sdk/google/dist/internal/index.js +640 -177
- package/node_modules/@ai-sdk/google/docs/15-google.mdx +225 -97
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/google/package.json +6 -6
- package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +81 -0
- package/node_modules/@ai-sdk/open-responses/dist/index.js +570 -22
- package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +123 -2
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +38 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +1 -1
- package/node_modules/@ai-sdk/open-responses/package.json +3 -3
- package/node_modules/@ai-sdk/openai/CHANGELOG.md +184 -0
- package/node_modules/@ai-sdk/openai/dist/index.js +2013 -736
- package/node_modules/@ai-sdk/openai/dist/internal/index.js +1377 -478
- package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +208 -52
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai/package.json +6 -6
- package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +126 -0
- package/node_modules/@ai-sdk/openai-compatible/dist/index.js +105 -20
- package/node_modules/@ai-sdk/openai-compatible/dist/internal/index.js +9 -0
- package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +78 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai-compatible/package.json +6 -6
- package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +92 -0
- package/node_modules/@ai-sdk/provider-utils/dist/index.js +664 -168
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/provider-utils/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/README.md +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +36 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +24 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +2 -8
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +37 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +4 -10
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +63 -16
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +105 -45
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@maka/core/dist/agent-run.js +25 -336
- package/node_modules/@maka/core/dist/artifacts.js +32 -23
- package/node_modules/@maka/core/dist/attachments.js +100 -1
- package/node_modules/@maka/core/dist/bot-events.js +18 -63
- package/node_modules/@maka/core/dist/bounded-response.js +71 -0
- package/node_modules/@maka/core/dist/canonical-json.js +27 -0
- package/node_modules/@maka/core/dist/canonical-runtime-event.js +3 -1
- package/node_modules/@maka/core/dist/capabilities.js +35 -0
- package/node_modules/@maka/core/dist/chat-model-choice.js +11 -31
- package/node_modules/@maka/core/dist/client-capability-grant.js +149 -0
- package/node_modules/@maka/core/dist/collaboration.js +12 -0
- package/node_modules/@maka/core/dist/computer-use.js +27 -93
- package/node_modules/@maka/core/dist/connection-error-copy.js +17 -34
- package/node_modules/@maka/core/dist/connection-readiness.js +3 -31
- package/node_modules/@maka/core/dist/deep-research.js +1 -20
- package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
- package/node_modules/@maka/core/dist/display-redaction.js +18 -0
- package/node_modules/@maka/core/dist/durable-tool-result-projection.js +126 -0
- package/node_modules/@maka/core/dist/events.js +43 -14
- package/node_modules/@maka/core/dist/execution-inspect.js +12 -21
- package/node_modules/@maka/core/dist/foreign-session.js +3 -3
- package/node_modules/@maka/core/dist/goal.js +44 -2
- package/node_modules/@maka/core/dist/health.js +50 -45
- package/node_modules/@maka/core/dist/interaction.js +623 -2
- package/node_modules/@maka/core/dist/llm-connections.js +115 -87
- package/node_modules/@maka/core/dist/local-memory.js +2 -2
- package/node_modules/@maka/core/dist/maka-wordmark.js +23 -0
- package/node_modules/@maka/core/dist/model-call-attempt.js +134 -82
- package/node_modules/@maka/core/dist/model-call-usage-projection.js +0 -183
- package/node_modules/@maka/core/dist/model-catalog.js +191 -322
- package/node_modules/@maka/core/dist/model-facts.js +206 -0
- package/node_modules/@maka/core/dist/model-failure.js +40 -0
- package/node_modules/@maka/core/dist/model-metadata.generated.js +1910 -1875
- package/node_modules/@maka/core/dist/model-metadata.js +217 -209
- package/node_modules/@maka/core/dist/model-projection-transition.js +145 -0
- package/node_modules/@maka/core/dist/model-thinking.js +73 -24
- package/node_modules/@maka/core/dist/model-web-search.js +5 -4
- package/node_modules/@maka/core/dist/models-dev-projection.js +302 -0
- package/node_modules/@maka/core/dist/models-dev-refresh.js +55 -0
- package/node_modules/@maka/core/dist/onboarding.js +2 -1
- package/node_modules/@maka/core/dist/permission-profile.js +17 -0
- package/node_modules/@maka/core/dist/permission.js +0 -1
- package/node_modules/@maka/core/dist/provider-auth.js +47 -291
- package/node_modules/@maka/core/dist/provider-registry.js +115 -373
- package/node_modules/@maka/core/dist/record-schema.js +22 -2
- package/node_modules/@maka/core/dist/redaction.js +78 -40
- package/node_modules/@maka/core/dist/relative-time.js +6 -5
- package/node_modules/@maka/core/dist/run-composition.js +77 -2
- package/node_modules/@maka/core/dist/runtime-boundary.js +182 -66
- package/node_modules/@maka/core/dist/runtime-event-store.js +6 -0
- package/node_modules/@maka/core/dist/runtime-event.js +254 -12
- package/node_modules/@maka/core/dist/runtime-handoff.js +106 -0
- package/node_modules/@maka/core/dist/runtime-invocation.js +223 -0
- package/node_modules/@maka/core/dist/runtime-logical-execution.js +137 -0
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +198 -44
- package/node_modules/@maka/core/dist/runtime-policy/credential-vault-codec.js +9 -1
- package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +93 -0
- package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +118 -4
- package/node_modules/@maka/core/dist/runtime-policy.js +6 -2
- package/node_modules/@maka/core/dist/scheduled-task.js +12 -2
- package/node_modules/@maka/core/dist/session-name.js +0 -1
- package/node_modules/@maka/core/dist/session-send-projection.js +2 -1
- package/node_modules/@maka/core/dist/session-start-mode.js +42 -0
- package/node_modules/@maka/core/dist/session-todo.js +101 -0
- package/node_modules/@maka/core/dist/session-trace.js +5 -1
- package/node_modules/@maka/core/dist/session.js +313 -52
- package/node_modules/@maka/core/dist/settings.js +27 -8
- package/node_modules/@maka/core/dist/slash-command-catalog.js +4 -0
- package/node_modules/@maka/core/dist/task-submission-readiness.js +2 -1
- package/node_modules/@maka/core/dist/text-sanitize.js +27 -2
- package/node_modules/@maka/core/dist/tool-activity-args.js +4 -0
- package/node_modules/@maka/core/dist/tool-quiet-preview.js +20 -10
- package/node_modules/@maka/core/dist/tool-result-archive-evidence.js +22 -0
- package/node_modules/@maka/core/dist/tool-result-record-schema.js +5 -2
- package/node_modules/@maka/core/dist/ui-locale.js +23 -10
- package/node_modules/@maka/core/dist/unified-diff.js +33 -26
- package/node_modules/@maka/core/dist/usage-ledger-merge.js +10 -9
- package/node_modules/@maka/core/dist/usage-record-schema.js +38 -30
- package/node_modules/@maka/core/dist/usage-stats/types.js +2 -0
- package/node_modules/@maka/core/dist/workhub-action-result.js +68 -0
- package/node_modules/@maka/core/dist/workhub-routing.js +126 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/index.js +2175 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
- package/node_modules/@maka/core/node_modules/intl-messageformat/intl-messageformat.iife.js +2807 -0
- package/node_modules/@maka/core/node_modules/intl-messageformat/package.json +40 -0
- package/node_modules/@maka/core/package.json +22 -3
- package/node_modules/@maka/eval/dist/experiment-directory.js +4 -13
- package/node_modules/@maka/eval/dist/external-subject.js +1 -1
- package/node_modules/@maka/eval/dist/harbor-external-subject.js +4 -3
- package/node_modules/@maka/eval/dist/harness-executor.js +3 -2
- package/node_modules/@maka/eval/dist/install-preflight.js +39 -10
- package/node_modules/@maka/eval/dist/process-termination.js +83 -0
- package/node_modules/@maka/eval/dist/toolchain-verification.js +1 -1
- package/node_modules/@maka/eval/harbor/egress-proxy/entrypoint.sh +2 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +8 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +8 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +83 -11
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dump.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/parse.js +4 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@maka/eval/node_modules/undici/package.json +3 -3
- package/node_modules/@maka/eval/package.json +1 -1
- package/node_modules/@maka/mcp/dist/form-elicitation.js +213 -0
- package/node_modules/@maka/mcp/dist/index.js +465 -68
- package/node_modules/@maka/mcp/dist/sep-2243.js +3 -3
- package/node_modules/@maka/runtime/dist/agent-graph-timeline.js +12 -11
- package/node_modules/@maka/runtime/dist/agent-run-inspect.js +37 -85
- package/node_modules/@maka/runtime/dist/agent-run-recovery.js +36 -46
- package/node_modules/@maka/runtime/dist/agent-run.js +616 -468
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +125 -3751
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction-contract.js +6 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +494 -521
- package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +637 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-tool-repair.js +115 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +2678 -0
- package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/bash-model-output.js +7 -1
- package/node_modules/@maka/runtime/dist/bash-tail-buffer.js +13 -52
- package/node_modules/@maka/runtime/dist/bots/base-adapter.js +17 -0
- package/node_modules/@maka/runtime/dist/bots/bot-test.js +40 -23
- package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +93 -24
- package/node_modules/@maka/runtime/dist/bots/discord-bridge.js +4 -4
- package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +28 -25
- package/node_modules/@maka/runtime/dist/bots/qq-bridge.js +6 -4
- package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +8 -7
- package/node_modules/@maka/runtime/dist/bots/telegram-bridge.js +7 -31
- package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +104 -48
- package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +45 -42
- package/node_modules/@maka/runtime/dist/bots/ws-bridge-base.js +2 -3
- package/node_modules/@maka/runtime/dist/builtin-tools.js +107 -115
- package/node_modules/@maka/runtime/dist/bundled-skill-catalog.generated.js +1 -1
- package/node_modules/@maka/runtime/dist/child-fd-input.js +3 -2
- package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
- package/node_modules/@maka/runtime/dist/computer-use-codec.js +1 -141
- package/node_modules/@maka/runtime/dist/computer-use-tools.js +27 -106
- package/node_modules/@maka/runtime/dist/context-budget-helpers.js +4 -57
- package/node_modules/@maka/runtime/dist/context-budget-policy.js +26 -65
- package/node_modules/@maka/runtime/dist/context-budget.js +44 -103
- package/node_modules/@maka/runtime/dist/context-diagnostics.js +72 -33
- package/node_modules/@maka/runtime/dist/continuation-replay.js +22 -11
- package/node_modules/@maka/runtime/dist/conversation-copy.js +656 -188
- package/node_modules/@maka/runtime/dist/cua-frame-state.js +1 -69
- package/node_modules/@maka/runtime/dist/deep-research-tools.js +15 -24
- package/node_modules/@maka/runtime/dist/durable-tool-result-projection.js +436 -0
- package/node_modules/@maka/runtime/dist/edit-replace.js +2 -2
- package/node_modules/@maka/runtime/dist/execution-inspect.js +56 -41
- package/node_modules/@maka/runtime/dist/filesystem-executor.js +10 -6
- package/node_modules/@maka/runtime/dist/filesystem-worker/client.js +77 -19
- package/node_modules/@maka/runtime/dist/filesystem-worker/launch-spec.js +66 -55
- package/node_modules/@maka/runtime/dist/filesystem-worker/operations.js +34 -98
- package/node_modules/@maka/runtime/dist/filesystem-worker/protocol.js +25 -10
- package/node_modules/@maka/runtime/dist/filesystem-worker/worker-entry.js +2 -0
- package/node_modules/@maka/runtime/dist/github-copilot-oauth-enrollment.js +267 -0
- package/node_modules/@maka/runtime/dist/glob-search.js +74 -0
- package/node_modules/@maka/runtime/dist/goal-continuation.js +119 -13
- package/node_modules/@maka/runtime/dist/goal-evaluator.js +10 -4
- package/node_modules/@maka/runtime/dist/goal-state.js +7 -0
- package/node_modules/@maka/runtime/dist/grep-search.js +155 -0
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint-coordinator.js +16 -6
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +79 -29
- package/node_modules/@maka/runtime/dist/history-compact-error.js +10 -2
- package/node_modules/@maka/runtime/dist/history-compact-input-fit.js +7 -1
- package/node_modules/@maka/runtime/dist/history-compact-ledger.js +18 -18
- package/node_modules/@maka/runtime/dist/history-compact-summarizer.js +132 -110
- package/node_modules/@maka/runtime/dist/history-compact-summary-validation.js +14 -30
- package/node_modules/@maka/runtime/dist/history-compaction.js +101 -89
- package/node_modules/@maka/runtime/dist/image-file.js +5 -20
- package/node_modules/@maka/runtime/dist/interaction-authority.js +85 -0
- package/node_modules/@maka/runtime/dist/latest-context-snapshot.js +112 -23
- package/node_modules/@maka/runtime/dist/ledger-tool-result-archive-reader.js +164 -0
- package/node_modules/@maka/runtime/dist/local-web-fetch.js +2 -43
- package/node_modules/@maka/runtime/dist/mcp-tools.js +93 -35
- package/node_modules/@maka/runtime/dist/memory-extraction-evidence.js +7 -1
- package/node_modules/@maka/runtime/dist/memory-extraction.js +23 -18
- package/node_modules/@maka/runtime/dist/message-authority.js +9 -0
- package/node_modules/@maka/runtime/dist/model-adapter.js +103 -122
- package/node_modules/@maka/runtime/dist/model-factory.js +34 -81
- package/node_modules/@maka/runtime/dist/model-fetcher.js +64 -10
- package/node_modules/@maka/runtime/dist/model-history.js +291 -159
- package/node_modules/@maka/runtime/dist/model-projection-transition-ledger.js +207 -0
- package/node_modules/@maka/runtime/dist/model-runtime.js +87 -110
- package/node_modules/@maka/runtime/dist/native-web-search-tool.js +2 -1
- package/node_modules/@maka/runtime/dist/oauth-provider-contracts.js +28 -1
- package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +28 -73
- package/node_modules/@maka/runtime/dist/openai-responses-websocket.js +2 -5
- package/node_modules/@maka/runtime/dist/opencode-session-header.js +31 -0
- package/node_modules/@maka/runtime/dist/pipe-tail-collector.js +6 -9
- package/node_modules/@maka/runtime/dist/plan-mode.js +0 -65
- package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/plugin-agent-service.js +131 -0
- package/node_modules/@maka/runtime/dist/plugin-approval-service.js +33 -0
- package/node_modules/@maka/runtime/dist/plugin-attachment-service.js +53 -0
- package/node_modules/@maka/runtime/dist/plugin-command-service.js +100 -0
- package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +184 -22
- package/node_modules/@maka/runtime/dist/plugin-data-services.js +332 -0
- package/node_modules/@maka/runtime/dist/plugin-fs-service.js +62 -0
- package/node_modules/@maka/runtime/dist/plugin-goal-service.js +61 -0
- package/node_modules/@maka/runtime/dist/plugin-invocation-signal.js +24 -0
- package/node_modules/@maka/runtime/dist/plugin-llm-service.js +85 -0
- package/node_modules/@maka/runtime/dist/plugin-lsp-service.js +94 -0
- package/node_modules/@maka/runtime/dist/plugin-runtime.js +239 -10
- package/node_modules/@maka/runtime/dist/plugin-scope-registry.js +91 -0
- package/node_modules/@maka/runtime/dist/plugin-session-query-service.js +71 -0
- package/node_modules/@maka/runtime/dist/plugin-shell-env-service.js +87 -0
- package/node_modules/@maka/runtime/dist/plugin-shell-service.js +74 -0
- package/node_modules/@maka/runtime/dist/plugin-skill-service.js +93 -0
- package/node_modules/@maka/runtime/dist/plugin-system-prompt-service.js +346 -0
- package/node_modules/@maka/runtime/dist/plugin-tool-service.js +171 -0
- package/node_modules/@maka/runtime/dist/plugin-user-question-service.js +43 -0
- package/node_modules/@maka/runtime/dist/plugin-web-service.js +69 -0
- package/node_modules/@maka/runtime/dist/prior-run-context.js +24 -94
- package/node_modules/@maka/runtime/dist/process-tree-terminator.js +2 -2
- package/node_modules/@maka/runtime/dist/prompt-composition.js +36 -31
- package/node_modules/@maka/runtime/dist/provider-error-classification.js +84 -123
- package/node_modules/@maka/runtime/dist/provider-image-overflow-recovery.js +12 -31
- package/node_modules/@maka/runtime/dist/provider-request-telemetry.js +172 -196
- package/node_modules/@maka/runtime/dist/quiescent-session-snapshot.js +78 -0
- package/node_modules/@maka/runtime/dist/read-page.js +231 -0
- package/node_modules/@maka/runtime/dist/recovery-resolver.js +18 -14
- package/node_modules/@maka/runtime/dist/request-customization-fetch.js +14 -7
- package/node_modules/@maka/runtime/dist/request-projection.js +2 -15
- package/node_modules/@maka/runtime/dist/request-shape.js +187 -365
- package/node_modules/@maka/runtime/dist/ripgrep-executable.js +62 -0
- package/node_modules/@maka/runtime/dist/ripgrep-guidance.js +81 -0
- package/node_modules/@maka/runtime/dist/run-handoff-gate.js +97 -0
- package/node_modules/@maka/runtime/dist/run-trace.js +2 -34
- package/node_modules/@maka/runtime/dist/runtime-continuation-admission.js +1 -1
- package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +107 -65
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +415 -234
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +518 -225
- package/node_modules/@maka/runtime/dist/runtime-ledger-repair.js +221 -448
- package/node_modules/@maka/runtime/dist/runtime-read-model.js +95 -198
- package/node_modules/@maka/runtime/dist/runtime-resume.js +162 -126
- package/node_modules/@maka/runtime/dist/sandbox/index.js +0 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-profile-path.js +7 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-sandbox.js +20 -17
- package/node_modules/@maka/runtime/dist/sandbox/macos-seatbelt.js +68 -21
- package/node_modules/@maka/runtime/dist/sandbox/sandbox-manager.js +0 -35
- package/node_modules/@maka/runtime/dist/sandbox/windows-sandbox.js +0 -12
- package/node_modules/@maka/runtime/dist/scheduled-task-tools.js +3 -0
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +62 -21
- package/node_modules/@maka/runtime/dist/session-export.js +178 -0
- package/node_modules/@maka/runtime/dist/session-import.js +100 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +672 -861
- package/node_modules/@maka/runtime/dist/session-projection-helpers.js +16 -28
- package/node_modules/@maka/runtime/dist/session-recap.js +87 -15
- package/node_modules/@maka/runtime/dist/session-todo-tools.js +67 -0
- package/node_modules/@maka/runtime/dist/session-trace-projection.js +25 -30
- package/node_modules/@maka/runtime/dist/shell-detect.js +3 -7
- package/node_modules/@maka/runtime/dist/shell-exec.js +7 -25
- package/node_modules/@maka/runtime/dist/shell-run-contract.js +0 -1
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +11 -46
- package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +14 -7
- package/node_modules/@maka/runtime/dist/shell-tools.js +84 -14
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +64 -13
- package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
- package/node_modules/@maka/runtime/dist/stream-graph-projection.js +18 -15
- package/node_modules/@maka/runtime/dist/stream-graph-read-model.js +5 -0
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -8
- package/node_modules/@maka/runtime/dist/stream-usage-fallback-fetch.js +74 -0
- package/node_modules/@maka/runtime/dist/subagent-tools.js +2 -80
- package/node_modules/@maka/runtime/dist/subscription-credentials.js +51 -4
- package/node_modules/@maka/runtime/dist/subscription-model-fetch.js +51 -11
- package/node_modules/@maka/runtime/dist/system-prompt/main-session-prompt.js +21 -2
- package/node_modules/@maka/runtime/dist/system-prompt/workspace-instructions.js +11 -6
- package/node_modules/@maka/runtime/dist/tavily-search.js +8 -2
- package/node_modules/@maka/runtime/dist/telemetry/model-pricing.generated.js +93 -83
- package/node_modules/@maka/runtime/dist/terminal-run-commit.js +37 -172
- package/node_modules/@maka/runtime/dist/test-connection.js +36 -30
- package/node_modules/@maka/runtime/dist/text-line-window.js +49 -0
- package/node_modules/@maka/runtime/dist/tool-activation-identity.js +41 -0
- package/node_modules/@maka/runtime/dist/tool-availability.js +85 -8
- package/node_modules/@maka/runtime/dist/tool-output.js +36 -13
- package/node_modules/@maka/runtime/dist/tool-result-archive-capability.js +24 -36
- package/node_modules/@maka/runtime/dist/tool-result-archive-encoding.js +38 -0
- package/node_modules/@maka/runtime/dist/tool-result-archive-resource.js +93 -245
- package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +186 -0
- package/node_modules/@maka/runtime/dist/tool-result-archive.js +50 -173
- package/node_modules/@maka/runtime/dist/tool-runtime.js +380 -126
- package/node_modules/@maka/runtime/dist/unified-diff.js +40 -10
- package/node_modules/@maka/runtime/dist/web-fetch-tool.js +4 -2
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +12332 -4656
- package/node_modules/@maka/runtime/dist/workspace-executor.js +22 -30
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +551 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/package.json +78 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/CHANGELOG.md +3269 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/dist/index.js +3835 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +1610 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/package.json +80 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/README.md +44 -8
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/package.json +4 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +39 -3
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +4 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +4 -4
- package/node_modules/@maka/runtime/node_modules/ai/CHANGELOG.md +10271 -0
- package/node_modules/@maka/runtime/node_modules/ai/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/ai/dist/index.js +20146 -0
- package/node_modules/@maka/runtime/node_modules/ai/dist/internal/index.js +3690 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +185 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/04-loop-control.mdx +517 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +413 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +338 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +815 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +525 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +1512 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +680 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +371 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +333 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +163 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +180 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +372 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +241 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +855 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/index.mdx +137 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +683 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +69 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +47 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +826 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +406 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +216 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +582 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/06-advanced/04-caching.mdx +182 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +117 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +3267 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +4303 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +330 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +332 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +331 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +253 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +125 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +1102 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +368 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +331 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +147 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +250 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +493 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +256 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +199 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +125 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +1035 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +361 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +157 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +32 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +31 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +43 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +52 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +43 -0
- package/node_modules/@maka/runtime/node_modules/ai/package.json +127 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +8 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +8 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +83 -11
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dump.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/parse.js +4 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@maka/runtime/node_modules/undici/package.json +3 -3
- package/node_modules/@maka/runtime/package.json +41 -15
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +75 -38
- package/node_modules/@maka/runtime-host/dist/candidate-entry.js +10 -2
- package/node_modules/@maka/runtime-host/dist/candidate-launch-owner-guard.js +13 -0
- package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +64 -25
- package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +87 -3
- package/node_modules/@maka/runtime-host/dist/client/connect-or-spawn.js +13 -2
- package/node_modules/@maka/runtime-host/dist/client/connection.js +144 -51
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +238 -0
- package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +309 -0
- package/node_modules/@maka/runtime-host/dist/client/host-profile.js +483 -94
- package/node_modules/@maka/runtime-host/dist/client/host-retirement.js +28 -5
- package/node_modules/@maka/runtime-host/dist/client/index.js +12 -8
- package/node_modules/@maka/runtime-host/dist/client/launcher.js +12 -3
- package/node_modules/@maka/runtime-host/dist/client/oauth-presentation.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/owner-connection-code.js +38 -4
- package/node_modules/@maka/runtime-host/dist/client/peer-client.js +408 -25
- package/node_modules/@maka/runtime-host/dist/client/process-identity.js +73 -0
- package/node_modules/@maka/runtime-host/dist/client/reconnect-lifecycle.js +72 -7
- package/node_modules/@maka/runtime-host/dist/client/reconnecting-connection.js +11 -0
- package/node_modules/@maka/runtime-host/dist/client/registered-host-termination.js +107 -0
- package/node_modules/@maka/runtime-host/dist/client/remote-compatibility-error.js +2 -0
- package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +46 -5
- package/node_modules/@maka/runtime-host/dist/client/ssh-operator-activation.js +48 -11
- package/node_modules/@maka/runtime-host/dist/client/wsl-control.js +0 -8
- package/node_modules/@maka/runtime-host/dist/client/wsl-environment.js +12 -8
- package/node_modules/@maka/runtime-host/dist/client-capability-entity-id.js +27 -0
- package/node_modules/@maka/runtime-host/dist/control/endpoint.js +1 -3
- package/node_modules/@maka/runtime-host/dist/node-error.js +22 -0
- package/node_modules/@maka/runtime-host/dist/operator/access-management-frame.js +10 -1
- package/node_modules/@maka/runtime-host/dist/operator/index.js +5 -2
- package/node_modules/@maka/runtime-host/dist/operator/managed-deployment.js +17 -8
- package/node_modules/@maka/runtime-host/dist/operator/operator-command.js +110 -0
- package/node_modules/@maka/runtime-host/dist/operator/peer-management-frame.js +2 -0
- package/node_modules/@maka/runtime-host/dist/operator/peer-mesh-management-frame.js +14 -0
- package/node_modules/@maka/runtime-host/dist/operator/retirement-cancellation.js +20 -0
- package/node_modules/@maka/runtime-host/dist/operator/service-management-frame.js +5 -6
- package/node_modules/@maka/runtime-host/dist/operator/setup-frame.js +32 -6
- package/node_modules/@maka/runtime-host/dist/peer-mesh/display-name.js +30 -0
- package/node_modules/@maka/runtime-host/dist/peer-mesh/index.js +3 -3
- package/node_modules/@maka/runtime-host/dist/peer-mesh/limits.js +1 -2
- package/node_modules/@maka/runtime-host/dist/peer-mesh/model.js +72 -73
- package/node_modules/@maka/runtime-host/dist/peer-mesh/node.js +1334 -418
- package/node_modules/@maka/runtime-host/dist/peer-mesh/owner.js +33 -68
- package/node_modules/@maka/runtime-host/dist/peer-mesh/store.js +147 -52
- package/node_modules/@maka/runtime-host/dist/peer-reachability/index.js +21 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/model.js +202 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/owner.js +118 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/publisher.js +243 -0
- package/node_modules/@maka/runtime-host/dist/protocol/agent-graph.js +4 -1
- package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +11 -20
- package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +233 -41
- package/node_modules/@maka/runtime-host/dist/protocol/configuration.js +55 -9
- package/node_modules/@maka/runtime-host/dist/protocol/connection-catalog-change.js +26 -0
- package/node_modules/@maka/runtime-host/dist/protocol/connection-effects.js +15 -8
- package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
- package/node_modules/@maka/runtime-host/dist/protocol/external-session.js +4 -0
- package/node_modules/@maka/runtime-host/dist/protocol/host-resources.js +253 -0
- package/node_modules/@maka/runtime-host/dist/protocol/host-status.js +49 -11
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +206 -2
- package/node_modules/@maka/runtime-host/dist/protocol/message.js +14 -9
- package/node_modules/@maka/runtime-host/dist/protocol/network-proxy.js +1 -7
- package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +104 -8
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +22 -5
- package/node_modules/@maka/runtime-host/dist/protocol/peer-mesh.js +72 -32
- package/node_modules/@maka/runtime-host/dist/protocol/plan.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +559 -0
- package/node_modules/@maka/runtime-host/dist/protocol/project-catalog.js +2 -2
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +81 -26
- package/node_modules/@maka/runtime-host/dist/protocol/scheduled-task.js +19 -6
- package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +1 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-collaboration.js +68 -4
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +44 -23
- package/node_modules/@maka/runtime-host/dist/protocol/session-retirement.js +30 -3
- package/node_modules/@maka/runtime-host/dist/protocol/session-revision.js +11 -2
- package/node_modules/@maka/runtime-host/dist/protocol/session-todo.js +53 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-transcript.js +3 -7
- package/node_modules/@maka/runtime-host/dist/protocol/session-turns.js +29 -58
- package/node_modules/@maka/runtime-host/dist/protocol/skill-catalog.js +2 -1
- package/node_modules/@maka/runtime-host/dist/protocol/turn.js +25 -14
- package/node_modules/@maka/runtime-host/dist/protocol/usage-pricing.js +20 -2
- package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +212 -75
- package/node_modules/@maka/runtime-host/dist/server/access-authority.js +87 -22
- package/node_modules/@maka/runtime-host/dist/server/access-credential-metadata.js +4 -2
- package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +135 -48
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +0 -3
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-execution-coordinator.js +1 -2
- package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +19 -22
- package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +10 -4
- package/node_modules/@maka/runtime-host/dist/server/candidate.js +3 -0
- package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/canonical-turn-snapshot.js +34 -24
- package/node_modules/@maka/runtime-host/dist/server/canonical-usage-reader.js +24 -11
- package/node_modules/@maka/runtime-host/dist/server/child-agent-composition.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/client-capability-coordinator.js +282 -30
- package/node_modules/@maka/runtime-host/dist/server/client-capability-invocation-broker.js +258 -51
- package/node_modules/@maka/runtime-host/dist/server/client-capability-provider-id.js +31 -0
- package/node_modules/@maka/runtime-host/dist/server/client-capability-recovery.js +10 -7
- package/node_modules/@maka/runtime-host/dist/server/configuration-coordinator.js +20 -1
- package/node_modules/@maka/runtime-host/dist/server/connection-effect-coordinator.js +43 -18
- package/node_modules/@maka/runtime-host/dist/server/connection-session.js +45 -14
- package/node_modules/@maka/runtime-host/dist/server/daily-review-coordinator.js +164 -82
- package/node_modules/@maka/runtime-host/dist/server/deep-research-coordinator.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/execution-artifacts.js +59 -36
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +1076 -176
- package/node_modules/@maka/runtime-host/dist/server/execution-inspect-coordinator.js +35 -29
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +112 -18
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +85 -73
- package/node_modules/@maka/runtime-host/dist/server/execution-service.js +49 -24
- package/node_modules/@maka/runtime-host/dist/server/extension-bundle.js +249 -0
- package/node_modules/@maka/runtime-host/dist/server/extension-package-manifest.js +262 -0
- package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
- package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +13 -10
- package/node_modules/@maka/runtime-host/dist/server/failure-diagnostic.js +24 -0
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +134 -35
- package/node_modules/@maka/runtime-host/dist/server/host-change-feed.js +11 -0
- package/node_modules/@maka/runtime-host/dist/server/host-kernel.js +163 -27
- package/node_modules/@maka/runtime-host/dist/server/host-residency-registry.js +41 -20
- package/node_modules/@maka/runtime-host/dist/server/host-resource-collector.js +223 -0
- package/node_modules/@maka/runtime-host/dist/server/host-resource-probe-main.js +44 -0
- package/node_modules/@maka/runtime-host/dist/server/host-resource-probe.js +83 -0
- package/node_modules/@maka/runtime-host/dist/server/host-session-availability.js +5 -2
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-admission-registry.js +3 -1
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-projection.js +12 -7
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +131 -69
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +64 -4
- package/node_modules/@maka/runtime-host/dist/server/index.js +5 -0
- package/node_modules/@maka/runtime-host/dist/server/interaction-coordinator.js +370 -34
- package/node_modules/@maka/runtime-host/dist/server/interaction-projection.js +36 -1
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +173 -109
- package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
- package/node_modules/@maka/runtime-host/dist/server/listener-set.js +6 -4
- package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +339 -66
- package/node_modules/@maka/runtime-host/dist/server/model-metadata-refresh.js +96 -0
- package/node_modules/@maka/runtime-host/dist/server/network-proxy-coordinator.js +0 -1
- package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +169 -45
- package/node_modules/@maka/runtime-host/dist/server/oauth-execution-authority.js +20 -3
- package/node_modules/@maka/runtime-host/dist/server/operation-dispatcher.js +47 -125
- package/node_modules/@maka/runtime-host/dist/server/peer-listener.js +131 -48
- package/node_modules/@maka/runtime-host/dist/server/peer-mesh-authority.js +20 -1
- package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +11 -5
- package/node_modules/@maka/runtime-host/dist/server/plugin-composition-patch.js +58 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-composition-store.js +141 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-data-runtime.js +234 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-package-loader.js +130 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-package-store.js +528 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +263 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform.js +1148 -0
- package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
- package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
- package/node_modules/@maka/runtime-host/dist/server/root-admission-owner.js +32 -7
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +690 -188
- package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +72 -18
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-coordinator.js +11 -8
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +12 -18
- package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +150 -41
- package/node_modules/@maka/runtime-host/dist/server/serial-outbound-writer.js +46 -4
- package/node_modules/@maka/runtime-host/dist/server/session-admission-gate.js +21 -1
- package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +163 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +247 -33
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +112 -48
- package/node_modules/@maka/runtime-host/dist/server/session-effect-coordinator.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +66 -14
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +113 -67
- package/node_modules/@maka/runtime-host/dist/server/session-revision-graph-references.js +18 -10
- package/node_modules/@maka/runtime-host/dist/server/session-sidecar-purge.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/session-todo-coordinator.js +77 -0
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-pager.js +34 -5
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-reader.js +404 -87
- package/node_modules/@maka/runtime-host/dist/server/session-turn-access-request-coordinator.js +43 -26
- package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +4 -1
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +18 -2
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
- package/node_modules/@maka/runtime-host/dist/server/storage-maintenance.js +109 -0
- package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +79 -35
- package/node_modules/@maka/runtime-host/dist/server/web-fetch-tool.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +566 -37
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +590 -131
- package/node_modules/@maka/runtime-host/dist/server/workhub-message-attachments.js +46 -0
- package/node_modules/@maka/runtime-host/dist/transport/framed-byte-stream-transport.js +4 -1
- package/node_modules/@maka/runtime-host/dist/transport/local-ipc-framing.js +4 -2
- package/node_modules/@maka/runtime-host/dist/transport/peer-native.js +112 -24
- package/node_modules/@maka/runtime-host/dist/transport/resumable-peer-stream.js +469 -0
- package/node_modules/@maka/runtime-host/dist/webrtc-stun-policy.js +114 -0
- package/node_modules/@maka/runtime-host/package.json +7 -1
- package/node_modules/@maka/storage/dist/agent-run-store.js +355 -238
- package/node_modules/@maka/storage/dist/artifact-attachments.js +66 -18
- package/node_modules/@maka/storage/dist/artifact-metadata-codec.js +24 -28
- package/node_modules/@maka/storage/dist/artifact-store.js +203 -767
- package/node_modules/@maka/storage/dist/artifact-stores.js +6 -10
- package/node_modules/@maka/storage/dist/artifact-writer-lock.js +1 -1
- package/node_modules/@maka/storage/dist/atomic-file-write.js +74 -0
- package/node_modules/@maka/storage/dist/claude-code-session-adapter.js +0 -5
- package/node_modules/@maka/storage/dist/codex-session-adapter.js +298 -198
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +397 -0
- package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
- package/node_modules/@maka/storage/dist/conversation-operational-state.js +7 -0
- package/node_modules/@maka/storage/dist/credential-store.js +15 -63
- package/node_modules/@maka/storage/dist/execution-record-codec.js +1 -22
- package/node_modules/@maka/storage/dist/execution-stores.js +38 -21
- package/node_modules/@maka/storage/dist/file-lifetime-owner.js +30 -2
- package/node_modules/@maka/storage/dist/file-session-repository.js +1012 -0
- package/node_modules/@maka/storage/dist/git-exec.js +61 -0
- package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +8 -35
- package/node_modules/@maka/storage/dist/goal-authority.js +2 -2
- package/node_modules/@maka/storage/dist/interaction-store-public.js +1 -1
- package/node_modules/@maka/storage/dist/interaction-store.js +188 -3
- package/node_modules/@maka/storage/dist/legacy-run-header.js +327 -0
- package/node_modules/@maka/storage/dist/mcp-config-store.js +10 -25
- package/node_modules/@maka/storage/dist/message-admission-store.js +3 -0
- package/node_modules/@maka/storage/dist/model-call-ledger.js +199 -32
- package/node_modules/@maka/storage/dist/model-call-usage-sql.js +136 -0
- package/node_modules/@maka/storage/dist/model-facts-store.js +56 -0
- package/node_modules/@maka/storage/dist/opencode-session-adapter.js +0 -4
- package/node_modules/@maka/storage/dist/operational-state-backup.js +15 -11
- package/node_modules/@maka/storage/dist/operational-state-store-public.js +1 -1
- package/node_modules/@maka/storage/dist/operational-state-store.js +27 -2
- package/node_modules/@maka/storage/dist/production-session-snapshot.js +761 -0
- package/node_modules/@maka/storage/dist/project-catalog.js +8 -23
- package/node_modules/@maka/storage/dist/quiescent-session-snapshot.js +1154 -0
- package/node_modules/@maka/storage/dist/runtime-event-invariants.js +2 -2
- package/node_modules/@maka/storage/dist/runtime-event-persistence.js +6 -0
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +182 -62
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +540 -117
- package/node_modules/@maka/storage/dist/runtime-policy/document-io.js +22 -16
- package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +207 -0
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +148 -5
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +10 -4
- package/node_modules/@maka/storage/dist/runtime-policy-stores.js +7 -3
- package/node_modules/@maka/storage/dist/runtime-transcript-query.js +321 -0
- package/node_modules/@maka/storage/dist/scheduled-task-store.js +256 -283
- package/node_modules/@maka/storage/dist/session-bundle-manifest.js +5 -17
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +1031 -34
- package/node_modules/@maka/storage/dist/session-bundle-ustar.js +12 -0
- package/node_modules/@maka/storage/dist/session-copy-cleanup.js +12 -7
- package/node_modules/@maka/storage/dist/session-message-projection.js +24 -5
- package/node_modules/@maka/storage/dist/session-repository.js +767 -0
- package/node_modules/@maka/storage/dist/session-store.js +110 -115
- package/node_modules/@maka/storage/dist/session-todo-authority.js +106 -0
- package/node_modules/@maka/storage/dist/session-todo-store.js +169 -0
- package/node_modules/@maka/storage/dist/settings-store.js +24 -29
- package/node_modules/@maka/storage/dist/sqlite-artifact-metadata.js +51 -17
- package/node_modules/@maka/storage/dist/sqlite-artifact-schema.js +55 -5
- package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +42 -12
- package/node_modules/@maka/storage/dist/sqlite-core-execution-schema.js +45 -2
- package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +367 -1
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +439 -82
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +63 -5
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +493 -914
- package/node_modules/@maka/storage/dist/sqlite-usage-schema.js +200 -20
- package/node_modules/@maka/storage/dist/sqlite-usage-store.js +29 -6
- package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +5 -8
- package/node_modules/@maka/storage/dist/stable-storage.js +16 -2
- package/node_modules/@maka/storage/dist/storage-id.js +28 -0
- package/node_modules/@maka/storage/dist/storage-writer-composition.js +3 -3
- package/node_modules/@maka/storage/dist/tool-result-archive-evidence.js +138 -0
- package/node_modules/@maka/storage/dist/usage-stores.js +9 -3
- package/node_modules/@maka/storage/dist/work-board-store.js +4 -4
- package/node_modules/@maka/storage/dist/workspace-identity.js +2 -15
- package/node_modules/@maka/storage/dist/workspace-version-authority-internal.js +1 -8
- package/node_modules/@maka/storage/package.json +8 -2
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +22 -5
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +22 -5
- package/node_modules/@slack/types/dist/events/agent.js +3 -0
- package/node_modules/@slack/types/dist/events/index.js +44 -0
- package/node_modules/@slack/types/package.json +47 -0
- package/node_modules/@slack/web-api/README.md +382 -0
- package/node_modules/@slack/web-api/dist/methods.js +1636 -0
- package/node_modules/@slack/web-api/dist/types/request/agents.js +3 -0
- package/node_modules/@slack/web-api/dist/types/request/blocks.js +3 -0
- package/node_modules/@slack/web-api/dist/types/response/AdminUsersGetExpirationResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsRenameResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsSetStatusResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/BlocksValidateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +48 -0
- package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +67 -0
- package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +72 -0
- package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +48 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +11 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/LICENSE +21 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/README.md +15 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/package.json +30 -0
- package/node_modules/@slack/web-api/package.json +71 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/README.md +57 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/README.md +105 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +289 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.js +285 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/fast-uri/index.js +215 -47
- package/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fs-native-extensions/package.json +1 -1
- package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-x64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/src/win32.c +50 -11
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1203 -0
- package/node_modules/glob/dist/commonjs/glob.js +248 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.js +223 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/esm/glob.js +244 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.js +219 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/package.json +98 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +528 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +636 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/path-scurry/node_modules/lru-cache/README.md +469 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
- package/node_modules/path-scurry/package.json +72 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/qs/CHANGELOG.md +15 -0
- package/node_modules/qs/README.md +19 -1
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/qs/lib/parse.js +3 -4
- package/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/qs/lib/utils.js +10 -3
- package/node_modules/qs/package.json +4 -4
- package/node_modules/run/README.md +109 -18
- package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
- package/node_modules/run/dist/continuation-validation.js +116 -1
- package/node_modules/run/dist/errors.js +12 -2
- package/node_modules/run/dist/host-function-invocation.js +2 -1
- package/node_modules/run/dist/run.js +30 -4
- package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
- package/node_modules/run/dist/runtime/guest-sources.js +214 -56
- package/node_modules/run/dist/runtime/manager.js +575 -116
- package/node_modules/run/dist/runtime/max-workers.js +8 -4
- package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
- package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
- package/node_modules/run/dist/runtime/worker-source.js +1 -1
- package/node_modules/run/dist/utils/options.js +7 -0
- package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
- package/node_modules/run/dist/utils/serde.js +1 -7
- package/node_modules/run/dist/utils/source-cache.js +83 -13
- package/node_modules/run/package.json +6 -4
- package/node_modules/systeminformation/LICENSE +20 -0
- package/node_modules/systeminformation/README.md +1251 -0
- package/node_modules/systeminformation/lib/audio.js +335 -0
- package/node_modules/systeminformation/lib/battery.js +334 -0
- package/node_modules/systeminformation/lib/bluetooth.js +315 -0
- package/node_modules/systeminformation/lib/bluetoothVendors.js +1138 -0
- package/node_modules/systeminformation/lib/cli.js +100 -0
- package/node_modules/systeminformation/lib/cpu.js +2285 -0
- package/node_modules/systeminformation/lib/docker.js +791 -0
- package/node_modules/systeminformation/lib/dockerSocket.js +117 -0
- package/node_modules/systeminformation/lib/filesystem.js +1853 -0
- package/node_modules/systeminformation/lib/graphics.js +1317 -0
- package/node_modules/systeminformation/lib/index.js +520 -0
- package/node_modules/systeminformation/lib/internet.js +265 -0
- package/node_modules/systeminformation/lib/memory.js +622 -0
- package/node_modules/systeminformation/lib/network.js +2008 -0
- package/node_modules/systeminformation/lib/osinfo.js +1290 -0
- package/node_modules/systeminformation/lib/printer.js +209 -0
- package/node_modules/systeminformation/lib/processes.js +1459 -0
- package/node_modules/systeminformation/lib/system.js +855 -0
- package/node_modules/systeminformation/lib/usb.js +309 -0
- package/node_modules/systeminformation/lib/users.js +412 -0
- package/node_modules/systeminformation/lib/util.js +2833 -0
- package/node_modules/systeminformation/lib/virtualbox.js +116 -0
- package/node_modules/systeminformation/lib/wifi.js +839 -0
- package/node_modules/systeminformation/package.json +102 -0
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
- package/node_modules/undici/lib/handler/cache-handler.js +8 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +8 -0
- package/node_modules/undici/lib/handler/retry-handler.js +83 -11
- package/node_modules/undici/lib/interceptor/dump.js +1 -1
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/web/cookies/parse.js +4 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/undici/package.json +3 -3
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/memoizer.cjs +268 -0
- package/node_modules/zod/v4/core/memoizer.js +261 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/package.json +3 -4
- package/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +0 -549
- package/node_modules/@ai-sdk/code-mode/package.json +0 -78
- package/node_modules/@ai-sdk/gateway/CHANGELOG.md +0 -3067
- package/node_modules/@ai-sdk/gateway/dist/index.js +0 -3208
- package/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +0 -1297
- package/node_modules/@ai-sdk/gateway/package.json +0 -80
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +0 -2444
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/README.md +0 -1
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -4295
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/package.json +0 -82
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/LICENSE +0 -16
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/README.md +0 -24
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/LICENSE +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/README.md +0 -741
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Agent.md +0 -84
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Client.md +0 -288
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Connector.md +0 -115
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ContentType.md +0 -57
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Cookies.md +0 -128
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Debug.md +0 -62
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Errors.md +0 -49
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EventSource.md +0 -45
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Fetch.md +0 -60
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockClient.md +0 -81
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockPool.md +0 -555
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Pool.md +0 -84
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -275
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Util.md +0 -25
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/index-fetch.js +0 -65
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/index.js +0 -234
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/abort-signal.js +0 -59
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-connect.js +0 -110
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-pipeline.js +0 -252
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-request.js +0 -214
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-stream.js +0 -209
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-upgrade.js +0 -111
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/index.js +0 -7
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/readable.js +0 -580
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/memory-cache-store.js +0 -279
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -467
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/connect.js +0 -153
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/constants.js +0 -143
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/diagnostics.js +0 -227
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/errors.js +0 -477
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/request.js +0 -464
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-client.js +0 -422
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-utils.js +0 -212
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/symbols.js +0 -75
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/tree.js +0 -160
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/util.js +0 -992
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/agent.js +0 -158
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h1.js +0 -1731
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client.js +0 -664
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -184
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool.js +0 -118
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -319
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -260
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/encoding/index.js +0 -33
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/global.js +0 -59
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-handler.js +0 -760
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/decorator-handler.js +0 -67
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/redirect-handler.js +0 -238
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/retry-handler.js +0 -418
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/cache.js +0 -602
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/decompress.js +0 -259
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dns.js +0 -571
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dump.js +0 -112
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/redirect.js +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/response-error.js +0 -95
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/retry.js +0 -19
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/constants.js +0 -531
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/utils.js +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-agent.js +0 -232
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-call-history.js +0 -248
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-client.js +0 -68
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-errors.js +0 -29
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-pool.js +0 -68
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-symbols.js +0 -32
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-utils.js +0 -486
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/cache.js +0 -676
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/date.js +0 -670
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/promise.js +0 -28
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/runtime-features.js +0 -124
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/stats.js +0 -32
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/timers.js +0 -425
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cache.js +0 -864
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/util.js +0 -45
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/constants.js +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/index.js +0 -199
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/parse.js +0 -314
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/util.js +0 -352
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/util.js +0 -29
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/LICENSE +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/body.js +0 -509
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/constants.js +0 -131
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/data-url.js +0 -596
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata.js +0 -259
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/global.js +0 -40
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/headers.js +0 -719
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/index.js +0 -2413
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/request.js +0 -1115
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/response.js +0 -641
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/util.js +0 -1522
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/infra/index.js +0 -229
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/webidl/index.js +0 -1006
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/connection.js +0 -329
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/constants.js +0 -126
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/events.js +0 -331
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/frame.js +0 -133
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -100
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/receiver.js +0 -507
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/sender.js +0 -109
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -498
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/util.js +0 -347
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/websocket.js +0 -758
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/package.json +0 -152
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/scripts/strip-comments.js +0 -10
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/types/README.md +0 -6
- package/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1218
- package/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@formatjs/icu-messageformat-parser/index.js +0 -2173
- package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +0 -207
- package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +0 -160
- package/node_modules/@formatjs/icu-messageformat-parser/package.json +0 -21
- package/node_modules/@formatjs/icu-messageformat-parser/printer.js +0 -224
- package/node_modules/@maka/core/dist/task-ledger.js +0 -797
- package/node_modules/@maka/runtime/dist/active-tool-result-prune.js +0 -334
- package/node_modules/@maka/runtime/dist/active-tool-result-working-set.js +0 -218
- package/node_modules/@maka/runtime/dist/archive-read-tool.js +0 -92
- package/node_modules/@maka/runtime/dist/sandbox/diagnostics.js +0 -285
- package/node_modules/@maka/runtime/dist/system-prompt/sandbox-context-prompt.js +0 -77
- package/node_modules/@maka/runtime/dist/system-prompt/session-environment-prompt.js +0 -47
- package/node_modules/@maka/runtime/dist/task-ledger-tools.js +0 -244
- package/node_modules/@maka/runtime/dist/test-helpers.js +0 -61
- package/node_modules/@maka/runtime/node_modules/@slack/types/dist/events/index.js +0 -43
- package/node_modules/@maka/runtime/node_modules/@slack/types/package.json +0 -47
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/README.md +0 -390
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/methods.js +0 -1610
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +0 -37
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +0 -82
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +0 -63
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/package.json +0 -71
- package/node_modules/@maka/runtime-host/dist/protocol/task-ledger.js +0 -321
- package/node_modules/@maka/runtime-host/dist/server/task-ledger-coordinator.js +0 -154
- package/node_modules/@maka/storage/dist/artifact-metadata-repository.js +0 -19
- package/node_modules/@maka/storage/dist/artifact-storage-layout.js +0 -26
- package/node_modules/@maka/storage/dist/provider-request-capture-artifact.js +0 -31
- package/node_modules/@maka/storage/dist/task-ledger-authority.js +0 -121
- package/node_modules/@maka/storage/dist/task-ledger-store-internal.js +0 -32
- package/node_modules/@maka/storage/dist/task-ledger-store.js +0 -663
- package/node_modules/ai/CHANGELOG.md +0 -9971
- package/node_modules/ai/dist/index.js +0 -18513
- package/node_modules/ai/dist/internal/index.js +0 -3680
- package/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +0 -179
- package/node_modules/ai/docs/03-agents/04-loop-control.mdx +0 -515
- package/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +0 -412
- package/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +0 -326
- package/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +0 -718
- package/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +0 -513
- package/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +0 -1509
- package/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +0 -617
- package/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +0 -344
- package/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +0 -332
- package/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +0 -180
- package/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +0 -155
- package/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +0 -149
- package/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +0 -830
- package/node_modules/ai/docs/03-ai-sdk-core/index.mdx +0 -132
- package/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +0 -495
- package/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -65
- package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +0 -45
- package/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +0 -798
- package/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +0 -401
- package/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +0 -212
- package/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +0 -578
- package/node_modules/ai/docs/06-advanced/04-caching.mdx +0 -175
- package/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +0 -111
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +0 -3253
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +0 -4261
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +0 -304
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +0 -302
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +0 -317
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +0 -252
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +0 -92
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +0 -1102
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +0 -342
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +0 -268
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +0 -145
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +0 -225
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +0 -493
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +0 -256
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +0 -166
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +0 -120
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +0 -954
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +0 -347
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -26
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +0 -26
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +0 -36
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +0 -41
- package/node_modules/ai/package.json +0 -117
- package/node_modules/intl-messageformat/intl-messageformat.iife.js +0 -2807
- package/node_modules/intl-messageformat/package.json +0 -40
- package/packages/eval/dist/attempt-store.js +0 -138
- package/packages/eval/dist/cli.js +0 -119
- package/packages/eval/dist/experiment-directory.js +0 -59
- package/packages/eval/dist/experiment.js +0 -49
- package/packages/eval/dist/external-subject.js +0 -488
- package/packages/eval/dist/harbor-external-subject.js +0 -929
- package/packages/eval/dist/harbor-maka-subject.js +0 -83
- package/packages/eval/dist/harness-environment.js +0 -80
- package/packages/eval/dist/harness-executor.js +0 -1013
- package/packages/eval/dist/index.js +0 -28
- package/packages/eval/dist/install-preflight.js +0 -201
- package/packages/eval/dist/maka-artifacts.js +0 -126
- package/packages/eval/dist/maka-runtime-policy.js +0 -42
- package/packages/eval/dist/maka-subject.js +0 -268
- package/packages/eval/dist/metering-checkpoint.js +0 -80
- package/packages/eval/dist/provider-admission.js +0 -39
- package/packages/eval/dist/provider-metering.js +0 -67
- package/packages/eval/dist/provider-web-tool-surface.js +0 -74
- package/packages/eval/dist/relay-result-frame.js +0 -38
- package/packages/eval/dist/result.js +0 -94
- package/packages/eval/dist/runner.js +0 -290
- package/packages/eval/dist/spec.js +0 -135
- package/packages/eval/dist/toolchain-verification.js +0 -130
- package/packages/eval/harbor/deepseek-codex-models.json +0 -69
- package/packages/eval/harbor/deepseek-harness-profile/cordis.patch.yml +0 -140
- package/packages/eval/harbor/deepseek-harness-profile/cordis.yml +0 -18
- package/packages/eval/harbor/deepseek-harness-profile/package.json +0 -10
- package/packages/eval/harbor/docker-compose-egress-proxy.yaml +0 -57
- package/packages/eval/harbor/egress-proxy/Dockerfile +0 -25
- package/packages/eval/harbor/egress-proxy/entrypoint.sh +0 -62
- package/packages/eval/harbor/egress-proxy/network-policy +0 -148
- package/packages/eval/harbor/egress_filter.py +0 -435
- package/packages/eval/harbor/eval_framework.py +0 -40
- package/packages/eval/harbor/relay_agent.py +0 -686
- package/packages/eval/harbor/run_trial.py +0 -223
- package/packages/eval/package.json +0 -20
- /package/node_modules/@ai-sdk/{code-mode → anthropic/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/README.md +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/dist/index.js +0 -0
- /package/node_modules/@ai-sdk/{gateway → cohere/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → google/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{ai → @ai-sdk/openai-compatible/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/LICENSE.md +0 -0
- /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/README.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/LICENSE.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/README.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/index.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/README.md +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/code-mode-tool.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/errors.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/index.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-prompt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/types.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/src/tsconfig.json +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/00-introduction/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/03-prompts.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/04-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/05-streaming.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/06-provider-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/00-choosing-a-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/02-nextjs-app-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/04-svelte.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/05-nuxt.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/06-nodejs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/07-expo.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/08-tanstack-start.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/09-coding-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/02-building-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/03-workflows.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/05-configuring-call-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-memory.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-subagents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/05-generating-text.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/18-code-mode.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/26-reasoning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/31-reranking.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/40-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/45-provider-management.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/55-testing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-devtools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/05-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/02-stopping-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/03-backpressure.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/42-pipe-ui-message-stream-to-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-too-many-embedding-values-for-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-not-found-for-approval-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/package.json +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/block-elements.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/blocks.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/composition-objects.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/extensions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/calls.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/chunk.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/bot-profile.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/status-emoji-display-info.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/dialog.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/app.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/assistant.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/call.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/channel.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/dnd.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/email.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/entity-details-requested.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/file.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/function.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/grid-migration.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/group.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/im.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/invite.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/link-shared.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/member.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message-metadata.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/pin.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/reaction.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/shared-channel.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/star.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/steps-from-apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/subteam.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/team.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/token.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/user.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-attachments.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-metadata.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/views.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/WebClient.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/chat-stream.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/errors.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/file-upload.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/helpers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/instrument.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/logger.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/retry-policies.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/helpers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/analytics.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/auth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/barriers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/conversations.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/functions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/inviteRequests.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/roles.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/teams.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/usergroups.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/users.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/workflows.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/api.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/assistant.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/auth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bookmarks.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bots.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/calls.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/canvas.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/chat.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/common.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/conversations.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dialog.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dnd.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/entity.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/files.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/functions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/manifest.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/migration.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/oauth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/openid.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/pins.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reactions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reminders.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/rtm.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/search.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/slackLists.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/stars.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/team.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/tooling.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/usergroups.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/users.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/views.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/workflows.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAnalyticsGetFileResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsActivitiesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApprovedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsClearResolutionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsCancelResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsUninstallResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyAssignEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyGetEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyRemoveEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkMoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPrivateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPublicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDisconnectSharedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetConversationPrefsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRemoveCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessAddGroupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessListGroupsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSearchResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetConversationPrefsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddAliasResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApprovedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDeniedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDenyResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesAddAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesListAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesRemoveAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsAdminsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsOwnersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDescriptionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetIconResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetNameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsListChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsRemoveChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersAssignResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionClearSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionGetSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionInvalidateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetBulkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionSetSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetAdminResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetExpirationResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetOwnerResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetRegularResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersUnsupportedVersionsExportResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsPermissionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsSearchResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsUnpublishResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ApiTestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsConnectionsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsEventAuthorizationsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestExportResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestValidateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsRequestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsResourcesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsScopesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersRequestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUninstallResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUserConnectionUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetStatusResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetSuggestedPromptsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetTitleResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthRevokeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BotsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsEndResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesSectionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsJoinResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteScheduledMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatGetPermalinkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatMeMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostEphemeralResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduleMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduledMessagesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUnfurlResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsAcceptSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsApproveSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCanvasesCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsDeclineSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsExternalInvitePermissionsSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteSharedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsJoinResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListConnectInvitesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMembersResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteDenyResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DialogOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndDndResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndSnoozeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndSetSnoozeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndTeamInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EmojiListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EntityPresentDetailsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCompleteUploadExternalResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesGetUploadURLExternalResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteShareResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRevokePublicURLResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesSharedPublicURLResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesUploadResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteErrorResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteSuccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateChildResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MigrationExchangeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthAccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthTokenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2AccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2ExchangeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectTokenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectUserInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersCompleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmConnectResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmStartResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/SearchMessagesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamAccessLogsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillableInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillingInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsDisconnectResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamIntegrationLogsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamPreferencesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamProfileGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ToolingTokensRotateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsDisableResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsEnableResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersConversationsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDeletePhotoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDiscoverableContactsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersGetPresenceResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersIdentityResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersLookupByEmailResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetActiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPhotoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPresenceResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPublishResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPushResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepCompletedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepFailedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsUpdateStepResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/index.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/License +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/README.md +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/dns.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/stop.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/index.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry_operation.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/package.json +0 -0
package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/dist/index.js
DELETED
|
@@ -1,4295 +0,0 @@
|
|
|
1
|
-
// src/as-array.ts
|
|
2
|
-
function asArray(value) {
|
|
3
|
-
return value === void 0 ? [] : Array.isArray(value) ? value : [value];
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
// src/combine-headers.ts
|
|
7
|
-
function combineHeaders(...headers) {
|
|
8
|
-
return headers.reduce(
|
|
9
|
-
(combinedHeaders, currentHeaders) => ({
|
|
10
|
-
...combinedHeaders,
|
|
11
|
-
...currentHeaders != null ? currentHeaders : {}
|
|
12
|
-
}),
|
|
13
|
-
{}
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// src/remove-undefined-entries.ts
|
|
18
|
-
function removeUndefinedEntries(record) {
|
|
19
|
-
return Object.fromEntries(
|
|
20
|
-
Object.entries(record).filter(([_key, value]) => value != null)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// src/delay.ts
|
|
25
|
-
async function delay(delayInMs, options) {
|
|
26
|
-
if (delayInMs == null) {
|
|
27
|
-
return Promise.resolve();
|
|
28
|
-
}
|
|
29
|
-
const signal = options == null ? void 0 : options.abortSignal;
|
|
30
|
-
return new Promise((resolve2, reject) => {
|
|
31
|
-
if (signal == null ? void 0 : signal.aborted) {
|
|
32
|
-
reject(createAbortError());
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const timeoutId = setTimeout(() => {
|
|
36
|
-
cleanup();
|
|
37
|
-
resolve2();
|
|
38
|
-
}, delayInMs);
|
|
39
|
-
const cleanup = () => {
|
|
40
|
-
clearTimeout(timeoutId);
|
|
41
|
-
signal == null ? void 0 : signal.removeEventListener("abort", onAbort);
|
|
42
|
-
};
|
|
43
|
-
const onAbort = () => {
|
|
44
|
-
cleanup();
|
|
45
|
-
reject(createAbortError());
|
|
46
|
-
};
|
|
47
|
-
signal == null ? void 0 : signal.addEventListener("abort", onAbort);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function createAbortError() {
|
|
51
|
-
return new DOMException("Delay was aborted", "AbortError");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// src/websocket.ts
|
|
55
|
-
function getWebSocketConstructor(webSocket) {
|
|
56
|
-
const WebSocketConstructor = webSocket != null ? webSocket : globalThis.WebSocket;
|
|
57
|
-
if (WebSocketConstructor == null) {
|
|
58
|
-
throw new Error("No WebSocket implementation available.");
|
|
59
|
-
}
|
|
60
|
-
return WebSocketConstructor;
|
|
61
|
-
}
|
|
62
|
-
function toWebSocketUrl(url) {
|
|
63
|
-
const wsUrl = new URL(url);
|
|
64
|
-
if (wsUrl.protocol === "http:") {
|
|
65
|
-
wsUrl.protocol = "ws:";
|
|
66
|
-
} else if (wsUrl.protocol === "https:") {
|
|
67
|
-
wsUrl.protocol = "wss:";
|
|
68
|
-
}
|
|
69
|
-
return wsUrl;
|
|
70
|
-
}
|
|
71
|
-
var textDecoder = new TextDecoder();
|
|
72
|
-
async function readWebSocketMessageText(data) {
|
|
73
|
-
if (typeof data === "string") return data;
|
|
74
|
-
if (data instanceof ArrayBuffer) return textDecoder.decode(data);
|
|
75
|
-
if (ArrayBuffer.isView(data)) {
|
|
76
|
-
return textDecoder.decode(data);
|
|
77
|
-
}
|
|
78
|
-
if (typeof Blob !== "undefined" && data instanceof Blob) {
|
|
79
|
-
return data.text();
|
|
80
|
-
}
|
|
81
|
-
return String(data);
|
|
82
|
-
}
|
|
83
|
-
var WEBSOCKET_OPEN_STATE = 1;
|
|
84
|
-
async function waitForWebSocketBufferDrain(socket, {
|
|
85
|
-
highWaterMark = 1024 * 1024,
|
|
86
|
-
pollIntervalMs = 20,
|
|
87
|
-
abortSignal
|
|
88
|
-
} = {}) {
|
|
89
|
-
var _a3;
|
|
90
|
-
while (socket.readyState === WEBSOCKET_OPEN_STATE && ((_a3 = socket.bufferedAmount) != null ? _a3 : 0) > highWaterMark) {
|
|
91
|
-
if ((abortSignal == null ? void 0 : abortSignal.aborted) === true) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
await delay(pollIntervalMs);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// src/connect-to-websocket.ts
|
|
99
|
-
function connectToWebSocket({
|
|
100
|
-
url,
|
|
101
|
-
protocols,
|
|
102
|
-
headers,
|
|
103
|
-
webSocket,
|
|
104
|
-
abortSignal,
|
|
105
|
-
onOpen,
|
|
106
|
-
onMessageText,
|
|
107
|
-
onProcessingError,
|
|
108
|
-
onSocketError,
|
|
109
|
-
onClose,
|
|
110
|
-
onAbort
|
|
111
|
-
}) {
|
|
112
|
-
var _a3;
|
|
113
|
-
let socket;
|
|
114
|
-
let abortListener;
|
|
115
|
-
const close = (code) => {
|
|
116
|
-
if (abortListener != null) {
|
|
117
|
-
abortSignal == null ? void 0 : abortSignal.removeEventListener("abort", abortListener);
|
|
118
|
-
abortListener = void 0;
|
|
119
|
-
}
|
|
120
|
-
try {
|
|
121
|
-
socket == null ? void 0 : socket.close(code);
|
|
122
|
-
} catch (e) {
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
if (abortSignal == null ? void 0 : abortSignal.aborted) {
|
|
126
|
-
onAbort == null ? void 0 : onAbort((_a3 = abortSignal.reason) != null ? _a3 : new Error("Aborted"));
|
|
127
|
-
return { socket: void 0, close };
|
|
128
|
-
}
|
|
129
|
-
try {
|
|
130
|
-
const WebSocketConstructor = getWebSocketConstructor(webSocket);
|
|
131
|
-
socket = new WebSocketConstructor(url, protocols, {
|
|
132
|
-
headers: removeUndefinedEntries(headers != null ? headers : {})
|
|
133
|
-
});
|
|
134
|
-
} catch (error) {
|
|
135
|
-
onProcessingError(error);
|
|
136
|
-
return { socket: void 0, close };
|
|
137
|
-
}
|
|
138
|
-
if (abortSignal != null && onAbort != null) {
|
|
139
|
-
abortListener = () => {
|
|
140
|
-
var _a4;
|
|
141
|
-
return onAbort((_a4 = abortSignal.reason) != null ? _a4 : new Error("Aborted"));
|
|
142
|
-
};
|
|
143
|
-
abortSignal.addEventListener("abort", abortListener, { once: true });
|
|
144
|
-
}
|
|
145
|
-
const openedSocket = socket;
|
|
146
|
-
socket.onopen = () => {
|
|
147
|
-
try {
|
|
148
|
-
onOpen == null ? void 0 : onOpen(openedSocket);
|
|
149
|
-
} catch (error) {
|
|
150
|
-
onProcessingError(error);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
let tail = Promise.resolve();
|
|
154
|
-
socket.onmessage = (event) => {
|
|
155
|
-
tail = tail.then(() => readWebSocketMessageText(event.data)).then((text) => onMessageText(text)).catch(onProcessingError);
|
|
156
|
-
};
|
|
157
|
-
socket.onerror = () => {
|
|
158
|
-
tail = tail.then(() => onSocketError == null ? void 0 : onSocketError()).catch(onProcessingError);
|
|
159
|
-
};
|
|
160
|
-
socket.onclose = (event) => {
|
|
161
|
-
const closeEvent = event;
|
|
162
|
-
const code = typeof (closeEvent == null ? void 0 : closeEvent.code) === "number" ? closeEvent.code : void 0;
|
|
163
|
-
const reason = typeof (closeEvent == null ? void 0 : closeEvent.reason) === "string" ? closeEvent.reason : void 0;
|
|
164
|
-
tail = tail.then(() => onClose == null ? void 0 : onClose({ code, reason })).catch(onProcessingError);
|
|
165
|
-
};
|
|
166
|
-
return { socket, close };
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// src/convert-async-iterator-to-readable-stream.ts
|
|
170
|
-
function convertAsyncIteratorToReadableStream(iterator) {
|
|
171
|
-
let cancelled = false;
|
|
172
|
-
return new ReadableStream({
|
|
173
|
-
/**
|
|
174
|
-
* Called when the consumer wants to pull more data from the stream.
|
|
175
|
-
*
|
|
176
|
-
* @param {ReadableStreamDefaultController<T>} controller - The controller to enqueue data into the stream.
|
|
177
|
-
* @returns {Promise<void>}
|
|
178
|
-
*/
|
|
179
|
-
async pull(controller) {
|
|
180
|
-
if (cancelled) return;
|
|
181
|
-
try {
|
|
182
|
-
const { value, done } = await iterator.next();
|
|
183
|
-
if (done) {
|
|
184
|
-
controller.close();
|
|
185
|
-
} else {
|
|
186
|
-
controller.enqueue(value);
|
|
187
|
-
}
|
|
188
|
-
} catch (error) {
|
|
189
|
-
controller.error(error);
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
/**
|
|
193
|
-
* Called when the consumer cancels the stream.
|
|
194
|
-
*/
|
|
195
|
-
async cancel(reason) {
|
|
196
|
-
cancelled = true;
|
|
197
|
-
if (iterator.return) {
|
|
198
|
-
try {
|
|
199
|
-
await iterator.return(reason);
|
|
200
|
-
} catch (e) {
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// src/uint8-utils.ts
|
|
208
|
-
var { btoa, atob } = globalThis;
|
|
209
|
-
function convertBase64ToUint8Array(base64String) {
|
|
210
|
-
const base64Url = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
|
211
|
-
const latin1string = atob(base64Url);
|
|
212
|
-
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
213
|
-
}
|
|
214
|
-
function convertUint8ArrayToBase64(array) {
|
|
215
|
-
let latin1string = "";
|
|
216
|
-
for (let i = 0; i < array.length; i++) {
|
|
217
|
-
latin1string += String.fromCodePoint(array[i]);
|
|
218
|
-
}
|
|
219
|
-
return btoa(latin1string);
|
|
220
|
-
}
|
|
221
|
-
function convertToBase64(value) {
|
|
222
|
-
return value instanceof Uint8Array ? convertUint8ArrayToBase64(value) : value;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// src/convert-inline-file-data-to-uint8-array.ts
|
|
226
|
-
function convertInlineFileDataToUint8Array(data) {
|
|
227
|
-
if (data.type === "text") {
|
|
228
|
-
return new TextEncoder().encode(data.text);
|
|
229
|
-
}
|
|
230
|
-
if (data.data instanceof Uint8Array) {
|
|
231
|
-
return data.data;
|
|
232
|
-
}
|
|
233
|
-
if (data.data instanceof ArrayBuffer) {
|
|
234
|
-
return new Uint8Array(data.data);
|
|
235
|
-
}
|
|
236
|
-
return convertBase64ToUint8Array(data.data);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// src/convert-image-model-file-to-data-uri.ts
|
|
240
|
-
function convertImageModelFileToDataUri(file) {
|
|
241
|
-
if (file.type === "url") return file.url;
|
|
242
|
-
return `data:${file.mediaType};base64,${typeof file.data === "string" ? file.data : convertUint8ArrayToBase64(file.data)}`;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// src/convert-to-form-data.ts
|
|
246
|
-
function convertToFormData(input, options = {}) {
|
|
247
|
-
const { useArrayBrackets = true } = options;
|
|
248
|
-
const formData = new FormData();
|
|
249
|
-
for (const [key, value] of Object.entries(input)) {
|
|
250
|
-
if (value == null) {
|
|
251
|
-
continue;
|
|
252
|
-
}
|
|
253
|
-
if (Array.isArray(value)) {
|
|
254
|
-
if (value.length === 1) {
|
|
255
|
-
formData.append(key, value[0]);
|
|
256
|
-
continue;
|
|
257
|
-
}
|
|
258
|
-
const arrayKey = useArrayBrackets ? `${key}[]` : key;
|
|
259
|
-
for (const item of value) {
|
|
260
|
-
formData.append(arrayKey, item);
|
|
261
|
-
}
|
|
262
|
-
continue;
|
|
263
|
-
}
|
|
264
|
-
formData.append(key, value);
|
|
265
|
-
}
|
|
266
|
-
return formData;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// src/create-language-model-response-metadata.ts
|
|
270
|
-
function createLanguageModelResponseMetadata({
|
|
271
|
-
id,
|
|
272
|
-
model,
|
|
273
|
-
created
|
|
274
|
-
}) {
|
|
275
|
-
return {
|
|
276
|
-
id: id != null ? id : void 0,
|
|
277
|
-
modelId: model != null ? model : void 0,
|
|
278
|
-
timestamp: created != null ? new Date(created * 1e3) : void 0
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
// src/create-null-language-model-usage.ts
|
|
283
|
-
function createNullLanguageModelUsage() {
|
|
284
|
-
return {
|
|
285
|
-
inputTokens: {
|
|
286
|
-
total: void 0,
|
|
287
|
-
noCache: void 0,
|
|
288
|
-
cacheRead: void 0,
|
|
289
|
-
cacheWrite: void 0
|
|
290
|
-
},
|
|
291
|
-
outputTokens: {
|
|
292
|
-
total: void 0,
|
|
293
|
-
text: void 0,
|
|
294
|
-
reasoning: void 0
|
|
295
|
-
},
|
|
296
|
-
raw: void 0
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// src/create-tool-name-mapping.ts
|
|
301
|
-
function createToolNameMapping({
|
|
302
|
-
tools = [],
|
|
303
|
-
providerToolNames
|
|
304
|
-
}) {
|
|
305
|
-
const customToolNameToProviderToolName = {};
|
|
306
|
-
const providerToolNameToCustomToolName = {};
|
|
307
|
-
for (const tool2 of tools) {
|
|
308
|
-
if (tool2.type === "provider" && tool2.id in providerToolNames) {
|
|
309
|
-
const providerToolName = providerToolNames[tool2.id];
|
|
310
|
-
customToolNameToProviderToolName[tool2.name] = providerToolName;
|
|
311
|
-
providerToolNameToCustomToolName[providerToolName] = tool2.name;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return {
|
|
315
|
-
toProviderToolName: (customToolName) => {
|
|
316
|
-
var _a3;
|
|
317
|
-
return (_a3 = customToolNameToProviderToolName[customToolName]) != null ? _a3 : customToolName;
|
|
318
|
-
},
|
|
319
|
-
toCustomToolName: (providerToolName) => {
|
|
320
|
-
var _a3;
|
|
321
|
-
return (_a3 = providerToolNameToCustomToolName[providerToolName]) != null ? _a3 : providerToolName;
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// src/create-provider-stream-error.ts
|
|
327
|
-
var marker = /* @__PURE__ */ Symbol.for("vercel.ai.providerStreamError");
|
|
328
|
-
function createProviderStreamError({
|
|
329
|
-
message,
|
|
330
|
-
type,
|
|
331
|
-
code,
|
|
332
|
-
statusCode,
|
|
333
|
-
isRetryable,
|
|
334
|
-
data
|
|
335
|
-
}) {
|
|
336
|
-
const error = {
|
|
337
|
-
message,
|
|
338
|
-
type,
|
|
339
|
-
code,
|
|
340
|
-
statusCode,
|
|
341
|
-
isRetryable,
|
|
342
|
-
data
|
|
343
|
-
};
|
|
344
|
-
Object.defineProperty(error, marker, { value: true });
|
|
345
|
-
return error;
|
|
346
|
-
}
|
|
347
|
-
function isProviderStreamError(error) {
|
|
348
|
-
return typeof error === "object" && error != null && error[marker] === true;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
// src/delayed-promise.ts
|
|
352
|
-
var DelayedPromise = class {
|
|
353
|
-
constructor() {
|
|
354
|
-
this.status = { type: "pending" };
|
|
355
|
-
this._resolve = void 0;
|
|
356
|
-
this._reject = void 0;
|
|
357
|
-
}
|
|
358
|
-
get promise() {
|
|
359
|
-
if (this._promise) {
|
|
360
|
-
return this._promise;
|
|
361
|
-
}
|
|
362
|
-
this._promise = new Promise((resolve2, reject) => {
|
|
363
|
-
if (this.status.type === "resolved") {
|
|
364
|
-
resolve2(this.status.value);
|
|
365
|
-
} else if (this.status.type === "rejected") {
|
|
366
|
-
reject(this.status.error);
|
|
367
|
-
}
|
|
368
|
-
this._resolve = resolve2;
|
|
369
|
-
this._reject = reject;
|
|
370
|
-
});
|
|
371
|
-
return this._promise;
|
|
372
|
-
}
|
|
373
|
-
resolve(value) {
|
|
374
|
-
var _a3;
|
|
375
|
-
this.status = { type: "resolved", value };
|
|
376
|
-
if (this._promise) {
|
|
377
|
-
(_a3 = this._resolve) == null ? void 0 : _a3.call(this, value);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
reject(error) {
|
|
381
|
-
var _a3;
|
|
382
|
-
this.status = { type: "rejected", error };
|
|
383
|
-
if (this._promise) {
|
|
384
|
-
(_a3 = this._reject) == null ? void 0 : _a3.call(this, error);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
isResolved() {
|
|
388
|
-
return this.status.type === "resolved";
|
|
389
|
-
}
|
|
390
|
-
isRejected() {
|
|
391
|
-
return this.status.type === "rejected";
|
|
392
|
-
}
|
|
393
|
-
isPending() {
|
|
394
|
-
return this.status.type === "pending";
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
// src/detect-media-type.ts
|
|
399
|
-
var imageMediaTypeSignatures = [
|
|
400
|
-
{
|
|
401
|
-
mediaType: "image/gif",
|
|
402
|
-
bytesPrefix: [71, 73, 70]
|
|
403
|
-
// GIF
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
mediaType: "image/png",
|
|
407
|
-
bytesPrefix: [137, 80, 78, 71]
|
|
408
|
-
// PNG
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
mediaType: "image/jpeg",
|
|
412
|
-
bytesPrefix: [255, 216]
|
|
413
|
-
// JPEG
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
mediaType: "image/webp",
|
|
417
|
-
bytesPrefix: [
|
|
418
|
-
82,
|
|
419
|
-
73,
|
|
420
|
-
70,
|
|
421
|
-
70,
|
|
422
|
-
// "RIFF"
|
|
423
|
-
null,
|
|
424
|
-
null,
|
|
425
|
-
null,
|
|
426
|
-
null,
|
|
427
|
-
// file size (variable)
|
|
428
|
-
87,
|
|
429
|
-
69,
|
|
430
|
-
66,
|
|
431
|
-
80
|
|
432
|
-
// "WEBP"
|
|
433
|
-
]
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
mediaType: "image/bmp",
|
|
437
|
-
bytesPrefix: [66, 77]
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
mediaType: "image/tiff",
|
|
441
|
-
bytesPrefix: [73, 73, 42, 0]
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
mediaType: "image/tiff",
|
|
445
|
-
bytesPrefix: [77, 77, 0, 42]
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
mediaType: "image/avif",
|
|
449
|
-
bytesPrefix: [
|
|
450
|
-
0,
|
|
451
|
-
0,
|
|
452
|
-
0,
|
|
453
|
-
32,
|
|
454
|
-
102,
|
|
455
|
-
116,
|
|
456
|
-
121,
|
|
457
|
-
112,
|
|
458
|
-
97,
|
|
459
|
-
118,
|
|
460
|
-
105,
|
|
461
|
-
102
|
|
462
|
-
]
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
mediaType: "image/heic",
|
|
466
|
-
bytesPrefix: [
|
|
467
|
-
0,
|
|
468
|
-
0,
|
|
469
|
-
0,
|
|
470
|
-
32,
|
|
471
|
-
102,
|
|
472
|
-
116,
|
|
473
|
-
121,
|
|
474
|
-
112,
|
|
475
|
-
104,
|
|
476
|
-
101,
|
|
477
|
-
105,
|
|
478
|
-
99
|
|
479
|
-
]
|
|
480
|
-
}
|
|
481
|
-
];
|
|
482
|
-
var documentMediaTypeSignatures = [
|
|
483
|
-
{
|
|
484
|
-
mediaType: "application/pdf",
|
|
485
|
-
bytesPrefix: [37, 80, 68, 70]
|
|
486
|
-
// %PDF
|
|
487
|
-
}
|
|
488
|
-
];
|
|
489
|
-
var audioMediaTypeSignaturesWithoutMp4 = [
|
|
490
|
-
{
|
|
491
|
-
mediaType: "audio/mpeg",
|
|
492
|
-
bytesPrefix: [255, 251]
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
mediaType: "audio/mpeg",
|
|
496
|
-
bytesPrefix: [255, 250]
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
mediaType: "audio/mpeg",
|
|
500
|
-
bytesPrefix: [255, 243]
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
mediaType: "audio/mpeg",
|
|
504
|
-
bytesPrefix: [255, 242]
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
mediaType: "audio/mpeg",
|
|
508
|
-
bytesPrefix: [255, 227]
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
mediaType: "audio/mpeg",
|
|
512
|
-
bytesPrefix: [255, 226]
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
mediaType: "audio/wav",
|
|
516
|
-
bytesPrefix: [
|
|
517
|
-
82,
|
|
518
|
-
// R
|
|
519
|
-
73,
|
|
520
|
-
// I
|
|
521
|
-
70,
|
|
522
|
-
// F
|
|
523
|
-
70,
|
|
524
|
-
// F
|
|
525
|
-
null,
|
|
526
|
-
null,
|
|
527
|
-
null,
|
|
528
|
-
null,
|
|
529
|
-
87,
|
|
530
|
-
// W
|
|
531
|
-
65,
|
|
532
|
-
// A
|
|
533
|
-
86,
|
|
534
|
-
// V
|
|
535
|
-
69
|
|
536
|
-
// E
|
|
537
|
-
]
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
mediaType: "audio/ogg",
|
|
541
|
-
bytesPrefix: [79, 103, 103, 83]
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
mediaType: "audio/flac",
|
|
545
|
-
bytesPrefix: [102, 76, 97, 67]
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
mediaType: "audio/aac",
|
|
549
|
-
bytesPrefix: [64, 21, 0, 0]
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
mediaType: "audio/webm",
|
|
553
|
-
bytesPrefix: [26, 69, 223, 163]
|
|
554
|
-
}
|
|
555
|
-
];
|
|
556
|
-
var audioMediaTypeSignatures = [
|
|
557
|
-
...audioMediaTypeSignaturesWithoutMp4,
|
|
558
|
-
{
|
|
559
|
-
mediaType: "audio/mp4",
|
|
560
|
-
bytesPrefix: [
|
|
561
|
-
0,
|
|
562
|
-
0,
|
|
563
|
-
0,
|
|
564
|
-
null,
|
|
565
|
-
102,
|
|
566
|
-
116,
|
|
567
|
-
121,
|
|
568
|
-
112
|
|
569
|
-
// ftyp
|
|
570
|
-
]
|
|
571
|
-
}
|
|
572
|
-
];
|
|
573
|
-
var videoMediaTypeSignatures = [
|
|
574
|
-
{
|
|
575
|
-
mediaType: "video/mp4",
|
|
576
|
-
bytesPrefix: [
|
|
577
|
-
0,
|
|
578
|
-
0,
|
|
579
|
-
0,
|
|
580
|
-
null,
|
|
581
|
-
102,
|
|
582
|
-
116,
|
|
583
|
-
121,
|
|
584
|
-
112
|
|
585
|
-
// ftyp
|
|
586
|
-
]
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
mediaType: "video/webm",
|
|
590
|
-
bytesPrefix: [26, 69, 223, 163]
|
|
591
|
-
// EBML
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
mediaType: "video/quicktime",
|
|
595
|
-
bytesPrefix: [
|
|
596
|
-
0,
|
|
597
|
-
0,
|
|
598
|
-
0,
|
|
599
|
-
20,
|
|
600
|
-
102,
|
|
601
|
-
116,
|
|
602
|
-
121,
|
|
603
|
-
112,
|
|
604
|
-
113,
|
|
605
|
-
116
|
|
606
|
-
// ftypqt
|
|
607
|
-
]
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
mediaType: "video/x-msvideo",
|
|
611
|
-
bytesPrefix: [82, 73, 70, 70]
|
|
612
|
-
// RIFF (AVI)
|
|
613
|
-
}
|
|
614
|
-
];
|
|
615
|
-
var DEFAULT_SNIFF_BYTES = 18;
|
|
616
|
-
var MAX_SIGNATURE_BYTES = 12;
|
|
617
|
-
var MAX_ID3_TAG_BYTES = 128 * 1024;
|
|
618
|
-
var ID3_SCAN_BYTES = MAX_ID3_TAG_BYTES + MAX_SIGNATURE_BYTES;
|
|
619
|
-
function decodePrefix(data, maxBytes) {
|
|
620
|
-
if (typeof data !== "string") {
|
|
621
|
-
return data.length > maxBytes ? data.subarray(0, maxBytes) : data;
|
|
622
|
-
}
|
|
623
|
-
const maxChars = Math.ceil(maxBytes / 3) * 4;
|
|
624
|
-
const bytes = convertBase64ToUint8Array(
|
|
625
|
-
data.substring(0, Math.min(data.length, maxChars))
|
|
626
|
-
);
|
|
627
|
-
return bytes.length > maxBytes ? bytes.subarray(0, maxBytes) : bytes;
|
|
628
|
-
}
|
|
629
|
-
function hasID3(bytes) {
|
|
630
|
-
return bytes.length > 10 && bytes[0] === 73 && // 'I'
|
|
631
|
-
bytes[1] === 68 && // 'D'
|
|
632
|
-
bytes[2] === 51;
|
|
633
|
-
}
|
|
634
|
-
var stripID3 = (bytes) => {
|
|
635
|
-
const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;
|
|
636
|
-
return bytes.subarray(id3Size + 10);
|
|
637
|
-
};
|
|
638
|
-
function detectMediaTypeBySignatures({
|
|
639
|
-
data,
|
|
640
|
-
signatures
|
|
641
|
-
}) {
|
|
642
|
-
let bytes = decodePrefix(data, DEFAULT_SNIFF_BYTES);
|
|
643
|
-
if (hasID3(bytes)) {
|
|
644
|
-
bytes = stripID3(decodePrefix(data, ID3_SCAN_BYTES));
|
|
645
|
-
}
|
|
646
|
-
for (const signature of signatures) {
|
|
647
|
-
if (bytes.length >= signature.bytesPrefix.length && signature.bytesPrefix.every(
|
|
648
|
-
(byte, index) => byte === null || bytes[index] === byte
|
|
649
|
-
)) {
|
|
650
|
-
return signature.mediaType;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
return void 0;
|
|
654
|
-
}
|
|
655
|
-
var topLevelSignatureTables = {
|
|
656
|
-
image: imageMediaTypeSignatures,
|
|
657
|
-
audio: audioMediaTypeSignatures,
|
|
658
|
-
video: videoMediaTypeSignatures,
|
|
659
|
-
application: documentMediaTypeSignatures
|
|
660
|
-
};
|
|
661
|
-
function detectMediaType({
|
|
662
|
-
data,
|
|
663
|
-
topLevelType
|
|
664
|
-
}) {
|
|
665
|
-
if (topLevelType === void 0) {
|
|
666
|
-
return detectMediaTypeBySignatures({
|
|
667
|
-
data,
|
|
668
|
-
signatures: [
|
|
669
|
-
...imageMediaTypeSignatures,
|
|
670
|
-
...documentMediaTypeSignatures,
|
|
671
|
-
// MP4 containers cannot be distinguished as audio or video by ftyp alone.
|
|
672
|
-
// Preserve the generic detection result as video/mp4.
|
|
673
|
-
...audioMediaTypeSignaturesWithoutMp4,
|
|
674
|
-
...videoMediaTypeSignatures
|
|
675
|
-
]
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
const signatures = topLevelSignatureTables[topLevelType];
|
|
679
|
-
if (signatures === void 0) {
|
|
680
|
-
return void 0;
|
|
681
|
-
}
|
|
682
|
-
return detectMediaTypeBySignatures({ data, signatures });
|
|
683
|
-
}
|
|
684
|
-
function getTopLevelMediaType(mediaType) {
|
|
685
|
-
const slashIndex = mediaType.indexOf("/");
|
|
686
|
-
return slashIndex === -1 ? mediaType : mediaType.substring(0, slashIndex);
|
|
687
|
-
}
|
|
688
|
-
function isFullMediaType(mediaType) {
|
|
689
|
-
const slashIndex = mediaType.indexOf("/");
|
|
690
|
-
if (slashIndex === -1) {
|
|
691
|
-
return false;
|
|
692
|
-
}
|
|
693
|
-
const subtype = mediaType.substring(slashIndex + 1);
|
|
694
|
-
return subtype.length > 0 && subtype !== "*";
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
// src/cancel-response-body.ts
|
|
698
|
-
async function cancelResponseBody(response) {
|
|
699
|
-
var _a3;
|
|
700
|
-
try {
|
|
701
|
-
await ((_a3 = response.body) == null ? void 0 : _a3.cancel());
|
|
702
|
-
} catch (e) {
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
// src/download-error.ts
|
|
707
|
-
import { AISDKError } from "@ai-sdk/provider";
|
|
708
|
-
var name = "AI_DownloadError";
|
|
709
|
-
var marker2 = `vercel.ai.error.${name}`;
|
|
710
|
-
var symbol = Symbol.for(marker2);
|
|
711
|
-
var _a, _b;
|
|
712
|
-
var DownloadError = class extends (_b = AISDKError, _a = symbol, _b) {
|
|
713
|
-
constructor({
|
|
714
|
-
url,
|
|
715
|
-
statusCode,
|
|
716
|
-
statusText,
|
|
717
|
-
cause,
|
|
718
|
-
message = cause == null ? `Failed to download ${url}: ${statusCode} ${statusText}` : `Failed to download ${url}: ${cause}`
|
|
719
|
-
}) {
|
|
720
|
-
super({ name, message, cause });
|
|
721
|
-
this[_a] = true;
|
|
722
|
-
this.url = url;
|
|
723
|
-
this.statusCode = statusCode;
|
|
724
|
-
this.statusText = statusText;
|
|
725
|
-
}
|
|
726
|
-
static isInstance(error) {
|
|
727
|
-
return AISDKError.hasMarker(error, marker2);
|
|
728
|
-
}
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
// src/is-browser-runtime.ts
|
|
732
|
-
function isBrowserRuntime(globalThisAny = globalThis) {
|
|
733
|
-
return globalThisAny.window != null;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
// src/is-same-origin.ts
|
|
737
|
-
function isSameOrigin(url, baseUrl) {
|
|
738
|
-
try {
|
|
739
|
-
return new URL(url).origin === new URL(baseUrl).origin;
|
|
740
|
-
} catch (e) {
|
|
741
|
-
return false;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
// src/validate-download-url.ts
|
|
746
|
-
function validateDownloadUrl(url) {
|
|
747
|
-
let parsed;
|
|
748
|
-
try {
|
|
749
|
-
parsed = new URL(url);
|
|
750
|
-
} catch (e) {
|
|
751
|
-
throw new DownloadError({
|
|
752
|
-
url,
|
|
753
|
-
message: `Invalid URL: ${url}`
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
if (parsed.protocol === "data:") {
|
|
757
|
-
return;
|
|
758
|
-
}
|
|
759
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
760
|
-
throw new DownloadError({
|
|
761
|
-
url,
|
|
762
|
-
message: `URL scheme must be http, https, or data, got ${parsed.protocol}`
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
const hostname = parsed.hostname.toLowerCase().replace(/\.+$/, "");
|
|
766
|
-
if (!hostname) {
|
|
767
|
-
throw new DownloadError({
|
|
768
|
-
url,
|
|
769
|
-
message: `URL must have a hostname`
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
if (hostname === "localhost" || hostname.endsWith(".local") || hostname.endsWith(".localhost")) {
|
|
773
|
-
throw new DownloadError({
|
|
774
|
-
url,
|
|
775
|
-
message: `URL with hostname ${hostname} is not allowed`
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
if (hostname.startsWith("[") && hostname.endsWith("]")) {
|
|
779
|
-
const ipv6 = hostname.slice(1, -1);
|
|
780
|
-
if (isPrivateIPv6(ipv6)) {
|
|
781
|
-
throw new DownloadError({
|
|
782
|
-
url,
|
|
783
|
-
message: `URL with IPv6 address ${hostname} is not allowed`
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
return;
|
|
787
|
-
}
|
|
788
|
-
if (isIPv4(hostname)) {
|
|
789
|
-
if (isPrivateIPv4(hostname)) {
|
|
790
|
-
throw new DownloadError({
|
|
791
|
-
url,
|
|
792
|
-
message: `URL with IP address ${hostname} is not allowed`
|
|
793
|
-
});
|
|
794
|
-
}
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
function validateDownloadAddress({
|
|
799
|
-
address,
|
|
800
|
-
family,
|
|
801
|
-
hostname
|
|
802
|
-
}) {
|
|
803
|
-
const isUnsafe = family === 4 ? !isIPv4(address) || isPrivateIPv4(address) : family === 6 ? isPrivateIPv6(address) : true;
|
|
804
|
-
if (isUnsafe) {
|
|
805
|
-
throw new DownloadError({
|
|
806
|
-
url: hostname,
|
|
807
|
-
message: `Hostname ${hostname} resolved to disallowed IP address ${address}`
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
function isIPv4(hostname) {
|
|
812
|
-
const parts = hostname.split(".");
|
|
813
|
-
if (parts.length !== 4) return false;
|
|
814
|
-
return parts.every((part) => {
|
|
815
|
-
const num = Number(part);
|
|
816
|
-
return Number.isInteger(num) && num >= 0 && num <= 255 && String(num) === part;
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
function isPrivateIPv4(ip) {
|
|
820
|
-
const parts = ip.split(".").map(Number);
|
|
821
|
-
const [a, b, c] = parts;
|
|
822
|
-
if (a === 0) return true;
|
|
823
|
-
if (a === 10) return true;
|
|
824
|
-
if (a === 100 && b >= 64 && b <= 127) return true;
|
|
825
|
-
if (a === 127) return true;
|
|
826
|
-
if (a === 169 && b === 254) return true;
|
|
827
|
-
if (a === 172 && b >= 16 && b <= 31) return true;
|
|
828
|
-
if (a === 192 && b === 0 && c === 0) return true;
|
|
829
|
-
if (a === 192 && b === 0 && c === 2) return true;
|
|
830
|
-
if (a === 192 && b === 168) return true;
|
|
831
|
-
if (a === 198 && (b === 18 || b === 19)) return true;
|
|
832
|
-
if (a === 198 && b === 51 && c === 100) return true;
|
|
833
|
-
if (a === 203 && b === 0 && c === 113) return true;
|
|
834
|
-
if (a >= 224) return true;
|
|
835
|
-
return false;
|
|
836
|
-
}
|
|
837
|
-
function parseIPv6(ip) {
|
|
838
|
-
let address = ip.toLowerCase();
|
|
839
|
-
const zoneIndex = address.indexOf("%");
|
|
840
|
-
if (zoneIndex !== -1) {
|
|
841
|
-
address = address.slice(0, zoneIndex);
|
|
842
|
-
}
|
|
843
|
-
const halves = address.split("::");
|
|
844
|
-
if (halves.length > 2) return null;
|
|
845
|
-
const toGroups = (segment) => {
|
|
846
|
-
if (segment === "") return [];
|
|
847
|
-
const groups = [];
|
|
848
|
-
const parts = segment.split(":");
|
|
849
|
-
for (let i = 0; i < parts.length; i++) {
|
|
850
|
-
const part = parts[i];
|
|
851
|
-
if (part.includes(".")) {
|
|
852
|
-
if (i !== parts.length - 1 || !isIPv4(part)) return null;
|
|
853
|
-
const [a, b, c, d] = part.split(".").map(Number);
|
|
854
|
-
groups.push(a << 8 | b, c << 8 | d);
|
|
855
|
-
continue;
|
|
856
|
-
}
|
|
857
|
-
if (!/^[0-9a-f]{1,4}$/.test(part)) return null;
|
|
858
|
-
groups.push(parseInt(part, 16));
|
|
859
|
-
}
|
|
860
|
-
return groups;
|
|
861
|
-
};
|
|
862
|
-
const head = toGroups(halves[0]);
|
|
863
|
-
if (head === null) return null;
|
|
864
|
-
if (halves.length === 2) {
|
|
865
|
-
const tail = toGroups(halves[1]);
|
|
866
|
-
if (tail === null) return null;
|
|
867
|
-
const fill = 8 - head.length - tail.length;
|
|
868
|
-
if (fill < 0) return null;
|
|
869
|
-
return [...head, ...new Array(fill).fill(0), ...tail];
|
|
870
|
-
}
|
|
871
|
-
return head.length === 8 ? head : null;
|
|
872
|
-
}
|
|
873
|
-
function isPrivateIPv6(ip) {
|
|
874
|
-
const groups = parseIPv6(ip);
|
|
875
|
-
if (groups === null) return true;
|
|
876
|
-
const topZero = (count) => groups.slice(0, count).every((group) => group === 0);
|
|
877
|
-
if (topZero(7) && (groups[7] === 0 || groups[7] === 1)) return true;
|
|
878
|
-
if ((groups[0] & 65024) === 64512) return true;
|
|
879
|
-
if ((groups[0] & 65472) === 65152) return true;
|
|
880
|
-
if ((groups[0] & 65472) === 65216) return true;
|
|
881
|
-
if ((groups[0] & 65280) === 65280) return true;
|
|
882
|
-
if (groups[0] === 8193 && groups[1] === 3512) return true;
|
|
883
|
-
if (groups[0] === 16383 && (groups[1] & 61440) === 0) return true;
|
|
884
|
-
const embedsIPv4 = (
|
|
885
|
-
// ::/96 — IPv4-compatible (deprecated)
|
|
886
|
-
topZero(6) || // ::ffff:0:0/96 — IPv4-mapped (ffff in group 5)
|
|
887
|
-
topZero(5) && groups[5] === 65535 || // ::ffff:0:0/96 — IPv4-translated form (ffff in group 4, group 5 zero)
|
|
888
|
-
topZero(4) && groups[4] === 65535 && groups[5] === 0 || // 64:ff9b::/96 — NAT64 well-known prefix
|
|
889
|
-
groups[0] === 100 && groups[1] === 65435 && groups[2] === 0 && groups[3] === 0 && groups[4] === 0 && groups[5] === 0 || // 64:ff9b:1::/48 — NAT64 local-use prefix
|
|
890
|
-
groups[0] === 100 && groups[1] === 65435 && groups[2] === 1
|
|
891
|
-
);
|
|
892
|
-
if (embedsIPv4) {
|
|
893
|
-
const a = groups[6] >> 8 & 255;
|
|
894
|
-
const b = groups[6] & 255;
|
|
895
|
-
const c = groups[7] >> 8 & 255;
|
|
896
|
-
const d = groups[7] & 255;
|
|
897
|
-
return isPrivateIPv4(`${a}.${b}.${c}.${d}`);
|
|
898
|
-
}
|
|
899
|
-
return false;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
// src/safe-node-fetch.ts
|
|
903
|
-
function createSafeLookup(lookup) {
|
|
904
|
-
return ((hostname, options, callback) => {
|
|
905
|
-
lookup(hostname, { ...options, all: true }, (error, addresses) => {
|
|
906
|
-
if (error) {
|
|
907
|
-
callback(error);
|
|
908
|
-
return;
|
|
909
|
-
}
|
|
910
|
-
try {
|
|
911
|
-
const [firstAddress] = addresses;
|
|
912
|
-
if (firstAddress == null) {
|
|
913
|
-
throw new Error(`Hostname ${hostname} did not resolve to an address`);
|
|
914
|
-
}
|
|
915
|
-
for (const { address, family } of addresses) {
|
|
916
|
-
validateDownloadAddress({ address, family, hostname });
|
|
917
|
-
}
|
|
918
|
-
if (options.all === true) {
|
|
919
|
-
callback(null, addresses);
|
|
920
|
-
} else {
|
|
921
|
-
callback(
|
|
922
|
-
null,
|
|
923
|
-
firstAddress.address,
|
|
924
|
-
firstAddress.family
|
|
925
|
-
);
|
|
926
|
-
}
|
|
927
|
-
} catch (error2) {
|
|
928
|
-
callback(
|
|
929
|
-
error2 instanceof Error ? error2 : new Error(String(error2))
|
|
930
|
-
);
|
|
931
|
-
}
|
|
932
|
-
});
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
var safeNodeFetchPromise;
|
|
936
|
-
var initialGlobalFetch = globalThis.fetch;
|
|
937
|
-
var initialGlobalFetchIsNodeDefault = isNodeDefaultFetch(initialGlobalFetch);
|
|
938
|
-
function isNodeRuntime() {
|
|
939
|
-
var _a3, _b3;
|
|
940
|
-
const runtimeProcess = globalThis.process;
|
|
941
|
-
return ((_a3 = runtimeProcess == null ? void 0 : runtimeProcess.release) == null ? void 0 : _a3.name) === "node" && ((_b3 = runtimeProcess.versions) == null ? void 0 : _b3.bun) == null;
|
|
942
|
-
}
|
|
943
|
-
async function getDefaultDownloadFetch() {
|
|
944
|
-
if (!isNodeRuntime() || !initialGlobalFetchIsNodeDefault || globalThis.fetch !== initialGlobalFetch) {
|
|
945
|
-
return globalThis.fetch;
|
|
946
|
-
}
|
|
947
|
-
return safeNodeFetchPromise != null ? safeNodeFetchPromise : safeNodeFetchPromise = Promise.resolve().then(createSafeNodeFetch);
|
|
948
|
-
}
|
|
949
|
-
function isNodeDefaultFetch(fetch) {
|
|
950
|
-
if (typeof fetch !== "function") {
|
|
951
|
-
return false;
|
|
952
|
-
}
|
|
953
|
-
const source = Function.prototype.toString.call(fetch);
|
|
954
|
-
return source.includes("internal/deps/undici") || source.includes("lazy loading of undici");
|
|
955
|
-
}
|
|
956
|
-
function createSafeNodeFetch() {
|
|
957
|
-
const { createRequire } = loadBuiltinModule("node:module");
|
|
958
|
-
const { lookup } = loadBuiltinModule("node:dns");
|
|
959
|
-
const { Agent, fetch } = createRequire(getCurrentModulePath())(
|
|
960
|
-
"undici"
|
|
961
|
-
);
|
|
962
|
-
const dispatcher = new Agent({
|
|
963
|
-
connect: {
|
|
964
|
-
lookup: createSafeLookup(lookup)
|
|
965
|
-
}
|
|
966
|
-
});
|
|
967
|
-
return ((input, init) => fetch(
|
|
968
|
-
input,
|
|
969
|
-
{
|
|
970
|
-
...init,
|
|
971
|
-
dispatcher
|
|
972
|
-
}
|
|
973
|
-
));
|
|
974
|
-
}
|
|
975
|
-
function loadBuiltinModule(id) {
|
|
976
|
-
var _a3;
|
|
977
|
-
const processWithBuiltins = globalThis.process;
|
|
978
|
-
const builtinModule = (_a3 = processWithBuiltins == null ? void 0 : processWithBuiltins.getBuiltinModule) == null ? void 0 : _a3.call(processWithBuiltins, id);
|
|
979
|
-
if (builtinModule == null) {
|
|
980
|
-
throw new Error(`Node.js built-in module ${id} is unavailable`);
|
|
981
|
-
}
|
|
982
|
-
return builtinModule;
|
|
983
|
-
}
|
|
984
|
-
function getCurrentModulePath() {
|
|
985
|
-
const originalPrepareStackTrace = Error.prepareStackTrace;
|
|
986
|
-
try {
|
|
987
|
-
Error.prepareStackTrace = (_error, callSites) => callSites;
|
|
988
|
-
const error = new Error("Capture current module path");
|
|
989
|
-
Error.captureStackTrace(error, getCurrentModulePath);
|
|
990
|
-
const [caller] = error.stack;
|
|
991
|
-
const fileName = caller == null ? void 0 : caller.getFileName();
|
|
992
|
-
if (fileName == null) {
|
|
993
|
-
throw new Error("Unable to determine the current module path");
|
|
994
|
-
}
|
|
995
|
-
return fileName;
|
|
996
|
-
} finally {
|
|
997
|
-
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
// src/sanitize-request-headers.ts
|
|
1002
|
-
var BLOCKED_REQUEST_HEADERS = [
|
|
1003
|
-
// Hop-by-hop / transport (RFC 7230 §6.1)
|
|
1004
|
-
"connection",
|
|
1005
|
-
"keep-alive",
|
|
1006
|
-
"te",
|
|
1007
|
-
"trailer",
|
|
1008
|
-
"transfer-encoding",
|
|
1009
|
-
"upgrade",
|
|
1010
|
-
// Host / virtual-host routing
|
|
1011
|
-
"host",
|
|
1012
|
-
// Proxy / origin spoofing
|
|
1013
|
-
"forwarded",
|
|
1014
|
-
"proxy-authorization",
|
|
1015
|
-
"via",
|
|
1016
|
-
"x-forwarded-for",
|
|
1017
|
-
"x-forwarded-host",
|
|
1018
|
-
"x-forwarded-proto",
|
|
1019
|
-
"x-real-ip",
|
|
1020
|
-
// Cloud metadata (GCP, AWS IMDSv1/v2, Azure, Alibaba, DigitalOcean)
|
|
1021
|
-
"metadata",
|
|
1022
|
-
"metadata-flavor",
|
|
1023
|
-
"x-aws-ec2-metadata-token",
|
|
1024
|
-
"x-metadata-token",
|
|
1025
|
-
// Session / cookie
|
|
1026
|
-
"cookie",
|
|
1027
|
-
"set-cookie"
|
|
1028
|
-
];
|
|
1029
|
-
function sanitizeRequestHeaders(input) {
|
|
1030
|
-
const headers = new Headers(input);
|
|
1031
|
-
for (const name3 of BLOCKED_REQUEST_HEADERS) {
|
|
1032
|
-
headers.delete(name3);
|
|
1033
|
-
}
|
|
1034
|
-
return headers;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// src/fetch-with-validated-redirects.ts
|
|
1038
|
-
var MAX_DOWNLOAD_REDIRECTS = 10;
|
|
1039
|
-
var REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
1040
|
-
async function fetchWithValidatedRedirects({
|
|
1041
|
-
url,
|
|
1042
|
-
headers,
|
|
1043
|
-
abortSignal,
|
|
1044
|
-
maxRedirects = MAX_DOWNLOAD_REDIRECTS,
|
|
1045
|
-
fetch: customFetch,
|
|
1046
|
-
trustedOrigin
|
|
1047
|
-
}) {
|
|
1048
|
-
let currentHeaders = headers === void 0 ? void 0 : sanitizeRequestHeaders(headers);
|
|
1049
|
-
const perHopInit = (redirect) => {
|
|
1050
|
-
const init = { signal: abortSignal, redirect };
|
|
1051
|
-
if (currentHeaders !== void 0) {
|
|
1052
|
-
init.headers = new Headers(currentHeaders);
|
|
1053
|
-
}
|
|
1054
|
-
return init;
|
|
1055
|
-
};
|
|
1056
|
-
let currentUrl = url;
|
|
1057
|
-
for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount++) {
|
|
1058
|
-
const isTrustedHop = trustedOrigin !== void 0 && isSameOrigin(currentUrl, trustedOrigin);
|
|
1059
|
-
if (!isTrustedHop) {
|
|
1060
|
-
validateDownloadUrl(currentUrl);
|
|
1061
|
-
}
|
|
1062
|
-
const fetch = customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getDefaultDownloadFetch();
|
|
1063
|
-
const response = await fetch(currentUrl, perHopInit("manual"));
|
|
1064
|
-
if (response.type === "opaqueredirect") {
|
|
1065
|
-
if (!isBrowserRuntime()) {
|
|
1066
|
-
throw new DownloadError({
|
|
1067
|
-
url,
|
|
1068
|
-
message: `Redirect from ${currentUrl} could not be validated and was blocked`
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
return await fetch(currentUrl, perHopInit("follow"));
|
|
1072
|
-
}
|
|
1073
|
-
const location = response.headers.get("location");
|
|
1074
|
-
if (REDIRECT_STATUS_CODES.has(response.status) && location) {
|
|
1075
|
-
await cancelResponseBody(response);
|
|
1076
|
-
const nextUrl = new URL(location, currentUrl).toString();
|
|
1077
|
-
if (currentHeaders !== void 0 && !isSameOrigin(nextUrl, currentUrl)) {
|
|
1078
|
-
const userAgent = currentHeaders.get("user-agent");
|
|
1079
|
-
currentHeaders = new Headers(
|
|
1080
|
-
userAgent == null ? void 0 : { "user-agent": userAgent }
|
|
1081
|
-
);
|
|
1082
|
-
}
|
|
1083
|
-
currentUrl = nextUrl;
|
|
1084
|
-
continue;
|
|
1085
|
-
}
|
|
1086
|
-
return response;
|
|
1087
|
-
}
|
|
1088
|
-
throw new DownloadError({
|
|
1089
|
-
url,
|
|
1090
|
-
message: `Too many redirects (max ${maxRedirects})`
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
// src/read-response-with-size-limit.ts
|
|
1095
|
-
var DEFAULT_MAX_DOWNLOAD_SIZE = 2 * 1024 * 1024 * 1024;
|
|
1096
|
-
async function readResponseWithSizeLimit({
|
|
1097
|
-
response,
|
|
1098
|
-
url,
|
|
1099
|
-
maxBytes = DEFAULT_MAX_DOWNLOAD_SIZE
|
|
1100
|
-
}) {
|
|
1101
|
-
const contentLength = response.headers.get("content-length");
|
|
1102
|
-
if (contentLength != null) {
|
|
1103
|
-
const length = parseInt(contentLength, 10);
|
|
1104
|
-
if (!isNaN(length) && length > maxBytes) {
|
|
1105
|
-
await cancelResponseBody(response);
|
|
1106
|
-
throw new DownloadError({
|
|
1107
|
-
url,
|
|
1108
|
-
message: `Download of ${url} exceeded maximum size of ${maxBytes} bytes (Content-Length: ${length}).`
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
const body = response.body;
|
|
1113
|
-
if (body == null) {
|
|
1114
|
-
return new Uint8Array(0);
|
|
1115
|
-
}
|
|
1116
|
-
const reader = body.getReader();
|
|
1117
|
-
const chunks = [];
|
|
1118
|
-
let totalBytes = 0;
|
|
1119
|
-
try {
|
|
1120
|
-
while (true) {
|
|
1121
|
-
const { done, value } = await reader.read();
|
|
1122
|
-
if (done) {
|
|
1123
|
-
break;
|
|
1124
|
-
}
|
|
1125
|
-
totalBytes += value.length;
|
|
1126
|
-
if (totalBytes > maxBytes) {
|
|
1127
|
-
throw new DownloadError({
|
|
1128
|
-
url,
|
|
1129
|
-
message: `Download of ${url} exceeded maximum size of ${maxBytes} bytes.`
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1132
|
-
chunks.push(value);
|
|
1133
|
-
}
|
|
1134
|
-
} finally {
|
|
1135
|
-
try {
|
|
1136
|
-
await reader.cancel();
|
|
1137
|
-
} catch (e) {
|
|
1138
|
-
} finally {
|
|
1139
|
-
reader.releaseLock();
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
const result = new Uint8Array(totalBytes);
|
|
1143
|
-
let offset = 0;
|
|
1144
|
-
for (const chunk of chunks) {
|
|
1145
|
-
result.set(chunk, offset);
|
|
1146
|
-
offset += chunk.length;
|
|
1147
|
-
}
|
|
1148
|
-
return result;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
// src/download-blob.ts
|
|
1152
|
-
async function downloadBlob(url, options) {
|
|
1153
|
-
var _a3, _b3;
|
|
1154
|
-
try {
|
|
1155
|
-
const response = await fetchWithValidatedRedirects({
|
|
1156
|
-
url,
|
|
1157
|
-
abortSignal: options == null ? void 0 : options.abortSignal
|
|
1158
|
-
});
|
|
1159
|
-
if (!response.ok) {
|
|
1160
|
-
await cancelResponseBody(response);
|
|
1161
|
-
throw new DownloadError({
|
|
1162
|
-
url,
|
|
1163
|
-
statusCode: response.status,
|
|
1164
|
-
statusText: response.statusText
|
|
1165
|
-
});
|
|
1166
|
-
}
|
|
1167
|
-
const data = await readResponseWithSizeLimit({
|
|
1168
|
-
response,
|
|
1169
|
-
url,
|
|
1170
|
-
maxBytes: (_a3 = options == null ? void 0 : options.maxBytes) != null ? _a3 : DEFAULT_MAX_DOWNLOAD_SIZE
|
|
1171
|
-
});
|
|
1172
|
-
const contentType = (_b3 = response.headers.get("content-type")) != null ? _b3 : void 0;
|
|
1173
|
-
return new Blob([data], contentType ? { type: contentType } : void 0);
|
|
1174
|
-
} catch (error) {
|
|
1175
|
-
if (DownloadError.isInstance(error)) {
|
|
1176
|
-
throw error;
|
|
1177
|
-
}
|
|
1178
|
-
throw new DownloadError({ url, cause: error });
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
// src/embedding-model-capabilities.ts
|
|
1183
|
-
var EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL = /* @__PURE__ */ Symbol.for(
|
|
1184
|
-
"vercel.ai.embeddingModel.maxInputBytesPerCall"
|
|
1185
|
-
);
|
|
1186
|
-
|
|
1187
|
-
// src/extract-lines.ts
|
|
1188
|
-
function extractLines({
|
|
1189
|
-
text,
|
|
1190
|
-
startLine,
|
|
1191
|
-
endLine
|
|
1192
|
-
}) {
|
|
1193
|
-
if (startLine == null && endLine == null) return text;
|
|
1194
|
-
const lineEnding = text.includes("\r\n") ? "\r\n" : text.includes("\n") ? "\n" : text.includes("\r") ? "\r" : "\n";
|
|
1195
|
-
const lines = text.split(lineEnding);
|
|
1196
|
-
const start = Math.max(1, startLine != null ? startLine : 1) - 1;
|
|
1197
|
-
const end = Math.min(lines.length, endLine != null ? endLine : lines.length);
|
|
1198
|
-
return lines.slice(start, end).join(lineEnding);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
// src/extract-response-headers.ts
|
|
1202
|
-
function extractResponseHeaders(response) {
|
|
1203
|
-
return Object.fromEntries([...response.headers]);
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
// src/filter-nullable.ts
|
|
1207
|
-
function filterNullable(...values) {
|
|
1208
|
-
return values.filter((value) => value != null);
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
// src/generate-id.ts
|
|
1212
|
-
import { InvalidArgumentError } from "@ai-sdk/provider";
|
|
1213
|
-
var createIdGenerator = ({
|
|
1214
|
-
prefix,
|
|
1215
|
-
size = 16,
|
|
1216
|
-
alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
1217
|
-
separator = "-"
|
|
1218
|
-
} = {}) => {
|
|
1219
|
-
const generator = () => {
|
|
1220
|
-
const alphabetLength = alphabet.length;
|
|
1221
|
-
const chars = new Array(size);
|
|
1222
|
-
for (let i = 0; i < size; i++) {
|
|
1223
|
-
chars[i] = alphabet[Math.random() * alphabetLength | 0];
|
|
1224
|
-
}
|
|
1225
|
-
return chars.join("");
|
|
1226
|
-
};
|
|
1227
|
-
if (prefix == null) {
|
|
1228
|
-
return generator;
|
|
1229
|
-
}
|
|
1230
|
-
if (alphabet.includes(separator)) {
|
|
1231
|
-
throw new InvalidArgumentError({
|
|
1232
|
-
argument: "separator",
|
|
1233
|
-
message: `The separator "${separator}" must not be part of the alphabet "${alphabet}".`
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
return () => `${prefix}${separator}${generator()}`;
|
|
1237
|
-
};
|
|
1238
|
-
var generateId = createIdGenerator();
|
|
1239
|
-
|
|
1240
|
-
// src/get-error-message.ts
|
|
1241
|
-
import { getErrorMessage } from "@ai-sdk/provider";
|
|
1242
|
-
|
|
1243
|
-
// src/get-from-api.ts
|
|
1244
|
-
import { APICallError as APICallError2 } from "@ai-sdk/provider";
|
|
1245
|
-
|
|
1246
|
-
// src/handle-fetch-error.ts
|
|
1247
|
-
import { APICallError } from "@ai-sdk/provider";
|
|
1248
|
-
|
|
1249
|
-
// src/is-abort-error.ts
|
|
1250
|
-
function isAbortError(error) {
|
|
1251
|
-
return (error instanceof Error || error instanceof DOMException) && (error.name === "AbortError" || error.name === "ResponseAborted" || // Next.js
|
|
1252
|
-
error.name === "TimeoutError");
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
// src/handle-fetch-error.ts
|
|
1256
|
-
var FETCH_FAILED_ERROR_MESSAGES = ["fetch failed", "failed to fetch"];
|
|
1257
|
-
var BUN_ERROR_CODES = [
|
|
1258
|
-
"ConnectionRefused",
|
|
1259
|
-
"ConnectionClosed",
|
|
1260
|
-
"FailedToOpenSocket",
|
|
1261
|
-
"ECONNRESET",
|
|
1262
|
-
"ECONNREFUSED",
|
|
1263
|
-
"ETIMEDOUT",
|
|
1264
|
-
"EPIPE"
|
|
1265
|
-
];
|
|
1266
|
-
function isBunNetworkError(error) {
|
|
1267
|
-
if (!(error instanceof Error)) {
|
|
1268
|
-
return false;
|
|
1269
|
-
}
|
|
1270
|
-
const code = error.code;
|
|
1271
|
-
if (typeof code === "string" && BUN_ERROR_CODES.includes(code)) {
|
|
1272
|
-
return true;
|
|
1273
|
-
}
|
|
1274
|
-
return false;
|
|
1275
|
-
}
|
|
1276
|
-
function handleFetchError({
|
|
1277
|
-
error,
|
|
1278
|
-
url,
|
|
1279
|
-
requestBodyValues
|
|
1280
|
-
}) {
|
|
1281
|
-
if (isAbortError(error)) {
|
|
1282
|
-
return error;
|
|
1283
|
-
}
|
|
1284
|
-
if (error instanceof TypeError && FETCH_FAILED_ERROR_MESSAGES.includes(error.message.toLowerCase())) {
|
|
1285
|
-
const cause = error.cause;
|
|
1286
|
-
if (cause != null) {
|
|
1287
|
-
return new APICallError({
|
|
1288
|
-
message: `Cannot connect to API: ${cause.message}`,
|
|
1289
|
-
cause,
|
|
1290
|
-
url,
|
|
1291
|
-
requestBodyValues,
|
|
1292
|
-
isRetryable: true
|
|
1293
|
-
// retry when network error
|
|
1294
|
-
});
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
if (isBunNetworkError(error)) {
|
|
1298
|
-
return new APICallError({
|
|
1299
|
-
message: `Cannot connect to API: ${error.message}`,
|
|
1300
|
-
cause: error,
|
|
1301
|
-
url,
|
|
1302
|
-
requestBodyValues,
|
|
1303
|
-
isRetryable: true
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
return error;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
// src/get-runtime-environment-user-agent.ts
|
|
1310
|
-
function getRuntimeEnvironmentUserAgent(globalThisAny = globalThis) {
|
|
1311
|
-
var _a3, _b3, _c;
|
|
1312
|
-
if (globalThisAny.window) {
|
|
1313
|
-
return `runtime/browser`;
|
|
1314
|
-
}
|
|
1315
|
-
if ((_a3 = globalThisAny.navigator) == null ? void 0 : _a3.userAgent) {
|
|
1316
|
-
return `runtime/${globalThisAny.navigator.userAgent.toLowerCase()}`;
|
|
1317
|
-
}
|
|
1318
|
-
if ((_c = (_b3 = globalThisAny.process) == null ? void 0 : _b3.versions) == null ? void 0 : _c.node) {
|
|
1319
|
-
return `runtime/node.js/${globalThisAny.process.version.substring(0)}`;
|
|
1320
|
-
}
|
|
1321
|
-
if (globalThisAny.EdgeRuntime) {
|
|
1322
|
-
return `runtime/vercel-edge`;
|
|
1323
|
-
}
|
|
1324
|
-
return "runtime/unknown";
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
// src/normalize-headers.ts
|
|
1328
|
-
function normalizeHeaders(headers) {
|
|
1329
|
-
if (headers == null) {
|
|
1330
|
-
return {};
|
|
1331
|
-
}
|
|
1332
|
-
const normalized = {};
|
|
1333
|
-
if (headers instanceof Headers) {
|
|
1334
|
-
headers.forEach((value, key) => {
|
|
1335
|
-
normalized[key.toLowerCase()] = value;
|
|
1336
|
-
});
|
|
1337
|
-
} else {
|
|
1338
|
-
if (!Array.isArray(headers)) {
|
|
1339
|
-
headers = Object.entries(headers);
|
|
1340
|
-
}
|
|
1341
|
-
for (const [key, value] of headers) {
|
|
1342
|
-
if (value != null) {
|
|
1343
|
-
normalized[key.toLowerCase()] = value;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
return normalized;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
// src/with-user-agent-suffix.ts
|
|
1351
|
-
function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
1352
|
-
const normalizedHeaders = new Headers(normalizeHeaders(headers));
|
|
1353
|
-
const currentUserAgentHeader = normalizedHeaders.get("user-agent") || "";
|
|
1354
|
-
normalizedHeaders.set(
|
|
1355
|
-
"user-agent",
|
|
1356
|
-
[currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" ")
|
|
1357
|
-
);
|
|
1358
|
-
return Object.fromEntries(normalizedHeaders.entries());
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
// src/version.ts
|
|
1362
|
-
var VERSION = true ? "5.0.32" : "0.0.0-test";
|
|
1363
|
-
|
|
1364
|
-
// src/get-from-api.ts
|
|
1365
|
-
var getOriginalFetch = () => globalThis.fetch;
|
|
1366
|
-
var getFromApi = async ({
|
|
1367
|
-
url,
|
|
1368
|
-
headers = {},
|
|
1369
|
-
successfulResponseHandler,
|
|
1370
|
-
failedResponseHandler,
|
|
1371
|
-
abortSignal,
|
|
1372
|
-
fetch,
|
|
1373
|
-
validateUrl,
|
|
1374
|
-
credentialedOrigin,
|
|
1375
|
-
trustedOrigin
|
|
1376
|
-
}) => {
|
|
1377
|
-
try {
|
|
1378
|
-
const requestFetch = fetch != null ? fetch : getOriginalFetch();
|
|
1379
|
-
const outgoingHeaders = credentialedOrigin !== void 0 && !isSameOrigin(url, credentialedOrigin) ? {} : headers;
|
|
1380
|
-
const requestHeaders = withUserAgentSuffix(
|
|
1381
|
-
outgoingHeaders,
|
|
1382
|
-
`ai-sdk/provider-utils/${VERSION}`,
|
|
1383
|
-
getRuntimeEnvironmentUserAgent()
|
|
1384
|
-
);
|
|
1385
|
-
const response = validateUrl ? await fetchWithValidatedRedirects({
|
|
1386
|
-
url,
|
|
1387
|
-
headers: requestHeaders,
|
|
1388
|
-
abortSignal,
|
|
1389
|
-
fetch,
|
|
1390
|
-
trustedOrigin
|
|
1391
|
-
}) : await requestFetch(url, {
|
|
1392
|
-
method: "GET",
|
|
1393
|
-
headers: requestHeaders,
|
|
1394
|
-
signal: abortSignal
|
|
1395
|
-
});
|
|
1396
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
1397
|
-
if (!response.ok) {
|
|
1398
|
-
let errorInformation;
|
|
1399
|
-
try {
|
|
1400
|
-
errorInformation = await failedResponseHandler({
|
|
1401
|
-
response,
|
|
1402
|
-
url,
|
|
1403
|
-
requestBodyValues: {}
|
|
1404
|
-
});
|
|
1405
|
-
} catch (error) {
|
|
1406
|
-
if (isAbortError(error) || APICallError2.isInstance(error)) {
|
|
1407
|
-
throw error;
|
|
1408
|
-
}
|
|
1409
|
-
throw new APICallError2({
|
|
1410
|
-
message: "Failed to process error response",
|
|
1411
|
-
cause: error,
|
|
1412
|
-
statusCode: response.status,
|
|
1413
|
-
url,
|
|
1414
|
-
responseHeaders,
|
|
1415
|
-
requestBodyValues: {}
|
|
1416
|
-
});
|
|
1417
|
-
}
|
|
1418
|
-
throw errorInformation.value;
|
|
1419
|
-
}
|
|
1420
|
-
try {
|
|
1421
|
-
return await successfulResponseHandler({
|
|
1422
|
-
response,
|
|
1423
|
-
url,
|
|
1424
|
-
requestBodyValues: {}
|
|
1425
|
-
});
|
|
1426
|
-
} catch (error) {
|
|
1427
|
-
if (error instanceof Error) {
|
|
1428
|
-
if (isAbortError(error) || APICallError2.isInstance(error)) {
|
|
1429
|
-
throw error;
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
throw new APICallError2({
|
|
1433
|
-
message: "Failed to process successful response",
|
|
1434
|
-
cause: error,
|
|
1435
|
-
statusCode: response.status,
|
|
1436
|
-
url,
|
|
1437
|
-
responseHeaders,
|
|
1438
|
-
requestBodyValues: {}
|
|
1439
|
-
});
|
|
1440
|
-
}
|
|
1441
|
-
} catch (error) {
|
|
1442
|
-
throw handleFetchError({ error, url, requestBodyValues: {} });
|
|
1443
|
-
}
|
|
1444
|
-
};
|
|
1445
|
-
|
|
1446
|
-
// src/inject-json-instruction.ts
|
|
1447
|
-
var DEFAULT_SCHEMA_PREFIX = "JSON schema:";
|
|
1448
|
-
var DEFAULT_SCHEMA_SUFFIX = "You MUST answer with a JSON object that matches the JSON schema above.";
|
|
1449
|
-
var DEFAULT_GENERIC_SUFFIX = "You MUST answer with JSON.";
|
|
1450
|
-
function injectJsonInstruction({
|
|
1451
|
-
prompt,
|
|
1452
|
-
schema,
|
|
1453
|
-
schemaPrefix = schema != null ? DEFAULT_SCHEMA_PREFIX : void 0,
|
|
1454
|
-
schemaSuffix = schema != null ? DEFAULT_SCHEMA_SUFFIX : DEFAULT_GENERIC_SUFFIX
|
|
1455
|
-
}) {
|
|
1456
|
-
return [
|
|
1457
|
-
prompt != null && prompt.length > 0 ? prompt : void 0,
|
|
1458
|
-
prompt != null && prompt.length > 0 ? "" : void 0,
|
|
1459
|
-
// add a newline if prompt is not null
|
|
1460
|
-
schemaPrefix,
|
|
1461
|
-
schema != null ? JSON.stringify(schema) : void 0,
|
|
1462
|
-
schemaSuffix
|
|
1463
|
-
].filter((line) => line != null).join("\n");
|
|
1464
|
-
}
|
|
1465
|
-
function injectJsonInstructionIntoMessages({
|
|
1466
|
-
messages,
|
|
1467
|
-
schema,
|
|
1468
|
-
schemaPrefix,
|
|
1469
|
-
schemaSuffix
|
|
1470
|
-
}) {
|
|
1471
|
-
var _a3, _b3;
|
|
1472
|
-
const systemMessage = ((_a3 = messages[0]) == null ? void 0 : _a3.role) === "system" ? { ...messages[0] } : { role: "system", content: "" };
|
|
1473
|
-
systemMessage.content = injectJsonInstruction({
|
|
1474
|
-
prompt: systemMessage.content,
|
|
1475
|
-
schema,
|
|
1476
|
-
schemaPrefix,
|
|
1477
|
-
schemaSuffix
|
|
1478
|
-
});
|
|
1479
|
-
return [
|
|
1480
|
-
systemMessage,
|
|
1481
|
-
...((_b3 = messages[0]) == null ? void 0 : _b3.role) === "system" ? messages.slice(1) : messages
|
|
1482
|
-
];
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
// src/is-buffer.ts
|
|
1486
|
-
function isBuffer(value) {
|
|
1487
|
-
var _a3, _b3;
|
|
1488
|
-
return (_b3 = (_a3 = globalThis.Buffer) == null ? void 0 : _a3.isBuffer(value)) != null ? _b3 : false;
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
// src/is-non-nullable.ts
|
|
1492
|
-
function isNonNullable(value) {
|
|
1493
|
-
return value != null;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
// src/is-provider-reference.ts
|
|
1497
|
-
function isProviderReference(data) {
|
|
1498
|
-
return typeof data === "object" && data !== null && !(data instanceof Uint8Array) && !(data instanceof URL) && !(data instanceof ArrayBuffer) && !isBuffer(data) && !("type" in data);
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
// src/is-record.ts
|
|
1502
|
-
function isRecord(value) {
|
|
1503
|
-
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
// src/is-url-supported.ts
|
|
1507
|
-
function isUrlSupported({
|
|
1508
|
-
mediaType,
|
|
1509
|
-
url,
|
|
1510
|
-
supportedUrls
|
|
1511
|
-
}) {
|
|
1512
|
-
url = url.toLowerCase();
|
|
1513
|
-
mediaType = mediaType.toLowerCase();
|
|
1514
|
-
const isTopLevelOnly = !mediaType.includes("/");
|
|
1515
|
-
return Object.entries(supportedUrls).map(([key, value]) => {
|
|
1516
|
-
const mediaType2 = key.toLowerCase();
|
|
1517
|
-
return mediaType2 === "*" || mediaType2 === "*/*" ? { mediaTypePrefix: "", regexes: value } : { mediaTypePrefix: mediaType2.replace(/\*/, ""), regexes: value };
|
|
1518
|
-
}).filter(({ mediaTypePrefix }) => {
|
|
1519
|
-
if (mediaTypePrefix === "") {
|
|
1520
|
-
return true;
|
|
1521
|
-
}
|
|
1522
|
-
if (isTopLevelOnly) {
|
|
1523
|
-
return `${mediaType}/` === mediaTypePrefix;
|
|
1524
|
-
}
|
|
1525
|
-
return mediaType.startsWith(mediaTypePrefix);
|
|
1526
|
-
}).flatMap(({ regexes }) => regexes).some((pattern) => testRegExpFromStart(pattern, url));
|
|
1527
|
-
}
|
|
1528
|
-
function testRegExpFromStart(pattern, value) {
|
|
1529
|
-
if (!pattern.global && !pattern.sticky) {
|
|
1530
|
-
return pattern.test(value);
|
|
1531
|
-
}
|
|
1532
|
-
const lastIndex = pattern.lastIndex;
|
|
1533
|
-
pattern.lastIndex = 0;
|
|
1534
|
-
try {
|
|
1535
|
-
return pattern.test(value);
|
|
1536
|
-
} finally {
|
|
1537
|
-
pattern.lastIndex = lastIndex;
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
// src/load-api-key.ts
|
|
1542
|
-
import { LoadAPIKeyError } from "@ai-sdk/provider";
|
|
1543
|
-
function loadApiKey({
|
|
1544
|
-
apiKey,
|
|
1545
|
-
environmentVariableName,
|
|
1546
|
-
apiKeyParameterName = "apiKey",
|
|
1547
|
-
description
|
|
1548
|
-
}) {
|
|
1549
|
-
if (typeof apiKey === "string") {
|
|
1550
|
-
return apiKey;
|
|
1551
|
-
}
|
|
1552
|
-
if (apiKey != null) {
|
|
1553
|
-
throw new LoadAPIKeyError({
|
|
1554
|
-
message: `${description} API key must be a string.`
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
if (typeof process === "undefined") {
|
|
1558
|
-
throw new LoadAPIKeyError({
|
|
1559
|
-
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables are not supported in this environment.`
|
|
1560
|
-
});
|
|
1561
|
-
}
|
|
1562
|
-
apiKey = process.env[environmentVariableName];
|
|
1563
|
-
if (apiKey == null) {
|
|
1564
|
-
throw new LoadAPIKeyError({
|
|
1565
|
-
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter or the ${environmentVariableName} environment variable.`
|
|
1566
|
-
});
|
|
1567
|
-
}
|
|
1568
|
-
if (typeof apiKey !== "string") {
|
|
1569
|
-
throw new LoadAPIKeyError({
|
|
1570
|
-
message: `${description} API key must be a string. The value of the ${environmentVariableName} environment variable is not a string.`
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
return apiKey;
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
// src/load-optional-setting.ts
|
|
1577
|
-
function loadOptionalSetting({
|
|
1578
|
-
settingValue,
|
|
1579
|
-
environmentVariableName
|
|
1580
|
-
}) {
|
|
1581
|
-
if (typeof settingValue === "string") {
|
|
1582
|
-
return settingValue;
|
|
1583
|
-
}
|
|
1584
|
-
if (settingValue != null || typeof process === "undefined") {
|
|
1585
|
-
return void 0;
|
|
1586
|
-
}
|
|
1587
|
-
settingValue = process.env[environmentVariableName];
|
|
1588
|
-
if (settingValue == null || typeof settingValue !== "string") {
|
|
1589
|
-
return void 0;
|
|
1590
|
-
}
|
|
1591
|
-
return settingValue;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
// src/load-setting.ts
|
|
1595
|
-
import { LoadSettingError } from "@ai-sdk/provider";
|
|
1596
|
-
function loadSetting({
|
|
1597
|
-
settingValue,
|
|
1598
|
-
environmentVariableName,
|
|
1599
|
-
settingName,
|
|
1600
|
-
description
|
|
1601
|
-
}) {
|
|
1602
|
-
if (typeof settingValue === "string") {
|
|
1603
|
-
return settingValue;
|
|
1604
|
-
}
|
|
1605
|
-
if (settingValue != null) {
|
|
1606
|
-
throw new LoadSettingError({
|
|
1607
|
-
message: `${description} setting must be a string.`
|
|
1608
|
-
});
|
|
1609
|
-
}
|
|
1610
|
-
if (typeof process === "undefined") {
|
|
1611
|
-
throw new LoadSettingError({
|
|
1612
|
-
message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables are not supported in this environment.`
|
|
1613
|
-
});
|
|
1614
|
-
}
|
|
1615
|
-
settingValue = process.env[environmentVariableName];
|
|
1616
|
-
if (settingValue == null) {
|
|
1617
|
-
throw new LoadSettingError({
|
|
1618
|
-
message: `${description} setting is missing. Pass it using the '${settingName}' parameter or the ${environmentVariableName} environment variable.`
|
|
1619
|
-
});
|
|
1620
|
-
}
|
|
1621
|
-
if (typeof settingValue !== "string") {
|
|
1622
|
-
throw new LoadSettingError({
|
|
1623
|
-
message: `${description} setting must be a string. The value of the ${environmentVariableName} environment variable is not a string.`
|
|
1624
|
-
});
|
|
1625
|
-
}
|
|
1626
|
-
return settingValue;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
// src/map-reasoning-to-provider.ts
|
|
1630
|
-
function isCustomReasoning(reasoning) {
|
|
1631
|
-
return reasoning !== void 0 && reasoning !== "provider-default";
|
|
1632
|
-
}
|
|
1633
|
-
function mapReasoningToProviderEffort({
|
|
1634
|
-
reasoning,
|
|
1635
|
-
effortMap,
|
|
1636
|
-
warnings
|
|
1637
|
-
}) {
|
|
1638
|
-
const mapped = effortMap[reasoning];
|
|
1639
|
-
if (mapped == null) {
|
|
1640
|
-
warnings.push({
|
|
1641
|
-
type: "unsupported",
|
|
1642
|
-
feature: "reasoning",
|
|
1643
|
-
details: `reasoning "${reasoning}" is not supported by this model.`
|
|
1644
|
-
});
|
|
1645
|
-
return void 0;
|
|
1646
|
-
}
|
|
1647
|
-
if (mapped !== reasoning) {
|
|
1648
|
-
warnings.push({
|
|
1649
|
-
type: "compatibility",
|
|
1650
|
-
feature: "reasoning",
|
|
1651
|
-
details: `reasoning "${reasoning}" is not directly supported by this model. mapped to effort "${mapped}".`
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
return mapped;
|
|
1655
|
-
}
|
|
1656
|
-
var DEFAULT_REASONING_BUDGET_PERCENTAGES = {
|
|
1657
|
-
minimal: 0.02,
|
|
1658
|
-
low: 0.1,
|
|
1659
|
-
medium: 0.3,
|
|
1660
|
-
high: 0.6,
|
|
1661
|
-
xhigh: 0.9
|
|
1662
|
-
};
|
|
1663
|
-
function mapReasoningToProviderBudget({
|
|
1664
|
-
reasoning,
|
|
1665
|
-
maxOutputTokens,
|
|
1666
|
-
maxReasoningBudget,
|
|
1667
|
-
minReasoningBudget = 1024,
|
|
1668
|
-
budgetPercentages = DEFAULT_REASONING_BUDGET_PERCENTAGES,
|
|
1669
|
-
warnings
|
|
1670
|
-
}) {
|
|
1671
|
-
const pct = budgetPercentages[reasoning];
|
|
1672
|
-
if (pct == null) {
|
|
1673
|
-
warnings.push({
|
|
1674
|
-
type: "unsupported",
|
|
1675
|
-
feature: "reasoning",
|
|
1676
|
-
details: `reasoning "${reasoning}" is not supported by this model.`
|
|
1677
|
-
});
|
|
1678
|
-
return void 0;
|
|
1679
|
-
}
|
|
1680
|
-
return Math.min(
|
|
1681
|
-
maxReasoningBudget,
|
|
1682
|
-
Math.max(minReasoningBudget, Math.round(maxOutputTokens * pct))
|
|
1683
|
-
);
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
// src/media-type-to-extension.ts
|
|
1687
|
-
function mediaTypeToExtension(mediaType) {
|
|
1688
|
-
var _a3;
|
|
1689
|
-
const [_type, subtype = ""] = mediaType.toLowerCase().split("/");
|
|
1690
|
-
return (_a3 = {
|
|
1691
|
-
mpeg: "mp3",
|
|
1692
|
-
"x-wav": "wav",
|
|
1693
|
-
opus: "ogg",
|
|
1694
|
-
mp4: "m4a",
|
|
1695
|
-
"x-m4a": "m4a"
|
|
1696
|
-
}[subtype]) != null ? _a3 : subtype;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
// src/normalize-batch-request-counts.ts
|
|
1700
|
-
function normalizeBatchRequestCounts({
|
|
1701
|
-
total,
|
|
1702
|
-
pending,
|
|
1703
|
-
completed,
|
|
1704
|
-
failed
|
|
1705
|
-
}) {
|
|
1706
|
-
if (isNonNegativeSafeInteger(total) && isNonNegativeSafeInteger(pending) && isNonNegativeSafeInteger(completed) && isNonNegativeSafeInteger(failed) && pending + completed + failed === total) {
|
|
1707
|
-
return {
|
|
1708
|
-
total,
|
|
1709
|
-
pending,
|
|
1710
|
-
completed,
|
|
1711
|
-
failed
|
|
1712
|
-
};
|
|
1713
|
-
}
|
|
1714
|
-
return void 0;
|
|
1715
|
-
}
|
|
1716
|
-
function isNonNegativeSafeInteger(value) {
|
|
1717
|
-
return value != null && Number.isSafeInteger(value) && value >= 0;
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
// src/parse-json.ts
|
|
1721
|
-
import {
|
|
1722
|
-
JSONParseError,
|
|
1723
|
-
TypeValidationError as TypeValidationError3
|
|
1724
|
-
} from "@ai-sdk/provider";
|
|
1725
|
-
|
|
1726
|
-
// src/secure-json-parse.ts
|
|
1727
|
-
var suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
|
|
1728
|
-
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
1729
|
-
function _parse(text) {
|
|
1730
|
-
const obj = JSON.parse(text);
|
|
1731
|
-
if (obj === null || typeof obj !== "object") {
|
|
1732
|
-
return obj;
|
|
1733
|
-
}
|
|
1734
|
-
if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {
|
|
1735
|
-
return obj;
|
|
1736
|
-
}
|
|
1737
|
-
return filter(obj);
|
|
1738
|
-
}
|
|
1739
|
-
function filter(obj) {
|
|
1740
|
-
let next = [obj];
|
|
1741
|
-
while (next.length) {
|
|
1742
|
-
const nodes = next;
|
|
1743
|
-
next = [];
|
|
1744
|
-
for (const node of nodes) {
|
|
1745
|
-
if (Object.prototype.hasOwnProperty.call(node, "__proto__")) {
|
|
1746
|
-
throw new SyntaxError("Object contains forbidden prototype property");
|
|
1747
|
-
}
|
|
1748
|
-
if (Object.prototype.hasOwnProperty.call(node, "constructor") && node.constructor !== null && typeof node.constructor === "object" && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
|
|
1749
|
-
throw new SyntaxError("Object contains forbidden prototype property");
|
|
1750
|
-
}
|
|
1751
|
-
for (const key in node) {
|
|
1752
|
-
const value = node[key];
|
|
1753
|
-
if (value && typeof value === "object") {
|
|
1754
|
-
next.push(value);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
return obj;
|
|
1760
|
-
}
|
|
1761
|
-
function secureJsonParse(text) {
|
|
1762
|
-
const { stackTraceLimit } = Error;
|
|
1763
|
-
try {
|
|
1764
|
-
Error.stackTraceLimit = 0;
|
|
1765
|
-
} catch (e) {
|
|
1766
|
-
return _parse(text);
|
|
1767
|
-
}
|
|
1768
|
-
try {
|
|
1769
|
-
return _parse(text);
|
|
1770
|
-
} finally {
|
|
1771
|
-
Error.stackTraceLimit = stackTraceLimit;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
// src/validate-types.ts
|
|
1776
|
-
import {
|
|
1777
|
-
TypeValidationError as TypeValidationError2
|
|
1778
|
-
} from "@ai-sdk/provider";
|
|
1779
|
-
|
|
1780
|
-
// src/schema.ts
|
|
1781
|
-
import { TypeValidationError } from "@ai-sdk/provider";
|
|
1782
|
-
import { safeParseAsync } from "zod/v4";
|
|
1783
|
-
import { toJSONSchema } from "zod/v4/core";
|
|
1784
|
-
|
|
1785
|
-
// src/add-additional-properties-to-json-schema.ts
|
|
1786
|
-
function addAdditionalPropertiesToJsonSchema(jsonSchema2) {
|
|
1787
|
-
if (jsonSchema2.type === "object" || Array.isArray(jsonSchema2.type) && jsonSchema2.type.includes("object")) {
|
|
1788
|
-
const { additionalProperties } = jsonSchema2;
|
|
1789
|
-
jsonSchema2.additionalProperties = additionalProperties != null && typeof additionalProperties !== "boolean" ? visit(additionalProperties) : false;
|
|
1790
|
-
const { properties } = jsonSchema2;
|
|
1791
|
-
if (properties != null) {
|
|
1792
|
-
for (const key of Object.keys(properties)) {
|
|
1793
|
-
properties[key] = visit(properties[key]);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
if (jsonSchema2.items != null) {
|
|
1798
|
-
jsonSchema2.items = Array.isArray(jsonSchema2.items) ? jsonSchema2.items.map(visit) : visit(jsonSchema2.items);
|
|
1799
|
-
}
|
|
1800
|
-
if (jsonSchema2.anyOf != null) {
|
|
1801
|
-
jsonSchema2.anyOf = jsonSchema2.anyOf.map(visit);
|
|
1802
|
-
}
|
|
1803
|
-
if (jsonSchema2.allOf != null) {
|
|
1804
|
-
jsonSchema2.allOf = jsonSchema2.allOf.map(visit);
|
|
1805
|
-
}
|
|
1806
|
-
if (jsonSchema2.oneOf != null) {
|
|
1807
|
-
jsonSchema2.oneOf = jsonSchema2.oneOf.map(visit);
|
|
1808
|
-
}
|
|
1809
|
-
const { definitions } = jsonSchema2;
|
|
1810
|
-
if (definitions != null) {
|
|
1811
|
-
for (const key of Object.keys(definitions)) {
|
|
1812
|
-
definitions[key] = visit(definitions[key]);
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
return jsonSchema2;
|
|
1816
|
-
}
|
|
1817
|
-
function visit(def) {
|
|
1818
|
-
if (typeof def === "boolean") return def;
|
|
1819
|
-
return addAdditionalPropertiesToJsonSchema(def);
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
// src/to-json-schema/zod3-to-json-schema/options.ts
|
|
1823
|
-
var ignoreOverride = /* @__PURE__ */ Symbol(
|
|
1824
|
-
"Let zodToJsonSchema decide on which parser to use"
|
|
1825
|
-
);
|
|
1826
|
-
var defaultOptions = {
|
|
1827
|
-
name: void 0,
|
|
1828
|
-
$refStrategy: "root",
|
|
1829
|
-
basePath: ["#"],
|
|
1830
|
-
effectStrategy: "input",
|
|
1831
|
-
pipeStrategy: "all",
|
|
1832
|
-
dateStrategy: "format:date-time",
|
|
1833
|
-
mapStrategy: "entries",
|
|
1834
|
-
removeAdditionalStrategy: "passthrough",
|
|
1835
|
-
allowedAdditionalProperties: true,
|
|
1836
|
-
rejectedAdditionalProperties: false,
|
|
1837
|
-
definitionPath: "definitions",
|
|
1838
|
-
strictUnions: false,
|
|
1839
|
-
definitions: {},
|
|
1840
|
-
errorMessages: false,
|
|
1841
|
-
patternStrategy: "escape",
|
|
1842
|
-
applyRegexFlags: false,
|
|
1843
|
-
emailStrategy: "format:email",
|
|
1844
|
-
base64Strategy: "contentEncoding:base64",
|
|
1845
|
-
nameStrategy: "ref"
|
|
1846
|
-
};
|
|
1847
|
-
var getDefaultOptions = (options) => typeof options === "string" ? {
|
|
1848
|
-
...defaultOptions,
|
|
1849
|
-
name: options
|
|
1850
|
-
} : {
|
|
1851
|
-
...defaultOptions,
|
|
1852
|
-
...options
|
|
1853
|
-
};
|
|
1854
|
-
|
|
1855
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/any.ts
|
|
1856
|
-
function parseAnyDef() {
|
|
1857
|
-
return {};
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/array.ts
|
|
1861
|
-
function parseArrayDef(def, refs) {
|
|
1862
|
-
var _a3, _b3, _c;
|
|
1863
|
-
const res = {
|
|
1864
|
-
type: "array"
|
|
1865
|
-
};
|
|
1866
|
-
if (((_a3 = def.type) == null ? void 0 : _a3._def) && ((_c = (_b3 = def.type) == null ? void 0 : _b3._def) == null ? void 0 : _c.typeName) !== "ZodAny") {
|
|
1867
|
-
res.items = parseDef(def.type._def, {
|
|
1868
|
-
...refs,
|
|
1869
|
-
currentPath: [...refs.currentPath, "items"]
|
|
1870
|
-
});
|
|
1871
|
-
}
|
|
1872
|
-
if (def.minLength) {
|
|
1873
|
-
res.minItems = def.minLength.value;
|
|
1874
|
-
}
|
|
1875
|
-
if (def.maxLength) {
|
|
1876
|
-
res.maxItems = def.maxLength.value;
|
|
1877
|
-
}
|
|
1878
|
-
if (def.exactLength) {
|
|
1879
|
-
res.minItems = def.exactLength.value;
|
|
1880
|
-
res.maxItems = def.exactLength.value;
|
|
1881
|
-
}
|
|
1882
|
-
return res;
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/bigint.ts
|
|
1886
|
-
function parseBigintDef(def) {
|
|
1887
|
-
const res = {
|
|
1888
|
-
type: "integer",
|
|
1889
|
-
format: "int64"
|
|
1890
|
-
};
|
|
1891
|
-
if (!def.checks) return res;
|
|
1892
|
-
for (const check of def.checks) {
|
|
1893
|
-
switch (check.kind) {
|
|
1894
|
-
case "min":
|
|
1895
|
-
if (check.inclusive) {
|
|
1896
|
-
res.minimum = check.value;
|
|
1897
|
-
} else {
|
|
1898
|
-
res.exclusiveMinimum = check.value;
|
|
1899
|
-
}
|
|
1900
|
-
break;
|
|
1901
|
-
case "max":
|
|
1902
|
-
if (check.inclusive) {
|
|
1903
|
-
res.maximum = check.value;
|
|
1904
|
-
} else {
|
|
1905
|
-
res.exclusiveMaximum = check.value;
|
|
1906
|
-
}
|
|
1907
|
-
break;
|
|
1908
|
-
case "multipleOf":
|
|
1909
|
-
res.multipleOf = check.value;
|
|
1910
|
-
break;
|
|
1911
|
-
}
|
|
1912
|
-
}
|
|
1913
|
-
return res;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/boolean.ts
|
|
1917
|
-
function parseBooleanDef() {
|
|
1918
|
-
return { type: "boolean" };
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/branded.ts
|
|
1922
|
-
function parseBrandedDef(_def, refs) {
|
|
1923
|
-
return parseDef(_def.type._def, refs);
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/catch.ts
|
|
1927
|
-
var parseCatchDef = (def, refs) => {
|
|
1928
|
-
return parseDef(def.innerType._def, refs);
|
|
1929
|
-
};
|
|
1930
|
-
|
|
1931
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/date.ts
|
|
1932
|
-
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
1933
|
-
const strategy = overrideDateStrategy != null ? overrideDateStrategy : refs.dateStrategy;
|
|
1934
|
-
if (Array.isArray(strategy)) {
|
|
1935
|
-
return {
|
|
1936
|
-
anyOf: strategy.map((item) => parseDateDef(def, refs, item))
|
|
1937
|
-
};
|
|
1938
|
-
}
|
|
1939
|
-
switch (strategy) {
|
|
1940
|
-
case "string":
|
|
1941
|
-
case "format:date-time":
|
|
1942
|
-
return {
|
|
1943
|
-
type: "string",
|
|
1944
|
-
format: "date-time"
|
|
1945
|
-
};
|
|
1946
|
-
case "format:date":
|
|
1947
|
-
return {
|
|
1948
|
-
type: "string",
|
|
1949
|
-
format: "date"
|
|
1950
|
-
};
|
|
1951
|
-
case "integer":
|
|
1952
|
-
return integerDateParser(def);
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
var integerDateParser = (def) => {
|
|
1956
|
-
const res = {
|
|
1957
|
-
type: "integer",
|
|
1958
|
-
format: "unix-time"
|
|
1959
|
-
};
|
|
1960
|
-
for (const check of def.checks) {
|
|
1961
|
-
switch (check.kind) {
|
|
1962
|
-
case "min":
|
|
1963
|
-
res.minimum = check.value;
|
|
1964
|
-
break;
|
|
1965
|
-
case "max":
|
|
1966
|
-
res.maximum = check.value;
|
|
1967
|
-
break;
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
return res;
|
|
1971
|
-
};
|
|
1972
|
-
|
|
1973
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/default.ts
|
|
1974
|
-
function parseDefaultDef(_def, refs) {
|
|
1975
|
-
return {
|
|
1976
|
-
...parseDef(_def.innerType._def, refs),
|
|
1977
|
-
default: _def.defaultValue()
|
|
1978
|
-
};
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/effects.ts
|
|
1982
|
-
function parseEffectsDef(_def, refs) {
|
|
1983
|
-
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef();
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/enum.ts
|
|
1987
|
-
function parseEnumDef(def) {
|
|
1988
|
-
return {
|
|
1989
|
-
type: "string",
|
|
1990
|
-
enum: Array.from(def.values)
|
|
1991
|
-
};
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/intersection.ts
|
|
1995
|
-
var isJsonSchema7AllOfType = (type) => {
|
|
1996
|
-
if ("type" in type && type.type === "string") return false;
|
|
1997
|
-
return "allOf" in type;
|
|
1998
|
-
};
|
|
1999
|
-
function parseIntersectionDef(def, refs) {
|
|
2000
|
-
const allOf = [
|
|
2001
|
-
parseDef(def.left._def, {
|
|
2002
|
-
...refs,
|
|
2003
|
-
currentPath: [...refs.currentPath, "allOf", "0"]
|
|
2004
|
-
}),
|
|
2005
|
-
parseDef(def.right._def, {
|
|
2006
|
-
...refs,
|
|
2007
|
-
currentPath: [...refs.currentPath, "allOf", "1"]
|
|
2008
|
-
})
|
|
2009
|
-
].filter((x) => !!x);
|
|
2010
|
-
const mergedAllOf = [];
|
|
2011
|
-
allOf.forEach((schema) => {
|
|
2012
|
-
if (isJsonSchema7AllOfType(schema)) {
|
|
2013
|
-
mergedAllOf.push(...schema.allOf);
|
|
2014
|
-
} else {
|
|
2015
|
-
let nestedSchema = schema;
|
|
2016
|
-
if ("additionalProperties" in schema && schema.additionalProperties === false) {
|
|
2017
|
-
const { additionalProperties: _additionalProperties, ...rest } = schema;
|
|
2018
|
-
nestedSchema = rest;
|
|
2019
|
-
}
|
|
2020
|
-
mergedAllOf.push(nestedSchema);
|
|
2021
|
-
}
|
|
2022
|
-
});
|
|
2023
|
-
return mergedAllOf.length ? { allOf: mergedAllOf } : void 0;
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/literal.ts
|
|
2027
|
-
function parseLiteralDef(def) {
|
|
2028
|
-
const parsedType = typeof def.value;
|
|
2029
|
-
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
|
|
2030
|
-
return {
|
|
2031
|
-
type: Array.isArray(def.value) ? "array" : "object"
|
|
2032
|
-
};
|
|
2033
|
-
}
|
|
2034
|
-
return {
|
|
2035
|
-
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
2036
|
-
const: def.value
|
|
2037
|
-
};
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/string.ts
|
|
2041
|
-
var emojiRegex = void 0;
|
|
2042
|
-
var zodPatterns = {
|
|
2043
|
-
/**
|
|
2044
|
-
* `c` was changed to `[cC]` to replicate /i flag
|
|
2045
|
-
*/
|
|
2046
|
-
cuid: /^[cC][^\s-]{8,}$/,
|
|
2047
|
-
cuid2: /^[0-9a-z]+$/,
|
|
2048
|
-
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
2049
|
-
/**
|
|
2050
|
-
* `a-z` was added to replicate /i flag
|
|
2051
|
-
*/
|
|
2052
|
-
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
2053
|
-
/**
|
|
2054
|
-
* Constructed a valid Unicode RegExp
|
|
2055
|
-
*
|
|
2056
|
-
* Lazily instantiate since this type of regex isn't supported
|
|
2057
|
-
* in all envs (e.g. React Native).
|
|
2058
|
-
*
|
|
2059
|
-
* See:
|
|
2060
|
-
* https://github.com/colinhacks/zod/issues/2433
|
|
2061
|
-
* Fix in Zod:
|
|
2062
|
-
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
2063
|
-
*/
|
|
2064
|
-
emoji: () => {
|
|
2065
|
-
if (emojiRegex === void 0) {
|
|
2066
|
-
emojiRegex = RegExp(
|
|
2067
|
-
"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
|
|
2068
|
-
"u"
|
|
2069
|
-
);
|
|
2070
|
-
}
|
|
2071
|
-
return emojiRegex;
|
|
2072
|
-
},
|
|
2073
|
-
/**
|
|
2074
|
-
* Unused
|
|
2075
|
-
*/
|
|
2076
|
-
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
2077
|
-
/**
|
|
2078
|
-
* Unused
|
|
2079
|
-
*/
|
|
2080
|
-
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
2081
|
-
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
2082
|
-
/**
|
|
2083
|
-
* Unused
|
|
2084
|
-
*/
|
|
2085
|
-
ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
|
|
2086
|
-
ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
2087
|
-
base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
2088
|
-
base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
2089
|
-
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
2090
|
-
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
2091
|
-
};
|
|
2092
|
-
function parseStringDef(def, refs) {
|
|
2093
|
-
const res = {
|
|
2094
|
-
type: "string"
|
|
2095
|
-
};
|
|
2096
|
-
if (def.checks) {
|
|
2097
|
-
for (const check of def.checks) {
|
|
2098
|
-
switch (check.kind) {
|
|
2099
|
-
case "min":
|
|
2100
|
-
res.minLength = typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value;
|
|
2101
|
-
break;
|
|
2102
|
-
case "max":
|
|
2103
|
-
res.maxLength = typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value;
|
|
2104
|
-
break;
|
|
2105
|
-
case "email":
|
|
2106
|
-
switch (refs.emailStrategy) {
|
|
2107
|
-
case "format:email":
|
|
2108
|
-
addFormat(res, "email", check.message, refs);
|
|
2109
|
-
break;
|
|
2110
|
-
case "format:idn-email":
|
|
2111
|
-
addFormat(res, "idn-email", check.message, refs);
|
|
2112
|
-
break;
|
|
2113
|
-
case "pattern:zod":
|
|
2114
|
-
addPattern(res, zodPatterns.email, check.message, refs);
|
|
2115
|
-
break;
|
|
2116
|
-
}
|
|
2117
|
-
break;
|
|
2118
|
-
case "url":
|
|
2119
|
-
addFormat(res, "uri", check.message, refs);
|
|
2120
|
-
break;
|
|
2121
|
-
case "uuid":
|
|
2122
|
-
addFormat(res, "uuid", check.message, refs);
|
|
2123
|
-
break;
|
|
2124
|
-
case "regex":
|
|
2125
|
-
addPattern(res, check.regex, check.message, refs);
|
|
2126
|
-
break;
|
|
2127
|
-
case "cuid":
|
|
2128
|
-
addPattern(res, zodPatterns.cuid, check.message, refs);
|
|
2129
|
-
break;
|
|
2130
|
-
case "cuid2":
|
|
2131
|
-
addPattern(res, zodPatterns.cuid2, check.message, refs);
|
|
2132
|
-
break;
|
|
2133
|
-
case "startsWith":
|
|
2134
|
-
addPattern(
|
|
2135
|
-
res,
|
|
2136
|
-
RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`),
|
|
2137
|
-
check.message,
|
|
2138
|
-
refs
|
|
2139
|
-
);
|
|
2140
|
-
break;
|
|
2141
|
-
case "endsWith":
|
|
2142
|
-
addPattern(
|
|
2143
|
-
res,
|
|
2144
|
-
RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`),
|
|
2145
|
-
check.message,
|
|
2146
|
-
refs
|
|
2147
|
-
);
|
|
2148
|
-
break;
|
|
2149
|
-
case "datetime":
|
|
2150
|
-
addFormat(res, "date-time", check.message, refs);
|
|
2151
|
-
break;
|
|
2152
|
-
case "date":
|
|
2153
|
-
addFormat(res, "date", check.message, refs);
|
|
2154
|
-
break;
|
|
2155
|
-
case "time":
|
|
2156
|
-
addFormat(res, "time", check.message, refs);
|
|
2157
|
-
break;
|
|
2158
|
-
case "duration":
|
|
2159
|
-
addFormat(res, "duration", check.message, refs);
|
|
2160
|
-
break;
|
|
2161
|
-
case "length":
|
|
2162
|
-
res.minLength = typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value;
|
|
2163
|
-
res.maxLength = typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value;
|
|
2164
|
-
break;
|
|
2165
|
-
case "includes": {
|
|
2166
|
-
addPattern(
|
|
2167
|
-
res,
|
|
2168
|
-
RegExp(escapeLiteralCheckValue(check.value, refs)),
|
|
2169
|
-
check.message,
|
|
2170
|
-
refs
|
|
2171
|
-
);
|
|
2172
|
-
break;
|
|
2173
|
-
}
|
|
2174
|
-
case "ip": {
|
|
2175
|
-
if (check.version !== "v6") {
|
|
2176
|
-
addFormat(res, "ipv4", check.message, refs);
|
|
2177
|
-
}
|
|
2178
|
-
if (check.version !== "v4") {
|
|
2179
|
-
addFormat(res, "ipv6", check.message, refs);
|
|
2180
|
-
}
|
|
2181
|
-
break;
|
|
2182
|
-
}
|
|
2183
|
-
case "base64url":
|
|
2184
|
-
addPattern(res, zodPatterns.base64url, check.message, refs);
|
|
2185
|
-
break;
|
|
2186
|
-
case "jwt":
|
|
2187
|
-
addPattern(res, zodPatterns.jwt, check.message, refs);
|
|
2188
|
-
break;
|
|
2189
|
-
case "cidr": {
|
|
2190
|
-
if (check.version !== "v6") {
|
|
2191
|
-
addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);
|
|
2192
|
-
}
|
|
2193
|
-
if (check.version !== "v4") {
|
|
2194
|
-
addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);
|
|
2195
|
-
}
|
|
2196
|
-
break;
|
|
2197
|
-
}
|
|
2198
|
-
case "emoji":
|
|
2199
|
-
addPattern(res, zodPatterns.emoji(), check.message, refs);
|
|
2200
|
-
break;
|
|
2201
|
-
case "ulid": {
|
|
2202
|
-
addPattern(res, zodPatterns.ulid, check.message, refs);
|
|
2203
|
-
break;
|
|
2204
|
-
}
|
|
2205
|
-
case "base64": {
|
|
2206
|
-
switch (refs.base64Strategy) {
|
|
2207
|
-
case "format:binary": {
|
|
2208
|
-
addFormat(res, "binary", check.message, refs);
|
|
2209
|
-
break;
|
|
2210
|
-
}
|
|
2211
|
-
case "contentEncoding:base64": {
|
|
2212
|
-
res.contentEncoding = "base64";
|
|
2213
|
-
break;
|
|
2214
|
-
}
|
|
2215
|
-
case "pattern:zod": {
|
|
2216
|
-
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
2217
|
-
break;
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
break;
|
|
2221
|
-
}
|
|
2222
|
-
case "nanoid": {
|
|
2223
|
-
addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
2224
|
-
}
|
|
2225
|
-
case "toLowerCase":
|
|
2226
|
-
case "toUpperCase":
|
|
2227
|
-
case "trim":
|
|
2228
|
-
break;
|
|
2229
|
-
default:
|
|
2230
|
-
/* @__PURE__ */ ((_) => {
|
|
2231
|
-
})(check);
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
|
-
return res;
|
|
2236
|
-
}
|
|
2237
|
-
function escapeLiteralCheckValue(literal, refs) {
|
|
2238
|
-
return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal;
|
|
2239
|
-
}
|
|
2240
|
-
var ALPHA_NUMERIC = new Set(
|
|
2241
|
-
"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"
|
|
2242
|
-
);
|
|
2243
|
-
function escapeNonAlphaNumeric(source) {
|
|
2244
|
-
let result = "";
|
|
2245
|
-
for (let i = 0; i < source.length; i++) {
|
|
2246
|
-
if (!ALPHA_NUMERIC.has(source[i])) {
|
|
2247
|
-
result += "\\";
|
|
2248
|
-
}
|
|
2249
|
-
result += source[i];
|
|
2250
|
-
}
|
|
2251
|
-
return result;
|
|
2252
|
-
}
|
|
2253
|
-
function addFormat(schema, value, message, refs) {
|
|
2254
|
-
var _a3;
|
|
2255
|
-
if (schema.format || ((_a3 = schema.anyOf) == null ? void 0 : _a3.some((x) => x.format))) {
|
|
2256
|
-
if (!schema.anyOf) {
|
|
2257
|
-
schema.anyOf = [];
|
|
2258
|
-
}
|
|
2259
|
-
if (schema.format) {
|
|
2260
|
-
schema.anyOf.push({
|
|
2261
|
-
format: schema.format
|
|
2262
|
-
});
|
|
2263
|
-
delete schema.format;
|
|
2264
|
-
}
|
|
2265
|
-
schema.anyOf.push({
|
|
2266
|
-
format: value,
|
|
2267
|
-
...message && refs.errorMessages && { errorMessage: { format: message } }
|
|
2268
|
-
});
|
|
2269
|
-
} else {
|
|
2270
|
-
schema.format = value;
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2273
|
-
function addPattern(schema, regex, message, refs) {
|
|
2274
|
-
var _a3;
|
|
2275
|
-
if (schema.pattern || ((_a3 = schema.allOf) == null ? void 0 : _a3.some((x) => x.pattern))) {
|
|
2276
|
-
if (!schema.allOf) {
|
|
2277
|
-
schema.allOf = [];
|
|
2278
|
-
}
|
|
2279
|
-
if (schema.pattern) {
|
|
2280
|
-
schema.allOf.push({
|
|
2281
|
-
pattern: schema.pattern
|
|
2282
|
-
});
|
|
2283
|
-
delete schema.pattern;
|
|
2284
|
-
}
|
|
2285
|
-
schema.allOf.push({
|
|
2286
|
-
pattern: stringifyRegExpWithFlags(regex, refs),
|
|
2287
|
-
...message && refs.errorMessages && { errorMessage: { pattern: message } }
|
|
2288
|
-
});
|
|
2289
|
-
} else {
|
|
2290
|
-
schema.pattern = stringifyRegExpWithFlags(regex, refs);
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
function stringifyRegExpWithFlags(regex, refs) {
|
|
2294
|
-
var _a3;
|
|
2295
|
-
if (!refs.applyRegexFlags || !regex.flags) {
|
|
2296
|
-
return regex.source;
|
|
2297
|
-
}
|
|
2298
|
-
const flags = {
|
|
2299
|
-
i: regex.flags.includes("i"),
|
|
2300
|
-
// Case-insensitive
|
|
2301
|
-
m: regex.flags.includes("m"),
|
|
2302
|
-
// `^` and `$` matches adjacent to newline characters
|
|
2303
|
-
s: regex.flags.includes("s")
|
|
2304
|
-
// `.` matches newlines
|
|
2305
|
-
};
|
|
2306
|
-
const source = flags.i ? regex.source.toLowerCase() : regex.source;
|
|
2307
|
-
let pattern = "";
|
|
2308
|
-
let isEscaped = false;
|
|
2309
|
-
let inCharGroup = false;
|
|
2310
|
-
let inCharRange = false;
|
|
2311
|
-
for (let i = 0; i < source.length; i++) {
|
|
2312
|
-
if (isEscaped) {
|
|
2313
|
-
pattern += source[i];
|
|
2314
|
-
isEscaped = false;
|
|
2315
|
-
continue;
|
|
2316
|
-
}
|
|
2317
|
-
if (flags.i) {
|
|
2318
|
-
if (inCharGroup) {
|
|
2319
|
-
if (source[i].match(/[a-z]/)) {
|
|
2320
|
-
if (inCharRange) {
|
|
2321
|
-
pattern += source[i];
|
|
2322
|
-
pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();
|
|
2323
|
-
inCharRange = false;
|
|
2324
|
-
} else if (source[i + 1] === "-" && ((_a3 = source[i + 2]) == null ? void 0 : _a3.match(/[a-z]/))) {
|
|
2325
|
-
pattern += source[i];
|
|
2326
|
-
inCharRange = true;
|
|
2327
|
-
} else {
|
|
2328
|
-
pattern += `${source[i]}${source[i].toUpperCase()}`;
|
|
2329
|
-
}
|
|
2330
|
-
continue;
|
|
2331
|
-
}
|
|
2332
|
-
} else if (source[i].match(/[a-z]/)) {
|
|
2333
|
-
pattern += `[${source[i]}${source[i].toUpperCase()}]`;
|
|
2334
|
-
continue;
|
|
2335
|
-
}
|
|
2336
|
-
}
|
|
2337
|
-
if (flags.m) {
|
|
2338
|
-
if (source[i] === "^") {
|
|
2339
|
-
pattern += `(^|(?<=[\r
|
|
2340
|
-
]))`;
|
|
2341
|
-
continue;
|
|
2342
|
-
} else if (source[i] === "$") {
|
|
2343
|
-
pattern += `($|(?=[\r
|
|
2344
|
-
]))`;
|
|
2345
|
-
continue;
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
if (flags.s && source[i] === ".") {
|
|
2349
|
-
pattern += inCharGroup ? `${source[i]}\r
|
|
2350
|
-
` : `[${source[i]}\r
|
|
2351
|
-
]`;
|
|
2352
|
-
continue;
|
|
2353
|
-
}
|
|
2354
|
-
pattern += source[i];
|
|
2355
|
-
if (source[i] === "\\") {
|
|
2356
|
-
isEscaped = true;
|
|
2357
|
-
} else if (inCharGroup && source[i] === "]") {
|
|
2358
|
-
inCharGroup = false;
|
|
2359
|
-
} else if (!inCharGroup && source[i] === "[") {
|
|
2360
|
-
inCharGroup = true;
|
|
2361
|
-
}
|
|
2362
|
-
}
|
|
2363
|
-
try {
|
|
2364
|
-
new RegExp(pattern);
|
|
2365
|
-
} catch (e) {
|
|
2366
|
-
console.warn(
|
|
2367
|
-
`Could not convert regex pattern at ${refs.currentPath.join(
|
|
2368
|
-
"/"
|
|
2369
|
-
)} to a flag-independent form! Falling back to the flag-ignorant source`
|
|
2370
|
-
);
|
|
2371
|
-
return regex.source;
|
|
2372
|
-
}
|
|
2373
|
-
return pattern;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/record.ts
|
|
2377
|
-
function parseRecordDef(def, refs) {
|
|
2378
|
-
var _a3, _b3, _c, _d, _e, _f;
|
|
2379
|
-
const schema = {
|
|
2380
|
-
type: "object",
|
|
2381
|
-
additionalProperties: (_a3 = parseDef(def.valueType._def, {
|
|
2382
|
-
...refs,
|
|
2383
|
-
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
2384
|
-
})) != null ? _a3 : refs.allowedAdditionalProperties
|
|
2385
|
-
};
|
|
2386
|
-
if (((_b3 = def.keyType) == null ? void 0 : _b3._def.typeName) === "ZodString" && ((_c = def.keyType._def.checks) == null ? void 0 : _c.length)) {
|
|
2387
|
-
const { type: _type, ...keyType } = parseStringDef(def.keyType._def, refs);
|
|
2388
|
-
return {
|
|
2389
|
-
...schema,
|
|
2390
|
-
propertyNames: keyType
|
|
2391
|
-
};
|
|
2392
|
-
} else if (((_d = def.keyType) == null ? void 0 : _d._def.typeName) === "ZodEnum") {
|
|
2393
|
-
return {
|
|
2394
|
-
...schema,
|
|
2395
|
-
propertyNames: {
|
|
2396
|
-
enum: def.keyType._def.values
|
|
2397
|
-
}
|
|
2398
|
-
};
|
|
2399
|
-
} else if (((_e = def.keyType) == null ? void 0 : _e._def.typeName) === "ZodBranded" && def.keyType._def.type._def.typeName === "ZodString" && ((_f = def.keyType._def.type._def.checks) == null ? void 0 : _f.length)) {
|
|
2400
|
-
const { type: _type, ...keyType } = parseBrandedDef(
|
|
2401
|
-
def.keyType._def,
|
|
2402
|
-
refs
|
|
2403
|
-
);
|
|
2404
|
-
return {
|
|
2405
|
-
...schema,
|
|
2406
|
-
propertyNames: keyType
|
|
2407
|
-
};
|
|
2408
|
-
}
|
|
2409
|
-
return schema;
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/map.ts
|
|
2413
|
-
function parseMapDef(def, refs) {
|
|
2414
|
-
if (refs.mapStrategy === "record") {
|
|
2415
|
-
return parseRecordDef(def, refs);
|
|
2416
|
-
}
|
|
2417
|
-
const keys = parseDef(def.keyType._def, {
|
|
2418
|
-
...refs,
|
|
2419
|
-
currentPath: [...refs.currentPath, "items", "items", "0"]
|
|
2420
|
-
}) || parseAnyDef();
|
|
2421
|
-
const values = parseDef(def.valueType._def, {
|
|
2422
|
-
...refs,
|
|
2423
|
-
currentPath: [...refs.currentPath, "items", "items", "1"]
|
|
2424
|
-
}) || parseAnyDef();
|
|
2425
|
-
return {
|
|
2426
|
-
type: "array",
|
|
2427
|
-
maxItems: 125,
|
|
2428
|
-
items: {
|
|
2429
|
-
type: "array",
|
|
2430
|
-
items: [keys, values],
|
|
2431
|
-
minItems: 2,
|
|
2432
|
-
maxItems: 2
|
|
2433
|
-
}
|
|
2434
|
-
};
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/native-enum.ts
|
|
2438
|
-
function parseNativeEnumDef(def) {
|
|
2439
|
-
const object = def.values;
|
|
2440
|
-
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
2441
|
-
return typeof object[object[key]] !== "number";
|
|
2442
|
-
});
|
|
2443
|
-
const actualValues = actualKeys.map((key) => object[key]);
|
|
2444
|
-
const parsedTypes = Array.from(
|
|
2445
|
-
new Set(actualValues.map((values) => typeof values))
|
|
2446
|
-
);
|
|
2447
|
-
return {
|
|
2448
|
-
type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
2449
|
-
enum: actualValues
|
|
2450
|
-
};
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/never.ts
|
|
2454
|
-
function parseNeverDef() {
|
|
2455
|
-
return { not: parseAnyDef() };
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/null.ts
|
|
2459
|
-
function parseNullDef() {
|
|
2460
|
-
return {
|
|
2461
|
-
type: "null"
|
|
2462
|
-
};
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/union.ts
|
|
2466
|
-
var primitiveMappings = {
|
|
2467
|
-
ZodString: "string",
|
|
2468
|
-
ZodNumber: "number",
|
|
2469
|
-
ZodBigInt: "integer",
|
|
2470
|
-
ZodBoolean: "boolean",
|
|
2471
|
-
ZodNull: "null"
|
|
2472
|
-
};
|
|
2473
|
-
function parseUnionDef(def, refs) {
|
|
2474
|
-
const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
|
|
2475
|
-
if (options.every(
|
|
2476
|
-
(x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length)
|
|
2477
|
-
)) {
|
|
2478
|
-
const types = options.reduce((types2, x) => {
|
|
2479
|
-
const type = primitiveMappings[x._def.typeName];
|
|
2480
|
-
return type && !types2.includes(type) ? [...types2, type] : types2;
|
|
2481
|
-
}, []);
|
|
2482
|
-
return {
|
|
2483
|
-
type: types.length > 1 ? types : types[0]
|
|
2484
|
-
};
|
|
2485
|
-
} else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
|
|
2486
|
-
const types = options.reduce(
|
|
2487
|
-
(acc, x) => {
|
|
2488
|
-
const type = typeof x._def.value;
|
|
2489
|
-
switch (type) {
|
|
2490
|
-
case "string":
|
|
2491
|
-
case "number":
|
|
2492
|
-
case "boolean":
|
|
2493
|
-
return [...acc, type];
|
|
2494
|
-
case "bigint":
|
|
2495
|
-
return [...acc, "integer"];
|
|
2496
|
-
case "object":
|
|
2497
|
-
if (x._def.value === null) return [...acc, "null"];
|
|
2498
|
-
case "symbol":
|
|
2499
|
-
case "undefined":
|
|
2500
|
-
case "function":
|
|
2501
|
-
default:
|
|
2502
|
-
return acc;
|
|
2503
|
-
}
|
|
2504
|
-
},
|
|
2505
|
-
[]
|
|
2506
|
-
);
|
|
2507
|
-
if (types.length === options.length) {
|
|
2508
|
-
const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);
|
|
2509
|
-
return {
|
|
2510
|
-
type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
|
|
2511
|
-
enum: options.reduce(
|
|
2512
|
-
(acc, x) => {
|
|
2513
|
-
return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
|
|
2514
|
-
},
|
|
2515
|
-
[]
|
|
2516
|
-
)
|
|
2517
|
-
};
|
|
2518
|
-
}
|
|
2519
|
-
} else if (options.every((x) => x._def.typeName === "ZodEnum")) {
|
|
2520
|
-
return {
|
|
2521
|
-
type: "string",
|
|
2522
|
-
enum: options.reduce(
|
|
2523
|
-
(acc, x) => [
|
|
2524
|
-
...acc,
|
|
2525
|
-
...x._def.values.filter((x2) => !acc.includes(x2))
|
|
2526
|
-
],
|
|
2527
|
-
[]
|
|
2528
|
-
)
|
|
2529
|
-
};
|
|
2530
|
-
}
|
|
2531
|
-
return asAnyOf(def, refs);
|
|
2532
|
-
}
|
|
2533
|
-
var asAnyOf = (def, refs) => {
|
|
2534
|
-
const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map(
|
|
2535
|
-
(x, i) => parseDef(x._def, {
|
|
2536
|
-
...refs,
|
|
2537
|
-
currentPath: [...refs.currentPath, "anyOf", `${i}`]
|
|
2538
|
-
})
|
|
2539
|
-
).filter(
|
|
2540
|
-
(x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0)
|
|
2541
|
-
);
|
|
2542
|
-
return anyOf.length ? { anyOf } : void 0;
|
|
2543
|
-
};
|
|
2544
|
-
|
|
2545
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/nullable.ts
|
|
2546
|
-
function parseNullableDef(def, refs) {
|
|
2547
|
-
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(
|
|
2548
|
-
def.innerType._def.typeName
|
|
2549
|
-
) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
2550
|
-
return {
|
|
2551
|
-
type: [
|
|
2552
|
-
primitiveMappings[def.innerType._def.typeName],
|
|
2553
|
-
"null"
|
|
2554
|
-
]
|
|
2555
|
-
};
|
|
2556
|
-
}
|
|
2557
|
-
const base = parseDef(def.innerType._def, {
|
|
2558
|
-
...refs,
|
|
2559
|
-
currentPath: [...refs.currentPath, "anyOf", "0"]
|
|
2560
|
-
});
|
|
2561
|
-
return base && { anyOf: [base, { type: "null" }] };
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/number.ts
|
|
2565
|
-
function parseNumberDef(def) {
|
|
2566
|
-
const res = {
|
|
2567
|
-
type: "number"
|
|
2568
|
-
};
|
|
2569
|
-
if (!def.checks) return res;
|
|
2570
|
-
for (const check of def.checks) {
|
|
2571
|
-
switch (check.kind) {
|
|
2572
|
-
case "int":
|
|
2573
|
-
res.type = "integer";
|
|
2574
|
-
break;
|
|
2575
|
-
case "min":
|
|
2576
|
-
if (check.inclusive) {
|
|
2577
|
-
res.minimum = check.value;
|
|
2578
|
-
} else {
|
|
2579
|
-
res.exclusiveMinimum = check.value;
|
|
2580
|
-
}
|
|
2581
|
-
break;
|
|
2582
|
-
case "max":
|
|
2583
|
-
if (check.inclusive) {
|
|
2584
|
-
res.maximum = check.value;
|
|
2585
|
-
} else {
|
|
2586
|
-
res.exclusiveMaximum = check.value;
|
|
2587
|
-
}
|
|
2588
|
-
break;
|
|
2589
|
-
case "multipleOf":
|
|
2590
|
-
res.multipleOf = check.value;
|
|
2591
|
-
break;
|
|
2592
|
-
}
|
|
2593
|
-
}
|
|
2594
|
-
return res;
|
|
2595
|
-
}
|
|
2596
|
-
|
|
2597
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/object.ts
|
|
2598
|
-
function parseObjectDef(def, refs) {
|
|
2599
|
-
const result = {
|
|
2600
|
-
type: "object",
|
|
2601
|
-
properties: {}
|
|
2602
|
-
};
|
|
2603
|
-
const required = [];
|
|
2604
|
-
const shape = def.shape();
|
|
2605
|
-
for (const propName in shape) {
|
|
2606
|
-
let propDef = shape[propName];
|
|
2607
|
-
if (propDef === void 0 || propDef._def === void 0) {
|
|
2608
|
-
continue;
|
|
2609
|
-
}
|
|
2610
|
-
const propOptional = safeIsOptional(propDef);
|
|
2611
|
-
const parsedDef = parseDef(propDef._def, {
|
|
2612
|
-
...refs,
|
|
2613
|
-
currentPath: [...refs.currentPath, "properties", propName],
|
|
2614
|
-
propertyPath: [...refs.currentPath, "properties", propName]
|
|
2615
|
-
});
|
|
2616
|
-
if (parsedDef === void 0) {
|
|
2617
|
-
continue;
|
|
2618
|
-
}
|
|
2619
|
-
result.properties[propName] = parsedDef;
|
|
2620
|
-
if (!propOptional) {
|
|
2621
|
-
required.push(propName);
|
|
2622
|
-
}
|
|
2623
|
-
}
|
|
2624
|
-
if (required.length) {
|
|
2625
|
-
result.required = required;
|
|
2626
|
-
}
|
|
2627
|
-
const additionalProperties = decideAdditionalProperties(def, refs);
|
|
2628
|
-
if (additionalProperties !== void 0) {
|
|
2629
|
-
result.additionalProperties = additionalProperties;
|
|
2630
|
-
}
|
|
2631
|
-
return result;
|
|
2632
|
-
}
|
|
2633
|
-
function decideAdditionalProperties(def, refs) {
|
|
2634
|
-
if (def.catchall._def.typeName !== "ZodNever") {
|
|
2635
|
-
return parseDef(def.catchall._def, {
|
|
2636
|
-
...refs,
|
|
2637
|
-
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
2638
|
-
});
|
|
2639
|
-
}
|
|
2640
|
-
switch (def.unknownKeys) {
|
|
2641
|
-
case "passthrough":
|
|
2642
|
-
return refs.allowedAdditionalProperties;
|
|
2643
|
-
case "strict":
|
|
2644
|
-
return refs.rejectedAdditionalProperties;
|
|
2645
|
-
case "strip":
|
|
2646
|
-
return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
|
|
2647
|
-
}
|
|
2648
|
-
}
|
|
2649
|
-
function safeIsOptional(schema) {
|
|
2650
|
-
try {
|
|
2651
|
-
return schema.isOptional();
|
|
2652
|
-
} catch (e) {
|
|
2653
|
-
return true;
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/optional.ts
|
|
2658
|
-
var parseOptionalDef = (def, refs) => {
|
|
2659
|
-
var _a3;
|
|
2660
|
-
if (refs.currentPath.toString() === ((_a3 = refs.propertyPath) == null ? void 0 : _a3.toString())) {
|
|
2661
|
-
return parseDef(def.innerType._def, refs);
|
|
2662
|
-
}
|
|
2663
|
-
const innerSchema = parseDef(def.innerType._def, {
|
|
2664
|
-
...refs,
|
|
2665
|
-
currentPath: [...refs.currentPath, "anyOf", "1"]
|
|
2666
|
-
});
|
|
2667
|
-
return innerSchema ? { anyOf: [{ not: parseAnyDef() }, innerSchema] } : parseAnyDef();
|
|
2668
|
-
};
|
|
2669
|
-
|
|
2670
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/pipeline.ts
|
|
2671
|
-
var parsePipelineDef = (def, refs) => {
|
|
2672
|
-
if (refs.pipeStrategy === "input") {
|
|
2673
|
-
return parseDef(def.in._def, refs);
|
|
2674
|
-
} else if (refs.pipeStrategy === "output") {
|
|
2675
|
-
return parseDef(def.out._def, refs);
|
|
2676
|
-
}
|
|
2677
|
-
const inputSchema = parseDef(def.in._def, {
|
|
2678
|
-
...refs,
|
|
2679
|
-
currentPath: [...refs.currentPath, "allOf", "0"]
|
|
2680
|
-
});
|
|
2681
|
-
const outputSchema = parseDef(def.out._def, {
|
|
2682
|
-
...refs,
|
|
2683
|
-
currentPath: [...refs.currentPath, "allOf", inputSchema ? "1" : "0"]
|
|
2684
|
-
});
|
|
2685
|
-
return {
|
|
2686
|
-
allOf: [inputSchema, outputSchema].filter(
|
|
2687
|
-
(schema) => schema !== void 0
|
|
2688
|
-
)
|
|
2689
|
-
};
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2692
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/promise.ts
|
|
2693
|
-
function parsePromiseDef(def, refs) {
|
|
2694
|
-
return parseDef(def.type._def, refs);
|
|
2695
|
-
}
|
|
2696
|
-
|
|
2697
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/set.ts
|
|
2698
|
-
function parseSetDef(def, refs) {
|
|
2699
|
-
const items = parseDef(def.valueType._def, {
|
|
2700
|
-
...refs,
|
|
2701
|
-
currentPath: [...refs.currentPath, "items"]
|
|
2702
|
-
});
|
|
2703
|
-
const schema = {
|
|
2704
|
-
type: "array",
|
|
2705
|
-
uniqueItems: true,
|
|
2706
|
-
items
|
|
2707
|
-
};
|
|
2708
|
-
if (def.minSize) {
|
|
2709
|
-
schema.minItems = def.minSize.value;
|
|
2710
|
-
}
|
|
2711
|
-
if (def.maxSize) {
|
|
2712
|
-
schema.maxItems = def.maxSize.value;
|
|
2713
|
-
}
|
|
2714
|
-
return schema;
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/tuple.ts
|
|
2718
|
-
function parseTupleDef(def, refs) {
|
|
2719
|
-
if (def.rest) {
|
|
2720
|
-
return {
|
|
2721
|
-
type: "array",
|
|
2722
|
-
minItems: def.items.length,
|
|
2723
|
-
items: def.items.map(
|
|
2724
|
-
(x, i) => parseDef(x._def, {
|
|
2725
|
-
...refs,
|
|
2726
|
-
currentPath: [...refs.currentPath, "items", `${i}`]
|
|
2727
|
-
})
|
|
2728
|
-
).reduce(
|
|
2729
|
-
(acc, x) => x === void 0 ? acc : [...acc, x],
|
|
2730
|
-
[]
|
|
2731
|
-
),
|
|
2732
|
-
additionalItems: parseDef(def.rest._def, {
|
|
2733
|
-
...refs,
|
|
2734
|
-
currentPath: [...refs.currentPath, "additionalItems"]
|
|
2735
|
-
})
|
|
2736
|
-
};
|
|
2737
|
-
} else {
|
|
2738
|
-
return {
|
|
2739
|
-
type: "array",
|
|
2740
|
-
minItems: def.items.length,
|
|
2741
|
-
maxItems: def.items.length,
|
|
2742
|
-
items: def.items.map(
|
|
2743
|
-
(x, i) => parseDef(x._def, {
|
|
2744
|
-
...refs,
|
|
2745
|
-
currentPath: [...refs.currentPath, "items", `${i}`]
|
|
2746
|
-
})
|
|
2747
|
-
).reduce(
|
|
2748
|
-
(acc, x) => x === void 0 ? acc : [...acc, x],
|
|
2749
|
-
[]
|
|
2750
|
-
)
|
|
2751
|
-
};
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/undefined.ts
|
|
2756
|
-
function parseUndefinedDef() {
|
|
2757
|
-
return {
|
|
2758
|
-
not: parseAnyDef()
|
|
2759
|
-
};
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/unknown.ts
|
|
2763
|
-
function parseUnknownDef() {
|
|
2764
|
-
return parseAnyDef();
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
// src/to-json-schema/zod3-to-json-schema/parsers/readonly.ts
|
|
2768
|
-
var parseReadonlyDef = (def, refs) => {
|
|
2769
|
-
return parseDef(def.innerType._def, refs);
|
|
2770
|
-
};
|
|
2771
|
-
|
|
2772
|
-
// src/to-json-schema/zod3-to-json-schema/select-parser.ts
|
|
2773
|
-
var selectParser = (def, typeName, refs) => {
|
|
2774
|
-
switch (typeName) {
|
|
2775
|
-
case "ZodString":
|
|
2776
|
-
return parseStringDef(def, refs);
|
|
2777
|
-
case "ZodNumber":
|
|
2778
|
-
return parseNumberDef(def);
|
|
2779
|
-
case "ZodObject":
|
|
2780
|
-
return parseObjectDef(def, refs);
|
|
2781
|
-
case "ZodBigInt":
|
|
2782
|
-
return parseBigintDef(def);
|
|
2783
|
-
case "ZodBoolean":
|
|
2784
|
-
return parseBooleanDef();
|
|
2785
|
-
case "ZodDate":
|
|
2786
|
-
return parseDateDef(def, refs);
|
|
2787
|
-
case "ZodUndefined":
|
|
2788
|
-
return parseUndefinedDef();
|
|
2789
|
-
case "ZodNull":
|
|
2790
|
-
return parseNullDef();
|
|
2791
|
-
case "ZodArray":
|
|
2792
|
-
return parseArrayDef(def, refs);
|
|
2793
|
-
case "ZodUnion":
|
|
2794
|
-
case "ZodDiscriminatedUnion":
|
|
2795
|
-
return parseUnionDef(def, refs);
|
|
2796
|
-
case "ZodIntersection":
|
|
2797
|
-
return parseIntersectionDef(def, refs);
|
|
2798
|
-
case "ZodTuple":
|
|
2799
|
-
return parseTupleDef(def, refs);
|
|
2800
|
-
case "ZodRecord":
|
|
2801
|
-
return parseRecordDef(def, refs);
|
|
2802
|
-
case "ZodLiteral":
|
|
2803
|
-
return parseLiteralDef(def);
|
|
2804
|
-
case "ZodEnum":
|
|
2805
|
-
return parseEnumDef(def);
|
|
2806
|
-
case "ZodNativeEnum":
|
|
2807
|
-
return parseNativeEnumDef(def);
|
|
2808
|
-
case "ZodNullable":
|
|
2809
|
-
return parseNullableDef(def, refs);
|
|
2810
|
-
case "ZodOptional":
|
|
2811
|
-
return parseOptionalDef(def, refs);
|
|
2812
|
-
case "ZodMap":
|
|
2813
|
-
return parseMapDef(def, refs);
|
|
2814
|
-
case "ZodSet":
|
|
2815
|
-
return parseSetDef(def, refs);
|
|
2816
|
-
case "ZodLazy":
|
|
2817
|
-
return () => def.getter()._def;
|
|
2818
|
-
case "ZodPromise":
|
|
2819
|
-
return parsePromiseDef(def, refs);
|
|
2820
|
-
case "ZodNaN":
|
|
2821
|
-
case "ZodNever":
|
|
2822
|
-
return parseNeverDef();
|
|
2823
|
-
case "ZodEffects":
|
|
2824
|
-
return parseEffectsDef(def, refs);
|
|
2825
|
-
case "ZodAny":
|
|
2826
|
-
return parseAnyDef();
|
|
2827
|
-
case "ZodUnknown":
|
|
2828
|
-
return parseUnknownDef();
|
|
2829
|
-
case "ZodDefault":
|
|
2830
|
-
return parseDefaultDef(def, refs);
|
|
2831
|
-
case "ZodBranded":
|
|
2832
|
-
return parseBrandedDef(def, refs);
|
|
2833
|
-
case "ZodReadonly":
|
|
2834
|
-
return parseReadonlyDef(def, refs);
|
|
2835
|
-
case "ZodCatch":
|
|
2836
|
-
return parseCatchDef(def, refs);
|
|
2837
|
-
case "ZodPipeline":
|
|
2838
|
-
return parsePipelineDef(def, refs);
|
|
2839
|
-
case "ZodFunction":
|
|
2840
|
-
case "ZodVoid":
|
|
2841
|
-
case "ZodSymbol":
|
|
2842
|
-
return void 0;
|
|
2843
|
-
default:
|
|
2844
|
-
return /* @__PURE__ */ ((_) => void 0)(typeName);
|
|
2845
|
-
}
|
|
2846
|
-
};
|
|
2847
|
-
|
|
2848
|
-
// src/to-json-schema/zod3-to-json-schema/get-relative-path.ts
|
|
2849
|
-
var getRelativePath = (pathA, pathB) => {
|
|
2850
|
-
let i = 0;
|
|
2851
|
-
for (; i < pathA.length && i < pathB.length; i++) {
|
|
2852
|
-
if (pathA[i] !== pathB[i]) break;
|
|
2853
|
-
}
|
|
2854
|
-
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
2855
|
-
};
|
|
2856
|
-
|
|
2857
|
-
// src/to-json-schema/zod3-to-json-schema/parse-def.ts
|
|
2858
|
-
function parseDef(def, refs, forceResolution = false) {
|
|
2859
|
-
var _a3;
|
|
2860
|
-
const seenItem = refs.seen.get(def);
|
|
2861
|
-
if (refs.override) {
|
|
2862
|
-
const overrideResult = (_a3 = refs.override) == null ? void 0 : _a3.call(
|
|
2863
|
-
refs,
|
|
2864
|
-
def,
|
|
2865
|
-
refs,
|
|
2866
|
-
seenItem,
|
|
2867
|
-
forceResolution
|
|
2868
|
-
);
|
|
2869
|
-
if (overrideResult !== ignoreOverride) {
|
|
2870
|
-
return overrideResult;
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
if (seenItem && !forceResolution) {
|
|
2874
|
-
const seenSchema = get$ref(seenItem, refs);
|
|
2875
|
-
if (seenSchema !== void 0) {
|
|
2876
|
-
return seenSchema;
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
const newItem = { def, path: refs.currentPath, jsonSchema: void 0 };
|
|
2880
|
-
refs.seen.set(def, newItem);
|
|
2881
|
-
const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);
|
|
2882
|
-
const jsonSchema2 = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
|
|
2883
|
-
if (jsonSchema2) {
|
|
2884
|
-
addMeta(def, refs, jsonSchema2);
|
|
2885
|
-
}
|
|
2886
|
-
if (refs.postProcess) {
|
|
2887
|
-
const postProcessResult = refs.postProcess(jsonSchema2, def, refs);
|
|
2888
|
-
newItem.jsonSchema = jsonSchema2;
|
|
2889
|
-
return postProcessResult;
|
|
2890
|
-
}
|
|
2891
|
-
newItem.jsonSchema = jsonSchema2;
|
|
2892
|
-
return jsonSchema2;
|
|
2893
|
-
}
|
|
2894
|
-
var get$ref = (item, refs) => {
|
|
2895
|
-
switch (refs.$refStrategy) {
|
|
2896
|
-
case "root":
|
|
2897
|
-
return { $ref: item.path.join("/") };
|
|
2898
|
-
case "relative":
|
|
2899
|
-
return { $ref: getRelativePath(refs.currentPath, item.path) };
|
|
2900
|
-
case "none":
|
|
2901
|
-
case "seen": {
|
|
2902
|
-
if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {
|
|
2903
|
-
console.warn(
|
|
2904
|
-
`Recursive reference detected at ${refs.currentPath.join(
|
|
2905
|
-
"/"
|
|
2906
|
-
)}! Defaulting to any`
|
|
2907
|
-
);
|
|
2908
|
-
return parseAnyDef();
|
|
2909
|
-
}
|
|
2910
|
-
return refs.$refStrategy === "seen" ? parseAnyDef() : void 0;
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
};
|
|
2914
|
-
var addMeta = (def, refs, jsonSchema2) => {
|
|
2915
|
-
if (def.description) {
|
|
2916
|
-
jsonSchema2.description = def.description;
|
|
2917
|
-
}
|
|
2918
|
-
return jsonSchema2;
|
|
2919
|
-
};
|
|
2920
|
-
|
|
2921
|
-
// src/to-json-schema/zod3-to-json-schema/refs.ts
|
|
2922
|
-
var getRefs = (options) => {
|
|
2923
|
-
const _options = getDefaultOptions(options);
|
|
2924
|
-
const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
2925
|
-
return {
|
|
2926
|
-
..._options,
|
|
2927
|
-
currentPath,
|
|
2928
|
-
propertyPath: void 0,
|
|
2929
|
-
seen: new Map(
|
|
2930
|
-
Object.entries(_options.definitions).map(([name3, def]) => [
|
|
2931
|
-
def._def,
|
|
2932
|
-
{
|
|
2933
|
-
def: def._def,
|
|
2934
|
-
path: [..._options.basePath, _options.definitionPath, name3],
|
|
2935
|
-
// Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
|
|
2936
|
-
jsonSchema: void 0
|
|
2937
|
-
}
|
|
2938
|
-
])
|
|
2939
|
-
)
|
|
2940
|
-
};
|
|
2941
|
-
};
|
|
2942
|
-
|
|
2943
|
-
// src/to-json-schema/zod3-to-json-schema/zod3-to-json-schema.ts
|
|
2944
|
-
var zod3ToJsonSchema = (schema, options) => {
|
|
2945
|
-
var _a3;
|
|
2946
|
-
const refs = getRefs(options);
|
|
2947
|
-
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce(
|
|
2948
|
-
(acc, [name4, schema2]) => {
|
|
2949
|
-
var _a4;
|
|
2950
|
-
return {
|
|
2951
|
-
...acc,
|
|
2952
|
-
[name4]: (_a4 = parseDef(
|
|
2953
|
-
schema2._def,
|
|
2954
|
-
{
|
|
2955
|
-
...refs,
|
|
2956
|
-
currentPath: [...refs.basePath, refs.definitionPath, name4]
|
|
2957
|
-
},
|
|
2958
|
-
true
|
|
2959
|
-
)) != null ? _a4 : parseAnyDef()
|
|
2960
|
-
};
|
|
2961
|
-
},
|
|
2962
|
-
{}
|
|
2963
|
-
) : void 0;
|
|
2964
|
-
const name3 = typeof options === "string" ? options : (options == null ? void 0 : options.nameStrategy) === "title" ? void 0 : options == null ? void 0 : options.name;
|
|
2965
|
-
const main = (_a3 = parseDef(
|
|
2966
|
-
schema._def,
|
|
2967
|
-
name3 === void 0 ? refs : {
|
|
2968
|
-
...refs,
|
|
2969
|
-
currentPath: [...refs.basePath, refs.definitionPath, name3]
|
|
2970
|
-
},
|
|
2971
|
-
false
|
|
2972
|
-
)) != null ? _a3 : parseAnyDef();
|
|
2973
|
-
const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0;
|
|
2974
|
-
if (title !== void 0) {
|
|
2975
|
-
main.title = title;
|
|
2976
|
-
}
|
|
2977
|
-
const combined = name3 === void 0 ? definitions ? {
|
|
2978
|
-
...main,
|
|
2979
|
-
[refs.definitionPath]: definitions
|
|
2980
|
-
} : main : {
|
|
2981
|
-
$ref: [
|
|
2982
|
-
...refs.$refStrategy === "relative" ? [] : refs.basePath,
|
|
2983
|
-
refs.definitionPath,
|
|
2984
|
-
name3
|
|
2985
|
-
].join("/"),
|
|
2986
|
-
[refs.definitionPath]: {
|
|
2987
|
-
...definitions,
|
|
2988
|
-
[name3]: main
|
|
2989
|
-
}
|
|
2990
|
-
};
|
|
2991
|
-
combined.$schema = "http://json-schema.org/draft-07/schema#";
|
|
2992
|
-
return combined;
|
|
2993
|
-
};
|
|
2994
|
-
|
|
2995
|
-
// src/schema.ts
|
|
2996
|
-
var schemaSymbol = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
|
|
2997
|
-
function lazySchema(createSchema) {
|
|
2998
|
-
let schema;
|
|
2999
|
-
return () => {
|
|
3000
|
-
if (schema == null) {
|
|
3001
|
-
schema = createSchema();
|
|
3002
|
-
}
|
|
3003
|
-
return schema;
|
|
3004
|
-
};
|
|
3005
|
-
}
|
|
3006
|
-
function jsonSchema(jsonSchema2, {
|
|
3007
|
-
validate
|
|
3008
|
-
} = {}) {
|
|
3009
|
-
return {
|
|
3010
|
-
[schemaSymbol]: true,
|
|
3011
|
-
_type: void 0,
|
|
3012
|
-
// should never be used directly
|
|
3013
|
-
get jsonSchema() {
|
|
3014
|
-
if (typeof jsonSchema2 === "function") {
|
|
3015
|
-
jsonSchema2 = jsonSchema2();
|
|
3016
|
-
}
|
|
3017
|
-
return jsonSchema2;
|
|
3018
|
-
},
|
|
3019
|
-
validate
|
|
3020
|
-
};
|
|
3021
|
-
}
|
|
3022
|
-
function isSchema(value) {
|
|
3023
|
-
return typeof value === "object" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && "jsonSchema" in value && "validate" in value;
|
|
3024
|
-
}
|
|
3025
|
-
function asSchema(schema) {
|
|
3026
|
-
return schema == null ? jsonSchema({
|
|
3027
|
-
type: "object",
|
|
3028
|
-
properties: {},
|
|
3029
|
-
additionalProperties: false
|
|
3030
|
-
}) : isSchema(schema) ? schema : "~standard" in schema ? schema["~standard"].vendor === "zod" ? zodSchema(schema) : standardSchema(schema) : schema();
|
|
3031
|
-
}
|
|
3032
|
-
function standardSchema(standardSchema2) {
|
|
3033
|
-
return jsonSchema(
|
|
3034
|
-
() => {
|
|
3035
|
-
if (!hasStandardJsonSchema(standardSchema2)) {
|
|
3036
|
-
throw new Error(
|
|
3037
|
-
`Standard schema vendor '${standardSchema2["~standard"].vendor}' does not support JSON Schema conversion.`
|
|
3038
|
-
);
|
|
3039
|
-
}
|
|
3040
|
-
return addAdditionalPropertiesToJsonSchema(
|
|
3041
|
-
standardSchema2["~standard"].jsonSchema.input({
|
|
3042
|
-
target: "draft-07"
|
|
3043
|
-
})
|
|
3044
|
-
);
|
|
3045
|
-
},
|
|
3046
|
-
{
|
|
3047
|
-
validate: async (value) => {
|
|
3048
|
-
const result = await standardSchema2["~standard"].validate(value);
|
|
3049
|
-
return "value" in result ? { success: true, value: result.value } : {
|
|
3050
|
-
success: false,
|
|
3051
|
-
error: new TypeValidationError({
|
|
3052
|
-
value,
|
|
3053
|
-
cause: result.issues
|
|
3054
|
-
})
|
|
3055
|
-
};
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
);
|
|
3059
|
-
}
|
|
3060
|
-
function hasStandardJsonSchema(schema) {
|
|
3061
|
-
return schema["~standard"].jsonSchema != null;
|
|
3062
|
-
}
|
|
3063
|
-
function zod3Schema(zodSchema2, options) {
|
|
3064
|
-
var _a3;
|
|
3065
|
-
const useReferences = (_a3 = options == null ? void 0 : options.useReferences) != null ? _a3 : false;
|
|
3066
|
-
return jsonSchema(
|
|
3067
|
-
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
3068
|
-
() => zod3ToJsonSchema(zodSchema2, {
|
|
3069
|
-
$refStrategy: useReferences ? "root" : "none"
|
|
3070
|
-
}),
|
|
3071
|
-
{
|
|
3072
|
-
validate: async (value) => {
|
|
3073
|
-
const result = await zodSchema2.safeParseAsync(value);
|
|
3074
|
-
return result.success ? { success: true, value: result.data } : { success: false, error: result.error };
|
|
3075
|
-
}
|
|
3076
|
-
}
|
|
3077
|
-
);
|
|
3078
|
-
}
|
|
3079
|
-
function zod4Schema(zodSchema2, options) {
|
|
3080
|
-
var _a3;
|
|
3081
|
-
const useReferences = (_a3 = options == null ? void 0 : options.useReferences) != null ? _a3 : false;
|
|
3082
|
-
return jsonSchema(
|
|
3083
|
-
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
3084
|
-
() => addAdditionalPropertiesToJsonSchema(
|
|
3085
|
-
toJSONSchema(zodSchema2, {
|
|
3086
|
-
target: "draft-7",
|
|
3087
|
-
io: "input",
|
|
3088
|
-
reused: useReferences ? "ref" : "inline"
|
|
3089
|
-
})
|
|
3090
|
-
),
|
|
3091
|
-
{
|
|
3092
|
-
validate: async (value) => {
|
|
3093
|
-
const result = await safeParseAsync(zodSchema2, value);
|
|
3094
|
-
return result.success ? { success: true, value: result.data } : { success: false, error: result.error };
|
|
3095
|
-
}
|
|
3096
|
-
}
|
|
3097
|
-
);
|
|
3098
|
-
}
|
|
3099
|
-
function isZod4Schema(zodSchema2) {
|
|
3100
|
-
return "_zod" in zodSchema2;
|
|
3101
|
-
}
|
|
3102
|
-
function zodSchema(zodSchema2, options) {
|
|
3103
|
-
if (isZod4Schema(zodSchema2)) {
|
|
3104
|
-
return zod4Schema(zodSchema2, options);
|
|
3105
|
-
} else {
|
|
3106
|
-
return zod3Schema(zodSchema2, options);
|
|
3107
|
-
}
|
|
3108
|
-
}
|
|
3109
|
-
|
|
3110
|
-
// src/validate-types.ts
|
|
3111
|
-
async function validateTypes({
|
|
3112
|
-
value,
|
|
3113
|
-
schema,
|
|
3114
|
-
context
|
|
3115
|
-
}) {
|
|
3116
|
-
const result = await safeValidateTypes({ value, schema, context });
|
|
3117
|
-
if (!result.success) {
|
|
3118
|
-
throw TypeValidationError2.wrap({ value, cause: result.error, context });
|
|
3119
|
-
}
|
|
3120
|
-
return result.value;
|
|
3121
|
-
}
|
|
3122
|
-
async function safeValidateTypes({
|
|
3123
|
-
value,
|
|
3124
|
-
schema,
|
|
3125
|
-
context
|
|
3126
|
-
}) {
|
|
3127
|
-
const actualSchema = asSchema(schema);
|
|
3128
|
-
try {
|
|
3129
|
-
if (actualSchema.validate == null) {
|
|
3130
|
-
return { success: true, value, rawValue: value };
|
|
3131
|
-
}
|
|
3132
|
-
const result = await actualSchema.validate(value);
|
|
3133
|
-
if (result.success) {
|
|
3134
|
-
return { success: true, value: result.value, rawValue: value };
|
|
3135
|
-
}
|
|
3136
|
-
return {
|
|
3137
|
-
success: false,
|
|
3138
|
-
error: TypeValidationError2.wrap({ value, cause: result.error, context }),
|
|
3139
|
-
rawValue: value
|
|
3140
|
-
};
|
|
3141
|
-
} catch (error) {
|
|
3142
|
-
return {
|
|
3143
|
-
success: false,
|
|
3144
|
-
error: TypeValidationError2.wrap({ value, cause: error, context }),
|
|
3145
|
-
rawValue: value
|
|
3146
|
-
};
|
|
3147
|
-
}
|
|
3148
|
-
}
|
|
3149
|
-
|
|
3150
|
-
// src/parse-json.ts
|
|
3151
|
-
async function parseJSON({
|
|
3152
|
-
text,
|
|
3153
|
-
schema
|
|
3154
|
-
}) {
|
|
3155
|
-
try {
|
|
3156
|
-
const value = secureJsonParse(text);
|
|
3157
|
-
if (schema == null) {
|
|
3158
|
-
return value;
|
|
3159
|
-
}
|
|
3160
|
-
return await validateTypes({ value, schema });
|
|
3161
|
-
} catch (error) {
|
|
3162
|
-
if (JSONParseError.isInstance(error) || TypeValidationError3.isInstance(error)) {
|
|
3163
|
-
throw error;
|
|
3164
|
-
}
|
|
3165
|
-
throw new JSONParseError({ text, cause: error });
|
|
3166
|
-
}
|
|
3167
|
-
}
|
|
3168
|
-
async function safeParseJSON({
|
|
3169
|
-
text,
|
|
3170
|
-
schema
|
|
3171
|
-
}) {
|
|
3172
|
-
try {
|
|
3173
|
-
const value = secureJsonParse(text);
|
|
3174
|
-
if (schema == null) {
|
|
3175
|
-
return { success: true, value, rawValue: value };
|
|
3176
|
-
}
|
|
3177
|
-
return await safeValidateTypes({ value, schema });
|
|
3178
|
-
} catch (error) {
|
|
3179
|
-
return {
|
|
3180
|
-
success: false,
|
|
3181
|
-
error: JSONParseError.isInstance(error) ? error : new JSONParseError({ text, cause: error }),
|
|
3182
|
-
rawValue: void 0
|
|
3183
|
-
};
|
|
3184
|
-
}
|
|
3185
|
-
}
|
|
3186
|
-
function isParsableJson(input) {
|
|
3187
|
-
try {
|
|
3188
|
-
secureJsonParse(input);
|
|
3189
|
-
return true;
|
|
3190
|
-
} catch (e) {
|
|
3191
|
-
return false;
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
|
|
3195
|
-
// src/parse-json-event-stream.ts
|
|
3196
|
-
import {
|
|
3197
|
-
EventSourceParserStream
|
|
3198
|
-
} from "eventsource-parser/stream";
|
|
3199
|
-
function parseJsonEventStream({
|
|
3200
|
-
stream,
|
|
3201
|
-
schema
|
|
3202
|
-
}) {
|
|
3203
|
-
return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream()).pipeThrough(
|
|
3204
|
-
new TransformStream({
|
|
3205
|
-
async transform({ data }, controller) {
|
|
3206
|
-
if (data === "[DONE]") {
|
|
3207
|
-
return;
|
|
3208
|
-
}
|
|
3209
|
-
controller.enqueue(await safeParseJSON({ text: data, schema }));
|
|
3210
|
-
}
|
|
3211
|
-
})
|
|
3212
|
-
);
|
|
3213
|
-
}
|
|
3214
|
-
|
|
3215
|
-
// src/parse-provider-options.ts
|
|
3216
|
-
import { InvalidArgumentError as InvalidArgumentError2 } from "@ai-sdk/provider";
|
|
3217
|
-
async function parseProviderOptions({
|
|
3218
|
-
provider,
|
|
3219
|
-
providerOptions,
|
|
3220
|
-
schema
|
|
3221
|
-
}) {
|
|
3222
|
-
if ((providerOptions == null ? void 0 : providerOptions[provider]) == null) {
|
|
3223
|
-
return void 0;
|
|
3224
|
-
}
|
|
3225
|
-
const parsedProviderOptions = await safeValidateTypes({
|
|
3226
|
-
value: providerOptions[provider],
|
|
3227
|
-
schema
|
|
3228
|
-
});
|
|
3229
|
-
if (!parsedProviderOptions.success) {
|
|
3230
|
-
throw new InvalidArgumentError2({
|
|
3231
|
-
argument: "providerOptions",
|
|
3232
|
-
message: `invalid ${provider} provider options`,
|
|
3233
|
-
cause: parsedProviderOptions.error
|
|
3234
|
-
});
|
|
3235
|
-
}
|
|
3236
|
-
return parsedProviderOptions.value;
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
// src/post-to-api.ts
|
|
3240
|
-
import { APICallError as APICallError3 } from "@ai-sdk/provider";
|
|
3241
|
-
var getOriginalFetch2 = () => globalThis.fetch;
|
|
3242
|
-
var postJsonToApi = async ({
|
|
3243
|
-
url,
|
|
3244
|
-
headers,
|
|
3245
|
-
body,
|
|
3246
|
-
failedResponseHandler,
|
|
3247
|
-
successfulResponseHandler,
|
|
3248
|
-
abortSignal,
|
|
3249
|
-
fetch
|
|
3250
|
-
}) => await postToApi({
|
|
3251
|
-
url,
|
|
3252
|
-
headers: {
|
|
3253
|
-
"Content-Type": "application/json",
|
|
3254
|
-
...headers
|
|
3255
|
-
},
|
|
3256
|
-
body: {
|
|
3257
|
-
content: JSON.stringify(body),
|
|
3258
|
-
values: body
|
|
3259
|
-
},
|
|
3260
|
-
failedResponseHandler,
|
|
3261
|
-
successfulResponseHandler,
|
|
3262
|
-
abortSignal,
|
|
3263
|
-
fetch
|
|
3264
|
-
});
|
|
3265
|
-
var postFormDataToApi = async ({
|
|
3266
|
-
url,
|
|
3267
|
-
headers,
|
|
3268
|
-
formData,
|
|
3269
|
-
failedResponseHandler,
|
|
3270
|
-
successfulResponseHandler,
|
|
3271
|
-
abortSignal,
|
|
3272
|
-
fetch
|
|
3273
|
-
}) => await postToApi({
|
|
3274
|
-
url,
|
|
3275
|
-
headers,
|
|
3276
|
-
body: {
|
|
3277
|
-
content: formData,
|
|
3278
|
-
values: Object.fromEntries(formData.entries())
|
|
3279
|
-
},
|
|
3280
|
-
failedResponseHandler,
|
|
3281
|
-
successfulResponseHandler,
|
|
3282
|
-
abortSignal,
|
|
3283
|
-
fetch
|
|
3284
|
-
});
|
|
3285
|
-
var postToApi = async ({
|
|
3286
|
-
url,
|
|
3287
|
-
headers = {},
|
|
3288
|
-
body,
|
|
3289
|
-
successfulResponseHandler,
|
|
3290
|
-
failedResponseHandler,
|
|
3291
|
-
abortSignal,
|
|
3292
|
-
fetch = getOriginalFetch2()
|
|
3293
|
-
}) => {
|
|
3294
|
-
try {
|
|
3295
|
-
const response = await fetch(url, {
|
|
3296
|
-
method: "POST",
|
|
3297
|
-
headers: withUserAgentSuffix(
|
|
3298
|
-
headers,
|
|
3299
|
-
`ai-sdk/provider-utils/${VERSION}`,
|
|
3300
|
-
getRuntimeEnvironmentUserAgent()
|
|
3301
|
-
),
|
|
3302
|
-
body: body.content,
|
|
3303
|
-
signal: abortSignal
|
|
3304
|
-
});
|
|
3305
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3306
|
-
if (!response.ok) {
|
|
3307
|
-
let errorInformation;
|
|
3308
|
-
try {
|
|
3309
|
-
errorInformation = await failedResponseHandler({
|
|
3310
|
-
response,
|
|
3311
|
-
url,
|
|
3312
|
-
requestBodyValues: body.values
|
|
3313
|
-
});
|
|
3314
|
-
} catch (error) {
|
|
3315
|
-
if (isAbortError(error) || APICallError3.isInstance(error)) {
|
|
3316
|
-
throw error;
|
|
3317
|
-
}
|
|
3318
|
-
throw new APICallError3({
|
|
3319
|
-
message: "Failed to process error response",
|
|
3320
|
-
cause: error,
|
|
3321
|
-
statusCode: response.status,
|
|
3322
|
-
url,
|
|
3323
|
-
responseHeaders,
|
|
3324
|
-
requestBodyValues: body.values
|
|
3325
|
-
});
|
|
3326
|
-
}
|
|
3327
|
-
throw errorInformation.value;
|
|
3328
|
-
}
|
|
3329
|
-
try {
|
|
3330
|
-
return await successfulResponseHandler({
|
|
3331
|
-
response,
|
|
3332
|
-
url,
|
|
3333
|
-
requestBodyValues: body.values
|
|
3334
|
-
});
|
|
3335
|
-
} catch (error) {
|
|
3336
|
-
if (error instanceof Error) {
|
|
3337
|
-
if (isAbortError(error) || APICallError3.isInstance(error)) {
|
|
3338
|
-
throw error;
|
|
3339
|
-
}
|
|
3340
|
-
}
|
|
3341
|
-
throw new APICallError3({
|
|
3342
|
-
message: "Failed to process successful response",
|
|
3343
|
-
cause: error,
|
|
3344
|
-
statusCode: response.status,
|
|
3345
|
-
url,
|
|
3346
|
-
responseHeaders,
|
|
3347
|
-
requestBodyValues: body.values
|
|
3348
|
-
});
|
|
3349
|
-
}
|
|
3350
|
-
} catch (error) {
|
|
3351
|
-
throw handleFetchError({ error, url, requestBodyValues: body.values });
|
|
3352
|
-
}
|
|
3353
|
-
};
|
|
3354
|
-
|
|
3355
|
-
// src/types/tool.ts
|
|
3356
|
-
function tool(tool2) {
|
|
3357
|
-
return tool2;
|
|
3358
|
-
}
|
|
3359
|
-
function dynamicTool(tool2) {
|
|
3360
|
-
return { ...tool2, type: "dynamic" };
|
|
3361
|
-
}
|
|
3362
|
-
|
|
3363
|
-
// src/provider-defined-tool-factory.ts
|
|
3364
|
-
function createProviderDefinedToolFactory({
|
|
3365
|
-
id,
|
|
3366
|
-
inputSchema
|
|
3367
|
-
}) {
|
|
3368
|
-
return ({
|
|
3369
|
-
execute,
|
|
3370
|
-
outputSchema,
|
|
3371
|
-
needsApproval,
|
|
3372
|
-
toModelOutput,
|
|
3373
|
-
onInputStart,
|
|
3374
|
-
onInputDelta,
|
|
3375
|
-
onInputAvailable,
|
|
3376
|
-
...args
|
|
3377
|
-
}) => tool({
|
|
3378
|
-
type: "provider",
|
|
3379
|
-
isProviderExecuted: false,
|
|
3380
|
-
id,
|
|
3381
|
-
args,
|
|
3382
|
-
inputSchema,
|
|
3383
|
-
outputSchema,
|
|
3384
|
-
execute,
|
|
3385
|
-
needsApproval,
|
|
3386
|
-
toModelOutput,
|
|
3387
|
-
onInputStart,
|
|
3388
|
-
onInputDelta,
|
|
3389
|
-
onInputAvailable
|
|
3390
|
-
});
|
|
3391
|
-
}
|
|
3392
|
-
function createProviderDefinedToolFactoryWithOutputSchema({
|
|
3393
|
-
id,
|
|
3394
|
-
inputSchema,
|
|
3395
|
-
outputSchema
|
|
3396
|
-
}) {
|
|
3397
|
-
return ({
|
|
3398
|
-
execute,
|
|
3399
|
-
needsApproval,
|
|
3400
|
-
toModelOutput,
|
|
3401
|
-
onInputStart,
|
|
3402
|
-
onInputDelta,
|
|
3403
|
-
onInputAvailable,
|
|
3404
|
-
...args
|
|
3405
|
-
}) => tool({
|
|
3406
|
-
type: "provider",
|
|
3407
|
-
isProviderExecuted: false,
|
|
3408
|
-
id,
|
|
3409
|
-
args,
|
|
3410
|
-
inputSchema,
|
|
3411
|
-
outputSchema,
|
|
3412
|
-
execute,
|
|
3413
|
-
needsApproval,
|
|
3414
|
-
toModelOutput,
|
|
3415
|
-
onInputStart,
|
|
3416
|
-
onInputDelta,
|
|
3417
|
-
onInputAvailable
|
|
3418
|
-
});
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
|
-
// src/provider-executed-tool-factory.ts
|
|
3422
|
-
function createProviderExecutedToolFactory({
|
|
3423
|
-
id,
|
|
3424
|
-
inputSchema,
|
|
3425
|
-
outputSchema,
|
|
3426
|
-
supportsDeferredResults
|
|
3427
|
-
}) {
|
|
3428
|
-
return ({
|
|
3429
|
-
onInputStart,
|
|
3430
|
-
onInputDelta,
|
|
3431
|
-
onInputAvailable,
|
|
3432
|
-
...args
|
|
3433
|
-
}) => tool({
|
|
3434
|
-
type: "provider",
|
|
3435
|
-
isProviderExecuted: true,
|
|
3436
|
-
id,
|
|
3437
|
-
args,
|
|
3438
|
-
inputSchema,
|
|
3439
|
-
outputSchema,
|
|
3440
|
-
onInputStart,
|
|
3441
|
-
onInputDelta,
|
|
3442
|
-
onInputAvailable,
|
|
3443
|
-
supportsDeferredResults
|
|
3444
|
-
});
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
|
-
// src/resolve.ts
|
|
3448
|
-
async function resolve(value) {
|
|
3449
|
-
if (typeof value === "function") {
|
|
3450
|
-
value = value();
|
|
3451
|
-
}
|
|
3452
|
-
return Promise.resolve(value);
|
|
3453
|
-
}
|
|
3454
|
-
|
|
3455
|
-
// src/resolve-full-media-type.ts
|
|
3456
|
-
import {
|
|
3457
|
-
UnsupportedFunctionalityError
|
|
3458
|
-
} from "@ai-sdk/provider";
|
|
3459
|
-
function resolveFullMediaType({
|
|
3460
|
-
part
|
|
3461
|
-
}) {
|
|
3462
|
-
if (isFullMediaType(part.mediaType)) {
|
|
3463
|
-
return part.mediaType;
|
|
3464
|
-
}
|
|
3465
|
-
if (part.data.type === "data") {
|
|
3466
|
-
const detected = detectMediaType({
|
|
3467
|
-
data: part.data.data,
|
|
3468
|
-
topLevelType: getTopLevelMediaType(part.mediaType)
|
|
3469
|
-
});
|
|
3470
|
-
if (detected) {
|
|
3471
|
-
return detected;
|
|
3472
|
-
}
|
|
3473
|
-
throw new UnsupportedFunctionalityError({
|
|
3474
|
-
functionality: `file of media type "${part.mediaType}" must specify subtype since it could not be auto-detected`
|
|
3475
|
-
});
|
|
3476
|
-
}
|
|
3477
|
-
throw new UnsupportedFunctionalityError({
|
|
3478
|
-
functionality: `file of media type "${part.mediaType}" must specify subtype since it is not passed as inline bytes`
|
|
3479
|
-
});
|
|
3480
|
-
}
|
|
3481
|
-
|
|
3482
|
-
// src/resolve-provider-reference.ts
|
|
3483
|
-
import {
|
|
3484
|
-
NoSuchProviderReferenceError
|
|
3485
|
-
} from "@ai-sdk/provider";
|
|
3486
|
-
function resolveProviderReference({
|
|
3487
|
-
reference,
|
|
3488
|
-
provider
|
|
3489
|
-
}) {
|
|
3490
|
-
const id = reference[provider];
|
|
3491
|
-
if (id != null) {
|
|
3492
|
-
return id;
|
|
3493
|
-
}
|
|
3494
|
-
throw new NoSuchProviderReferenceError({
|
|
3495
|
-
provider,
|
|
3496
|
-
reference
|
|
3497
|
-
});
|
|
3498
|
-
}
|
|
3499
|
-
|
|
3500
|
-
// src/retry-with-exponential-backoff.ts
|
|
3501
|
-
var retryWithExponentialBackoff = ({
|
|
3502
|
-
maxRetries = 2,
|
|
3503
|
-
initialDelayInMs = 2e3,
|
|
3504
|
-
backoffFactor = 2,
|
|
3505
|
-
abortSignal,
|
|
3506
|
-
shouldRetry,
|
|
3507
|
-
getDelayInMs = ({ exponentialBackoffDelay }) => exponentialBackoffDelay,
|
|
3508
|
-
createRetryError = ({ message }) => new Error(message)
|
|
3509
|
-
}) => async (f) => retryWithExponentialBackoffInternal(f, {
|
|
3510
|
-
maxRetries,
|
|
3511
|
-
delayInMs: initialDelayInMs,
|
|
3512
|
-
backoffFactor,
|
|
3513
|
-
abortSignal,
|
|
3514
|
-
shouldRetry,
|
|
3515
|
-
getDelayInMs,
|
|
3516
|
-
createRetryError
|
|
3517
|
-
});
|
|
3518
|
-
async function retryWithExponentialBackoffInternal(f, {
|
|
3519
|
-
maxRetries,
|
|
3520
|
-
delayInMs,
|
|
3521
|
-
backoffFactor,
|
|
3522
|
-
abortSignal,
|
|
3523
|
-
shouldRetry,
|
|
3524
|
-
getDelayInMs,
|
|
3525
|
-
createRetryError
|
|
3526
|
-
}, errors = []) {
|
|
3527
|
-
try {
|
|
3528
|
-
return await f();
|
|
3529
|
-
} catch (error) {
|
|
3530
|
-
if (isAbortError(error)) {
|
|
3531
|
-
throw error;
|
|
3532
|
-
}
|
|
3533
|
-
if (maxRetries === 0) {
|
|
3534
|
-
throw error;
|
|
3535
|
-
}
|
|
3536
|
-
const errorMessage = getErrorMessage(error);
|
|
3537
|
-
const newErrors = [...errors, error];
|
|
3538
|
-
const tryNumber = newErrors.length;
|
|
3539
|
-
if (tryNumber > maxRetries) {
|
|
3540
|
-
throw createRetryError({
|
|
3541
|
-
message: `Failed after ${tryNumber} attempts. Last error: ${errorMessage}`,
|
|
3542
|
-
reason: "maxRetriesExceeded",
|
|
3543
|
-
errors: newErrors
|
|
3544
|
-
});
|
|
3545
|
-
}
|
|
3546
|
-
if (await shouldRetry(error) && tryNumber <= maxRetries) {
|
|
3547
|
-
await delay(
|
|
3548
|
-
getDelayInMs({
|
|
3549
|
-
error,
|
|
3550
|
-
exponentialBackoffDelay: delayInMs
|
|
3551
|
-
}),
|
|
3552
|
-
{ abortSignal }
|
|
3553
|
-
);
|
|
3554
|
-
return retryWithExponentialBackoffInternal(
|
|
3555
|
-
f,
|
|
3556
|
-
{
|
|
3557
|
-
maxRetries,
|
|
3558
|
-
delayInMs: backoffFactor * delayInMs,
|
|
3559
|
-
backoffFactor,
|
|
3560
|
-
abortSignal,
|
|
3561
|
-
shouldRetry,
|
|
3562
|
-
getDelayInMs,
|
|
3563
|
-
createRetryError
|
|
3564
|
-
},
|
|
3565
|
-
newErrors
|
|
3566
|
-
);
|
|
3567
|
-
}
|
|
3568
|
-
if (tryNumber === 1) {
|
|
3569
|
-
throw error;
|
|
3570
|
-
}
|
|
3571
|
-
throw createRetryError({
|
|
3572
|
-
message: `Failed after ${tryNumber} attempts with non-retryable error: '${errorMessage}'`,
|
|
3573
|
-
reason: "errorNotRetryable",
|
|
3574
|
-
errors: newErrors
|
|
3575
|
-
});
|
|
3576
|
-
}
|
|
3577
|
-
}
|
|
3578
|
-
|
|
3579
|
-
// src/response-handler.ts
|
|
3580
|
-
import { APICallError as APICallError4, EmptyResponseBodyError } from "@ai-sdk/provider";
|
|
3581
|
-
var textDecoder2 = new TextDecoder();
|
|
3582
|
-
async function readResponseBodyAsText({
|
|
3583
|
-
response,
|
|
3584
|
-
url
|
|
3585
|
-
}) {
|
|
3586
|
-
return textDecoder2.decode(
|
|
3587
|
-
await readResponseWithSizeLimit({
|
|
3588
|
-
response,
|
|
3589
|
-
url
|
|
3590
|
-
})
|
|
3591
|
-
);
|
|
3592
|
-
}
|
|
3593
|
-
var createJsonErrorResponseHandler = ({
|
|
3594
|
-
errorSchema,
|
|
3595
|
-
errorToMessage,
|
|
3596
|
-
isRetryable
|
|
3597
|
-
}) => async ({ response, url, requestBodyValues }) => {
|
|
3598
|
-
const responseBody = await readResponseBodyAsText({ response, url });
|
|
3599
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3600
|
-
if (responseBody.trim() === "") {
|
|
3601
|
-
return {
|
|
3602
|
-
responseHeaders,
|
|
3603
|
-
value: new APICallError4({
|
|
3604
|
-
message: response.statusText,
|
|
3605
|
-
url,
|
|
3606
|
-
requestBodyValues,
|
|
3607
|
-
statusCode: response.status,
|
|
3608
|
-
responseHeaders,
|
|
3609
|
-
responseBody,
|
|
3610
|
-
isRetryable: isRetryable == null ? void 0 : isRetryable(response)
|
|
3611
|
-
})
|
|
3612
|
-
};
|
|
3613
|
-
}
|
|
3614
|
-
try {
|
|
3615
|
-
const parsedError = await parseJSON({
|
|
3616
|
-
text: responseBody,
|
|
3617
|
-
schema: errorSchema
|
|
3618
|
-
});
|
|
3619
|
-
return {
|
|
3620
|
-
responseHeaders,
|
|
3621
|
-
value: new APICallError4({
|
|
3622
|
-
message: errorToMessage(parsedError),
|
|
3623
|
-
url,
|
|
3624
|
-
requestBodyValues,
|
|
3625
|
-
statusCode: response.status,
|
|
3626
|
-
responseHeaders,
|
|
3627
|
-
responseBody,
|
|
3628
|
-
data: parsedError,
|
|
3629
|
-
isRetryable: isRetryable == null ? void 0 : isRetryable(response, parsedError)
|
|
3630
|
-
})
|
|
3631
|
-
};
|
|
3632
|
-
} catch (e) {
|
|
3633
|
-
return {
|
|
3634
|
-
responseHeaders,
|
|
3635
|
-
value: new APICallError4({
|
|
3636
|
-
message: response.statusText,
|
|
3637
|
-
url,
|
|
3638
|
-
requestBodyValues,
|
|
3639
|
-
statusCode: response.status,
|
|
3640
|
-
responseHeaders,
|
|
3641
|
-
responseBody,
|
|
3642
|
-
isRetryable: isRetryable == null ? void 0 : isRetryable(response)
|
|
3643
|
-
})
|
|
3644
|
-
};
|
|
3645
|
-
}
|
|
3646
|
-
};
|
|
3647
|
-
var createEventSourceResponseHandler = (chunkSchema) => async ({ response }) => {
|
|
3648
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3649
|
-
if (response.body == null) {
|
|
3650
|
-
throw new EmptyResponseBodyError({});
|
|
3651
|
-
}
|
|
3652
|
-
return {
|
|
3653
|
-
responseHeaders,
|
|
3654
|
-
value: parseJsonEventStream({
|
|
3655
|
-
stream: response.body,
|
|
3656
|
-
schema: chunkSchema
|
|
3657
|
-
})
|
|
3658
|
-
};
|
|
3659
|
-
};
|
|
3660
|
-
var createJsonResponseHandler = (responseSchema) => async ({ response, url, requestBodyValues }) => {
|
|
3661
|
-
const responseBody = await readResponseBodyAsText({ response, url });
|
|
3662
|
-
const parsedResult = await safeParseJSON({
|
|
3663
|
-
text: responseBody,
|
|
3664
|
-
schema: responseSchema
|
|
3665
|
-
});
|
|
3666
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3667
|
-
if (!parsedResult.success) {
|
|
3668
|
-
throw new APICallError4({
|
|
3669
|
-
message: "Invalid JSON response",
|
|
3670
|
-
cause: parsedResult.error,
|
|
3671
|
-
statusCode: response.status,
|
|
3672
|
-
responseHeaders,
|
|
3673
|
-
responseBody,
|
|
3674
|
-
url,
|
|
3675
|
-
requestBodyValues
|
|
3676
|
-
});
|
|
3677
|
-
}
|
|
3678
|
-
return {
|
|
3679
|
-
responseHeaders,
|
|
3680
|
-
value: parsedResult.value,
|
|
3681
|
-
rawValue: parsedResult.rawValue
|
|
3682
|
-
};
|
|
3683
|
-
};
|
|
3684
|
-
var createJsonLinesResponseHandler = (responseSchema) => async ({ response }) => {
|
|
3685
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3686
|
-
if (response.body == null) {
|
|
3687
|
-
throw new EmptyResponseBodyError({});
|
|
3688
|
-
}
|
|
3689
|
-
return {
|
|
3690
|
-
responseHeaders,
|
|
3691
|
-
value: parseJsonLines({
|
|
3692
|
-
stream: response.body,
|
|
3693
|
-
schema: responseSchema
|
|
3694
|
-
})
|
|
3695
|
-
};
|
|
3696
|
-
};
|
|
3697
|
-
async function* parseJsonLines({
|
|
3698
|
-
stream,
|
|
3699
|
-
schema
|
|
3700
|
-
}) {
|
|
3701
|
-
const reader = stream.getReader();
|
|
3702
|
-
const decoder = new TextDecoder();
|
|
3703
|
-
let buffer = "";
|
|
3704
|
-
let finished = false;
|
|
3705
|
-
try {
|
|
3706
|
-
while (true) {
|
|
3707
|
-
const { done, value } = await reader.read();
|
|
3708
|
-
if (done) {
|
|
3709
|
-
finished = true;
|
|
3710
|
-
buffer += decoder.decode();
|
|
3711
|
-
break;
|
|
3712
|
-
}
|
|
3713
|
-
buffer += decoder.decode(value, { stream: true });
|
|
3714
|
-
let lineEnd = buffer.indexOf("\n");
|
|
3715
|
-
while (lineEnd !== -1) {
|
|
3716
|
-
const line = buffer.slice(0, lineEnd).replace(/\r$/, "");
|
|
3717
|
-
buffer = buffer.slice(lineEnd + 1);
|
|
3718
|
-
if (line.trim().length > 0) {
|
|
3719
|
-
yield await parseJSON({ text: line, schema });
|
|
3720
|
-
}
|
|
3721
|
-
lineEnd = buffer.indexOf("\n");
|
|
3722
|
-
}
|
|
3723
|
-
}
|
|
3724
|
-
const finalLine = buffer.replace(/\r$/, "");
|
|
3725
|
-
if (finalLine.trim().length > 0) {
|
|
3726
|
-
yield await parseJSON({ text: finalLine, schema });
|
|
3727
|
-
}
|
|
3728
|
-
} finally {
|
|
3729
|
-
if (!finished) {
|
|
3730
|
-
await reader.cancel().catch(() => {
|
|
3731
|
-
});
|
|
3732
|
-
}
|
|
3733
|
-
reader.releaseLock();
|
|
3734
|
-
}
|
|
3735
|
-
}
|
|
3736
|
-
var createBinaryResponseHandler = () => async ({ response, url, requestBodyValues }) => {
|
|
3737
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3738
|
-
if (!response.body) {
|
|
3739
|
-
throw new APICallError4({
|
|
3740
|
-
message: "Response body is empty",
|
|
3741
|
-
url,
|
|
3742
|
-
requestBodyValues,
|
|
3743
|
-
statusCode: response.status,
|
|
3744
|
-
responseHeaders,
|
|
3745
|
-
responseBody: void 0
|
|
3746
|
-
});
|
|
3747
|
-
}
|
|
3748
|
-
try {
|
|
3749
|
-
const buffer = await response.arrayBuffer();
|
|
3750
|
-
return {
|
|
3751
|
-
responseHeaders,
|
|
3752
|
-
value: new Uint8Array(buffer)
|
|
3753
|
-
};
|
|
3754
|
-
} catch (error) {
|
|
3755
|
-
throw new APICallError4({
|
|
3756
|
-
message: "Failed to read response as array buffer",
|
|
3757
|
-
url,
|
|
3758
|
-
requestBodyValues,
|
|
3759
|
-
statusCode: response.status,
|
|
3760
|
-
responseHeaders,
|
|
3761
|
-
responseBody: void 0,
|
|
3762
|
-
cause: error
|
|
3763
|
-
});
|
|
3764
|
-
}
|
|
3765
|
-
};
|
|
3766
|
-
var createStatusCodeErrorResponseHandler = () => async ({ response, url, requestBodyValues }) => {
|
|
3767
|
-
const responseHeaders = extractResponseHeaders(response);
|
|
3768
|
-
const responseBody = await readResponseBodyAsText({ response, url });
|
|
3769
|
-
return {
|
|
3770
|
-
responseHeaders,
|
|
3771
|
-
value: new APICallError4({
|
|
3772
|
-
message: response.statusText,
|
|
3773
|
-
url,
|
|
3774
|
-
requestBodyValues,
|
|
3775
|
-
statusCode: response.status,
|
|
3776
|
-
responseHeaders,
|
|
3777
|
-
responseBody
|
|
3778
|
-
})
|
|
3779
|
-
};
|
|
3780
|
-
};
|
|
3781
|
-
|
|
3782
|
-
// src/is-json-serializable.ts
|
|
3783
|
-
function isJSONSerializable(value) {
|
|
3784
|
-
if (value === null || value === void 0) return true;
|
|
3785
|
-
const type = typeof value;
|
|
3786
|
-
if (type === "string" || type === "number" || type === "boolean") return true;
|
|
3787
|
-
if (type === "function" || type === "symbol" || type === "bigint")
|
|
3788
|
-
return false;
|
|
3789
|
-
if (Array.isArray(value)) {
|
|
3790
|
-
return value.every(isJSONSerializable);
|
|
3791
|
-
}
|
|
3792
|
-
if (Object.getPrototypeOf(value) === Object.prototype) {
|
|
3793
|
-
return Object.values(value).every(
|
|
3794
|
-
isJSONSerializable
|
|
3795
|
-
);
|
|
3796
|
-
}
|
|
3797
|
-
return false;
|
|
3798
|
-
}
|
|
3799
|
-
|
|
3800
|
-
// src/serialization-error.ts
|
|
3801
|
-
import { AISDKError as AISDKError2 } from "@ai-sdk/provider";
|
|
3802
|
-
var name2 = "AI_SerializationError";
|
|
3803
|
-
var marker3 = `vercel.ai.error.${name2}`;
|
|
3804
|
-
var symbol2 = Symbol.for(marker3);
|
|
3805
|
-
var _a2, _b2;
|
|
3806
|
-
var SerializationError = class extends (_b2 = AISDKError2, _a2 = symbol2, _b2) {
|
|
3807
|
-
// used in isInstance
|
|
3808
|
-
constructor({
|
|
3809
|
-
message = "Failed to serialize value.",
|
|
3810
|
-
cause
|
|
3811
|
-
} = {}) {
|
|
3812
|
-
super({ name: name2, message, cause });
|
|
3813
|
-
this[_a2] = true;
|
|
3814
|
-
}
|
|
3815
|
-
static isInstance(error) {
|
|
3816
|
-
return AISDKError2.hasMarker(error, marker3);
|
|
3817
|
-
}
|
|
3818
|
-
};
|
|
3819
|
-
|
|
3820
|
-
// src/serialize-model-options.ts
|
|
3821
|
-
function serializeModelOptions(options) {
|
|
3822
|
-
const serializableConfig = {};
|
|
3823
|
-
for (const [key, value] of Object.entries(options.config)) {
|
|
3824
|
-
if (key === "headers") {
|
|
3825
|
-
const resolvedHeaders = resolveSync(value);
|
|
3826
|
-
if (isJSONSerializable(resolvedHeaders)) {
|
|
3827
|
-
serializableConfig[key] = resolvedHeaders;
|
|
3828
|
-
}
|
|
3829
|
-
} else if (isJSONSerializable(value)) {
|
|
3830
|
-
serializableConfig[key] = value;
|
|
3831
|
-
}
|
|
3832
|
-
}
|
|
3833
|
-
return { modelId: options.modelId, config: serializableConfig };
|
|
3834
|
-
}
|
|
3835
|
-
function resolveSync(value) {
|
|
3836
|
-
let next = value;
|
|
3837
|
-
if (typeof value === "function") {
|
|
3838
|
-
next = value();
|
|
3839
|
-
}
|
|
3840
|
-
if (next instanceof Promise) {
|
|
3841
|
-
throw new SerializationError({
|
|
3842
|
-
message: "Cannot serialize asynchronous model options."
|
|
3843
|
-
});
|
|
3844
|
-
}
|
|
3845
|
-
return next;
|
|
3846
|
-
}
|
|
3847
|
-
|
|
3848
|
-
// src/streaming-tool-call-tracker.ts
|
|
3849
|
-
import {
|
|
3850
|
-
InvalidResponseDataError
|
|
3851
|
-
} from "@ai-sdk/provider";
|
|
3852
|
-
var StreamingToolCallTracker = class {
|
|
3853
|
-
constructor(controller, options = {}) {
|
|
3854
|
-
this.toolCalls = /* @__PURE__ */ new Set();
|
|
3855
|
-
this.toolCallsById = /* @__PURE__ */ new Map();
|
|
3856
|
-
this.toolCallsByIndex = /* @__PURE__ */ new Map();
|
|
3857
|
-
var _a3, _b3;
|
|
3858
|
-
this.controller = controller;
|
|
3859
|
-
this._generateId = (_a3 = options.generateId) != null ? _a3 : generateId;
|
|
3860
|
-
this.typeValidation = (_b3 = options.typeValidation) != null ? _b3 : "none";
|
|
3861
|
-
this.extractMetadata = options.extractMetadata;
|
|
3862
|
-
this.buildToolCallProviderMetadata = options.buildToolCallProviderMetadata;
|
|
3863
|
-
}
|
|
3864
|
-
/**
|
|
3865
|
-
* Process a tool call delta from a streaming response chunk.
|
|
3866
|
-
* Emits tool-input-start, tool-input-delta, tool-input-end, and tool-call
|
|
3867
|
-
* events as appropriate.
|
|
3868
|
-
*/
|
|
3869
|
-
processDelta(toolCallDelta) {
|
|
3870
|
-
const { id, index } = toolCallDelta;
|
|
3871
|
-
let toolCall = id != null && id.length > 0 ? this.toolCallsById.get(id) : index != null ? this.toolCallsByIndex.get(index) : this.latestToolCall;
|
|
3872
|
-
if (toolCall == null) {
|
|
3873
|
-
toolCall = this.processNewToolCall(toolCallDelta);
|
|
3874
|
-
} else {
|
|
3875
|
-
this.processExistingToolCall(toolCall, toolCallDelta);
|
|
3876
|
-
}
|
|
3877
|
-
if (index != null) {
|
|
3878
|
-
this.toolCallsByIndex.set(index, toolCall);
|
|
3879
|
-
}
|
|
3880
|
-
this.latestToolCall = toolCall;
|
|
3881
|
-
}
|
|
3882
|
-
/**
|
|
3883
|
-
* Finalize any unfinished tool calls. Should be called during the stream's
|
|
3884
|
-
* flush handler to ensure all tool calls are properly completed.
|
|
3885
|
-
*/
|
|
3886
|
-
flush() {
|
|
3887
|
-
for (const toolCall of this.toolCalls) {
|
|
3888
|
-
if (!toolCall.hasFinished) {
|
|
3889
|
-
this.finishToolCall(toolCall);
|
|
3890
|
-
}
|
|
3891
|
-
}
|
|
3892
|
-
}
|
|
3893
|
-
processNewToolCall(toolCallDelta) {
|
|
3894
|
-
var _a3, _b3, _c;
|
|
3895
|
-
if (this.typeValidation === "required") {
|
|
3896
|
-
if (toolCallDelta.type !== "function") {
|
|
3897
|
-
throw new InvalidResponseDataError({
|
|
3898
|
-
data: toolCallDelta,
|
|
3899
|
-
message: `Expected 'function' type.`
|
|
3900
|
-
});
|
|
3901
|
-
}
|
|
3902
|
-
} else if (this.typeValidation === "if-present") {
|
|
3903
|
-
if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
|
|
3904
|
-
throw new InvalidResponseDataError({
|
|
3905
|
-
data: toolCallDelta,
|
|
3906
|
-
message: `Expected 'function' type.`
|
|
3907
|
-
});
|
|
3908
|
-
}
|
|
3909
|
-
}
|
|
3910
|
-
if (toolCallDelta.id == null) {
|
|
3911
|
-
throw new InvalidResponseDataError({
|
|
3912
|
-
data: toolCallDelta,
|
|
3913
|
-
message: `Expected 'id' to be a string.`
|
|
3914
|
-
});
|
|
3915
|
-
}
|
|
3916
|
-
if (((_a3 = toolCallDelta.function) == null ? void 0 : _a3.name) == null) {
|
|
3917
|
-
throw new InvalidResponseDataError({
|
|
3918
|
-
data: toolCallDelta,
|
|
3919
|
-
message: `Expected 'function.name' to be a string.`
|
|
3920
|
-
});
|
|
3921
|
-
}
|
|
3922
|
-
this.controller.enqueue({
|
|
3923
|
-
type: "tool-input-start",
|
|
3924
|
-
id: toolCallDelta.id,
|
|
3925
|
-
toolName: toolCallDelta.function.name
|
|
3926
|
-
});
|
|
3927
|
-
const metadata = (_b3 = this.extractMetadata) == null ? void 0 : _b3.call(this, toolCallDelta);
|
|
3928
|
-
const toolCall = {
|
|
3929
|
-
id: toolCallDelta.id,
|
|
3930
|
-
type: "function",
|
|
3931
|
-
function: {
|
|
3932
|
-
name: toolCallDelta.function.name,
|
|
3933
|
-
arguments: (_c = toolCallDelta.function.arguments) != null ? _c : ""
|
|
3934
|
-
},
|
|
3935
|
-
hasFinished: false,
|
|
3936
|
-
metadata
|
|
3937
|
-
};
|
|
3938
|
-
this.toolCalls.add(toolCall);
|
|
3939
|
-
if (toolCall.id.length > 0) {
|
|
3940
|
-
this.toolCallsById.set(toolCall.id, toolCall);
|
|
3941
|
-
}
|
|
3942
|
-
if (toolCall.function.arguments.length > 0) {
|
|
3943
|
-
this.controller.enqueue({
|
|
3944
|
-
type: "tool-input-delta",
|
|
3945
|
-
id: toolCall.id,
|
|
3946
|
-
delta: toolCall.function.arguments
|
|
3947
|
-
});
|
|
3948
|
-
}
|
|
3949
|
-
return toolCall;
|
|
3950
|
-
}
|
|
3951
|
-
processExistingToolCall(toolCall, toolCallDelta) {
|
|
3952
|
-
var _a3;
|
|
3953
|
-
if (toolCall.hasFinished) {
|
|
3954
|
-
return;
|
|
3955
|
-
}
|
|
3956
|
-
if (((_a3 = toolCallDelta.function) == null ? void 0 : _a3.arguments) != null) {
|
|
3957
|
-
toolCall.function.arguments += toolCallDelta.function.arguments;
|
|
3958
|
-
this.controller.enqueue({
|
|
3959
|
-
type: "tool-input-delta",
|
|
3960
|
-
id: toolCall.id,
|
|
3961
|
-
delta: toolCallDelta.function.arguments
|
|
3962
|
-
});
|
|
3963
|
-
}
|
|
3964
|
-
}
|
|
3965
|
-
finishToolCall(toolCall) {
|
|
3966
|
-
var _a3, _b3;
|
|
3967
|
-
this.controller.enqueue({
|
|
3968
|
-
type: "tool-input-end",
|
|
3969
|
-
id: toolCall.id
|
|
3970
|
-
});
|
|
3971
|
-
const providerMetadata = (_a3 = this.buildToolCallProviderMetadata) == null ? void 0 : _a3.call(
|
|
3972
|
-
this,
|
|
3973
|
-
toolCall.metadata
|
|
3974
|
-
);
|
|
3975
|
-
this.controller.enqueue({
|
|
3976
|
-
type: "tool-call",
|
|
3977
|
-
toolCallId: (_b3 = toolCall.id) != null ? _b3 : this._generateId(),
|
|
3978
|
-
toolName: toolCall.function.name,
|
|
3979
|
-
input: toolCall.function.arguments,
|
|
3980
|
-
...providerMetadata ? { providerMetadata } : {}
|
|
3981
|
-
});
|
|
3982
|
-
toolCall.hasFinished = true;
|
|
3983
|
-
}
|
|
3984
|
-
};
|
|
3985
|
-
|
|
3986
|
-
// src/strip-file-extension.ts
|
|
3987
|
-
function stripFileExtension(filename) {
|
|
3988
|
-
const firstDotIndex = filename.indexOf(".");
|
|
3989
|
-
return firstDotIndex === -1 ? filename : filename.slice(0, firstDotIndex);
|
|
3990
|
-
}
|
|
3991
|
-
|
|
3992
|
-
// src/transcription-stream-envelope.ts
|
|
3993
|
-
var TRANSCRIPTION_STREAM_START_FRAME_TYPE = "transcription-stream.start";
|
|
3994
|
-
var TRANSCRIPTION_STREAM_AUDIO_DONE_FRAME_TYPE = "transcription-stream.audio-done";
|
|
3995
|
-
function parseTranscriptionStreamClientFrame(text) {
|
|
3996
|
-
let value;
|
|
3997
|
-
try {
|
|
3998
|
-
value = secureJsonParse(text);
|
|
3999
|
-
} catch (e) {
|
|
4000
|
-
return { type: "invalid", message: "malformed JSON" };
|
|
4001
|
-
}
|
|
4002
|
-
if (value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
4003
|
-
return { type: "invalid", message: "frame must be a JSON object" };
|
|
4004
|
-
}
|
|
4005
|
-
const frame = value;
|
|
4006
|
-
if (typeof frame.type !== "string") {
|
|
4007
|
-
return { type: "invalid", message: "frame type must be a string" };
|
|
4008
|
-
}
|
|
4009
|
-
switch (frame.type) {
|
|
4010
|
-
case TRANSCRIPTION_STREAM_START_FRAME_TYPE: {
|
|
4011
|
-
const inputAudioFormat = frame.inputAudioFormat;
|
|
4012
|
-
if (inputAudioFormat == null || typeof inputAudioFormat !== "object" || Array.isArray(inputAudioFormat) || typeof inputAudioFormat.type !== "string") {
|
|
4013
|
-
return {
|
|
4014
|
-
type: "invalid",
|
|
4015
|
-
message: "start frame must have an inputAudioFormat object with a string type"
|
|
4016
|
-
};
|
|
4017
|
-
}
|
|
4018
|
-
if (inputAudioFormat.rate !== void 0 && typeof inputAudioFormat.rate !== "number") {
|
|
4019
|
-
return {
|
|
4020
|
-
type: "invalid",
|
|
4021
|
-
message: "inputAudioFormat.rate must be a number when present"
|
|
4022
|
-
};
|
|
4023
|
-
}
|
|
4024
|
-
if (frame.providerOptions !== void 0 && (frame.providerOptions == null || typeof frame.providerOptions !== "object" || Array.isArray(frame.providerOptions))) {
|
|
4025
|
-
return {
|
|
4026
|
-
type: "invalid",
|
|
4027
|
-
message: "providerOptions must be an object when present"
|
|
4028
|
-
};
|
|
4029
|
-
}
|
|
4030
|
-
if (frame.includeRawChunks !== void 0 && typeof frame.includeRawChunks !== "boolean") {
|
|
4031
|
-
return {
|
|
4032
|
-
type: "invalid",
|
|
4033
|
-
message: "includeRawChunks must be a boolean when present"
|
|
4034
|
-
};
|
|
4035
|
-
}
|
|
4036
|
-
return {
|
|
4037
|
-
type: "start",
|
|
4038
|
-
frame
|
|
4039
|
-
};
|
|
4040
|
-
}
|
|
4041
|
-
case TRANSCRIPTION_STREAM_AUDIO_DONE_FRAME_TYPE:
|
|
4042
|
-
return { type: "audio-done" };
|
|
4043
|
-
default:
|
|
4044
|
-
return { type: "unknown" };
|
|
4045
|
-
}
|
|
4046
|
-
}
|
|
4047
|
-
function serializeTranscriptionStreamPart(part) {
|
|
4048
|
-
try {
|
|
4049
|
-
if (part.type === "error" && isError(part.error)) {
|
|
4050
|
-
return JSON.stringify({
|
|
4051
|
-
...part,
|
|
4052
|
-
error: { name: part.error.name, message: part.error.message }
|
|
4053
|
-
});
|
|
4054
|
-
}
|
|
4055
|
-
return JSON.stringify(part);
|
|
4056
|
-
} catch (e) {
|
|
4057
|
-
return void 0;
|
|
4058
|
-
}
|
|
4059
|
-
}
|
|
4060
|
-
function isError(value) {
|
|
4061
|
-
return value instanceof Error || Object.prototype.toString.call(value) === "[object Error]";
|
|
4062
|
-
}
|
|
4063
|
-
function parseTranscriptionStreamPart(text) {
|
|
4064
|
-
let value;
|
|
4065
|
-
try {
|
|
4066
|
-
value = secureJsonParse(text);
|
|
4067
|
-
} catch (e) {
|
|
4068
|
-
return void 0;
|
|
4069
|
-
}
|
|
4070
|
-
if (value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
4071
|
-
return void 0;
|
|
4072
|
-
}
|
|
4073
|
-
const part = value;
|
|
4074
|
-
switch (part.type) {
|
|
4075
|
-
case "stream-start":
|
|
4076
|
-
return Array.isArray(part.warnings) && part.warnings.every(isWarning) ? part : void 0;
|
|
4077
|
-
case "transcript-delta":
|
|
4078
|
-
return isString(part.delta) && isOptional(part.id, isString) && isOptional(part.providerMetadata, isRecord) ? part : void 0;
|
|
4079
|
-
case "transcript-partial":
|
|
4080
|
-
return isString(part.text) && isOptional(part.id, isString) && isOptional(part.startSecond, isNumber) && isOptional(part.durationInSeconds, isNumber) && isOptional(part.channelIndex, isNumber) && isOptional(part.providerMetadata, isRecord) ? part : void 0;
|
|
4081
|
-
case "transcript-final":
|
|
4082
|
-
return isString(part.text) && isOptional(part.id, isString) && isOptional(part.startSecond, isNumber) && isOptional(part.endSecond, isNumber) && isOptional(part.channelIndex, isNumber) && isOptional(part.providerMetadata, isRecord) ? part : void 0;
|
|
4083
|
-
case "finish":
|
|
4084
|
-
return isString(part.text) && Array.isArray(part.segments) && part.segments.every(isSegment) && isOptional(part.language, isString) && isOptional(part.durationInSeconds, isNumber) && isOptional(part.providerMetadata, isRecord) ? part : void 0;
|
|
4085
|
-
case "response-metadata": {
|
|
4086
|
-
if (!(isOptional(part.modelId, isString) && isOptional(part.headers, isRecord))) {
|
|
4087
|
-
return void 0;
|
|
4088
|
-
}
|
|
4089
|
-
const timestamp = part.timestamp;
|
|
4090
|
-
if (timestamp == null) {
|
|
4091
|
-
return { ...part, timestamp: void 0 };
|
|
4092
|
-
}
|
|
4093
|
-
if (typeof timestamp !== "string") {
|
|
4094
|
-
return void 0;
|
|
4095
|
-
}
|
|
4096
|
-
const revived = new Date(timestamp);
|
|
4097
|
-
return Number.isNaN(revived.getTime()) ? void 0 : { ...part, timestamp: revived };
|
|
4098
|
-
}
|
|
4099
|
-
case "raw":
|
|
4100
|
-
return "rawValue" in part ? part : void 0;
|
|
4101
|
-
case "error":
|
|
4102
|
-
return "error" in part ? part : void 0;
|
|
4103
|
-
default:
|
|
4104
|
-
return void 0;
|
|
4105
|
-
}
|
|
4106
|
-
}
|
|
4107
|
-
function isString(value) {
|
|
4108
|
-
return typeof value === "string";
|
|
4109
|
-
}
|
|
4110
|
-
function isNumber(value) {
|
|
4111
|
-
return typeof value === "number";
|
|
4112
|
-
}
|
|
4113
|
-
function isOptional(value, check) {
|
|
4114
|
-
return value === void 0 || check(value);
|
|
4115
|
-
}
|
|
4116
|
-
function isWarning(value) {
|
|
4117
|
-
return isRecord(value) && isString(value.type);
|
|
4118
|
-
}
|
|
4119
|
-
function isSegment(value) {
|
|
4120
|
-
return isRecord(value) && isString(value.text) && isNumber(value.startSecond) && isNumber(value.endSecond);
|
|
4121
|
-
}
|
|
4122
|
-
|
|
4123
|
-
// src/validate-base-url.ts
|
|
4124
|
-
import { InvalidArgumentError as InvalidArgumentError3 } from "@ai-sdk/provider";
|
|
4125
|
-
function validateBaseURL(baseURL) {
|
|
4126
|
-
if ((baseURL == null ? void 0 : baseURL.trim()) === "") {
|
|
4127
|
-
throw new InvalidArgumentError3({
|
|
4128
|
-
argument: "baseURL",
|
|
4129
|
-
message: "baseURL must be a non-empty string."
|
|
4130
|
-
});
|
|
4131
|
-
}
|
|
4132
|
-
return baseURL;
|
|
4133
|
-
}
|
|
4134
|
-
|
|
4135
|
-
// src/without-trailing-slash.ts
|
|
4136
|
-
function withoutTrailingSlash(url) {
|
|
4137
|
-
return url == null ? void 0 : url.replace(/\/$/, "");
|
|
4138
|
-
}
|
|
4139
|
-
|
|
4140
|
-
// src/types/executable-tool.ts
|
|
4141
|
-
function isExecutableTool(tool2) {
|
|
4142
|
-
return tool2 != null && typeof tool2.execute === "function";
|
|
4143
|
-
}
|
|
4144
|
-
|
|
4145
|
-
// src/is-async-iterable.ts
|
|
4146
|
-
function isAsyncIterable(obj) {
|
|
4147
|
-
return obj != null && typeof obj[Symbol.asyncIterator] === "function";
|
|
4148
|
-
}
|
|
4149
|
-
|
|
4150
|
-
// src/types/execute-tool.ts
|
|
4151
|
-
async function* executeTool({
|
|
4152
|
-
tool: tool2,
|
|
4153
|
-
input,
|
|
4154
|
-
options
|
|
4155
|
-
}) {
|
|
4156
|
-
const result = tool2.execute(input, options);
|
|
4157
|
-
if (isAsyncIterable(result)) {
|
|
4158
|
-
let lastOutput;
|
|
4159
|
-
for await (const output of result) {
|
|
4160
|
-
lastOutput = output;
|
|
4161
|
-
yield { type: "preliminary", output };
|
|
4162
|
-
}
|
|
4163
|
-
yield { type: "final", output: lastOutput };
|
|
4164
|
-
} else {
|
|
4165
|
-
yield { type: "final", output: await result };
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
|
-
|
|
4169
|
-
// src/types/tool-caller.ts
|
|
4170
|
-
function toolCaller(tool2, definition) {
|
|
4171
|
-
return Object.defineProperty({ ...tool2 }, "experimental_toolCaller", {
|
|
4172
|
-
value: definition
|
|
4173
|
-
});
|
|
4174
|
-
}
|
|
4175
|
-
function getToolCaller(tool2) {
|
|
4176
|
-
return tool2 == null ? void 0 : tool2.experimental_toolCaller;
|
|
4177
|
-
}
|
|
4178
|
-
|
|
4179
|
-
// src/index.ts
|
|
4180
|
-
import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@workflow/serde";
|
|
4181
|
-
import {
|
|
4182
|
-
EventSourceParserStream as EventSourceParserStream2
|
|
4183
|
-
} from "eventsource-parser/stream";
|
|
4184
|
-
export {
|
|
4185
|
-
DEFAULT_MAX_DOWNLOAD_SIZE,
|
|
4186
|
-
DelayedPromise,
|
|
4187
|
-
DownloadError,
|
|
4188
|
-
EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL as EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL,
|
|
4189
|
-
TRANSCRIPTION_STREAM_AUDIO_DONE_FRAME_TYPE as EXPERIMENTAL_TRANSCRIPTION_STREAM_AUDIO_DONE_FRAME_TYPE,
|
|
4190
|
-
TRANSCRIPTION_STREAM_START_FRAME_TYPE as EXPERIMENTAL_TRANSCRIPTION_STREAM_START_FRAME_TYPE,
|
|
4191
|
-
EventSourceParserStream2 as EventSourceParserStream,
|
|
4192
|
-
SerializationError,
|
|
4193
|
-
StreamingToolCallTracker,
|
|
4194
|
-
VERSION,
|
|
4195
|
-
WORKFLOW_DESERIALIZE,
|
|
4196
|
-
WORKFLOW_SERIALIZE,
|
|
4197
|
-
asArray,
|
|
4198
|
-
asSchema,
|
|
4199
|
-
cancelResponseBody,
|
|
4200
|
-
combineHeaders,
|
|
4201
|
-
connectToWebSocket,
|
|
4202
|
-
convertAsyncIteratorToReadableStream,
|
|
4203
|
-
convertBase64ToUint8Array,
|
|
4204
|
-
convertImageModelFileToDataUri,
|
|
4205
|
-
convertInlineFileDataToUint8Array,
|
|
4206
|
-
convertToBase64,
|
|
4207
|
-
convertToFormData,
|
|
4208
|
-
convertUint8ArrayToBase64,
|
|
4209
|
-
createBinaryResponseHandler,
|
|
4210
|
-
createEventSourceResponseHandler,
|
|
4211
|
-
createIdGenerator,
|
|
4212
|
-
createJsonErrorResponseHandler,
|
|
4213
|
-
createJsonLinesResponseHandler,
|
|
4214
|
-
createJsonResponseHandler,
|
|
4215
|
-
createLanguageModelResponseMetadata,
|
|
4216
|
-
createNullLanguageModelUsage,
|
|
4217
|
-
createProviderDefinedToolFactory,
|
|
4218
|
-
createProviderDefinedToolFactoryWithOutputSchema,
|
|
4219
|
-
createProviderExecutedToolFactory,
|
|
4220
|
-
createProviderStreamError,
|
|
4221
|
-
createStatusCodeErrorResponseHandler,
|
|
4222
|
-
createToolNameMapping,
|
|
4223
|
-
delay,
|
|
4224
|
-
detectMediaType,
|
|
4225
|
-
downloadBlob,
|
|
4226
|
-
dynamicTool,
|
|
4227
|
-
executeTool,
|
|
4228
|
-
getToolCaller as experimental_getToolCaller,
|
|
4229
|
-
parseTranscriptionStreamClientFrame as experimental_parseTranscriptionStreamClientFrame,
|
|
4230
|
-
parseTranscriptionStreamPart as experimental_parseTranscriptionStreamPart,
|
|
4231
|
-
serializeTranscriptionStreamPart as experimental_serializeTranscriptionStreamPart,
|
|
4232
|
-
toolCaller as experimental_toolCaller,
|
|
4233
|
-
extractLines,
|
|
4234
|
-
extractResponseHeaders,
|
|
4235
|
-
fetchWithValidatedRedirects,
|
|
4236
|
-
filterNullable,
|
|
4237
|
-
generateId,
|
|
4238
|
-
getErrorMessage,
|
|
4239
|
-
getFromApi,
|
|
4240
|
-
getRuntimeEnvironmentUserAgent,
|
|
4241
|
-
getTopLevelMediaType,
|
|
4242
|
-
getWebSocketConstructor,
|
|
4243
|
-
injectJsonInstructionIntoMessages,
|
|
4244
|
-
isAbortError,
|
|
4245
|
-
isBrowserRuntime,
|
|
4246
|
-
isBuffer,
|
|
4247
|
-
isCustomReasoning,
|
|
4248
|
-
isExecutableTool,
|
|
4249
|
-
isFullMediaType,
|
|
4250
|
-
isNonNullable,
|
|
4251
|
-
isParsableJson,
|
|
4252
|
-
isProviderReference,
|
|
4253
|
-
isProviderStreamError,
|
|
4254
|
-
isRecord,
|
|
4255
|
-
isSameOrigin,
|
|
4256
|
-
isUrlSupported,
|
|
4257
|
-
jsonSchema,
|
|
4258
|
-
lazySchema,
|
|
4259
|
-
loadApiKey,
|
|
4260
|
-
loadOptionalSetting,
|
|
4261
|
-
loadSetting,
|
|
4262
|
-
mapReasoningToProviderBudget,
|
|
4263
|
-
mapReasoningToProviderEffort,
|
|
4264
|
-
mediaTypeToExtension,
|
|
4265
|
-
normalizeBatchRequestCounts,
|
|
4266
|
-
normalizeHeaders,
|
|
4267
|
-
parseJSON,
|
|
4268
|
-
parseJsonEventStream,
|
|
4269
|
-
parseProviderOptions,
|
|
4270
|
-
postFormDataToApi,
|
|
4271
|
-
postJsonToApi,
|
|
4272
|
-
postToApi,
|
|
4273
|
-
readResponseWithSizeLimit,
|
|
4274
|
-
readWebSocketMessageText,
|
|
4275
|
-
removeUndefinedEntries,
|
|
4276
|
-
resolve,
|
|
4277
|
-
resolveFullMediaType,
|
|
4278
|
-
resolveProviderReference,
|
|
4279
|
-
retryWithExponentialBackoff,
|
|
4280
|
-
safeParseJSON,
|
|
4281
|
-
safeValidateTypes,
|
|
4282
|
-
secureJsonParse,
|
|
4283
|
-
serializeModelOptions,
|
|
4284
|
-
stripFileExtension,
|
|
4285
|
-
toWebSocketUrl,
|
|
4286
|
-
tool,
|
|
4287
|
-
validateBaseURL,
|
|
4288
|
-
validateDownloadUrl,
|
|
4289
|
-
validateTypes,
|
|
4290
|
-
waitForWebSocketBufferDrain,
|
|
4291
|
-
withUserAgentSuffix,
|
|
4292
|
-
withoutTrailingSlash,
|
|
4293
|
-
zodSchema
|
|
4294
|
-
};
|
|
4295
|
-
//# sourceMappingURL=index.js.map
|