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
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
} from "@ai-sdk/provider-utils";
|
|
9
9
|
|
|
10
10
|
// src/chat/openai-chat-language-model.ts
|
|
11
|
+
import {
|
|
12
|
+
InvalidResponseDataError
|
|
13
|
+
} from "@ai-sdk/provider";
|
|
11
14
|
import {
|
|
12
15
|
StreamingToolCallTracker,
|
|
13
16
|
combineHeaders,
|
|
@@ -43,19 +46,23 @@ var openaiFailedResponseHandler = createJsonErrorResponseHandler({
|
|
|
43
46
|
|
|
44
47
|
// src/openai-language-model-capabilities.ts
|
|
45
48
|
function getOpenAILanguageModelCapabilities(modelId) {
|
|
46
|
-
var
|
|
49
|
+
var _a2, _b, _c, _d, _e;
|
|
47
50
|
const oSeriesVersion = getOSeriesVersion(modelId);
|
|
48
51
|
const gptVersion = getGptVersion(modelId);
|
|
49
|
-
const isGptChatModel = (gptVersion == null ? void 0 : gptVersion.minor) == null && ((_b = (
|
|
52
|
+
const isGptChatModel = (gptVersion == null ? void 0 : gptVersion.minor) == null && ((_b = (_a2 = gptVersion == null ? void 0 : gptVersion.variant) == null ? void 0 : _a2.startsWith("chat")) != null ? _b : false);
|
|
50
53
|
const isGptNanoModel = (_d = (_c = gptVersion == null ? void 0 : gptVersion.variant) == null ? void 0 : _c.startsWith("nano")) != null ? _d : false;
|
|
54
|
+
const isGpt6OrLaterModel = gptVersion != null && gptVersion.major >= 6;
|
|
51
55
|
const supportsFlexProcessing = oSeriesVersion != null && oSeriesVersion >= 3 || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
|
|
52
56
|
const supportsPriorityProcessing = modelId.startsWith("gpt-4") || gptVersion != null && gptVersion.major >= 5 && !isGptNanoModel && !isGptChatModel || oSeriesVersion != null && oSeriesVersion >= 3;
|
|
53
57
|
const isReasoningModel = oSeriesVersion != null || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
|
|
54
|
-
const supportsNonReasoningParameters = gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && ((_e = gptVersion.minor) != null ? _e : 0) >= 1);
|
|
58
|
+
const supportsNonReasoningParameters = !isGpt6OrLaterModel && gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && ((_e = gptVersion.minor) != null ? _e : 0) >= 1);
|
|
55
59
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
56
60
|
return {
|
|
57
61
|
supportsFlexProcessing,
|
|
58
62
|
supportsPriorityProcessing,
|
|
63
|
+
supportsConfigurationUpdate: isGpt6OrLaterModel,
|
|
64
|
+
supportsAsyncToolCalling: isGpt6OrLaterModel,
|
|
65
|
+
supportedReasoningEfforts: isGpt6OrLaterModel ? ["low", "medium", "high", "xhigh", "max"] : void 0,
|
|
59
66
|
isReasoningModel,
|
|
60
67
|
systemMessageMode,
|
|
61
68
|
supportsNonReasoningParameters
|
|
@@ -79,6 +86,25 @@ function getGptVersion(modelId) {
|
|
|
79
86
|
|
|
80
87
|
// src/openai-stream-error.ts
|
|
81
88
|
import { APICallError } from "@ai-sdk/provider";
|
|
89
|
+
import {
|
|
90
|
+
createProviderStreamError
|
|
91
|
+
} from "@ai-sdk/provider-utils";
|
|
92
|
+
function createOpenAIProviderStreamError(frame) {
|
|
93
|
+
var _a2, _b;
|
|
94
|
+
const streamError = parseStreamError(frame);
|
|
95
|
+
if (streamError == null) {
|
|
96
|
+
return void 0;
|
|
97
|
+
}
|
|
98
|
+
const statusCode = getStatusCode(streamError);
|
|
99
|
+
return createProviderStreamError({
|
|
100
|
+
message: streamError.message,
|
|
101
|
+
type: (_a2 = streamError.type) != null ? _a2 : void 0,
|
|
102
|
+
code: (_b = streamError.code) != null ? _b : void 0,
|
|
103
|
+
statusCode,
|
|
104
|
+
isRetryable: isRetryableStreamError(streamError, statusCode),
|
|
105
|
+
data: frame
|
|
106
|
+
});
|
|
107
|
+
}
|
|
82
108
|
async function throwIfOpenAIStreamErrorBeforeOutput({
|
|
83
109
|
stream,
|
|
84
110
|
getError,
|
|
@@ -175,20 +201,21 @@ function createOpenAIStreamError({
|
|
|
175
201
|
requestBodyValues,
|
|
176
202
|
responseHeaders
|
|
177
203
|
}) {
|
|
178
|
-
var
|
|
179
|
-
const streamError =
|
|
204
|
+
var _a2, _b;
|
|
205
|
+
const streamError = createOpenAIProviderStreamError(frame);
|
|
180
206
|
return new APICallError({
|
|
181
|
-
message: (
|
|
207
|
+
message: (_a2 = streamError == null ? void 0 : streamError.message) != null ? _a2 : "OpenAI stream failed before any output was generated",
|
|
182
208
|
url,
|
|
183
209
|
requestBodyValues,
|
|
184
|
-
statusCode: streamError == null ?
|
|
210
|
+
statusCode: (_b = streamError == null ? void 0 : streamError.statusCode) != null ? _b : 500,
|
|
185
211
|
responseHeaders,
|
|
186
212
|
responseBody: JSON.stringify(frame),
|
|
187
|
-
data: frame
|
|
213
|
+
data: frame,
|
|
214
|
+
isRetryable: streamError == null ? void 0 : streamError.isRetryable
|
|
188
215
|
});
|
|
189
216
|
}
|
|
190
217
|
function parseStreamError(frame) {
|
|
191
|
-
var
|
|
218
|
+
var _a2;
|
|
192
219
|
const value = asRecord(frame);
|
|
193
220
|
if (value == null) {
|
|
194
221
|
return void 0;
|
|
@@ -199,27 +226,20 @@ function parseStreamError(frame) {
|
|
|
199
226
|
return typeof (responseError == null ? void 0 : responseError.message) === "string" ? {
|
|
200
227
|
message: responseError.message,
|
|
201
228
|
code: getStringOrNumber(responseError.code),
|
|
202
|
-
type: "response.failed"
|
|
203
|
-
frame
|
|
229
|
+
type: "response.failed"
|
|
204
230
|
} : void 0;
|
|
205
231
|
}
|
|
206
|
-
const error = (
|
|
232
|
+
const error = (_a2 = asRecord(value.error)) != null ? _a2 : value;
|
|
207
233
|
return typeof error.message === "string" && (asRecord(value.error) != null || typeof error.type === "string" || "code" in error || "param" in error) ? {
|
|
208
234
|
message: error.message,
|
|
209
235
|
code: getStringOrNumber(error.code),
|
|
210
|
-
type: typeof error.type === "string" ? error.type : void 0
|
|
211
|
-
frame
|
|
236
|
+
type: typeof error.type === "string" ? error.type : void 0
|
|
212
237
|
} : void 0;
|
|
213
238
|
}
|
|
214
239
|
function getStatusCode(error) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (typeof error.code === "string" && /^\d{3}$/.test(error.code)) {
|
|
219
|
-
const numericCode = Number(error.code);
|
|
220
|
-
if (isHttpErrorStatusCode(numericCode)) {
|
|
221
|
-
return numericCode;
|
|
222
|
-
}
|
|
240
|
+
const explicitStatusCode = getHttpStatusCode(error.code);
|
|
241
|
+
if (explicitStatusCode != null) {
|
|
242
|
+
return explicitStatusCode;
|
|
223
243
|
}
|
|
224
244
|
const discriminator = [error.code, error.type].filter((value) => typeof value === "string" || typeof value === "number").join(" ").toLowerCase();
|
|
225
245
|
if (["insufficient_quota", "rate_limit"].some(
|
|
@@ -248,15 +268,28 @@ function getStringOrNumber(value) {
|
|
|
248
268
|
function isHttpErrorStatusCode(value) {
|
|
249
269
|
return Number.isInteger(value) && value >= 400 && value <= 599;
|
|
250
270
|
}
|
|
271
|
+
function getHttpStatusCode(value) {
|
|
272
|
+
const statusCode = typeof value === "string" && /^\d{3}$/.test(value) ? Number(value) : value;
|
|
273
|
+
return typeof statusCode === "number" && isHttpErrorStatusCode(statusCode) ? statusCode : void 0;
|
|
274
|
+
}
|
|
275
|
+
function isRetryableStatusCode(statusCode) {
|
|
276
|
+
return statusCode === 408 || statusCode === 409 || statusCode === 429 || statusCode >= 500;
|
|
277
|
+
}
|
|
278
|
+
function isRetryableStreamError(error, statusCode) {
|
|
279
|
+
if (error.code === "insufficient_quota" || error.type === "insufficient_quota") {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
return isRetryableStatusCode(statusCode);
|
|
283
|
+
}
|
|
251
284
|
|
|
252
285
|
// src/chat/convert-openai-chat-usage.ts
|
|
253
286
|
import { createNullLanguageModelUsage } from "@ai-sdk/provider-utils";
|
|
254
287
|
function convertOpenAIChatUsage(usage) {
|
|
255
|
-
var
|
|
288
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
256
289
|
if (usage == null) {
|
|
257
290
|
return createNullLanguageModelUsage();
|
|
258
291
|
}
|
|
259
|
-
const promptTokens = (
|
|
292
|
+
const promptTokens = (_a2 = usage.prompt_tokens) != null ? _a2 : 0;
|
|
260
293
|
const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;
|
|
261
294
|
const cachedTokens = (_d = (_c = usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0;
|
|
262
295
|
const cacheWriteTokens = (_f = (_e = usage.prompt_tokens_details) == null ? void 0 : _e.cache_write_tokens) != null ? _f : void 0;
|
|
@@ -270,7 +303,7 @@ function convertOpenAIChatUsage(usage) {
|
|
|
270
303
|
},
|
|
271
304
|
outputTokens: {
|
|
272
305
|
total: completionTokens,
|
|
273
|
-
text: completionTokens - reasoningTokens,
|
|
306
|
+
text: Math.max(0, completionTokens - reasoningTokens),
|
|
274
307
|
reasoning: reasoningTokens
|
|
275
308
|
},
|
|
276
309
|
raw: usage
|
|
@@ -288,17 +321,19 @@ import {
|
|
|
288
321
|
resolveProviderReference
|
|
289
322
|
} from "@ai-sdk/provider-utils";
|
|
290
323
|
function serializeToolCallArguments(input) {
|
|
291
|
-
return JSON.stringify(
|
|
324
|
+
return JSON.stringify(
|
|
325
|
+
typeof input === "object" && input !== null && !Array.isArray(input) ? input : {}
|
|
326
|
+
);
|
|
292
327
|
}
|
|
293
328
|
function getPromptCacheBreakpoint(providerOptions) {
|
|
294
|
-
var
|
|
295
|
-
return (
|
|
329
|
+
var _a2;
|
|
330
|
+
return (_a2 = providerOptions == null ? void 0 : providerOptions.openai) == null ? void 0 : _a2.promptCacheBreakpoint;
|
|
296
331
|
}
|
|
297
332
|
function convertToOpenAIChatMessages({
|
|
298
333
|
prompt,
|
|
299
334
|
systemMessageMode = "system"
|
|
300
335
|
}) {
|
|
301
|
-
var
|
|
336
|
+
var _a2, _b;
|
|
302
337
|
const messages = [];
|
|
303
338
|
const warnings = [];
|
|
304
339
|
for (const { role, content, providerOptions } of prompt) {
|
|
@@ -357,7 +392,7 @@ function convertToOpenAIChatMessages({
|
|
|
357
392
|
messages.push({
|
|
358
393
|
role: "user",
|
|
359
394
|
content: content.map((part, index) => {
|
|
360
|
-
var
|
|
395
|
+
var _a3, _b2, _c;
|
|
361
396
|
switch (part.type) {
|
|
362
397
|
case "text": {
|
|
363
398
|
const promptCacheBreakpoint = getPromptCacheBreakpoint(
|
|
@@ -403,7 +438,7 @@ function convertToOpenAIChatMessages({
|
|
|
403
438
|
type: "image_url",
|
|
404
439
|
image_url: {
|
|
405
440
|
url: part.data.type === "url" ? part.data.url.toString() : `data:${resolveFullMediaType({ part })};base64,${convertToBase64(part.data.data)}`,
|
|
406
|
-
detail: (_b2 = (
|
|
441
|
+
detail: (_b2 = (_a3 = part.providerOptions) == null ? void 0 : _a3.openai) == null ? void 0 : _b2.imageDetail
|
|
407
442
|
},
|
|
408
443
|
...promptCacheBreakpoint != null && {
|
|
409
444
|
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
@@ -528,7 +563,7 @@ function convertToOpenAIChatMessages({
|
|
|
528
563
|
continue;
|
|
529
564
|
}
|
|
530
565
|
const output = toolResponse.output;
|
|
531
|
-
const promptCacheBreakpoint = (
|
|
566
|
+
const promptCacheBreakpoint = (_a2 = output.type === "content" ? output.value.map((part) => getPromptCacheBreakpoint(part.providerOptions)).find((breakpoint) => breakpoint != null) : getPromptCacheBreakpoint(output.providerOptions)) != null ? _a2 : getPromptCacheBreakpoint(toolResponse.providerOptions);
|
|
532
567
|
let contentValue;
|
|
533
568
|
switch (output.type) {
|
|
534
569
|
case "text":
|
|
@@ -809,11 +844,12 @@ var openaiLanguageModelChatOptions = lazySchema2(
|
|
|
809
844
|
* - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
|
|
810
845
|
* - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
|
|
811
846
|
* - 'fast': OpenAI's newer name for the 'priority' tier. Interchangeable with it.
|
|
847
|
+
* - 'ultrafast': Access-controlled Ultrafast processing. Only available for gpt-5.6-sol.
|
|
812
848
|
* - 'default': The request will be processed with the standard pricing and performance for the selected model.
|
|
813
849
|
*
|
|
814
850
|
* @default 'auto'
|
|
815
851
|
*/
|
|
816
|
-
serviceTier: z3.enum(["auto", "flex", "priority", "fast", "default"]).optional(),
|
|
852
|
+
serviceTier: z3.enum(["auto", "flex", "priority", "fast", "ultrafast", "default"]).optional(),
|
|
817
853
|
/**
|
|
818
854
|
* Whether to use strict JSON schema validation.
|
|
819
855
|
*
|
|
@@ -882,9 +918,119 @@ var openaiLanguageModelChatOptions = lazySchema2(
|
|
|
882
918
|
);
|
|
883
919
|
|
|
884
920
|
// src/chat/openai-chat-prepare-tools.ts
|
|
921
|
+
import {
|
|
922
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError3
|
|
923
|
+
} from "@ai-sdk/provider";
|
|
924
|
+
|
|
925
|
+
// src/normalize-openai-json-schema.ts
|
|
885
926
|
import {
|
|
886
927
|
UnsupportedFunctionalityError as UnsupportedFunctionalityError2
|
|
887
928
|
} from "@ai-sdk/provider";
|
|
929
|
+
function normalizeOpenAIJsonSchema(schema) {
|
|
930
|
+
let removedPropertyNames = false;
|
|
931
|
+
const normalizedSchema = normalizeSchema(schema);
|
|
932
|
+
return {
|
|
933
|
+
schema: normalizedSchema,
|
|
934
|
+
warnings: removedPropertyNames ? [
|
|
935
|
+
{
|
|
936
|
+
type: "compatibility",
|
|
937
|
+
feature: "JSON Schema propertyNames",
|
|
938
|
+
details: "OpenAI does not support JSON Schema propertyNames. It was removed before sending the schema, so OpenAI will not enforce property-name constraints."
|
|
939
|
+
}
|
|
940
|
+
] : []
|
|
941
|
+
};
|
|
942
|
+
function normalizeSchema(schema2) {
|
|
943
|
+
const propertyNames = schema2.propertyNames;
|
|
944
|
+
if (propertyNames != null) {
|
|
945
|
+
if (typeof propertyNames === "boolean" || propertyNames.type !== "string") {
|
|
946
|
+
throw new UnsupportedFunctionalityError2({
|
|
947
|
+
functionality: "JSON Schema propertyNames that does not use a string schema"
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
removedPropertyNames = true;
|
|
951
|
+
}
|
|
952
|
+
const normalizedSchema2 = { ...schema2 };
|
|
953
|
+
delete normalizedSchema2.propertyNames;
|
|
954
|
+
if (normalizedSchema2.properties != null) {
|
|
955
|
+
normalizedSchema2.properties = normalizeSchemaRecord(
|
|
956
|
+
normalizedSchema2.properties
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
if (normalizedSchema2.patternProperties != null) {
|
|
960
|
+
normalizedSchema2.patternProperties = normalizeSchemaRecord(
|
|
961
|
+
normalizedSchema2.patternProperties
|
|
962
|
+
);
|
|
963
|
+
}
|
|
964
|
+
if (normalizedSchema2.additionalProperties != null) {
|
|
965
|
+
normalizedSchema2.additionalProperties = normalizeDefinition(
|
|
966
|
+
normalizedSchema2.additionalProperties
|
|
967
|
+
);
|
|
968
|
+
}
|
|
969
|
+
if (normalizedSchema2.additionalItems != null) {
|
|
970
|
+
normalizedSchema2.additionalItems = normalizeDefinition(
|
|
971
|
+
normalizedSchema2.additionalItems
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
if (normalizedSchema2.items != null) {
|
|
975
|
+
normalizedSchema2.items = Array.isArray(normalizedSchema2.items) ? normalizedSchema2.items.map(normalizeDefinition) : normalizeDefinition(normalizedSchema2.items);
|
|
976
|
+
}
|
|
977
|
+
if (normalizedSchema2.contains != null) {
|
|
978
|
+
normalizedSchema2.contains = normalizeDefinition(
|
|
979
|
+
normalizedSchema2.contains
|
|
980
|
+
);
|
|
981
|
+
}
|
|
982
|
+
if (normalizedSchema2.not != null) {
|
|
983
|
+
normalizedSchema2.not = normalizeDefinition(normalizedSchema2.not);
|
|
984
|
+
}
|
|
985
|
+
if (normalizedSchema2.allOf != null) {
|
|
986
|
+
normalizedSchema2.allOf = normalizedSchema2.allOf.map(normalizeDefinition);
|
|
987
|
+
}
|
|
988
|
+
if (normalizedSchema2.anyOf != null) {
|
|
989
|
+
normalizedSchema2.anyOf = normalizedSchema2.anyOf.map(normalizeDefinition);
|
|
990
|
+
}
|
|
991
|
+
if (normalizedSchema2.oneOf != null) {
|
|
992
|
+
normalizedSchema2.oneOf = normalizedSchema2.oneOf.map(normalizeDefinition);
|
|
993
|
+
}
|
|
994
|
+
if (normalizedSchema2.definitions != null) {
|
|
995
|
+
normalizedSchema2.definitions = normalizeSchemaRecord(
|
|
996
|
+
normalizedSchema2.definitions
|
|
997
|
+
);
|
|
998
|
+
}
|
|
999
|
+
if (normalizedSchema2.$defs != null) {
|
|
1000
|
+
normalizedSchema2.$defs = normalizeSchemaRecord(normalizedSchema2.$defs);
|
|
1001
|
+
}
|
|
1002
|
+
if (normalizedSchema2.dependencies != null) {
|
|
1003
|
+
normalizedSchema2.dependencies = Object.fromEntries(
|
|
1004
|
+
Object.entries(normalizedSchema2.dependencies).map(
|
|
1005
|
+
([key, dependency]) => [
|
|
1006
|
+
key,
|
|
1007
|
+
Array.isArray(dependency) ? dependency : normalizeDefinition(dependency)
|
|
1008
|
+
]
|
|
1009
|
+
)
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
for (const keyword of ["if", "then", "else"]) {
|
|
1013
|
+
const conditionalSchema = normalizedSchema2[keyword];
|
|
1014
|
+
if (conditionalSchema != null) {
|
|
1015
|
+
normalizedSchema2[keyword] = normalizeDefinition(conditionalSchema);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
return normalizedSchema2;
|
|
1019
|
+
}
|
|
1020
|
+
function normalizeSchemaRecord(schemas) {
|
|
1021
|
+
return Object.fromEntries(
|
|
1022
|
+
Object.entries(schemas).map(([key, schema2]) => [
|
|
1023
|
+
key,
|
|
1024
|
+
normalizeDefinition(schema2)
|
|
1025
|
+
])
|
|
1026
|
+
);
|
|
1027
|
+
}
|
|
1028
|
+
function normalizeDefinition(definition) {
|
|
1029
|
+
return typeof definition === "boolean" ? definition : normalizeSchema(definition);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// src/chat/openai-chat-prepare-tools.ts
|
|
888
1034
|
function prepareChatTools({
|
|
889
1035
|
tools,
|
|
890
1036
|
toolChoice
|
|
@@ -897,17 +1043,22 @@ function prepareChatTools({
|
|
|
897
1043
|
const openaiTools2 = [];
|
|
898
1044
|
for (const tool of tools) {
|
|
899
1045
|
switch (tool.type) {
|
|
900
|
-
case "function":
|
|
1046
|
+
case "function": {
|
|
1047
|
+
const normalizedInputSchema = normalizeOpenAIJsonSchema(
|
|
1048
|
+
tool.inputSchema
|
|
1049
|
+
);
|
|
1050
|
+
toolWarnings.push(...normalizedInputSchema.warnings);
|
|
901
1051
|
openaiTools2.push({
|
|
902
1052
|
type: "function",
|
|
903
1053
|
function: {
|
|
904
1054
|
name: tool.name,
|
|
905
1055
|
description: tool.description,
|
|
906
|
-
parameters:
|
|
1056
|
+
parameters: normalizedInputSchema.schema,
|
|
907
1057
|
...tool.strict != null ? { strict: tool.strict } : {}
|
|
908
1058
|
}
|
|
909
1059
|
});
|
|
910
1060
|
break;
|
|
1061
|
+
}
|
|
911
1062
|
default:
|
|
912
1063
|
toolWarnings.push({
|
|
913
1064
|
type: "unsupported",
|
|
@@ -938,7 +1089,7 @@ function prepareChatTools({
|
|
|
938
1089
|
};
|
|
939
1090
|
default: {
|
|
940
1091
|
const _exhaustiveCheck = type;
|
|
941
|
-
throw new
|
|
1092
|
+
throw new UnsupportedFunctionalityError3({
|
|
942
1093
|
functionality: `tool choice type: ${_exhaustiveCheck}`
|
|
943
1094
|
});
|
|
944
1095
|
}
|
|
@@ -983,15 +1134,25 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
983
1134
|
reasoning,
|
|
984
1135
|
providerOptions
|
|
985
1136
|
}) {
|
|
986
|
-
var
|
|
1137
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
987
1138
|
const warnings = [];
|
|
988
|
-
const openaiOptions = (
|
|
1139
|
+
const openaiOptions = (_a2 = await parseProviderOptions({
|
|
989
1140
|
provider: "openai",
|
|
990
1141
|
providerOptions,
|
|
991
1142
|
schema: openaiLanguageModelChatOptions
|
|
992
|
-
})) != null ?
|
|
1143
|
+
})) != null ? _a2 : {};
|
|
993
1144
|
const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);
|
|
994
|
-
|
|
1145
|
+
let resolvedReasoningEffort = (_b = openaiOptions.reasoningEffort) != null ? _b : isCustomReasoning(reasoning) ? reasoning : void 0;
|
|
1146
|
+
if (resolvedReasoningEffort != null && modelCapabilities.supportedReasoningEfforts != null && !modelCapabilities.supportedReasoningEfforts.includes(
|
|
1147
|
+
resolvedReasoningEffort
|
|
1148
|
+
)) {
|
|
1149
|
+
warnings.push({
|
|
1150
|
+
type: "unsupported",
|
|
1151
|
+
feature: "reasoningEffort",
|
|
1152
|
+
details: `${this.modelId} only supports the following reasoning efforts: ${modelCapabilities.supportedReasoningEfforts.join(", ")}`
|
|
1153
|
+
});
|
|
1154
|
+
resolvedReasoningEffort = void 0;
|
|
1155
|
+
}
|
|
995
1156
|
const isReasoningModel = (_c = openaiOptions.forceReasoning) != null ? _c : modelCapabilities.isReasoningModel;
|
|
996
1157
|
if (topK != null) {
|
|
997
1158
|
warnings.push({ type: "unsupported", feature: "topK" });
|
|
@@ -1004,6 +1165,10 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1004
1165
|
);
|
|
1005
1166
|
warnings.push(...messageWarnings);
|
|
1006
1167
|
const strictJsonSchema = (_e = openaiOptions.strictJsonSchema) != null ? _e : true;
|
|
1168
|
+
const normalizedResponseFormatSchema = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null ? normalizeOpenAIJsonSchema(responseFormat.schema) : void 0;
|
|
1169
|
+
if (normalizedResponseFormatSchema != null) {
|
|
1170
|
+
warnings.push(...normalizedResponseFormatSchema.warnings);
|
|
1171
|
+
}
|
|
1007
1172
|
const baseArgs = {
|
|
1008
1173
|
// model id:
|
|
1009
1174
|
model: this.modelId,
|
|
@@ -1019,10 +1184,10 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1019
1184
|
top_p: topP,
|
|
1020
1185
|
frequency_penalty: frequencyPenalty,
|
|
1021
1186
|
presence_penalty: presencePenalty,
|
|
1022
|
-
response_format: (responseFormat == null ? void 0 : responseFormat.type) === "json" ?
|
|
1187
|
+
response_format: (responseFormat == null ? void 0 : responseFormat.type) === "json" ? normalizedResponseFormatSchema != null ? {
|
|
1023
1188
|
type: "json_schema",
|
|
1024
1189
|
json_schema: {
|
|
1025
|
-
schema:
|
|
1190
|
+
schema: normalizedResponseFormatSchema.schema,
|
|
1026
1191
|
strict: strictJsonSchema,
|
|
1027
1192
|
name: (_f = responseFormat.name) != null ? _f : "response",
|
|
1028
1193
|
description: responseFormat.description
|
|
@@ -1046,6 +1211,14 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1046
1211
|
// messages:
|
|
1047
1212
|
messages
|
|
1048
1213
|
};
|
|
1214
|
+
if (modelCapabilities.supportedReasoningEfforts != null && baseArgs.prompt_cache_retention != null) {
|
|
1215
|
+
baseArgs.prompt_cache_retention = void 0;
|
|
1216
|
+
warnings.push({
|
|
1217
|
+
type: "unsupported",
|
|
1218
|
+
feature: "promptCacheRetention",
|
|
1219
|
+
details: "promptCacheRetention is not supported by GPT-6 and later models; use promptCacheOptions instead"
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1049
1222
|
if (isReasoningModel) {
|
|
1050
1223
|
if (resolvedReasoningEffort !== "none" || !modelCapabilities.supportsNonReasoningParameters) {
|
|
1051
1224
|
if (baseArgs.temperature != null) {
|
|
@@ -1152,7 +1325,7 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1152
1325
|
};
|
|
1153
1326
|
}
|
|
1154
1327
|
async doGenerate(options) {
|
|
1155
|
-
var
|
|
1328
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
1156
1329
|
const { args: body, warnings } = await this.getArgs(options);
|
|
1157
1330
|
const {
|
|
1158
1331
|
responseHeaders,
|
|
@@ -1163,7 +1336,7 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1163
1336
|
path: "/chat/completions",
|
|
1164
1337
|
modelId: this.modelId
|
|
1165
1338
|
}),
|
|
1166
|
-
headers: combineHeaders((_b = (
|
|
1339
|
+
headers: combineHeaders((_b = (_a2 = this.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
1167
1340
|
body,
|
|
1168
1341
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
1169
1342
|
successfulResponseHandler: createJsonResponseHandler(
|
|
@@ -1173,6 +1346,12 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1173
1346
|
fetch: this.config.fetch
|
|
1174
1347
|
});
|
|
1175
1348
|
const choice = response.choices[0];
|
|
1349
|
+
if (choice == null) {
|
|
1350
|
+
throw new InvalidResponseDataError({
|
|
1351
|
+
data: rawResponse,
|
|
1352
|
+
message: "Response did not contain any choices."
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1176
1355
|
const content = [];
|
|
1177
1356
|
const text = choice.message.content;
|
|
1178
1357
|
if (text != null && text.length > 0) {
|
|
@@ -1224,7 +1403,7 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1224
1403
|
};
|
|
1225
1404
|
}
|
|
1226
1405
|
async doStream(options) {
|
|
1227
|
-
var
|
|
1406
|
+
var _a2, _b;
|
|
1228
1407
|
const { args, warnings } = await this.getArgs(options);
|
|
1229
1408
|
const body = {
|
|
1230
1409
|
...args,
|
|
@@ -1239,7 +1418,7 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1239
1418
|
});
|
|
1240
1419
|
const { responseHeaders, value: response } = await postJsonToApi({
|
|
1241
1420
|
url,
|
|
1242
|
-
headers: combineHeaders((_b = (
|
|
1421
|
+
headers: combineHeaders((_b = (_a2 = this.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
1243
1422
|
body,
|
|
1244
1423
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
1245
1424
|
successfulResponseHandler: createEventSourceResponseHandler(
|
|
@@ -1276,7 +1455,7 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1276
1455
|
controller.enqueue({ type: "stream-start", warnings });
|
|
1277
1456
|
},
|
|
1278
1457
|
transform(chunk, controller) {
|
|
1279
|
-
var
|
|
1458
|
+
var _a3, _b2, _c, _d, _e, _f;
|
|
1280
1459
|
if (options.includeRawChunks) {
|
|
1281
1460
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
1282
1461
|
}
|
|
@@ -1288,7 +1467,10 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1288
1467
|
const value = chunk.value;
|
|
1289
1468
|
if ("error" in value) {
|
|
1290
1469
|
finishReason = { unified: "error", raw: void 0 };
|
|
1291
|
-
controller.enqueue({
|
|
1470
|
+
controller.enqueue({
|
|
1471
|
+
type: "error",
|
|
1472
|
+
error: (_a3 = createOpenAIProviderStreamError(value.error)) != null ? _a3 : value.error
|
|
1473
|
+
});
|
|
1292
1474
|
return;
|
|
1293
1475
|
}
|
|
1294
1476
|
if (!metadataExtracted) {
|
|
@@ -1303,11 +1485,11 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1303
1485
|
}
|
|
1304
1486
|
if (value.usage != null) {
|
|
1305
1487
|
usage = value.usage;
|
|
1306
|
-
if (((
|
|
1307
|
-
providerMetadata.openai.acceptedPredictionTokens = (
|
|
1488
|
+
if (((_b2 = value.usage.completion_tokens_details) == null ? void 0 : _b2.accepted_prediction_tokens) != null) {
|
|
1489
|
+
providerMetadata.openai.acceptedPredictionTokens = (_c = value.usage.completion_tokens_details) == null ? void 0 : _c.accepted_prediction_tokens;
|
|
1308
1490
|
}
|
|
1309
|
-
if (((
|
|
1310
|
-
providerMetadata.openai.rejectedPredictionTokens = (
|
|
1491
|
+
if (((_d = value.usage.completion_tokens_details) == null ? void 0 : _d.rejected_prediction_tokens) != null) {
|
|
1492
|
+
providerMetadata.openai.rejectedPredictionTokens = (_e = value.usage.completion_tokens_details) == null ? void 0 : _e.rejected_prediction_tokens;
|
|
1311
1493
|
}
|
|
1312
1494
|
}
|
|
1313
1495
|
const choice = value.choices[0];
|
|
@@ -1317,7 +1499,7 @@ var OpenAIChatLanguageModel = class _OpenAIChatLanguageModel {
|
|
|
1317
1499
|
raw: choice.finish_reason
|
|
1318
1500
|
};
|
|
1319
1501
|
}
|
|
1320
|
-
if (((
|
|
1502
|
+
if (((_f = choice == null ? void 0 : choice.logprobs) == null ? void 0 : _f.content) != null) {
|
|
1321
1503
|
providerMetadata.openai.logprobs = choice.logprobs.content;
|
|
1322
1504
|
}
|
|
1323
1505
|
if ((choice == null ? void 0 : choice.delta) == null) {
|
|
@@ -1397,11 +1579,11 @@ import {
|
|
|
1397
1579
|
// src/completion/convert-openai-completion-usage.ts
|
|
1398
1580
|
import { createNullLanguageModelUsage as createNullLanguageModelUsage2 } from "@ai-sdk/provider-utils";
|
|
1399
1581
|
function convertOpenAICompletionUsage(usage) {
|
|
1400
|
-
var
|
|
1582
|
+
var _a2, _b, _c, _d;
|
|
1401
1583
|
if (usage == null) {
|
|
1402
1584
|
return createNullLanguageModelUsage2();
|
|
1403
1585
|
}
|
|
1404
|
-
const promptTokens = (
|
|
1586
|
+
const promptTokens = (_a2 = usage.prompt_tokens) != null ? _a2 : 0;
|
|
1405
1587
|
const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;
|
|
1406
1588
|
return {
|
|
1407
1589
|
inputTokens: {
|
|
@@ -1422,7 +1604,7 @@ function convertOpenAICompletionUsage(usage) {
|
|
|
1422
1604
|
// src/completion/convert-to-openai-completion-prompt.ts
|
|
1423
1605
|
import {
|
|
1424
1606
|
InvalidPromptError,
|
|
1425
|
-
UnsupportedFunctionalityError as
|
|
1607
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError4
|
|
1426
1608
|
} from "@ai-sdk/provider";
|
|
1427
1609
|
function convertToOpenAICompletionPrompt({
|
|
1428
1610
|
prompt,
|
|
@@ -1465,7 +1647,7 @@ ${userMessage}
|
|
|
1465
1647
|
return part.text;
|
|
1466
1648
|
}
|
|
1467
1649
|
case "tool-call": {
|
|
1468
|
-
throw new
|
|
1650
|
+
throw new UnsupportedFunctionalityError4({
|
|
1469
1651
|
functionality: "tool-call messages"
|
|
1470
1652
|
});
|
|
1471
1653
|
}
|
|
@@ -1478,7 +1660,7 @@ ${assistantMessage}
|
|
|
1478
1660
|
break;
|
|
1479
1661
|
}
|
|
1480
1662
|
case "tool": {
|
|
1481
|
-
throw new
|
|
1663
|
+
throw new UnsupportedFunctionalityError4({
|
|
1482
1664
|
functionality: "tool messages"
|
|
1483
1665
|
});
|
|
1484
1666
|
}
|
|
@@ -1726,7 +1908,7 @@ var OpenAICompletionLanguageModel = class _OpenAICompletionLanguageModel {
|
|
|
1726
1908
|
};
|
|
1727
1909
|
}
|
|
1728
1910
|
async doGenerate(options) {
|
|
1729
|
-
var
|
|
1911
|
+
var _a2, _b, _c;
|
|
1730
1912
|
const { args, warnings } = await this.getArgs(options);
|
|
1731
1913
|
const {
|
|
1732
1914
|
responseHeaders,
|
|
@@ -1737,7 +1919,7 @@ var OpenAICompletionLanguageModel = class _OpenAICompletionLanguageModel {
|
|
|
1737
1919
|
path: "/completions",
|
|
1738
1920
|
modelId: this.modelId
|
|
1739
1921
|
}),
|
|
1740
|
-
headers: combineHeaders2((_b = (
|
|
1922
|
+
headers: combineHeaders2((_b = (_a2 = this.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
1741
1923
|
body: args,
|
|
1742
1924
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
1743
1925
|
successfulResponseHandler: createJsonResponseHandler2(
|
|
@@ -1769,7 +1951,7 @@ var OpenAICompletionLanguageModel = class _OpenAICompletionLanguageModel {
|
|
|
1769
1951
|
};
|
|
1770
1952
|
}
|
|
1771
1953
|
async doStream(options) {
|
|
1772
|
-
var
|
|
1954
|
+
var _a2, _b;
|
|
1773
1955
|
const { args, warnings } = await this.getArgs(options);
|
|
1774
1956
|
const body = {
|
|
1775
1957
|
...args,
|
|
@@ -1784,7 +1966,7 @@ var OpenAICompletionLanguageModel = class _OpenAICompletionLanguageModel {
|
|
|
1784
1966
|
});
|
|
1785
1967
|
const { responseHeaders, value: response } = await postJsonToApi2({
|
|
1786
1968
|
url,
|
|
1787
|
-
headers: combineHeaders2((_b = (
|
|
1969
|
+
headers: combineHeaders2((_b = (_a2 = this.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
1788
1970
|
body,
|
|
1789
1971
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
1790
1972
|
successfulResponseHandler: createEventSourceResponseHandler2(
|
|
@@ -1815,6 +1997,7 @@ var OpenAICompletionLanguageModel = class _OpenAICompletionLanguageModel {
|
|
|
1815
1997
|
controller.enqueue({ type: "stream-start", warnings });
|
|
1816
1998
|
},
|
|
1817
1999
|
transform(chunk, controller) {
|
|
2000
|
+
var _a3;
|
|
1818
2001
|
if (options.includeRawChunks) {
|
|
1819
2002
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
1820
2003
|
}
|
|
@@ -1826,7 +2009,10 @@ var OpenAICompletionLanguageModel = class _OpenAICompletionLanguageModel {
|
|
|
1826
2009
|
const value = chunk.value;
|
|
1827
2010
|
if ("error" in value) {
|
|
1828
2011
|
finishReason = { unified: "error", raw: void 0 };
|
|
1829
|
-
controller.enqueue({
|
|
2012
|
+
controller.enqueue({
|
|
2013
|
+
type: "error",
|
|
2014
|
+
error: (_a3 = createOpenAIProviderStreamError(value.error)) != null ? _a3 : value.error
|
|
2015
|
+
});
|
|
1830
2016
|
return;
|
|
1831
2017
|
}
|
|
1832
2018
|
if (isFirstChunk) {
|
|
@@ -1888,6 +2074,7 @@ import {
|
|
|
1888
2074
|
import {
|
|
1889
2075
|
combineHeaders as combineHeaders3,
|
|
1890
2076
|
createJsonResponseHandler as createJsonResponseHandler3,
|
|
2077
|
+
EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL,
|
|
1891
2078
|
parseProviderOptions as parseProviderOptions3,
|
|
1892
2079
|
postJsonToApi as postJsonToApi3,
|
|
1893
2080
|
serializeModelOptions as serializeModelOptions3,
|
|
@@ -1931,15 +2118,17 @@ var openaiTextEmbeddingResponseSchema = lazySchema6(
|
|
|
1931
2118
|
);
|
|
1932
2119
|
|
|
1933
2120
|
// src/embedding/openai-embedding-model.ts
|
|
2121
|
+
var _a;
|
|
1934
2122
|
var OpenAIEmbeddingModel = class _OpenAIEmbeddingModel {
|
|
1935
2123
|
constructor(modelId, config) {
|
|
1936
2124
|
this.specificationVersion = "v4";
|
|
1937
2125
|
this.maxEmbeddingsPerCall = 2048;
|
|
2126
|
+
this[_a] = 3e5;
|
|
1938
2127
|
this.supportsParallelCalls = true;
|
|
1939
2128
|
this.modelId = modelId;
|
|
1940
2129
|
this.config = config;
|
|
1941
2130
|
}
|
|
1942
|
-
static [WORKFLOW_SERIALIZE3](model) {
|
|
2131
|
+
static [(_a = EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, WORKFLOW_SERIALIZE3)](model) {
|
|
1943
2132
|
return serializeModelOptions3({
|
|
1944
2133
|
modelId: model.modelId,
|
|
1945
2134
|
config: model.config
|
|
@@ -1957,7 +2146,7 @@ var OpenAIEmbeddingModel = class _OpenAIEmbeddingModel {
|
|
|
1957
2146
|
abortSignal,
|
|
1958
2147
|
providerOptions
|
|
1959
2148
|
}) {
|
|
1960
|
-
var
|
|
2149
|
+
var _a2, _b, _c;
|
|
1961
2150
|
if (values.length > this.maxEmbeddingsPerCall) {
|
|
1962
2151
|
throw new TooManyEmbeddingValuesForCallError({
|
|
1963
2152
|
provider: this.provider,
|
|
@@ -1966,11 +2155,11 @@ var OpenAIEmbeddingModel = class _OpenAIEmbeddingModel {
|
|
|
1966
2155
|
values
|
|
1967
2156
|
});
|
|
1968
2157
|
}
|
|
1969
|
-
const openaiOptions = (
|
|
2158
|
+
const openaiOptions = (_a2 = await parseProviderOptions3({
|
|
1970
2159
|
provider: "openai",
|
|
1971
2160
|
providerOptions,
|
|
1972
2161
|
schema: openaiEmbeddingModelOptions
|
|
1973
|
-
})) != null ?
|
|
2162
|
+
})) != null ? _a2 : {};
|
|
1974
2163
|
const {
|
|
1975
2164
|
responseHeaders,
|
|
1976
2165
|
value: response,
|
|
@@ -2005,12 +2194,19 @@ var OpenAIEmbeddingModel = class _OpenAIEmbeddingModel {
|
|
|
2005
2194
|
};
|
|
2006
2195
|
|
|
2007
2196
|
// src/files/openai-files.ts
|
|
2197
|
+
import {
|
|
2198
|
+
InvalidArgumentError
|
|
2199
|
+
} from "@ai-sdk/provider";
|
|
2008
2200
|
import {
|
|
2009
2201
|
combineHeaders as combineHeaders4,
|
|
2010
2202
|
convertInlineFileDataToUint8Array,
|
|
2203
|
+
createBinaryStreamResponseHandler,
|
|
2011
2204
|
createJsonResponseHandler as createJsonResponseHandler4,
|
|
2205
|
+
deleteFromApi,
|
|
2206
|
+
getFromApi,
|
|
2012
2207
|
parseProviderOptions as parseProviderOptions4,
|
|
2013
|
-
postFormDataToApi
|
|
2208
|
+
postFormDataToApi,
|
|
2209
|
+
postMultipartStreamToApi
|
|
2014
2210
|
} from "@ai-sdk/provider-utils";
|
|
2015
2211
|
|
|
2016
2212
|
// src/files/openai-files-api.ts
|
|
@@ -2030,6 +2226,15 @@ var openaiFilesResponseSchema = lazySchema7(
|
|
|
2030
2226
|
})
|
|
2031
2227
|
)
|
|
2032
2228
|
);
|
|
2229
|
+
var openaiFileDeleteResponseSchema = lazySchema7(
|
|
2230
|
+
() => zodSchema7(
|
|
2231
|
+
z8.object({
|
|
2232
|
+
id: z8.string(),
|
|
2233
|
+
object: z8.string().nullish(),
|
|
2234
|
+
deleted: z8.boolean()
|
|
2235
|
+
})
|
|
2236
|
+
)
|
|
2237
|
+
);
|
|
2033
2238
|
|
|
2034
2239
|
// src/files/openai-files-options.ts
|
|
2035
2240
|
import {
|
|
@@ -2052,6 +2257,10 @@ var openaiFilesOptionsSchema = lazySchema8(
|
|
|
2052
2257
|
);
|
|
2053
2258
|
|
|
2054
2259
|
// src/files/openai-files.ts
|
|
2260
|
+
function encodePathSegment(value) {
|
|
2261
|
+
const encodedValue = encodeURIComponent(value);
|
|
2262
|
+
return encodedValue === "." ? "%252E" : encodedValue === ".." ? "%252E%252E" : encodedValue;
|
|
2263
|
+
}
|
|
2055
2264
|
var OpenAIFiles = class {
|
|
2056
2265
|
constructor(config) {
|
|
2057
2266
|
this.config = config;
|
|
@@ -2060,63 +2269,206 @@ var OpenAIFiles = class {
|
|
|
2060
2269
|
get provider() {
|
|
2061
2270
|
return this.config.provider;
|
|
2062
2271
|
}
|
|
2272
|
+
getFileId(file) {
|
|
2273
|
+
const fileId = file.openai;
|
|
2274
|
+
if (fileId == null || fileId.trim() === "") {
|
|
2275
|
+
throw new InvalidArgumentError({
|
|
2276
|
+
argument: "file",
|
|
2277
|
+
message: "file reference is missing an 'openai' file id."
|
|
2278
|
+
});
|
|
2279
|
+
}
|
|
2280
|
+
return fileId;
|
|
2281
|
+
}
|
|
2282
|
+
getHeaders(headers) {
|
|
2283
|
+
return combineHeaders4(this.config.headers(), headers);
|
|
2284
|
+
}
|
|
2063
2285
|
async uploadFile({
|
|
2064
2286
|
data,
|
|
2065
2287
|
mediaType,
|
|
2066
2288
|
filename,
|
|
2289
|
+
abortSignal,
|
|
2290
|
+
headers,
|
|
2067
2291
|
providerOptions
|
|
2068
2292
|
}) {
|
|
2069
|
-
var
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
formData.append("file", blob);
|
|
2293
|
+
var _a2, _b, _c;
|
|
2294
|
+
let openaiOptions;
|
|
2295
|
+
try {
|
|
2296
|
+
openaiOptions = await parseProviderOptions4({
|
|
2297
|
+
provider: "openai",
|
|
2298
|
+
providerOptions,
|
|
2299
|
+
schema: openaiFilesOptionsSchema
|
|
2300
|
+
});
|
|
2301
|
+
} catch (error) {
|
|
2302
|
+
if (data.type === "stream") {
|
|
2303
|
+
await data.stream.cancel(error).catch(() => {
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
throw error;
|
|
2084
2307
|
}
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2308
|
+
const purpose = (_a2 = openaiOptions == null ? void 0 : openaiOptions.purpose) != null ? _a2 : "assistants";
|
|
2309
|
+
const requestHeaders = this.getHeaders(headers);
|
|
2310
|
+
const url = `${this.config.baseURL}/files`;
|
|
2311
|
+
let response;
|
|
2312
|
+
if (data.type === "stream") {
|
|
2313
|
+
const parts = [
|
|
2314
|
+
{ type: "field", name: "purpose", value: purpose }
|
|
2315
|
+
];
|
|
2316
|
+
if ((openaiOptions == null ? void 0 : openaiOptions.expiresAfter) != null) {
|
|
2317
|
+
parts.push(
|
|
2318
|
+
{ type: "field", name: "expires_after[anchor]", value: "created_at" },
|
|
2319
|
+
{
|
|
2320
|
+
type: "field",
|
|
2321
|
+
name: "expires_after[seconds]",
|
|
2322
|
+
value: String(openaiOptions.expiresAfter)
|
|
2323
|
+
}
|
|
2324
|
+
);
|
|
2325
|
+
}
|
|
2326
|
+
parts.push({
|
|
2327
|
+
type: "file",
|
|
2328
|
+
name: "file",
|
|
2329
|
+
filename,
|
|
2330
|
+
mediaType,
|
|
2331
|
+
content: data.stream
|
|
2332
|
+
});
|
|
2333
|
+
({ value: response } = await postMultipartStreamToApi({
|
|
2334
|
+
url,
|
|
2335
|
+
headers: requestHeaders,
|
|
2336
|
+
parts,
|
|
2337
|
+
failedResponseHandler: openaiFailedResponseHandler,
|
|
2338
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
2339
|
+
openaiFilesResponseSchema
|
|
2340
|
+
),
|
|
2341
|
+
abortSignal,
|
|
2342
|
+
fetch: this.config.fetch
|
|
2343
|
+
}));
|
|
2344
|
+
} else {
|
|
2345
|
+
const fileBytes = convertInlineFileDataToUint8Array(data);
|
|
2346
|
+
const blob = new Blob([fileBytes], {
|
|
2347
|
+
type: mediaType
|
|
2348
|
+
});
|
|
2349
|
+
const formData = new FormData();
|
|
2350
|
+
if (filename != null) {
|
|
2351
|
+
formData.append("file", blob, filename);
|
|
2352
|
+
} else {
|
|
2353
|
+
formData.append("file", blob);
|
|
2354
|
+
}
|
|
2355
|
+
formData.append("purpose", purpose);
|
|
2356
|
+
if ((openaiOptions == null ? void 0 : openaiOptions.expiresAfter) != null) {
|
|
2357
|
+
formData.append("expires_after[anchor]", "created_at");
|
|
2358
|
+
formData.append(
|
|
2359
|
+
"expires_after[seconds]",
|
|
2360
|
+
String(openaiOptions.expiresAfter)
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
({ value: response } = await postFormDataToApi({
|
|
2364
|
+
url,
|
|
2365
|
+
headers: requestHeaders,
|
|
2366
|
+
formData,
|
|
2367
|
+
failedResponseHandler: openaiFailedResponseHandler,
|
|
2368
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
2369
|
+
openaiFilesResponseSchema
|
|
2370
|
+
),
|
|
2371
|
+
abortSignal,
|
|
2372
|
+
fetch: this.config.fetch
|
|
2373
|
+
}));
|
|
2092
2374
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2375
|
+
return {
|
|
2376
|
+
warnings: [],
|
|
2377
|
+
providerReference: { openai: response.id },
|
|
2378
|
+
...((_b = response.filename) != null ? _b : filename) ? { filename: (_c = response.filename) != null ? _c : filename } : {},
|
|
2379
|
+
...mediaType != null ? { mediaType } : {},
|
|
2380
|
+
...response.bytes != null ? { byteSize: response.bytes } : {},
|
|
2381
|
+
...response.created_at != null ? { createdAt: new Date(response.created_at * 1e3) } : {},
|
|
2382
|
+
...response.expires_at != null ? { expiresAt: new Date(response.expires_at * 1e3) } : {},
|
|
2383
|
+
providerMetadata: {
|
|
2384
|
+
openai: this.toFileMetadata(response)
|
|
2385
|
+
}
|
|
2386
|
+
};
|
|
2387
|
+
}
|
|
2388
|
+
async getFileMetadata({
|
|
2389
|
+
file,
|
|
2390
|
+
abortSignal,
|
|
2391
|
+
headers
|
|
2392
|
+
}) {
|
|
2393
|
+
const fileId = this.getFileId(file);
|
|
2394
|
+
const { value: response } = await getFromApi({
|
|
2395
|
+
url: `${this.config.baseURL}/files/${encodePathSegment(fileId)}`,
|
|
2396
|
+
headers: this.getHeaders(headers),
|
|
2097
2397
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
2098
2398
|
successfulResponseHandler: createJsonResponseHandler4(
|
|
2099
2399
|
openaiFilesResponseSchema
|
|
2100
2400
|
),
|
|
2101
|
-
|
|
2401
|
+
abortSignal,
|
|
2402
|
+
fetch: this.config.fetch,
|
|
2403
|
+
validateUrl: false
|
|
2102
2404
|
});
|
|
2103
2405
|
return {
|
|
2104
2406
|
warnings: [],
|
|
2105
2407
|
providerReference: { openai: response.id },
|
|
2106
|
-
...
|
|
2107
|
-
...
|
|
2408
|
+
...response.filename != null ? { filename: response.filename } : {},
|
|
2409
|
+
...response.bytes != null ? { byteSize: response.bytes } : {},
|
|
2410
|
+
...response.created_at != null ? { createdAt: new Date(response.created_at * 1e3) } : {},
|
|
2411
|
+
...response.expires_at != null ? { expiresAt: new Date(response.expires_at * 1e3) } : {},
|
|
2108
2412
|
providerMetadata: {
|
|
2109
|
-
openai:
|
|
2110
|
-
...response.filename != null ? { filename: response.filename } : {},
|
|
2111
|
-
...response.purpose != null ? { purpose: response.purpose } : {},
|
|
2112
|
-
...response.bytes != null ? { bytes: response.bytes } : {},
|
|
2113
|
-
...response.created_at != null ? { createdAt: response.created_at } : {},
|
|
2114
|
-
...response.status != null ? { status: response.status } : {},
|
|
2115
|
-
...response.expires_at != null ? { expiresAt: response.expires_at } : {}
|
|
2116
|
-
}
|
|
2413
|
+
openai: this.toFileMetadata(response)
|
|
2117
2414
|
}
|
|
2118
2415
|
};
|
|
2119
2416
|
}
|
|
2417
|
+
async downloadFile({
|
|
2418
|
+
file,
|
|
2419
|
+
abortSignal,
|
|
2420
|
+
headers
|
|
2421
|
+
}) {
|
|
2422
|
+
var _a2;
|
|
2423
|
+
const fileId = this.getFileId(file);
|
|
2424
|
+
const { value: content, responseHeaders } = await getFromApi({
|
|
2425
|
+
url: `${this.config.baseURL}/files/${encodePathSegment(fileId)}/content`,
|
|
2426
|
+
headers: this.getHeaders(headers),
|
|
2427
|
+
failedResponseHandler: openaiFailedResponseHandler,
|
|
2428
|
+
successfulResponseHandler: createBinaryStreamResponseHandler(),
|
|
2429
|
+
abortSignal,
|
|
2430
|
+
fetch: this.config.fetch,
|
|
2431
|
+
validateUrl: false
|
|
2432
|
+
});
|
|
2433
|
+
const mediaType = (_a2 = responseHeaders == null ? void 0 : responseHeaders["content-type"]) == null ? void 0 : _a2.split(";")[0].trim();
|
|
2434
|
+
return {
|
|
2435
|
+
warnings: [],
|
|
2436
|
+
content,
|
|
2437
|
+
...mediaType ? { mediaType } : {}
|
|
2438
|
+
};
|
|
2439
|
+
}
|
|
2440
|
+
async deleteFile({
|
|
2441
|
+
file,
|
|
2442
|
+
abortSignal,
|
|
2443
|
+
headers
|
|
2444
|
+
}) {
|
|
2445
|
+
const fileId = this.getFileId(file);
|
|
2446
|
+
const { value: response } = await deleteFromApi({
|
|
2447
|
+
url: `${this.config.baseURL}/files/${encodePathSegment(fileId)}`,
|
|
2448
|
+
headers: this.getHeaders(headers),
|
|
2449
|
+
failedResponseHandler: openaiFailedResponseHandler,
|
|
2450
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
2451
|
+
openaiFileDeleteResponseSchema
|
|
2452
|
+
),
|
|
2453
|
+
abortSignal,
|
|
2454
|
+
fetch: this.config.fetch
|
|
2455
|
+
});
|
|
2456
|
+
return {
|
|
2457
|
+
warnings: [],
|
|
2458
|
+
providerReference: { openai: response.id },
|
|
2459
|
+
deleted: response.deleted
|
|
2460
|
+
};
|
|
2461
|
+
}
|
|
2462
|
+
toFileMetadata(response) {
|
|
2463
|
+
return {
|
|
2464
|
+
...response.filename != null ? { filename: response.filename } : {},
|
|
2465
|
+
...response.purpose != null ? { purpose: response.purpose } : {},
|
|
2466
|
+
...response.bytes != null ? { bytes: response.bytes } : {},
|
|
2467
|
+
...response.created_at != null ? { createdAt: response.created_at } : {},
|
|
2468
|
+
...response.status != null ? { status: response.status } : {},
|
|
2469
|
+
...response.expires_at != null ? { expiresAt: response.expires_at } : {}
|
|
2470
|
+
};
|
|
2471
|
+
}
|
|
2120
2472
|
};
|
|
2121
2473
|
|
|
2122
2474
|
// src/image/openai-image-model.ts
|
|
@@ -2177,6 +2529,10 @@ var modelMaxImagesPerCall = {
|
|
|
2177
2529
|
"gpt-image-1-mini": 10,
|
|
2178
2530
|
"gpt-image-1.5": 10,
|
|
2179
2531
|
"gpt-image-2": 10,
|
|
2532
|
+
"gpt-image-2.5-flare": 10,
|
|
2533
|
+
"gpt-image-2.5-flare-2026-09-08": 10,
|
|
2534
|
+
"gpt-image-2.5-sunburst": 10,
|
|
2535
|
+
"gpt-image-2.5-sunburst-2026-09-08": 10,
|
|
2180
2536
|
"chatgpt-image-latest": 10
|
|
2181
2537
|
};
|
|
2182
2538
|
var defaultResponseFormatPrefixes = ["chatgpt-image-", "gpt-image-"];
|
|
@@ -2186,16 +2542,17 @@ function hasDefaultResponseFormat(modelId) {
|
|
|
2186
2542
|
);
|
|
2187
2543
|
}
|
|
2188
2544
|
function getMaxImagesPerCall(modelId) {
|
|
2189
|
-
var
|
|
2190
|
-
return (
|
|
2545
|
+
var _a2;
|
|
2546
|
+
return (_a2 = modelMaxImagesPerCall[modelId]) != null ? _a2 : modelId.startsWith("gpt-image-") ? 10 : 1;
|
|
2191
2547
|
}
|
|
2192
2548
|
var baseImageModelOptionsObject = z11.object({
|
|
2193
2549
|
/**
|
|
2194
2550
|
* Quality of the generated image(s).
|
|
2195
2551
|
*
|
|
2196
|
-
* Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
|
|
2552
|
+
* Valid values: `standard`, `hd`, `low`, `medium`, `high`, `xhigh`, `max`, `auto`.
|
|
2553
|
+
* `xhigh` and `max` are supported by GPT Image 2.5 models.
|
|
2197
2554
|
*/
|
|
2198
|
-
quality: z11.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
|
|
2555
|
+
quality: z11.enum(["standard", "hd", "low", "medium", "high", "xhigh", "max", "auto"]).optional(),
|
|
2199
2556
|
/**
|
|
2200
2557
|
* Background behavior for the generated image(s).
|
|
2201
2558
|
*
|
|
@@ -2283,7 +2640,7 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
2283
2640
|
headers,
|
|
2284
2641
|
abortSignal
|
|
2285
2642
|
}) {
|
|
2286
|
-
var
|
|
2643
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
2287
2644
|
const warnings = [];
|
|
2288
2645
|
if (aspectRatio != null) {
|
|
2289
2646
|
warnings.push({
|
|
@@ -2295,7 +2652,7 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
2295
2652
|
if (seed != null) {
|
|
2296
2653
|
warnings.push({ type: "unsupported", feature: "seed" });
|
|
2297
2654
|
}
|
|
2298
|
-
const currentDate = (_c = (_b = (
|
|
2655
|
+
const currentDate = (_c = (_b = (_a2 = this.config._internal) == null ? void 0 : _a2.currentDate) == null ? void 0 : _b.call(_a2)) != null ? _c : /* @__PURE__ */ new Date();
|
|
2299
2656
|
if (files != null) {
|
|
2300
2657
|
const openaiOptions2 = (_d = await parseProviderOptions5({
|
|
2301
2658
|
provider: "openai",
|
|
@@ -2358,10 +2715,10 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
2358
2715
|
providerMetadata: {
|
|
2359
2716
|
openai: {
|
|
2360
2717
|
images: response2.data.map((item, index) => {
|
|
2361
|
-
var
|
|
2718
|
+
var _a3, _b2, _c2, _d2, _e2, _f2;
|
|
2362
2719
|
return {
|
|
2363
2720
|
...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
|
|
2364
|
-
created: (
|
|
2721
|
+
created: (_a3 = response2.created) != null ? _a3 : void 0,
|
|
2365
2722
|
size: (_b2 = response2.size) != null ? _b2 : void 0,
|
|
2366
2723
|
quality: (_c2 = response2.quality) != null ? _c2 : void 0,
|
|
2367
2724
|
background: (_d2 = response2.background) != null ? _d2 : void 0,
|
|
@@ -2425,10 +2782,10 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
2425
2782
|
providerMetadata: {
|
|
2426
2783
|
openai: {
|
|
2427
2784
|
images: response.data.map((item, index) => {
|
|
2428
|
-
var
|
|
2785
|
+
var _a3, _b2, _c2, _d2, _e2, _f2;
|
|
2429
2786
|
return {
|
|
2430
2787
|
...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
|
|
2431
|
-
created: (
|
|
2788
|
+
created: (_a3 = response.created) != null ? _a3 : void 0,
|
|
2432
2789
|
size: (_b2 = response.size) != null ? _b2 : void 0,
|
|
2433
2790
|
quality: (_c2 = response.quality) != null ? _c2 : void 0,
|
|
2434
2791
|
background: (_d2 = response.background) != null ? _d2 : void 0,
|
|
@@ -2673,6 +3030,7 @@ var customArgsSchema = lazySchema14(
|
|
|
2673
3030
|
() => zodSchema14(
|
|
2674
3031
|
z15.object({
|
|
2675
3032
|
description: z15.string().optional(),
|
|
3033
|
+
async: z15.boolean().optional(),
|
|
2676
3034
|
format: z15.union([
|
|
2677
3035
|
z15.object({
|
|
2678
3036
|
type: z15.literal("grammar"),
|
|
@@ -2756,6 +3114,7 @@ import { z as z17 } from "zod/v4";
|
|
|
2756
3114
|
var imageGenerationArgsSchema = lazySchema16(
|
|
2757
3115
|
() => zodSchema16(
|
|
2758
3116
|
z17.object({
|
|
3117
|
+
action: z17.enum(["generate", "edit", "auto"]).optional(),
|
|
2759
3118
|
background: z17.enum(["auto", "opaque", "transparent"]).optional(),
|
|
2760
3119
|
inputFidelity: z17.enum(["low", "high"]).optional(),
|
|
2761
3120
|
inputImageMask: z17.object({
|
|
@@ -2763,12 +3122,15 @@ var imageGenerationArgsSchema = lazySchema16(
|
|
|
2763
3122
|
imageUrl: z17.string().optional()
|
|
2764
3123
|
}).optional(),
|
|
2765
3124
|
model: z17.string().optional(),
|
|
2766
|
-
moderation: z17.enum(["auto"]).optional(),
|
|
3125
|
+
moderation: z17.enum(["auto", "low"]).optional(),
|
|
2767
3126
|
outputCompression: z17.number().int().min(0).max(100).optional(),
|
|
2768
3127
|
outputFormat: z17.enum(["png", "jpeg", "webp"]).optional(),
|
|
2769
3128
|
partialImages: z17.number().int().min(0).max(3).optional(),
|
|
2770
|
-
quality: z17.enum(["auto", "low", "medium", "high"]).optional(),
|
|
2771
|
-
size: z17.
|
|
3129
|
+
quality: z17.enum(["auto", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
3130
|
+
size: z17.union([
|
|
3131
|
+
z17.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]),
|
|
3132
|
+
z17.string().regex(/^\d+x\d+$/)
|
|
3133
|
+
]).optional()
|
|
2772
3134
|
}).strict()
|
|
2773
3135
|
)
|
|
2774
3136
|
);
|
|
@@ -3167,7 +3529,7 @@ var programmaticToolCallingFactory = createProviderExecutedToolFactory7({
|
|
|
3167
3529
|
var programmaticToolCalling = () => experimental_toolCaller(programmaticToolCallingFactory({}), {
|
|
3168
3530
|
type: "provider",
|
|
3169
3531
|
prepareProviderOptions: (providerOptions) => {
|
|
3170
|
-
var
|
|
3532
|
+
var _a2;
|
|
3171
3533
|
const openaiOptions = providerOptions == null ? void 0 : providerOptions.openai;
|
|
3172
3534
|
return {
|
|
3173
3535
|
...providerOptions,
|
|
@@ -3175,7 +3537,7 @@ var programmaticToolCalling = () => experimental_toolCaller(programmaticToolCall
|
|
|
3175
3537
|
...openaiOptions,
|
|
3176
3538
|
allowedCallers: [
|
|
3177
3539
|
.../* @__PURE__ */ new Set([
|
|
3178
|
-
...(
|
|
3540
|
+
...(_a2 = openaiOptions == null ? void 0 : openaiOptions.allowedCallers) != null ? _a2 : [],
|
|
3179
3541
|
"programmatic"
|
|
3180
3542
|
])
|
|
3181
3543
|
]
|
|
@@ -3200,6 +3562,7 @@ var openaiTools = {
|
|
|
3200
3562
|
* `input` field is a string matching the specified grammar.
|
|
3201
3563
|
*
|
|
3202
3564
|
* @param description - An optional description of the tool.
|
|
3565
|
+
* @param async - Whether the model can continue without waiting for the tool result.
|
|
3203
3566
|
* @param format - The output format constraint (grammar type, syntax, and definition).
|
|
3204
3567
|
*/
|
|
3205
3568
|
customTool,
|
|
@@ -3244,7 +3607,7 @@ var openaiTools = {
|
|
|
3244
3607
|
* @param outputCompression - Compression level for the output image (0-100).
|
|
3245
3608
|
* @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.
|
|
3246
3609
|
* @param partialImages - Number of partial images to generate in streaming mode (0-3).
|
|
3247
|
-
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or '
|
|
3610
|
+
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', 'high', 'xhigh', or 'max'. 'xhigh' and 'max' require a GPT Image 2.5 model.
|
|
3248
3611
|
* @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
|
|
3249
3612
|
*/
|
|
3250
3613
|
imageGeneration,
|
|
@@ -3315,24 +3678,24 @@ var openaiTools = {
|
|
|
3315
3678
|
toolSearch
|
|
3316
3679
|
};
|
|
3317
3680
|
|
|
3318
|
-
// src/openai-
|
|
3681
|
+
// src/openai-batch.ts
|
|
3319
3682
|
import {
|
|
3320
|
-
|
|
3321
|
-
|
|
3683
|
+
InvalidArgumentError as InvalidArgumentError2,
|
|
3684
|
+
InvalidResponseDataError as InvalidResponseDataError2,
|
|
3685
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError7
|
|
3322
3686
|
} from "@ai-sdk/provider";
|
|
3323
3687
|
import {
|
|
3324
3688
|
combineHeaders as combineHeaders7,
|
|
3325
3689
|
convertAsyncIteratorToReadableStream,
|
|
3690
|
+
createJsonLinesResponseHandler,
|
|
3326
3691
|
createJsonResponseHandler as createJsonResponseHandler7,
|
|
3327
|
-
getFromApi,
|
|
3692
|
+
getFromApi as getFromApi2,
|
|
3328
3693
|
lazySchema as lazySchema26,
|
|
3329
|
-
|
|
3694
|
+
normalizeBatchRequestCounts,
|
|
3695
|
+
parseProviderOptions as parseProviderOptions8,
|
|
3330
3696
|
postJsonToApi as postJsonToApi6,
|
|
3331
3697
|
postToApi,
|
|
3332
3698
|
safeValidateTypes,
|
|
3333
|
-
validateTypes as validateTypes3,
|
|
3334
|
-
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE6,
|
|
3335
|
-
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE6,
|
|
3336
3699
|
zodSchema as zodSchema26
|
|
3337
3700
|
} from "@ai-sdk/provider-utils";
|
|
3338
3701
|
import { z as z28 } from "zod/v4";
|
|
@@ -3340,13 +3703,13 @@ import { z as z28 } from "zod/v4";
|
|
|
3340
3703
|
// src/responses/convert-openai-responses-usage.ts
|
|
3341
3704
|
import { createNullLanguageModelUsage as createNullLanguageModelUsage3 } from "@ai-sdk/provider-utils";
|
|
3342
3705
|
function convertOpenAIResponsesUsage(usage) {
|
|
3343
|
-
var
|
|
3706
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
3344
3707
|
if (usage == null) {
|
|
3345
3708
|
return createNullLanguageModelUsage3();
|
|
3346
3709
|
}
|
|
3347
3710
|
const inputTokens = usage.input_tokens;
|
|
3348
3711
|
const outputTokens = usage.output_tokens;
|
|
3349
|
-
const cachedTokens = (_b = (
|
|
3712
|
+
const cachedTokens = (_b = (_a2 = usage.input_tokens_details) == null ? void 0 : _a2.cached_tokens) != null ? _b : 0;
|
|
3350
3713
|
const cacheWriteTokens = (_d = (_c = usage.input_tokens_details) == null ? void 0 : _c.cache_write_tokens) != null ? _d : void 0;
|
|
3351
3714
|
const reasoningTokens = (_f = (_e = usage.output_tokens_details) == null ? void 0 : _e.reasoning_tokens) != null ? _f : 0;
|
|
3352
3715
|
return {
|
|
@@ -3385,6 +3748,7 @@ function mapOpenAIResponseFinishReason({
|
|
|
3385
3748
|
|
|
3386
3749
|
// src/responses/openai-responses-api.ts
|
|
3387
3750
|
import {
|
|
3751
|
+
isRecord,
|
|
3388
3752
|
lazySchema as lazySchema24,
|
|
3389
3753
|
zodSchema as zodSchema24
|
|
3390
3754
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3399,6 +3763,31 @@ var jsonValueSchema2 = z25.lazy(
|
|
|
3399
3763
|
z25.record(z25.string(), jsonValueSchema2.optional())
|
|
3400
3764
|
])
|
|
3401
3765
|
);
|
|
3766
|
+
var jsonObjectSchema = z25.record(z25.string(), jsonValueSchema2.optional());
|
|
3767
|
+
var openaiResponsesUsageSchema = z25.intersection(
|
|
3768
|
+
jsonObjectSchema,
|
|
3769
|
+
z25.object({
|
|
3770
|
+
input_tokens: z25.number(),
|
|
3771
|
+
input_tokens_details: z25.intersection(
|
|
3772
|
+
jsonObjectSchema,
|
|
3773
|
+
z25.object({
|
|
3774
|
+
cached_tokens: z25.number().nullish(),
|
|
3775
|
+
cache_write_tokens: z25.number().nullish(),
|
|
3776
|
+
orchestration_input_tokens: z25.number().nullish(),
|
|
3777
|
+
orchestration_input_cached_tokens: z25.number().nullish()
|
|
3778
|
+
})
|
|
3779
|
+
).nullish(),
|
|
3780
|
+
output_tokens: z25.number(),
|
|
3781
|
+
output_tokens_details: z25.intersection(
|
|
3782
|
+
jsonObjectSchema,
|
|
3783
|
+
z25.object({
|
|
3784
|
+
reasoning_tokens: z25.number().nullish(),
|
|
3785
|
+
orchestration_output_tokens: z25.number().nullish()
|
|
3786
|
+
})
|
|
3787
|
+
).nullish(),
|
|
3788
|
+
total_tokens: z25.number().optional()
|
|
3789
|
+
})
|
|
3790
|
+
);
|
|
3402
3791
|
var openaiResponsesComputerSafetyCheckSchema = z25.object({
|
|
3403
3792
|
id: z25.string(),
|
|
3404
3793
|
code: z25.string().nullish(),
|
|
@@ -3482,6 +3871,19 @@ var openaiResponsesProgramOutputSchema = z25.object({
|
|
|
3482
3871
|
result: z25.string(),
|
|
3483
3872
|
status: z25.enum(["completed", "incomplete"])
|
|
3484
3873
|
});
|
|
3874
|
+
var openaiResponsesLocalShellCallSchema = z25.object({
|
|
3875
|
+
type: z25.literal("local_shell_call"),
|
|
3876
|
+
id: z25.string(),
|
|
3877
|
+
call_id: z25.string(),
|
|
3878
|
+
action: z25.object({
|
|
3879
|
+
type: z25.literal("exec"),
|
|
3880
|
+
command: z25.array(z25.string()),
|
|
3881
|
+
timeout_ms: z25.number().optional(),
|
|
3882
|
+
user: z25.string().optional(),
|
|
3883
|
+
working_directory: z25.string().optional(),
|
|
3884
|
+
env: z25.record(z25.string(), z25.string()).optional()
|
|
3885
|
+
})
|
|
3886
|
+
});
|
|
3485
3887
|
var openaiResponsesNestedErrorChunkSchema = z25.object({
|
|
3486
3888
|
type: z25.literal("error"),
|
|
3487
3889
|
sequence_number: z25.number(),
|
|
@@ -3499,6 +3901,64 @@ var openaiResponsesErrorChunkSchema = z25.object({
|
|
|
3499
3901
|
message: z25.string(),
|
|
3500
3902
|
param: z25.string().nullish()
|
|
3501
3903
|
});
|
|
3904
|
+
var openaiResponsesModeledChunkTypes = /* @__PURE__ */ new Set([
|
|
3905
|
+
"error",
|
|
3906
|
+
"response.apply_patch_call_operation_diff.delta",
|
|
3907
|
+
"response.apply_patch_call_operation_diff.done",
|
|
3908
|
+
"response.code_interpreter_call_code.delta",
|
|
3909
|
+
"response.code_interpreter_call_code.done",
|
|
3910
|
+
"response.completed",
|
|
3911
|
+
"response.created",
|
|
3912
|
+
"response.custom_tool_call_input.delta",
|
|
3913
|
+
"response.failed",
|
|
3914
|
+
"response.function_call_arguments.delta",
|
|
3915
|
+
"response.function_call_arguments.done",
|
|
3916
|
+
"response.image_generation_call.partial_image",
|
|
3917
|
+
"response.in_progress",
|
|
3918
|
+
"response.incomplete",
|
|
3919
|
+
"response.output_item.added",
|
|
3920
|
+
"response.output_item.done",
|
|
3921
|
+
"response.output_text.annotation.added",
|
|
3922
|
+
"response.output_text.delta",
|
|
3923
|
+
"response.reasoning_summary_part.added",
|
|
3924
|
+
"response.reasoning_summary_part.done",
|
|
3925
|
+
"response.reasoning_summary_text.delta"
|
|
3926
|
+
]);
|
|
3927
|
+
var openaiResponsesModeledOutputItemTypes = /* @__PURE__ */ new Set([
|
|
3928
|
+
"apply_patch_call",
|
|
3929
|
+
"code_interpreter_call",
|
|
3930
|
+
"compaction",
|
|
3931
|
+
"computer_call",
|
|
3932
|
+
"custom_tool_call",
|
|
3933
|
+
"file_search_call",
|
|
3934
|
+
"function_call",
|
|
3935
|
+
"image_generation_call",
|
|
3936
|
+
"local_shell_call",
|
|
3937
|
+
"mcp_approval_request",
|
|
3938
|
+
"mcp_call",
|
|
3939
|
+
"mcp_list_tools",
|
|
3940
|
+
"message",
|
|
3941
|
+
"program",
|
|
3942
|
+
"program_output",
|
|
3943
|
+
"reasoning",
|
|
3944
|
+
"shell_call",
|
|
3945
|
+
"shell_call_output",
|
|
3946
|
+
"tool_search_call",
|
|
3947
|
+
"tool_search_output",
|
|
3948
|
+
"web_search_call"
|
|
3949
|
+
]);
|
|
3950
|
+
function isModeledOpenAIResponsesChunk(value) {
|
|
3951
|
+
if (typeof value.type !== "string" || !openaiResponsesModeledChunkTypes.has(value.type)) {
|
|
3952
|
+
return false;
|
|
3953
|
+
}
|
|
3954
|
+
if (value.type !== "response.output_item.added" && value.type !== "response.output_item.done") {
|
|
3955
|
+
return true;
|
|
3956
|
+
}
|
|
3957
|
+
if (!isRecord(value.item) || typeof value.item.type !== "string") {
|
|
3958
|
+
return true;
|
|
3959
|
+
}
|
|
3960
|
+
return openaiResponsesModeledOutputItemTypes.has(value.item.type);
|
|
3961
|
+
}
|
|
3502
3962
|
var openaiResponsesChunkSchema = lazySchema24(
|
|
3503
3963
|
() => zodSchema24(
|
|
3504
3964
|
z25.union([
|
|
@@ -3524,20 +3984,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3524
3984
|
type: z25.enum(["response.completed", "response.incomplete"]),
|
|
3525
3985
|
response: z25.object({
|
|
3526
3986
|
incomplete_details: z25.object({ reason: z25.string() }).nullish(),
|
|
3527
|
-
usage:
|
|
3528
|
-
input_tokens: z25.number(),
|
|
3529
|
-
input_tokens_details: z25.object({
|
|
3530
|
-
cached_tokens: z25.number().nullish(),
|
|
3531
|
-
cache_write_tokens: z25.number().nullish(),
|
|
3532
|
-
orchestration_input_tokens: z25.number().nullish(),
|
|
3533
|
-
orchestration_input_cached_tokens: z25.number().nullish()
|
|
3534
|
-
}).nullish(),
|
|
3535
|
-
output_tokens: z25.number(),
|
|
3536
|
-
output_tokens_details: z25.object({
|
|
3537
|
-
reasoning_tokens: z25.number().nullish(),
|
|
3538
|
-
orchestration_output_tokens: z25.number().nullish()
|
|
3539
|
-
}).nullish()
|
|
3540
|
-
}),
|
|
3987
|
+
usage: openaiResponsesUsageSchema.nullish(),
|
|
3541
3988
|
reasoning: z25.object({
|
|
3542
3989
|
context: z25.string().nullish()
|
|
3543
3990
|
}).nullish(),
|
|
@@ -3553,20 +4000,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3553
4000
|
message: z25.string()
|
|
3554
4001
|
}).nullish(),
|
|
3555
4002
|
incomplete_details: z25.object({ reason: z25.string() }).nullish(),
|
|
3556
|
-
usage:
|
|
3557
|
-
input_tokens: z25.number(),
|
|
3558
|
-
input_tokens_details: z25.object({
|
|
3559
|
-
cached_tokens: z25.number().nullish(),
|
|
3560
|
-
cache_write_tokens: z25.number().nullish(),
|
|
3561
|
-
orchestration_input_tokens: z25.number().nullish(),
|
|
3562
|
-
orchestration_input_cached_tokens: z25.number().nullish()
|
|
3563
|
-
}).nullish(),
|
|
3564
|
-
output_tokens: z25.number(),
|
|
3565
|
-
output_tokens_details: z25.object({
|
|
3566
|
-
reasoning_tokens: z25.number().nullish(),
|
|
3567
|
-
orchestration_output_tokens: z25.number().nullish()
|
|
3568
|
-
}).nullish()
|
|
3569
|
-
}).nullish(),
|
|
4003
|
+
usage: openaiResponsesUsageSchema.nullish(),
|
|
3570
4004
|
reasoning: z25.object({
|
|
3571
4005
|
context: z25.string().nullish()
|
|
3572
4006
|
}).nullish(),
|
|
@@ -3611,6 +4045,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3611
4045
|
call_id: z25.string(),
|
|
3612
4046
|
name: z25.string(),
|
|
3613
4047
|
arguments: z25.string(),
|
|
4048
|
+
async: z25.boolean().nullish(),
|
|
3614
4049
|
namespace: z25.string().nullish(),
|
|
3615
4050
|
caller: openaiResponsesToolCallerSchema.nullish()
|
|
3616
4051
|
}),
|
|
@@ -3626,6 +4061,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3626
4061
|
type: z25.literal("file_search_call"),
|
|
3627
4062
|
id: z25.string()
|
|
3628
4063
|
}),
|
|
4064
|
+
openaiResponsesLocalShellCallSchema,
|
|
3629
4065
|
z25.object({
|
|
3630
4066
|
type: z25.literal("image_generation_call"),
|
|
3631
4067
|
id: z25.string()
|
|
@@ -3684,7 +4120,8 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3684
4120
|
id: z25.string(),
|
|
3685
4121
|
call_id: z25.string(),
|
|
3686
4122
|
name: z25.string(),
|
|
3687
|
-
input: z25.string()
|
|
4123
|
+
input: z25.string(),
|
|
4124
|
+
async: z25.boolean().nullish()
|
|
3688
4125
|
}),
|
|
3689
4126
|
z25.object({
|
|
3690
4127
|
type: z25.literal("shell_call"),
|
|
@@ -3757,6 +4194,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3757
4194
|
call_id: z25.string(),
|
|
3758
4195
|
name: z25.string(),
|
|
3759
4196
|
arguments: z25.string(),
|
|
4197
|
+
async: z25.boolean().nullish(),
|
|
3760
4198
|
status: z25.enum(["in_progress", "completed", "incomplete"]),
|
|
3761
4199
|
namespace: z25.string().nullish(),
|
|
3762
4200
|
caller: openaiResponsesToolCallerSchema.nullish()
|
|
@@ -3769,6 +4207,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3769
4207
|
call_id: z25.string(),
|
|
3770
4208
|
name: z25.string(),
|
|
3771
4209
|
input: z25.string(),
|
|
4210
|
+
async: z25.boolean().nullish(),
|
|
3772
4211
|
status: z25.literal("completed")
|
|
3773
4212
|
}),
|
|
3774
4213
|
z25.object({
|
|
@@ -3832,19 +4271,7 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3832
4271
|
})
|
|
3833
4272
|
).nullish()
|
|
3834
4273
|
}),
|
|
3835
|
-
|
|
3836
|
-
type: z25.literal("local_shell_call"),
|
|
3837
|
-
id: z25.string(),
|
|
3838
|
-
call_id: z25.string(),
|
|
3839
|
-
action: z25.object({
|
|
3840
|
-
type: z25.literal("exec"),
|
|
3841
|
-
command: z25.array(z25.string()),
|
|
3842
|
-
timeout_ms: z25.number().optional(),
|
|
3843
|
-
user: z25.string().optional(),
|
|
3844
|
-
working_directory: z25.string().optional(),
|
|
3845
|
-
env: z25.record(z25.string(), z25.string()).optional()
|
|
3846
|
-
})
|
|
3847
|
-
}),
|
|
4274
|
+
openaiResponsesLocalShellCallSchema,
|
|
3848
4275
|
openaiResponsesComputerCallSchema,
|
|
3849
4276
|
z25.object({
|
|
3850
4277
|
type: z25.literal("mcp_call"),
|
|
@@ -3972,6 +4399,14 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
3972
4399
|
output_index: z25.number(),
|
|
3973
4400
|
delta: z25.string()
|
|
3974
4401
|
}),
|
|
4402
|
+
z25.object({
|
|
4403
|
+
// `name` is documented as required but omitted from live API events:
|
|
4404
|
+
// https://github.com/openai/openai-openapi/issues/545
|
|
4405
|
+
type: z25.literal("response.function_call_arguments.done"),
|
|
4406
|
+
item_id: z25.string(),
|
|
4407
|
+
output_index: z25.number(),
|
|
4408
|
+
arguments: z25.string()
|
|
4409
|
+
}),
|
|
3975
4410
|
z25.object({
|
|
3976
4411
|
type: z25.literal("response.custom_tool_call_input.delta"),
|
|
3977
4412
|
item_id: z25.string(),
|
|
@@ -4061,7 +4496,9 @@ var openaiResponsesChunkSchema = lazySchema24(
|
|
|
4061
4496
|
}),
|
|
4062
4497
|
openaiResponsesNestedErrorChunkSchema,
|
|
4063
4498
|
openaiResponsesErrorChunkSchema,
|
|
4064
|
-
z25.object({ type: z25.string() }).loose().
|
|
4499
|
+
z25.object({ type: z25.string() }).loose().refine((value) => !isModeledOpenAIResponsesChunk(value), {
|
|
4500
|
+
message: "Known response chunk failed schema validation"
|
|
4501
|
+
}).transform((value) => ({
|
|
4065
4502
|
type: "unknown_chunk",
|
|
4066
4503
|
message: value.type
|
|
4067
4504
|
}))
|
|
@@ -4201,25 +4638,14 @@ var openaiResponsesResponseSchema = lazySchema24(
|
|
|
4201
4638
|
id: z25.string(),
|
|
4202
4639
|
result: z25.string()
|
|
4203
4640
|
}),
|
|
4204
|
-
|
|
4205
|
-
type: z25.literal("local_shell_call"),
|
|
4206
|
-
id: z25.string(),
|
|
4207
|
-
call_id: z25.string(),
|
|
4208
|
-
action: z25.object({
|
|
4209
|
-
type: z25.literal("exec"),
|
|
4210
|
-
command: z25.array(z25.string()),
|
|
4211
|
-
timeout_ms: z25.number().optional(),
|
|
4212
|
-
user: z25.string().optional(),
|
|
4213
|
-
working_directory: z25.string().optional(),
|
|
4214
|
-
env: z25.record(z25.string(), z25.string()).optional()
|
|
4215
|
-
})
|
|
4216
|
-
}),
|
|
4641
|
+
openaiResponsesLocalShellCallSchema,
|
|
4217
4642
|
z25.object({
|
|
4218
4643
|
type: z25.literal("function_call"),
|
|
4219
4644
|
call_id: z25.string(),
|
|
4220
4645
|
name: z25.string(),
|
|
4221
4646
|
arguments: z25.string(),
|
|
4222
4647
|
id: z25.string(),
|
|
4648
|
+
async: z25.boolean().nullish(),
|
|
4223
4649
|
namespace: z25.string().nullish(),
|
|
4224
4650
|
caller: openaiResponsesToolCallerSchema.nullish()
|
|
4225
4651
|
}),
|
|
@@ -4230,7 +4656,8 @@ var openaiResponsesResponseSchema = lazySchema24(
|
|
|
4230
4656
|
call_id: z25.string(),
|
|
4231
4657
|
name: z25.string(),
|
|
4232
4658
|
input: z25.string(),
|
|
4233
|
-
id: z25.string()
|
|
4659
|
+
id: z25.string(),
|
|
4660
|
+
async: z25.boolean().nullish()
|
|
4234
4661
|
}),
|
|
4235
4662
|
openaiResponsesComputerCallSchema,
|
|
4236
4663
|
z25.object({
|
|
@@ -4369,20 +4796,7 @@ var openaiResponsesResponseSchema = lazySchema24(
|
|
|
4369
4796
|
context: z25.string().nullish()
|
|
4370
4797
|
}).nullish(),
|
|
4371
4798
|
incomplete_details: z25.object({ reason: z25.string() }).nullish(),
|
|
4372
|
-
usage:
|
|
4373
|
-
input_tokens: z25.number(),
|
|
4374
|
-
input_tokens_details: z25.object({
|
|
4375
|
-
cached_tokens: z25.number().nullish(),
|
|
4376
|
-
cache_write_tokens: z25.number().nullish(),
|
|
4377
|
-
orchestration_input_tokens: z25.number().nullish(),
|
|
4378
|
-
orchestration_input_cached_tokens: z25.number().nullish()
|
|
4379
|
-
}).nullish(),
|
|
4380
|
-
output_tokens: z25.number(),
|
|
4381
|
-
output_tokens_details: z25.object({
|
|
4382
|
-
reasoning_tokens: z25.number().nullish(),
|
|
4383
|
-
orchestration_output_tokens: z25.number().nullish()
|
|
4384
|
-
}).nullish()
|
|
4385
|
-
}).optional()
|
|
4799
|
+
usage: openaiResponsesUsageSchema.nullish()
|
|
4386
4800
|
})
|
|
4387
4801
|
)
|
|
4388
4802
|
);
|
|
@@ -4405,9 +4819,31 @@ import {
|
|
|
4405
4819
|
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE5
|
|
4406
4820
|
} from "@ai-sdk/provider-utils";
|
|
4407
4821
|
|
|
4822
|
+
// src/openai-config.ts
|
|
4823
|
+
function prepareOpenAIConfigForWorkflowDeserialize(config) {
|
|
4824
|
+
if (config.provider == null) {
|
|
4825
|
+
throw new Error(
|
|
4826
|
+
"OpenAI model is missing provider after workflow deserialization."
|
|
4827
|
+
);
|
|
4828
|
+
}
|
|
4829
|
+
return {
|
|
4830
|
+
...config,
|
|
4831
|
+
provider: config.provider,
|
|
4832
|
+
url: typeof config.url === "function" ? config.url : ({ path }) => {
|
|
4833
|
+
if (config.baseURL == null) {
|
|
4834
|
+
throw new Error(
|
|
4835
|
+
"OpenAI model is missing baseURL after workflow deserialization."
|
|
4836
|
+
);
|
|
4837
|
+
}
|
|
4838
|
+
return `${config.baseURL}${path}`;
|
|
4839
|
+
},
|
|
4840
|
+
headers: typeof config.headers === "function" ? config.headers : config.headers == null ? void 0 : () => config.headers
|
|
4841
|
+
};
|
|
4842
|
+
}
|
|
4843
|
+
|
|
4408
4844
|
// src/responses/convert-to-openai-responses-input.ts
|
|
4409
4845
|
import {
|
|
4410
|
-
UnsupportedFunctionalityError as
|
|
4846
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError5
|
|
4411
4847
|
} from "@ai-sdk/provider";
|
|
4412
4848
|
import {
|
|
4413
4849
|
convertToBase64 as convertToBase642,
|
|
@@ -4420,15 +4856,272 @@ import {
|
|
|
4420
4856
|
validateTypes
|
|
4421
4857
|
} from "@ai-sdk/provider-utils";
|
|
4422
4858
|
import { z as z26 } from "zod/v4";
|
|
4423
|
-
|
|
4424
|
-
|
|
4859
|
+
|
|
4860
|
+
// src/responses/expand-parallel-tool-call.ts
|
|
4861
|
+
import {
|
|
4862
|
+
isJSONObject
|
|
4863
|
+
} from "@ai-sdk/provider";
|
|
4864
|
+
import { safeParseJSON } from "@ai-sdk/provider-utils";
|
|
4865
|
+
var parallelToolName = "parallel";
|
|
4866
|
+
var recipientNamePrefix = "functions.";
|
|
4867
|
+
function getParallelToolCallMetadata({
|
|
4868
|
+
providerOptions,
|
|
4869
|
+
providerOptionsName
|
|
4870
|
+
}) {
|
|
4871
|
+
var _a2;
|
|
4872
|
+
const metadata = (_a2 = providerOptions == null ? void 0 : providerOptions[providerOptionsName]) == null ? void 0 : _a2.parallelToolCall;
|
|
4873
|
+
if (!isJSONObject(metadata) || typeof metadata.itemId !== "string" || typeof metadata.toolCallId !== "string" || typeof metadata.toolName !== "string" || typeof metadata.input !== "string" || typeof metadata.index !== "number" || !Number.isInteger(metadata.index) || typeof metadata.count !== "number" || !Number.isInteger(metadata.count) || metadata.index < 0 || metadata.count <= metadata.index) {
|
|
4874
|
+
return void 0;
|
|
4875
|
+
}
|
|
4876
|
+
return metadata;
|
|
4425
4877
|
}
|
|
4426
|
-
function
|
|
4427
|
-
|
|
4878
|
+
function isUndeclaredParallelToolCall({
|
|
4879
|
+
toolName,
|
|
4880
|
+
tools
|
|
4881
|
+
}) {
|
|
4882
|
+
return toolName === parallelToolName && !tools.some((tool) => tool.name === parallelToolName);
|
|
4883
|
+
}
|
|
4884
|
+
async function expandParallelToolCall({
|
|
4885
|
+
toolCall,
|
|
4886
|
+
tools,
|
|
4887
|
+
providerOptionsName,
|
|
4888
|
+
itemId
|
|
4889
|
+
}) {
|
|
4890
|
+
if (!isUndeclaredParallelToolCall({ toolName: toolCall.toolName, tools })) {
|
|
4891
|
+
return void 0;
|
|
4892
|
+
}
|
|
4893
|
+
const parsedInput = await safeParseJSON({ text: toolCall.input });
|
|
4894
|
+
if (!parsedInput.success || !isJSONObject(parsedInput.value)) {
|
|
4895
|
+
return void 0;
|
|
4896
|
+
}
|
|
4897
|
+
const toolUses = parsedInput.value.tool_uses;
|
|
4898
|
+
if (!Array.isArray(toolUses) || toolUses.length === 0) {
|
|
4899
|
+
return void 0;
|
|
4900
|
+
}
|
|
4901
|
+
const availableToolNames = new Set(tools.map((tool) => tool.name));
|
|
4902
|
+
const expandedToolCalls = [];
|
|
4903
|
+
for (const [index, toolUse] of toolUses.entries()) {
|
|
4904
|
+
if (!isJSONObject(toolUse)) {
|
|
4905
|
+
return void 0;
|
|
4906
|
+
}
|
|
4907
|
+
const recipientName = toolUse.recipient_name;
|
|
4908
|
+
const parameters = toolUse.parameters;
|
|
4909
|
+
if (typeof recipientName !== "string" || !recipientName.startsWith(recipientNamePrefix) || !isJSONObject(parameters)) {
|
|
4910
|
+
return void 0;
|
|
4911
|
+
}
|
|
4912
|
+
const toolName = recipientName.slice(recipientNamePrefix.length);
|
|
4913
|
+
if (toolName.length === 0 || !availableToolNames.has(toolName)) {
|
|
4914
|
+
return void 0;
|
|
4915
|
+
}
|
|
4916
|
+
expandedToolCalls.push({
|
|
4917
|
+
type: "tool-call",
|
|
4918
|
+
toolCallId: `${toolCall.toolCallId}_${index}`,
|
|
4919
|
+
toolName,
|
|
4920
|
+
input: JSON.stringify(parameters),
|
|
4921
|
+
providerMetadata: {
|
|
4922
|
+
[providerOptionsName]: {
|
|
4923
|
+
parallelToolCall: {
|
|
4924
|
+
itemId,
|
|
4925
|
+
toolCallId: toolCall.toolCallId,
|
|
4926
|
+
toolName: toolCall.toolName,
|
|
4927
|
+
input: toolCall.input,
|
|
4928
|
+
index,
|
|
4929
|
+
count: toolUses.length
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
}
|
|
4933
|
+
});
|
|
4934
|
+
}
|
|
4935
|
+
return expandedToolCalls;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
// src/responses/convert-to-openai-responses-input.ts
|
|
4939
|
+
function serializeToolCallArguments2(input) {
|
|
4940
|
+
return JSON.stringify(input === void 0 ? {} : input);
|
|
4941
|
+
}
|
|
4942
|
+
function mapToolCaller(caller) {
|
|
4943
|
+
return caller == null ? void 0 : caller.type === "program" ? { type: "program", caller_id: caller.callerId } : caller;
|
|
4944
|
+
}
|
|
4945
|
+
async function convertFunctionToolResultOutput({
|
|
4946
|
+
output,
|
|
4947
|
+
toolName,
|
|
4948
|
+
outputSchemaToolNames,
|
|
4949
|
+
promptCacheBreakpoint,
|
|
4950
|
+
providerOptionsName,
|
|
4951
|
+
warnings
|
|
4952
|
+
}) {
|
|
4953
|
+
var _a2;
|
|
4954
|
+
const hasOutputSchema = outputSchemaToolNames == null ? void 0 : outputSchemaToolNames.has(toolName);
|
|
4955
|
+
const convertScalarOutput = (value) => promptCacheBreakpoint == null ? value : [
|
|
4956
|
+
{
|
|
4957
|
+
type: "input_text",
|
|
4958
|
+
text: value,
|
|
4959
|
+
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
4960
|
+
}
|
|
4961
|
+
];
|
|
4962
|
+
switch (output.type) {
|
|
4963
|
+
case "text":
|
|
4964
|
+
case "error-text":
|
|
4965
|
+
return convertScalarOutput(
|
|
4966
|
+
hasOutputSchema ? JSON.stringify(output.value) : output.value
|
|
4967
|
+
);
|
|
4968
|
+
case "execution-denied": {
|
|
4969
|
+
const reason = (_a2 = output.reason) != null ? _a2 : "Tool call execution denied.";
|
|
4970
|
+
return convertScalarOutput(
|
|
4971
|
+
hasOutputSchema ? JSON.stringify(reason) : reason
|
|
4972
|
+
);
|
|
4973
|
+
}
|
|
4974
|
+
case "json":
|
|
4975
|
+
case "error-json":
|
|
4976
|
+
return convertScalarOutput(JSON.stringify(output.value));
|
|
4977
|
+
case "content":
|
|
4978
|
+
return output.value.map((item) => {
|
|
4979
|
+
var _a3, _b, _c;
|
|
4980
|
+
const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
|
|
4981
|
+
item.providerOptions,
|
|
4982
|
+
providerOptionsName
|
|
4983
|
+
);
|
|
4984
|
+
switch (item.type) {
|
|
4985
|
+
case "text": {
|
|
4986
|
+
return {
|
|
4987
|
+
type: "input_text",
|
|
4988
|
+
text: item.text,
|
|
4989
|
+
...promptCacheBreakpoint2 != null && {
|
|
4990
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
4991
|
+
}
|
|
4992
|
+
};
|
|
4993
|
+
}
|
|
4994
|
+
case "file": {
|
|
4995
|
+
const topLevel = getTopLevelMediaType2(item.mediaType);
|
|
4996
|
+
const imageDetail = (_b = (_a3 = item.providerOptions) == null ? void 0 : _a3[providerOptionsName]) == null ? void 0 : _b.imageDetail;
|
|
4997
|
+
if (item.data.type === "data") {
|
|
4998
|
+
const fullMediaType = resolveFullMediaType2({ part: item });
|
|
4999
|
+
if (topLevel === "image") {
|
|
5000
|
+
return {
|
|
5001
|
+
type: "input_image",
|
|
5002
|
+
image_url: `data:${fullMediaType};base64,${convertToBase642(item.data.data)}`,
|
|
5003
|
+
detail: imageDetail,
|
|
5004
|
+
...promptCacheBreakpoint2 != null && {
|
|
5005
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5006
|
+
}
|
|
5007
|
+
};
|
|
5008
|
+
}
|
|
5009
|
+
return {
|
|
5010
|
+
type: "input_file",
|
|
5011
|
+
filename: (_c = item.filename) != null ? _c : "data",
|
|
5012
|
+
file_data: `data:${fullMediaType};base64,${convertToBase642(item.data.data)}`,
|
|
5013
|
+
...promptCacheBreakpoint2 != null && {
|
|
5014
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5015
|
+
}
|
|
5016
|
+
};
|
|
5017
|
+
}
|
|
5018
|
+
if (item.data.type === "url") {
|
|
5019
|
+
if (topLevel === "image") {
|
|
5020
|
+
return {
|
|
5021
|
+
type: "input_image",
|
|
5022
|
+
image_url: item.data.url.toString(),
|
|
5023
|
+
detail: imageDetail,
|
|
5024
|
+
...promptCacheBreakpoint2 != null && {
|
|
5025
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5026
|
+
}
|
|
5027
|
+
};
|
|
5028
|
+
}
|
|
5029
|
+
return {
|
|
5030
|
+
type: "input_file",
|
|
5031
|
+
file_url: item.data.url.toString(),
|
|
5032
|
+
...promptCacheBreakpoint2 != null && {
|
|
5033
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5034
|
+
}
|
|
5035
|
+
};
|
|
5036
|
+
}
|
|
5037
|
+
warnings.push({
|
|
5038
|
+
type: "other",
|
|
5039
|
+
message: `unsupported tool content part type: ${item.type} with data type: ${item.data.type}`
|
|
5040
|
+
});
|
|
5041
|
+
return void 0;
|
|
5042
|
+
}
|
|
5043
|
+
default: {
|
|
5044
|
+
warnings.push({
|
|
5045
|
+
type: "other",
|
|
5046
|
+
message: `unsupported tool content part type: ${item.type}`
|
|
5047
|
+
});
|
|
5048
|
+
return void 0;
|
|
5049
|
+
}
|
|
5050
|
+
}
|
|
5051
|
+
}).filter(isNonNullable);
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5054
|
+
function hasSameParallelToolCall(first, second) {
|
|
5055
|
+
return first.itemId === second.itemId && first.toolCallId === second.toolCallId && first.toolName === second.toolName && first.input === second.input && first.count === second.count;
|
|
5056
|
+
}
|
|
5057
|
+
function collectCompleteParallelToolResultGroups({
|
|
5058
|
+
prompt,
|
|
5059
|
+
providerOptionsName
|
|
5060
|
+
}) {
|
|
5061
|
+
const pendingGroups = /* @__PURE__ */ new Map();
|
|
5062
|
+
for (const message of prompt) {
|
|
5063
|
+
if (message.role !== "tool") {
|
|
5064
|
+
continue;
|
|
5065
|
+
}
|
|
5066
|
+
for (const part of message.content) {
|
|
5067
|
+
if (part.type !== "tool-result") {
|
|
5068
|
+
continue;
|
|
5069
|
+
}
|
|
5070
|
+
const metadata = getParallelToolCallMetadata({
|
|
5071
|
+
providerOptions: part.providerOptions,
|
|
5072
|
+
providerOptionsName
|
|
5073
|
+
});
|
|
5074
|
+
if (metadata == null) {
|
|
5075
|
+
continue;
|
|
5076
|
+
}
|
|
5077
|
+
const existing = pendingGroups.get(metadata.toolCallId);
|
|
5078
|
+
if (existing == null) {
|
|
5079
|
+
pendingGroups.set(metadata.toolCallId, {
|
|
5080
|
+
metadata,
|
|
5081
|
+
results: /* @__PURE__ */ new Map([[metadata.index, part]]),
|
|
5082
|
+
invalid: false
|
|
5083
|
+
});
|
|
5084
|
+
continue;
|
|
5085
|
+
}
|
|
5086
|
+
if (!hasSameParallelToolCall(existing.metadata, metadata) || existing.results.has(metadata.index)) {
|
|
5087
|
+
existing.invalid = true;
|
|
5088
|
+
continue;
|
|
5089
|
+
}
|
|
5090
|
+
existing.results.set(metadata.index, part);
|
|
5091
|
+
}
|
|
5092
|
+
}
|
|
5093
|
+
const completeGroups = /* @__PURE__ */ new Map();
|
|
5094
|
+
for (const [toolCallId, group] of pendingGroups) {
|
|
5095
|
+
if (group.invalid || group.results.size !== group.metadata.count) {
|
|
5096
|
+
continue;
|
|
5097
|
+
}
|
|
5098
|
+
const results = Array.from(
|
|
5099
|
+
{ length: group.metadata.count },
|
|
5100
|
+
(_, index) => group.results.get(index)
|
|
5101
|
+
);
|
|
5102
|
+
if (results.every(isNonNullable)) {
|
|
5103
|
+
completeGroups.set(toolCallId, {
|
|
5104
|
+
metadata: group.metadata,
|
|
5105
|
+
results
|
|
5106
|
+
});
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
5109
|
+
return completeGroups;
|
|
4428
5110
|
}
|
|
4429
5111
|
function getPromptCacheBreakpoint2(providerOptions, providerOptionsName) {
|
|
4430
|
-
var
|
|
4431
|
-
return (
|
|
5112
|
+
var _a2;
|
|
5113
|
+
return (_a2 = providerOptions == null ? void 0 : providerOptions[providerOptionsName]) == null ? void 0 : _a2.promptCacheBreakpoint;
|
|
5114
|
+
}
|
|
5115
|
+
function getScalarToolResultPromptCacheBreakpoint({
|
|
5116
|
+
output,
|
|
5117
|
+
toolResultProviderOptions,
|
|
5118
|
+
providerOptionsName
|
|
5119
|
+
}) {
|
|
5120
|
+
var _a2;
|
|
5121
|
+
return output.type === "content" ? void 0 : (_a2 = getPromptCacheBreakpoint2(output.providerOptions, providerOptionsName)) != null ? _a2 : getPromptCacheBreakpoint2(
|
|
5122
|
+
toolResultProviderOptions,
|
|
5123
|
+
providerOptionsName
|
|
5124
|
+
);
|
|
4432
5125
|
}
|
|
4433
5126
|
function isFileId(data, prefixes) {
|
|
4434
5127
|
if (!prefixes) return false;
|
|
@@ -4439,6 +5132,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4439
5132
|
toolNameMapping,
|
|
4440
5133
|
systemMessageMode,
|
|
4441
5134
|
providerOptionsName,
|
|
5135
|
+
explicitMessageItemType = false,
|
|
4442
5136
|
fileIdPrefixes,
|
|
4443
5137
|
passThroughUnsupportedFiles = false,
|
|
4444
5138
|
store,
|
|
@@ -4448,13 +5142,21 @@ async function convertToOpenAIResponsesInput({
|
|
|
4448
5142
|
hasShellTool = false,
|
|
4449
5143
|
hasApplyPatchTool = false,
|
|
4450
5144
|
hasComputerTool = false,
|
|
5145
|
+
toolSearchToolName,
|
|
4451
5146
|
customProviderToolNames,
|
|
4452
5147
|
outputSchemaToolNames
|
|
4453
5148
|
}) {
|
|
4454
|
-
var
|
|
5149
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P;
|
|
4455
5150
|
let input = [];
|
|
4456
5151
|
const warnings = [];
|
|
4457
5152
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
5153
|
+
const programmaticToolCallIds = /* @__PURE__ */ new Set();
|
|
5154
|
+
const parallelToolResultGroups = hasConversation || hasPreviousResponseId ? collectCompleteParallelToolResultGroups({
|
|
5155
|
+
prompt,
|
|
5156
|
+
providerOptionsName
|
|
5157
|
+
}) : /* @__PURE__ */ new Map();
|
|
5158
|
+
const emittedParallelToolCalls = /* @__PURE__ */ new Set();
|
|
5159
|
+
const emittedParallelToolResults = /* @__PURE__ */ new Set();
|
|
4458
5160
|
for (const { role, content, providerOptions } of prompt) {
|
|
4459
5161
|
switch (role) {
|
|
4460
5162
|
case "system": {
|
|
@@ -4465,6 +5167,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4465
5167
|
providerOptionsName
|
|
4466
5168
|
);
|
|
4467
5169
|
input.push({
|
|
5170
|
+
...explicitMessageItemType && { type: "message" },
|
|
4468
5171
|
role: "system",
|
|
4469
5172
|
content: promptCacheBreakpoint == null ? content : [
|
|
4470
5173
|
{
|
|
@@ -4482,6 +5185,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4482
5185
|
providerOptionsName
|
|
4483
5186
|
);
|
|
4484
5187
|
input.push({
|
|
5188
|
+
...explicitMessageItemType && { type: "message" },
|
|
4485
5189
|
role: "developer",
|
|
4486
5190
|
content: promptCacheBreakpoint == null ? content : [
|
|
4487
5191
|
{
|
|
@@ -4511,9 +5215,10 @@ async function convertToOpenAIResponsesInput({
|
|
|
4511
5215
|
}
|
|
4512
5216
|
case "user": {
|
|
4513
5217
|
input.push({
|
|
5218
|
+
...explicitMessageItemType && { type: "message" },
|
|
4514
5219
|
role: "user",
|
|
4515
5220
|
content: content.map((part, index) => {
|
|
4516
|
-
var
|
|
5221
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
4517
5222
|
switch (part.type) {
|
|
4518
5223
|
case "text": {
|
|
4519
5224
|
const promptCacheBreakpoint = getPromptCacheBreakpoint2(
|
|
@@ -4543,7 +5248,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4543
5248
|
return {
|
|
4544
5249
|
type: "input_image",
|
|
4545
5250
|
file_id: fileId,
|
|
4546
|
-
detail: (_b2 = (
|
|
5251
|
+
detail: (_b2 = (_a3 = part.providerOptions) == null ? void 0 : _a3[providerOptionsName]) == null ? void 0 : _b2.imageDetail,
|
|
4547
5252
|
...promptCacheBreakpoint != null && {
|
|
4548
5253
|
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
4549
5254
|
}
|
|
@@ -4558,7 +5263,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4558
5263
|
};
|
|
4559
5264
|
}
|
|
4560
5265
|
case "text": {
|
|
4561
|
-
throw new
|
|
5266
|
+
throw new UnsupportedFunctionalityError5({
|
|
4562
5267
|
functionality: "text file parts"
|
|
4563
5268
|
});
|
|
4564
5269
|
}
|
|
@@ -4588,7 +5293,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4588
5293
|
}
|
|
4589
5294
|
const fullMediaType = resolveFullMediaType2({ part });
|
|
4590
5295
|
if (fullMediaType !== "application/pdf" && !passThroughUnsupportedFiles) {
|
|
4591
|
-
throw new
|
|
5296
|
+
throw new UnsupportedFunctionalityError5({
|
|
4592
5297
|
functionality: `file part media type ${fullMediaType}`
|
|
4593
5298
|
});
|
|
4594
5299
|
}
|
|
@@ -4616,7 +5321,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4616
5321
|
for (const part of content) {
|
|
4617
5322
|
switch (part.type) {
|
|
4618
5323
|
case "text": {
|
|
4619
|
-
const providerOptions2 = (
|
|
5324
|
+
const providerOptions2 = (_a2 = part.providerOptions) == null ? void 0 : _a2[providerOptionsName];
|
|
4620
5325
|
const id = providerOptions2 == null ? void 0 : providerOptions2.itemId;
|
|
4621
5326
|
const phase = providerOptions2 == null ? void 0 : providerOptions2.phase;
|
|
4622
5327
|
if (hasConversation && id != null) {
|
|
@@ -4627,6 +5332,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4627
5332
|
break;
|
|
4628
5333
|
}
|
|
4629
5334
|
input.push({
|
|
5335
|
+
...explicitMessageItemType && { type: "message" },
|
|
4630
5336
|
role: "assistant",
|
|
4631
5337
|
content: [{ type: "output_text", text: part.text }],
|
|
4632
5338
|
id,
|
|
@@ -4635,16 +5341,48 @@ async function convertToOpenAIResponsesInput({
|
|
|
4635
5341
|
break;
|
|
4636
5342
|
}
|
|
4637
5343
|
case "tool-call": {
|
|
5344
|
+
const parallelToolCallMetadata = getParallelToolCallMetadata({
|
|
5345
|
+
providerOptions: part.providerOptions,
|
|
5346
|
+
providerOptionsName
|
|
5347
|
+
});
|
|
5348
|
+
const parallelToolResultGroup = parallelToolCallMetadata == null ? void 0 : parallelToolResultGroups.get(
|
|
5349
|
+
parallelToolCallMetadata.toolCallId
|
|
5350
|
+
);
|
|
5351
|
+
if (parallelToolCallMetadata != null && parallelToolResultGroup != null && hasSameParallelToolCall(
|
|
5352
|
+
parallelToolResultGroup.metadata,
|
|
5353
|
+
parallelToolCallMetadata
|
|
5354
|
+
)) {
|
|
5355
|
+
if (!emittedParallelToolCalls.has(
|
|
5356
|
+
parallelToolResultGroup.metadata.toolCallId
|
|
5357
|
+
)) {
|
|
5358
|
+
emittedParallelToolCalls.add(
|
|
5359
|
+
parallelToolResultGroup.metadata.toolCallId
|
|
5360
|
+
);
|
|
5361
|
+
if (!hasConversation) {
|
|
5362
|
+
input.push({
|
|
5363
|
+
type: "function_call",
|
|
5364
|
+
call_id: parallelToolResultGroup.metadata.toolCallId,
|
|
5365
|
+
name: parallelToolResultGroup.metadata.toolName,
|
|
5366
|
+
arguments: parallelToolResultGroup.metadata.input
|
|
5367
|
+
});
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5370
|
+
break;
|
|
5371
|
+
}
|
|
4638
5372
|
const id = (_f = (_c = (_b = part.providerOptions) == null ? void 0 : _b[providerOptionsName]) == null ? void 0 : _c.itemId) != null ? _f : (_e = (_d = part.providerMetadata) == null ? void 0 : _d[providerOptionsName]) == null ? void 0 : _e.itemId;
|
|
4639
5373
|
const namespace = (_k = (_h = (_g = part.providerOptions) == null ? void 0 : _g[providerOptionsName]) == null ? void 0 : _h.namespace) != null ? _k : (_j = (_i = part.providerMetadata) == null ? void 0 : _i[providerOptionsName]) == null ? void 0 : _j.namespace;
|
|
4640
|
-
const
|
|
5374
|
+
const isAsync = (_p = (_m = (_l = part.providerOptions) == null ? void 0 : _l[providerOptionsName]) == null ? void 0 : _m.async) != null ? _p : (_o = (_n = part.providerMetadata) == null ? void 0 : _n[providerOptionsName]) == null ? void 0 : _o.async;
|
|
5375
|
+
const caller = (_r = (_q = part.providerOptions) == null ? void 0 : _q[providerOptionsName]) == null ? void 0 : _r.caller;
|
|
5376
|
+
if ((caller == null ? void 0 : caller.type) === "program") {
|
|
5377
|
+
programmaticToolCallIds.add(part.toolCallId);
|
|
5378
|
+
}
|
|
4641
5379
|
if (hasConversation && id != null) {
|
|
4642
5380
|
break;
|
|
4643
5381
|
}
|
|
4644
5382
|
const resolvedToolName = toolNameMapping.toProviderToolName(
|
|
4645
5383
|
part.toolName
|
|
4646
5384
|
);
|
|
4647
|
-
if (
|
|
5385
|
+
if (part.toolName === toolSearchToolName) {
|
|
4648
5386
|
if (store && id != null) {
|
|
4649
5387
|
input.push({ type: "item_reference", id });
|
|
4650
5388
|
break;
|
|
@@ -4661,7 +5399,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4661
5399
|
type: "tool_search_call",
|
|
4662
5400
|
id: id != null ? id : part.toolCallId,
|
|
4663
5401
|
execution,
|
|
4664
|
-
call_id: (
|
|
5402
|
+
call_id: (_s = parsedInput.call_id) != null ? _s : null,
|
|
4665
5403
|
status: "completed",
|
|
4666
5404
|
arguments: parsedInput.arguments
|
|
4667
5405
|
});
|
|
@@ -4693,7 +5431,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4693
5431
|
break;
|
|
4694
5432
|
}
|
|
4695
5433
|
}
|
|
4696
|
-
const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || hasComputerTool && resolvedToolName === "computer" || ((
|
|
5434
|
+
const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || hasComputerTool && resolvedToolName === "computer" || ((_t = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _t : false);
|
|
4697
5435
|
if (hasPreviousResponseId && store && id != null && isProviderDefinedToolCall) {
|
|
4698
5436
|
break;
|
|
4699
5437
|
}
|
|
@@ -4806,6 +5544,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4806
5544
|
call_id: part.toolCallId,
|
|
4807
5545
|
name: resolvedToolName,
|
|
4808
5546
|
input: typeof part.input === "string" ? part.input : JSON.stringify(part.input),
|
|
5547
|
+
...isAsync != null && { async: isAsync },
|
|
4809
5548
|
id
|
|
4810
5549
|
});
|
|
4811
5550
|
break;
|
|
@@ -4815,6 +5554,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4815
5554
|
call_id: part.toolCallId,
|
|
4816
5555
|
name: resolvedToolName,
|
|
4817
5556
|
arguments: serializeToolCallArguments2(part.input),
|
|
5557
|
+
...isAsync != null && { async: isAsync },
|
|
4818
5558
|
...namespace != null && { namespace },
|
|
4819
5559
|
...caller != null && {
|
|
4820
5560
|
caller: mapToolCaller(caller)
|
|
@@ -4833,8 +5573,8 @@ async function convertToOpenAIResponsesInput({
|
|
|
4833
5573
|
const resolvedResultToolName = toolNameMapping.toProviderToolName(
|
|
4834
5574
|
part.toolName
|
|
4835
5575
|
);
|
|
4836
|
-
if (
|
|
4837
|
-
const itemId = (
|
|
5576
|
+
if (part.toolName === toolSearchToolName) {
|
|
5577
|
+
const itemId = (_z = (_y = (_v = (_u = part.providerOptions) == null ? void 0 : _u[providerOptionsName]) == null ? void 0 : _v.itemId) != null ? _y : (_x = (_w = part.providerMetadata) == null ? void 0 : _w[providerOptionsName]) == null ? void 0 : _x.itemId) != null ? _z : part.toolCallId;
|
|
4838
5578
|
if (store) {
|
|
4839
5579
|
input.push({ type: "item_reference", id: itemId });
|
|
4840
5580
|
} else if (part.output.type === "json") {
|
|
@@ -4854,7 +5594,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4854
5594
|
break;
|
|
4855
5595
|
}
|
|
4856
5596
|
if (resolvedResultToolName === "programmatic_tool_calling") {
|
|
4857
|
-
const itemId = (
|
|
5597
|
+
const itemId = (_F = (_E = (_B = (_A = part.providerOptions) == null ? void 0 : _A[providerOptionsName]) == null ? void 0 : _B.itemId) != null ? _E : (_D = (_C = part.providerMetadata) == null ? void 0 : _C[providerOptionsName]) == null ? void 0 : _D.itemId) != null ? _F : part.toolCallId;
|
|
4858
5598
|
if (store) {
|
|
4859
5599
|
input.push({ type: "item_reference", id: itemId });
|
|
4860
5600
|
} else if (part.output.type === "json") {
|
|
@@ -4894,7 +5634,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4894
5634
|
break;
|
|
4895
5635
|
}
|
|
4896
5636
|
if (store) {
|
|
4897
|
-
const itemId = (
|
|
5637
|
+
const itemId = (_I = (_H = (_G = part.providerOptions) == null ? void 0 : _G[providerOptionsName]) == null ? void 0 : _H.itemId) != null ? _I : part.toolCallId;
|
|
4898
5638
|
input.push({ type: "item_reference", id: itemId });
|
|
4899
5639
|
} else {
|
|
4900
5640
|
warnings.push({
|
|
@@ -4979,7 +5719,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4979
5719
|
}
|
|
4980
5720
|
case "custom": {
|
|
4981
5721
|
if (part.kind === "openai.compaction") {
|
|
4982
|
-
const providerOptions2 = (
|
|
5722
|
+
const providerOptions2 = (_J = part.providerOptions) == null ? void 0 : _J[providerOptionsName];
|
|
4983
5723
|
const id = providerOptions2 == null ? void 0 : providerOptions2.itemId;
|
|
4984
5724
|
if (hasConversation && id != null) {
|
|
4985
5725
|
break;
|
|
@@ -5024,9 +5764,68 @@ async function convertToOpenAIResponsesInput({
|
|
|
5024
5764
|
});
|
|
5025
5765
|
continue;
|
|
5026
5766
|
}
|
|
5767
|
+
const parallelToolCallMetadata = getParallelToolCallMetadata({
|
|
5768
|
+
providerOptions: part.providerOptions,
|
|
5769
|
+
providerOptionsName
|
|
5770
|
+
});
|
|
5771
|
+
const parallelToolResultGroup = parallelToolCallMetadata == null ? void 0 : parallelToolResultGroups.get(
|
|
5772
|
+
parallelToolCallMetadata.toolCallId
|
|
5773
|
+
);
|
|
5774
|
+
if (parallelToolCallMetadata != null && parallelToolResultGroup != null && hasSameParallelToolCall(
|
|
5775
|
+
parallelToolResultGroup.metadata,
|
|
5776
|
+
parallelToolCallMetadata
|
|
5777
|
+
)) {
|
|
5778
|
+
if (!emittedParallelToolResults.has(
|
|
5779
|
+
parallelToolResultGroup.metadata.toolCallId
|
|
5780
|
+
)) {
|
|
5781
|
+
emittedParallelToolResults.add(
|
|
5782
|
+
parallelToolResultGroup.metadata.toolCallId
|
|
5783
|
+
);
|
|
5784
|
+
const toolOutputs = await Promise.all(
|
|
5785
|
+
parallelToolResultGroup.results.map(async (result) => {
|
|
5786
|
+
const promptCacheBreakpoint = getScalarToolResultPromptCacheBreakpoint({
|
|
5787
|
+
output: result.output,
|
|
5788
|
+
toolResultProviderOptions: result.providerOptions,
|
|
5789
|
+
providerOptionsName
|
|
5790
|
+
});
|
|
5791
|
+
return {
|
|
5792
|
+
output: await convertFunctionToolResultOutput({
|
|
5793
|
+
output: result.output,
|
|
5794
|
+
toolName: result.toolName,
|
|
5795
|
+
outputSchemaToolNames,
|
|
5796
|
+
providerOptionsName,
|
|
5797
|
+
warnings
|
|
5798
|
+
}),
|
|
5799
|
+
promptCacheBreakpoint
|
|
5800
|
+
};
|
|
5801
|
+
})
|
|
5802
|
+
);
|
|
5803
|
+
const serializedToolOutputs = toolOutputs.map(
|
|
5804
|
+
({ output: output2 }) => typeof output2 === "string" ? output2 : JSON.stringify(output2)
|
|
5805
|
+
);
|
|
5806
|
+
const hasPromptCacheBreakpoint = toolOutputs.some(
|
|
5807
|
+
({ promptCacheBreakpoint }) => promptCacheBreakpoint != null
|
|
5808
|
+
);
|
|
5809
|
+
input.push({
|
|
5810
|
+
type: "function_call_output",
|
|
5811
|
+
call_id: parallelToolResultGroup.metadata.toolCallId,
|
|
5812
|
+
// The internal wrapper returns one output containing the child
|
|
5813
|
+
// results in the same order as the original tool_uses array.
|
|
5814
|
+
output: hasPromptCacheBreakpoint ? serializedToolOutputs.map((text, index) => ({
|
|
5815
|
+
type: "input_text",
|
|
5816
|
+
text: index === 0 ? text : `
|
|
5817
|
+
${text}`,
|
|
5818
|
+
...toolOutputs[index].promptCacheBreakpoint != null && {
|
|
5819
|
+
prompt_cache_breakpoint: toolOutputs[index].promptCacheBreakpoint
|
|
5820
|
+
}
|
|
5821
|
+
})) : serializedToolOutputs.join("\n")
|
|
5822
|
+
});
|
|
5823
|
+
}
|
|
5824
|
+
continue;
|
|
5825
|
+
}
|
|
5027
5826
|
const output = part.output;
|
|
5028
5827
|
if (output.type === "execution-denied") {
|
|
5029
|
-
const approvalId = (
|
|
5828
|
+
const approvalId = (_L = (_K = output.providerOptions) == null ? void 0 : _K.openai) == null ? void 0 : _L.approvalId;
|
|
5030
5829
|
if (approvalId) {
|
|
5031
5830
|
continue;
|
|
5032
5831
|
}
|
|
@@ -5034,7 +5833,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
5034
5833
|
const resolvedToolName = toolNameMapping.toProviderToolName(
|
|
5035
5834
|
part.toolName
|
|
5036
5835
|
);
|
|
5037
|
-
if (
|
|
5836
|
+
if (part.toolName === toolSearchToolName && output.type === "json") {
|
|
5038
5837
|
const parsedOutput = await validateTypes({
|
|
5039
5838
|
value: output.value,
|
|
5040
5839
|
schema: toolSearchOutputSchema
|
|
@@ -5106,7 +5905,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
5106
5905
|
file_id: parsedOutput.output.fileId,
|
|
5107
5906
|
detail: parsedOutput.output.detail
|
|
5108
5907
|
},
|
|
5109
|
-
acknowledged_safety_checks: (
|
|
5908
|
+
acknowledged_safety_checks: (_M = parsedOutput.acknowledgedSafetyChecks) == null ? void 0 : _M.map((safetyCheck) => ({
|
|
5110
5909
|
id: safetyCheck.id,
|
|
5111
5910
|
code: safetyCheck.code,
|
|
5112
5911
|
message: safetyCheck.message
|
|
@@ -5115,23 +5914,37 @@ async function convertToOpenAIResponsesInput({
|
|
|
5115
5914
|
continue;
|
|
5116
5915
|
}
|
|
5117
5916
|
if (customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) {
|
|
5917
|
+
const promptCacheBreakpoint = getScalarToolResultPromptCacheBreakpoint({
|
|
5918
|
+
output,
|
|
5919
|
+
toolResultProviderOptions: part.providerOptions,
|
|
5920
|
+
providerOptionsName
|
|
5921
|
+
});
|
|
5922
|
+
const convertScalarOutput = (value) => promptCacheBreakpoint == null ? value : [
|
|
5923
|
+
{
|
|
5924
|
+
type: "input_text",
|
|
5925
|
+
text: value,
|
|
5926
|
+
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
5927
|
+
}
|
|
5928
|
+
];
|
|
5118
5929
|
let outputValue;
|
|
5119
5930
|
switch (output.type) {
|
|
5120
5931
|
case "text":
|
|
5121
5932
|
case "error-text":
|
|
5122
|
-
outputValue = output.value;
|
|
5933
|
+
outputValue = convertScalarOutput(output.value);
|
|
5123
5934
|
break;
|
|
5124
5935
|
case "execution-denied":
|
|
5125
|
-
outputValue = (
|
|
5936
|
+
outputValue = convertScalarOutput(
|
|
5937
|
+
(_N = output.reason) != null ? _N : "Tool call execution denied."
|
|
5938
|
+
);
|
|
5126
5939
|
break;
|
|
5127
5940
|
case "json":
|
|
5128
5941
|
case "error-json":
|
|
5129
|
-
outputValue = JSON.stringify(output.value);
|
|
5942
|
+
outputValue = convertScalarOutput(JSON.stringify(output.value));
|
|
5130
5943
|
break;
|
|
5131
5944
|
case "content":
|
|
5132
5945
|
outputValue = output.value.map((item) => {
|
|
5133
|
-
var
|
|
5134
|
-
const
|
|
5946
|
+
var _a3, _b2, _c2;
|
|
5947
|
+
const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
|
|
5135
5948
|
item.providerOptions,
|
|
5136
5949
|
providerOptionsName
|
|
5137
5950
|
);
|
|
@@ -5140,13 +5953,13 @@ async function convertToOpenAIResponsesInput({
|
|
|
5140
5953
|
return {
|
|
5141
5954
|
type: "input_text",
|
|
5142
5955
|
text: item.text,
|
|
5143
|
-
...
|
|
5144
|
-
prompt_cache_breakpoint:
|
|
5956
|
+
...promptCacheBreakpoint2 != null && {
|
|
5957
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5145
5958
|
}
|
|
5146
5959
|
};
|
|
5147
5960
|
case "file": {
|
|
5148
5961
|
const topLevel = getTopLevelMediaType2(item.mediaType);
|
|
5149
|
-
const imageDetail = (_b2 = (
|
|
5962
|
+
const imageDetail = (_b2 = (_a3 = item.providerOptions) == null ? void 0 : _a3[providerOptionsName]) == null ? void 0 : _b2.imageDetail;
|
|
5150
5963
|
if (item.data.type === "data") {
|
|
5151
5964
|
const fullMediaType = resolveFullMediaType2({
|
|
5152
5965
|
part: item
|
|
@@ -5156,8 +5969,8 @@ async function convertToOpenAIResponsesInput({
|
|
|
5156
5969
|
type: "input_image",
|
|
5157
5970
|
image_url: `data:${fullMediaType};base64,${convertToBase642(item.data.data)}`,
|
|
5158
5971
|
detail: imageDetail,
|
|
5159
|
-
...
|
|
5160
|
-
prompt_cache_breakpoint:
|
|
5972
|
+
...promptCacheBreakpoint2 != null && {
|
|
5973
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5161
5974
|
}
|
|
5162
5975
|
};
|
|
5163
5976
|
}
|
|
@@ -5165,8 +5978,8 @@ async function convertToOpenAIResponsesInput({
|
|
|
5165
5978
|
type: "input_file",
|
|
5166
5979
|
filename: (_c2 = item.filename) != null ? _c2 : "data",
|
|
5167
5980
|
file_data: `data:${fullMediaType};base64,${convertToBase642(item.data.data)}`,
|
|
5168
|
-
...
|
|
5169
|
-
prompt_cache_breakpoint:
|
|
5981
|
+
...promptCacheBreakpoint2 != null && {
|
|
5982
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5170
5983
|
}
|
|
5171
5984
|
};
|
|
5172
5985
|
}
|
|
@@ -5176,16 +5989,16 @@ async function convertToOpenAIResponsesInput({
|
|
|
5176
5989
|
type: "input_image",
|
|
5177
5990
|
image_url: item.data.url.toString(),
|
|
5178
5991
|
detail: imageDetail,
|
|
5179
|
-
...
|
|
5180
|
-
prompt_cache_breakpoint:
|
|
5992
|
+
...promptCacheBreakpoint2 != null && {
|
|
5993
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5181
5994
|
}
|
|
5182
5995
|
};
|
|
5183
5996
|
}
|
|
5184
5997
|
return {
|
|
5185
5998
|
type: "input_file",
|
|
5186
5999
|
file_url: item.data.url.toString(),
|
|
5187
|
-
...
|
|
5188
|
-
prompt_cache_breakpoint:
|
|
6000
|
+
...promptCacheBreakpoint2 != null && {
|
|
6001
|
+
prompt_cache_breakpoint: promptCacheBreakpoint2
|
|
5189
6002
|
}
|
|
5190
6003
|
};
|
|
5191
6004
|
}
|
|
@@ -5214,104 +6027,25 @@ async function convertToOpenAIResponsesInput({
|
|
|
5214
6027
|
});
|
|
5215
6028
|
continue;
|
|
5216
6029
|
}
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
contentValue = hasOutputSchema ? JSON.stringify(output.value) : output.value;
|
|
5223
|
-
break;
|
|
5224
|
-
case "execution-denied": {
|
|
5225
|
-
const reason = (_J = output.reason) != null ? _J : "Tool call execution denied.";
|
|
5226
|
-
contentValue = hasOutputSchema ? JSON.stringify(reason) : reason;
|
|
5227
|
-
break;
|
|
5228
|
-
}
|
|
5229
|
-
case "json":
|
|
5230
|
-
case "error-json":
|
|
5231
|
-
contentValue = JSON.stringify(output.value);
|
|
5232
|
-
break;
|
|
5233
|
-
case "content":
|
|
5234
|
-
contentValue = output.value.map((item) => {
|
|
5235
|
-
var _a2, _b2, _c2;
|
|
5236
|
-
const promptCacheBreakpoint = getPromptCacheBreakpoint2(
|
|
5237
|
-
item.providerOptions,
|
|
5238
|
-
providerOptionsName
|
|
5239
|
-
);
|
|
5240
|
-
switch (item.type) {
|
|
5241
|
-
case "text": {
|
|
5242
|
-
return {
|
|
5243
|
-
type: "input_text",
|
|
5244
|
-
text: item.text,
|
|
5245
|
-
...promptCacheBreakpoint != null && {
|
|
5246
|
-
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
5247
|
-
}
|
|
5248
|
-
};
|
|
5249
|
-
}
|
|
5250
|
-
case "file": {
|
|
5251
|
-
const topLevel = getTopLevelMediaType2(item.mediaType);
|
|
5252
|
-
const imageDetail = (_b2 = (_a2 = item.providerOptions) == null ? void 0 : _a2[providerOptionsName]) == null ? void 0 : _b2.imageDetail;
|
|
5253
|
-
if (item.data.type === "data") {
|
|
5254
|
-
const fullMediaType = resolveFullMediaType2({
|
|
5255
|
-
part: item
|
|
5256
|
-
});
|
|
5257
|
-
if (topLevel === "image") {
|
|
5258
|
-
return {
|
|
5259
|
-
type: "input_image",
|
|
5260
|
-
image_url: `data:${fullMediaType};base64,${convertToBase642(item.data.data)}`,
|
|
5261
|
-
detail: imageDetail,
|
|
5262
|
-
...promptCacheBreakpoint != null && {
|
|
5263
|
-
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
5264
|
-
}
|
|
5265
|
-
};
|
|
5266
|
-
}
|
|
5267
|
-
return {
|
|
5268
|
-
type: "input_file",
|
|
5269
|
-
filename: (_c2 = item.filename) != null ? _c2 : "data",
|
|
5270
|
-
file_data: `data:${fullMediaType};base64,${convertToBase642(item.data.data)}`,
|
|
5271
|
-
...promptCacheBreakpoint != null && {
|
|
5272
|
-
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
5273
|
-
}
|
|
5274
|
-
};
|
|
5275
|
-
}
|
|
5276
|
-
if (item.data.type === "url") {
|
|
5277
|
-
if (topLevel === "image") {
|
|
5278
|
-
return {
|
|
5279
|
-
type: "input_image",
|
|
5280
|
-
image_url: item.data.url.toString(),
|
|
5281
|
-
detail: imageDetail,
|
|
5282
|
-
...promptCacheBreakpoint != null && {
|
|
5283
|
-
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
5284
|
-
}
|
|
5285
|
-
};
|
|
5286
|
-
}
|
|
5287
|
-
return {
|
|
5288
|
-
type: "input_file",
|
|
5289
|
-
file_url: item.data.url.toString(),
|
|
5290
|
-
...promptCacheBreakpoint != null && {
|
|
5291
|
-
prompt_cache_breakpoint: promptCacheBreakpoint
|
|
5292
|
-
}
|
|
5293
|
-
};
|
|
5294
|
-
}
|
|
5295
|
-
warnings.push({
|
|
5296
|
-
type: "other",
|
|
5297
|
-
message: `unsupported tool content part type: ${item.type} with data type: ${item.data.type}`
|
|
5298
|
-
});
|
|
5299
|
-
return void 0;
|
|
5300
|
-
}
|
|
5301
|
-
default: {
|
|
5302
|
-
warnings.push({
|
|
5303
|
-
type: "other",
|
|
5304
|
-
message: `unsupported tool content part type: ${item.type}`
|
|
5305
|
-
});
|
|
5306
|
-
return void 0;
|
|
5307
|
-
}
|
|
5308
|
-
}
|
|
5309
|
-
}).filter(isNonNullable);
|
|
5310
|
-
break;
|
|
6030
|
+
const resultCaller = (_P = (_O = part.providerOptions) == null ? void 0 : _O[providerOptionsName]) == null ? void 0 : _P.caller;
|
|
6031
|
+
if (output.type === "execution-denied" && ((resultCaller == null ? void 0 : resultCaller.type) === "program" || programmaticToolCallIds.has(part.toolCallId))) {
|
|
6032
|
+
throw new UnsupportedFunctionalityError5({
|
|
6033
|
+
functionality: "execution-denied results for programmatic tool calls"
|
|
6034
|
+
});
|
|
5311
6035
|
}
|
|
5312
|
-
const
|
|
5313
|
-
|
|
5314
|
-
|
|
6036
|
+
const contentValue = await convertFunctionToolResultOutput({
|
|
6037
|
+
output,
|
|
6038
|
+
toolName: part.toolName,
|
|
6039
|
+
outputSchemaToolNames,
|
|
6040
|
+
promptCacheBreakpoint: getScalarToolResultPromptCacheBreakpoint({
|
|
6041
|
+
output,
|
|
6042
|
+
toolResultProviderOptions: part.providerOptions,
|
|
6043
|
+
providerOptionsName
|
|
6044
|
+
}),
|
|
6045
|
+
providerOptionsName,
|
|
6046
|
+
warnings
|
|
6047
|
+
});
|
|
6048
|
+
const caller = mapToolCaller(resultCaller);
|
|
5315
6049
|
input.push({
|
|
5316
6050
|
type: "function_call_output",
|
|
5317
6051
|
call_id: part.toolCallId,
|
|
@@ -5394,7 +6128,8 @@ var openaiResponsesReasoningModelIds = [
|
|
|
5394
6128
|
"gpt-5.6",
|
|
5395
6129
|
"gpt-5.6-luna",
|
|
5396
6130
|
"gpt-5.6-sol",
|
|
5397
|
-
"gpt-5.6-terra"
|
|
6131
|
+
"gpt-5.6-terra",
|
|
6132
|
+
"gpt-6-astra"
|
|
5398
6133
|
];
|
|
5399
6134
|
var openaiResponsesModelIds = [
|
|
5400
6135
|
"gpt-4.1",
|
|
@@ -5445,6 +6180,14 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema25(
|
|
|
5445
6180
|
"message.output_text.logprobs"
|
|
5446
6181
|
])
|
|
5447
6182
|
).nullish(),
|
|
6183
|
+
/**
|
|
6184
|
+
* Whether to automatically include web search action sources in the
|
|
6185
|
+
* response. Disable this for OpenAI-compatible providers that do not
|
|
6186
|
+
* support the `web_search_call.action.sources` include value.
|
|
6187
|
+
*
|
|
6188
|
+
* Defaults to `true`.
|
|
6189
|
+
*/
|
|
6190
|
+
includeWebSearchSources: z27.boolean().optional(),
|
|
5448
6191
|
/**
|
|
5449
6192
|
* Instructions for the model.
|
|
5450
6193
|
* They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
|
|
@@ -5516,6 +6259,15 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema25(
|
|
|
5516
6259
|
* Supported values vary by model.
|
|
5517
6260
|
*/
|
|
5518
6261
|
reasoningEffort: z27.string().nullish(),
|
|
6262
|
+
/**
|
|
6263
|
+
* Updates the reasoning effort for GPT-6 and later models starting with this response
|
|
6264
|
+
* without changing the request-level reasoning effort. This preserves the
|
|
6265
|
+
* request prefix for prompt caching.
|
|
6266
|
+
*
|
|
6267
|
+
* Only supported by GPT-6 and later models in standard, single-agent mode. Cannot be
|
|
6268
|
+
* combined with automatic compaction or automatic truncation.
|
|
6269
|
+
*/
|
|
6270
|
+
reasoningEffortUpdate: z27.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
|
5519
6271
|
/**
|
|
5520
6272
|
* Controls how much model work GPT-5.6 performs before returning a final answer.
|
|
5521
6273
|
* `standard` is the default. `pro` increases quality, latency, and token usage.
|
|
@@ -5542,10 +6294,11 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema25(
|
|
|
5542
6294
|
* Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
|
|
5543
6295
|
* Set to 'priority' for faster processing with Enterprise access (available for gpt-4, gpt-5, gpt-5-mini, o3, o4-mini; gpt-5-nano is not supported).
|
|
5544
6296
|
* Set to 'fast' for the same tier as 'priority' (OpenAI's newer name for it).
|
|
6297
|
+
* Set to 'ultrafast' for access-controlled Ultrafast processing (available only for gpt-5.6-sol).
|
|
5545
6298
|
*
|
|
5546
6299
|
* Defaults to 'auto'.
|
|
5547
6300
|
*/
|
|
5548
|
-
serviceTier: z27.enum(["auto", "flex", "priority", "fast", "default"]).nullish(),
|
|
6301
|
+
serviceTier: z27.enum(["auto", "flex", "priority", "fast", "ultrafast", "default"]).nullish(),
|
|
5549
6302
|
/**
|
|
5550
6303
|
* Whether to store the generation. Defaults to `true`.
|
|
5551
6304
|
*/
|
|
@@ -5634,7 +6387,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema25(
|
|
|
5634
6387
|
|
|
5635
6388
|
// src/responses/openai-responses-prepare-tools.ts
|
|
5636
6389
|
import {
|
|
5637
|
-
UnsupportedFunctionalityError as
|
|
6390
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError6
|
|
5638
6391
|
} from "@ai-sdk/provider";
|
|
5639
6392
|
import {
|
|
5640
6393
|
resolveProviderReference as resolveProviderReference3,
|
|
@@ -5646,9 +6399,10 @@ async function prepareResponsesTools({
|
|
|
5646
6399
|
allowedTools,
|
|
5647
6400
|
toolNameMapping,
|
|
5648
6401
|
customProviderToolNames,
|
|
5649
|
-
outputSchemaToolNames
|
|
6402
|
+
outputSchemaToolNames,
|
|
6403
|
+
supportsAsyncToolCalling = true
|
|
5650
6404
|
}) {
|
|
5651
|
-
var
|
|
6405
|
+
var _a2, _b, _c, _d;
|
|
5652
6406
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
5653
6407
|
const toolWarnings = [];
|
|
5654
6408
|
if (tools == null) {
|
|
@@ -5674,13 +6428,20 @@ async function prepareResponsesTools({
|
|
|
5674
6428
|
for (const tool of tools) {
|
|
5675
6429
|
switch (tool.type) {
|
|
5676
6430
|
case "function": {
|
|
5677
|
-
const openaiOptions = (
|
|
6431
|
+
const openaiOptions = (_a2 = tool.providerOptions) == null ? void 0 : _a2.openai;
|
|
5678
6432
|
if ((openaiOptions == null ? void 0 : openaiOptions.outputSchema) != null) {
|
|
5679
6433
|
outputSchemaToolNames == null ? void 0 : outputSchemaToolNames.add(tool.name);
|
|
5680
6434
|
}
|
|
5681
6435
|
const openaiFunctionTool = prepareFunctionTool({
|
|
5682
6436
|
tool,
|
|
5683
|
-
options: openaiOptions
|
|
6437
|
+
options: openaiOptions,
|
|
6438
|
+
toolWarnings,
|
|
6439
|
+
async: resolveAsyncToolOption({
|
|
6440
|
+
value: openaiOptions == null ? void 0 : openaiOptions.async,
|
|
6441
|
+
supportsAsyncToolCalling,
|
|
6442
|
+
toolName: tool.name,
|
|
6443
|
+
toolWarnings
|
|
6444
|
+
})
|
|
5684
6445
|
});
|
|
5685
6446
|
const namespace = openaiOptions == null ? void 0 : openaiOptions.namespace;
|
|
5686
6447
|
if (namespace == null) {
|
|
@@ -5697,7 +6458,7 @@ async function prepareResponsesTools({
|
|
|
5697
6458
|
namespaceTools.set(namespace.name, namespaceTool);
|
|
5698
6459
|
openaiTools2.push(namespaceTool);
|
|
5699
6460
|
} else if (namespaceTool.description !== namespace.description) {
|
|
5700
|
-
throw new
|
|
6461
|
+
throw new UnsupportedFunctionalityError6({
|
|
5701
6462
|
functionality: `conflicting descriptions for OpenAI tool namespace "${namespace.name}"`
|
|
5702
6463
|
});
|
|
5703
6464
|
}
|
|
@@ -5817,6 +6578,7 @@ async function prepareResponsesTools({
|
|
|
5817
6578
|
});
|
|
5818
6579
|
openaiTools2.push({
|
|
5819
6580
|
type: "image_generation",
|
|
6581
|
+
action: args.action,
|
|
5820
6582
|
background: args.background,
|
|
5821
6583
|
input_fidelity: args.inputFidelity,
|
|
5822
6584
|
input_image_mask: args.inputImageMask ? {
|
|
@@ -5868,6 +6630,12 @@ async function prepareResponsesTools({
|
|
|
5868
6630
|
type: "custom",
|
|
5869
6631
|
name: tool.name,
|
|
5870
6632
|
description: args.description,
|
|
6633
|
+
...resolveAsyncToolOption({
|
|
6634
|
+
value: args.async,
|
|
6635
|
+
supportsAsyncToolCalling,
|
|
6636
|
+
toolName: tool.name,
|
|
6637
|
+
toolWarnings
|
|
6638
|
+
}) != null ? { async: args.async } : {},
|
|
5871
6639
|
format: args.format
|
|
5872
6640
|
});
|
|
5873
6641
|
resolvedCustomProviderToolNames.add(tool.name);
|
|
@@ -5957,7 +6725,7 @@ async function prepareResponsesTools({
|
|
|
5957
6725
|
allowedToolEntries.push(resolution.entry);
|
|
5958
6726
|
}
|
|
5959
6727
|
if (allowedToolEntries.length === 0) {
|
|
5960
|
-
throw new
|
|
6728
|
+
throw new UnsupportedFunctionalityError6({
|
|
5961
6729
|
functionality: `allowedTools with only tools that cannot be allow-listed (${droppedToolNames.join(
|
|
5962
6730
|
", "
|
|
5963
6731
|
)})`
|
|
@@ -5992,7 +6760,7 @@ async function prepareResponsesTools({
|
|
|
5992
6760
|
}
|
|
5993
6761
|
default: {
|
|
5994
6762
|
const _exhaustiveCheck = type;
|
|
5995
|
-
throw new
|
|
6763
|
+
throw new UnsupportedFunctionalityError6({
|
|
5996
6764
|
functionality: `tool choice type: ${_exhaustiveCheck}`
|
|
5997
6765
|
});
|
|
5998
6766
|
}
|
|
@@ -6047,20 +6815,46 @@ function toAllowedToolResolution(tool) {
|
|
|
6047
6815
|
}
|
|
6048
6816
|
function prepareFunctionTool({
|
|
6049
6817
|
tool,
|
|
6050
|
-
options
|
|
6818
|
+
options,
|
|
6819
|
+
toolWarnings,
|
|
6820
|
+
async
|
|
6051
6821
|
}) {
|
|
6822
|
+
var _a2;
|
|
6052
6823
|
const deferLoading = options == null ? void 0 : options.deferLoading;
|
|
6824
|
+
const normalizedInputSchema = normalizeOpenAIJsonSchema(tool.inputSchema);
|
|
6825
|
+
const normalizedOutputSchema = (options == null ? void 0 : options.outputSchema) != null ? normalizeOpenAIJsonSchema(options.outputSchema) : void 0;
|
|
6826
|
+
toolWarnings.push(
|
|
6827
|
+
...normalizedInputSchema.warnings,
|
|
6828
|
+
...(_a2 = normalizedOutputSchema == null ? void 0 : normalizedOutputSchema.warnings) != null ? _a2 : []
|
|
6829
|
+
);
|
|
6053
6830
|
return {
|
|
6054
6831
|
type: "function",
|
|
6055
6832
|
name: tool.name,
|
|
6056
6833
|
description: tool.description,
|
|
6057
|
-
parameters:
|
|
6834
|
+
parameters: normalizedInputSchema.schema,
|
|
6835
|
+
...async != null ? { async } : {},
|
|
6058
6836
|
...tool.strict != null ? { strict: tool.strict } : {},
|
|
6059
6837
|
...deferLoading != null ? { defer_loading: deferLoading } : {},
|
|
6060
6838
|
...(options == null ? void 0 : options.allowedCallers) != null ? { allowed_callers: options.allowedCallers } : {},
|
|
6061
|
-
...(options == null ? void 0 : options.outputSchema) != null ? { output_schema:
|
|
6839
|
+
...(options == null ? void 0 : options.outputSchema) != null ? { output_schema: normalizedOutputSchema == null ? void 0 : normalizedOutputSchema.schema } : {}
|
|
6062
6840
|
};
|
|
6063
6841
|
}
|
|
6842
|
+
function resolveAsyncToolOption({
|
|
6843
|
+
value,
|
|
6844
|
+
supportsAsyncToolCalling,
|
|
6845
|
+
toolName,
|
|
6846
|
+
toolWarnings
|
|
6847
|
+
}) {
|
|
6848
|
+
if (value !== true || supportsAsyncToolCalling) {
|
|
6849
|
+
return value;
|
|
6850
|
+
}
|
|
6851
|
+
toolWarnings.push({
|
|
6852
|
+
type: "unsupported",
|
|
6853
|
+
feature: `async tool calling for "${toolName}"`,
|
|
6854
|
+
details: "Async tool calling is only supported by GPT-6 and later models."
|
|
6855
|
+
});
|
|
6856
|
+
return void 0;
|
|
6857
|
+
}
|
|
6064
6858
|
function mapShellEnvironment(environment) {
|
|
6065
6859
|
if (environment.type === "containerReference") {
|
|
6066
6860
|
const env2 = environment;
|
|
@@ -6092,11 +6886,11 @@ function mapShellEnvironment(environment) {
|
|
|
6092
6886
|
function mapShellSkills(skills) {
|
|
6093
6887
|
return skills == null ? void 0 : skills.map(
|
|
6094
6888
|
(skill) => {
|
|
6095
|
-
var
|
|
6889
|
+
var _a2, _b;
|
|
6096
6890
|
return skill.type === "skillReference" ? {
|
|
6097
6891
|
type: "skill_reference",
|
|
6098
6892
|
skill_id: resolveProviderReference3({
|
|
6099
|
-
reference: (
|
|
6893
|
+
reference: (_a2 = skill.providerReference) != null ? _a2 : {},
|
|
6100
6894
|
provider: "openai"
|
|
6101
6895
|
}),
|
|
6102
6896
|
version: (_b = skill.version) != null ? _b : "latest"
|
|
@@ -6116,13 +6910,13 @@ function mapShellSkills(skills) {
|
|
|
6116
6910
|
|
|
6117
6911
|
// src/responses/openai-responses-language-model.ts
|
|
6118
6912
|
function extractApprovalRequestIdToToolCallIdMapping(prompt) {
|
|
6119
|
-
var
|
|
6913
|
+
var _a2, _b;
|
|
6120
6914
|
const mapping = {};
|
|
6121
6915
|
for (const message of prompt) {
|
|
6122
6916
|
if (message.role !== "assistant") continue;
|
|
6123
6917
|
for (const part of message.content) {
|
|
6124
6918
|
if (part.type !== "tool-call") continue;
|
|
6125
|
-
const approvalRequestId = (_b = (
|
|
6919
|
+
const approvalRequestId = (_b = (_a2 = part.providerOptions) == null ? void 0 : _a2.openai) == null ? void 0 : _b.approvalRequestId;
|
|
6126
6920
|
if (approvalRequestId != null) {
|
|
6127
6921
|
mapping[approvalRequestId] = part.toolCallId;
|
|
6128
6922
|
}
|
|
@@ -6185,26 +6979,27 @@ function mapComputerCallInput({
|
|
|
6185
6979
|
pending_safety_checks,
|
|
6186
6980
|
status
|
|
6187
6981
|
}) {
|
|
6188
|
-
var
|
|
6982
|
+
var _a2;
|
|
6189
6983
|
return {
|
|
6190
6984
|
actions: (actions != null ? actions : action != null ? [action] : []).map(
|
|
6191
6985
|
mapComputerAction
|
|
6192
6986
|
),
|
|
6193
|
-
pendingSafetyChecks: (
|
|
6987
|
+
pendingSafetyChecks: (_a2 = pending_safety_checks == null ? void 0 : pending_safety_checks.map((safetyCheck) => ({
|
|
6194
6988
|
id: safetyCheck.id,
|
|
6195
6989
|
...safetyCheck.code != null && { code: safetyCheck.code },
|
|
6196
6990
|
...safetyCheck.message != null && { message: safetyCheck.message }
|
|
6197
|
-
}))) != null ?
|
|
6991
|
+
}))) != null ? _a2 : [],
|
|
6198
6992
|
status
|
|
6199
6993
|
};
|
|
6200
6994
|
}
|
|
6995
|
+
var openaiResponsesSupportedUrls = {
|
|
6996
|
+
"image/*": [/^https?:\/\/.*$/],
|
|
6997
|
+
"application/pdf": [/^https?:\/\/.*$/]
|
|
6998
|
+
};
|
|
6201
6999
|
var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
6202
7000
|
constructor(modelId, config) {
|
|
6203
7001
|
this.specificationVersion = "v4";
|
|
6204
|
-
this.supportedUrls =
|
|
6205
|
-
"image/*": [/^https?:\/\/.*$/],
|
|
6206
|
-
"application/pdf": [/^https?:\/\/.*$/]
|
|
6207
|
-
};
|
|
7002
|
+
this.supportedUrls = openaiResponsesSupportedUrls;
|
|
6208
7003
|
this.modelId = modelId;
|
|
6209
7004
|
this.config = config;
|
|
6210
7005
|
}
|
|
@@ -6215,30 +7010,37 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6215
7010
|
});
|
|
6216
7011
|
}
|
|
6217
7012
|
static [WORKFLOW_DESERIALIZE5](options) {
|
|
6218
|
-
return new _OpenAIResponsesLanguageModel(
|
|
7013
|
+
return new _OpenAIResponsesLanguageModel(
|
|
7014
|
+
options.modelId,
|
|
7015
|
+
prepareOpenAIConfigForWorkflowDeserialize(options.config)
|
|
7016
|
+
);
|
|
6219
7017
|
}
|
|
6220
7018
|
get provider() {
|
|
6221
7019
|
return this.config.provider;
|
|
6222
7020
|
}
|
|
6223
|
-
async
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
7021
|
+
static async prepareRequest({
|
|
7022
|
+
modelId,
|
|
7023
|
+
config,
|
|
7024
|
+
options: {
|
|
7025
|
+
maxOutputTokens,
|
|
7026
|
+
temperature,
|
|
7027
|
+
stopSequences,
|
|
7028
|
+
topP,
|
|
7029
|
+
topK,
|
|
7030
|
+
presencePenalty,
|
|
7031
|
+
frequencyPenalty,
|
|
7032
|
+
seed,
|
|
7033
|
+
prompt,
|
|
7034
|
+
reasoning,
|
|
7035
|
+
providerOptions,
|
|
7036
|
+
tools,
|
|
7037
|
+
toolChoice,
|
|
7038
|
+
responseFormat
|
|
7039
|
+
}
|
|
6238
7040
|
}) {
|
|
6239
|
-
var
|
|
7041
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
6240
7042
|
const warnings = [];
|
|
6241
|
-
const modelCapabilities = getOpenAILanguageModelCapabilities(
|
|
7043
|
+
const modelCapabilities = getOpenAILanguageModelCapabilities(modelId);
|
|
6242
7044
|
if (topK != null) {
|
|
6243
7045
|
warnings.push({ type: "unsupported", feature: "topK" });
|
|
6244
7046
|
}
|
|
@@ -6254,7 +7056,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6254
7056
|
if (stopSequences != null) {
|
|
6255
7057
|
warnings.push({ type: "unsupported", feature: "stopSequences" });
|
|
6256
7058
|
}
|
|
6257
|
-
const providerOptionsName =
|
|
7059
|
+
const providerOptionsName = config.provider.includes("azure") ? "azure" : "openai";
|
|
6258
7060
|
let openaiOptions = await parseProviderOptions7({
|
|
6259
7061
|
provider: providerOptionsName,
|
|
6260
7062
|
providerOptions,
|
|
@@ -6267,7 +7069,17 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6267
7069
|
schema: openaiLanguageModelResponsesOptionsSchema
|
|
6268
7070
|
});
|
|
6269
7071
|
}
|
|
6270
|
-
|
|
7072
|
+
let resolvedReasoningEffort = (_a2 = openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null ? _a2 : isCustomReasoning2(reasoning) ? reasoning : void 0;
|
|
7073
|
+
if (resolvedReasoningEffort != null && modelCapabilities.supportedReasoningEfforts != null && !modelCapabilities.supportedReasoningEfforts.includes(
|
|
7074
|
+
resolvedReasoningEffort
|
|
7075
|
+
)) {
|
|
7076
|
+
warnings.push({
|
|
7077
|
+
type: "unsupported",
|
|
7078
|
+
feature: "reasoningEffort",
|
|
7079
|
+
details: `${modelId} only supports the following reasoning efforts: ${modelCapabilities.supportedReasoningEfforts.join(", ")}`
|
|
7080
|
+
});
|
|
7081
|
+
resolvedReasoningEffort = void 0;
|
|
7082
|
+
}
|
|
6271
7083
|
const resolvedReasoningSummary = (openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) !== void 0 ? openaiOptions.reasoningSummary : resolvedReasoningEffort != null && resolvedReasoningEffort !== "none" ? "detailed" : void 0;
|
|
6272
7084
|
const isReasoningModel = (_b = openaiOptions == null ? void 0 : openaiOptions.forceReasoning) != null ? _b : modelCapabilities.isReasoningModel;
|
|
6273
7085
|
if ((openaiOptions == null ? void 0 : openaiOptions.conversation) && (openaiOptions == null ? void 0 : openaiOptions.previousResponseId)) {
|
|
@@ -6306,14 +7118,16 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6306
7118
|
allowedTools: (_c = openaiOptions == null ? void 0 : openaiOptions.allowedTools) != null ? _c : void 0,
|
|
6307
7119
|
toolNameMapping,
|
|
6308
7120
|
customProviderToolNames,
|
|
6309
|
-
outputSchemaToolNames
|
|
7121
|
+
outputSchemaToolNames,
|
|
7122
|
+
supportsAsyncToolCalling: modelCapabilities.supportsAsyncToolCalling
|
|
6310
7123
|
});
|
|
6311
7124
|
const { input, warnings: inputWarnings } = await convertToOpenAIResponsesInput({
|
|
6312
7125
|
prompt,
|
|
6313
7126
|
toolNameMapping,
|
|
6314
7127
|
systemMessageMode: (_d = openaiOptions == null ? void 0 : openaiOptions.systemMessageMode) != null ? _d : isReasoningModel ? "developer" : modelCapabilities.systemMessageMode,
|
|
6315
7128
|
providerOptionsName,
|
|
6316
|
-
|
|
7129
|
+
explicitMessageItemType: config.explicitMessageItemType,
|
|
7130
|
+
fileIdPrefixes: config.fileIdPrefixes,
|
|
6317
7131
|
passThroughUnsupportedFiles: (_e = openaiOptions == null ? void 0 : openaiOptions.passThroughUnsupportedFiles) != null ? _e : false,
|
|
6318
7132
|
store: (_f = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _f : true,
|
|
6319
7133
|
hasConversation: (openaiOptions == null ? void 0 : openaiOptions.conversation) != null,
|
|
@@ -6322,14 +7136,33 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6322
7136
|
hasShellTool: hasOpenAITool("openai.shell"),
|
|
6323
7137
|
hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
|
|
6324
7138
|
hasComputerTool: hasOpenAITool("openai.computer"),
|
|
7139
|
+
toolSearchToolName: getOpenAIToolName("openai.tool_search"),
|
|
6325
7140
|
customProviderToolNames: customProviderToolNames.size > 0 ? customProviderToolNames : void 0,
|
|
6326
7141
|
outputSchemaToolNames: outputSchemaToolNames.size > 0 ? outputSchemaToolNames : void 0
|
|
6327
7142
|
});
|
|
6328
7143
|
warnings.push(...inputWarnings);
|
|
7144
|
+
const reasoningEffortUpdate = openaiOptions == null ? void 0 : openaiOptions.reasoningEffortUpdate;
|
|
7145
|
+
const configurationUpdateIsSupported = reasoningEffortUpdate == null || modelCapabilities.supportsConfigurationUpdate && (openaiOptions == null ? void 0 : openaiOptions.reasoningMode) !== "pro" && (openaiOptions == null ? void 0 : openaiOptions.contextManagement) == null && (openaiOptions == null ? void 0 : openaiOptions.truncation) !== "auto";
|
|
7146
|
+
if (reasoningEffortUpdate != null && !configurationUpdateIsSupported) {
|
|
7147
|
+
warnings.push({
|
|
7148
|
+
type: "unsupported",
|
|
7149
|
+
feature: "reasoningEffortUpdate",
|
|
7150
|
+
details: !modelCapabilities.supportsConfigurationUpdate ? "reasoningEffortUpdate is only supported by GPT-6 and later models" : "reasoningEffortUpdate requires standard reasoning mode without automatic compaction or automatic truncation"
|
|
7151
|
+
});
|
|
7152
|
+
} else if (reasoningEffortUpdate != null) {
|
|
7153
|
+
input.unshift({
|
|
7154
|
+
type: "configuration_update",
|
|
7155
|
+
reasoning: { effort: reasoningEffortUpdate }
|
|
7156
|
+
});
|
|
7157
|
+
}
|
|
6329
7158
|
if (openaiOptions == null ? void 0 : openaiOptions.compactionTrigger) {
|
|
6330
7159
|
input.push({ type: "compaction_trigger" });
|
|
6331
7160
|
}
|
|
6332
7161
|
const strictJsonSchema = (_g = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _g : true;
|
|
7162
|
+
const normalizedResponseFormatSchema = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null ? normalizeOpenAIJsonSchema(responseFormat.schema) : void 0;
|
|
7163
|
+
if (normalizedResponseFormatSchema != null) {
|
|
7164
|
+
warnings.push(...normalizedResponseFormatSchema.warnings);
|
|
7165
|
+
}
|
|
6333
7166
|
let include = openaiOptions == null ? void 0 : openaiOptions.include;
|
|
6334
7167
|
function addInclude(key) {
|
|
6335
7168
|
if (include == null) {
|
|
@@ -6338,8 +7171,12 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6338
7171
|
include = [...include, key];
|
|
6339
7172
|
}
|
|
6340
7173
|
}
|
|
7174
|
+
function getOpenAIToolName(id) {
|
|
7175
|
+
var _a3;
|
|
7176
|
+
return (_a3 = tools == null ? void 0 : tools.find((tool) => tool.type === "provider" && tool.id === id)) == null ? void 0 : _a3.name;
|
|
7177
|
+
}
|
|
6341
7178
|
function hasOpenAITool(id) {
|
|
6342
|
-
return (
|
|
7179
|
+
return getOpenAIToolName(id) != null;
|
|
6343
7180
|
}
|
|
6344
7181
|
const topLogprobs = typeof (openaiOptions == null ? void 0 : openaiOptions.logprobs) === "number" ? openaiOptions == null ? void 0 : openaiOptions.logprobs : (openaiOptions == null ? void 0 : openaiOptions.logprobs) === true ? TOP_LOGPROBS_MAX : void 0;
|
|
6345
7182
|
if (topLogprobs) {
|
|
@@ -6348,7 +7185,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6348
7185
|
const webSearchToolName = (_h = tools == null ? void 0 : tools.find(
|
|
6349
7186
|
(tool) => tool.type === "provider" && (tool.id === "openai.web_search" || tool.id === "openai.web_search_preview")
|
|
6350
7187
|
)) == null ? void 0 : _h.name;
|
|
6351
|
-
if (webSearchToolName) {
|
|
7188
|
+
if (webSearchToolName && config.supportsWebSearchSourcesInclude !== false && (openaiOptions == null ? void 0 : openaiOptions.includeWebSearchSources) !== false) {
|
|
6352
7189
|
addInclude("web_search_call.action.sources");
|
|
6353
7190
|
}
|
|
6354
7191
|
if (hasOpenAITool("openai.code_interpreter")) {
|
|
@@ -6359,7 +7196,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6359
7196
|
addInclude("reasoning.encrypted_content");
|
|
6360
7197
|
}
|
|
6361
7198
|
const baseArgs = {
|
|
6362
|
-
model:
|
|
7199
|
+
model: modelId,
|
|
6363
7200
|
input,
|
|
6364
7201
|
temperature,
|
|
6365
7202
|
top_p: topP,
|
|
@@ -6367,12 +7204,12 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6367
7204
|
...((responseFormat == null ? void 0 : responseFormat.type) === "json" || (openaiOptions == null ? void 0 : openaiOptions.textVerbosity)) && {
|
|
6368
7205
|
text: {
|
|
6369
7206
|
...(responseFormat == null ? void 0 : responseFormat.type) === "json" && {
|
|
6370
|
-
format:
|
|
7207
|
+
format: normalizedResponseFormatSchema != null ? {
|
|
6371
7208
|
type: "json_schema",
|
|
6372
7209
|
strict: strictJsonSchema,
|
|
6373
7210
|
name: (_i = responseFormat.name) != null ? _i : "response",
|
|
6374
7211
|
description: responseFormat.description,
|
|
6375
|
-
schema:
|
|
7212
|
+
schema: normalizedResponseFormatSchema.schema
|
|
6376
7213
|
} : { type: "json_object" }
|
|
6377
7214
|
},
|
|
6378
7215
|
...(openaiOptions == null ? void 0 : openaiOptions.textVerbosity) && {
|
|
@@ -6422,6 +7259,14 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6422
7259
|
}
|
|
6423
7260
|
}
|
|
6424
7261
|
};
|
|
7262
|
+
if (modelCapabilities.supportsConfigurationUpdate && baseArgs.prompt_cache_retention != null) {
|
|
7263
|
+
baseArgs.prompt_cache_retention = void 0;
|
|
7264
|
+
warnings.push({
|
|
7265
|
+
type: "unsupported",
|
|
7266
|
+
feature: "promptCacheRetention",
|
|
7267
|
+
details: "promptCacheRetention is not supported by GPT-6 and later models; use promptCacheOptions instead"
|
|
7268
|
+
});
|
|
7269
|
+
}
|
|
6425
7270
|
if (isReasoningModel) {
|
|
6426
7271
|
if (!(resolvedReasoningEffort === "none" && modelCapabilities.supportsNonReasoningParameters)) {
|
|
6427
7272
|
if (baseArgs.temperature != null) {
|
|
@@ -6440,6 +7285,18 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6440
7285
|
details: "topP is not supported for reasoning models"
|
|
6441
7286
|
});
|
|
6442
7287
|
}
|
|
7288
|
+
if (modelCapabilities.supportedReasoningEfforts != null && (baseArgs.top_logprobs != null || ((_j = baseArgs.include) == null ? void 0 : _j.includes("message.output_text.logprobs")))) {
|
|
7289
|
+
baseArgs.top_logprobs = void 0;
|
|
7290
|
+
const filteredInclude = (_k = baseArgs.include) == null ? void 0 : _k.filter(
|
|
7291
|
+
(value) => value !== "message.output_text.logprobs"
|
|
7292
|
+
);
|
|
7293
|
+
baseArgs.include = filteredInclude != null && filteredInclude.length > 0 ? filteredInclude : void 0;
|
|
7294
|
+
warnings.push({
|
|
7295
|
+
type: "unsupported",
|
|
7296
|
+
feature: "logprobs",
|
|
7297
|
+
details: "logprobs is not supported for reasoning models"
|
|
7298
|
+
});
|
|
7299
|
+
}
|
|
6443
7300
|
}
|
|
6444
7301
|
} else {
|
|
6445
7302
|
if ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null) {
|
|
@@ -6487,9 +7344,9 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6487
7344
|
});
|
|
6488
7345
|
delete baseArgs.service_tier;
|
|
6489
7346
|
}
|
|
6490
|
-
const shellToolEnvType = (
|
|
7347
|
+
const shellToolEnvType = (_n = (_m = (_l = tools == null ? void 0 : tools.find(
|
|
6491
7348
|
(tool) => tool.type === "provider" && tool.id === "openai.shell"
|
|
6492
|
-
)) == null ? void 0 :
|
|
7349
|
+
)) == null ? void 0 : _l.args) == null ? void 0 : _m.environment) == null ? void 0 : _n.type;
|
|
6493
7350
|
const isShellProviderExecuted = shellToolEnvType === "containerAuto" || shellToolEnvType === "containerReference";
|
|
6494
7351
|
return {
|
|
6495
7352
|
webSearchToolName,
|
|
@@ -6505,8 +7362,15 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6505
7362
|
isShellProviderExecuted
|
|
6506
7363
|
};
|
|
6507
7364
|
}
|
|
7365
|
+
getArgs(options) {
|
|
7366
|
+
return _OpenAIResponsesLanguageModel.prepareRequest({
|
|
7367
|
+
modelId: this.modelId,
|
|
7368
|
+
config: this.config,
|
|
7369
|
+
options
|
|
7370
|
+
});
|
|
7371
|
+
}
|
|
6508
7372
|
async doGenerate(options) {
|
|
6509
|
-
var
|
|
7373
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H;
|
|
6510
7374
|
const {
|
|
6511
7375
|
args: body,
|
|
6512
7376
|
warnings,
|
|
@@ -6526,7 +7390,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6526
7390
|
rawValue: rawResponse
|
|
6527
7391
|
} = await postJsonToApi5({
|
|
6528
7392
|
url,
|
|
6529
|
-
headers: combineHeaders6((_b = (
|
|
7393
|
+
headers: combineHeaders6((_b = (_a2 = this.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
6530
7394
|
body,
|
|
6531
7395
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
6532
7396
|
successfulResponseHandler: createJsonResponseHandler6(
|
|
@@ -6560,6 +7424,9 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6560
7424
|
}
|
|
6561
7425
|
const content = [];
|
|
6562
7426
|
const logprobs = [];
|
|
7427
|
+
const functionTools = (_e = (_d = options.tools) == null ? void 0 : _d.filter(
|
|
7428
|
+
(tool) => tool.type === "function"
|
|
7429
|
+
)) != null ? _e : [];
|
|
6563
7430
|
let hasFunctionCall = false;
|
|
6564
7431
|
const hostedToolSearchCallIds = [];
|
|
6565
7432
|
for (const part of response.output) {
|
|
@@ -6575,7 +7442,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6575
7442
|
providerMetadata: {
|
|
6576
7443
|
[providerOptionsName]: {
|
|
6577
7444
|
itemId: part.id,
|
|
6578
|
-
reasoningEncryptedContent: (
|
|
7445
|
+
reasoningEncryptedContent: (_f = part.encrypted_content) != null ? _f : null
|
|
6579
7446
|
}
|
|
6580
7447
|
}
|
|
6581
7448
|
});
|
|
@@ -6601,7 +7468,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6601
7468
|
break;
|
|
6602
7469
|
}
|
|
6603
7470
|
case "tool_search_call": {
|
|
6604
|
-
const toolCallId = (
|
|
7471
|
+
const toolCallId = (_g = part.call_id) != null ? _g : part.id;
|
|
6605
7472
|
const isHosted = part.execution === "server";
|
|
6606
7473
|
if (isHosted) {
|
|
6607
7474
|
hostedToolSearchCallIds.push(toolCallId);
|
|
@@ -6624,7 +7491,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6624
7491
|
break;
|
|
6625
7492
|
}
|
|
6626
7493
|
case "tool_search_output": {
|
|
6627
|
-
const toolCallId = (
|
|
7494
|
+
const toolCallId = (_i = (_h = part.call_id) != null ? _h : hostedToolSearchCallIds.shift()) != null ? _i : part.id;
|
|
6628
7495
|
content.push({
|
|
6629
7496
|
type: "tool-result",
|
|
6630
7497
|
toolCallId,
|
|
@@ -6695,7 +7562,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6695
7562
|
}
|
|
6696
7563
|
case "message": {
|
|
6697
7564
|
for (const contentPart of part.content) {
|
|
6698
|
-
if (((
|
|
7565
|
+
if (((_k = (_j = options.providerOptions) == null ? void 0 : _j[providerOptionsName]) == null ? void 0 : _k.logprobs) && contentPart.logprobs) {
|
|
6699
7566
|
logprobs.push(contentPart.logprobs);
|
|
6700
7567
|
}
|
|
6701
7568
|
const providerMetadata2 = {
|
|
@@ -6717,7 +7584,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6717
7584
|
content.push({
|
|
6718
7585
|
type: "source",
|
|
6719
7586
|
sourceType: "url",
|
|
6720
|
-
id: (
|
|
7587
|
+
id: (_n = (_m = (_l = this.config).generateId) == null ? void 0 : _m.call(_l)) != null ? _n : generateId2(),
|
|
6721
7588
|
url: annotation.url,
|
|
6722
7589
|
title: annotation.title
|
|
6723
7590
|
});
|
|
@@ -6725,7 +7592,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6725
7592
|
content.push({
|
|
6726
7593
|
type: "source",
|
|
6727
7594
|
sourceType: "document",
|
|
6728
|
-
id: (
|
|
7595
|
+
id: (_q = (_p = (_o = this.config).generateId) == null ? void 0 : _p.call(_o)) != null ? _q : generateId2(),
|
|
6729
7596
|
mediaType: "text/plain",
|
|
6730
7597
|
title: annotation.filename,
|
|
6731
7598
|
filename: annotation.filename,
|
|
@@ -6741,7 +7608,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6741
7608
|
content.push({
|
|
6742
7609
|
type: "source",
|
|
6743
7610
|
sourceType: "document",
|
|
6744
|
-
id: (
|
|
7611
|
+
id: (_t = (_s = (_r = this.config).generateId) == null ? void 0 : _s.call(_r)) != null ? _t : generateId2(),
|
|
6745
7612
|
mediaType: "text/plain",
|
|
6746
7613
|
title: annotation.filename,
|
|
6747
7614
|
filename: annotation.filename,
|
|
@@ -6757,7 +7624,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6757
7624
|
content.push({
|
|
6758
7625
|
type: "source",
|
|
6759
7626
|
sourceType: "document",
|
|
6760
|
-
id: (
|
|
7627
|
+
id: (_w = (_v = (_u = this.config).generateId) == null ? void 0 : _v.call(_u)) != null ? _w : generateId2(),
|
|
6761
7628
|
mediaType: "application/octet-stream",
|
|
6762
7629
|
title: annotation.file_id,
|
|
6763
7630
|
filename: annotation.file_id,
|
|
@@ -6776,6 +7643,20 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6776
7643
|
}
|
|
6777
7644
|
case "function_call": {
|
|
6778
7645
|
hasFunctionCall = true;
|
|
7646
|
+
const expandedToolCalls = await expandParallelToolCall({
|
|
7647
|
+
toolCall: {
|
|
7648
|
+
toolCallId: part.call_id,
|
|
7649
|
+
toolName: part.name,
|
|
7650
|
+
input: part.arguments
|
|
7651
|
+
},
|
|
7652
|
+
tools: functionTools,
|
|
7653
|
+
providerOptionsName,
|
|
7654
|
+
itemId: part.id
|
|
7655
|
+
});
|
|
7656
|
+
if (expandedToolCalls != null) {
|
|
7657
|
+
content.push(...expandedToolCalls);
|
|
7658
|
+
break;
|
|
7659
|
+
}
|
|
6779
7660
|
content.push({
|
|
6780
7661
|
type: "tool-call",
|
|
6781
7662
|
toolCallId: part.call_id,
|
|
@@ -6784,6 +7665,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6784
7665
|
providerMetadata: {
|
|
6785
7666
|
[providerOptionsName]: {
|
|
6786
7667
|
itemId: part.id,
|
|
7668
|
+
...part.async != null && { async: part.async },
|
|
6787
7669
|
...part.namespace != null && { namespace: part.namespace },
|
|
6788
7670
|
...part.caller != null && {
|
|
6789
7671
|
caller: part.caller.type === "program" ? {
|
|
@@ -6845,7 +7727,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6845
7727
|
input: JSON.stringify(part.input),
|
|
6846
7728
|
providerMetadata: {
|
|
6847
7729
|
[providerOptionsName]: {
|
|
6848
|
-
itemId: part.id
|
|
7730
|
+
itemId: part.id,
|
|
7731
|
+
...part.async != null && { async: part.async }
|
|
6849
7732
|
}
|
|
6850
7733
|
}
|
|
6851
7734
|
});
|
|
@@ -6872,7 +7755,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6872
7755
|
break;
|
|
6873
7756
|
}
|
|
6874
7757
|
case "mcp_call": {
|
|
6875
|
-
const toolCallId = part.approval_request_id != null ? (
|
|
7758
|
+
const toolCallId = part.approval_request_id != null ? (_x = approvalRequestIdToDummyToolCallIdFromPrompt[part.approval_request_id]) != null ? _x : part.id : part.id;
|
|
6876
7759
|
const toolName = `mcp.${part.name}`;
|
|
6877
7760
|
content.push({
|
|
6878
7761
|
type: "tool-call",
|
|
@@ -6906,8 +7789,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6906
7789
|
break;
|
|
6907
7790
|
}
|
|
6908
7791
|
case "mcp_approval_request": {
|
|
6909
|
-
const approvalRequestId = (
|
|
6910
|
-
const dummyToolCallId = (
|
|
7792
|
+
const approvalRequestId = (_y = part.approval_request_id) != null ? _y : part.id;
|
|
7793
|
+
const dummyToolCallId = (_B = (_A = (_z = this.config).generateId) == null ? void 0 : _A.call(_z)) != null ? _B : generateId2();
|
|
6911
7794
|
const toolName = `mcp.${part.name}`;
|
|
6912
7795
|
content.push({
|
|
6913
7796
|
type: "tool-call",
|
|
@@ -6973,13 +7856,13 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6973
7856
|
toolName: toolNameMapping.toCustomToolName("file_search"),
|
|
6974
7857
|
result: {
|
|
6975
7858
|
queries: part.queries,
|
|
6976
|
-
results: (
|
|
7859
|
+
results: (_D = (_C = part.results) == null ? void 0 : _C.map((result) => ({
|
|
6977
7860
|
attributes: result.attributes,
|
|
6978
7861
|
fileId: result.file_id,
|
|
6979
7862
|
filename: result.filename,
|
|
6980
7863
|
score: result.score,
|
|
6981
7864
|
text: result.text
|
|
6982
|
-
}))) != null ?
|
|
7865
|
+
}))) != null ? _D : null
|
|
6983
7866
|
}
|
|
6984
7867
|
});
|
|
6985
7868
|
break;
|
|
@@ -7006,6 +7889,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7006
7889
|
break;
|
|
7007
7890
|
}
|
|
7008
7891
|
case "apply_patch_call": {
|
|
7892
|
+
hasFunctionCall = true;
|
|
7009
7893
|
content.push({
|
|
7010
7894
|
type: "tool-call",
|
|
7011
7895
|
toolCallId: part.call_id,
|
|
@@ -7043,7 +7927,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7043
7927
|
responseId: response.id,
|
|
7044
7928
|
...logprobs.length > 0 ? { logprobs } : {},
|
|
7045
7929
|
...typeof response.service_tier === "string" ? { serviceTier: response.service_tier } : {},
|
|
7046
|
-
...((
|
|
7930
|
+
...((_E = response.reasoning) == null ? void 0 : _E.context) != null ? { reasoningContext: response.reasoning.context } : {}
|
|
7047
7931
|
}
|
|
7048
7932
|
};
|
|
7049
7933
|
const usage = response.usage;
|
|
@@ -7051,10 +7935,10 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7051
7935
|
content,
|
|
7052
7936
|
finishReason: {
|
|
7053
7937
|
unified: mapOpenAIResponseFinishReason({
|
|
7054
|
-
finishReason: (
|
|
7938
|
+
finishReason: (_F = response.incomplete_details) == null ? void 0 : _F.reason,
|
|
7055
7939
|
hasFunctionCall
|
|
7056
7940
|
}),
|
|
7057
|
-
raw: (
|
|
7941
|
+
raw: (_H = (_G = response.incomplete_details) == null ? void 0 : _G.reason) != null ? _H : void 0
|
|
7058
7942
|
},
|
|
7059
7943
|
usage: convertOpenAIResponsesUsage(usage),
|
|
7060
7944
|
request: { body },
|
|
@@ -7070,7 +7954,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7070
7954
|
};
|
|
7071
7955
|
}
|
|
7072
7956
|
async doStream(options) {
|
|
7073
|
-
var
|
|
7957
|
+
var _a2, _b, _c, _d;
|
|
7074
7958
|
const {
|
|
7075
7959
|
args: body,
|
|
7076
7960
|
warnings,
|
|
@@ -7086,7 +7970,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7086
7970
|
});
|
|
7087
7971
|
const { responseHeaders, value: response } = await postJsonToApi5({
|
|
7088
7972
|
url,
|
|
7089
|
-
headers: combineHeaders6((_b = (
|
|
7973
|
+
headers: combineHeaders6((_b = (_a2 = this.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
7090
7974
|
body: {
|
|
7091
7975
|
...body,
|
|
7092
7976
|
stream: true
|
|
@@ -7109,6 +7993,9 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7109
7993
|
});
|
|
7110
7994
|
const self = this;
|
|
7111
7995
|
const approvalRequestIdToDummyToolCallIdFromPrompt = extractApprovalRequestIdToToolCallIdMapping(options.prompt);
|
|
7996
|
+
const functionTools = (_d = (_c = options.tools) == null ? void 0 : _c.filter(
|
|
7997
|
+
(tool) => tool.type === "function"
|
|
7998
|
+
)) != null ? _d : [];
|
|
7112
7999
|
const approvalRequestIdToDummyToolCallIdFromStream = /* @__PURE__ */ new Map();
|
|
7113
8000
|
let finishReason = {
|
|
7114
8001
|
unified: "other",
|
|
@@ -7127,8 +8014,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7127
8014
|
itemId,
|
|
7128
8015
|
outputIndex
|
|
7129
8016
|
}) => {
|
|
7130
|
-
var
|
|
7131
|
-
return outputIndex == null ? itemId : (
|
|
8017
|
+
var _a3;
|
|
8018
|
+
return outputIndex == null ? itemId : (_a3 = activeOutputItemIds[outputIndex]) != null ? _a3 : itemId;
|
|
7132
8019
|
};
|
|
7133
8020
|
let serviceTier;
|
|
7134
8021
|
let reasoningContext;
|
|
@@ -7141,7 +8028,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7141
8028
|
controller.enqueue({ type: "stream-start", warnings });
|
|
7142
8029
|
},
|
|
7143
8030
|
transform(chunk, controller) {
|
|
7144
|
-
var
|
|
8031
|
+
var _a3, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S;
|
|
7145
8032
|
if (options.includeRawChunks) {
|
|
7146
8033
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
7147
8034
|
}
|
|
@@ -7153,6 +8040,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7153
8040
|
requestBodyValues: body,
|
|
7154
8041
|
responseHeaders
|
|
7155
8042
|
}) : chunk.error;
|
|
8043
|
+
encounteredStreamError = true;
|
|
7156
8044
|
finishReason = { unified: "error", raw: void 0 };
|
|
7157
8045
|
controller.enqueue({ type: "error", error });
|
|
7158
8046
|
return;
|
|
@@ -7160,22 +8048,32 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7160
8048
|
const value = chunk.value;
|
|
7161
8049
|
if (isResponseOutputItemAddedChunk(value)) {
|
|
7162
8050
|
if (value.item.type === "function_call") {
|
|
8051
|
+
const suppressInputStreaming = isUndeclaredParallelToolCall({
|
|
8052
|
+
toolName: value.item.name,
|
|
8053
|
+
tools: functionTools
|
|
8054
|
+
});
|
|
7163
8055
|
ongoingToolCalls[value.output_index] = {
|
|
7164
8056
|
toolName: value.item.name,
|
|
7165
|
-
toolCallId: value.item.call_id
|
|
8057
|
+
toolCallId: value.item.call_id,
|
|
8058
|
+
suppressInputStreaming,
|
|
8059
|
+
bufferedInputDeltas: suppressInputStreaming ? [] : void 0,
|
|
8060
|
+
async: value.item.async
|
|
7166
8061
|
};
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
8062
|
+
if (!suppressInputStreaming) {
|
|
8063
|
+
controller.enqueue({
|
|
8064
|
+
type: "tool-input-start",
|
|
8065
|
+
id: value.item.call_id,
|
|
8066
|
+
toolName: value.item.name
|
|
8067
|
+
});
|
|
8068
|
+
}
|
|
7172
8069
|
} else if (value.item.type === "custom_tool_call") {
|
|
7173
8070
|
const toolName = toolNameMapping.toCustomToolName(
|
|
7174
8071
|
value.item.name
|
|
7175
8072
|
);
|
|
7176
8073
|
ongoingToolCalls[value.output_index] = {
|
|
7177
8074
|
toolName,
|
|
7178
|
-
toolCallId: value.item.call_id
|
|
8075
|
+
toolCallId: value.item.call_id,
|
|
8076
|
+
async: value.item.async
|
|
7179
8077
|
};
|
|
7180
8078
|
controller.enqueue({
|
|
7181
8079
|
type: "tool-input-start",
|
|
@@ -7211,7 +8109,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7211
8109
|
providerExecuted: true
|
|
7212
8110
|
});
|
|
7213
8111
|
} else if (value.item.type === "computer_call") {
|
|
7214
|
-
const toolCallId = (
|
|
8112
|
+
const toolCallId = (_a3 = value.item.call_id) != null ? _a3 : value.item.id;
|
|
7215
8113
|
ongoingToolCalls[value.output_index] = {
|
|
7216
8114
|
toolName: toolNameMapping.toCustomToolName("computer"),
|
|
7217
8115
|
toolCallId
|
|
@@ -7321,7 +8219,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7321
8219
|
} else if (value.item.type === "message") {
|
|
7322
8220
|
activeOutputItemIds[value.output_index] = value.item.id;
|
|
7323
8221
|
ongoingAnnotations.splice(0, ongoingAnnotations.length);
|
|
7324
|
-
activeMessagePhase = (
|
|
8222
|
+
activeMessagePhase = (_c2 = value.item.phase) != null ? _c2 : void 0;
|
|
7325
8223
|
controller.enqueue({
|
|
7326
8224
|
type: "text-start",
|
|
7327
8225
|
id: value.item.id,
|
|
@@ -7346,7 +8244,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7346
8244
|
providerMetadata: {
|
|
7347
8245
|
[providerOptionsName]: {
|
|
7348
8246
|
itemId: value.item.id,
|
|
7349
|
-
reasoningEncryptedContent: (
|
|
8247
|
+
reasoningEncryptedContent: (_d2 = value.item.encrypted_content) != null ? _d2 : null
|
|
7350
8248
|
}
|
|
7351
8249
|
}
|
|
7352
8250
|
});
|
|
@@ -7374,37 +8272,106 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7374
8272
|
});
|
|
7375
8273
|
activeOutputItemIds[value.output_index] = void 0;
|
|
7376
8274
|
} else if (value.item.type === "function_call") {
|
|
8275
|
+
const item = value.item;
|
|
8276
|
+
const ongoingToolCall = ongoingToolCalls[value.output_index];
|
|
7377
8277
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7378
8278
|
hasFunctionCall = true;
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
8279
|
+
const suppressInputStreaming = (_f = ongoingToolCall == null ? void 0 : ongoingToolCall.suppressInputStreaming) != null ? _f : isUndeclaredParallelToolCall({
|
|
8280
|
+
toolName: item.name,
|
|
8281
|
+
tools: functionTools
|
|
8282
|
+
});
|
|
8283
|
+
const enqueueUnexpandedToolCall = () => {
|
|
8284
|
+
var _a4;
|
|
8285
|
+
if (suppressInputStreaming) {
|
|
8286
|
+
controller.enqueue({
|
|
8287
|
+
type: "tool-input-start",
|
|
8288
|
+
id: item.call_id,
|
|
8289
|
+
toolName: item.name
|
|
8290
|
+
});
|
|
8291
|
+
const bufferedInputDeltas = (_a4 = ongoingToolCall == null ? void 0 : ongoingToolCall.bufferedInputDeltas) != null ? _a4 : [];
|
|
8292
|
+
if (bufferedInputDeltas.length > 0) {
|
|
8293
|
+
for (const delta of bufferedInputDeltas) {
|
|
8294
|
+
controller.enqueue({
|
|
8295
|
+
type: "tool-input-delta",
|
|
8296
|
+
id: item.call_id,
|
|
8297
|
+
delta
|
|
8298
|
+
});
|
|
7386
8299
|
}
|
|
8300
|
+
} else if (item.arguments.length > 0) {
|
|
8301
|
+
controller.enqueue({
|
|
8302
|
+
type: "tool-input-delta",
|
|
8303
|
+
id: item.call_id,
|
|
8304
|
+
delta: item.arguments
|
|
8305
|
+
});
|
|
7387
8306
|
}
|
|
7388
8307
|
}
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
8308
|
+
controller.enqueue({
|
|
8309
|
+
type: "tool-input-end",
|
|
8310
|
+
id: item.call_id,
|
|
8311
|
+
...item.namespace != null && {
|
|
8312
|
+
providerMetadata: {
|
|
8313
|
+
[providerOptionsName]: {
|
|
8314
|
+
namespace: item.namespace
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8317
|
+
}
|
|
8318
|
+
});
|
|
8319
|
+
controller.enqueue({
|
|
8320
|
+
type: "tool-call",
|
|
8321
|
+
toolCallId: item.call_id,
|
|
8322
|
+
toolName: item.name,
|
|
8323
|
+
input: item.arguments,
|
|
8324
|
+
providerMetadata: {
|
|
8325
|
+
[providerOptionsName]: {
|
|
8326
|
+
itemId: item.id,
|
|
8327
|
+
...item.async != null ? { async: item.async } : (ongoingToolCall == null ? void 0 : ongoingToolCall.async) != null ? { async: ongoingToolCall.async } : {},
|
|
8328
|
+
...item.namespace != null && {
|
|
8329
|
+
namespace: item.namespace
|
|
8330
|
+
},
|
|
8331
|
+
...item.caller != null && {
|
|
8332
|
+
caller: item.caller.type === "program" ? {
|
|
8333
|
+
type: "program",
|
|
8334
|
+
callerId: item.caller.caller_id
|
|
8335
|
+
} : item.caller
|
|
8336
|
+
}
|
|
7406
8337
|
}
|
|
7407
8338
|
}
|
|
8339
|
+
});
|
|
8340
|
+
};
|
|
8341
|
+
if (!suppressInputStreaming) {
|
|
8342
|
+
enqueueUnexpandedToolCall();
|
|
8343
|
+
return;
|
|
8344
|
+
}
|
|
8345
|
+
return expandParallelToolCall({
|
|
8346
|
+
toolCall: {
|
|
8347
|
+
toolCallId: item.call_id,
|
|
8348
|
+
toolName: item.name,
|
|
8349
|
+
input: item.arguments
|
|
8350
|
+
},
|
|
8351
|
+
tools: functionTools,
|
|
8352
|
+
providerOptionsName,
|
|
8353
|
+
itemId: item.id
|
|
8354
|
+
}).then((expandedToolCalls) => {
|
|
8355
|
+
if (expandedToolCalls == null) {
|
|
8356
|
+
enqueueUnexpandedToolCall();
|
|
8357
|
+
return;
|
|
8358
|
+
}
|
|
8359
|
+
for (const toolCall of expandedToolCalls) {
|
|
8360
|
+
controller.enqueue({
|
|
8361
|
+
type: "tool-input-start",
|
|
8362
|
+
id: toolCall.toolCallId,
|
|
8363
|
+
toolName: toolCall.toolName
|
|
8364
|
+
});
|
|
8365
|
+
controller.enqueue({
|
|
8366
|
+
type: "tool-input-delta",
|
|
8367
|
+
id: toolCall.toolCallId,
|
|
8368
|
+
delta: toolCall.input
|
|
8369
|
+
});
|
|
8370
|
+
controller.enqueue({
|
|
8371
|
+
type: "tool-input-end",
|
|
8372
|
+
id: toolCall.toolCallId
|
|
8373
|
+
});
|
|
8374
|
+
controller.enqueue(toolCall);
|
|
7408
8375
|
}
|
|
7409
8376
|
});
|
|
7410
8377
|
} else if (value.item.type === "program") {
|
|
@@ -7443,6 +8410,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7443
8410
|
}
|
|
7444
8411
|
});
|
|
7445
8412
|
} else if (value.item.type === "custom_tool_call") {
|
|
8413
|
+
const ongoingToolCall = ongoingToolCalls[value.output_index];
|
|
7446
8414
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7447
8415
|
hasFunctionCall = true;
|
|
7448
8416
|
const toolName = toolNameMapping.toCustomToolName(
|
|
@@ -7459,7 +8427,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7459
8427
|
input: JSON.stringify(value.item.input),
|
|
7460
8428
|
providerMetadata: {
|
|
7461
8429
|
[providerOptionsName]: {
|
|
7462
|
-
itemId: value.item.id
|
|
8430
|
+
itemId: value.item.id,
|
|
8431
|
+
...value.item.async != null ? { async: value.item.async } : (ongoingToolCall == null ? void 0 : ongoingToolCall.async) != null ? { async: ongoingToolCall.async } : {}
|
|
7463
8432
|
}
|
|
7464
8433
|
}
|
|
7465
8434
|
});
|
|
@@ -7529,13 +8498,13 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7529
8498
|
toolName: toolNameMapping.toCustomToolName("file_search"),
|
|
7530
8499
|
result: {
|
|
7531
8500
|
queries: value.item.queries,
|
|
7532
|
-
results: (
|
|
8501
|
+
results: (_h = (_g = value.item.results) == null ? void 0 : _g.map((result2) => ({
|
|
7533
8502
|
attributes: result2.attributes,
|
|
7534
8503
|
fileId: result2.file_id,
|
|
7535
8504
|
filename: result2.filename,
|
|
7536
8505
|
score: result2.score,
|
|
7537
8506
|
text: result2.text
|
|
7538
|
-
}))) != null ?
|
|
8507
|
+
}))) != null ? _h : null
|
|
7539
8508
|
}
|
|
7540
8509
|
});
|
|
7541
8510
|
} else if (value.item.type === "code_interpreter_call") {
|
|
@@ -7561,7 +8530,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7561
8530
|
const toolCall = ongoingToolCalls[value.output_index];
|
|
7562
8531
|
const isHosted = value.item.execution === "server";
|
|
7563
8532
|
if (toolCall != null) {
|
|
7564
|
-
const toolCallId = isHosted ? toolCall.toolCallId : (
|
|
8533
|
+
const toolCallId = isHosted ? toolCall.toolCallId : (_i = value.item.call_id) != null ? _i : value.item.id;
|
|
7565
8534
|
if (isHosted) {
|
|
7566
8535
|
hostedToolSearchCallIds.push(toolCallId);
|
|
7567
8536
|
} else {
|
|
@@ -7593,7 +8562,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7593
8562
|
}
|
|
7594
8563
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7595
8564
|
} else if (value.item.type === "tool_search_output") {
|
|
7596
|
-
const toolCallId = (
|
|
8565
|
+
const toolCallId = (_k = (_j = value.item.call_id) != null ? _j : hostedToolSearchCallIds.shift()) != null ? _k : value.item.id;
|
|
7597
8566
|
controller.enqueue({
|
|
7598
8567
|
type: "tool-result",
|
|
7599
8568
|
toolCallId,
|
|
@@ -7609,10 +8578,10 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7609
8578
|
});
|
|
7610
8579
|
} else if (value.item.type === "mcp_call") {
|
|
7611
8580
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7612
|
-
const approvalRequestId = (
|
|
7613
|
-
const aliasedToolCallId = approvalRequestId != null ? (
|
|
8581
|
+
const approvalRequestId = (_l = value.item.approval_request_id) != null ? _l : void 0;
|
|
8582
|
+
const aliasedToolCallId = approvalRequestId != null ? (_n = (_m = approvalRequestIdToDummyToolCallIdFromStream.get(
|
|
7614
8583
|
approvalRequestId
|
|
7615
|
-
)) != null ?
|
|
8584
|
+
)) != null ? _m : approvalRequestIdToDummyToolCallIdFromPrompt[approvalRequestId]) != null ? _n : value.item.id : value.item.id;
|
|
7616
8585
|
const toolName = `mcp.${value.item.name}`;
|
|
7617
8586
|
controller.enqueue({
|
|
7618
8587
|
type: "tool-call",
|
|
@@ -7664,6 +8633,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7664
8633
|
toolCall.applyPatch.endEmitted = true;
|
|
7665
8634
|
}
|
|
7666
8635
|
if (toolCall && value.item.status === "completed") {
|
|
8636
|
+
hasFunctionCall = true;
|
|
7667
8637
|
controller.enqueue({
|
|
7668
8638
|
type: "tool-call",
|
|
7669
8639
|
toolCallId: toolCall.toolCallId,
|
|
@@ -7682,8 +8652,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7682
8652
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7683
8653
|
} else if (value.item.type === "mcp_approval_request") {
|
|
7684
8654
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7685
|
-
const dummyToolCallId = (
|
|
7686
|
-
const approvalRequestId = (
|
|
8655
|
+
const dummyToolCallId = (_q = (_p = (_o = self.config).generateId) == null ? void 0 : _p.call(_o)) != null ? _q : generateId2();
|
|
8656
|
+
const approvalRequestId = (_r = value.item.approval_request_id) != null ? _r : value.item.id;
|
|
7687
8657
|
approvalRequestIdToDummyToolCallIdFromStream.set(
|
|
7688
8658
|
approvalRequestId,
|
|
7689
8659
|
dummyToolCallId
|
|
@@ -7777,7 +8747,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7777
8747
|
providerMetadata: {
|
|
7778
8748
|
[providerOptionsName]: {
|
|
7779
8749
|
itemId,
|
|
7780
|
-
reasoningEncryptedContent: (
|
|
8750
|
+
reasoningEncryptedContent: (_s = value.item.encrypted_content) != null ? _s : null
|
|
7781
8751
|
}
|
|
7782
8752
|
}
|
|
7783
8753
|
});
|
|
@@ -7801,11 +8771,15 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7801
8771
|
} else if (isResponseFunctionCallArgumentsDeltaChunk(value)) {
|
|
7802
8772
|
const toolCall = ongoingToolCalls[value.output_index];
|
|
7803
8773
|
if (toolCall != null) {
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
8774
|
+
if (toolCall.suppressInputStreaming) {
|
|
8775
|
+
(_t = toolCall.bufferedInputDeltas) == null ? void 0 : _t.push(value.delta);
|
|
8776
|
+
} else {
|
|
8777
|
+
controller.enqueue({
|
|
8778
|
+
type: "tool-input-delta",
|
|
8779
|
+
id: toolCall.toolCallId,
|
|
8780
|
+
delta: value.delta
|
|
8781
|
+
});
|
|
8782
|
+
}
|
|
7809
8783
|
}
|
|
7810
8784
|
} else if (isResponseCustomToolCallInputDeltaChunk(value)) {
|
|
7811
8785
|
const toolCall = ongoingToolCalls[value.output_index];
|
|
@@ -7908,7 +8882,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7908
8882
|
id: itemId,
|
|
7909
8883
|
delta: value.delta
|
|
7910
8884
|
});
|
|
7911
|
-
if (((
|
|
8885
|
+
if (((_v = (_u = options.providerOptions) == null ? void 0 : _u[providerOptionsName]) == null ? void 0 : _v.logprobs) && value.logprobs) {
|
|
7912
8886
|
logprobs.push(value.logprobs);
|
|
7913
8887
|
}
|
|
7914
8888
|
} else if (value.type === "response.reasoning_summary_part.added") {
|
|
@@ -7942,7 +8916,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7942
8916
|
providerMetadata: {
|
|
7943
8917
|
[providerOptionsName]: {
|
|
7944
8918
|
itemId,
|
|
7945
|
-
reasoningEncryptedContent: (
|
|
8919
|
+
reasoningEncryptedContent: (_w = activeReasoningPart.encryptedContent) != null ? _w : null
|
|
7946
8920
|
}
|
|
7947
8921
|
}
|
|
7948
8922
|
});
|
|
@@ -7985,23 +8959,25 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7985
8959
|
activeReasoningPart.summaryParts[value.summary_index] = "can-conclude";
|
|
7986
8960
|
}
|
|
7987
8961
|
}
|
|
7988
|
-
} else if (isResponseFinishedChunk(value)) {
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
8962
|
+
} else if (isResponseFinishedChunk(value)) {
|
|
8963
|
+
if (!encounteredStreamError) {
|
|
8964
|
+
finishReason = {
|
|
8965
|
+
unified: mapOpenAIResponseFinishReason({
|
|
8966
|
+
finishReason: (_x = value.response.incomplete_details) == null ? void 0 : _x.reason,
|
|
8967
|
+
hasFunctionCall
|
|
8968
|
+
}),
|
|
8969
|
+
raw: (_z = (_y = value.response.incomplete_details) == null ? void 0 : _y.reason) != null ? _z : void 0
|
|
8970
|
+
};
|
|
8971
|
+
}
|
|
8972
|
+
usage = (_A = value.response.usage) != null ? _A : void 0;
|
|
7997
8973
|
if (typeof value.response.service_tier === "string") {
|
|
7998
8974
|
serviceTier = value.response.service_tier;
|
|
7999
8975
|
}
|
|
8000
|
-
if (((
|
|
8976
|
+
if (((_B = value.response.reasoning) == null ? void 0 : _B.context) != null) {
|
|
8001
8977
|
reasoningContext = value.response.reasoning.context;
|
|
8002
8978
|
}
|
|
8003
8979
|
} else if (isResponseFailedChunk(value)) {
|
|
8004
|
-
const incompleteReason = (
|
|
8980
|
+
const incompleteReason = (_C = value.response.incomplete_details) == null ? void 0 : _C.reason;
|
|
8005
8981
|
finishReason = {
|
|
8006
8982
|
unified: incompleteReason ? mapOpenAIResponseFinishReason({
|
|
8007
8983
|
finishReason: incompleteReason,
|
|
@@ -8009,23 +8985,24 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
8009
8985
|
}) : "error",
|
|
8010
8986
|
raw: incompleteReason != null ? incompleteReason : "error"
|
|
8011
8987
|
};
|
|
8012
|
-
usage = (
|
|
8013
|
-
if (((
|
|
8988
|
+
usage = (_D = value.response.usage) != null ? _D : void 0;
|
|
8989
|
+
if (((_E = value.response.reasoning) == null ? void 0 : _E.context) != null) {
|
|
8014
8990
|
reasoningContext = value.response.reasoning.context;
|
|
8015
8991
|
}
|
|
8016
8992
|
if (!encounteredStreamError && value.response.error != null) {
|
|
8017
8993
|
encounteredStreamError = true;
|
|
8994
|
+
const error = {
|
|
8995
|
+
type: "response.failed",
|
|
8996
|
+
sequence_number: value.sequence_number,
|
|
8997
|
+
response: {
|
|
8998
|
+
error: value.response.error,
|
|
8999
|
+
incomplete_details: value.response.incomplete_details,
|
|
9000
|
+
service_tier: value.response.service_tier
|
|
9001
|
+
}
|
|
9002
|
+
};
|
|
8018
9003
|
controller.enqueue({
|
|
8019
9004
|
type: "error",
|
|
8020
|
-
error:
|
|
8021
|
-
type: "response.failed",
|
|
8022
|
-
sequence_number: value.sequence_number,
|
|
8023
|
-
response: {
|
|
8024
|
-
error: value.response.error,
|
|
8025
|
-
incomplete_details: value.response.incomplete_details,
|
|
8026
|
-
service_tier: value.response.service_tier
|
|
8027
|
-
}
|
|
8028
|
-
}
|
|
9005
|
+
error: (_F = createOpenAIProviderStreamError(error)) != null ? _F : error
|
|
8029
9006
|
});
|
|
8030
9007
|
}
|
|
8031
9008
|
} else if (isResponseAnnotationAddedChunk(value)) {
|
|
@@ -8034,7 +9011,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
8034
9011
|
controller.enqueue({
|
|
8035
9012
|
type: "source",
|
|
8036
9013
|
sourceType: "url",
|
|
8037
|
-
id: (
|
|
9014
|
+
id: (_I = (_H = (_G = self.config).generateId) == null ? void 0 : _H.call(_G)) != null ? _I : generateId2(),
|
|
8038
9015
|
url: value.annotation.url,
|
|
8039
9016
|
title: value.annotation.title
|
|
8040
9017
|
});
|
|
@@ -8042,7 +9019,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
8042
9019
|
controller.enqueue({
|
|
8043
9020
|
type: "source",
|
|
8044
9021
|
sourceType: "document",
|
|
8045
|
-
id: (
|
|
9022
|
+
id: (_L = (_K = (_J = self.config).generateId) == null ? void 0 : _K.call(_J)) != null ? _L : generateId2(),
|
|
8046
9023
|
mediaType: "text/plain",
|
|
8047
9024
|
title: value.annotation.filename,
|
|
8048
9025
|
filename: value.annotation.filename,
|
|
@@ -8058,7 +9035,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
8058
9035
|
controller.enqueue({
|
|
8059
9036
|
type: "source",
|
|
8060
9037
|
sourceType: "document",
|
|
8061
|
-
id: (
|
|
9038
|
+
id: (_O = (_N = (_M = self.config).generateId) == null ? void 0 : _N.call(_M)) != null ? _O : generateId2(),
|
|
8062
9039
|
mediaType: "text/plain",
|
|
8063
9040
|
title: value.annotation.filename,
|
|
8064
9041
|
filename: value.annotation.filename,
|
|
@@ -8074,7 +9051,7 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
8074
9051
|
controller.enqueue({
|
|
8075
9052
|
type: "source",
|
|
8076
9053
|
sourceType: "document",
|
|
8077
|
-
id: (
|
|
9054
|
+
id: (_R = (_Q = (_P = self.config).generateId) == null ? void 0 : _Q.call(_P)) != null ? _R : generateId2(),
|
|
8078
9055
|
mediaType: "application/octet-stream",
|
|
8079
9056
|
title: value.annotation.file_id,
|
|
8080
9057
|
filename: value.annotation.file_id,
|
|
@@ -8090,10 +9067,31 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
8090
9067
|
} else if (isErrorChunk(value)) {
|
|
8091
9068
|
encounteredStreamError = true;
|
|
8092
9069
|
finishReason = { unified: "error", raw: "error" };
|
|
8093
|
-
controller.enqueue({
|
|
9070
|
+
controller.enqueue({
|
|
9071
|
+
type: "error",
|
|
9072
|
+
error: (_S = createOpenAIProviderStreamError(value)) != null ? _S : value
|
|
9073
|
+
});
|
|
8094
9074
|
}
|
|
8095
9075
|
},
|
|
8096
9076
|
flush(controller) {
|
|
9077
|
+
var _a3;
|
|
9078
|
+
for (const toolCall of Object.values(ongoingToolCalls)) {
|
|
9079
|
+
if (!(toolCall == null ? void 0 : toolCall.suppressInputStreaming)) {
|
|
9080
|
+
continue;
|
|
9081
|
+
}
|
|
9082
|
+
controller.enqueue({
|
|
9083
|
+
type: "tool-input-start",
|
|
9084
|
+
id: toolCall.toolCallId,
|
|
9085
|
+
toolName: toolCall.toolName
|
|
9086
|
+
});
|
|
9087
|
+
for (const delta of (_a3 = toolCall.bufferedInputDeltas) != null ? _a3 : []) {
|
|
9088
|
+
controller.enqueue({
|
|
9089
|
+
type: "tool-input-delta",
|
|
9090
|
+
id: toolCall.toolCallId,
|
|
9091
|
+
delta
|
|
9092
|
+
});
|
|
9093
|
+
}
|
|
9094
|
+
}
|
|
8097
9095
|
const providerMetadata = {
|
|
8098
9096
|
[providerOptionsName]: {
|
|
8099
9097
|
responseId,
|
|
@@ -8194,7 +9192,7 @@ function isResponseOutputChunk(chunk) {
|
|
|
8194
9192
|
return !(chunk.type === "response.created" || chunk.type === "response.in_progress" || chunk.type === "response.failed" || chunk.type === "error" || chunk.type === "unknown_chunk");
|
|
8195
9193
|
}
|
|
8196
9194
|
function mapWebSearchOutput(action) {
|
|
8197
|
-
var
|
|
9195
|
+
var _a2;
|
|
8198
9196
|
if (action == null) {
|
|
8199
9197
|
return {};
|
|
8200
9198
|
}
|
|
@@ -8203,7 +9201,7 @@ function mapWebSearchOutput(action) {
|
|
|
8203
9201
|
return {
|
|
8204
9202
|
action: {
|
|
8205
9203
|
type: "search",
|
|
8206
|
-
query: (
|
|
9204
|
+
query: (_a2 = action.query) != null ? _a2 : void 0,
|
|
8207
9205
|
...action.queries != null && { queries: action.queries }
|
|
8208
9206
|
},
|
|
8209
9207
|
// include sources when provided by the Responses API (behind include flag)
|
|
@@ -8225,34 +9223,56 @@ function escapeJSONDelta(delta) {
|
|
|
8225
9223
|
return JSON.stringify(delta).slice(1, -1);
|
|
8226
9224
|
}
|
|
8227
9225
|
|
|
8228
|
-
// src/openai-
|
|
9226
|
+
// src/openai-batch.ts
|
|
8229
9227
|
var openaiBatchEndpoint = "/v1/responses";
|
|
8230
|
-
var
|
|
8231
|
-
var
|
|
9228
|
+
var openaiBatchInputFileDefaultExpiresAfterSeconds = 48 * 60 * 60;
|
|
9229
|
+
var openaiBatchProviderOptionsSchema = lazySchema26(
|
|
8232
9230
|
() => zodSchema26(
|
|
8233
9231
|
z28.object({
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
request_counts: z28.object({
|
|
8241
|
-
total: z28.number().nullish(),
|
|
8242
|
-
completed: z28.number().nullish(),
|
|
8243
|
-
failed: z28.number().nullish()
|
|
8244
|
-
}).nullish(),
|
|
8245
|
-
errors: z28.object({
|
|
8246
|
-
data: z28.array(
|
|
8247
|
-
z28.object({
|
|
8248
|
-
code: z28.string().nullish(),
|
|
8249
|
-
message: z28.string().nullish()
|
|
8250
|
-
})
|
|
8251
|
-
).nullish()
|
|
8252
|
-
}).nullish()
|
|
9232
|
+
/**
|
|
9233
|
+
* TTL in seconds for the uploaded batch input file, measured from
|
|
9234
|
+
* upload time. OpenAI accepts integers between 3600 (1 hour) and
|
|
9235
|
+
* 2592000 (30 days) inclusive. Defaults to 48 hours.
|
|
9236
|
+
*/
|
|
9237
|
+
inputFileExpiresAfter: z28.number().int().min(3600).max(2592e3).optional()
|
|
8253
9238
|
})
|
|
8254
9239
|
)
|
|
8255
9240
|
);
|
|
9241
|
+
function assertTextBatchRequests(requests) {
|
|
9242
|
+
for (const request of requests) {
|
|
9243
|
+
const requestType = request.type;
|
|
9244
|
+
if (requestType !== "text") {
|
|
9245
|
+
throw new UnsupportedFunctionalityError7({
|
|
9246
|
+
functionality: `batch request type: ${requestType}`,
|
|
9247
|
+
message: `The OpenAI Batch API does not support batch requests with type "${requestType}".`
|
|
9248
|
+
});
|
|
9249
|
+
}
|
|
9250
|
+
}
|
|
9251
|
+
}
|
|
9252
|
+
var openaiBatchResponseZodSchema = () => z28.object({
|
|
9253
|
+
id: z28.string(),
|
|
9254
|
+
status: z28.string(),
|
|
9255
|
+
output_file_id: z28.string().nullish(),
|
|
9256
|
+
error_file_id: z28.string().nullish(),
|
|
9257
|
+
created_at: z28.number().nullish(),
|
|
9258
|
+
expires_at: z28.number().nullish(),
|
|
9259
|
+
request_counts: z28.object({
|
|
9260
|
+
total: z28.number().nullish(),
|
|
9261
|
+
completed: z28.number().nullish(),
|
|
9262
|
+
failed: z28.number().nullish()
|
|
9263
|
+
}).nullish(),
|
|
9264
|
+
errors: z28.object({
|
|
9265
|
+
data: z28.array(
|
|
9266
|
+
z28.object({
|
|
9267
|
+
code: z28.string().nullish(),
|
|
9268
|
+
message: z28.string().nullish()
|
|
9269
|
+
})
|
|
9270
|
+
).nullish()
|
|
9271
|
+
}).nullish()
|
|
9272
|
+
});
|
|
9273
|
+
var openaiBatchResponseSchema = lazySchema26(
|
|
9274
|
+
() => zodSchema26(openaiBatchResponseZodSchema())
|
|
9275
|
+
);
|
|
8256
9276
|
var openaiBatchResultLineSchema = lazySchema26(
|
|
8257
9277
|
() => zodSchema26(
|
|
8258
9278
|
z28.object({
|
|
@@ -8269,16 +9289,42 @@ var openaiBatchResultLineSchema = lazySchema26(
|
|
|
8269
9289
|
})
|
|
8270
9290
|
)
|
|
8271
9291
|
);
|
|
8272
|
-
var
|
|
9292
|
+
var openaiBatchListResponseSchema = lazySchema26(
|
|
9293
|
+
() => zodSchema26(
|
|
9294
|
+
z28.object({
|
|
9295
|
+
data: z28.array(openaiBatchResponseZodSchema()),
|
|
9296
|
+
has_more: z28.boolean(),
|
|
9297
|
+
last_id: z28.string().nullish()
|
|
9298
|
+
})
|
|
9299
|
+
)
|
|
9300
|
+
);
|
|
9301
|
+
var OpenAIBatch = class {
|
|
8273
9302
|
constructor(options) {
|
|
8274
9303
|
this.options = options;
|
|
9304
|
+
this.specificationVersion = "v4";
|
|
9305
|
+
this.supportedUrls = openaiResponsesSupportedUrls;
|
|
9306
|
+
this.provider = options.provider;
|
|
8275
9307
|
}
|
|
8276
|
-
async
|
|
8277
|
-
var
|
|
9308
|
+
async doStartBatch(options) {
|
|
9309
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
9310
|
+
assertTextBatchRequests(options.requests);
|
|
9311
|
+
validateSingleModel(options.requests);
|
|
8278
9312
|
const fileParts = [];
|
|
8279
|
-
const warnings = []
|
|
9313
|
+
const warnings = options.webhookUrl == null ? [] : [
|
|
9314
|
+
{
|
|
9315
|
+
warning: {
|
|
9316
|
+
type: "unsupported",
|
|
9317
|
+
feature: "webhookUrl",
|
|
9318
|
+
details: "The OpenAI Batch API does not support per-batch webhook URLs."
|
|
9319
|
+
}
|
|
9320
|
+
}
|
|
9321
|
+
];
|
|
9322
|
+
const batchOptions = await this.parseBatchProviderOptions(
|
|
9323
|
+
options.providerOptions
|
|
9324
|
+
);
|
|
9325
|
+
const inputFileExpiresAfterSeconds = (_a2 = batchOptions == null ? void 0 : batchOptions.inputFileExpiresAfter) != null ? _a2 : openaiBatchInputFileDefaultExpiresAfterSeconds;
|
|
8280
9326
|
for (const request of options.requests) {
|
|
8281
|
-
const preparedRequest = await this.
|
|
9327
|
+
const preparedRequest = await this.prepareRequest(request);
|
|
8282
9328
|
fileParts.push(
|
|
8283
9329
|
JSON.stringify({
|
|
8284
9330
|
custom_id: request.id,
|
|
@@ -8291,6 +9337,18 @@ var OpenAIResponsesBatch = class {
|
|
|
8291
9337
|
for (const warning of preparedRequest.warnings) {
|
|
8292
9338
|
warnings.push({ requestId: request.id, warning });
|
|
8293
9339
|
}
|
|
9340
|
+
for (const tool of (_b = request.options.tools) != null ? _b : []) {
|
|
9341
|
+
if (tool.type === "provider" && !openAIBatchConvertibleProviderToolIds.has(tool.id)) {
|
|
9342
|
+
warnings.push({
|
|
9343
|
+
requestId: request.id,
|
|
9344
|
+
warning: {
|
|
9345
|
+
type: "unsupported",
|
|
9346
|
+
feature: `batch result conversion for tool "${tool.name}"`,
|
|
9347
|
+
details: "OpenAI may return output for this tool that AI SDK text batches cannot currently convert."
|
|
9348
|
+
}
|
|
9349
|
+
});
|
|
9350
|
+
}
|
|
9351
|
+
}
|
|
8294
9352
|
}
|
|
8295
9353
|
const filename = "batch.jsonl";
|
|
8296
9354
|
const file = new Blob(fileParts, {
|
|
@@ -8303,19 +9361,17 @@ var OpenAIResponsesBatch = class {
|
|
|
8303
9361
|
formData.append("expires_after[anchor]", "created_at");
|
|
8304
9362
|
formData.append(
|
|
8305
9363
|
"expires_after[seconds]",
|
|
8306
|
-
String(
|
|
9364
|
+
String(inputFileExpiresAfterSeconds)
|
|
8307
9365
|
);
|
|
8308
9366
|
const { value: uploadedFile } = await postToApi({
|
|
8309
9367
|
url: this.getUrl("/files"),
|
|
8310
|
-
headers: combineHeaders7((
|
|
9368
|
+
headers: combineHeaders7((_d = (_c = this.options.config).headers) == null ? void 0 : _d.call(_c), options.headers),
|
|
8311
9369
|
body: {
|
|
8312
9370
|
content: formData,
|
|
8313
9371
|
values: {
|
|
8314
9372
|
purpose: "batch",
|
|
8315
9373
|
"expires_after[anchor]": "created_at",
|
|
8316
|
-
"expires_after[seconds]": String(
|
|
8317
|
-
openaiBatchInputFileExpiresAfterSeconds
|
|
8318
|
-
),
|
|
9374
|
+
"expires_after[seconds]": String(inputFileExpiresAfterSeconds),
|
|
8319
9375
|
file: {
|
|
8320
9376
|
name: filename,
|
|
8321
9377
|
type: file.type,
|
|
@@ -8332,7 +9388,7 @@ var OpenAIResponsesBatch = class {
|
|
|
8332
9388
|
});
|
|
8333
9389
|
const { value: batch } = await postJsonToApi6({
|
|
8334
9390
|
url: this.getUrl("/batches"),
|
|
8335
|
-
headers: combineHeaders7((
|
|
9391
|
+
headers: combineHeaders7((_f = (_e = this.options.config).headers) == null ? void 0 : _f.call(_e), options.headers),
|
|
8336
9392
|
body: {
|
|
8337
9393
|
input_file_id: uploadedFile.id,
|
|
8338
9394
|
endpoint: openaiBatchEndpoint,
|
|
@@ -8345,20 +9401,89 @@ var OpenAIResponsesBatch = class {
|
|
|
8345
9401
|
abortSignal: options.abortSignal,
|
|
8346
9402
|
fetch: this.options.config.fetch
|
|
8347
9403
|
});
|
|
9404
|
+
const inputFileExpiresAt = convertUnixTimestamp(uploadedFile.expires_at);
|
|
8348
9405
|
return {
|
|
8349
9406
|
batchId: batch.id,
|
|
8350
9407
|
...convertOpenAIBatchStatus(batch),
|
|
9408
|
+
providerMetadata: {
|
|
9409
|
+
openai: {
|
|
9410
|
+
inputFileId: uploadedFile.id,
|
|
9411
|
+
...inputFileExpiresAt != null ? { inputFileExpiresAt } : {}
|
|
9412
|
+
}
|
|
9413
|
+
},
|
|
8351
9414
|
warnings
|
|
8352
9415
|
};
|
|
8353
9416
|
}
|
|
8354
|
-
async
|
|
9417
|
+
async parseBatchProviderOptions(providerOptions) {
|
|
9418
|
+
const providerOptionsName = this.options.config.provider.includes("azure") ? "azure" : "openai";
|
|
9419
|
+
let batchOptions = await parseProviderOptions8({
|
|
9420
|
+
provider: providerOptionsName,
|
|
9421
|
+
providerOptions,
|
|
9422
|
+
schema: openaiBatchProviderOptionsSchema
|
|
9423
|
+
});
|
|
9424
|
+
if (batchOptions == null && providerOptionsName !== "openai") {
|
|
9425
|
+
batchOptions = await parseProviderOptions8({
|
|
9426
|
+
provider: "openai",
|
|
9427
|
+
providerOptions,
|
|
9428
|
+
schema: openaiBatchProviderOptionsSchema
|
|
9429
|
+
});
|
|
9430
|
+
}
|
|
9431
|
+
return batchOptions;
|
|
9432
|
+
}
|
|
9433
|
+
async doGetBatchStatus(options) {
|
|
8355
9434
|
const batch = await this.retrieveBatch(options);
|
|
8356
9435
|
return convertOpenAIBatchStatus(batch);
|
|
8357
9436
|
}
|
|
8358
|
-
async
|
|
9437
|
+
async doCancelBatch(options) {
|
|
9438
|
+
var _a2, _b;
|
|
9439
|
+
await postJsonToApi6({
|
|
9440
|
+
url: this.getUrl(
|
|
9441
|
+
`/batches/${encodeURIComponent(options.batchId)}/cancel`
|
|
9442
|
+
),
|
|
9443
|
+
headers: combineHeaders7((_b = (_a2 = this.options.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
9444
|
+
body: {},
|
|
9445
|
+
failedResponseHandler: openaiFailedResponseHandler,
|
|
9446
|
+
successfulResponseHandler: createJsonResponseHandler7(
|
|
9447
|
+
openaiBatchResponseSchema
|
|
9448
|
+
),
|
|
9449
|
+
abortSignal: options.abortSignal,
|
|
9450
|
+
fetch: this.options.config.fetch
|
|
9451
|
+
});
|
|
9452
|
+
return {};
|
|
9453
|
+
}
|
|
9454
|
+
async doListBatches(options) {
|
|
9455
|
+
var _a2, _b;
|
|
9456
|
+
const url = new URL(this.getUrl("/batches"));
|
|
9457
|
+
if (options.limit != null) {
|
|
9458
|
+
url.searchParams.set("limit", String(options.limit));
|
|
9459
|
+
}
|
|
9460
|
+
if (options.cursor != null) {
|
|
9461
|
+
url.searchParams.set("after", options.cursor);
|
|
9462
|
+
}
|
|
9463
|
+
const { value: page } = await getFromApi2({
|
|
9464
|
+
url: url.toString(),
|
|
9465
|
+
headers: combineHeaders7((_b = (_a2 = this.options.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
9466
|
+
failedResponseHandler: openaiFailedResponseHandler,
|
|
9467
|
+
successfulResponseHandler: createJsonResponseHandler7(
|
|
9468
|
+
openaiBatchListResponseSchema
|
|
9469
|
+
),
|
|
9470
|
+
abortSignal: options.abortSignal,
|
|
9471
|
+
fetch: this.options.config.fetch,
|
|
9472
|
+
validateUrl: false
|
|
9473
|
+
});
|
|
9474
|
+
return {
|
|
9475
|
+
batches: page.data.map((batch) => ({
|
|
9476
|
+
batchId: batch.id,
|
|
9477
|
+
...convertOpenAIBatchStatus(batch)
|
|
9478
|
+
})),
|
|
9479
|
+
...page.has_more && page.last_id != null ? { nextCursor: page.last_id } : {}
|
|
9480
|
+
};
|
|
9481
|
+
}
|
|
9482
|
+
async doGetBatchResults(options) {
|
|
8359
9483
|
const batch = await this.retrieveBatch(options);
|
|
8360
|
-
|
|
8361
|
-
|
|
9484
|
+
const batchStatus = convertOpenAIBatchStatus(batch);
|
|
9485
|
+
if (batchStatus.status === "pending") {
|
|
9486
|
+
throw new InvalidArgumentError2({
|
|
8362
9487
|
argument: "batchId",
|
|
8363
9488
|
message: `OpenAI batch "${options.batchId}" is not complete.`
|
|
8364
9489
|
});
|
|
@@ -8366,14 +9491,20 @@ var OpenAIResponsesBatch = class {
|
|
|
8366
9491
|
const fileIds = [batch.output_file_id, batch.error_file_id].filter(
|
|
8367
9492
|
(fileId) => fileId != null
|
|
8368
9493
|
);
|
|
9494
|
+
if (batchStatus.status === "completed" && fileIds.length === 0) {
|
|
9495
|
+
throw new InvalidResponseDataError2({
|
|
9496
|
+
data: batch,
|
|
9497
|
+
message: `OpenAI batch "${options.batchId}" completed without batch output.`
|
|
9498
|
+
});
|
|
9499
|
+
}
|
|
8369
9500
|
const iterator = this.iterateBatchResults({ fileIds, options });
|
|
8370
9501
|
return convertAsyncIteratorToReadableStream(iterator);
|
|
8371
9502
|
}
|
|
8372
9503
|
async retrieveBatch(options) {
|
|
8373
|
-
var
|
|
8374
|
-
const { value: batch } = await
|
|
9504
|
+
var _a2, _b;
|
|
9505
|
+
const { value: batch } = await getFromApi2({
|
|
8375
9506
|
url: this.getUrl(`/batches/${encodeURIComponent(options.batchId)}`),
|
|
8376
|
-
headers: combineHeaders7((_b = (
|
|
9507
|
+
headers: combineHeaders7((_b = (_a2 = this.options.config).headers) == null ? void 0 : _b.call(_a2), options.headers),
|
|
8377
9508
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
8378
9509
|
successfulResponseHandler: createJsonResponseHandler7(
|
|
8379
9510
|
openaiBatchResponseSchema
|
|
@@ -8388,21 +9519,23 @@ var OpenAIResponsesBatch = class {
|
|
|
8388
9519
|
fileIds,
|
|
8389
9520
|
options
|
|
8390
9521
|
}) {
|
|
8391
|
-
var
|
|
9522
|
+
var _a2, _b;
|
|
8392
9523
|
for (const fileId of fileIds) {
|
|
8393
|
-
const { value:
|
|
9524
|
+
const { value: lines } = await getFromApi2({
|
|
8394
9525
|
url: this.getUrl(`/files/${encodeURIComponent(fileId)}/content`),
|
|
8395
9526
|
headers: combineHeaders7(
|
|
8396
|
-
(_b = (
|
|
9527
|
+
(_b = (_a2 = this.options.config).headers) == null ? void 0 : _b.call(_a2),
|
|
8397
9528
|
options.headers
|
|
8398
9529
|
),
|
|
8399
9530
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
8400
|
-
successfulResponseHandler:
|
|
9531
|
+
successfulResponseHandler: createJsonLinesResponseHandler(
|
|
9532
|
+
openaiBatchResultLineSchema
|
|
9533
|
+
),
|
|
8401
9534
|
abortSignal: options.abortSignal,
|
|
8402
9535
|
fetch: this.options.config.fetch,
|
|
8403
9536
|
validateUrl: false
|
|
8404
9537
|
});
|
|
8405
|
-
for await (const line of
|
|
9538
|
+
for await (const line of lines) {
|
|
8406
9539
|
yield await this.convertResultLine(line);
|
|
8407
9540
|
}
|
|
8408
9541
|
}
|
|
@@ -8414,15 +9547,16 @@ var OpenAIResponsesBatch = class {
|
|
|
8414
9547
|
code: line.error.code
|
|
8415
9548
|
};
|
|
8416
9549
|
if (line.error.code === "batch_cancelled") {
|
|
8417
|
-
return { id: line.custom_id, status: "cancelled", error };
|
|
9550
|
+
return { type: "text", id: line.custom_id, status: "cancelled", error };
|
|
8418
9551
|
}
|
|
8419
9552
|
if (line.error.code === "batch_expired") {
|
|
8420
|
-
return { id: line.custom_id, status: "expired", error };
|
|
9553
|
+
return { type: "text", id: line.custom_id, status: "expired", error };
|
|
8421
9554
|
}
|
|
8422
|
-
return { id: line.custom_id, status: "failed", error };
|
|
9555
|
+
return { type: "text", id: line.custom_id, status: "failed", error };
|
|
8423
9556
|
}
|
|
8424
9557
|
if (line.response == null) {
|
|
8425
9558
|
return {
|
|
9559
|
+
type: "text",
|
|
8426
9560
|
id: line.custom_id,
|
|
8427
9561
|
status: "failed",
|
|
8428
9562
|
error: {
|
|
@@ -8433,6 +9567,7 @@ var OpenAIResponsesBatch = class {
|
|
|
8433
9567
|
}
|
|
8434
9568
|
if (line.response.status_code < 200 || line.response.status_code >= 300) {
|
|
8435
9569
|
return {
|
|
9570
|
+
type: "text",
|
|
8436
9571
|
id: line.custom_id,
|
|
8437
9572
|
status: "failed",
|
|
8438
9573
|
error: await convertOpenAIErrorResponse({
|
|
@@ -8441,64 +9576,57 @@ var OpenAIResponsesBatch = class {
|
|
|
8441
9576
|
})
|
|
8442
9577
|
};
|
|
8443
9578
|
}
|
|
8444
|
-
const conversion = await
|
|
8445
|
-
line.response.body
|
|
8446
|
-
);
|
|
9579
|
+
const conversion = await convertOpenAIBatchResult(line.response.body);
|
|
8447
9580
|
if (!conversion.success) {
|
|
8448
9581
|
return {
|
|
9582
|
+
type: "text",
|
|
8449
9583
|
id: line.custom_id,
|
|
8450
9584
|
status: "failed",
|
|
8451
9585
|
error: conversion.error
|
|
8452
9586
|
};
|
|
8453
9587
|
}
|
|
8454
9588
|
return {
|
|
9589
|
+
type: "text",
|
|
8455
9590
|
id: line.custom_id,
|
|
8456
9591
|
status: "succeeded",
|
|
8457
9592
|
result: conversion.result
|
|
8458
9593
|
};
|
|
8459
9594
|
}
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
modelId:
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
}
|
|
8466
|
-
};
|
|
8467
|
-
var OpenAIResponsesBatchLanguageModel = class _OpenAIResponsesBatchLanguageModel extends OpenAIResponsesLanguageModel {
|
|
8468
|
-
static [WORKFLOW_SERIALIZE6](model) {
|
|
8469
|
-
return OpenAIResponsesLanguageModel[WORKFLOW_SERIALIZE6](model);
|
|
8470
|
-
}
|
|
8471
|
-
static [WORKFLOW_DESERIALIZE6](options) {
|
|
8472
|
-
return new _OpenAIResponsesBatchLanguageModel(
|
|
8473
|
-
options.modelId,
|
|
8474
|
-
options.config
|
|
8475
|
-
);
|
|
8476
|
-
}
|
|
8477
|
-
constructor(modelId, config) {
|
|
8478
|
-
super(modelId, config);
|
|
8479
|
-
this.batch = new OpenAIResponsesBatch({
|
|
8480
|
-
modelId,
|
|
8481
|
-
config,
|
|
8482
|
-
prepareRequest: async (request) => {
|
|
8483
|
-
const { args: body, warnings } = await this.getArgs(request.options);
|
|
8484
|
-
return { body, warnings };
|
|
8485
|
-
}
|
|
9595
|
+
async prepareRequest(request) {
|
|
9596
|
+
const { args: body, warnings } = await OpenAIResponsesLanguageModel.prepareRequest({
|
|
9597
|
+
modelId: request.modelId,
|
|
9598
|
+
config: this.options.config,
|
|
9599
|
+
options: request.options
|
|
8486
9600
|
});
|
|
9601
|
+
return { body, warnings };
|
|
8487
9602
|
}
|
|
8488
|
-
|
|
8489
|
-
return this.
|
|
8490
|
-
}
|
|
8491
|
-
experimental_doGetBatchStatus(options) {
|
|
8492
|
-
return this.batch.getBatchStatus(options);
|
|
8493
|
-
}
|
|
8494
|
-
experimental_doGetBatchResults(options) {
|
|
8495
|
-
return this.batch.getBatchResults(options);
|
|
9603
|
+
getUrl(path) {
|
|
9604
|
+
return this.options.config.url({ path, modelId: "" });
|
|
8496
9605
|
}
|
|
8497
9606
|
};
|
|
9607
|
+
function validateSingleModel(requests) {
|
|
9608
|
+
var _a2;
|
|
9609
|
+
const modelId = (_a2 = requests[0]) == null ? void 0 : _a2.modelId;
|
|
9610
|
+
for (const request of requests) {
|
|
9611
|
+
if (request.modelId !== modelId) {
|
|
9612
|
+
throw new InvalidArgumentError2({
|
|
9613
|
+
argument: "requests",
|
|
9614
|
+
message: `The OpenAI Batch API requires all requests in a batch to use the same model. Found "${modelId}" and "${request.modelId}".`
|
|
9615
|
+
});
|
|
9616
|
+
}
|
|
9617
|
+
}
|
|
9618
|
+
}
|
|
9619
|
+
var openAIBatchConvertibleProviderToolIds = /* @__PURE__ */ new Set([
|
|
9620
|
+
"openai.code_interpreter",
|
|
9621
|
+
"openai.custom",
|
|
9622
|
+
"openai.file_search",
|
|
9623
|
+
"openai.web_search",
|
|
9624
|
+
"openai.web_search_preview"
|
|
9625
|
+
]);
|
|
8498
9626
|
function convertOpenAIBatchStatus(batch) {
|
|
8499
|
-
var
|
|
9627
|
+
var _a2, _b, _c;
|
|
8500
9628
|
const status = mapOpenAIBatchStatus(batch.status);
|
|
8501
|
-
const firstError = (_b = (
|
|
9629
|
+
const firstError = (_b = (_a2 = batch.errors) == null ? void 0 : _a2.data) == null ? void 0 : _b[0];
|
|
8502
9630
|
const requestCounts = convertOpenAIRequestCounts(batch.request_counts);
|
|
8503
9631
|
const createdAt = convertUnixTimestamp(batch.created_at);
|
|
8504
9632
|
const expiresAt = convertUnixTimestamp(batch.expires_at);
|
|
@@ -8536,15 +9664,12 @@ function convertOpenAIRequestCounts(counts) {
|
|
|
8536
9664
|
const total = counts == null ? void 0 : counts.total;
|
|
8537
9665
|
const completed = counts == null ? void 0 : counts.completed;
|
|
8538
9666
|
const failed = counts == null ? void 0 : counts.failed;
|
|
8539
|
-
|
|
8540
|
-
return void 0;
|
|
8541
|
-
}
|
|
8542
|
-
return {
|
|
9667
|
+
return normalizeBatchRequestCounts({
|
|
8543
9668
|
total,
|
|
8544
|
-
pending: total - completed - failed,
|
|
9669
|
+
pending: total != null && completed != null && failed != null ? total - completed - failed : void 0,
|
|
8545
9670
|
completed,
|
|
8546
9671
|
failed
|
|
8547
|
-
};
|
|
9672
|
+
});
|
|
8548
9673
|
}
|
|
8549
9674
|
function convertUnixTimestamp(value) {
|
|
8550
9675
|
if (value == null || !Number.isFinite(value)) {
|
|
@@ -8557,7 +9682,7 @@ async function convertOpenAIErrorResponse({
|
|
|
8557
9682
|
body,
|
|
8558
9683
|
statusCode
|
|
8559
9684
|
}) {
|
|
8560
|
-
var
|
|
9685
|
+
var _a2;
|
|
8561
9686
|
const result = await safeValidateTypes({
|
|
8562
9687
|
value: body,
|
|
8563
9688
|
schema: openaiErrorDataSchema
|
|
@@ -8570,17 +9695,27 @@ async function convertOpenAIErrorResponse({
|
|
|
8570
9695
|
}
|
|
8571
9696
|
return {
|
|
8572
9697
|
message: result.value.error.message,
|
|
8573
|
-
type: (
|
|
9698
|
+
type: (_a2 = result.value.error.type) != null ? _a2 : void 0,
|
|
8574
9699
|
code: result.value.error.code != null ? String(result.value.error.code) : void 0,
|
|
8575
9700
|
statusCode
|
|
8576
9701
|
};
|
|
8577
9702
|
}
|
|
8578
|
-
async function
|
|
8579
|
-
var
|
|
8580
|
-
const
|
|
9703
|
+
async function convertOpenAIBatchResult(body) {
|
|
9704
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
9705
|
+
const validation = await safeValidateTypes({
|
|
8581
9706
|
value: body,
|
|
8582
9707
|
schema: openaiResponsesResponseSchema
|
|
8583
9708
|
});
|
|
9709
|
+
if (!validation.success) {
|
|
9710
|
+
return {
|
|
9711
|
+
success: false,
|
|
9712
|
+
error: {
|
|
9713
|
+
message: "OpenAI returned an invalid Responses batch result.",
|
|
9714
|
+
code: "invalid_response"
|
|
9715
|
+
}
|
|
9716
|
+
};
|
|
9717
|
+
}
|
|
9718
|
+
const response = validation.value;
|
|
8584
9719
|
if (response.error != null) {
|
|
8585
9720
|
return {
|
|
8586
9721
|
success: false,
|
|
@@ -8592,7 +9727,7 @@ async function convertOpenAIResponsesBatchResponse(body) {
|
|
|
8592
9727
|
};
|
|
8593
9728
|
}
|
|
8594
9729
|
if (response.output == null) {
|
|
8595
|
-
const detail = (
|
|
9730
|
+
const detail = (_a2 = response.incomplete_details) == null ? void 0 : _a2.reason;
|
|
8596
9731
|
return {
|
|
8597
9732
|
success: false,
|
|
8598
9733
|
error: {
|
|
@@ -8603,22 +9738,133 @@ async function convertOpenAIResponsesBatchResponse(body) {
|
|
|
8603
9738
|
}
|
|
8604
9739
|
const content = [];
|
|
8605
9740
|
const logprobs = [];
|
|
9741
|
+
let hasFunctionCall = false;
|
|
8606
9742
|
for (const part of response.output) {
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
9743
|
+
switch (part.type) {
|
|
9744
|
+
case "reasoning": {
|
|
9745
|
+
const summaries = part.summary.length > 0 ? part.summary : [{ type: "summary_text", text: "" }];
|
|
9746
|
+
for (const summary of summaries) {
|
|
9747
|
+
content.push({
|
|
9748
|
+
type: "reasoning",
|
|
9749
|
+
text: summary.text,
|
|
9750
|
+
providerMetadata: {
|
|
9751
|
+
openai: {
|
|
9752
|
+
itemId: part.id,
|
|
9753
|
+
reasoningEncryptedContent: (_b = part.encrypted_content) != null ? _b : null
|
|
9754
|
+
}
|
|
9755
|
+
}
|
|
9756
|
+
});
|
|
8612
9757
|
}
|
|
9758
|
+
break;
|
|
8613
9759
|
}
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
9760
|
+
case "message": {
|
|
9761
|
+
for (const contentPart of part.content) {
|
|
9762
|
+
content.push({ type: "text", text: contentPart.text });
|
|
9763
|
+
if (contentPart.logprobs != null) {
|
|
9764
|
+
logprobs.push(contentPart.logprobs);
|
|
9765
|
+
}
|
|
8620
9766
|
}
|
|
8621
|
-
|
|
9767
|
+
break;
|
|
9768
|
+
}
|
|
9769
|
+
case "function_call":
|
|
9770
|
+
hasFunctionCall = true;
|
|
9771
|
+
content.push({
|
|
9772
|
+
type: "tool-call",
|
|
9773
|
+
toolCallId: part.call_id,
|
|
9774
|
+
toolName: part.name,
|
|
9775
|
+
input: part.arguments,
|
|
9776
|
+
providerMetadata: {
|
|
9777
|
+
openai: {
|
|
9778
|
+
itemId: part.id,
|
|
9779
|
+
...part.namespace != null && { namespace: part.namespace },
|
|
9780
|
+
...part.caller != null && {
|
|
9781
|
+
caller: part.caller.type === "program" ? { type: "program", callerId: part.caller.caller_id } : part.caller
|
|
9782
|
+
}
|
|
9783
|
+
}
|
|
9784
|
+
}
|
|
9785
|
+
});
|
|
9786
|
+
break;
|
|
9787
|
+
case "custom_tool_call":
|
|
9788
|
+
hasFunctionCall = true;
|
|
9789
|
+
content.push({
|
|
9790
|
+
type: "tool-call",
|
|
9791
|
+
toolCallId: part.call_id,
|
|
9792
|
+
toolName: part.name,
|
|
9793
|
+
input: JSON.stringify(part.input),
|
|
9794
|
+
providerMetadata: { openai: { itemId: part.id } }
|
|
9795
|
+
});
|
|
9796
|
+
break;
|
|
9797
|
+
case "web_search_call":
|
|
9798
|
+
content.push({
|
|
9799
|
+
type: "tool-call",
|
|
9800
|
+
toolCallId: part.id,
|
|
9801
|
+
toolName: "web_search",
|
|
9802
|
+
input: "{}",
|
|
9803
|
+
providerExecuted: true,
|
|
9804
|
+
dynamic: true
|
|
9805
|
+
});
|
|
9806
|
+
content.push({
|
|
9807
|
+
type: "tool-result",
|
|
9808
|
+
toolCallId: part.id,
|
|
9809
|
+
toolName: "web_search",
|
|
9810
|
+
result: mapWebSearchOutput(part.action),
|
|
9811
|
+
dynamic: true
|
|
9812
|
+
});
|
|
9813
|
+
break;
|
|
9814
|
+
case "file_search_call":
|
|
9815
|
+
content.push({
|
|
9816
|
+
type: "tool-call",
|
|
9817
|
+
toolCallId: part.id,
|
|
9818
|
+
toolName: "file_search",
|
|
9819
|
+
input: "{}",
|
|
9820
|
+
providerExecuted: true,
|
|
9821
|
+
dynamic: true
|
|
9822
|
+
});
|
|
9823
|
+
content.push({
|
|
9824
|
+
type: "tool-result",
|
|
9825
|
+
toolCallId: part.id,
|
|
9826
|
+
toolName: "file_search",
|
|
9827
|
+
result: {
|
|
9828
|
+
queries: part.queries,
|
|
9829
|
+
results: (_d = (_c = part.results) == null ? void 0 : _c.map((result) => ({
|
|
9830
|
+
attributes: result.attributes,
|
|
9831
|
+
fileId: result.file_id,
|
|
9832
|
+
filename: result.filename,
|
|
9833
|
+
score: result.score,
|
|
9834
|
+
text: result.text
|
|
9835
|
+
}))) != null ? _d : null
|
|
9836
|
+
},
|
|
9837
|
+
dynamic: true
|
|
9838
|
+
});
|
|
9839
|
+
break;
|
|
9840
|
+
case "code_interpreter_call":
|
|
9841
|
+
content.push({
|
|
9842
|
+
type: "tool-call",
|
|
9843
|
+
toolCallId: part.id,
|
|
9844
|
+
toolName: "code_interpreter",
|
|
9845
|
+
input: JSON.stringify({
|
|
9846
|
+
code: part.code,
|
|
9847
|
+
containerId: part.container_id
|
|
9848
|
+
}),
|
|
9849
|
+
providerExecuted: true,
|
|
9850
|
+
dynamic: true
|
|
9851
|
+
});
|
|
9852
|
+
content.push({
|
|
9853
|
+
type: "tool-result",
|
|
9854
|
+
toolCallId: part.id,
|
|
9855
|
+
toolName: "code_interpreter",
|
|
9856
|
+
result: { outputs: part.outputs },
|
|
9857
|
+
dynamic: true
|
|
9858
|
+
});
|
|
9859
|
+
break;
|
|
9860
|
+
default:
|
|
9861
|
+
return {
|
|
9862
|
+
success: false,
|
|
9863
|
+
error: {
|
|
9864
|
+
message: `OpenAI returned an unsupported "${part.type}" output item in an AI SDK text batch.`,
|
|
9865
|
+
code: "unsupported_content"
|
|
9866
|
+
}
|
|
9867
|
+
};
|
|
8622
9868
|
}
|
|
8623
9869
|
}
|
|
8624
9870
|
const providerMetadata = {
|
|
@@ -8626,7 +9872,7 @@ async function convertOpenAIResponsesBatchResponse(body) {
|
|
|
8626
9872
|
responseId: response.id,
|
|
8627
9873
|
...logprobs.length > 0 ? { logprobs } : {},
|
|
8628
9874
|
...typeof response.service_tier === "string" ? { serviceTier: response.service_tier } : {},
|
|
8629
|
-
...((
|
|
9875
|
+
...((_e = response.reasoning) == null ? void 0 : _e.context) != null ? { reasoningContext: response.reasoning.context } : {}
|
|
8630
9876
|
}
|
|
8631
9877
|
};
|
|
8632
9878
|
return {
|
|
@@ -8635,10 +9881,10 @@ async function convertOpenAIResponsesBatchResponse(body) {
|
|
|
8635
9881
|
content,
|
|
8636
9882
|
finishReason: {
|
|
8637
9883
|
unified: mapOpenAIResponseFinishReason({
|
|
8638
|
-
finishReason: (
|
|
8639
|
-
hasFunctionCall
|
|
9884
|
+
finishReason: (_f = response.incomplete_details) == null ? void 0 : _f.reason,
|
|
9885
|
+
hasFunctionCall
|
|
8640
9886
|
}),
|
|
8641
|
-
raw: (
|
|
9887
|
+
raw: (_h = (_g = response.incomplete_details) == null ? void 0 : _g.reason) != null ? _h : void 0
|
|
8642
9888
|
},
|
|
8643
9889
|
usage: convertOpenAIResponsesUsage(response.usage),
|
|
8644
9890
|
response: {
|
|
@@ -8651,58 +9897,10 @@ async function convertOpenAIResponsesBatchResponse(body) {
|
|
|
8651
9897
|
}
|
|
8652
9898
|
};
|
|
8653
9899
|
}
|
|
8654
|
-
var rawStreamResponseHandler = async ({ response }) => {
|
|
8655
|
-
if (response.body == null) {
|
|
8656
|
-
throw new EmptyResponseBodyError();
|
|
8657
|
-
}
|
|
8658
|
-
return { value: response.body };
|
|
8659
|
-
};
|
|
8660
|
-
async function* parseJsonLines(stream) {
|
|
8661
|
-
const reader = stream.getReader();
|
|
8662
|
-
const decoder = new TextDecoder();
|
|
8663
|
-
let buffer = "";
|
|
8664
|
-
let finished = false;
|
|
8665
|
-
try {
|
|
8666
|
-
while (true) {
|
|
8667
|
-
const { done, value } = await reader.read();
|
|
8668
|
-
if (done) {
|
|
8669
|
-
finished = true;
|
|
8670
|
-
buffer += decoder.decode();
|
|
8671
|
-
break;
|
|
8672
|
-
}
|
|
8673
|
-
buffer += decoder.decode(value, { stream: true });
|
|
8674
|
-
let lineEnd = buffer.indexOf("\n");
|
|
8675
|
-
while (lineEnd !== -1) {
|
|
8676
|
-
const line = buffer.slice(0, lineEnd).replace(/\r$/, "");
|
|
8677
|
-
buffer = buffer.slice(lineEnd + 1);
|
|
8678
|
-
if (line.trim().length > 0) {
|
|
8679
|
-
yield await parseJSON2({
|
|
8680
|
-
text: line,
|
|
8681
|
-
schema: openaiBatchResultLineSchema
|
|
8682
|
-
});
|
|
8683
|
-
}
|
|
8684
|
-
lineEnd = buffer.indexOf("\n");
|
|
8685
|
-
}
|
|
8686
|
-
}
|
|
8687
|
-
const finalLine = buffer.replace(/\r$/, "");
|
|
8688
|
-
if (finalLine.trim().length > 0) {
|
|
8689
|
-
yield await parseJSON2({
|
|
8690
|
-
text: finalLine,
|
|
8691
|
-
schema: openaiBatchResultLineSchema
|
|
8692
|
-
});
|
|
8693
|
-
}
|
|
8694
|
-
} finally {
|
|
8695
|
-
if (!finished) {
|
|
8696
|
-
await reader.cancel().catch(() => {
|
|
8697
|
-
});
|
|
8698
|
-
}
|
|
8699
|
-
reader.releaseLock();
|
|
8700
|
-
}
|
|
8701
|
-
}
|
|
8702
9900
|
|
|
8703
9901
|
// src/realtime/openai-realtime-event-mapper.ts
|
|
8704
9902
|
function parseOpenAIRealtimeServerEvent(raw) {
|
|
8705
|
-
var
|
|
9903
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
8706
9904
|
const event = raw;
|
|
8707
9905
|
const type = event.type;
|
|
8708
9906
|
switch (type) {
|
|
@@ -8710,7 +9908,7 @@ function parseOpenAIRealtimeServerEvent(raw) {
|
|
|
8710
9908
|
case "session.created":
|
|
8711
9909
|
return {
|
|
8712
9910
|
type: "session-created",
|
|
8713
|
-
sessionId: (
|
|
9911
|
+
sessionId: (_a2 = event.session) == null ? void 0 : _a2.id,
|
|
8714
9912
|
raw
|
|
8715
9913
|
};
|
|
8716
9914
|
case "session.updated":
|
|
@@ -8948,7 +10146,7 @@ function serializeOpenAIRealtimeClientEvent(event, modelId) {
|
|
|
8948
10146
|
}
|
|
8949
10147
|
}
|
|
8950
10148
|
function buildOpenAISessionConfig(config, modelId) {
|
|
8951
|
-
var
|
|
10149
|
+
var _a2;
|
|
8952
10150
|
const session = {
|
|
8953
10151
|
type: "realtime",
|
|
8954
10152
|
model: modelId
|
|
@@ -8989,7 +10187,7 @@ function buildOpenAISessionConfig(config, modelId) {
|
|
|
8989
10187
|
}
|
|
8990
10188
|
if (config.inputAudioTranscription != null) {
|
|
8991
10189
|
input.transcription = {
|
|
8992
|
-
model: (
|
|
10190
|
+
model: (_a2 = config.inputAudioTranscription.model) != null ? _a2 : "gpt-realtime-whisper",
|
|
8993
10191
|
...config.inputAudioTranscription.language != null ? { language: config.inputAudioTranscription.language } : {},
|
|
8994
10192
|
...config.inputAudioTranscription.prompt != null ? { prompt: config.inputAudioTranscription.prompt } : {}
|
|
8995
10193
|
};
|
|
@@ -9036,8 +10234,8 @@ var OpenAIRealtimeModel = class {
|
|
|
9036
10234
|
this.config = config;
|
|
9037
10235
|
}
|
|
9038
10236
|
async doCreateClientSecret(options) {
|
|
9039
|
-
var
|
|
9040
|
-
const fetchFn = (
|
|
10237
|
+
var _a2;
|
|
10238
|
+
const fetchFn = (_a2 = this.config.fetch) != null ? _a2 : fetch;
|
|
9041
10239
|
const url = `${this.config.baseURL}/realtime/client_secrets`;
|
|
9042
10240
|
const session = options.sessionConfig != null ? buildOpenAISessionConfig(options.sessionConfig, this.modelId) : { type: "realtime", model: this.modelId };
|
|
9043
10241
|
const response = await fetchFn(url, {
|
|
@@ -9093,11 +10291,11 @@ var OpenAIRealtimeModel = class {
|
|
|
9093
10291
|
import {
|
|
9094
10292
|
combineHeaders as combineHeaders8,
|
|
9095
10293
|
createBinaryResponseHandler,
|
|
9096
|
-
parseProviderOptions as
|
|
10294
|
+
parseProviderOptions as parseProviderOptions9,
|
|
9097
10295
|
postJsonToApi as postJsonToApi7,
|
|
9098
10296
|
serializeModelOptions as serializeModelOptions6,
|
|
9099
|
-
WORKFLOW_DESERIALIZE as
|
|
9100
|
-
WORKFLOW_SERIALIZE as
|
|
10297
|
+
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE6,
|
|
10298
|
+
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE6
|
|
9101
10299
|
} from "@ai-sdk/provider-utils";
|
|
9102
10300
|
|
|
9103
10301
|
// src/speech/openai-speech-model-options.ts
|
|
@@ -9122,13 +10320,13 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
|
|
|
9122
10320
|
this.config = config;
|
|
9123
10321
|
this.specificationVersion = "v4";
|
|
9124
10322
|
}
|
|
9125
|
-
static [
|
|
10323
|
+
static [WORKFLOW_SERIALIZE6](model) {
|
|
9126
10324
|
return serializeModelOptions6({
|
|
9127
10325
|
modelId: model.modelId,
|
|
9128
10326
|
config: model.config
|
|
9129
10327
|
});
|
|
9130
10328
|
}
|
|
9131
|
-
static [
|
|
10329
|
+
static [WORKFLOW_DESERIALIZE6](options) {
|
|
9132
10330
|
return new _OpenAISpeechModel(options.modelId, options.config);
|
|
9133
10331
|
}
|
|
9134
10332
|
get provider() {
|
|
@@ -9144,7 +10342,7 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
|
|
|
9144
10342
|
providerOptions
|
|
9145
10343
|
}) {
|
|
9146
10344
|
const warnings = [];
|
|
9147
|
-
const openAIOptions = await
|
|
10345
|
+
const openAIOptions = await parseProviderOptions9({
|
|
9148
10346
|
provider: "openai",
|
|
9149
10347
|
providerOptions,
|
|
9150
10348
|
schema: openaiSpeechModelOptionsSchema
|
|
@@ -9190,8 +10388,8 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
|
|
|
9190
10388
|
};
|
|
9191
10389
|
}
|
|
9192
10390
|
async doGenerate(options) {
|
|
9193
|
-
var
|
|
9194
|
-
const currentDate = (_c = (_b = (
|
|
10391
|
+
var _a2, _b, _c, _d, _e;
|
|
10392
|
+
const currentDate = (_c = (_b = (_a2 = this.config._internal) == null ? void 0 : _a2.currentDate) == null ? void 0 : _b.call(_a2)) != null ? _c : /* @__PURE__ */ new Date();
|
|
9195
10393
|
const { requestBody, warnings } = await this.getArgs(options);
|
|
9196
10394
|
const {
|
|
9197
10395
|
value: audio,
|
|
@@ -9227,7 +10425,7 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
|
|
|
9227
10425
|
|
|
9228
10426
|
// src/transcription/openai-transcription-model.ts
|
|
9229
10427
|
import {
|
|
9230
|
-
UnsupportedFunctionalityError as
|
|
10428
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError8
|
|
9231
10429
|
} from "@ai-sdk/provider";
|
|
9232
10430
|
import {
|
|
9233
10431
|
combineHeaders as combineHeaders9,
|
|
@@ -9236,13 +10434,13 @@ import {
|
|
|
9236
10434
|
createJsonResponseHandler as createJsonResponseHandler8,
|
|
9237
10435
|
connectToWebSocket,
|
|
9238
10436
|
mediaTypeToExtension,
|
|
9239
|
-
parseProviderOptions as
|
|
10437
|
+
parseProviderOptions as parseProviderOptions10,
|
|
9240
10438
|
postFormDataToApi as postFormDataToApi3,
|
|
9241
|
-
safeParseJSON,
|
|
10439
|
+
safeParseJSON as safeParseJSON2,
|
|
9242
10440
|
serializeModelOptions as serializeModelOptions7,
|
|
9243
10441
|
toWebSocketUrl,
|
|
9244
|
-
WORKFLOW_DESERIALIZE as
|
|
9245
|
-
WORKFLOW_SERIALIZE as
|
|
10442
|
+
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE7,
|
|
10443
|
+
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE7,
|
|
9246
10444
|
waitForWebSocketBufferDrain
|
|
9247
10445
|
} from "@ai-sdk/provider-utils";
|
|
9248
10446
|
|
|
@@ -9263,18 +10461,28 @@ var openaiTranscriptionResponseSchema = lazySchema28(
|
|
|
9263
10461
|
})
|
|
9264
10462
|
).nullish(),
|
|
9265
10463
|
segments: z30.array(
|
|
9266
|
-
z30.
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
10464
|
+
z30.union([
|
|
10465
|
+
z30.object({
|
|
10466
|
+
id: z30.number(),
|
|
10467
|
+
seek: z30.number(),
|
|
10468
|
+
start: z30.number(),
|
|
10469
|
+
end: z30.number(),
|
|
10470
|
+
text: z30.string(),
|
|
10471
|
+
tokens: z30.array(z30.number()),
|
|
10472
|
+
temperature: z30.number(),
|
|
10473
|
+
avg_logprob: z30.number(),
|
|
10474
|
+
compression_ratio: z30.number(),
|
|
10475
|
+
no_speech_prob: z30.number()
|
|
10476
|
+
}),
|
|
10477
|
+
z30.object({
|
|
10478
|
+
type: z30.literal("transcript.text.segment"),
|
|
10479
|
+
id: z30.string(),
|
|
10480
|
+
start: z30.number(),
|
|
10481
|
+
end: z30.number(),
|
|
10482
|
+
text: z30.string(),
|
|
10483
|
+
speaker: z30.string()
|
|
10484
|
+
})
|
|
10485
|
+
])
|
|
9278
10486
|
).nullish()
|
|
9279
10487
|
})
|
|
9280
10488
|
)
|
|
@@ -9311,6 +10519,22 @@ var openAITranscriptionModelOptions = lazySchema29(
|
|
|
9311
10519
|
* @default ['segment']
|
|
9312
10520
|
*/
|
|
9313
10521
|
timestampGranularities: z31.array(z31.enum(["word", "segment"])).default(["segment"]).optional(),
|
|
10522
|
+
/**
|
|
10523
|
+
* The format of the transcription response.
|
|
10524
|
+
*/
|
|
10525
|
+
responseFormat: z31.enum(["json", "verbose_json", "diarized_json"]).optional(),
|
|
10526
|
+
/**
|
|
10527
|
+
* Controls how the audio is split into chunks before transcription.
|
|
10528
|
+
*/
|
|
10529
|
+
chunkingStrategy: z31.union([
|
|
10530
|
+
z31.literal("auto"),
|
|
10531
|
+
z31.object({
|
|
10532
|
+
type: z31.literal("server_vad"),
|
|
10533
|
+
threshold: z31.number().min(0).max(1).optional(),
|
|
10534
|
+
prefixPaddingMs: z31.number().int().min(0).optional(),
|
|
10535
|
+
silenceDurationMs: z31.number().int().min(0).optional()
|
|
10536
|
+
})
|
|
10537
|
+
]).optional(),
|
|
9314
10538
|
/**
|
|
9315
10539
|
* Options for streaming transcription models such as `gpt-realtime-whisper`.
|
|
9316
10540
|
*/
|
|
@@ -9397,13 +10621,13 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9397
10621
|
this.config = config;
|
|
9398
10622
|
this.specificationVersion = "v4";
|
|
9399
10623
|
}
|
|
9400
|
-
static [
|
|
10624
|
+
static [WORKFLOW_SERIALIZE7](model) {
|
|
9401
10625
|
return serializeModelOptions7({
|
|
9402
10626
|
modelId: model.modelId,
|
|
9403
10627
|
config: model.config
|
|
9404
10628
|
});
|
|
9405
10629
|
}
|
|
9406
|
-
static [
|
|
10630
|
+
static [WORKFLOW_DESERIALIZE7](options) {
|
|
9407
10631
|
return new _OpenAITranscriptionModel(options.modelId, options.config);
|
|
9408
10632
|
}
|
|
9409
10633
|
get provider() {
|
|
@@ -9414,8 +10638,9 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9414
10638
|
mediaType,
|
|
9415
10639
|
providerOptions
|
|
9416
10640
|
}) {
|
|
10641
|
+
var _a2, _b;
|
|
9417
10642
|
const warnings = [];
|
|
9418
|
-
const openAIOptions = await
|
|
10643
|
+
const openAIOptions = await parseProviderOptions10({
|
|
9419
10644
|
provider: "openai",
|
|
9420
10645
|
providerOptions,
|
|
9421
10646
|
schema: openAITranscriptionModelOptions
|
|
@@ -9432,6 +10657,8 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9432
10657
|
if (this.modelId === "whisper-1") {
|
|
9433
10658
|
formData.append("response_format", "verbose_json");
|
|
9434
10659
|
}
|
|
10660
|
+
const isDiarizationModel = this.modelId === "gpt-4o-transcribe-diarize";
|
|
10661
|
+
const chunkingStrategy = (_a2 = openAIOptions == null ? void 0 : openAIOptions.chunkingStrategy) != null ? _a2 : isDiarizationModel ? "auto" : void 0;
|
|
9435
10662
|
if (openAIOptions) {
|
|
9436
10663
|
const isGpt4oTranscribeModel = [
|
|
9437
10664
|
"gpt-4o-transcribe",
|
|
@@ -9444,7 +10671,7 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9444
10671
|
// https://platform.openai.com/docs/api-reference/audio/createTranscription#audio_createtranscription-response_format
|
|
9445
10672
|
// prefer verbose_json to get segments for models that support it
|
|
9446
10673
|
...this.modelId !== "whisper-1" && {
|
|
9447
|
-
response_format: isGpt4oTranscribeModel ? "json" : "verbose_json"
|
|
10674
|
+
response_format: (_b = openAIOptions.responseFormat) != null ? _b : isDiarizationModel ? "diarized_json" : isGpt4oTranscribeModel ? "json" : "verbose_json"
|
|
9448
10675
|
},
|
|
9449
10676
|
temperature: openAIOptions.temperature,
|
|
9450
10677
|
timestamp_granularities: openAIOptions.timestampGranularities
|
|
@@ -9460,6 +10687,25 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9460
10687
|
}
|
|
9461
10688
|
}
|
|
9462
10689
|
}
|
|
10690
|
+
} else if (isDiarizationModel) {
|
|
10691
|
+
formData.append("response_format", "diarized_json");
|
|
10692
|
+
}
|
|
10693
|
+
if (chunkingStrategy != null) {
|
|
10694
|
+
formData.append(
|
|
10695
|
+
"chunking_strategy",
|
|
10696
|
+
typeof chunkingStrategy === "string" ? chunkingStrategy : JSON.stringify({
|
|
10697
|
+
type: chunkingStrategy.type,
|
|
10698
|
+
...chunkingStrategy.threshold != null && {
|
|
10699
|
+
threshold: chunkingStrategy.threshold
|
|
10700
|
+
},
|
|
10701
|
+
...chunkingStrategy.prefixPaddingMs != null && {
|
|
10702
|
+
prefix_padding_ms: chunkingStrategy.prefixPaddingMs
|
|
10703
|
+
},
|
|
10704
|
+
...chunkingStrategy.silenceDurationMs != null && {
|
|
10705
|
+
silence_duration_ms: chunkingStrategy.silenceDurationMs
|
|
10706
|
+
}
|
|
10707
|
+
})
|
|
10708
|
+
);
|
|
9463
10709
|
}
|
|
9464
10710
|
return {
|
|
9465
10711
|
formData,
|
|
@@ -9467,13 +10713,13 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9467
10713
|
};
|
|
9468
10714
|
}
|
|
9469
10715
|
async doGenerate(options) {
|
|
9470
|
-
var
|
|
10716
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
9471
10717
|
if (isRealtimeTranscriptionModelId(this.modelId)) {
|
|
9472
|
-
throw new
|
|
10718
|
+
throw new UnsupportedFunctionalityError8({
|
|
9473
10719
|
functionality: `non-streaming transcription with ${this.modelId}`
|
|
9474
10720
|
});
|
|
9475
10721
|
}
|
|
9476
|
-
const currentDate = (_c = (_b = (
|
|
10722
|
+
const currentDate = (_c = (_b = (_a2 = this.config._internal) == null ? void 0 : _a2.currentDate) == null ? void 0 : _b.call(_a2)) != null ? _c : /* @__PURE__ */ new Date();
|
|
9477
10723
|
const { formData, warnings } = await this.getArgs(options);
|
|
9478
10724
|
const {
|
|
9479
10725
|
value: response,
|
|
@@ -9494,37 +10740,54 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
9494
10740
|
fetch: this.config.fetch
|
|
9495
10741
|
});
|
|
9496
10742
|
const language = response.language != null && response.language in languageMap ? languageMap[response.language] : void 0;
|
|
10743
|
+
const diarizedSegments = (_f = response.segments) == null ? void 0 : _f.flatMap(
|
|
10744
|
+
(segment) => "speaker" in segment ? [
|
|
10745
|
+
{
|
|
10746
|
+
text: segment.text,
|
|
10747
|
+
startSecond: segment.start,
|
|
10748
|
+
endSecond: segment.end,
|
|
10749
|
+
speaker: segment.speaker
|
|
10750
|
+
}
|
|
10751
|
+
] : []
|
|
10752
|
+
);
|
|
9497
10753
|
return {
|
|
9498
10754
|
text: response.text,
|
|
9499
|
-
segments: (
|
|
10755
|
+
segments: (_j = (_i = (_g = response.segments) == null ? void 0 : _g.map((segment) => ({
|
|
9500
10756
|
text: segment.text,
|
|
9501
10757
|
startSecond: segment.start,
|
|
9502
10758
|
endSecond: segment.end
|
|
9503
|
-
}))) != null ?
|
|
10759
|
+
}))) != null ? _i : (_h = response.words) == null ? void 0 : _h.map((word) => ({
|
|
9504
10760
|
text: word.word,
|
|
9505
10761
|
startSecond: word.start,
|
|
9506
10762
|
endSecond: word.end
|
|
9507
|
-
}))) != null ?
|
|
10763
|
+
}))) != null ? _j : [],
|
|
9508
10764
|
language,
|
|
9509
|
-
durationInSeconds: (
|
|
10765
|
+
durationInSeconds: (_k = response.duration) != null ? _k : void 0,
|
|
9510
10766
|
warnings,
|
|
9511
10767
|
response: {
|
|
9512
10768
|
timestamp: currentDate,
|
|
9513
10769
|
modelId: this.modelId,
|
|
9514
10770
|
headers: responseHeaders,
|
|
9515
10771
|
body: rawResponse
|
|
10772
|
+
},
|
|
10773
|
+
...diarizedSegments != null && diarizedSegments.length > 0 && {
|
|
10774
|
+
providerMetadata: {
|
|
10775
|
+
openai: {
|
|
10776
|
+
segments: diarizedSegments
|
|
10777
|
+
}
|
|
10778
|
+
}
|
|
9516
10779
|
}
|
|
9517
10780
|
};
|
|
9518
10781
|
}
|
|
9519
10782
|
async doStream(options) {
|
|
9520
|
-
var
|
|
10783
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
9521
10784
|
if (!isRealtimeTranscriptionModelId(this.modelId)) {
|
|
9522
|
-
throw new
|
|
10785
|
+
throw new UnsupportedFunctionalityError8({
|
|
9523
10786
|
functionality: `streaming transcription with ${this.modelId}`
|
|
9524
10787
|
});
|
|
9525
10788
|
}
|
|
9526
|
-
const currentDate = (_c = (_b = (
|
|
9527
|
-
const openAIOptions = await
|
|
10789
|
+
const currentDate = (_c = (_b = (_a2 = this.config._internal) == null ? void 0 : _a2.currentDate) == null ? void 0 : _b.call(_a2)) != null ? _c : /* @__PURE__ */ new Date();
|
|
10790
|
+
const openAIOptions = await parseProviderOptions10({
|
|
9528
10791
|
provider: "openai",
|
|
9529
10792
|
providerOptions: options.providerOptions,
|
|
9530
10793
|
schema: openAITranscriptionModelOptions
|
|
@@ -9662,8 +10925,8 @@ function createOpenAIRealtimeTranscriptionStream({
|
|
|
9662
10925
|
void sendAudio(socket).catch(finishWithError);
|
|
9663
10926
|
},
|
|
9664
10927
|
onMessageText: async (text) => {
|
|
9665
|
-
var
|
|
9666
|
-
const parsed = await
|
|
10928
|
+
var _a2, _b, _c, _d;
|
|
10929
|
+
const parsed = await safeParseJSON2({ text });
|
|
9667
10930
|
if (!parsed.success) return;
|
|
9668
10931
|
const raw = parsed.value;
|
|
9669
10932
|
if (includeRawChunks) {
|
|
@@ -9674,7 +10937,7 @@ function createOpenAIRealtimeTranscriptionStream({
|
|
|
9674
10937
|
controller.enqueue({
|
|
9675
10938
|
type: "transcript-delta",
|
|
9676
10939
|
id: raw.item_id,
|
|
9677
|
-
delta: (
|
|
10940
|
+
delta: (_a2 = raw.delta) != null ? _a2 : ""
|
|
9678
10941
|
});
|
|
9679
10942
|
break;
|
|
9680
10943
|
}
|
|
@@ -9713,7 +10976,7 @@ function buildOpenAIRealtimeTranscriptionSession({
|
|
|
9713
10976
|
inputAudioFormat,
|
|
9714
10977
|
providerOptions
|
|
9715
10978
|
}) {
|
|
9716
|
-
var
|
|
10979
|
+
var _a2, _b;
|
|
9717
10980
|
return {
|
|
9718
10981
|
type: "session.update",
|
|
9719
10982
|
session: {
|
|
@@ -9727,7 +10990,7 @@ function buildOpenAIRealtimeTranscriptionSession({
|
|
|
9727
10990
|
transcription: {
|
|
9728
10991
|
model: modelId,
|
|
9729
10992
|
...(providerOptions == null ? void 0 : providerOptions.language) != null ? { language: providerOptions.language } : {},
|
|
9730
|
-
...((
|
|
10993
|
+
...((_a2 = providerOptions == null ? void 0 : providerOptions.streaming) == null ? void 0 : _a2.delay) != null ? { delay: providerOptions.streaming.delay } : {}
|
|
9731
10994
|
},
|
|
9732
10995
|
turn_detection: null
|
|
9733
10996
|
}
|
|
@@ -9737,14 +11000,14 @@ function buildOpenAIRealtimeTranscriptionSession({
|
|
|
9737
11000
|
};
|
|
9738
11001
|
}
|
|
9739
11002
|
function getOpenAIRealtimeConnection(headers) {
|
|
9740
|
-
var
|
|
11003
|
+
var _a2;
|
|
9741
11004
|
let authorization;
|
|
9742
11005
|
for (const [key, value] of Object.entries(headers)) {
|
|
9743
11006
|
if (key.toLowerCase() === "authorization" && value != null) {
|
|
9744
11007
|
authorization = value;
|
|
9745
11008
|
}
|
|
9746
11009
|
}
|
|
9747
|
-
const token = (
|
|
11010
|
+
const token = (_a2 = authorization == null ? void 0 : authorization.match(/^bearer\s+(.+)$/i)) == null ? void 0 : _a2[1];
|
|
9748
11011
|
if (token == null) {
|
|
9749
11012
|
return { protocols: ["realtime"], headers };
|
|
9750
11013
|
}
|
|
@@ -9760,18 +11023,18 @@ function getOpenAIRealtimeConnection(headers) {
|
|
|
9760
11023
|
|
|
9761
11024
|
// src/speech-translation/openai-speech-translation-model.ts
|
|
9762
11025
|
import {
|
|
9763
|
-
InvalidArgumentError as
|
|
11026
|
+
InvalidArgumentError as InvalidArgumentError3
|
|
9764
11027
|
} from "@ai-sdk/provider";
|
|
9765
11028
|
import {
|
|
9766
11029
|
combineHeaders as combineHeaders10,
|
|
9767
11030
|
connectToWebSocket as connectToWebSocket2,
|
|
9768
11031
|
convertToBase64 as convertToBase644,
|
|
9769
|
-
parseProviderOptions as
|
|
9770
|
-
safeParseJSON as
|
|
11032
|
+
parseProviderOptions as parseProviderOptions11,
|
|
11033
|
+
safeParseJSON as safeParseJSON3,
|
|
9771
11034
|
serializeModelOptions as serializeModelOptions8,
|
|
9772
11035
|
toWebSocketUrl as toWebSocketUrl2,
|
|
9773
|
-
WORKFLOW_DESERIALIZE as
|
|
9774
|
-
WORKFLOW_SERIALIZE as
|
|
11036
|
+
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE8,
|
|
11037
|
+
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE8,
|
|
9775
11038
|
waitForWebSocketBufferDrain as waitForWebSocketBufferDrain2
|
|
9776
11039
|
} from "@ai-sdk/provider-utils";
|
|
9777
11040
|
|
|
@@ -9792,28 +11055,28 @@ var OpenAISpeechTranslationModel = class _OpenAISpeechTranslationModel {
|
|
|
9792
11055
|
this.config = config;
|
|
9793
11056
|
this.specificationVersion = "v4";
|
|
9794
11057
|
}
|
|
9795
|
-
static [
|
|
11058
|
+
static [WORKFLOW_SERIALIZE8](model) {
|
|
9796
11059
|
return serializeModelOptions8({
|
|
9797
11060
|
modelId: model.modelId,
|
|
9798
11061
|
config: model.config
|
|
9799
11062
|
});
|
|
9800
11063
|
}
|
|
9801
|
-
static [
|
|
11064
|
+
static [WORKFLOW_DESERIALIZE8](options) {
|
|
9802
11065
|
return new _OpenAISpeechTranslationModel(options.modelId, options.config);
|
|
9803
11066
|
}
|
|
9804
11067
|
get provider() {
|
|
9805
11068
|
return this.config.provider;
|
|
9806
11069
|
}
|
|
9807
11070
|
async doStream(options) {
|
|
9808
|
-
var
|
|
11071
|
+
var _a2, _b, _c, _d, _e;
|
|
9809
11072
|
if (options.targetLanguage == null) {
|
|
9810
|
-
throw new
|
|
11073
|
+
throw new InvalidArgumentError3({
|
|
9811
11074
|
argument: "targetLanguage",
|
|
9812
11075
|
message: `targetLanguage is required for translation model '${this.modelId}'.`
|
|
9813
11076
|
});
|
|
9814
11077
|
}
|
|
9815
|
-
const currentDate = (_c = (_b = (
|
|
9816
|
-
await
|
|
11078
|
+
const currentDate = (_c = (_b = (_a2 = this.config._internal) == null ? void 0 : _a2.currentDate) == null ? void 0 : _b.call(_a2)) != null ? _c : /* @__PURE__ */ new Date();
|
|
11079
|
+
await parseProviderOptions11({
|
|
9817
11080
|
provider: "openai",
|
|
9818
11081
|
providerOptions: options.providerOptions,
|
|
9819
11082
|
schema: openAISpeechTranslationModelOptions
|
|
@@ -9958,9 +11221,9 @@ function createOpenAIRealtimeSpeechTranslationStream({
|
|
|
9958
11221
|
void sendAudio(socket).catch(finishWithError);
|
|
9959
11222
|
},
|
|
9960
11223
|
onMessageText: async (text) => {
|
|
9961
|
-
var
|
|
11224
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
9962
11225
|
if (finished) return;
|
|
9963
|
-
const parsed = await
|
|
11226
|
+
const parsed = await safeParseJSON3({ text });
|
|
9964
11227
|
if (!parsed.success) return;
|
|
9965
11228
|
const raw = parsed.value;
|
|
9966
11229
|
if (includeRawChunks) {
|
|
@@ -9977,7 +11240,7 @@ function createOpenAIRealtimeSpeechTranslationStream({
|
|
|
9977
11240
|
break;
|
|
9978
11241
|
}
|
|
9979
11242
|
case "session.output_transcript.delta": {
|
|
9980
|
-
translationText += (
|
|
11243
|
+
translationText += (_a2 = raw.delta) != null ? _a2 : "";
|
|
9981
11244
|
controller.enqueue({
|
|
9982
11245
|
type: "output-text-delta",
|
|
9983
11246
|
delta: (_b = raw.delta) != null ? _b : ""
|
|
@@ -10047,21 +11310,21 @@ function buildOpenAIRealtimeSpeechTranslationSession({
|
|
|
10047
11310
|
}
|
|
10048
11311
|
function validateOpenAISpeechTranslationInputAudioFormat(inputAudioFormat) {
|
|
10049
11312
|
if (inputAudioFormat.type !== "audio/pcm" || inputAudioFormat.rate != null && inputAudioFormat.rate !== 24e3) {
|
|
10050
|
-
throw new
|
|
11313
|
+
throw new InvalidArgumentError3({
|
|
10051
11314
|
argument: "inputAudioFormat",
|
|
10052
11315
|
message: "The OpenAI Realtime translation API only supports 24kHz 16-bit PCM input audio."
|
|
10053
11316
|
});
|
|
10054
11317
|
}
|
|
10055
11318
|
}
|
|
10056
11319
|
function getOpenAIRealtimeConnection2(headers) {
|
|
10057
|
-
var
|
|
11320
|
+
var _a2;
|
|
10058
11321
|
let authorization;
|
|
10059
11322
|
for (const [key, value] of Object.entries(headers)) {
|
|
10060
11323
|
if (key.toLowerCase() === "authorization" && value != null) {
|
|
10061
11324
|
authorization = value;
|
|
10062
11325
|
}
|
|
10063
11326
|
}
|
|
10064
|
-
const token = (
|
|
11327
|
+
const token = (_a2 = authorization == null ? void 0 : authorization.match(/^bearer\s+(.+)$/i)) == null ? void 0 : _a2[1];
|
|
10065
11328
|
if (token == null) {
|
|
10066
11329
|
return { protocols: ["realtime"], headers };
|
|
10067
11330
|
}
|
|
@@ -10160,19 +11423,19 @@ var OpenAISkills = class {
|
|
|
10160
11423
|
};
|
|
10161
11424
|
|
|
10162
11425
|
// src/version.ts
|
|
10163
|
-
var VERSION = true ? "4.0.
|
|
11426
|
+
var VERSION = true ? "4.0.66" : "0.0.0-test";
|
|
10164
11427
|
|
|
10165
11428
|
// src/openai-provider.ts
|
|
10166
11429
|
function createOpenAI(options = {}) {
|
|
10167
|
-
var
|
|
10168
|
-
const baseURL = (
|
|
11430
|
+
var _a2, _b;
|
|
11431
|
+
const baseURL = (_a2 = withoutTrailingSlash(
|
|
10169
11432
|
validateBaseURL(
|
|
10170
11433
|
loadOptionalSetting({
|
|
10171
11434
|
settingValue: options.baseURL,
|
|
10172
11435
|
environmentVariableName: "OPENAI_BASE_URL"
|
|
10173
11436
|
})
|
|
10174
11437
|
)
|
|
10175
|
-
)) != null ?
|
|
11438
|
+
)) != null ? _a2 : "https://api.openai.com/v1";
|
|
10176
11439
|
const providerName = (_b = options.name) != null ? _b : "openai";
|
|
10177
11440
|
const getHeaders = () => withUserAgentSuffix(
|
|
10178
11441
|
{
|
|
@@ -10252,8 +11515,9 @@ function createOpenAI(options = {}) {
|
|
|
10252
11515
|
return createResponsesModel(modelId);
|
|
10253
11516
|
};
|
|
10254
11517
|
const createResponsesModel = (modelId) => {
|
|
10255
|
-
return new
|
|
11518
|
+
return new OpenAIResponsesLanguageModel(modelId, {
|
|
10256
11519
|
provider: `${providerName}.responses`,
|
|
11520
|
+
baseURL,
|
|
10257
11521
|
url: ({ path }) => `${baseURL}${path}`,
|
|
10258
11522
|
headers: getHeaders,
|
|
10259
11523
|
fetch: options.fetch,
|
|
@@ -10261,6 +11525,18 @@ function createOpenAI(options = {}) {
|
|
|
10261
11525
|
fileIdPrefixes: ["file-"]
|
|
10262
11526
|
});
|
|
10263
11527
|
};
|
|
11528
|
+
const createBatch = () => new OpenAIBatch({
|
|
11529
|
+
provider: `${providerName}.batch`,
|
|
11530
|
+
config: {
|
|
11531
|
+
provider: `${providerName}.responses`,
|
|
11532
|
+
baseURL,
|
|
11533
|
+
url: ({ path }) => `${baseURL}${path}`,
|
|
11534
|
+
headers: getHeaders,
|
|
11535
|
+
fetch: options.fetch,
|
|
11536
|
+
// Soft-deprecated. TODO: remove in v8
|
|
11537
|
+
fileIdPrefixes: ["file-"]
|
|
11538
|
+
}
|
|
11539
|
+
});
|
|
10264
11540
|
const createRealtimeModel = (modelId) => new OpenAIRealtimeModel(modelId, {
|
|
10265
11541
|
provider: `${providerName}.realtime`,
|
|
10266
11542
|
baseURL,
|
|
@@ -10306,6 +11582,7 @@ function createOpenAI(options = {}) {
|
|
|
10306
11582
|
provider.speechModel = createSpeechModel;
|
|
10307
11583
|
provider.files = createFiles;
|
|
10308
11584
|
provider.skills = createSkills;
|
|
11585
|
+
provider.experimental_batch = createBatch;
|
|
10309
11586
|
provider.experimental_realtime = experimentalRealtimeFactory;
|
|
10310
11587
|
provider.tools = openaiTools;
|
|
10311
11588
|
return provider;
|