eve 0.59.0 → 0.60.0
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/CHANGELOG.md +41 -0
- package/dist/src/approval/definition.d.ts +2 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +9 -9
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +133 -7
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.d.ts +46 -5
- package/dist/src/compiled/@ai-sdk/google/index.js +9 -9
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +186 -37
- package/dist/src/compiled/@ai-sdk/openai/index.js +4 -4
- package/dist/src/compiled/@ai-sdk/otel/index.js +3 -3
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +2186 -1889
- package/dist/src/compiled/@ai-sdk/provider/index.js +3 -3
- package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +35 -1
- package/dist/src/compiled/@chat-adapter/slack/index.js +28 -28
- package/dist/src/compiled/@chat-adapter/twilio/index.js +1 -1
- package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +2 -2
- package/dist/src/compiled/@modelcontextprotocol/server/index.js +2 -2
- package/dist/src/compiled/@opentelemetry/otlp-transformer/index.js +1 -1
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +61 -60
- package/dist/src/compiled/@vercel/blob/index.js +11 -11
- package/dist/src/compiled/@vercel/oidc/index.js +2 -2
- package/dist/src/compiled/@vercel/sandbox/index.js +2 -2
- package/dist/src/compiled/@workflow/core/index.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +3 -3
- package/dist/src/compiled/@workflow/world-vercel/index.js +13 -13
- package/dist/src/compiled/_chunks/node/{dist-CyWgAg5-.js → dist-CweJdVFE.js} +1 -1
- package/dist/src/compiled/_chunks/node/{dist-PazOnsjy.js → dist-Da54NuK8.js} +27 -28
- package/dist/src/compiled/_chunks/node/undici-h5GH4RBM.js +95 -0
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DTFAjP0J.js → attribute-changes-3SKHZsSX.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/coerce-D0oqvQ_w.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-C3919PVU.js +25 -0
- package/dist/src/compiled/_chunks/workflow/dist-DearXsdS.js +2 -0
- package/dist/src/compiled/_chunks/workflow/experimental-evaluation-D8_K_Pe9.js +5 -0
- package/dist/src/compiled/_chunks/workflow/{frames-DJw9L4rO.js → frames-Bm_yZi8X.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{functions-wMCGZAVk.js → functions-C06vHfWP.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{helpers-ClCA9Lmc.js → helpers-K7otPd_U.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{logger-D6vwIEf9.js → logger-CxBCNokg.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{resume-hook-_baK8jaT.js → resume-hook-B7_MC7FC.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{run-CRdL17z4.js → run-jGFog1uQ.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{schemas-DR7NTzNe.js → schemas-4CmFgxN_.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{serialization-CWYPL4Eq.js → serialization-VRHEKI6l.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{signal-exit-Dsy-TT0V.js → signal-exit-B9U6kH7R.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/sleep-60eDbac6.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{token-D8tWQnPx.js → token-U5XEWlVM.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-util-B0OPd7oj.js → token-util-pP4KRRl0.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{wait-until-DyIt9lEx.js → wait-until-DDJySKt-.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{ws-transport-Dl5FG4Sw.js → ws-transport-CEFNBXPC.js} +1 -1
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiled/chokidar/index.js +1 -1
- package/dist/src/compiled/env-runner/node-worker.js +3 -3
- package/dist/src/compiled/gray-matter/index.js +13 -13
- package/dist/src/compiled/shadcn-registry/index.js +2625 -444
- package/dist/src/compiler/default-tool-policy.d.ts +3 -1
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +16 -8
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +8 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +1 -0
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/remote-agent-node.d.ts +1 -0
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +1 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/evals/autoevals-client.js +1 -1
- package/dist/src/evals/expect/index.js +1 -1
- package/dist/src/evals/judge.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tools.d.ts +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/instrumentation/ai-sdk-telemetry.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/model-auth/transport.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/{experimental/evaluate/auto-model.d.ts → models/auto.d.ts} +3 -3
- package/dist/src/models/auto.js +2 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +1 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +1 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +1 -1
- package/dist/src/node_modules/.pnpm/{autoevals@0.0.132_ws@8.21.3_bufferutil@4.1.0_ → autoevals@0.0.132_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0_}/node_modules/autoevals/jsdist/index.js +1 -1
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/js-yaml@4.3.2/node_modules/js-yaml/dist/js-yaml.js +34 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/auth/workload-identity-auth.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/azure.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/bedrock.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/client.js +11 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/core/streaming.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/headers.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/provider.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/uploads.js +2 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/log.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/AbstractChatCompletionRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/AssistantStream.js +1 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/lib/ChatCompletionRunner.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionStreamingRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/EventStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ResponsesParser.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/responses/ResponseAccumulator.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/responses/ResponseStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/organization.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/projects.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-limit.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/spend-alerts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/spend-limit.js +1 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/audio/speech.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/assistants.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/beta.js +1 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/chatkit/sessions.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/chatkit/threads.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/realtime/sessions.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/realtime/transcription-sessions.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/responses/input-items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/responses/input-tokens.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/responses/responses.js +1 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/threads/messages.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/threads/runs/runs.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/threads/runs/steps.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/threads/threads.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/containers/containers.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/containers/files/content.js +1 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/containers/files/files.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/files.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/realtime/calls.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/responses/responses.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/versions/content.js +1 -0
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/vector-stores/file-batches.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/vector-stores/files.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/vector-stores/vector-stores.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/videos.js +1 -1
- package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/webhooks/webhooks.js +1 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/version.js +1 -0
- package/dist/src/public/ai/index.d.ts +1 -0
- package/dist/src/public/ai/index.js +1 -0
- package/dist/src/public/definitions/connections/mcp.d.ts +1 -0
- package/dist/src/public/definitions/connections/openapi.d.ts +1 -0
- package/dist/src/public/definitions/remote-agent.d.ts +5 -0
- package/dist/src/public/definitions/workspace-agent.d.ts +5 -0
- package/dist/src/public/definitions/workspace-agent.js +1 -1
- package/dist/src/public/instrumentation/otel.d.ts +1 -1
- package/dist/src/public/instrumentation/otel.js +1 -1
- package/dist/src/public/models/index.d.ts +1 -0
- package/dist/src/public/models/index.js +1 -0
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/tools/approval/index.d.ts +2 -1
- package/dist/src/public/tools/approval/index.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +11 -2
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +1 -0
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +1 -0
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +5 -2
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +2 -0
- package/dist/src/setup/flows/model-login-connection.js +1 -1
- package/dist/src/setup/flows/model-login.js +1 -1
- package/dist/src/setup/primitives/pm/bun.d.ts +1 -1
- package/dist/src/setup/primitives/pm/bun.js +1 -1
- package/dist/src/setup/primitives/pm/npm.js +1 -1
- package/dist/src/setup/primitives/pm/pnpm.js +1 -1
- package/dist/src/setup/primitives/pm/run.d.ts +1 -1
- package/dist/src/setup/primitives/pm/run.js +1 -1
- package/dist/src/setup/primitives/pm/types.d.ts +4 -0
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/validate-gateway-key.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +9 -0
- package/dist/src/tools/approval/policies.d.ts +18 -0
- package/dist/src/tools/approval/policies.js +1 -1
- package/dist/src/tools/definition.d.ts +4 -3
- package/dist/src/tools/durable-schema.js +1 -1
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tracing/agent-channel-delivery-instrumentation.d.ts +2 -3
- package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +1 -0
- package/dist/src/tracing/content-span-processor.d.ts +1 -1
- package/dist/src/tracing/content-span-processor.js +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-traces.d.ts +3 -8
- package/dist/src/tracing/local-traces.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +7 -21
- package/dist/src/tracing/otel-declaration.js +1 -1
- package/dist/src/tracing/span-export-policy.d.ts +15 -20
- package/dist/src/tracing/span-export-policy.js +1 -1
- package/docs/agent-config.md +2 -1
- package/docs/connections/mcp.mdx +2 -2
- package/docs/connections/overview.mdx +1 -1
- package/docs/guides/evaluate.md +43 -19
- package/docs/guides/frontend/overview.mdx +44 -8
- package/docs/guides/instrumentation/otel.mdx +26 -22
- package/docs/guides/remote-agents.md +2 -1
- package/docs/reference/typescript-api.md +3 -2
- package/docs/subagents/index.mdx +25 -8
- package/docs/tools/human-in-the-loop.md +27 -5
- package/docs/tools/overview.mdx +4 -2
- package/docs/tools/workflows.mdx +2 -3
- package/package.json +11 -6
- package/dist/src/compiled/_chunks/node/undici-CI8l4LBf.js +0 -95
- package/dist/src/compiled/_chunks/workflow/coerce-ro2dOxbr.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-C5KCXSdI.js +0 -2
- package/dist/src/compiled/_chunks/workflow/dist-DsNhwdzf.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-KPieTJHT.js +0 -25
- package/dist/src/compiled/_chunks/workflow/sleep-BL0kgJnT.js +0 -1
- package/dist/src/experimental/evaluate/auto-model.js +0 -2
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js +0 -1
- package/dist/src/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.js +0 -32
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/auth/workload-identity-auth.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/azure.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/client.js +0 -11
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/uploads.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/index.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/headers.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/uploads.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/AbstractChatCompletionRunner.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/AssistantStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionStreamingRunner.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/EventStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ResponsesParser.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/responses/ResponseStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/organization.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/projects.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/spend-alerts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/beta.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/containers/files/content.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/content.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/versions/content.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/version.js +0 -1
- package/dist/src/public/experimental/evaluate/index.d.ts +0 -2
- package/dist/src/public/experimental/evaluate/index.js +0 -1
- /package/dist/src/{experimental/evaluate → ai}/evaluate.d.ts +0 -0
- /package/dist/src/{experimental/evaluate → ai}/evaluate.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/_vendor/partial-json-parser/parser.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/core/api-promise.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/core/error.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/core/pagination.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/core/resource.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/error.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/decoders/line.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/detect-platform.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/errors.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/parse.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/qs/formats.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/qs/stringify.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/qs/utils.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/request-options.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/shims.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/to-file.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/tslib.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/base64.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/bytes.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/env.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/path.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/query.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/sleep.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/uuid.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils/values.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/internal/utils.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/lib/RunnableFunction.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/lib/Util.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/lib/chatCompletionUtils.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/lib/parser.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/admin.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/admin-api-keys.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/audit-logs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/certificates.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/data-retention.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/groups.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/users.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/invites.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/api-keys.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/certificates.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/data-retention.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/groups/groups.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/groups/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/model-permissions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/rate-limits.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/users/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/users/users.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/usage.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/users/roles.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/admin/organization/users/users.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/audio/audio.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/audio/transcriptions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/audio/translations.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/batches.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/chatkit/chatkit.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/beta/realtime/realtime.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/chat/chat.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/chat/completions/completions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/chat/completions/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/chat/completions/messages.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/chat/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/completions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/conversations/conversations.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/conversations/items.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/embeddings.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/evals/evals.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/evals/runs/output-items.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/evals/runs/runs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/alpha/alpha.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/alpha/graders.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/fine-tuning.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/jobs/jobs.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/fine-tuning/methods.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/graders/grader-models.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/graders/graders.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/images.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/models.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/moderations.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/realtime/client-secrets.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/realtime/realtime.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/responses/input-items.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/responses/input-tokens.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/shared.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/skills/skills.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/skills/versions/versions.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/uploads/parts.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/uploads/uploads.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/webhooks/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/resources/webhooks.js +0 -0
- /package/dist/src/node_modules/.pnpm/{openai@6.39.1_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76 → openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76}/node_modules/openai/streaming.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{OpenAIError}from"../../core/error.js";import"../../error.js";import{addOutputText}from"../ResponsesParser.js";function accumulateResponse(e,t){if(!t){if(e.type!==`response.created`)throw new OpenAIError(`When snapshot hasn't been set yet, expected 'response.created' event, got ${e.type}`);return cloneResponse(e.response)}switch(e.type){case`response.output_item.added`:t.output.push(structuredClone(e.item)),e.item.type===`message`&&addOutputText(t);break;case`response.output_item.done`:getOutput(t,e.output_index),t.output[e.output_index]=structuredClone(e.item),e.item.type===`message`&&addOutputText(t);break;case`response.content_part.added`:{let n=getOutput(t,e.output_index),r=n.type,i=e.part;r===`message`&&i.type!==`reasoning_text`?(n.content.push(structuredClone(i)),i.type===`output_text`&&addOutputText(t)):r===`reasoning`&&i.type===`reasoning_text`&&(n.content||=[],n.content.push(structuredClone(i)));break}case`response.content_part.done`:{let n=getOutput(t,e.output_index),r=e.part;if(n.type===`message`&&r.type!==`reasoning_text`)getContent(n.content,e.content_index),n.content[e.content_index]=structuredClone(r),r.type===`output_text`&&addOutputText(t);else if(n.type===`reasoning`&&r.type===`reasoning_text`){let t=n.content;if(!t)throw new OpenAIError(`missing content at index ${e.content_index}`);getContent(t,e.content_index),t[e.content_index]=structuredClone(r)}break}case`response.output_text.delta`:{let n=getOutput(t,e.output_index);if(n.type===`message`){let r=getContent(n.content,e.content_index);if(r.type!==`output_text`)throw new OpenAIError(`expected content to be 'output_text', got ${r.type}`);r.text+=e.delta,t.output_text+=e.delta}break}case`response.output_text.done`:{let n=getOutput(t,e.output_index);if(n.type===`message`){let r=getContent(n.content,e.content_index);if(r.type!==`output_text`)throw new OpenAIError(`expected content to be 'output_text', got ${r.type}`);r.text=e.text,addOutputText(t)}break}case`response.output_text.annotation.added`:{let n=getOutput(t,e.output_index);if(n.type===`message`){let t=getContent(n.content,e.content_index);if(t.type!==`output_text`)throw new OpenAIError(`expected content to be 'output_text', got ${t.type}`);t.annotations[e.annotation_index]=structuredClone(e.annotation)}break}case`response.refusal.delta`:{let n=getOutput(t,e.output_index);if(n.type===`message`){let t=getContent(n.content,e.content_index);if(t.type!==`refusal`)throw new OpenAIError(`expected content to be 'refusal', got ${t.type}`);t.refusal+=e.delta}break}case`response.refusal.done`:{let n=getOutput(t,e.output_index);if(n.type===`message`){let t=getContent(n.content,e.content_index);if(t.type!==`refusal`)throw new OpenAIError(`expected content to be 'refusal', got ${t.type}`);t.refusal=e.refusal}break}case`response.function_call_arguments.delta`:{let n=getOutput(t,e.output_index);n.type===`function_call`&&(n.arguments+=e.delta);break}case`response.function_call_arguments.done`:{let n=getOutput(t,e.output_index);n.type===`function_call`&&(n.arguments=e.arguments);break}case`response.reasoning_text.delta`:{let n=getOutput(t,e.output_index);if(n.type===`reasoning`){if(!n.content)throw new OpenAIError(`missing content at index ${e.content_index}`);let t=getContent(n.content,e.content_index);if(t.type!==`reasoning_text`)throw new OpenAIError(`expected content to be 'reasoning_text', got ${t.type}`);t.text+=e.delta}break}case`response.reasoning_text.done`:{let n=getOutput(t,e.output_index);if(n.type===`reasoning`){if(!n.content)throw new OpenAIError(`missing content at index ${e.content_index}`);let t=getContent(n.content,e.content_index);if(t.type!==`reasoning_text`)throw new OpenAIError(`expected content to be 'reasoning_text', got ${t.type}`);t.text=e.text}break}case`response.reasoning_summary_part.added`:{let n=getOutput(t,e.output_index);n.type===`reasoning`&&n.summary.push(structuredClone(e.part));break}case`response.reasoning_summary_part.done`:{let n=getOutput(t,e.output_index);n.type===`reasoning`&&(getContent(n.summary,e.summary_index),n.summary[e.summary_index]=structuredClone(e.part));break}case`response.reasoning_summary_text.delta`:{let n=getOutput(t,e.output_index);if(n.type===`reasoning`){let t=getContent(n.summary,e.summary_index);t.text+=e.delta}break}case`response.reasoning_summary_text.done`:{let n=getOutput(t,e.output_index);if(n.type===`reasoning`){let t=getContent(n.summary,e.summary_index);t.text=e.text}break}case`response.custom_tool_call_input.delta`:{let n=getOutput(t,e.output_index);n.type===`custom_tool_call`&&(n.input+=e.delta);break}case`response.custom_tool_call_input.done`:{let n=getOutput(t,e.output_index);n.type===`custom_tool_call`&&(n.input=e.input);break}case`response.mcp_call_arguments.delta`:{let n=getOutput(t,e.output_index);n.type===`mcp_call`&&(n.arguments+=e.delta);break}case`response.mcp_call_arguments.done`:{let n=getOutput(t,e.output_index);n.type===`mcp_call`&&(n.arguments=e.arguments);break}case`response.code_interpreter_call_code.delta`:{let n=getOutput(t,e.output_index);n.type===`code_interpreter_call`&&(n.code=(n.code??``)+e.delta);break}case`response.code_interpreter_call_code.done`:{let n=getOutput(t,e.output_index);n.type===`code_interpreter_call`&&(n.code=e.code);break}case`response.code_interpreter_call.in_progress`:{let n=getOutput(t,e.output_index);n.type===`code_interpreter_call`&&(n.status=`in_progress`);break}case`response.code_interpreter_call.interpreting`:{let n=getOutput(t,e.output_index);n.type===`code_interpreter_call`&&(n.status=`interpreting`);break}case`response.code_interpreter_call.completed`:{let n=getOutput(t,e.output_index);n.type===`code_interpreter_call`&&(n.status=`completed`);break}case`response.file_search_call.in_progress`:{let n=getOutput(t,e.output_index);n.type===`file_search_call`&&(n.status=`in_progress`);break}case`response.file_search_call.searching`:{let n=getOutput(t,e.output_index);n.type===`file_search_call`&&(n.status=`searching`);break}case`response.file_search_call.completed`:{let n=getOutput(t,e.output_index);n.type===`file_search_call`&&(n.status=`completed`);break}case`response.web_search_call.in_progress`:{let n=getOutput(t,e.output_index);n.type===`web_search_call`&&(n.status=`in_progress`);break}case`response.web_search_call.searching`:{let n=getOutput(t,e.output_index);n.type===`web_search_call`&&(n.status=`searching`);break}case`response.web_search_call.completed`:{let n=getOutput(t,e.output_index);n.type===`web_search_call`&&(n.status=`completed`);break}case`response.image_generation_call.in_progress`:{let n=getOutput(t,e.output_index);n.type===`image_generation_call`&&(n.status=`in_progress`);break}case`response.image_generation_call.generating`:{let n=getOutput(t,e.output_index);n.type===`image_generation_call`&&(n.status=`generating`);break}case`response.image_generation_call.completed`:{let n=getOutput(t,e.output_index);n.type===`image_generation_call`&&(n.status=`completed`);break}case`response.mcp_call.in_progress`:{let n=getOutput(t,e.output_index);n.type===`mcp_call`&&(n.status=`in_progress`);break}case`response.mcp_call.completed`:{let n=getOutput(t,e.output_index);n.type===`mcp_call`&&(n.status=`completed`);break}case`response.mcp_call.failed`:{let n=getOutput(t,e.output_index);n.type===`mcp_call`&&(n.status=`failed`);break}case`response.created`:case`response.queued`:case`response.in_progress`:case`response.completed`:case`response.failed`:case`response.incomplete`:t=cloneResponse(e.response);break;case`response.audio.delta`:case`response.audio.done`:case`response.audio.transcript.delta`:case`response.audio.transcript.done`:case`response.image_generation_call.partial_image`:case`response.mcp_list_tools.in_progress`:case`response.mcp_list_tools.completed`:case`response.mcp_list_tools.failed`:case`keepalive`:case`error`:break;default:assertNever(e)}return t}function cloneResponse(e){let t=structuredClone(e);return(!Object.getOwnPropertyDescriptor(t,`output_text`)||t.output_text==null)&&addOutputText(t),t}function getOutput(e,t){let n=e.output[t];if(!n)throw new OpenAIError(`missing output at index ${t}`);return n}function getContent(e,t){let n=e[t];if(!n)throw new OpenAIError(`missing content at index ${t}`);return n}function assertNever(e){throw new OpenAIError(`Unhandled response stream event: ${JSON.stringify(e)}`)}export{accumulateResponse};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__classPrivateFieldGet,__classPrivateFieldSet}from"../../internal/tslib.js";import{APIUserAbortError,OpenAIError}from"../../core/error.js";import{Stream}from"../../core/streaming.js";import"../../error.js";import{EventStream}from"../EventStream.js";import"../../streaming.js";import{maybeParseResponse}from"../ResponsesParser.js";import{accumulateResponse}from"./ResponseAccumulator.js";var _ResponseStream_instances,_ResponseStream_params,_ResponseStream_currentResponseSnapshot,_ResponseStream_finalResponse,_ResponseStream_beginRequest,_ResponseStream_addEvent,_ResponseStream_endRequest,ResponseStream=class ResponseStream extends EventStream{constructor(e){super(),_ResponseStream_instances.add(this),_ResponseStream_params.set(this,void 0),_ResponseStream_currentResponseSnapshot.set(this,void 0),_ResponseStream_finalResponse.set(this,void 0),__classPrivateFieldSet(this,_ResponseStream_params,e,`f`)}static createResponse(e,t,n){let r=new ResponseStream(t);return r._run(()=>r._createOrRetrieveResponse(e,t,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":`stream`}})),r}static fromReadableStream(e){let t=new ResponseStream(null);return t._run(()=>t._fromReadableStream(e)),t}async _createOrRetrieveResponse(e,t,n){this._listenForAbort(n?.signal),__classPrivateFieldGet(this,_ResponseStream_instances,`m`,_ResponseStream_beginRequest).call(this);let r,i=null;`response_id`in t?(r=await e.responses.retrieve(t.response_id,{stream:!0},{...n,signal:this.controller.signal,stream:!0}),i=t.starting_after??null):r=await e.responses.create({...t,stream:!0},{...n,signal:this.controller.signal}),this._connected();for await(let e of r)__classPrivateFieldGet(this,_ResponseStream_instances,`m`,_ResponseStream_addEvent).call(this,e,i);if(r.controller.signal?.aborted)throw new APIUserAbortError;return __classPrivateFieldGet(this,_ResponseStream_instances,`m`,_ResponseStream_endRequest).call(this)}async _fromReadableStream(e,t){this._listenForAbort(t?.signal),__classPrivateFieldGet(this,_ResponseStream_instances,`m`,_ResponseStream_beginRequest).call(this),this._connected();let n=Stream.fromReadableStream(e,this.controller);for await(let e of n)__classPrivateFieldGet(this,_ResponseStream_instances,`m`,_ResponseStream_addEvent).call(this,e,null);if(n.controller.signal?.aborted)throw new APIUserAbortError;return __classPrivateFieldGet(this,_ResponseStream_instances,`m`,_ResponseStream_endRequest).call(this)}[(_ResponseStream_params=new WeakMap,_ResponseStream_currentResponseSnapshot=new WeakMap,_ResponseStream_finalResponse=new WeakMap,_ResponseStream_instances=new WeakSet,_ResponseStream_beginRequest=function(){this.ended||__classPrivateFieldSet(this,_ResponseStream_currentResponseSnapshot,void 0,`f`)},_ResponseStream_addEvent=function(e,t){if(this.ended)return;let maybeEmit=(e,n)=>{(t==null||n.sequence_number>t)&&this._emit(e,n)},n=accumulateResponse(e,__classPrivateFieldGet(this,_ResponseStream_currentResponseSnapshot,`f`));switch(__classPrivateFieldSet(this,_ResponseStream_currentResponseSnapshot,n,`f`),maybeEmit(`event`,e),e.type){case`response.output_text.delta`:{let t=n.output[e.output_index];if(!t)throw new OpenAIError(`missing output at index ${e.output_index}`);if(t.type===`message`){let n=t.content[e.content_index];if(!n)throw new OpenAIError(`missing content at index ${e.content_index}`);if(n.type!==`output_text`)throw new OpenAIError(`expected content to be 'output_text', got ${n.type}`);maybeEmit(`response.output_text.delta`,{...e,snapshot:n.text})}break}case`response.function_call_arguments.delta`:{let t=n.output[e.output_index];if(!t)throw new OpenAIError(`missing output at index ${e.output_index}`);t.type===`function_call`&&maybeEmit(`response.function_call_arguments.delta`,{...e,snapshot:t.arguments});break}default:maybeEmit(e.type,e)}},_ResponseStream_endRequest=function(){if(this.ended)throw new OpenAIError(`stream has ended, this shouldn't happen`);let e=__classPrivateFieldGet(this,_ResponseStream_currentResponseSnapshot,`f`);if(!e)throw new OpenAIError(`request ended without sending any events`);__classPrivateFieldSet(this,_ResponseStream_currentResponseSnapshot,void 0,`f`);let t=finalizeResponse(e,__classPrivateFieldGet(this,_ResponseStream_params,`f`));return __classPrivateFieldSet(this,_ResponseStream_finalResponse,t,`f`),t},Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on(`event`,n=>{let r=t.shift();r?r.resolve(n):e.push(n)}),this.on(`end`,()=>{n=!0;for(let e of t)e.resolve(void 0);t.length=0}),this.on(`abort`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),this.on(`error`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((e,n)=>t.push({resolve:e,reject:n})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}async finalResponse(){await this.done();let e=__classPrivateFieldGet(this,_ResponseStream_finalResponse,`f`);if(!e)throw new OpenAIError(`stream ended without producing a ChatCompletion`);return e}};function finalizeResponse(e,t){return maybeParseResponse(e,t)}export{ResponseStream};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{APIResource}from"../../../core/resource.js";import{AdminAPIKeys}from"./admin-api-keys.js";import{AuditLogs}from"./audit-logs.js";import{Certificates}from"./certificates.js";import{DataRetention}from"./data-retention.js";import{Invites}from"./invites.js";import{Roles}from"./roles.js";import{SpendAlerts}from"./spend-alerts.js";import{SpendLimit}from"./spend-limit.js";import{Usage}from"./usage.js";import{Groups}from"./groups/groups.js";import{Projects}from"./projects/projects.js";import{Users}from"./users/users.js";var Organization=class extends APIResource{constructor(){super(...arguments),this.auditLogs=new AuditLogs(this._client),this.adminAPIKeys=new AdminAPIKeys(this._client),this.usage=new Usage(this._client),this.invites=new Invites(this._client),this.users=new Users(this._client),this.groups=new Groups(this._client),this.roles=new Roles(this._client),this.dataRetention=new DataRetention(this._client),this.spendLimit=new SpendLimit(this._client),this.spendAlerts=new SpendAlerts(this._client),this.certificates=new Certificates(this._client),this.projects=new Projects(this._client)}};Organization.AuditLogs=AuditLogs,Organization.AdminAPIKeys=AdminAPIKeys,Organization.Usage=Usage,Organization.Invites=Invites,Organization.Users=Users,Organization.Groups=Groups,Organization.Roles=Roles,Organization.DataRetention=DataRetention,Organization.SpendLimit=SpendLimit,Organization.SpendAlerts=SpendAlerts,Organization.Certificates=Certificates,Organization.Projects=Projects;export{Organization};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ConversationCursorPage}from"../../../../core/pagination.js";import{APIResource}from"../../../../core/resource.js";import{path}from"../../../../internal/utils/path.js";import{APIKeys}from"./api-keys.js";import{Certificates}from"./certificates.js";import{DataRetention}from"./data-retention.js";import{HostedToolPermissions}from"./hosted-tool-permissions.js";import{ModelPermissions}from"./model-permissions.js";import{RateLimits}from"./rate-limits.js";import{Roles}from"./roles.js";import{SpendAlerts}from"./spend-alerts.js";import{SpendLimit}from"./spend-limit.js";import{Groups}from"./groups/groups.js";import{ServiceAccounts}from"./service-accounts/service-accounts.js";import{Users}from"./users/users.js";var Projects=class extends APIResource{constructor(){super(...arguments),this.users=new Users(this._client),this.serviceAccounts=new ServiceAccounts(this._client),this.apiKeys=new APIKeys(this._client),this.rateLimits=new RateLimits(this._client),this.modelPermissions=new ModelPermissions(this._client),this.hostedToolPermissions=new HostedToolPermissions(this._client),this.groups=new Groups(this._client),this.roles=new Roles(this._client),this.dataRetention=new DataRetention(this._client),this.spendLimit=new SpendLimit(this._client),this.spendAlerts=new SpendAlerts(this._client),this.certificates=new Certificates(this._client)}create(e,t){return this._client.post(`/organization/projects`,{body:e,...t,__security:{adminAPIKeyAuth:!0}})}retrieve(e,t){return this._client.get(path`/organization/projects/${e}`,{...t,__security:{adminAPIKeyAuth:!0}})}update(e,t,n){return this._client.post(path`/organization/projects/${e}`,{body:t,...n,__security:{adminAPIKeyAuth:!0}})}list(e={},t){return this._client.getAPIList(`/organization/projects`,ConversationCursorPage,{query:e,...t,__security:{adminAPIKeyAuth:!0}})}archive(e,t){return this._client.post(path`/organization/projects/${e}/archive`,{...t,__security:{adminAPIKeyAuth:!0}})}};Projects.Users=Users,Projects.ServiceAccounts=ServiceAccounts,Projects.APIKeys=APIKeys,Projects.RateLimits=RateLimits,Projects.ModelPermissions=ModelPermissions,Projects.HostedToolPermissions=HostedToolPermissions,Projects.Groups=Groups,Projects.Roles=Roles,Projects.DataRetention=DataRetention,Projects.SpendLimit=SpendLimit,Projects.SpendAlerts=SpendAlerts,Projects.Certificates=Certificates;export{Projects};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{APIResource}from"../../../../../core/resource.js";import{path}from"../../../../../internal/utils/path.js";var APIKeys=class extends APIResource{create(e,t,n){let{project_id:r,...i}=t;return this._client.post(path`/organization/projects/${r}/service_accounts/${e}/api_keys`,{body:i,...n,__security:{adminAPIKeyAuth:!0}})}};export{APIKeys};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ConversationCursorPage}from"../../../../../core/pagination.js";import{APIResource}from"../../../../../core/resource.js";import{path}from"../../../../../internal/utils/path.js";import{APIKeys}from"./api-keys.js";var ServiceAccounts=class extends APIResource{constructor(){super(...arguments),this.apiKeys=new APIKeys(this._client)}create(e,t,n){return this._client.post(path`/organization/projects/${e}/service_accounts`,{body:t,...n,__security:{adminAPIKeyAuth:!0}})}retrieve(e,t,n){let{project_id:r}=t;return this._client.get(path`/organization/projects/${r}/service_accounts/${e}`,{...n,__security:{adminAPIKeyAuth:!0}})}update(e,t,n){let{project_id:r,...i}=t;return this._client.post(path`/organization/projects/${r}/service_accounts/${e}`,{body:i,...n,__security:{adminAPIKeyAuth:!0}})}list(e,t={},n){return this._client.getAPIList(path`/organization/projects/${e}/service_accounts`,ConversationCursorPage,{query:t,...n,__security:{adminAPIKeyAuth:!0}})}delete(e,t,n){let{project_id:r}=t;return this._client.delete(path`/organization/projects/${r}/service_accounts/${e}`,{...n,__security:{adminAPIKeyAuth:!0}})}};ServiceAccounts.APIKeys=APIKeys;export{ServiceAccounts};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ConversationCursorPage}from"../../../../core/pagination.js";import{APIResource}from"../../../../core/resource.js";import{path}from"../../../../internal/utils/path.js";var SpendAlerts=class extends APIResource{create(e,t,n){return this._client.post(path`/organization/projects/${e}/spend_alerts`,{body:t,...n,__security:{adminAPIKeyAuth:!0}})}retrieve(e,t,n){let{project_id:r}=t;return this._client.get(path`/organization/projects/${r}/spend_alerts/${e}`,{...n,__security:{adminAPIKeyAuth:!0}})}update(e,t,n){let{project_id:r,...i}=t;return this._client.post(path`/organization/projects/${r}/spend_alerts/${e}`,{body:i,...n,__security:{adminAPIKeyAuth:!0}})}list(e,t={},n){return this._client.getAPIList(path`/organization/projects/${e}/spend_alerts`,ConversationCursorPage,{query:t,...n,__security:{adminAPIKeyAuth:!0}})}delete(e,t,n){let{project_id:r}=t;return this._client.delete(path`/organization/projects/${r}/spend_alerts/${e}`,{...n,__security:{adminAPIKeyAuth:!0}})}};export{SpendAlerts};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{APIResource}from"../../../../core/resource.js";import{path}from"../../../../internal/utils/path.js";var SpendLimit=class extends APIResource{retrieve(e,t){return this._client.get(path`/organization/projects/${e}/spend_limit`,{...t,__security:{adminAPIKeyAuth:!0}})}update(e,t,n){return this._client.post(path`/organization/projects/${e}/spend_limit`,{body:t,...n,__security:{adminAPIKeyAuth:!0}})}delete(e,t){return this._client.delete(path`/organization/projects/${e}/spend_limit`,{...t,__security:{adminAPIKeyAuth:!0}})}};export{SpendLimit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ConversationCursorPage}from"../../../core/pagination.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var SpendAlerts=class extends APIResource{create(e,t){return this._client.post(`/organization/spend_alerts`,{body:e,...t,__security:{adminAPIKeyAuth:!0}})}retrieve(e,t){return this._client.get(path`/organization/spend_alerts/${e}`,{...t,__security:{adminAPIKeyAuth:!0}})}update(e,t,n){return this._client.post(path`/organization/spend_alerts/${e}`,{body:t,...n,__security:{adminAPIKeyAuth:!0}})}list(e={},t){return this._client.getAPIList(`/organization/spend_alerts`,ConversationCursorPage,{query:e,...t,__security:{adminAPIKeyAuth:!0}})}delete(e,t){return this._client.delete(path`/organization/spend_alerts/${e}`,{...t,__security:{adminAPIKeyAuth:!0}})}};export{SpendAlerts};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{APIResource}from"../../../core/resource.js";var SpendLimit=class extends APIResource{retrieve(e){return this._client.get(`/organization/spend_limit`,{...e,__security:{adminAPIKeyAuth:!0}})}update(e,t){return this._client.post(`/organization/spend_limit`,{body:e,...t,__security:{adminAPIKeyAuth:!0}})}delete(e){return this._client.delete(`/organization/spend_limit`,{...e,__security:{adminAPIKeyAuth:!0}})}};export{SpendLimit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";var Speech=class extends APIResource{create(e,t){return this._client.post(`/audio/speech`,{body:e,...t,headers:buildHeaders([{Accept:`application/octet-stream`},t?.headers]),__security:{bearerAuth:!0},__binaryResponse:!0})}};export{Speech};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CursorPage}from"../../core/pagination.js";import{
|
|
1
|
+
import{CursorPage}from"../../core/pagination.js";import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";var Assistants=class extends APIResource{create(e,t){return this._client.post(`/assistants`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}retrieve(e,t){return this._client.get(path`/assistants/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}update(e,t,n){return this._client.post(path`/assistants/${e}`,{body:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}list(e={},t){return this._client.getAPIList(`/assistants`,CursorPage,{query:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/assistants/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}};export{Assistants};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{APIResource}from"../../core/resource.js";import{Assistants}from"./assistants.js";import{Realtime}from"./realtime/realtime.js";import{ChatKit}from"./chatkit/chatkit.js";import{Responses}from"./responses/responses.js";import{Threads}from"./threads/threads.js";var Beta=class extends APIResource{constructor(){super(...arguments),this.realtime=new Realtime(this._client),this.responses=new Responses(this._client),this.chatkit=new ChatKit(this._client),this.assistants=new Assistants(this._client),this.threads=new Threads(this._client)}};Beta.Realtime=Realtime,Beta.Responses=Responses,Beta.ChatKit=ChatKit,Beta.Assistants=Assistants,Beta.Threads=Threads;export{Beta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var Sessions=class extends APIResource{create(e,t){return this._client.post(`/chatkit/sessions`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers]),__security:{bearerAuth:!0}})}cancel(e,t){return this._client.post(path`/chatkit/sessions/${e}/cancel`,{...t,headers:buildHeaders([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers]),__security:{bearerAuth:!0}})}};export{Sessions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConversationCursorPage}from"../../../core/pagination.js";import{
|
|
1
|
+
import{ConversationCursorPage}from"../../../core/pagination.js";import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var Threads=class extends APIResource{retrieve(e,t){return this._client.get(path`/chatkit/threads/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers]),__security:{bearerAuth:!0}})}list(e={},t){return this._client.getAPIList(`/chatkit/threads`,ConversationCursorPage,{query:e,...t,headers:buildHeaders([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers]),__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/chatkit/threads/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers]),__security:{bearerAuth:!0}})}listItems(e,t={},n){return this._client.getAPIList(path`/chatkit/threads/${e}/items`,ConversationCursorPage,{query:t,...n,headers:buildHeaders([{"OpenAI-Beta":`chatkit_beta=v1`},n?.headers]),__security:{bearerAuth:!0}})}};export{Threads};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";var Sessions=class extends APIResource{create(e,t){return this._client.post(`/realtime/sessions`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}};export{Sessions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";var TranscriptionSessions=class extends APIResource{create(e,t){return this._client.post(`/realtime/transcription_sessions`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}};export{TranscriptionSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CursorPage}from"../../../core/pagination.js";import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var InputItems=class extends APIResource{list(e,t={},n){let{betas:r,...i}=t??{};return this._client.getAPIList(path`/responses/${e}/input_items?beta=true`,CursorPage,{query:i,...n,headers:buildHeaders([{...r?.toString()==null?void 0:{"openai-beta":r?.toString()}},n?.headers]),__security:{bearerAuth:!0}})}};export{InputItems};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";var InputTokens=class extends APIResource{count(e={},t){let{betas:n,...r}=e??{};return this._client.post(`/responses/input_tokens?beta=true`,{body:r,...t,headers:buildHeaders([{...n?.toString()==null?void 0:{"openai-beta":n?.toString()}},t?.headers]),__security:{bearerAuth:!0}})}};export{InputTokens};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";import{InputItems}from"./input-items.js";import{InputTokens}from"./input-tokens.js";var Responses=class extends APIResource{constructor(){super(...arguments),this.inputItems=new InputItems(this._client),this.inputTokens=new InputTokens(this._client)}create(e,t){let{betas:n,...r}=e;return this._client.post(`/responses?beta=true`,{body:r,...t,headers:buildHeaders([{...n?.toString()==null?void 0:{"openai-beta":n?.toString()}},t?.headers]),stream:e.stream??!1,__security:{bearerAuth:!0}})}retrieve(e,t={},n){let{betas:r,...i}=t??{};return this._client.get(path`/responses/${e}?beta=true`,{query:i,...n,headers:buildHeaders([{...r?.toString()==null?void 0:{"openai-beta":r?.toString()}},n?.headers]),stream:t?.stream??!1,__security:{bearerAuth:!0}})}delete(e,t={},n){let{betas:r}=t??{};return this._client.delete(path`/responses/${e}?beta=true`,{...n,headers:buildHeaders([{Accept:`*/*`,...r?.toString()==null?void 0:{"openai-beta":r?.toString()}},n?.headers]),__security:{bearerAuth:!0}})}cancel(e,t={},n){let{betas:r}=t??{};return this._client.post(path`/responses/${e}/cancel?beta=true`,{...n,headers:buildHeaders([{...r?.toString()==null?void 0:{"openai-beta":r?.toString()}},n?.headers]),__security:{bearerAuth:!0}})}compact(e,t){let{betas:n,...r}=e;return this._client.post(`/responses/compact?beta=true`,{body:r,...t,headers:buildHeaders([{...n?.toString()==null?void 0:{"openai-beta":n?.toString()}},t?.headers]),__security:{bearerAuth:!0}})}};Responses.InputItems=InputItems,Responses.InputTokens=InputTokens;export{Responses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CursorPage}from"../../../core/pagination.js";import{
|
|
1
|
+
import{CursorPage}from"../../../core/pagination.js";import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var Messages=class extends APIResource{create(e,t,n){return this._client.post(path`/threads/${e}/messages`,{body:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}retrieve(e,t,n){let{thread_id:r}=t;return this._client.get(path`/threads/${r}/messages/${e}`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}update(e,t,n){let{thread_id:r,...i}=t;return this._client.post(path`/threads/${r}/messages/${e}`,{body:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}list(e,t={},n){return this._client.getAPIList(path`/threads/${e}/messages`,CursorPage,{query:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}delete(e,t,n){let{thread_id:r}=t;return this._client.delete(path`/threads/${r}/messages/${e}`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}};export{Messages};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"../../../../internal/utils/sleep.js";import{CursorPage}from"../../../../core/pagination.js";import{
|
|
1
|
+
import{sleep}from"../../../../internal/utils/sleep.js";import{CursorPage}from"../../../../core/pagination.js";import{buildHeaders}from"../../../../internal/headers.js";import{APIResource}from"../../../../core/resource.js";import{path}from"../../../../internal/utils/path.js";import{Steps}from"./steps.js";import{AssistantStream}from"../../../../lib/AssistantStream.js";var Runs=class extends APIResource{constructor(){super(...arguments),this.steps=new Steps(this._client)}create(e,t,n){let{include:r,...i}=t;return this._client.post(path`/threads/${e}/runs`,{query:{include:r},body:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),stream:t.stream??!1,__synthesizeEventData:!0,__security:{bearerAuth:!0}})}retrieve(e,t,n){let{thread_id:r}=t;return this._client.get(path`/threads/${r}/runs/${e}`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}update(e,t,n){let{thread_id:r,...i}=t;return this._client.post(path`/threads/${r}/runs/${e}`,{body:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}list(e,t={},n){return this._client.getAPIList(path`/threads/${e}/runs`,CursorPage,{query:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}cancel(e,t,n){let{thread_id:r}=t;return this._client.post(path`/threads/${r}/runs/${e}/cancel`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}async createAndPoll(e,t,n){let r=await this.create(e,t,n);return await this.poll(r.id,{thread_id:e},n)}createAndStream(e,t,n){return AssistantStream.createAssistantStream(e,this._client.beta.threads.runs,t,n)}async poll(e,t,n){let r=buildHeaders([n?.headers,{"X-Stainless-Poll-Helper":`true`,"X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:i,response:a}=await this.retrieve(e,t,{...n,headers:{...n?.headers,...r}}).withResponse();switch(i.status){case`queued`:case`in_progress`:case`cancelling`:let e=5e3;if(n?.pollIntervalMs)e=n.pollIntervalMs;else{let t=a.headers.get(`openai-poll-after-ms`);if(t){let n=parseInt(t);isNaN(n)||(e=n)}}await sleep(e);break;case`requires_action`:case`incomplete`:case`cancelled`:case`completed`:case`failed`:case`expired`:return i}}}stream(e,t,n){return AssistantStream.createAssistantStream(e,this._client.beta.threads.runs,t,n)}submitToolOutputs(e,t,n){let{thread_id:r,...i}=t;return this._client.post(path`/threads/${r}/runs/${e}/submit_tool_outputs`,{body:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),stream:t.stream??!1,__synthesizeEventData:!0,__security:{bearerAuth:!0}})}async submitToolOutputsAndPoll(e,t,n){let r=await this.submitToolOutputs(e,t,n);return await this.poll(r.id,t,n)}submitToolOutputsStream(e,t,n){return AssistantStream.createToolAssistantStream(e,this._client.beta.threads.runs,t,n)}};Runs.Steps=Steps;export{Runs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CursorPage}from"../../../../core/pagination.js";import{
|
|
1
|
+
import{CursorPage}from"../../../../core/pagination.js";import{buildHeaders}from"../../../../internal/headers.js";import{APIResource}from"../../../../core/resource.js";import{path}from"../../../../internal/utils/path.js";var Steps=class extends APIResource{retrieve(e,t,n){let{thread_id:r,run_id:i,...a}=t;return this._client.get(path`/threads/${r}/runs/${i}/steps/${e}`,{query:a,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}list(e,t,n){let{thread_id:r,...i}=t;return this._client.getAPIList(path`/threads/${r}/runs/${e}/steps`,CursorPage,{query:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}};export{Steps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";import{Messages}from"./messages.js";import{AssistantStream}from"../../../lib/AssistantStream.js";import{Runs}from"./runs/runs.js";var Threads=class extends APIResource{constructor(){super(...arguments),this.runs=new Runs(this._client),this.messages=new Messages(this._client)}create(e={},t){return this._client.post(`/threads`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}retrieve(e,t){return this._client.get(path`/threads/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}update(e,t,n){return this._client.post(path`/threads/${e}`,{body:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/threads/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}createAndRun(e,t){return this._client.post(`/threads/runs`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),stream:e.stream??!1,__synthesizeEventData:!0,__security:{bearerAuth:!0}})}async createAndRunPoll(e,t){let n=await this.createAndRun(e,t);return await this.runs.poll(n.id,{thread_id:n.thread_id},t)}createAndRunStream(e,t){return AssistantStream.createThreadAssistantStream(e,this._client.beta.threads,t)}};Threads.Runs=Runs,Threads.Messages=Messages;export{Threads};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CursorPage}from"../../core/pagination.js";import{
|
|
1
|
+
import{CursorPage}from"../../core/pagination.js";import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";import{Files}from"./files/files.js";var Containers=class extends APIResource{constructor(){super(...arguments),this.files=new Files(this._client)}create(e,t){return this._client.post(`/containers`,{body:e,...t,__security:{bearerAuth:!0}})}retrieve(e,t){return this._client.get(path`/containers/${e}`,{...t,__security:{bearerAuth:!0}})}list(e={},t){return this._client.getAPIList(`/containers`,CursorPage,{query:e,...t,__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/containers/${e}`,{...t,headers:buildHeaders([{Accept:`*/*`},t?.headers]),__security:{bearerAuth:!0}})}};Containers.Files=Files;export{Containers};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var Content=class extends APIResource{retrieve(e,t,n){let{container_id:r}=t;return this._client.get(path`/containers/${r}/files/${e}/content`,{...n,headers:buildHeaders([{Accept:`application/binary`},n?.headers]),__security:{bearerAuth:!0},__binaryResponse:!0})}};export{Content};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CursorPage}from"../../../core/pagination.js";import{
|
|
1
|
+
import{CursorPage}from"../../../core/pagination.js";import{buildHeaders}from"../../../internal/headers.js";import{maybeMultipartFormRequestOptions}from"../../../internal/uploads.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";import{Content}from"./content.js";var Files=class extends APIResource{constructor(){super(...arguments),this.content=new Content(this._client)}create(e,t,n){return this._client.post(path`/containers/${e}/files`,maybeMultipartFormRequestOptions({body:t,...n,__security:{bearerAuth:!0}},this._client))}retrieve(e,t,n){let{container_id:r}=t;return this._client.get(path`/containers/${r}/files/${e}`,{...n,__security:{bearerAuth:!0}})}list(e,t={},n){return this._client.getAPIList(path`/containers/${e}/files`,CursorPage,{query:t,...n,__security:{bearerAuth:!0}})}delete(e,t,n){let{container_id:r}=t;return this._client.delete(path`/containers/${r}/files/${e}`,{...n,headers:buildHeaders([{Accept:`*/*`},n?.headers]),__security:{bearerAuth:!0}})}};Files.Content=Content;export{Files};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{APIConnectionTimeoutError}from"../core/error.js";import{sleep}from"../internal/utils/sleep.js";import{CursorPage}from"../core/pagination.js";import{multipartFormRequestOptions}from"../internal/uploads.js";import{APIResource}from"../core/resource.js";import{path}from"../internal/utils/path.js";import"../error.js";
|
|
1
|
+
import{APIConnectionTimeoutError}from"../core/error.js";import{sleep}from"../internal/utils/sleep.js";import{CursorPage}from"../core/pagination.js";import{buildHeaders}from"../internal/headers.js";import{multipartFormRequestOptions}from"../internal/uploads.js";import{APIResource}from"../core/resource.js";import{path}from"../internal/utils/path.js";import"../error.js";var Files=class extends APIResource{create(e,t){return this._client.post(`/files`,multipartFormRequestOptions({body:e,...t,__security:{bearerAuth:!0}},this._client))}retrieve(e,t){return this._client.get(path`/files/${e}`,{...t,__security:{bearerAuth:!0}})}list(e={},t){return this._client.getAPIList(`/files`,CursorPage,{query:e,...t,__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/files/${e}`,{...t,__security:{bearerAuth:!0}})}content(e,t){return this._client.get(path`/files/${e}/content`,{...t,headers:buildHeaders([{Accept:`application/binary`},t?.headers]),__security:{bearerAuth:!0},__binaryResponse:!0})}async waitForProcessing(e,{pollInterval:t=5e3,maxWait:n=18e5}={}){let r=new Set([`processed`,`error`,`deleted`]),i=Date.now(),a=await this.retrieve(e);for(;!a.status||!r.has(a.status);)if(await sleep(t),a=await this.retrieve(e),Date.now()-i>n)throw new APIConnectionTimeoutError({message:`Giving up on waiting for file ${e} to finish processing after ${n} milliseconds.`});return a}};export{Files};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";var Calls=class extends APIResource{accept(e,t,n){return this._client.post(path`/realtime/calls/${e}/accept`,{body:t,...n,headers:buildHeaders([{Accept:`*/*`},n?.headers]),__security:{bearerAuth:!0}})}hangup(e,t){return this._client.post(path`/realtime/calls/${e}/hangup`,{...t,headers:buildHeaders([{Accept:`*/*`},t?.headers]),__security:{bearerAuth:!0}})}refer(e,t,n){return this._client.post(path`/realtime/calls/${e}/refer`,{body:t,...n,headers:buildHeaders([{Accept:`*/*`},n?.headers]),__security:{bearerAuth:!0}})}reject(e,t={},n){return this._client.post(path`/realtime/calls/${e}/reject`,{body:t,...n,headers:buildHeaders([{Accept:`*/*`},n?.headers]),__security:{bearerAuth:!0}})}};export{Calls};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";import{addOutputText,parseResponse}from"../../lib/ResponsesParser.js";import{ResponseStream}from"../../lib/responses/ResponseStream.js";import{InputItems}from"./input-items.js";import{InputTokens}from"./input-tokens.js";var Responses=class extends APIResource{constructor(){super(...arguments),this.inputItems=new InputItems(this._client),this.inputTokens=new InputTokens(this._client)}create(e,t){return this._client.post(`/responses`,{body:e,...t,stream:e.stream??!1,__security:{bearerAuth:!0}})._thenUnwrap(e=>(`object`in e&&e.object===`response`&&addOutputText(e),e))}retrieve(e,t={},n){return this._client.get(path`/responses/${e}`,{query:t,...n,stream:t?.stream??!1,__security:{bearerAuth:!0}})._thenUnwrap(e=>(`object`in e&&e.object===`response`&&addOutputText(e),e))}delete(e,t){return this._client.delete(path`/responses/${e}`,{...t,headers:buildHeaders([{Accept:`*/*`},t?.headers]),__security:{bearerAuth:!0}})}parse(e,t){return this._client.responses.create(e,t)._thenUnwrap(t=>parseResponse(t,e))}stream(e,t){return ResponseStream.createResponse(this._client,e,t)}cancel(e,t){return this._client.post(path`/responses/${e}/cancel`,{...t,__security:{bearerAuth:!0}})}compact(e,t){return this._client.post(`/responses/compact`,{body:e,...t,__security:{bearerAuth:!0}})}};Responses.InputItems=InputItems,Responses.InputTokens=InputTokens;export{Responses};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";var Content=class extends APIResource{retrieve(e,t){return this._client.get(path`/skills/${e}/content`,{...t,headers:buildHeaders([{Accept:`application/binary`},t?.headers]),__security:{bearerAuth:!0},__binaryResponse:!0})}};export{Content};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildHeaders}from"../../../internal/headers.js";import{APIResource}from"../../../core/resource.js";import{path}from"../../../internal/utils/path.js";var Content=class extends APIResource{retrieve(e,t,n){let{skill_id:r}=t;return this._client.get(path`/skills/${r}/versions/${e}/content`,{...n,headers:buildHeaders([{Accept:`application/binary`},n?.headers]),__security:{bearerAuth:!0},__binaryResponse:!0})}};export{Content};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"../../internal/utils/sleep.js";import{CursorPage}from"../../core/pagination.js";import{
|
|
1
|
+
import{sleep}from"../../internal/utils/sleep.js";import{CursorPage}from"../../core/pagination.js";import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";import{allSettledWithThrow}from"../../lib/Util.js";var FileBatches=class extends APIResource{create(e,t,n){return this._client.post(path`/vector_stores/${e}/file_batches`,{body:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}retrieve(e,t,n){let{vector_store_id:r}=t;return this._client.get(path`/vector_stores/${r}/file_batches/${e}`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}cancel(e,t,n){let{vector_store_id:r}=t;return this._client.post(path`/vector_stores/${r}/file_batches/${e}/cancel`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}async createAndPoll(e,t,n){let r=await this.create(e,t);return await this.poll(e,r.id,n)}listFiles(e,t,n){let{vector_store_id:r,...i}=t;return this._client.getAPIList(path`/vector_stores/${r}/file_batches/${e}/files`,CursorPage,{query:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}async poll(e,t,n){let r=buildHeaders([n?.headers,{"X-Stainless-Poll-Helper":`true`,"X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:i,response:a}=await this.retrieve(t,{vector_store_id:e},{...n,headers:r}).withResponse();switch(i.status){case`in_progress`:let e=5e3;if(n?.pollIntervalMs)e=n.pollIntervalMs;else{let t=a.headers.get(`openai-poll-after-ms`);if(t){let n=parseInt(t);isNaN(n)||(e=n)}}await sleep(e);break;case`failed`:case`cancelled`:case`completed`:return i}}}async uploadAndPoll(e,{files:t,fileIds:n=[]},r){if(t==null||t.length==0)throw Error("No `files` provided to process. If you've already uploaded files you should use `.createAndPoll()` instead");let i=r?.maxConcurrency??5,a=Math.min(i,t.length),o=this._client,s=t.values(),c=[...n];async function processFiles(e){for(let t of e){let e=await o.files.create({file:t,purpose:`assistants`},r);c.push(e.id)}}let l=Array(a).fill(s).map(processFiles);return await allSettledWithThrow(l),await this.createAndPoll(e,{file_ids:c})}};export{FileBatches};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"../../internal/utils/sleep.js";import{CursorPage,Page}from"../../core/pagination.js";import{
|
|
1
|
+
import{sleep}from"../../internal/utils/sleep.js";import{CursorPage,Page}from"../../core/pagination.js";import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";import"../../internal/utils.js";var Files=class extends APIResource{create(e,t,n){return this._client.post(path`/vector_stores/${e}/files`,{body:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}retrieve(e,t,n){let{vector_store_id:r}=t;return this._client.get(path`/vector_stores/${r}/files/${e}`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}update(e,t,n){let{vector_store_id:r,...i}=t;return this._client.post(path`/vector_stores/${r}/files/${e}`,{body:i,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}list(e,t={},n){return this._client.getAPIList(path`/vector_stores/${e}/files`,CursorPage,{query:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}delete(e,t,n){let{vector_store_id:r}=t;return this._client.delete(path`/vector_stores/${r}/files/${e}`,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}async createAndPoll(e,t,n){let r=await this.create(e,t,n);return await this.poll(e,r.id,n)}async poll(e,t,n){let r=buildHeaders([n?.headers,{"X-Stainless-Poll-Helper":`true`,"X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let i=await this.retrieve(t,{vector_store_id:e},{...n,headers:r}).withResponse(),a=i.data;switch(a.status){case`in_progress`:let e=5e3;if(n?.pollIntervalMs)e=n.pollIntervalMs;else{let t=i.response.headers.get(`openai-poll-after-ms`);if(t){let n=parseInt(t);isNaN(n)||(e=n)}}await sleep(e);break;case`failed`:case`completed`:return a}}}async upload(e,t,n){let r=await this._client.files.create({file:t,purpose:`assistants`},n);return this.create(e,{file_id:r.id},n)}async uploadAndPoll(e,t,n){let r=await this.upload(e,t,n);return await this.poll(e,r.id,n)}content(e,t,n){let{vector_store_id:r}=t;return this._client.getAPIList(path`/vector_stores/${r}/files/${e}/content`,Page,{...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}};export{Files};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CursorPage,Page}from"../../core/pagination.js";import{
|
|
1
|
+
import{CursorPage,Page}from"../../core/pagination.js";import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import{path}from"../../internal/utils/path.js";import{FileBatches}from"./file-batches.js";import{Files}from"./files.js";var VectorStores=class extends APIResource{constructor(){super(...arguments),this.files=new Files(this._client),this.fileBatches=new FileBatches(this._client)}create(e,t){return this._client.post(`/vector_stores`,{body:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}retrieve(e,t){return this._client.get(path`/vector_stores/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}update(e,t,n){return this._client.post(path`/vector_stores/${e}`,{body:t,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}list(e={},t){return this._client.getAPIList(`/vector_stores`,CursorPage,{query:e,...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/vector_stores/${e}`,{...t,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},t?.headers]),__security:{bearerAuth:!0}})}search(e,t,n){return this._client.getAPIList(path`/vector_stores/${e}/search`,Page,{body:t,method:`post`,...n,headers:buildHeaders([{"OpenAI-Beta":`assistants=v2`},n?.headers]),__security:{bearerAuth:!0}})}};VectorStores.Files=Files,VectorStores.FileBatches=FileBatches;export{VectorStores};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConversationCursorPage}from"../core/pagination.js";import{maybeMultipartFormRequestOptions,multipartFormRequestOptions}from"../internal/uploads.js";import{APIResource}from"../core/resource.js";import{path}from"../internal/utils/path.js";
|
|
1
|
+
import{ConversationCursorPage}from"../core/pagination.js";import{buildHeaders}from"../internal/headers.js";import{maybeMultipartFormRequestOptions,multipartFormRequestOptions}from"../internal/uploads.js";import{APIResource}from"../core/resource.js";import{path}from"../internal/utils/path.js";var Videos=class extends APIResource{create(e,t){return this._client.post(`/videos`,multipartFormRequestOptions({body:e,...t,__security:{bearerAuth:!0}},this._client))}retrieve(e,t){return this._client.get(path`/videos/${e}`,{...t,__security:{bearerAuth:!0}})}list(e={},t){return this._client.getAPIList(`/videos`,ConversationCursorPage,{query:e,...t,__security:{bearerAuth:!0}})}delete(e,t){return this._client.delete(path`/videos/${e}`,{...t,__security:{bearerAuth:!0}})}createCharacter(e,t){return this._client.post(`/videos/characters`,multipartFormRequestOptions({body:e,...t,__security:{bearerAuth:!0}},this._client))}downloadContent(e,t={},n){return this._client.get(path`/videos/${e}/content`,{query:t,...n,headers:buildHeaders([{Accept:`application/binary`},n?.headers]),__security:{bearerAuth:!0},__binaryResponse:!0})}edit(e,t){return this._client.post(`/videos/edits`,multipartFormRequestOptions({body:e,...t,__security:{bearerAuth:!0}},this._client))}extend(e,t){return this._client.post(`/videos/extensions`,multipartFormRequestOptions({body:e,...t,__security:{bearerAuth:!0}},this._client))}getCharacter(e,t){return this._client.get(path`/videos/characters/${e}`,{...t,__security:{bearerAuth:!0}})}remix(e,t,n){return this._client.post(path`/videos/${e}/remix`,maybeMultipartFormRequestOptions({body:t,...n,__security:{bearerAuth:!0}},this._client))}};export{Videos};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__classPrivateFieldGet}from"../../internal/tslib.js";import{InvalidWebhookSignatureError}from"../../core/error.js";import{
|
|
1
|
+
import{__classPrivateFieldGet}from"../../internal/tslib.js";import{InvalidWebhookSignatureError}from"../../core/error.js";import{buildHeaders}from"../../internal/headers.js";import{APIResource}from"../../core/resource.js";import"../../error.js";var _Webhooks_instances,_Webhooks_validateSecret,_Webhooks_getRequiredHeader,Webhooks=class extends APIResource{constructor(){super(...arguments),_Webhooks_instances.add(this)}async unwrap(e,t,n=this._client.webhookSecret,r=300){return await this.verifySignature(e,t,n,r),JSON.parse(e)}async verifySignature(e,t,n=this._client.webhookSecret,r=300){if(typeof crypto>`u`||typeof crypto.subtle.importKey!=`function`||typeof crypto.subtle.verify!=`function`)throw Error("Webhook signature verification is only supported when the `crypto` global is defined");__classPrivateFieldGet(this,_Webhooks_instances,`m`,_Webhooks_validateSecret).call(this,n);let i=buildHeaders([t]).values,a=__classPrivateFieldGet(this,_Webhooks_instances,`m`,_Webhooks_getRequiredHeader).call(this,i,`webhook-signature`),o=__classPrivateFieldGet(this,_Webhooks_instances,`m`,_Webhooks_getRequiredHeader).call(this,i,`webhook-timestamp`),s=__classPrivateFieldGet(this,_Webhooks_instances,`m`,_Webhooks_getRequiredHeader).call(this,i,`webhook-id`),c=parseInt(o,10);if(isNaN(c))throw new InvalidWebhookSignatureError(`Invalid webhook timestamp format`);let l=Math.floor(Date.now()/1e3);if(l-c>r)throw new InvalidWebhookSignatureError(`Webhook timestamp is too old`);if(c>l+r)throw new InvalidWebhookSignatureError(`Webhook timestamp is too new`);let u=a.split(` `).map(e=>e.startsWith(`v1,`)?e.substring(3):e),d=n.startsWith(`whsec_`)?Buffer.from(n.replace(`whsec_`,``),`base64`):Buffer.from(n,`utf-8`),f=s?`${s}.${o}.${e}`:`${o}.${e}`,p=await crypto.subtle.importKey(`raw`,d,{name:`HMAC`,hash:`SHA-256`},!1,[`verify`]);for(let e of u)try{let t=Buffer.from(e,`base64`);if(await crypto.subtle.verify(`HMAC`,p,t,new TextEncoder().encode(f)))return}catch{continue}throw new InvalidWebhookSignatureError(`The given webhook signature does not match the expected signature`)}};_Webhooks_instances=new WeakSet,_Webhooks_validateSecret=function(e){if(typeof e!=`string`||e.length===0)throw Error(`The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function`)},_Webhooks_getRequiredHeader=function(e,t){if(!e)throw Error(`Headers are required`);let n=e.get(t);if(n==null)throw Error(`Missing required header: ${t}`);return n};export{Webhooks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const VERSION=`6.49.0`;export{VERSION};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { evaluate } from "#ai/evaluate.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{evaluate}from"#ai/evaluate.js";export{evaluate};
|
|
@@ -65,6 +65,7 @@ export interface McpClientConnectionDefinition {
|
|
|
65
65
|
* - `never()`: allow all tool calls without approval
|
|
66
66
|
* - `once()`: require approval only the first time per session
|
|
67
67
|
* - `always()`: require approval for every tool call
|
|
68
|
+
* - `auto()`: use an evaluation model to ask about dangerous or unclear effects
|
|
68
69
|
*
|
|
69
70
|
* When omitted, tool calls execute without approval, consistent
|
|
70
71
|
* with authored tools.
|
|
@@ -81,6 +81,7 @@ export interface OpenAPIConnectionDefinition {
|
|
|
81
81
|
* - `never()`: allow all tool calls without approval
|
|
82
82
|
* - `once()`: require approval only the first time per session
|
|
83
83
|
* - `always()`: require approval for every tool call
|
|
84
|
+
* - `auto()`: use an evaluation model to ask about dangerous or unclear effects
|
|
84
85
|
*/
|
|
85
86
|
approval?: Approval;
|
|
86
87
|
/**
|
|
@@ -53,6 +53,11 @@ export interface RemoteAgentDefinition {
|
|
|
53
53
|
* framework create-session route (`/eve/v1/session`).
|
|
54
54
|
*/
|
|
55
55
|
readonly path: string;
|
|
56
|
+
/**
|
|
57
|
+
* Whether eve exposes this remote agent to the parent model as a tool.
|
|
58
|
+
* Defaults to `true`; `false` keeps it callable from workflow tools.
|
|
59
|
+
*/
|
|
60
|
+
readonly tool?: boolean;
|
|
56
61
|
/**
|
|
57
62
|
* Base URL of the remote eve deployment to call. Accepts a static string
|
|
58
63
|
* (baked at compile time) or a function resolved at runtime — use the
|
|
@@ -17,6 +17,11 @@ export interface WorkspaceAgentDefinition {
|
|
|
17
17
|
readonly outputSchema?: StandardJSONSchemaV1<unknown, unknown> | JsonObject;
|
|
18
18
|
/** Name of the peer workspace member, such as `research`. */
|
|
19
19
|
readonly name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether eve exposes this workspace peer to the parent model as a tool.
|
|
22
|
+
* Defaults to `true`; `false` keeps it callable from workflow tools.
|
|
23
|
+
*/
|
|
24
|
+
readonly tool?: boolean;
|
|
20
25
|
/** Overrides environment-aware workspace routing and service authentication. */
|
|
21
26
|
readonly transport?: WorkspaceAgentTransport;
|
|
22
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";import{vercelOidc}from"#public/agents/auth.js";import{defineRemoteAgent}from"#public/definitions/remote-agent.js";const WORKSPACE_AGENT_NAME=Symbol.for(`eve.workspace-agent.name`);function defineWorkspaceAgent(e){let t=e.transport??defaultWorkspaceAgentTransport(e.name),n=defineRemoteAgent({auth:t.auth,description:e.description??``,forwardPrincipal:e.forwardPrincipal,headers:t.headers,outputSchema:e.outputSchema,url:t.url});return Object.defineProperty(n,WORKSPACE_AGENT_NAME,{value:e.name}),n}function workspaceSubagentName(e){return isBrandedWorkspaceSubagent(e)?e[WORKSPACE_AGENT_NAME]:void 0}function isBrandedWorkspaceSubagent(e){return typeof e==`object`&&!!e&&Reflect.has(e,WORKSPACE_AGENT_NAME)}function workspaceAgentRoutePrefix(e){let t=normalizePublicRoutePrefix(process.env.EVE_PUBLIC_ROUTE_PREFIX);return`${t?.slice(0,t.lastIndexOf(`/`))??(process.env.VERCEL_ENV===`development`?``:`/eve`)}/${e}`}function defaultWorkspaceAgentTransport(e){let t=vercelOidc();return{auth:async()=>(requireVercelWorkspaceEnvironment(),process.env.VERCEL_ENV===`development`?{headers:{}}:t()),url:()=>{requireVercelWorkspaceEnvironment();let t=process.env.VERCEL_ENV===`development`,n=process.env.VERCEL_ENV===`production`?process.env.VERCEL_PROJECT_PRODUCTION_URL:process.env.VERCEL_URL;if(n===void 0||n.length===0)throw Error(`The default workspace-agent transport requires VERCEL_URL, or VERCEL_PROJECT_PRODUCTION_URL in production.`);return`${t?`http`:`https`}://${n}${workspaceAgentRoutePrefix(e)}`}}}function requireVercelWorkspaceEnvironment(){if(!process.env.VERCEL)throw Error(`No default workspace-agent transport is available in this environment. Provide transport to defineWorkspaceAgent().`)}export{defineWorkspaceAgent,workspaceSubagentName};
|
|
1
|
+
import{normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";import{vercelOidc}from"#public/agents/auth.js";import{defineRemoteAgent}from"#public/definitions/remote-agent.js";const WORKSPACE_AGENT_NAME=Symbol.for(`eve.workspace-agent.name`);function defineWorkspaceAgent(e){let t=e.transport??defaultWorkspaceAgentTransport(e.name),n=defineRemoteAgent({auth:t.auth,description:e.description??``,forwardPrincipal:e.forwardPrincipal,headers:t.headers,outputSchema:e.outputSchema,tool:e.tool,url:t.url});return Object.defineProperty(n,WORKSPACE_AGENT_NAME,{value:e.name}),n}function workspaceSubagentName(e){return isBrandedWorkspaceSubagent(e)?e[WORKSPACE_AGENT_NAME]:void 0}function isBrandedWorkspaceSubagent(e){return typeof e==`object`&&!!e&&Reflect.has(e,WORKSPACE_AGENT_NAME)}function workspaceAgentRoutePrefix(e){let t=normalizePublicRoutePrefix(process.env.EVE_PUBLIC_ROUTE_PREFIX);return`${t?.slice(0,t.lastIndexOf(`/`))??(process.env.VERCEL_ENV===`development`?``:`/eve`)}/${e}`}function defaultWorkspaceAgentTransport(e){let t=vercelOidc();return{auth:async()=>(requireVercelWorkspaceEnvironment(),process.env.VERCEL_ENV===`development`?{headers:{}}:t()),url:()=>{requireVercelWorkspaceEnvironment();let t=process.env.VERCEL_ENV===`development`,n=process.env.VERCEL_ENV===`production`?process.env.VERCEL_PROJECT_PRODUCTION_URL:process.env.VERCEL_URL;if(n===void 0||n.length===0)throw Error(`The default workspace-agent transport requires VERCEL_URL, or VERCEL_PROJECT_PRODUCTION_URL in production.`);return`${t?`http`:`https`}://${n}${workspaceAgentRoutePrefix(e)}`}}}function requireVercelWorkspaceEnvironment(){if(!process.env.VERCEL)throw Error(`No default workspace-agent transport is available in this environment. Provide transport to defineWorkspaceAgent().`)}export{defineWorkspaceAgent,workspaceSubagentName};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* off nothing discovers that directory, so these compile but never run.
|
|
10
10
|
*/
|
|
11
11
|
import { type ManagedTraceOptions, type OtelIntegration } from "#tracing/otel-declaration.js";
|
|
12
|
-
export { isOtelDeclaration, isOtelIntegration, otel, otelIntegration,
|
|
12
|
+
export { isOtelDeclaration, isOtelIntegration, otel, otelIntegration, type OtelDeclaration, type OtelIntegration, type OtelIntegrationOptions, type OtelOptions, type ManagedTraceOptions, type SpanAttributeDecision, type SpanExportAttributeValue, type SpanExportContext, type SpanExportDecision, type SpanExportPolicy, type TraceCaptureContext, type TraceCapturePolicy, type TracePolicyDecision, } from "#tracing/otel-declaration.js";
|
|
13
13
|
export type { SpanExporter, SpanProcessor } from "#compiled/@vercel/otel/index.js";
|
|
14
14
|
/**
|
|
15
15
|
* Vercel Agent Runs, enabled by default in preview and production deployments.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{agentRunsIntegration,
|
|
1
|
+
import{agentRunsIntegration,isOtelDeclaration,isOtelIntegration,managedOtelIntegration,otel,otelIntegration}from"#tracing/otel-declaration.js";import{createLocalTracesProcessor,resolveLocalTracesExportPolicy}from"#tracing/local-traces.js";function agentRuns(e={}){return agentRunsIntegration(e)}function localTraces(e={}){return managedOtelIntegration({...e,exportPolicy:resolveLocalTracesExportPolicy(e.exportPolicy),spanProcessors:[createLocalTracesProcessor()]})}export{agentRuns,isOtelDeclaration,isOtelIntegration,localTraces,otel,otelIntegration};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { auto } from "#models/auto.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{auto}from"#models/auto.js";export{auto};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createCodexSubscriptionModel}from"./chatgpt/model.js";import{
|
|
1
|
+
import{createCodexSubscriptionModel}from"./chatgpt/model.js";import{createDirectModelFetch}from"#internal/model-auth/transport.js";import{DEFAULT_CHATGPT_MODEL_ID,normalizeChatGptModelId}from"#shared/chatgpt-model.js";import{createOpenAI}from"#compiled/@ai-sdk/openai/index.js";function chatgpt(e=DEFAULT_CHATGPT_MODEL_ID){let t=normalizeChatGptModelId(e);if(t===void 0&&e.trim().replace(/^openai\//u,``).length===0)throw Error(`Expected chatgpt "model" to name an OpenAI model, for example "gpt-5.6-sol".`);if(t===void 0)throw Error(`chatgpt serves OpenAI models through the local ChatGPT login; received "${e}".`);return createCodexSubscriptionModel({model:t})}const experimental_chatgpt=chatgpt;function openai(e=`gpt-5.6-luna-fast`){let t=e.trim().replace(/^openai\//u,``);if(!t||t.includes(`/`))throw Error(`Expected an OpenAI model ID.`);return createOpenAI({apiKey:`eve-local-credential`,fetch:createDirectModelFetch(`openai`)}).responses(t)}export{chatgpt,experimental_chatgpt,openai};
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
* Per-tool approval helpers used inside `agent/tools/*.ts` files.
|
|
3
3
|
*/
|
|
4
4
|
export type { Approval, ApprovalConfiguration, ApprovalContext, ApprovalPolicy, ApprovalRequest, ApprovalResponse, ApprovalResponseAuth, ApprovalResponseContext, ApprovalResponseDecision, ApprovalResponsePolicy, ApprovalResponseSession, ApprovalStatus, } from "#public/definitions/approval.js";
|
|
5
|
-
export {
|
|
5
|
+
export type { AutoApprovalOptions } from "#tools/approval/policies.js";
|
|
6
|
+
export { always, auto, never, once } from "#tools/approval/policies.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{always,never,once}from"#tools/approval/policies.js";export{always,never,once};
|
|
1
|
+
import{always,auto,never,once}from"#tools/approval/policies.js";export{always,auto,never,once};
|
|
@@ -32,7 +32,7 @@ export interface UseEveAgentHelpers<TData> extends UseEveAgentSnapshot<TData> {
|
|
|
32
32
|
readonly resume: () => Promise<void>;
|
|
33
33
|
/** Creates the session without starting its first turn. */
|
|
34
34
|
readonly prewarm: () => Promise<void>;
|
|
35
|
-
/** Resets the session: detaches any local stream
|
|
35
|
+
/** Resets the session: detaches any local stream and clears events and projected data. */
|
|
36
36
|
readonly reset: () => void;
|
|
37
37
|
/** Sends a message. While a turn is active, pass `turnPolicy: "steer"` to replace it. */
|
|
38
38
|
readonly send: <TOutput = unknown>(message: string | UserContent, options?: SendTurnOptions<TOutput>) => Promise<void>;
|
|
@@ -82,7 +82,16 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
|
|
|
82
82
|
* @default true
|
|
83
83
|
*/
|
|
84
84
|
readonly optimistic?: boolean;
|
|
85
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Prewarm an owned session when true. React observes this value across renders;
|
|
87
|
+
* changing it from false to true prepares the current session, and reset checks
|
|
88
|
+
* the latest rendered value before preparing the next session.
|
|
89
|
+
*
|
|
90
|
+
* Changing the value to false does not discard an existing session or abort
|
|
91
|
+
* session creation already in flight.
|
|
92
|
+
*
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
86
95
|
readonly prewarm?: boolean;
|
|
87
96
|
readonly reducer?: EveAgentReducer<TData>;
|
|
88
97
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EveAgentStore,attachEveAgentStore,detachEveAgentStore}from"#client/eve-agent-store.js";import{defaultMessageReducer}from"#client/message-reducer.js";import{useCallback,useEffect,useMemo,useRef,useState,useSyncExternalStore}from"react";import{resolveEveAgentHost}from"#client/agent-host.js";function useEveAgent(e={}){let t=useRef(void 0),n=useRef(e.resume??!1),[r,i]=useState(n.current);if(!t.current){if(n.current&&e.initialSession===void 0&&e.session===void 0)throw Error(`useEveAgent({ resume: true }) requires initialSession or session.`);let r=e.reducer??defaultMessageReducer();t.current=new EveAgentStore({auth:e.auth,headers:e.headers,host:resolveEveAgentHost({agent:e.agent,host:e.host}),initialEvents:e.initialEvents,initialSession:e.initialSession,optimistic:e.optimistic,
|
|
1
|
+
import{EveAgentStore,attachEveAgentStore,detachEveAgentStore}from"#client/eve-agent-store.js";import{defaultMessageReducer}from"#client/message-reducer.js";import{useCallback,useEffect,useMemo,useRef,useState,useSyncExternalStore}from"react";import{resolveEveAgentHost}from"#client/agent-host.js";function useEveAgent(e={}){let t=useRef(void 0),n=useRef(e.resume??!1),[r,i]=useState(n.current),[a,o]=useState(0),s=e.prewarm??!1;if(!t.current){if(n.current&&e.initialSession===void 0&&e.session===void 0)throw Error(`useEveAgent({ resume: true }) requires initialSession or session.`);let r=e.reducer??defaultMessageReducer();t.current=new EveAgentStore({auth:e.auth,headers:e.headers,host:resolveEveAgentHost({agent:e.agent,host:e.host}),initialEvents:e.initialEvents,initialSession:e.initialSession,optimistic:e.optimistic,reducer:r,session:e.session})}let c=t.current;c.setCallbacks({onError:e.onError,onEvent:e.onEvent,onFinish:e.onFinish,onSessionChange:e.onSessionChange,prepareSend:e.prepareSend});let l=useCallback(e=>c.subscribe(e),[c]),u=useSyncExternalStore(l,()=>c.snapshot,()=>c.snapshot);useEffect(()=>{let e=setTimeout(()=>attachEveAgentStore(c),0);return()=>{clearTimeout(e),detachEveAgentStore(c)}},[c]),useEffect(()=>{if(!s)return;let e=setTimeout(()=>void c.prewarm().catch(()=>{}),0);return()=>clearTimeout(e)},[a,s,c]),useEffect(()=>{if(!n.current)return;let e=!0,finish=()=>{e&&i(!1)},t=setTimeout(()=>void c.resume().then(finish,finish),0);return()=>{e=!1,clearTimeout(t)}},[c]);let d=useCallback(()=>c.cancel(),[c]),f=useCallback(()=>{c.reset(),o(e=>e+1)},[c]),p=useCallback(()=>c.prewarm(),[c]),m=useCallback(()=>c.resume(),[c]),h=useCallback((e,t)=>c.send({...t,message:e}),[c]),g=useCallback((e,t)=>c.send({...t,inputResponses:e}),[c]),_=r&&u.status===`ready`?{...u,status:`resuming`}:u;return useMemo(()=>({..._,cancel:d,prewarm:p,reset:f,respond:g,resume:m,send:h}),[d,p,f,g,m,h,_])}export{useEveAgent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RuntimeModelMetadataCacheKey}from"#context/keys.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId,isAgentReasoningDefinition,isRuntimeLanguageModel}from"#internal/runtime-model.js";import{parseJsonObject}from"#shared/json.js";import{
|
|
1
|
+
import{localGatewayModel}from"#internal/model-auth/transport.js";import{RuntimeModelMetadataCacheKey}from"#context/keys.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId,isAgentReasoningDefinition,isRuntimeLanguageModel}from"#internal/runtime-model.js";import{parseJsonObject}from"#shared/json.js";import{loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{resolveBootstrapRuntimeModel}from"#runtime/agent/bootstrap-model.js";import{resolveMockAuthoredRuntimeModel,shouldMockAuthoredRuntimeModels}from"#runtime/agent/mock-model-adapter.js";import{createRuntimeModelCatalog}from"#runtime/agent/model-catalog.js";async function resolveRuntimeModelReference(e,t){let n=resolveBootstrapRuntimeModel(e);if(n!==null)return n;let r=resolveMockAuthoredRuntimeModel(e);return r===null?isSourceBackedRuntimeModelReference(e)?await loadSourceBackedRuntimeModelReference(e,t):localGatewayModel(e.id)??e.id:r}async function loadSourceBackedRuntimeModelReference(e,t){if(t===void 0)throw Error(`Expected a compiled module-map scope to resolve the authored runtime model "${e.id}".`);let n=await loadResolvedModuleExport({definition:e.source,kindLabel:`runtime model "${e.id}"`,moduleMap:t.moduleMap,nodeId:t.nodeId}),r=normalizeAgentDefinition(n,`Expected the authored agent config export "${e.source.exportName??`default`}" from "${e.source.logicalPath}" to match the public eve shape.`).model;if(r===void 0)throw Error(`Expected the authored agent config export "${e.source.exportName??`default`}" from "${e.source.logicalPath}" to provide a runtime model.`);if(isDynamicModelDefinition(r))throw Error(`Expected the authored agent config export "${e.source.exportName??`default`}" from "${e.source.logicalPath}" to provide a static runtime model.`);return r}function isSourceBackedRuntimeModelReference(e){return e.source!==void 0}async function loadDynamicRuntimeModelDefinition(e){let t=await loadResolvedModuleExport({definition:e.dynamicModel,kindLabel:`dynamic runtime model`,moduleMap:e.scope.moduleMap,nodeId:e.scope.nodeId}),n=normalizeAgentDefinition(t,`Expected the authored agent config export "${e.dynamicModel.exportName??`default`}" from "${e.dynamicModel.logicalPath}" to match the public eve shape.`).model;if(!isDynamicModelDefinition(n))throw Error(`Expected the authored agent config export "${e.dynamicModel.exportName??`default`}" from "${e.dynamicModel.logicalPath}" to provide a dynamic model definition.`);return n}async function resolveRuntimeModelSelection(e){if(e.selection===null||e.selection===void 0)throw Error(`Dynamic model resolver returned no model. Every matching dynamic model handler must return a concrete model selection.`);let t=normalizeDynamicModelSelection(e.selection);validateDynamicModelSelection(t);let n=t.modelOptions?.providerOptions===void 0?void 0:parseProviderOptionsRecord(t.modelOptions.providerOptions),r=t.model,i=e.catalog??runtimeModelCatalogForState(e.state);if(typeof r==`string`){let a=formatLanguageModelGatewayId(r),o=await resolveSelectionMetadata({cacheKey:`gateway:${a}`,catalog:i,contextWindowTokens:t.modelContextWindowTokens,load:e=>e.getByGatewayId(a),modelLabel:a,state:e.state});return{reference:{id:o.resolvedModelId,contextWindowTokens:o.contextWindowTokens,maxOutputTokens:o.maxOutputTokens,providerOptions:n,reasoning:t.reasoning}}}if(validateRuntimeLanguageModel(r),e.durability===`durable`)throw Error(`Dynamic model selection returned a provider object, but durable model selections must be serializable. Return a model id string, or use a "step.started" model resolver.`);let a=formatLanguageModelGatewayId(r),o=r.provider.split(`.`)[0],s=await resolveSelectionMetadata({cacheKey:o===`gateway`?`gateway:${r.modelId}`:`provider:${r.provider}:${r.modelId}`,catalog:i,contextWindowTokens:t.modelContextWindowTokens,load:e=>o===`gateway`?e.getByGatewayId(r.modelId):e.getByProviderModelId(r.provider,r.modelId),modelLabel:a,state:e.state});return{model:r,reference:{id:s.resolvedModelId,contextWindowTokens:s.contextWindowTokens,maxOutputTokens:s.maxOutputTokens,providerOptions:n,reasoning:t.reasoning}}}const runtimeModelCatalogsByState=new WeakMap;function runtimeModelCatalogForState(e){let t=runtimeModelCatalogsByState.get(e);if(t!==void 0)return t;let n=createRuntimeModelCatalog();return runtimeModelCatalogsByState.set(e,n),n}async function resolveSelectionMetadata(e){if(e.contextWindowTokens!==void 0)return{contextWindowTokens:e.contextWindowTokens,resolvedModelId:e.modelLabel};let t=Date.now(),n=e.state.get(RuntimeModelMetadataCacheKey)?.[e.cacheKey];if(n!==void 0&&n.expiresAt>t)return n;let r=await e.load(e.catalog);if(r===null)throw Error(`Cannot select model "${e.modelLabel}" because AI Gateway did not provide context window metadata. Return modelContextWindowTokens with this selection for an unlisted or custom model.`);let i={...r,expiresAt:t+864e5};return e.state.set(RuntimeModelMetadataCacheKey,n=>({...Object.fromEntries(Object.entries(n??{}).filter(([,e])=>e.expiresAt>t)),[e.cacheKey]:i})),i}const DYNAMIC_MODEL_SELECTION_KEYS=new Set([`model`,`modelContextWindowTokens`,`modelOptions`,`reasoning`]);function validateDynamicModelSelection(e){let t=Object.keys(e).filter(e=>!DYNAMIC_MODEL_SELECTION_KEYS.has(e));if(t.length>0)throw Error(`Dynamic model resolver returned a selection with unknown key(s): ${t.join(`, `)}. Expected { model, reasoning?, modelContextWindowTokens?, modelOptions? }.`);if(e.reasoning!==void 0&&!isAgentReasoningDefinition(e.reasoning))throw Error(`Dynamic model resolver returned an invalid reasoning effort. Expected provider-default, none, minimal, low, medium, high, or xhigh.`);let n=e.modelContextWindowTokens;if(n!==void 0&&(!Number.isInteger(n)||n<=0))throw Error(`Dynamic model resolver returned an invalid modelContextWindowTokens value. Expected a positive integer.`);if(typeof e.model==`string`&&e.model.trim()===``)throw Error(`Dynamic model resolver returned an empty model id.`)}function normalizeDynamicModelSelection(e){return isModelSelectionDefinition(e)?e:{model:e}}function isModelSelectionDefinition(e){return typeof e==`object`&&!!e&&`model`in e&&!isRuntimeLanguageModel(e)}function validateRuntimeLanguageModel(e){if(!isRuntimeLanguageModel(e))throw Error(`Dynamic model resolver returned an invalid model. Return an AI Gateway model id string, an AI SDK language model, or { model, modelContextWindowTokens?, modelOptions? }.`)}function parseProviderOptionsRecord(e){if(e===void 0)return;let t={};for(let[n,r]of Object.entries(e))t[n]=parseJsonObject(r);return t}export{loadDynamicRuntimeModelDefinition,resolveRuntimeModelReference,resolveRuntimeModelSelection,shouldMockAuthoredRuntimeModels};
|