@songtonyli/dsh-cli 0.1.55 → 0.1.57
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +17 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +60 -41
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +2 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +9 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +30 -12
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +3 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +3 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +53 -5
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +27 -5
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +5 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/any_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/api_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/c_sharp_features_pb.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/compiler/plugin_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/cpp_features_pb.js +34 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/cpp_file_options_pb.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/cpp_options_pb.js +22 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/descriptor_pb.js +49 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/duration_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/empty_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/field_mask_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/go_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/java_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/json_enumvalue_options_pb.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/json_options_pb.js +22 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/source_context_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/struct_pb.js +11 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/timestamp_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/type_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/wrappers_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +15 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +18 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +60 -41
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +2 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +10 -7
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +31 -13
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +3 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +4 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +53 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +28 -6
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +5 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/any_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/api_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/c_sharp_features_pb.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/compiler/plugin_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/cpp_features_pb.js +33 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/cpp_file_options_pb.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/cpp_options_pb.js +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/descriptor_pb.js +47 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/duration_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/empty_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/field_mask_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/go_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/java_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/json_enumvalue_options_pb.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/json_options_pb.js +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/source_context_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/struct_pb.js +11 -6
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/timestamp_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/type_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/wrappers_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +15 -15
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +1 -1
- package/node_modules/@bufbuild/protobuf/package.json +236 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -182
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +15 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +15 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +692 -43
- package/node_modules/@earendil-works/pi-ai/README.md +207 -27
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +6 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +43 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +365 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +18 -17
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +20 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +26 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +2 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +183 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/helpers.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +19 -128
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/callback-server.js +146 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js +266 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +20 -124
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +19 -138
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +21 -89
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +3 -19
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js +14 -13
- package/node_modules/@earendil-works/pi-ai/dist/images.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/model-catalog.js +14 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +131 -41
- package/node_modules/@earendil-works/pi-ai/dist/models.js +157 -30
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +25 -21
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-stream.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.js +10 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/typesafe.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/typesafe.js +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/typesafe.models.js +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js +10 -8
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js +47 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/models-error.js +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +7 -0
- package/node_modules/@earendil-works/pi-ai/package.json +4 -4
- package/node_modules/@earendil-works/pi-telemetry/package.json +2 -2
- package/node_modules/openai/CHANGELOG.md +1089 -1
- package/node_modules/openai/README.md +201 -102
- package/node_modules/openai/_vendor/partial-json-parser/parser.js +55 -38
- package/node_modules/openai/_vendor/partial-json-parser/parser.mjs +55 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/Options.js +11 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs +11 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/Refs.js +4 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs +4 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js +2 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs +2 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/index.js +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/index.mjs +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js +139 -54
- package/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs +139 -54
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.js +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.mjs +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.js +10 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.mjs +10 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.js +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.mjs +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.js +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.mjs +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.js +10 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.mjs +10 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.js +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.mjs +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.js +6 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.mjs +6 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.js +5 -0
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.mjs +5 -0
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.js +7 -9
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.mjs +7 -9
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.js +3 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.mjs +3 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.js +8 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.mjs +8 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.js +12 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.mjs +12 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.js +43 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.mjs +43 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.js +11 -12
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.mjs +11 -12
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.js +3 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.mjs +3 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.js +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.mjs +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.js +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.mjs +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.js +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.mjs +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.js +57 -34
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.mjs +57 -34
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.js +24 -19
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.mjs +24 -19
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.js +46 -24
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.mjs +46 -24
- package/node_modules/openai/_vendor/zod-to-json-schema/util.js +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/util.mjs +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js +110 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +110 -38
- package/node_modules/openai/auth/subject-token-providers.js +235 -10
- package/node_modules/openai/auth/subject-token-providers.mjs +235 -10
- package/node_modules/openai/auth/workload-identity-auth.js +185 -24
- package/node_modules/openai/auth/workload-identity-auth.mjs +186 -25
- package/node_modules/openai/auth/x509-transport.js +273 -0
- package/node_modules/openai/auth/x509-transport.mjs +268 -0
- package/node_modules/openai/azure.js +74 -21
- package/node_modules/openai/azure.mjs +75 -22
- package/node_modules/openai/bedrock.js +174 -0
- package/node_modules/openai/bedrock.mjs +169 -0
- package/node_modules/openai/beta/realtime/internal-base.js +71 -10
- package/node_modules/openai/beta/realtime/internal-base.mjs +70 -10
- package/node_modules/openai/beta/realtime/websocket.js +180 -33
- package/node_modules/openai/beta/realtime/websocket.mjs +181 -34
- package/node_modules/openai/beta/realtime/ws.js +93 -14
- package/node_modules/openai/beta/realtime/ws.mjs +94 -15
- package/node_modules/openai/client.js +745 -99
- package/node_modules/openai/client.mjs +747 -101
- package/node_modules/openai/core/EventEmitter.js +127 -16
- package/node_modules/openai/core/EventEmitter.mjs +128 -17
- package/node_modules/openai/core/api-promise.js +0 -1
- package/node_modules/openai/core/api-promise.mjs +0 -1
- package/node_modules/openai/core/error.js +5 -5
- package/node_modules/openai/core/error.mjs +5 -5
- package/node_modules/openai/core/pagination.js +33 -3
- package/node_modules/openai/core/pagination.mjs +31 -2
- package/node_modules/openai/core/resource.js +0 -1
- package/node_modules/openai/core/resource.mjs +0 -1
- package/node_modules/openai/core/streaming.js +453 -88
- package/node_modules/openai/core/streaming.mjs +454 -89
- package/node_modules/openai/core/uploads.js +3 -1
- package/node_modules/openai/core/uploads.mjs +1 -0
- package/node_modules/openai/helpers/audio.js +198 -28
- package/node_modules/openai/helpers/audio.mjs +199 -29
- package/node_modules/openai/helpers/live.js +6 -0
- package/node_modules/openai/helpers/live.mjs +2 -0
- package/node_modules/openai/helpers/standard-schema.js +393 -0
- package/node_modules/openai/helpers/standard-schema.mjs +387 -0
- package/node_modules/openai/helpers/zod-v3-strict-schema.js +408 -0
- package/node_modules/openai/helpers/zod-v3-strict-schema.mjs +404 -0
- package/node_modules/openai/helpers/zod.js +221 -24
- package/node_modules/openai/helpers/zod.mjs +222 -26
- package/node_modules/openai/index.js +8 -7
- package/node_modules/openai/index.mjs +2 -2
- package/node_modules/openai/internal/assistant-stream-delta.js +316 -0
- package/node_modules/openai/internal/assistant-stream-delta.mjs +308 -0
- package/node_modules/openai/internal/auth/x509-api-origin.js +28 -0
- package/node_modules/openai/internal/auth/x509-api-origin.mjs +24 -0
- package/node_modules/openai/internal/auth/x509-credential-options.js +125 -0
- package/node_modules/openai/internal/auth/x509-credential-options.mjs +121 -0
- package/node_modules/openai/internal/auth/x509-token-exchange.js +248 -0
- package/node_modules/openai/internal/auth/x509-token-exchange.mjs +245 -0
- package/node_modules/openai/internal/auth/x509-transport-capability.js +171 -0
- package/node_modules/openai/internal/auth/x509-transport-capability.mjs +166 -0
- package/node_modules/openai/internal/auth/x509-transport-registry.js +53 -0
- package/node_modules/openai/internal/auth/x509-transport-registry.mjs +48 -0
- package/node_modules/openai/internal/auth/x509-transport-state-browser.js +35 -0
- package/node_modules/openai/internal/auth/x509-transport-state-browser.mjs +32 -0
- package/node_modules/openai/internal/auth/x509-transport-state.cjs +35 -0
- package/node_modules/openai/internal/auth/x509-transport-state.js +36 -0
- package/node_modules/openai/internal/auth/x509-transport-state.mjs +20 -0
- package/node_modules/openai/internal/auth/x509-workload-identity-auth.js +787 -0
- package/node_modules/openai/internal/auth/x509-workload-identity-auth.mjs +778 -0
- package/node_modules/openai/internal/bedrock.js +438 -0
- package/node_modules/openai/internal/bedrock.mjs +424 -0
- package/node_modules/openai/internal/builtin-types.js +0 -1
- package/node_modules/openai/internal/builtin-types.mjs +0 -1
- package/node_modules/openai/internal/data-residency.js +34 -0
- package/node_modules/openai/internal/data-residency.mjs +30 -0
- package/node_modules/openai/internal/decoders/line.js +140 -54
- package/node_modules/openai/internal/decoders/line.mjs +141 -55
- package/node_modules/openai/internal/detect-platform.js +3 -4
- package/node_modules/openai/internal/detect-platform.mjs +3 -4
- package/node_modules/openai/internal/errors.js +3 -3
- package/node_modules/openai/internal/errors.mjs +3 -3
- package/node_modules/openai/internal/headers.js +11 -9
- package/node_modules/openai/internal/headers.mjs +11 -9
- package/node_modules/openai/internal/multipart-encoding.js +51 -0
- package/node_modules/openai/internal/multipart-encoding.mjs +48 -0
- package/node_modules/openai/internal/parse.js +35 -11
- package/node_modules/openai/internal/parse.mjs +35 -11
- package/node_modules/openai/internal/provider.js +50 -0
- package/node_modules/openai/internal/provider.mjs +46 -0
- package/node_modules/openai/internal/qs/formats.js +1 -2
- package/node_modules/openai/internal/qs/formats.mjs +1 -1
- package/node_modules/openai/internal/qs/stringify.js +60 -51
- package/node_modules/openai/internal/qs/stringify.mjs +60 -51
- package/node_modules/openai/internal/qs/utils.js +368 -50
- package/node_modules/openai/internal/qs/utils.mjs +368 -50
- package/node_modules/openai/internal/realtime-credentials.js +23 -0
- package/node_modules/openai/internal/realtime-credentials.mjs +19 -0
- package/node_modules/openai/internal/request-options.js +43 -2
- package/node_modules/openai/internal/request-options.mjs +42 -2
- package/node_modules/openai/internal/responses/canonical-output-text.js +123 -0
- package/node_modules/openai/internal/responses/canonical-output-text.mjs +115 -0
- package/node_modules/openai/internal/responses/output-text-index.js +77 -0
- package/node_modules/openai/internal/responses/output-text-index.mjs +73 -0
- package/node_modules/openai/internal/responses/response-accumulator.js +942 -0
- package/node_modules/openai/internal/responses/response-accumulator.mjs +938 -0
- package/node_modules/openai/internal/shim-types.js +6 -1
- package/node_modules/openai/internal/shim-types.mjs +6 -1
- package/node_modules/openai/internal/shims.js +6 -1
- package/node_modules/openai/internal/shims.mjs +6 -1
- package/node_modules/openai/internal/stream-utils.js +35 -7
- package/node_modules/openai/internal/stream-utils.mjs +35 -7
- package/node_modules/openai/internal/to-file.js +47 -24
- package/node_modules/openai/internal/to-file.mjs +47 -24
- package/node_modules/openai/internal/tslib.js +6 -0
- package/node_modules/openai/internal/tslib.mjs +6 -1
- package/node_modules/openai/internal/types.js +0 -1
- package/node_modules/openai/internal/types.mjs +0 -1
- package/node_modules/openai/internal/uploads.js +377 -43
- package/node_modules/openai/internal/uploads.mjs +376 -44
- package/node_modules/openai/internal/utils/abort.js +94 -0
- package/node_modules/openai/internal/utils/abort.mjs +90 -0
- package/node_modules/openai/internal/utils/base64.js +3 -1
- package/node_modules/openai/internal/utils/base64.mjs +3 -1
- package/node_modules/openai/internal/utils/bytes.js +5 -0
- package/node_modules/openai/internal/utils/bytes.mjs +5 -0
- package/node_modules/openai/internal/utils/env.js +9 -5
- package/node_modules/openai/internal/utils/env.mjs +9 -5
- package/node_modules/openai/internal/utils/log.js +73 -11
- package/node_modules/openai/internal/utils/log.mjs +70 -11
- package/node_modules/openai/internal/utils/path.js +50 -30
- package/node_modules/openai/internal/utils/path.mjs +50 -30
- package/node_modules/openai/internal/utils/query.js +0 -1
- package/node_modules/openai/internal/utils/query.mjs +0 -1
- package/node_modules/openai/internal/utils/sleep.js +51 -2
- package/node_modules/openai/internal/utils/sleep.mjs +51 -2
- package/node_modules/openai/internal/utils/uuid.js +0 -1
- package/node_modules/openai/internal/utils/uuid.mjs +0 -1
- package/node_modules/openai/internal/utils/values.js +0 -1
- package/node_modules/openai/internal/utils/values.mjs +0 -1
- package/node_modules/openai/internal/utils.js +0 -1
- package/node_modules/openai/internal/utils.mjs +0 -1
- package/node_modules/openai/internal/ws-adapter-browser.js +66 -21
- package/node_modules/openai/internal/ws-adapter-browser.mjs +66 -21
- package/node_modules/openai/internal/ws-adapter-node.js +90 -24
- package/node_modules/openai/internal/ws-adapter-node.mjs +90 -24
- package/node_modules/openai/internal/ws-adapter.js +4 -0
- package/node_modules/openai/internal/ws-adapter.mjs +4 -0
- package/node_modules/openai/internal/ws.js +193 -48
- package/node_modules/openai/internal/ws.mjs +188 -49
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js +254 -72
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +256 -74
- package/node_modules/openai/lib/AssistantStream.js +430 -259
- package/node_modules/openai/lib/AssistantStream.mjs +432 -261
- package/node_modules/openai/lib/ChatCompletionRunner.js +12 -5
- package/node_modules/openai/lib/ChatCompletionRunner.mjs +13 -6
- package/node_modules/openai/lib/ChatCompletionStream.js +1430 -189
- package/node_modules/openai/lib/ChatCompletionStream.mjs +1433 -193
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.js +40 -2
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +41 -3
- package/node_modules/openai/lib/EventEmitter.js +124 -16
- package/node_modules/openai/lib/EventEmitter.mjs +125 -17
- package/node_modules/openai/lib/EventStream.js +1533 -55
- package/node_modules/openai/lib/EventStream.mjs +1534 -56
- package/node_modules/openai/lib/ResponsesParser.js +68 -29
- package/node_modules/openai/lib/ResponsesParser.mjs +69 -30
- package/node_modules/openai/lib/RunnableFunction.js +3 -0
- package/node_modules/openai/lib/RunnableFunction.mjs +3 -0
- package/node_modules/openai/lib/Util.js +7 -4
- package/node_modules/openai/lib/Util.mjs +7 -4
- package/node_modules/openai/lib/agents/agent-session-stream.js +274 -0
- package/node_modules/openai/lib/agents/agent-session-stream.mjs +270 -0
- package/node_modules/openai/lib/agents/output-text.js +8 -0
- package/node_modules/openai/lib/agents/output-text.mjs +5 -0
- package/node_modules/openai/lib/agents/turn-state.js +62 -0
- package/node_modules/openai/lib/agents/turn-state.mjs +58 -0
- package/node_modules/openai/lib/assistant-run-polling.js +17 -0
- package/node_modules/openai/lib/assistant-run-polling.mjs +14 -0
- package/node_modules/openai/lib/chatCompletionUtils.js +5 -6
- package/node_modules/openai/lib/chatCompletionUtils.mjs +5 -6
- package/node_modules/openai/lib/embeddings.js +58 -0
- package/node_modules/openai/lib/embeddings.mjs +55 -0
- package/node_modules/openai/lib/file-processing.js +31 -0
- package/node_modules/openai/lib/file-processing.mjs +28 -0
- package/node_modules/openai/lib/live/transcript-grouper.js +229 -0
- package/node_modules/openai/lib/live/transcript-grouper.mjs +225 -0
- package/node_modules/openai/lib/live/transcript-grouping.js +309 -0
- package/node_modules/openai/lib/live/transcript-grouping.mjs +305 -0
- package/node_modules/openai/lib/live/webrtc.js +16 -0
- package/node_modules/openai/lib/live/webrtc.mjs +10 -0
- package/node_modules/openai/lib/parser.js +142 -42
- package/node_modules/openai/lib/parser.mjs +140 -42
- package/node_modules/openai/lib/polling.js +131 -0
- package/node_modules/openai/lib/polling.mjs +128 -0
- package/node_modules/openai/lib/realtime/webrtc.js +16 -0
- package/node_modules/openai/lib/realtime/webrtc.mjs +10 -0
- package/node_modules/openai/lib/responses/ResponseAccumulator.js +15 -0
- package/node_modules/openai/lib/responses/ResponseAccumulator.mjs +12 -0
- package/node_modules/openai/lib/responses/ResponseInputItems.js +139 -0
- package/node_modules/openai/lib/responses/ResponseInputItems.mjs +135 -0
- package/node_modules/openai/lib/responses/ResponseStream.js +85 -159
- package/node_modules/openai/lib/responses/ResponseStream.mjs +86 -160
- package/node_modules/openai/lib/responses/responses-websocket-lane.js +314 -0
- package/node_modules/openai/lib/responses/responses-websocket-lane.mjs +309 -0
- package/node_modules/openai/lib/responses/responses-websocket-session.js +268 -0
- package/node_modules/openai/lib/responses/responses-websocket-session.mjs +263 -0
- package/node_modules/openai/lib/transform.js +1608 -82
- package/node_modules/openai/lib/transform.mjs +1602 -82
- package/node_modules/openai/lib/vector-store-polling.js +24 -0
- package/node_modules/openai/lib/vector-store-polling.mjs +20 -0
- package/node_modules/openai/lib/vector-store-upload.js +41 -0
- package/node_modules/openai/lib/vector-store-upload.mjs +38 -0
- package/node_modules/openai/lib/webhook-signature.js +125 -0
- package/node_modules/openai/lib/webhook-signature.mjs +121 -0
- package/node_modules/openai/lib/webrtc/connection.js +233 -0
- package/node_modules/openai/lib/webrtc/connection.mjs +229 -0
- package/node_modules/openai/lib/webrtc/data-channel.js +133 -0
- package/node_modules/openai/lib/webrtc/data-channel.mjs +129 -0
- package/node_modules/openai/lib/webrtc/errors.js +18 -0
- package/node_modules/openai/lib/webrtc/errors.mjs +14 -0
- package/node_modules/openai/lib/webrtc/subscriptions.js +64 -0
- package/node_modules/openai/lib/webrtc/subscriptions.mjs +60 -0
- package/node_modules/openai/lib/webrtc/types.js +3 -0
- package/node_modules/openai/lib/webrtc/types.mjs +2 -0
- package/node_modules/openai/live/webrtc.js +8 -0
- package/node_modules/openai/live/webrtc.mjs +2 -0
- package/node_modules/openai/package.json +71 -11
- package/node_modules/openai/providers/bedrock/aws.js +211 -0
- package/node_modules/openai/providers/bedrock/aws.mjs +207 -0
- package/node_modules/openai/providers/bedrock.js +43 -0
- package/node_modules/openai/providers/bedrock.mjs +39 -0
- package/node_modules/openai/realtime/internal-base.js +118 -11
- package/node_modules/openai/realtime/internal-base.mjs +116 -11
- package/node_modules/openai/realtime/webrtc.js +8 -0
- package/node_modules/openai/realtime/webrtc.mjs +2 -0
- package/node_modules/openai/realtime/websocket.js +174 -39
- package/node_modules/openai/realtime/websocket.mjs +175 -40
- package/node_modules/openai/realtime/ws.js +86 -18
- package/node_modules/openai/realtime/ws.mjs +87 -19
- package/node_modules/openai/resources/admin/admin.js +1 -1
- package/node_modules/openai/resources/admin/admin.mjs +1 -1
- package/node_modules/openai/resources/admin/index.js +1 -1
- package/node_modules/openai/resources/admin/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/admin-api-keys.js +1 -1
- package/node_modules/openai/resources/admin/organization/admin-api-keys.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.js +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/certificates.js +1 -1
- package/node_modules/openai/resources/admin/organization/certificates.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/data-retention.js +1 -1
- package/node_modules/openai/resources/admin/organization/data-retention.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/index.js +4 -2
- package/node_modules/openai/resources/admin/organization/index.mjs +2 -1
- package/node_modules/openai/resources/admin/organization/invites.js +1 -1
- package/node_modules/openai/resources/admin/organization/invites.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/organization.js +5 -1
- package/node_modules/openai/resources/admin/organization/organization.mjs +5 -1
- package/node_modules/openai/resources/admin/organization/projects/api-keys.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/api-keys.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/certificates.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/certificates.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/data-retention.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/data-retention.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.js +8 -6
- package/node_modules/openai/resources/admin/organization/projects/index.mjs +3 -2
- package/node_modules/openai/resources/admin/organization/projects/model-permissions.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.js +7 -3
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs +7 -3
- package/node_modules/openai/resources/admin/organization/projects/rate-limits.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.js +26 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.mjs +22 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.js +9 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.mjs +4 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.js +109 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.mjs +104 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.js +3 -98
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs +2 -96
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +20 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs +20 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.js +67 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs +63 -0
- package/node_modules/openai/resources/admin/organization/projects/users/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.js +18 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.mjs +18 -1
- package/node_modules/openai/resources/admin/organization/spend-limit.js +59 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.mjs +55 -0
- package/node_modules/openai/resources/admin/organization/usage.js +1 -1
- package/node_modules/openai/resources/admin/organization/usage.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/users/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/users/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/users/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization.js +1 -1
- package/node_modules/openai/resources/admin/organization.mjs +1 -1
- package/node_modules/openai/resources/admin.js +1 -1
- package/node_modules/openai/resources/admin.mjs +1 -1
- package/node_modules/openai/resources/audio/audio.js +1 -1
- package/node_modules/openai/resources/audio/audio.mjs +1 -1
- package/node_modules/openai/resources/audio/index.js +1 -1
- package/node_modules/openai/resources/audio/index.mjs +1 -1
- package/node_modules/openai/resources/audio/speech.js +1 -1
- package/node_modules/openai/resources/audio/speech.mjs +1 -1
- package/node_modules/openai/resources/audio/transcriptions.js +1 -1
- package/node_modules/openai/resources/audio/transcriptions.mjs +1 -1
- package/node_modules/openai/resources/audio/translations.js +1 -1
- package/node_modules/openai/resources/audio/translations.mjs +1 -1
- package/node_modules/openai/resources/audio.js +1 -1
- package/node_modules/openai/resources/audio.mjs +1 -1
- package/node_modules/openai/resources/batches.js +1 -1
- package/node_modules/openai/resources/batches.mjs +1 -1
- package/node_modules/openai/resources/beta/agents/agents.js +118 -0
- package/node_modules/openai/resources/beta/agents/agents.mjs +113 -0
- package/node_modules/openai/resources/beta/agents/environments/environments.js +43 -0
- package/node_modules/openai/resources/beta/agents/environments/environments.mjs +38 -0
- package/node_modules/openai/resources/beta/agents/environments/files.js +61 -0
- package/node_modules/openai/resources/beta/agents/environments/files.mjs +57 -0
- package/node_modules/openai/resources/beta/agents/environments/index.js +11 -0
- package/node_modules/openai/resources/beta/agents/environments/index.mjs +5 -0
- package/node_modules/openai/resources/beta/agents/environments/templates.js +112 -0
- package/node_modules/openai/resources/beta/agents/environments/templates.mjs +108 -0
- package/node_modules/openai/resources/beta/agents/environments.js +6 -0
- package/node_modules/openai/resources/beta/agents/environments.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/index.js +13 -0
- package/node_modules/openai/resources/beta/agents/index.mjs +6 -0
- package/node_modules/openai/resources/beta/agents/sessions/artifacts.js +106 -0
- package/node_modules/openai/resources/beta/agents/sessions/artifacts.mjs +102 -0
- package/node_modules/openai/resources/beta/agents/sessions/events.js +75 -0
- package/node_modules/openai/resources/beta/agents/sessions/events.mjs +71 -0
- package/node_modules/openai/resources/beta/agents/sessions/index.js +17 -0
- package/node_modules/openai/resources/beta/agents/sessions/index.mjs +8 -0
- package/node_modules/openai/resources/beta/agents/sessions/items.js +35 -0
- package/node_modules/openai/resources/beta/agents/sessions/items.mjs +31 -0
- package/node_modules/openai/resources/beta/agents/sessions/sessions.js +127 -0
- package/node_modules/openai/resources/beta/agents/sessions/sessions.mjs +122 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/index.js +11 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/index.mjs +5 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/items.js +36 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/items.mjs +32 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/subagents.js +67 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/subagents.mjs +62 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/index.js +9 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/index.mjs +4 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/items.js +36 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/items.mjs +32 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/turns.js +68 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/turns.mjs +63 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns.js +6 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents.js +6 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/sessions/turns.js +57 -0
- package/node_modules/openai/resources/beta/agents/sessions/turns.mjs +53 -0
- package/node_modules/openai/resources/beta/agents/sessions.js +6 -0
- package/node_modules/openai/resources/beta/agents/sessions.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/vaults/credentials.js +132 -0
- package/node_modules/openai/resources/beta/agents/vaults/credentials.mjs +128 -0
- package/node_modules/openai/resources/beta/agents/vaults/index.js +9 -0
- package/node_modules/openai/resources/beta/agents/vaults/index.mjs +4 -0
- package/node_modules/openai/resources/beta/agents/vaults/vaults.js +93 -0
- package/node_modules/openai/resources/beta/agents/vaults/vaults.mjs +88 -0
- package/node_modules/openai/resources/beta/agents/vaults.js +6 -0
- package/node_modules/openai/resources/beta/agents/vaults.mjs +3 -0
- package/node_modules/openai/resources/beta/agents.js +6 -0
- package/node_modules/openai/resources/beta/agents.mjs +3 -0
- package/node_modules/openai/resources/beta/assistants.js +1 -1
- package/node_modules/openai/resources/beta/assistants.mjs +1 -1
- package/node_modules/openai/resources/beta/beta.js +9 -1
- package/node_modules/openai/resources/beta/beta.mjs +9 -1
- package/node_modules/openai/resources/beta/chatkit/chatkit.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/chatkit.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit/index.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/index.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit/sessions.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/sessions.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit/threads.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/threads.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit.js +1 -1
- package/node_modules/openai/resources/beta/chatkit.mjs +1 -1
- package/node_modules/openai/resources/beta/index.js +12 -8
- package/node_modules/openai/resources/beta/index.mjs +3 -1
- package/node_modules/openai/resources/beta/realtime/index.js +0 -1
- package/node_modules/openai/resources/beta/realtime/index.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime/realtime.js +0 -1
- package/node_modules/openai/resources/beta/realtime/realtime.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime/sessions.js +0 -1
- package/node_modules/openai/resources/beta/realtime/sessions.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime/transcription-sessions.js +0 -1
- package/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime.js +0 -1
- package/node_modules/openai/resources/beta/realtime.mjs +0 -1
- package/node_modules/openai/resources/beta/responses/index.js +11 -0
- package/node_modules/openai/resources/beta/responses/index.mjs +5 -0
- package/node_modules/openai/resources/beta/responses/input-items.js +37 -0
- package/node_modules/openai/resources/beta/responses/input-items.mjs +33 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.js +34 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.mjs +30 -0
- package/node_modules/openai/resources/beta/responses/internal-base.js +66 -0
- package/node_modules/openai/resources/beta/responses/internal-base.mjs +60 -0
- package/node_modules/openai/resources/beta/responses/responses.js +121 -0
- package/node_modules/openai/resources/beta/responses/responses.mjs +116 -0
- package/node_modules/openai/resources/beta/responses/ws-base.js +566 -0
- package/node_modules/openai/resources/beta/responses/ws-base.mjs +560 -0
- package/node_modules/openai/resources/beta/responses/ws.js +47 -0
- package/node_modules/openai/resources/beta/responses/ws.mjs +42 -0
- package/node_modules/openai/resources/beta/responses.js +6 -0
- package/node_modules/openai/resources/beta/responses.mjs +3 -0
- package/node_modules/openai/resources/beta/threads/index.js +1 -1
- package/node_modules/openai/resources/beta/threads/index.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/messages.js +1 -1
- package/node_modules/openai/resources/beta/threads/messages.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/runs/index.js +1 -1
- package/node_modules/openai/resources/beta/threads/runs/index.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/runs/runs.js +3 -44
- package/node_modules/openai/resources/beta/threads/runs/runs.mjs +3 -44
- package/node_modules/openai/resources/beta/threads/runs/steps.js +1 -1
- package/node_modules/openai/resources/beta/threads/runs/steps.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/runs.js +1 -1
- package/node_modules/openai/resources/beta/threads/runs.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/threads.js +1 -1
- package/node_modules/openai/resources/beta/threads/threads.mjs +1 -1
- package/node_modules/openai/resources/beta/threads.js +1 -1
- package/node_modules/openai/resources/beta/threads.mjs +1 -1
- package/node_modules/openai/resources/beta.js +1 -1
- package/node_modules/openai/resources/beta.mjs +1 -1
- package/node_modules/openai/resources/chat/chat.js +1 -1
- package/node_modules/openai/resources/chat/chat.mjs +1 -1
- package/node_modules/openai/resources/chat/completions/completions.js +2 -5
- package/node_modules/openai/resources/chat/completions/completions.mjs +2 -5
- package/node_modules/openai/resources/chat/completions/index.js +1 -1
- package/node_modules/openai/resources/chat/completions/index.mjs +1 -1
- package/node_modules/openai/resources/chat/completions/messages.js +1 -1
- package/node_modules/openai/resources/chat/completions/messages.mjs +1 -1
- package/node_modules/openai/resources/chat/completions.js +1 -1
- package/node_modules/openai/resources/chat/completions.mjs +1 -1
- package/node_modules/openai/resources/chat/index.js +1 -1
- package/node_modules/openai/resources/chat/index.mjs +1 -1
- package/node_modules/openai/resources/chat.js +1 -1
- package/node_modules/openai/resources/chat.mjs +1 -1
- package/node_modules/openai/resources/completions.js +1 -1
- package/node_modules/openai/resources/completions.mjs +1 -1
- package/node_modules/openai/resources/containers/containers.js +1 -1
- package/node_modules/openai/resources/containers/containers.mjs +1 -1
- package/node_modules/openai/resources/containers/files/content.js +1 -1
- package/node_modules/openai/resources/containers/files/content.mjs +1 -1
- package/node_modules/openai/resources/containers/files/files.js +1 -1
- package/node_modules/openai/resources/containers/files/files.mjs +1 -1
- package/node_modules/openai/resources/containers/files/index.js +1 -1
- package/node_modules/openai/resources/containers/files/index.mjs +1 -1
- package/node_modules/openai/resources/containers/files.js +1 -1
- package/node_modules/openai/resources/containers/files.mjs +1 -1
- package/node_modules/openai/resources/containers/index.js +1 -1
- package/node_modules/openai/resources/containers/index.mjs +1 -1
- package/node_modules/openai/resources/containers.js +1 -1
- package/node_modules/openai/resources/containers.mjs +1 -1
- package/node_modules/openai/resources/content-provenance-checks.js +24 -0
- package/node_modules/openai/resources/content-provenance-checks.mjs +20 -0
- package/node_modules/openai/resources/conversations/conversations.js +1 -1
- package/node_modules/openai/resources/conversations/conversations.mjs +1 -1
- package/node_modules/openai/resources/conversations/index.js +1 -1
- package/node_modules/openai/resources/conversations/index.mjs +1 -1
- package/node_modules/openai/resources/conversations/items.js +1 -1
- package/node_modules/openai/resources/conversations/items.mjs +1 -1
- package/node_modules/openai/resources/conversations.js +1 -1
- package/node_modules/openai/resources/conversations.mjs +1 -1
- package/node_modules/openai/resources/embeddings.js +3 -47
- package/node_modules/openai/resources/embeddings.mjs +3 -47
- package/node_modules/openai/resources/evals/evals.js +2 -2
- package/node_modules/openai/resources/evals/evals.mjs +2 -2
- package/node_modules/openai/resources/evals/index.js +1 -1
- package/node_modules/openai/resources/evals/index.mjs +1 -1
- package/node_modules/openai/resources/evals/runs/index.js +1 -1
- package/node_modules/openai/resources/evals/runs/index.mjs +1 -1
- package/node_modules/openai/resources/evals/runs/output-items.js +1 -1
- package/node_modules/openai/resources/evals/runs/output-items.mjs +1 -1
- package/node_modules/openai/resources/evals/runs/runs.js +1 -1
- package/node_modules/openai/resources/evals/runs/runs.mjs +1 -1
- package/node_modules/openai/resources/evals/runs.js +1 -1
- package/node_modules/openai/resources/evals/runs.mjs +1 -1
- package/node_modules/openai/resources/evals.js +1 -1
- package/node_modules/openai/resources/evals.mjs +1 -1
- package/node_modules/openai/resources/files.js +9 -22
- package/node_modules/openai/resources/files.mjs +9 -22
- package/node_modules/openai/resources/fine-tuning/alpha/alpha.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/graders.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/graders.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +9 -5
- package/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs +9 -5
- package/node_modules/openai/resources/fine-tuning/checkpoints.js +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/fine-tuning.js +1 -1
- package/node_modules/openai/resources/fine-tuning/fine-tuning.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/jobs.js +3 -3
- package/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs +3 -3
- package/node_modules/openai/resources/fine-tuning/jobs.js +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/methods.js +1 -1
- package/node_modules/openai/resources/fine-tuning/methods.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning.js +1 -1
- package/node_modules/openai/resources/fine-tuning.mjs +1 -1
- package/node_modules/openai/resources/graders/grader-models.js +1 -1
- package/node_modules/openai/resources/graders/grader-models.mjs +1 -1
- package/node_modules/openai/resources/graders/graders.js +1 -1
- package/node_modules/openai/resources/graders/graders.mjs +1 -1
- package/node_modules/openai/resources/graders/index.js +1 -1
- package/node_modules/openai/resources/graders/index.mjs +1 -1
- package/node_modules/openai/resources/graders.js +1 -1
- package/node_modules/openai/resources/graders.mjs +1 -1
- package/node_modules/openai/resources/images.js +8 -2
- package/node_modules/openai/resources/images.mjs +8 -2
- package/node_modules/openai/resources/index.js +9 -3
- package/node_modules/openai/resources/index.mjs +5 -2
- package/node_modules/openai/resources/live/forks/forks.js +9 -0
- package/node_modules/openai/resources/live/forks/forks.mjs +5 -0
- package/node_modules/openai/resources/live/forks/index.js +7 -0
- package/node_modules/openai/resources/live/forks/index.mjs +3 -0
- package/node_modules/openai/resources/live/forks/internal-base.js +65 -0
- package/node_modules/openai/resources/live/forks/internal-base.mjs +59 -0
- package/node_modules/openai/resources/live/forks/ws-base.js +547 -0
- package/node_modules/openai/resources/live/forks/ws-base.mjs +543 -0
- package/node_modules/openai/resources/live/forks/ws.js +32 -0
- package/node_modules/openai/resources/live/forks/ws.mjs +27 -0
- package/node_modules/openai/resources/live/forks.js +6 -0
- package/node_modules/openai/resources/live/forks.mjs +3 -0
- package/node_modules/openai/resources/live/index.js +13 -0
- package/node_modules/openai/resources/live/index.mjs +6 -0
- package/node_modules/openai/resources/live/internal-base.js +64 -0
- package/node_modules/openai/resources/live/internal-base.mjs +58 -0
- package/node_modules/openai/resources/live/live.js +40 -0
- package/node_modules/openai/resources/live/live.mjs +35 -0
- package/node_modules/openai/resources/live/sessions.js +124 -0
- package/node_modules/openai/resources/live/sessions.mjs +120 -0
- package/node_modules/openai/resources/live/sideband/index.js +7 -0
- package/node_modules/openai/resources/live/sideband/index.mjs +3 -0
- package/node_modules/openai/resources/live/sideband/internal-base.js +65 -0
- package/node_modules/openai/resources/live/sideband/internal-base.mjs +59 -0
- package/node_modules/openai/resources/live/sideband/sideband.js +9 -0
- package/node_modules/openai/resources/live/sideband/sideband.mjs +5 -0
- package/node_modules/openai/resources/live/sideband/ws-base.js +547 -0
- package/node_modules/openai/resources/live/sideband/ws-base.mjs +543 -0
- package/node_modules/openai/resources/live/sideband/ws.js +32 -0
- package/node_modules/openai/resources/live/sideband/ws.mjs +27 -0
- package/node_modules/openai/resources/live/sideband.js +6 -0
- package/node_modules/openai/resources/live/sideband.mjs +3 -0
- package/node_modules/openai/resources/live/ws-base.js +547 -0
- package/node_modules/openai/resources/live/ws-base.mjs +543 -0
- package/node_modules/openai/resources/live/ws.js +32 -0
- package/node_modules/openai/resources/live/ws.mjs +27 -0
- package/node_modules/openai/resources/live.js +6 -0
- package/node_modules/openai/resources/live.mjs +3 -0
- package/node_modules/openai/resources/models.js +1 -1
- package/node_modules/openai/resources/models.mjs +1 -1
- package/node_modules/openai/resources/moderations.js +3 -2
- package/node_modules/openai/resources/moderations.mjs +3 -2
- package/node_modules/openai/resources/realtime/calls.js +25 -1
- package/node_modules/openai/resources/realtime/calls.mjs +25 -1
- package/node_modules/openai/resources/realtime/client-secrets.js +2 -2
- package/node_modules/openai/resources/realtime/client-secrets.mjs +2 -2
- package/node_modules/openai/resources/realtime/index.js +1 -1
- package/node_modules/openai/resources/realtime/index.mjs +2 -2
- package/node_modules/openai/resources/realtime/realtime.js +1 -1
- package/node_modules/openai/resources/realtime/realtime.mjs +1 -1
- package/node_modules/openai/resources/realtime.js +1 -1
- package/node_modules/openai/resources/realtime.mjs +1 -1
- package/node_modules/openai/resources/responses/index.js +1 -1
- package/node_modules/openai/resources/responses/index.mjs +1 -1
- package/node_modules/openai/resources/responses/input-items.js +1 -1
- package/node_modules/openai/resources/responses/input-items.mjs +1 -1
- package/node_modules/openai/resources/responses/input-tokens.js +1 -1
- package/node_modules/openai/resources/responses/input-tokens.mjs +1 -1
- package/node_modules/openai/resources/responses/internal-base.js +24 -6
- package/node_modules/openai/resources/responses/internal-base.mjs +24 -6
- package/node_modules/openai/resources/responses/responses.js +5 -5
- package/node_modules/openai/resources/responses/responses.mjs +5 -5
- package/node_modules/openai/resources/responses/ws-base.js +115 -23
- package/node_modules/openai/resources/responses/ws-base.mjs +115 -25
- package/node_modules/openai/resources/responses/ws.js +23 -7
- package/node_modules/openai/resources/responses/ws.mjs +23 -7
- package/node_modules/openai/resources/responses.js +1 -1
- package/node_modules/openai/resources/responses.mjs +1 -1
- package/node_modules/openai/resources/safety/alerts.js +16 -0
- package/node_modules/openai/resources/safety/alerts.mjs +12 -0
- package/node_modules/openai/resources/safety/index.js +9 -0
- package/node_modules/openai/resources/safety/index.mjs +4 -0
- package/node_modules/openai/resources/safety/safety.js +17 -0
- package/node_modules/openai/resources/safety/safety.mjs +12 -0
- package/node_modules/openai/resources/safety.js +6 -0
- package/node_modules/openai/resources/safety.mjs +3 -0
- package/node_modules/openai/resources/shared.js +1 -1
- package/node_modules/openai/resources/shared.mjs +1 -1
- package/node_modules/openai/resources/skills/content.js +1 -1
- package/node_modules/openai/resources/skills/content.mjs +1 -1
- package/node_modules/openai/resources/skills/index.js +1 -1
- package/node_modules/openai/resources/skills/index.mjs +1 -1
- package/node_modules/openai/resources/skills/skills.js +4 -2
- package/node_modules/openai/resources/skills/skills.mjs +4 -2
- package/node_modules/openai/resources/skills/versions/content.js +1 -1
- package/node_modules/openai/resources/skills/versions/content.mjs +1 -1
- package/node_modules/openai/resources/skills/versions/index.js +1 -1
- package/node_modules/openai/resources/skills/versions/index.mjs +1 -1
- package/node_modules/openai/resources/skills/versions/versions.js +4 -2
- package/node_modules/openai/resources/skills/versions/versions.mjs +4 -2
- package/node_modules/openai/resources/skills/versions.js +1 -1
- package/node_modules/openai/resources/skills/versions.mjs +1 -1
- package/node_modules/openai/resources/skills.js +1 -1
- package/node_modules/openai/resources/skills.mjs +1 -1
- package/node_modules/openai/resources/uploads/index.js +1 -1
- package/node_modules/openai/resources/uploads/index.mjs +1 -1
- package/node_modules/openai/resources/uploads/parts.js +6 -5
- package/node_modules/openai/resources/uploads/parts.mjs +6 -5
- package/node_modules/openai/resources/uploads/uploads.js +10 -10
- package/node_modules/openai/resources/uploads/uploads.mjs +10 -10
- package/node_modules/openai/resources/uploads.js +1 -1
- package/node_modules/openai/resources/uploads.mjs +1 -1
- package/node_modules/openai/resources/vector-stores/file-batches.js +6 -63
- package/node_modules/openai/resources/vector-stores/file-batches.mjs +6 -63
- package/node_modules/openai/resources/vector-stores/files.js +6 -39
- package/node_modules/openai/resources/vector-stores/files.mjs +6 -39
- package/node_modules/openai/resources/vector-stores/index.js +1 -1
- package/node_modules/openai/resources/vector-stores/index.mjs +1 -1
- package/node_modules/openai/resources/vector-stores/vector-stores.js +1 -1
- package/node_modules/openai/resources/vector-stores/vector-stores.mjs +1 -1
- package/node_modules/openai/resources/vector-stores.js +1 -1
- package/node_modules/openai/resources/vector-stores.mjs +1 -1
- package/node_modules/openai/resources/videos.js +24 -1
- package/node_modules/openai/resources/videos.mjs +24 -1
- package/node_modules/openai/resources/webhooks/event-types.js +21 -0
- package/node_modules/openai/resources/webhooks/event-types.mjs +17 -0
- package/node_modules/openai/resources/webhooks/index.js +4 -1
- package/node_modules/openai/resources/webhooks/index.mjs +2 -1
- package/node_modules/openai/resources/webhooks/webhooks.js +127 -43
- package/node_modules/openai/resources/webhooks/webhooks.mjs +127 -43
- package/node_modules/openai/resources/webhooks.js +1 -1
- package/node_modules/openai/resources/webhooks.mjs +1 -1
- package/node_modules/openai/src/_vendor/partial-json-parser/LICENSE +21 -0
- package/node_modules/openai/src/_vendor/partial-json-parser/README.md +11 -1
- package/node_modules/openai/src/_vendor/partial-json-parser/parser.ts +66 -35
- package/node_modules/openai/src/_vendor/zod-to-json-schema/Options.ts +32 -18
- package/node_modules/openai/src/_vendor/zod-to-json-schema/Refs.ts +7 -6
- package/node_modules/openai/src/_vendor/zod-to-json-schema/errorMessages.ts +5 -3
- package/node_modules/openai/src/_vendor/zod-to-json-schema/index.ts +3 -1
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parseDef.ts +194 -79
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/array.ts +8 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/bigint.ts +20 -12
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/branded.ts +4 -4
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/catch.ts +4 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/date.ts +16 -10
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/default.ts +10 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/effects.ts +4 -3
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/enum.ts +1 -1
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/intersection.ts +12 -9
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/literal.ts +12 -2
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/map.ts +6 -4
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/nativeEnum.ts +10 -11
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/null.ts +4 -3
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/nullable.ts +25 -10
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/number.ts +17 -8
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/object.ts +57 -54
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/optional.ts +25 -17
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/pipeline.ts +8 -6
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/promise.ts +10 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/readonly.ts +4 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/record.ts +22 -19
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/set.ts +6 -4
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/string.ts +62 -37
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/tuple.ts +32 -25
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/union.ts +51 -33
- package/node_modules/openai/src/_vendor/zod-to-json-schema/util.ts +11 -6
- package/node_modules/openai/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +133 -52
- package/node_modules/openai/src/auth/index.ts +7 -1
- package/node_modules/openai/src/auth/subject-token-providers.ts +281 -16
- package/node_modules/openai/src/auth/types.ts +48 -5
- package/node_modules/openai/src/auth/workload-identity-auth.ts +227 -26
- package/node_modules/openai/src/auth/x509-transport.ts +369 -0
- package/node_modules/openai/src/azure.ts +127 -28
- package/node_modules/openai/src/bedrock.ts +294 -0
- package/node_modules/openai/src/beta/realtime/internal-base.ts +136 -16
- package/node_modules/openai/src/beta/realtime/websocket.ts +264 -48
- package/node_modules/openai/src/beta/realtime/ws.ts +138 -25
- package/node_modules/openai/src/client.ts +975 -124
- package/node_modules/openai/src/core/EventEmitter.ts +162 -26
- package/node_modules/openai/src/core/api-promise.ts +0 -2
- package/node_modules/openai/src/core/error.ts +6 -8
- package/node_modules/openai/src/core/pagination.ts +67 -7
- package/node_modules/openai/src/core/resource.ts +0 -2
- package/node_modules/openai/src/core/streaming.ts +490 -100
- package/node_modules/openai/src/core/uploads.ts +6 -1
- package/node_modules/openai/src/helpers/audio.ts +215 -32
- package/node_modules/openai/src/helpers/live.ts +8 -0
- package/node_modules/openai/src/helpers/standard-schema.ts +819 -0
- package/node_modules/openai/src/helpers/zod-v3-strict-schema.ts +520 -0
- package/node_modules/openai/src/helpers/zod.ts +418 -56
- package/node_modules/openai/src/index.ts +4 -5
- package/node_modules/openai/src/internal/assistant-stream-delta.ts +440 -0
- package/node_modules/openai/src/internal/auth/x509-api-origin.ts +27 -0
- package/node_modules/openai/src/internal/auth/x509-credential-options.ts +149 -0
- package/node_modules/openai/src/internal/auth/x509-token-exchange.ts +319 -0
- package/node_modules/openai/src/internal/auth/x509-transport-capability.ts +227 -0
- package/node_modules/openai/src/internal/auth/x509-transport-registry.ts +127 -0
- package/node_modules/openai/src/internal/auth/x509-transport-state-browser.ts +43 -0
- package/node_modules/openai/src/internal/auth/x509-transport-state.cts +43 -0
- package/node_modules/openai/src/internal/auth/x509-workload-identity-auth.ts +972 -0
- package/node_modules/openai/src/internal/bedrock.ts +586 -0
- package/node_modules/openai/src/internal/builtin-types.ts +0 -2
- package/node_modules/openai/src/internal/data-residency.ts +44 -0
- package/node_modules/openai/src/internal/decoders/line.ts +145 -61
- package/node_modules/openai/src/internal/detect-platform.ts +3 -5
- package/node_modules/openai/src/internal/errors.ts +3 -4
- package/node_modules/openai/src/internal/headers.ts +14 -10
- package/node_modules/openai/src/internal/multipart-encoding.ts +53 -0
- package/node_modules/openai/src/internal/parse.ts +47 -19
- package/node_modules/openai/src/internal/provider.ts +92 -0
- package/node_modules/openai/src/internal/qs/formats.ts +1 -1
- package/node_modules/openai/src/internal/qs/stringify.ts +57 -53
- package/node_modules/openai/src/internal/qs/types.ts +1 -1
- package/node_modules/openai/src/internal/qs/utils.ts +443 -54
- package/node_modules/openai/src/internal/realtime-credentials.ts +27 -0
- package/node_modules/openai/src/internal/request-options.ts +52 -3
- package/node_modules/openai/src/internal/responses/canonical-output-text.ts +160 -0
- package/node_modules/openai/src/internal/responses/output-text-index.ts +84 -0
- package/node_modules/openai/src/internal/responses/response-accumulator.ts +1263 -0
- package/node_modules/openai/src/internal/shim-types.ts +3 -4
- package/node_modules/openai/src/internal/shims.ts +0 -2
- package/node_modules/openai/src/internal/stream-utils.ts +37 -5
- package/node_modules/openai/src/internal/to-file.ts +90 -35
- package/node_modules/openai/src/internal/types.ts +21 -29
- package/node_modules/openai/src/internal/uploads.ts +533 -59
- package/node_modules/openai/src/internal/utils/abort.ts +116 -0
- package/node_modules/openai/src/internal/utils/base64.ts +3 -2
- package/node_modules/openai/src/internal/utils/bytes.ts +7 -0
- package/node_modules/openai/src/internal/utils/env.ts +9 -7
- package/node_modules/openai/src/internal/utils/log.ts +77 -14
- package/node_modules/openai/src/internal/utils/path.ts +53 -32
- package/node_modules/openai/src/internal/utils/query.ts +0 -2
- package/node_modules/openai/src/internal/utils/sleep.ts +51 -2
- package/node_modules/openai/src/internal/utils/uuid.ts +0 -2
- package/node_modules/openai/src/internal/utils/values.ts +0 -2
- package/node_modules/openai/src/internal/utils.ts +0 -2
- package/node_modules/openai/src/internal/ws-adapter-browser.ts +83 -24
- package/node_modules/openai/src/internal/ws-adapter-node.ts +105 -26
- package/node_modules/openai/src/internal/ws-adapter.ts +23 -0
- package/node_modules/openai/src/internal/ws.ts +250 -51
- package/node_modules/openai/src/lib/.keep +2 -2
- package/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +349 -102
- package/node_modules/openai/src/lib/AssistantStream.ts +537 -268
- package/node_modules/openai/src/lib/ChatCompletionRunner.ts +75 -22
- package/node_modules/openai/src/lib/ChatCompletionStream.ts +2016 -268
- package/node_modules/openai/src/lib/ChatCompletionStreamingRunner.ts +115 -17
- package/node_modules/openai/src/lib/EventEmitter.ts +171 -26
- package/node_modules/openai/src/lib/EventStream.ts +1979 -64
- package/node_modules/openai/src/lib/ResponsesParser.ts +153 -56
- package/node_modules/openai/src/lib/RunnableFunction.ts +99 -37
- package/node_modules/openai/src/lib/Util.ts +7 -5
- package/node_modules/openai/src/lib/agents/agent-session-stream.ts +328 -0
- package/node_modules/openai/src/lib/agents/output-text.ts +6 -0
- package/node_modules/openai/src/lib/agents/turn-state.ts +61 -0
- package/node_modules/openai/src/lib/assistant-run-polling.ts +27 -0
- package/node_modules/openai/src/lib/chatCompletionUtils.ts +9 -10
- package/node_modules/openai/src/lib/embeddings.ts +73 -0
- package/node_modules/openai/src/lib/file-processing.ts +37 -0
- package/node_modules/openai/src/lib/jsonschema.ts +77 -34
- package/node_modules/openai/src/lib/live/transcript-grouper.ts +307 -0
- package/node_modules/openai/src/lib/live/transcript-grouping.ts +394 -0
- package/node_modules/openai/src/lib/live/webrtc.ts +23 -0
- package/node_modules/openai/src/lib/parser.ts +247 -69
- package/node_modules/openai/src/lib/polling.ts +145 -0
- package/node_modules/openai/src/lib/realtime/webrtc.ts +20 -0
- package/node_modules/openai/src/lib/responses/EventTypes.ts +9 -60
- package/node_modules/openai/src/lib/responses/ResponseAccumulator.ts +27 -0
- package/node_modules/openai/src/lib/responses/ResponseInputItems.ts +167 -0
- package/node_modules/openai/src/lib/responses/ResponseStream.ts +135 -179
- package/node_modules/openai/src/lib/responses/responses-websocket-lane.ts +388 -0
- package/node_modules/openai/src/lib/responses/responses-websocket-session.ts +317 -0
- package/node_modules/openai/src/lib/transform.ts +2015 -100
- package/node_modules/openai/src/lib/vector-store-polling.ts +46 -0
- package/node_modules/openai/src/lib/vector-store-upload.ts +57 -0
- package/node_modules/openai/src/lib/webhook-signature.ts +164 -0
- package/node_modules/openai/src/lib/webrtc/connection.ts +313 -0
- package/node_modules/openai/src/lib/webrtc/data-channel.ts +151 -0
- package/node_modules/openai/src/lib/webrtc/errors.ts +38 -0
- package/node_modules/openai/src/lib/webrtc/subscriptions.ts +65 -0
- package/node_modules/openai/src/lib/webrtc/types.ts +110 -0
- package/node_modules/openai/src/live/webrtc.ts +10 -0
- package/node_modules/openai/src/providers/bedrock/aws.ts +331 -0
- package/node_modules/openai/src/providers/bedrock.ts +51 -0
- package/node_modules/openai/src/realtime/internal-base.ts +265 -17
- package/node_modules/openai/src/realtime/webrtc.ts +10 -0
- package/node_modules/openai/src/realtime/websocket.ts +259 -54
- package/node_modules/openai/src/realtime/ws.ts +135 -29
- package/node_modules/openai/src/resources/admin/admin.ts +1 -1
- package/node_modules/openai/src/resources/admin/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/admin-api-keys.ts +18 -2
- package/node_modules/openai/src/resources/admin/organization/audit-logs.ts +327 -4
- package/node_modules/openai/src/resources/admin/organization/certificates.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/data-retention.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/index.ts +9 -1
- package/node_modules/openai/src/resources/admin/organization/invites.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/organization.ts +21 -1
- package/node_modules/openai/src/resources/admin/organization/projects/api-keys.ts +22 -2
- package/node_modules/openai/src/resources/admin/organization/projects/certificates.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/data-retention.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/hosted-tool-permissions.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/index.ts +10 -2
- package/node_modules/openai/src/resources/admin/organization/projects/model-permissions.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/projects.ts +70 -19
- package/node_modules/openai/src/resources/admin/organization/projects/rate-limits.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/api-keys.ts +91 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/index.ts +15 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +299 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts.ts +2 -265
- package/node_modules/openai/src/resources/admin/organization/projects/spend-alerts.ts +33 -1
- package/node_modules/openai/src/resources/admin/organization/projects/spend-limit.ts +156 -0
- package/node_modules/openai/src/resources/admin/organization/projects/users/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/users/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/users/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/spend-alerts.ts +19 -1
- package/node_modules/openai/src/resources/admin/organization/spend-limit.ts +144 -0
- package/node_modules/openai/src/resources/admin/organization/usage.ts +706 -89
- package/node_modules/openai/src/resources/admin/organization/users/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/users/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/users/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization.ts +1 -1
- package/node_modules/openai/src/resources/admin.ts +1 -1
- package/node_modules/openai/src/resources/audio/audio.ts +4 -1
- package/node_modules/openai/src/resources/audio/index.ts +2 -1
- package/node_modules/openai/src/resources/audio/speech.ts +4 -3
- package/node_modules/openai/src/resources/audio/transcriptions.ts +51 -13
- package/node_modules/openai/src/resources/audio/translations.ts +5 -3
- package/node_modules/openai/src/resources/audio.ts +1 -1
- package/node_modules/openai/src/resources/batches.ts +10 -9
- package/node_modules/openai/src/resources/beta/agents/agents.ts +4627 -0
- package/node_modules/openai/src/resources/beta/agents/environments/environments.ts +111 -0
- package/node_modules/openai/src/resources/beta/agents/environments/files.ts +169 -0
- package/node_modules/openai/src/resources/beta/agents/environments/index.ts +19 -0
- package/node_modules/openai/src/resources/beta/agents/environments/templates.ts +535 -0
- package/node_modules/openai/src/resources/beta/agents/environments.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/index.ts +127 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/artifacts.ts +249 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/events.ts +94 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/index.ts +24 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/items.ts +59 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/sessions.ts +403 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/index.ts +5 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/items.ts +65 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/subagents.ts +113 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns/index.ts +4 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns/items.ts +70 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns/turns.ts +111 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/turns.ts +159 -0
- package/node_modules/openai/src/resources/beta/agents/sessions.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/vaults/credentials.ts +693 -0
- package/node_modules/openai/src/resources/beta/agents/vaults/index.ts +29 -0
- package/node_modules/openai/src/resources/beta/agents/vaults/vaults.ts +243 -0
- package/node_modules/openai/src/resources/beta/agents/vaults.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents.ts +3 -0
- package/node_modules/openai/src/resources/beta/assistants.ts +154 -172
- package/node_modules/openai/src/resources/beta/beta.ts +578 -3
- package/node_modules/openai/src/resources/beta/chatkit/chatkit.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit/index.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit/sessions.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit/threads.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit.ts +1 -1
- package/node_modules/openai/src/resources/beta/index.ts +290 -1
- package/node_modules/openai/src/resources/beta/realtime/index.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime/realtime.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime/sessions.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime/transcription-sessions.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime.ts +0 -2
- package/node_modules/openai/src/resources/beta/responses/index.ts +189 -0
- package/node_modules/openai/src/resources/beta/responses/input-items.ts +105 -0
- package/node_modules/openai/src/resources/beta/responses/input-tokens.ts +249 -0
- package/node_modules/openai/src/resources/beta/responses/internal-base.ts +136 -0
- package/node_modules/openai/src/resources/beta/responses/responses.ts +15060 -0
- package/node_modules/openai/src/resources/beta/responses/ws-base.ts +729 -0
- package/node_modules/openai/src/resources/beta/responses/ws.ts +62 -0
- package/node_modules/openai/src/resources/beta/responses.ts +3 -0
- package/node_modules/openai/src/resources/beta/threads/index.ts +1 -1
- package/node_modules/openai/src/resources/beta/threads/messages.ts +30 -24
- package/node_modules/openai/src/resources/beta/threads/runs/index.ts +2 -2
- package/node_modules/openai/src/resources/beta/threads/runs/runs.ts +47 -93
- package/node_modules/openai/src/resources/beta/threads/runs/steps.ts +15 -16
- package/node_modules/openai/src/resources/beta/threads/runs.ts +1 -1
- package/node_modules/openai/src/resources/beta/threads/threads.ts +54 -51
- package/node_modules/openai/src/resources/beta/threads.ts +1 -1
- package/node_modules/openai/src/resources/beta.ts +1 -1
- package/node_modules/openai/src/resources/chat/chat.ts +1 -1
- package/node_modules/openai/src/resources/chat/completions/completions.ts +762 -108
- package/node_modules/openai/src/resources/chat/completions/index.ts +1 -1
- package/node_modules/openai/src/resources/chat/completions/messages.ts +1 -1
- package/node_modules/openai/src/resources/chat/completions.ts +1 -1
- package/node_modules/openai/src/resources/chat/index.ts +1 -1
- package/node_modules/openai/src/resources/chat.ts +1 -1
- package/node_modules/openai/src/resources/completions.ts +36 -15
- package/node_modules/openai/src/resources/containers/containers.ts +1 -1
- package/node_modules/openai/src/resources/containers/files/content.ts +1 -1
- package/node_modules/openai/src/resources/containers/files/files.ts +1 -1
- package/node_modules/openai/src/resources/containers/files/index.ts +1 -1
- package/node_modules/openai/src/resources/containers/files.ts +1 -1
- package/node_modules/openai/src/resources/containers/index.ts +1 -1
- package/node_modules/openai/src/resources/containers.ts +1 -1
- package/node_modules/openai/src/resources/content-provenance-checks.ts +132 -0
- package/node_modules/openai/src/resources/conversations/conversations.ts +23 -2
- package/node_modules/openai/src/resources/conversations/index.ts +1 -1
- package/node_modules/openai/src/resources/conversations/items.ts +93 -5
- package/node_modules/openai/src/resources/conversations.ts +1 -1
- package/node_modules/openai/src/resources/embeddings.ts +22 -49
- package/node_modules/openai/src/resources/evals/evals.ts +6 -6
- package/node_modules/openai/src/resources/evals/index.ts +1 -1
- package/node_modules/openai/src/resources/evals/runs/index.ts +1 -1
- package/node_modules/openai/src/resources/evals/runs/output-items.ts +1 -1
- package/node_modules/openai/src/resources/evals/runs/runs.ts +119 -191
- package/node_modules/openai/src/resources/evals/runs.ts +1 -1
- package/node_modules/openai/src/resources/evals.ts +1 -1
- package/node_modules/openai/src/resources/files.ts +9 -26
- package/node_modules/openai/src/resources/fine-tuning/alpha/alpha.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/alpha/graders.ts +6 -5
- package/node_modules/openai/src/resources/fine-tuning/alpha/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/alpha.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/checkpoints/checkpoints.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/checkpoints/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/checkpoints/permissions.ts +9 -5
- package/node_modules/openai/src/resources/fine-tuning/checkpoints.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/fine-tuning.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/jobs/checkpoints.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/jobs/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/jobs/jobs.ts +14 -13
- package/node_modules/openai/src/resources/fine-tuning/jobs.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/methods.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning.ts +1 -1
- package/node_modules/openai/src/resources/graders/grader-models.ts +7 -14
- package/node_modules/openai/src/resources/graders/graders.ts +1 -1
- package/node_modules/openai/src/resources/graders/index.ts +1 -1
- package/node_modules/openai/src/resources/graders.ts +1 -1
- package/node_modules/openai/src/resources/images.ts +100 -85
- package/node_modules/openai/src/resources/index.ts +9 -2
- package/node_modules/openai/src/resources/live/api.md +87 -0
- package/node_modules/openai/src/resources/live/forks/forks.ts +169 -0
- package/node_modules/openai/src/resources/live/forks/index.ts +5 -0
- package/node_modules/openai/src/resources/live/forks/internal-base.ts +126 -0
- package/node_modules/openai/src/resources/live/forks/ws-base.ts +700 -0
- package/node_modules/openai/src/resources/live/forks/ws.ts +47 -0
- package/node_modules/openai/src/resources/live/forks.ts +3 -0
- package/node_modules/openai/src/resources/live/index.ts +20 -0
- package/node_modules/openai/src/resources/live/internal-base.ts +123 -0
- package/node_modules/openai/src/resources/live/live.ts +2296 -0
- package/node_modules/openai/src/resources/live/sessions.ts +343 -0
- package/node_modules/openai/src/resources/live/sideband/index.ts +10 -0
- package/node_modules/openai/src/resources/live/sideband/internal-base.ts +126 -0
- package/node_modules/openai/src/resources/live/sideband/sideband.ts +58 -0
- package/node_modules/openai/src/resources/live/sideband/ws-base.ts +710 -0
- package/node_modules/openai/src/resources/live/sideband/ws.ts +47 -0
- package/node_modules/openai/src/resources/live/sideband.ts +3 -0
- package/node_modules/openai/src/resources/live/ws-base.ts +696 -0
- package/node_modules/openai/src/resources/live/ws.ts +43 -0
- package/node_modules/openai/src/resources/live.ts +3 -0
- package/node_modules/openai/src/resources/models.ts +6 -1
- package/node_modules/openai/src/resources/moderations.ts +6 -5
- package/node_modules/openai/src/resources/realtime/api.md +1 -0
- package/node_modules/openai/src/resources/realtime/calls.ts +50 -2
- package/node_modules/openai/src/resources/realtime/client-secrets.ts +27 -10
- package/node_modules/openai/src/resources/realtime/index.ts +8 -2
- package/node_modules/openai/src/resources/realtime/realtime.ts +93 -35
- package/node_modules/openai/src/resources/realtime.ts +1 -1
- package/node_modules/openai/src/resources/responses/api.md +20 -0
- package/node_modules/openai/src/resources/responses/index.ts +1 -1
- package/node_modules/openai/src/resources/responses/input-items.ts +1 -1
- package/node_modules/openai/src/resources/responses/input-tokens.ts +26 -16
- package/node_modules/openai/src/resources/responses/internal-base.ts +33 -14
- package/node_modules/openai/src/resources/responses/responses.ts +4150 -792
- package/node_modules/openai/src/resources/responses/ws-base.ts +147 -31
- package/node_modules/openai/src/resources/responses/ws.ts +33 -9
- package/node_modules/openai/src/resources/responses.ts +1 -1
- package/node_modules/openai/src/resources/safety/alerts.ts +51 -0
- package/node_modules/openai/src/resources/safety/index.ts +4 -0
- package/node_modules/openai/src/resources/safety/safety.ts +15 -0
- package/node_modules/openai/src/resources/safety.ts +3 -0
- package/node_modules/openai/src/resources/shared.ts +98 -41
- package/node_modules/openai/src/resources/skills/content.ts +1 -1
- package/node_modules/openai/src/resources/skills/index.ts +1 -1
- package/node_modules/openai/src/resources/skills/skills.ts +4 -2
- package/node_modules/openai/src/resources/skills/versions/content.ts +1 -1
- package/node_modules/openai/src/resources/skills/versions/index.ts +1 -1
- package/node_modules/openai/src/resources/skills/versions/versions.ts +4 -2
- package/node_modules/openai/src/resources/skills/versions.ts +1 -1
- package/node_modules/openai/src/resources/skills.ts +1 -1
- package/node_modules/openai/src/resources/uploads/index.ts +1 -1
- package/node_modules/openai/src/resources/uploads/parts.ts +6 -5
- package/node_modules/openai/src/resources/uploads/uploads.ts +12 -12
- package/node_modules/openai/src/resources/uploads.ts +1 -1
- package/node_modules/openai/src/resources/vector-stores/file-batches.ts +24 -89
- package/node_modules/openai/src/resources/vector-stores/files.ts +12 -52
- package/node_modules/openai/src/resources/vector-stores/index.ts +1 -1
- package/node_modules/openai/src/resources/vector-stores/vector-stores.ts +4 -4
- package/node_modules/openai/src/resources/vector-stores.ts +1 -1
- package/node_modules/openai/src/resources/videos.ts +63 -2
- package/node_modules/openai/src/resources/webhooks/api.md +40 -17
- package/node_modules/openai/src/resources/webhooks/event-types.ts +21 -0
- package/node_modules/openai/src/resources/webhooks/index.ts +2 -1
- package/node_modules/openai/src/resources/webhooks/webhooks.ts +694 -69
- package/node_modules/openai/src/resources/webhooks.ts +1 -1
- package/node_modules/openai/src/tsconfig.json +6 -3
- package/node_modules/openai/src/version.ts +2 -1
- package/node_modules/openai/version.js +2 -1
- package/node_modules/openai/version.mjs +2 -1
- package/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +0 -832
- package/node_modules/@earendil-works/pi-ai/dist/images-models.js +0 -143
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +0 -22
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/LICENSE +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/README.md +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -0
- /package/node_modules/@earendil-works/pi-ai/dist/{auth/oauth → utils}/oauth-page.js +0 -0
|
@@ -1,80 +1,162 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _LineDecoder_buffer,
|
|
2
|
+
var _LineDecoder_instances, _LineDecoder_buffer, _LineDecoder_start, _LineDecoder_end, _LineDecoder_searchIndex, _LineDecoder_skipLeadingLF, _LineDecoder_append;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.LineDecoder = void 0;
|
|
5
5
|
exports.findDoubleNewlineIndex = findDoubleNewlineIndex;
|
|
6
6
|
const tslib_1 = require("../tslib.js");
|
|
7
7
|
const bytes_1 = require("../utils/bytes.js");
|
|
8
|
+
/** Maximum backing-buffer capacity retained when completed lines leave little active data. */
|
|
9
|
+
const MAX_RETAINED_BUFFER_BYTES = 64 * 1024;
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
+
* Incrementally decodes UTF-8 text into lines without losing partial characters
|
|
12
|
+
* or newline sequences that span multiple chunks.
|
|
11
13
|
*
|
|
14
|
+
* Supports `\n`, `\r`, and `\r\n` line endings. Call {@link flush} after the
|
|
15
|
+
* final chunk to emit a trailing line that does not end with a newline.
|
|
16
|
+
*
|
|
17
|
+
* Based on the line decoder used by the Python `httpx` project:
|
|
12
18
|
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
|
13
19
|
*/
|
|
14
20
|
class LineDecoder {
|
|
21
|
+
/** Creates a decoder with no buffered bytes or pending newline continuation. */
|
|
15
22
|
constructor() {
|
|
23
|
+
_LineDecoder_instances.add(this);
|
|
16
24
|
_LineDecoder_buffer.set(this, void 0);
|
|
17
|
-
|
|
25
|
+
_LineDecoder_start.set(this, void 0);
|
|
26
|
+
_LineDecoder_end.set(this, void 0);
|
|
27
|
+
_LineDecoder_searchIndex.set(this, void 0);
|
|
28
|
+
_LineDecoder_skipLeadingLF.set(this, void 0);
|
|
18
29
|
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f");
|
|
19
|
-
tslib_1.__classPrivateFieldSet(this,
|
|
30
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
31
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_end, 0, "f");
|
|
32
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_searchIndex, 0, "f");
|
|
33
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, false, "f");
|
|
20
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Appends a text or UTF-8 byte chunk and returns every newly completed line.
|
|
37
|
+
*
|
|
38
|
+
* Incomplete lines remain buffered for the next call. A trailing `\r`
|
|
39
|
+
* completes its line immediately, and a following `\n` is consumed as its
|
|
40
|
+
* continuation. `null` and `undefined` are ignored and do not flush buffered
|
|
41
|
+
* content.
|
|
42
|
+
*/
|
|
21
43
|
decode(chunk) {
|
|
22
44
|
if (chunk == null) {
|
|
23
45
|
return [];
|
|
24
46
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
47
|
+
let binaryChunk;
|
|
48
|
+
if (chunk instanceof ArrayBuffer) {
|
|
49
|
+
binaryChunk = new Uint8Array(chunk);
|
|
50
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- The line decoder accepts both text and binary chunks and must select the matching decoding path.
|
|
51
|
+
}
|
|
52
|
+
else if (typeof chunk === 'string') {
|
|
53
|
+
binaryChunk = (0, bytes_1.encodeUTF8)(chunk);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
binaryChunk = chunk;
|
|
57
|
+
}
|
|
58
|
+
if (binaryChunk.length === 0) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_skipLeadingLF, "f")) {
|
|
62
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, false, "f");
|
|
63
|
+
if (binaryChunk[0] === 0x0a) {
|
|
64
|
+
binaryChunk = binaryChunk.subarray(1);
|
|
65
|
+
}
|
|
66
|
+
if (binaryChunk.length === 0) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
tslib_1.__classPrivateFieldGet(this, _LineDecoder_instances, "m", _LineDecoder_append).call(this, binaryChunk);
|
|
29
71
|
const lines = [];
|
|
30
72
|
let patternIndex;
|
|
31
|
-
while ((patternIndex = findNewlineIndex(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), tslib_1.__classPrivateFieldGet(this,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
73
|
+
while ((patternIndex = findNewlineIndex(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_searchIndex, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f"))) != null) {
|
|
74
|
+
const line = (0, bytes_1.decodeUTF8)(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f"), patternIndex.preceding));
|
|
75
|
+
lines.push(line);
|
|
76
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_start, patternIndex.index, "f");
|
|
77
|
+
if (patternIndex.carriage) {
|
|
78
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f") < tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f") && tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f")[tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f")] === 0x0a) {
|
|
79
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_start, tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f") + 1, "f");
|
|
80
|
+
}
|
|
81
|
+
else if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f") === tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f")) {
|
|
82
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, true, "f");
|
|
83
|
+
}
|
|
36
84
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
85
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_searchIndex, tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f"), "f");
|
|
86
|
+
}
|
|
87
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_searchIndex, tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f"), "f");
|
|
88
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f") === tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f")) {
|
|
89
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
90
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_end, 0, "f");
|
|
91
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_searchIndex, 0, "f");
|
|
92
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length > MAX_RETAINED_BUFFER_BYTES) {
|
|
93
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else if (lines.length > 0 && tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length > MAX_RETAINED_BUFFER_BYTES) {
|
|
97
|
+
const length = tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f") - tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f");
|
|
98
|
+
if (length <= MAX_RETAINED_BUFFER_BYTES || tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length > length * 4) {
|
|
99
|
+
const capacity = length <= MAX_RETAINED_BUFFER_BYTES
|
|
100
|
+
? Math.min(Math.max(length * 2, 256), MAX_RETAINED_BUFFER_BYTES)
|
|
101
|
+
: length * 2;
|
|
102
|
+
const buffer = new Uint8Array(capacity);
|
|
103
|
+
buffer.set(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f")));
|
|
104
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, buffer, "f");
|
|
105
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
106
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_end, length, "f");
|
|
107
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_searchIndex, length, "f");
|
|
44
108
|
}
|
|
45
|
-
const endIndex = tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
46
|
-
const line = (0, bytes_1.decodeUTF8)(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex));
|
|
47
|
-
lines.push(line);
|
|
48
|
-
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f");
|
|
49
|
-
tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
|
50
109
|
}
|
|
51
110
|
return lines;
|
|
52
111
|
}
|
|
112
|
+
/** Emits the remaining unterminated line, or returns an empty array when idle. */
|
|
53
113
|
flush() {
|
|
54
|
-
|
|
114
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, false, "f");
|
|
115
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f") === tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f")) {
|
|
55
116
|
return [];
|
|
56
117
|
}
|
|
57
118
|
return this.decode('\n');
|
|
58
119
|
}
|
|
59
120
|
}
|
|
60
121
|
exports.LineDecoder = LineDecoder;
|
|
61
|
-
_LineDecoder_buffer = new WeakMap(),
|
|
122
|
+
_LineDecoder_buffer = new WeakMap(), _LineDecoder_start = new WeakMap(), _LineDecoder_end = new WeakMap(), _LineDecoder_searchIndex = new WeakMap(), _LineDecoder_skipLeadingLF = new WeakMap(), _LineDecoder_instances = new WeakSet(), _LineDecoder_append = function _LineDecoder_append(chunk) {
|
|
123
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f") + chunk.length > tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
|
124
|
+
const length = tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f") - tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f");
|
|
125
|
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f") >= tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length / 2 && length + chunk.length <= tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
|
126
|
+
tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").copyWithin(0, tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f"));
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
const capacity = Math.max(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length * 2, length + chunk.length, 256);
|
|
130
|
+
const buffer = new Uint8Array(capacity);
|
|
131
|
+
buffer.set(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f")));
|
|
132
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, buffer, "f");
|
|
133
|
+
}
|
|
134
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_searchIndex, tslib_1.__classPrivateFieldGet(this, _LineDecoder_searchIndex, "f") - tslib_1.__classPrivateFieldGet(this, _LineDecoder_start, "f"), "f");
|
|
135
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_end, length, "f");
|
|
136
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
137
|
+
}
|
|
138
|
+
tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").set(chunk, tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f"));
|
|
139
|
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_end, tslib_1.__classPrivateFieldGet(this, _LineDecoder_end, "f") + chunk.length, "f");
|
|
140
|
+
};
|
|
62
141
|
// prettier-ignore
|
|
142
|
+
/** Individual characters recognized as possible line terminators. */
|
|
63
143
|
LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r']);
|
|
144
|
+
/** Matches complete CRLF terminators as well as standalone CR and LF characters. */
|
|
64
145
|
LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
65
146
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
147
|
+
* Searches the active buffer range for the next CR or LF byte and returns its
|
|
148
|
+
* zero-based position, the position immediately after it, and whether the byte
|
|
149
|
+
* was a carriage return. Returns `null` when the range contains no newline byte.
|
|
69
150
|
*
|
|
70
151
|
* ```ts
|
|
71
|
-
*
|
|
152
|
+
* findNewlineIndex(new TextEncoder().encode('abc\ndef'), 0, 7)
|
|
153
|
+
* // => { preceding: 3, index: 4, carriage: false }
|
|
72
154
|
* ```
|
|
73
155
|
*/
|
|
74
|
-
function findNewlineIndex(buffer,
|
|
156
|
+
function findNewlineIndex(buffer, start, end) {
|
|
75
157
|
const newline = 0x0a; // \n
|
|
76
158
|
const carriage = 0x0d; // \r
|
|
77
|
-
for (let i =
|
|
159
|
+
for (let i = start; i < end; i++) {
|
|
78
160
|
if (buffer[i] === newline) {
|
|
79
161
|
return { preceding: i, index: i + 1, carriage: false };
|
|
80
162
|
}
|
|
@@ -84,30 +166,34 @@ function findNewlineIndex(buffer, startIndex) {
|
|
|
84
166
|
}
|
|
85
167
|
return null;
|
|
86
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Finds the first blank-line separator used to delimit streamed event records.
|
|
171
|
+
*
|
|
172
|
+
* @returns The byte offset immediately after the first pair of consecutive
|
|
173
|
+
* line endings, or `-1` when the buffer contains no complete separator.
|
|
174
|
+
*/
|
|
87
175
|
function findDoubleNewlineIndex(buffer) {
|
|
88
|
-
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
|
89
|
-
// and returns the index right after the first occurrence of any pattern,
|
|
90
|
-
// or -1 if none of the patterns are found.
|
|
91
|
-
const newline = 0x0a; // \n
|
|
92
|
-
const carriage = 0x0d; // \r
|
|
93
176
|
for (let i = 0; i < buffer.length - 1; i++) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
if (buffer[i] === carriage &&
|
|
103
|
-
buffer[i + 1] === newline &&
|
|
104
|
-
i + 3 < buffer.length &&
|
|
105
|
-
buffer[i + 2] === carriage &&
|
|
106
|
-
buffer[i + 3] === newline) {
|
|
107
|
-
// \r\n\r\n
|
|
108
|
-
return i + 4;
|
|
177
|
+
const firstEndingLength = lineEndingLength(buffer, i);
|
|
178
|
+
if (firstEndingLength > 0) {
|
|
179
|
+
const secondEndingIndex = i + firstEndingLength;
|
|
180
|
+
const secondEndingLength = lineEndingLength(buffer, secondEndingIndex);
|
|
181
|
+
if (secondEndingLength > 0) {
|
|
182
|
+
return secondEndingIndex + secondEndingLength;
|
|
183
|
+
}
|
|
109
184
|
}
|
|
110
185
|
}
|
|
111
186
|
return -1;
|
|
112
187
|
}
|
|
188
|
+
function lineEndingLength(buffer, index) {
|
|
189
|
+
const newline = 0x0a; // \n
|
|
190
|
+
const carriage = 0x0d; // \r
|
|
191
|
+
if (buffer[index] === newline) {
|
|
192
|
+
return 1;
|
|
193
|
+
}
|
|
194
|
+
if (buffer[index] === carriage) {
|
|
195
|
+
return buffer[index + 1] === newline ? 2 : 1;
|
|
196
|
+
}
|
|
197
|
+
return 0;
|
|
198
|
+
}
|
|
113
199
|
//# sourceMappingURL=line.js.map
|
|
@@ -1,75 +1,157 @@
|
|
|
1
|
-
var _LineDecoder_buffer,
|
|
1
|
+
var _LineDecoder_instances, _LineDecoder_buffer, _LineDecoder_start, _LineDecoder_end, _LineDecoder_searchIndex, _LineDecoder_skipLeadingLF, _LineDecoder_append;
|
|
2
2
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from "../tslib.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { decodeUTF8, encodeUTF8 } from "../utils/bytes.mjs";
|
|
4
|
+
/** Maximum backing-buffer capacity retained when completed lines leave little active data. */
|
|
5
|
+
const MAX_RETAINED_BUFFER_BYTES = 64 * 1024;
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* Incrementally decodes UTF-8 text into lines without losing partial characters
|
|
8
|
+
* or newline sequences that span multiple chunks.
|
|
7
9
|
*
|
|
10
|
+
* Supports `\n`, `\r`, and `\r\n` line endings. Call {@link flush} after the
|
|
11
|
+
* final chunk to emit a trailing line that does not end with a newline.
|
|
12
|
+
*
|
|
13
|
+
* Based on the line decoder used by the Python `httpx` project:
|
|
8
14
|
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
|
9
15
|
*/
|
|
10
16
|
export class LineDecoder {
|
|
17
|
+
/** Creates a decoder with no buffered bytes or pending newline continuation. */
|
|
11
18
|
constructor() {
|
|
19
|
+
_LineDecoder_instances.add(this);
|
|
12
20
|
_LineDecoder_buffer.set(this, void 0);
|
|
13
|
-
|
|
21
|
+
_LineDecoder_start.set(this, void 0);
|
|
22
|
+
_LineDecoder_end.set(this, void 0);
|
|
23
|
+
_LineDecoder_searchIndex.set(this, void 0);
|
|
24
|
+
_LineDecoder_skipLeadingLF.set(this, void 0);
|
|
14
25
|
__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f");
|
|
15
|
-
__classPrivateFieldSet(this,
|
|
26
|
+
__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
27
|
+
__classPrivateFieldSet(this, _LineDecoder_end, 0, "f");
|
|
28
|
+
__classPrivateFieldSet(this, _LineDecoder_searchIndex, 0, "f");
|
|
29
|
+
__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, false, "f");
|
|
16
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Appends a text or UTF-8 byte chunk and returns every newly completed line.
|
|
33
|
+
*
|
|
34
|
+
* Incomplete lines remain buffered for the next call. A trailing `\r`
|
|
35
|
+
* completes its line immediately, and a following `\n` is consumed as its
|
|
36
|
+
* continuation. `null` and `undefined` are ignored and do not flush buffered
|
|
37
|
+
* content.
|
|
38
|
+
*/
|
|
17
39
|
decode(chunk) {
|
|
18
40
|
if (chunk == null) {
|
|
19
41
|
return [];
|
|
20
42
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
43
|
+
let binaryChunk;
|
|
44
|
+
if (chunk instanceof ArrayBuffer) {
|
|
45
|
+
binaryChunk = new Uint8Array(chunk);
|
|
46
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- The line decoder accepts both text and binary chunks and must select the matching decoding path.
|
|
47
|
+
}
|
|
48
|
+
else if (typeof chunk === 'string') {
|
|
49
|
+
binaryChunk = encodeUTF8(chunk);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
binaryChunk = chunk;
|
|
53
|
+
}
|
|
54
|
+
if (binaryChunk.length === 0) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
if (__classPrivateFieldGet(this, _LineDecoder_skipLeadingLF, "f")) {
|
|
58
|
+
__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, false, "f");
|
|
59
|
+
if (binaryChunk[0] === 0x0a) {
|
|
60
|
+
binaryChunk = binaryChunk.subarray(1);
|
|
61
|
+
}
|
|
62
|
+
if (binaryChunk.length === 0) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
__classPrivateFieldGet(this, _LineDecoder_instances, "m", _LineDecoder_append).call(this, binaryChunk);
|
|
25
67
|
const lines = [];
|
|
26
68
|
let patternIndex;
|
|
27
|
-
while ((patternIndex = findNewlineIndex(__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), __classPrivateFieldGet(this,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
69
|
+
while ((patternIndex = findNewlineIndex(__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), __classPrivateFieldGet(this, _LineDecoder_searchIndex, "f"), __classPrivateFieldGet(this, _LineDecoder_end, "f"))) != null) {
|
|
70
|
+
const line = decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(__classPrivateFieldGet(this, _LineDecoder_start, "f"), patternIndex.preceding));
|
|
71
|
+
lines.push(line);
|
|
72
|
+
__classPrivateFieldSet(this, _LineDecoder_start, patternIndex.index, "f");
|
|
73
|
+
if (patternIndex.carriage) {
|
|
74
|
+
if (__classPrivateFieldGet(this, _LineDecoder_start, "f") < __classPrivateFieldGet(this, _LineDecoder_end, "f") && __classPrivateFieldGet(this, _LineDecoder_buffer, "f")[__classPrivateFieldGet(this, _LineDecoder_start, "f")] === 0x0a) {
|
|
75
|
+
__classPrivateFieldSet(this, _LineDecoder_start, __classPrivateFieldGet(this, _LineDecoder_start, "f") + 1, "f");
|
|
76
|
+
}
|
|
77
|
+
else if (__classPrivateFieldGet(this, _LineDecoder_start, "f") === __classPrivateFieldGet(this, _LineDecoder_end, "f")) {
|
|
78
|
+
__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, true, "f");
|
|
79
|
+
}
|
|
32
80
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
81
|
+
__classPrivateFieldSet(this, _LineDecoder_searchIndex, __classPrivateFieldGet(this, _LineDecoder_start, "f"), "f");
|
|
82
|
+
}
|
|
83
|
+
__classPrivateFieldSet(this, _LineDecoder_searchIndex, __classPrivateFieldGet(this, _LineDecoder_end, "f"), "f");
|
|
84
|
+
if (__classPrivateFieldGet(this, _LineDecoder_start, "f") === __classPrivateFieldGet(this, _LineDecoder_end, "f")) {
|
|
85
|
+
__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
86
|
+
__classPrivateFieldSet(this, _LineDecoder_end, 0, "f");
|
|
87
|
+
__classPrivateFieldSet(this, _LineDecoder_searchIndex, 0, "f");
|
|
88
|
+
if (__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length > MAX_RETAINED_BUFFER_BYTES) {
|
|
89
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (lines.length > 0 && __classPrivateFieldGet(this, _LineDecoder_buffer, "f").length > MAX_RETAINED_BUFFER_BYTES) {
|
|
93
|
+
const length = __classPrivateFieldGet(this, _LineDecoder_end, "f") - __classPrivateFieldGet(this, _LineDecoder_start, "f");
|
|
94
|
+
if (length <= MAX_RETAINED_BUFFER_BYTES || __classPrivateFieldGet(this, _LineDecoder_buffer, "f").length > length * 4) {
|
|
95
|
+
const capacity = length <= MAX_RETAINED_BUFFER_BYTES
|
|
96
|
+
? Math.min(Math.max(length * 2, 256), MAX_RETAINED_BUFFER_BYTES)
|
|
97
|
+
: length * 2;
|
|
98
|
+
const buffer = new Uint8Array(capacity);
|
|
99
|
+
buffer.set(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(__classPrivateFieldGet(this, _LineDecoder_start, "f"), __classPrivateFieldGet(this, _LineDecoder_end, "f")));
|
|
100
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, buffer, "f");
|
|
101
|
+
__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
102
|
+
__classPrivateFieldSet(this, _LineDecoder_end, length, "f");
|
|
103
|
+
__classPrivateFieldSet(this, _LineDecoder_searchIndex, length, "f");
|
|
40
104
|
}
|
|
41
|
-
const endIndex = __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
42
|
-
const line = decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex));
|
|
43
|
-
lines.push(line);
|
|
44
|
-
__classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f");
|
|
45
|
-
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
|
46
105
|
}
|
|
47
106
|
return lines;
|
|
48
107
|
}
|
|
108
|
+
/** Emits the remaining unterminated line, or returns an empty array when idle. */
|
|
49
109
|
flush() {
|
|
50
|
-
|
|
110
|
+
__classPrivateFieldSet(this, _LineDecoder_skipLeadingLF, false, "f");
|
|
111
|
+
if (__classPrivateFieldGet(this, _LineDecoder_start, "f") === __classPrivateFieldGet(this, _LineDecoder_end, "f")) {
|
|
51
112
|
return [];
|
|
52
113
|
}
|
|
53
114
|
return this.decode('\n');
|
|
54
115
|
}
|
|
55
116
|
}
|
|
56
|
-
_LineDecoder_buffer = new WeakMap(),
|
|
117
|
+
_LineDecoder_buffer = new WeakMap(), _LineDecoder_start = new WeakMap(), _LineDecoder_end = new WeakMap(), _LineDecoder_searchIndex = new WeakMap(), _LineDecoder_skipLeadingLF = new WeakMap(), _LineDecoder_instances = new WeakSet(), _LineDecoder_append = function _LineDecoder_append(chunk) {
|
|
118
|
+
if (__classPrivateFieldGet(this, _LineDecoder_end, "f") + chunk.length > __classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
|
119
|
+
const length = __classPrivateFieldGet(this, _LineDecoder_end, "f") - __classPrivateFieldGet(this, _LineDecoder_start, "f");
|
|
120
|
+
if (__classPrivateFieldGet(this, _LineDecoder_start, "f") >= __classPrivateFieldGet(this, _LineDecoder_buffer, "f").length / 2 && length + chunk.length <= __classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
|
121
|
+
__classPrivateFieldGet(this, _LineDecoder_buffer, "f").copyWithin(0, __classPrivateFieldGet(this, _LineDecoder_start, "f"), __classPrivateFieldGet(this, _LineDecoder_end, "f"));
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
const capacity = Math.max(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length * 2, length + chunk.length, 256);
|
|
125
|
+
const buffer = new Uint8Array(capacity);
|
|
126
|
+
buffer.set(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(__classPrivateFieldGet(this, _LineDecoder_start, "f"), __classPrivateFieldGet(this, _LineDecoder_end, "f")));
|
|
127
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, buffer, "f");
|
|
128
|
+
}
|
|
129
|
+
__classPrivateFieldSet(this, _LineDecoder_searchIndex, __classPrivateFieldGet(this, _LineDecoder_searchIndex, "f") - __classPrivateFieldGet(this, _LineDecoder_start, "f"), "f");
|
|
130
|
+
__classPrivateFieldSet(this, _LineDecoder_end, length, "f");
|
|
131
|
+
__classPrivateFieldSet(this, _LineDecoder_start, 0, "f");
|
|
132
|
+
}
|
|
133
|
+
__classPrivateFieldGet(this, _LineDecoder_buffer, "f").set(chunk, __classPrivateFieldGet(this, _LineDecoder_end, "f"));
|
|
134
|
+
__classPrivateFieldSet(this, _LineDecoder_end, __classPrivateFieldGet(this, _LineDecoder_end, "f") + chunk.length, "f");
|
|
135
|
+
};
|
|
57
136
|
// prettier-ignore
|
|
137
|
+
/** Individual characters recognized as possible line terminators. */
|
|
58
138
|
LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r']);
|
|
139
|
+
/** Matches complete CRLF terminators as well as standalone CR and LF characters. */
|
|
59
140
|
LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
60
141
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
142
|
+
* Searches the active buffer range for the next CR or LF byte and returns its
|
|
143
|
+
* zero-based position, the position immediately after it, and whether the byte
|
|
144
|
+
* was a carriage return. Returns `null` when the range contains no newline byte.
|
|
64
145
|
*
|
|
65
146
|
* ```ts
|
|
66
|
-
*
|
|
147
|
+
* findNewlineIndex(new TextEncoder().encode('abc\ndef'), 0, 7)
|
|
148
|
+
* // => { preceding: 3, index: 4, carriage: false }
|
|
67
149
|
* ```
|
|
68
150
|
*/
|
|
69
|
-
function findNewlineIndex(buffer,
|
|
151
|
+
function findNewlineIndex(buffer, start, end) {
|
|
70
152
|
const newline = 0x0a; // \n
|
|
71
153
|
const carriage = 0x0d; // \r
|
|
72
|
-
for (let i =
|
|
154
|
+
for (let i = start; i < end; i++) {
|
|
73
155
|
if (buffer[i] === newline) {
|
|
74
156
|
return { preceding: i, index: i + 1, carriage: false };
|
|
75
157
|
}
|
|
@@ -79,30 +161,34 @@ function findNewlineIndex(buffer, startIndex) {
|
|
|
79
161
|
}
|
|
80
162
|
return null;
|
|
81
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Finds the first blank-line separator used to delimit streamed event records.
|
|
166
|
+
*
|
|
167
|
+
* @returns The byte offset immediately after the first pair of consecutive
|
|
168
|
+
* line endings, or `-1` when the buffer contains no complete separator.
|
|
169
|
+
*/
|
|
82
170
|
export function findDoubleNewlineIndex(buffer) {
|
|
83
|
-
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
|
84
|
-
// and returns the index right after the first occurrence of any pattern,
|
|
85
|
-
// or -1 if none of the patterns are found.
|
|
86
|
-
const newline = 0x0a; // \n
|
|
87
|
-
const carriage = 0x0d; // \r
|
|
88
171
|
for (let i = 0; i < buffer.length - 1; i++) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
if (buffer[i] === carriage &&
|
|
98
|
-
buffer[i + 1] === newline &&
|
|
99
|
-
i + 3 < buffer.length &&
|
|
100
|
-
buffer[i + 2] === carriage &&
|
|
101
|
-
buffer[i + 3] === newline) {
|
|
102
|
-
// \r\n\r\n
|
|
103
|
-
return i + 4;
|
|
172
|
+
const firstEndingLength = lineEndingLength(buffer, i);
|
|
173
|
+
if (firstEndingLength > 0) {
|
|
174
|
+
const secondEndingIndex = i + firstEndingLength;
|
|
175
|
+
const secondEndingLength = lineEndingLength(buffer, secondEndingIndex);
|
|
176
|
+
if (secondEndingLength > 0) {
|
|
177
|
+
return secondEndingIndex + secondEndingLength;
|
|
178
|
+
}
|
|
104
179
|
}
|
|
105
180
|
}
|
|
106
181
|
return -1;
|
|
107
182
|
}
|
|
183
|
+
function lineEndingLength(buffer, index) {
|
|
184
|
+
const newline = 0x0a; // \n
|
|
185
|
+
const carriage = 0x0d; // \r
|
|
186
|
+
if (buffer[index] === newline) {
|
|
187
|
+
return 1;
|
|
188
|
+
}
|
|
189
|
+
if (buffer[index] === carriage) {
|
|
190
|
+
return buffer[index + 1] === newline ? 2 : 1;
|
|
191
|
+
}
|
|
192
|
+
return 0;
|
|
193
|
+
}
|
|
108
194
|
//# sourceMappingURL=line.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.getPlatformHeaders = exports.isRunningInBrowser = void 0;
|
|
5
4
|
const version_1 = require("../version.js");
|
|
@@ -37,7 +36,7 @@ const getPlatformProperties = () => {
|
|
|
37
36
|
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
38
37
|
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
39
38
|
'X-Stainless-Runtime': 'deno',
|
|
40
|
-
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
39
|
+
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : (Deno.version?.deno ?? 'unknown'),
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
if (typeof EdgeRuntime !== 'undefined') {
|
|
@@ -47,7 +46,7 @@ const getPlatformProperties = () => {
|
|
|
47
46
|
'X-Stainless-OS': 'Unknown',
|
|
48
47
|
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
49
48
|
'X-Stainless-Runtime': 'edge',
|
|
50
|
-
'X-Stainless-Runtime-Version': globalThis.process
|
|
49
|
+
'X-Stainless-Runtime-Version': globalThis.process?.version ?? 'unknown',
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
52
|
// Check if Node.js
|
|
@@ -89,7 +88,7 @@ function getBrowserInfo() {
|
|
|
89
88
|
}
|
|
90
89
|
// NOTE: The order matters here!
|
|
91
90
|
const browserPatterns = [
|
|
92
|
-
{ key: 'edge', pattern:
|
|
91
|
+
{ key: 'edge', pattern: /\bEdg(?:e|A|iOS)?\b(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
93
92
|
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
94
93
|
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
95
94
|
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
1
|
import { VERSION } from "../version.mjs";
|
|
3
2
|
export const isRunningInBrowser = () => {
|
|
4
3
|
return (
|
|
@@ -33,7 +32,7 @@ const getPlatformProperties = () => {
|
|
|
33
32
|
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
34
33
|
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
35
34
|
'X-Stainless-Runtime': 'deno',
|
|
36
|
-
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
35
|
+
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : (Deno.version?.deno ?? 'unknown'),
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
38
|
if (typeof EdgeRuntime !== 'undefined') {
|
|
@@ -43,7 +42,7 @@ const getPlatformProperties = () => {
|
|
|
43
42
|
'X-Stainless-OS': 'Unknown',
|
|
44
43
|
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
45
44
|
'X-Stainless-Runtime': 'edge',
|
|
46
|
-
'X-Stainless-Runtime-Version': globalThis.process
|
|
45
|
+
'X-Stainless-Runtime-Version': globalThis.process?.version ?? 'unknown',
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
48
|
// Check if Node.js
|
|
@@ -85,7 +84,7 @@ function getBrowserInfo() {
|
|
|
85
84
|
}
|
|
86
85
|
// NOTE: The order matters here!
|
|
87
86
|
const browserPatterns = [
|
|
88
|
-
{ key: 'edge', pattern:
|
|
87
|
+
{ key: 'edge', pattern: /\bEdg(?:e|A|iOS)?\b(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
89
88
|
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
90
89
|
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
91
90
|
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.castToError = void 0;
|
|
5
4
|
exports.isAbortError = isAbortError;
|
|
@@ -17,12 +16,13 @@ const castToError = (err) => {
|
|
|
17
16
|
if (typeof err === 'object' && err !== null) {
|
|
18
17
|
try {
|
|
19
18
|
if (Object.prototype.toString.call(err) === '[object Error]') {
|
|
19
|
+
const hasCause = 'cause' in err;
|
|
20
20
|
// @ts-ignore - not all envs have native support for cause yet
|
|
21
|
-
const error = new Error(err.message,
|
|
21
|
+
const error = new Error(err.message, hasCause ? { cause: err.cause } : {});
|
|
22
22
|
if (err.stack)
|
|
23
23
|
error.stack = err.stack;
|
|
24
24
|
// @ts-ignore - not all envs have native support for cause yet
|
|
25
|
-
if (
|
|
25
|
+
if (hasCause && !Object.prototype.hasOwnProperty.call(error, 'cause'))
|
|
26
26
|
error.cause = err.cause;
|
|
27
27
|
if (err.name)
|
|
28
28
|
error.name = err.name;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
1
|
export function isAbortError(err) {
|
|
3
2
|
return (typeof err === 'object' &&
|
|
4
3
|
err !== null &&
|
|
@@ -13,12 +12,13 @@ export const castToError = (err) => {
|
|
|
13
12
|
if (typeof err === 'object' && err !== null) {
|
|
14
13
|
try {
|
|
15
14
|
if (Object.prototype.toString.call(err) === '[object Error]') {
|
|
15
|
+
const hasCause = 'cause' in err;
|
|
16
16
|
// @ts-ignore - not all envs have native support for cause yet
|
|
17
|
-
const error = new Error(err.message,
|
|
17
|
+
const error = new Error(err.message, hasCause ? { cause: err.cause } : {});
|
|
18
18
|
if (err.stack)
|
|
19
19
|
error.stack = err.stack;
|
|
20
20
|
// @ts-ignore - not all envs have native support for cause yet
|
|
21
|
-
if (
|
|
21
|
+
if (hasCause && !Object.prototype.hasOwnProperty.call(error, 'cause'))
|
|
22
22
|
error.cause = err.cause;
|
|
23
23
|
if (err.name)
|
|
24
24
|
error.name = err.name;
|