@warlock.js/core 4.7.0 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/esm/config/config-getter.mjs +5 -5
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-loader.mjs +2 -2
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/connectors/access-connector.mjs +2 -2
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.mjs +3 -3
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/cache-connector.mjs +2 -2
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/database-connector.mjs +2 -2
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/herald-connector.mjs +2 -2
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.mjs +7 -7
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/logger-connector.mjs +2 -2
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.mjs +2 -2
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.mjs +2 -2
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/socket-connector.mjs +3 -3
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/http/config.mjs +2 -2
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/createHttpApplication.mjs +2 -2
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +5 -5
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +2 -2
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +4 -4
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/plugins.mjs +9 -9
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/response.mjs +5 -5
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/server.mjs +4 -4
- package/esm/http/server.mjs.map +1 -1
- package/esm/utils/paths.mjs +2 -2
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/validation/validateAll.mjs +2 -2
- package/esm/validation/validateAll.mjs.map +1 -1
- package/package.json +12 -9
- package/esm/ai/src/agent/agent-input-builder.mjs +0 -133
- package/esm/ai/src/agent/agent-input-builder.mjs.map +0 -1
- package/esm/ai/src/agent/agent-log-event.mjs +0 -101
- package/esm/ai/src/agent/agent-log-event.mjs.map +0 -1
- package/esm/ai/src/agent/agent-stream.mjs +0 -82
- package/esm/ai/src/agent/agent-stream.mjs.map +0 -1
- package/esm/ai/src/agent/agent-to-stream-event.mjs +0 -86
- package/esm/ai/src/agent/agent-to-stream-event.mjs.map +0 -1
- package/esm/ai/src/agent/agent.mjs +0 -1276
- package/esm/ai/src/agent/agent.mjs.map +0 -1
- package/esm/ai/src/agent/index.mjs +0 -5
- package/esm/ai/src/agent/json-stream-guard.mjs +0 -400
- package/esm/ai/src/agent/json-stream-guard.mjs.map +0 -1
- package/esm/ai/src/agent/signature.mjs +0 -57
- package/esm/ai/src/agent/signature.mjs.map +0 -1
- package/esm/ai/src/agent/snapshot.mjs +0 -101
- package/esm/ai/src/agent/snapshot.mjs.map +0 -1
- package/esm/ai/src/agent/spawn-sub-agent.mjs +0 -68
- package/esm/ai/src/agent/spawn-sub-agent.mjs.map +0 -1
- package/esm/ai/src/ai.mjs +0 -191
- package/esm/ai/src/ai.mjs.map +0 -1
- package/esm/ai/src/batch/batch.mjs +0 -198
- package/esm/ai/src/batch/batch.mjs.map +0 -1
- package/esm/ai/src/batch/index.mjs +0 -3
- package/esm/ai/src/batch/run-batch-item.mjs +0 -100
- package/esm/ai/src/batch/run-batch-item.mjs.map +0 -1
- package/esm/ai/src/batch/run-with-concurrency.mjs +0 -39
- package/esm/ai/src/batch/run-with-concurrency.mjs.map +0 -1
- package/esm/ai/src/checkpoint/memory.mjs +0 -0
- package/esm/ai/src/checkpoint/memory.mjs.map +0 -1
- package/esm/ai/src/checkpoint/pg.mjs +0 -265
- package/esm/ai/src/checkpoint/pg.mjs.map +0 -1
- package/esm/ai/src/checkpoint/redis.mjs +0 -200
- package/esm/ai/src/checkpoint/redis.mjs.map +0 -1
- package/esm/ai/src/config.mjs +0 -59
- package/esm/ai/src/config.mjs.map +0 -1
- package/esm/ai/src/contracts/end.type.mjs +0 -47
- package/esm/ai/src/contracts/end.type.mjs.map +0 -1
- package/esm/ai/src/errors/agent-cancelled-error.mjs +0 -43
- package/esm/ai/src/errors/agent-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/agent-drift-error.mjs +0 -31
- package/esm/ai/src/errors/agent-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/agent-execution-error.mjs +0 -35
- package/esm/ai/src/errors/agent-execution-error.mjs.map +0 -1
- package/esm/ai/src/errors/agent-max-trips-error.mjs +0 -41
- package/esm/ai/src/errors/agent-max-trips-error.mjs.map +0 -1
- package/esm/ai/src/errors/ai-error.mjs +0 -68
- package/esm/ai/src/errors/ai-error.mjs.map +0 -1
- package/esm/ai/src/errors/budget-exceeded-error.mjs +0 -31
- package/esm/ai/src/errors/budget-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/content-filter-error.mjs +0 -28
- package/esm/ai/src/errors/content-filter-error.mjs.map +0 -1
- package/esm/ai/src/errors/context-length-exceeded-error.mjs +0 -31
- package/esm/ai/src/errors/context-length-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/guardrail-violation-error.mjs +0 -41
- package/esm/ai/src/errors/guardrail-violation-error.mjs.map +0 -1
- package/esm/ai/src/errors/index.mjs +0 -40
- package/esm/ai/src/errors/invalid-request-error.mjs +0 -31
- package/esm/ai/src/errors/invalid-request-error.mjs.map +0 -1
- package/esm/ai/src/errors/max-iterations-error.mjs +0 -32
- package/esm/ai/src/errors/max-iterations-error.mjs.map +0 -1
- package/esm/ai/src/errors/max-steps-exceeded-error.mjs +0 -21
- package/esm/ai/src/errors/max-steps-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-cancelled-error.mjs +0 -31
- package/esm/ai/src/errors/orchestrator-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-config-error.mjs +0 -30
- package/esm/ai/src/errors/orchestrator-config-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-drift-error.mjs +0 -37
- package/esm/ai/src/errors/orchestrator-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/orchestrator-failed-error.mjs +0 -36
- package/esm/ai/src/errors/orchestrator-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/outbound-policy-error.mjs +0 -32
- package/esm/ai/src/errors/outbound-policy-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-cancelled-error.mjs +0 -29
- package/esm/ai/src/errors/planner-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-drift-error.mjs +0 -33
- package/esm/ai/src/errors/planner-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-failed-error.mjs +0 -37
- package/esm/ai/src/errors/planner-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/planner-plan-invalid-error.mjs +0 -25
- package/esm/ai/src/errors/planner-plan-invalid-error.mjs.map +0 -1
- package/esm/ai/src/errors/prompt-refinement-error.mjs +0 -27
- package/esm/ai/src/errors/prompt-refinement-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-auth-error.mjs +0 -26
- package/esm/ai/src/errors/provider-auth-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-error.mjs +0 -42
- package/esm/ai/src/errors/provider-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-rate-limit-error.mjs +0 -31
- package/esm/ai/src/errors/provider-rate-limit-error.mjs.map +0 -1
- package/esm/ai/src/errors/provider-timeout-error.mjs +0 -26
- package/esm/ai/src/errors/provider-timeout-error.mjs.map +0 -1
- package/esm/ai/src/errors/quota-exceeded-error.mjs +0 -40
- package/esm/ai/src/errors/quota-exceeded-error.mjs.map +0 -1
- package/esm/ai/src/errors/routing-error.mjs +0 -23
- package/esm/ai/src/errors/routing-error.mjs.map +0 -1
- package/esm/ai/src/errors/schema-validation-error.mjs +0 -37
- package/esm/ai/src/errors/schema-validation-error.mjs.map +0 -1
- package/esm/ai/src/errors/step-failed-error.mjs +0 -19
- package/esm/ai/src/errors/step-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-cancelled-error.mjs +0 -29
- package/esm/ai/src/errors/supervisor-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-drift-error.mjs +0 -30
- package/esm/ai/src/errors/supervisor-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-failed-error.mjs +0 -43
- package/esm/ai/src/errors/supervisor-failed-error.mjs.map +0 -1
- package/esm/ai/src/errors/supervisor-routing-error.mjs +0 -39
- package/esm/ai/src/errors/supervisor-routing-error.mjs.map +0 -1
- package/esm/ai/src/errors/tool-execution-error.mjs +0 -32
- package/esm/ai/src/errors/tool-execution-error.mjs.map +0 -1
- package/esm/ai/src/errors/workflow-cancelled-error.mjs +0 -23
- package/esm/ai/src/errors/workflow-cancelled-error.mjs.map +0 -1
- package/esm/ai/src/errors/workflow-drift-error.mjs +0 -24
- package/esm/ai/src/errors/workflow-drift-error.mjs.map +0 -1
- package/esm/ai/src/errors/workflow-error.mjs +0 -18
- package/esm/ai/src/errors/workflow-error.mjs.map +0 -1
- package/esm/ai/src/eval/dataset.mjs +0 -112
- package/esm/ai/src/eval/dataset.mjs.map +0 -1
- package/esm/ai/src/eval/eval-runner.mjs +0 -135
- package/esm/ai/src/eval/eval-runner.mjs.map +0 -1
- package/esm/ai/src/eval/index.mjs +0 -48
- package/esm/ai/src/eval/index.mjs.map +0 -1
- package/esm/ai/src/eval/judge-scorer.mjs +0 -87
- package/esm/ai/src/eval/judge-scorer.mjs.map +0 -1
- package/esm/ai/src/eval/regression.mjs +0 -51
- package/esm/ai/src/eval/regression.mjs.map +0 -1
- package/esm/ai/src/eval/report-json.mjs +0 -33
- package/esm/ai/src/eval/report-json.mjs.map +0 -1
- package/esm/ai/src/eval/report-junit.mjs +0 -60
- package/esm/ai/src/eval/report-junit.mjs.map +0 -1
- package/esm/ai/src/eval/scorers.mjs +0 -101
- package/esm/ai/src/eval/scorers.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/index.mjs +0 -6
- package/esm/ai/src/guard/detectors/injection.mjs +0 -254
- package/esm/ai/src/guard/detectors/injection.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/moderation.mjs +0 -134
- package/esm/ai/src/guard/detectors/moderation.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/pii.mjs +0 -199
- package/esm/ai/src/guard/detectors/pii.mjs.map +0 -1
- package/esm/ai/src/guard/detectors/topic.mjs +0 -99
- package/esm/ai/src/guard/detectors/topic.mjs.map +0 -1
- package/esm/ai/src/guard/errors.mjs +0 -18
- package/esm/ai/src/guard/errors.mjs.map +0 -1
- package/esm/ai/src/guard/guard.mjs +0 -209
- package/esm/ai/src/guard/guard.mjs.map +0 -1
- package/esm/ai/src/guard/guardrail.mjs +0 -22
- package/esm/ai/src/guard/guardrail.mjs.map +0 -1
- package/esm/ai/src/human/errors.mjs +0 -60
- package/esm/ai/src/human/errors.mjs.map +0 -1
- package/esm/ai/src/human/human-approval.mjs +0 -170
- package/esm/ai/src/human/human-approval.mjs.map +0 -1
- package/esm/ai/src/human/policy.mjs +0 -67
- package/esm/ai/src/human/policy.mjs.map +0 -1
- package/esm/ai/src/human/register.mjs +0 -37
- package/esm/ai/src/human/register.mjs.map +0 -1
- package/esm/ai/src/human/resume-seed.mjs +0 -53
- package/esm/ai/src/human/resume-seed.mjs.map +0 -1
- package/esm/ai/src/human/resume.mjs +0 -121
- package/esm/ai/src/human/resume.mjs.map +0 -1
- package/esm/ai/src/human/stores/index.mjs +0 -5
- package/esm/ai/src/human/stores/memory.mjs +0 -91
- package/esm/ai/src/human/stores/memory.mjs.map +0 -1
- package/esm/ai/src/human/stores/pg.mjs +0 -220
- package/esm/ai/src/human/stores/pg.mjs.map +0 -1
- package/esm/ai/src/human/stores/redis.mjs +0 -201
- package/esm/ai/src/human/stores/redis.mjs.map +0 -1
- package/esm/ai/src/image/image-cost.mjs +0 -55
- package/esm/ai/src/image/image-cost.mjs.map +0 -1
- package/esm/ai/src/image/image.mjs +0 -112
- package/esm/ai/src/image/image.mjs.map +0 -1
- package/esm/ai/src/image/index.mjs +0 -4
- package/esm/ai/src/index.mjs +0 -196
- package/esm/ai/src/memory/derive-id.mjs +0 -24
- package/esm/ai/src/memory/derive-id.mjs.map +0 -1
- package/esm/ai/src/memory/episodic-memory.mjs +0 -106
- package/esm/ai/src/memory/episodic-memory.mjs.map +0 -1
- package/esm/ai/src/memory/memory.mjs +0 -166
- package/esm/ai/src/memory/memory.mjs.map +0 -1
- package/esm/ai/src/memory/procedural-memory.mjs +0 -103
- package/esm/ai/src/memory/procedural-memory.mjs.map +0 -1
- package/esm/ai/src/memory/semantic-memory.mjs +0 -80
- package/esm/ai/src/memory/semantic-memory.mjs.map +0 -1
- package/esm/ai/src/memory/working-memory.mjs +0 -62
- package/esm/ai/src/memory/working-memory.mjs.map +0 -1
- package/esm/ai/src/middleware/builtins/budget.mjs +0 -219
- package/esm/ai/src/middleware/builtins/budget.mjs.map +0 -1
- package/esm/ai/src/middleware/builtins/guardrail.mjs +0 -76
- package/esm/ai/src/middleware/builtins/guardrail.mjs.map +0 -1
- package/esm/ai/src/middleware/builtins/semantic-cache.mjs +0 -149
- package/esm/ai/src/middleware/builtins/semantic-cache.mjs.map +0 -1
- package/esm/ai/src/middleware/helpers/compose.mjs +0 -52
- package/esm/ai/src/middleware/helpers/compose.mjs.map +0 -1
- package/esm/ai/src/middleware/helpers/for-tool.mjs +0 -80
- package/esm/ai/src/middleware/helpers/for-tool.mjs.map +0 -1
- package/esm/ai/src/middleware/index.mjs +0 -10
- package/esm/ai/src/middleware/pipeline.mjs +0 -100
- package/esm/ai/src/middleware/pipeline.mjs.map +0 -1
- package/esm/ai/src/middleware/utils/extract-user-text.mjs +0 -47
- package/esm/ai/src/middleware/utils/extract-user-text.mjs.map +0 -1
- package/esm/ai/src/middleware/utils/namespaced-state.mjs +0 -60
- package/esm/ai/src/middleware/utils/namespaced-state.mjs.map +0 -1
- package/esm/ai/src/mock/index.mjs +0 -4
- package/esm/ai/src/mock/mock-agent.mjs +0 -3
- package/esm/ai/src/mock/mock-router.mjs +0 -58
- package/esm/ai/src/mock/mock-router.mjs.map +0 -1
- package/esm/ai/src/model/fallback-model.mjs +0 -218
- package/esm/ai/src/model/fallback-model.mjs.map +0 -1
- package/esm/ai/src/model/index.mjs +0 -3
- package/esm/ai/src/object-stream/index.mjs +0 -4
- package/esm/ai/src/object-stream/parse-partial-json.mjs +0 -78
- package/esm/ai/src/object-stream/parse-partial-json.mjs.map +0 -1
- package/esm/ai/src/object-stream/stream-object.mjs +0 -97
- package/esm/ai/src/object-stream/stream-object.mjs.map +0 -1
- package/esm/ai/src/observe/index.mjs +0 -4
- package/esm/ai/src/observe/observer-registry.mjs +0 -35
- package/esm/ai/src/observe/observer-registry.mjs.map +0 -1
- package/esm/ai/src/observe/resolve-observers.mjs +0 -73
- package/esm/ai/src/observe/resolve-observers.mjs.map +0 -1
- package/esm/ai/src/orchestrator/as-tool.mjs +0 -98
- package/esm/ai/src/orchestrator/as-tool.mjs.map +0 -1
- package/esm/ai/src/orchestrator/checkpoint.mjs +0 -75
- package/esm/ai/src/orchestrator/checkpoint.mjs.map +0 -1
- package/esm/ai/src/orchestrator/commands.mjs +0 -34
- package/esm/ai/src/orchestrator/commands.mjs.map +0 -1
- package/esm/ai/src/orchestrator/compaction.mjs +0 -206
- package/esm/ai/src/orchestrator/compaction.mjs.map +0 -1
- package/esm/ai/src/orchestrator/dispatch.mjs +0 -171
- package/esm/ai/src/orchestrator/dispatch.mjs.map +0 -1
- package/esm/ai/src/orchestrator/emitter.mjs +0 -85
- package/esm/ai/src/orchestrator/emitter.mjs.map +0 -1
- package/esm/ai/src/orchestrator/execution.mjs +0 -395
- package/esm/ai/src/orchestrator/execution.mjs.map +0 -1
- package/esm/ai/src/orchestrator/index.mjs +0 -11
- package/esm/ai/src/orchestrator/load.mjs +0 -49
- package/esm/ai/src/orchestrator/load.mjs.map +0 -1
- package/esm/ai/src/orchestrator/lock.mjs +0 -75
- package/esm/ai/src/orchestrator/lock.mjs.map +0 -1
- package/esm/ai/src/orchestrator/memory.mjs +0 -141
- package/esm/ai/src/orchestrator/memory.mjs.map +0 -1
- package/esm/ai/src/orchestrator/orchestrator-stream.mjs +0 -98
- package/esm/ai/src/orchestrator/orchestrator-stream.mjs.map +0 -1
- package/esm/ai/src/orchestrator/orchestrator.mjs +0 -206
- package/esm/ai/src/orchestrator/orchestrator.mjs.map +0 -1
- package/esm/ai/src/orchestrator/resume.mjs +0 -74
- package/esm/ai/src/orchestrator/resume.mjs.map +0 -1
- package/esm/ai/src/orchestrator/session-lock.mjs +0 -83
- package/esm/ai/src/orchestrator/session-lock.mjs.map +0 -1
- package/esm/ai/src/orchestrator/signature.mjs +0 -120
- package/esm/ai/src/orchestrator/signature.mjs.map +0 -1
- package/esm/ai/src/orchestrator/window.mjs +0 -56
- package/esm/ai/src/orchestrator/window.mjs.map +0 -1
- package/esm/ai/src/planner/dag-scheduler.mjs +0 -97
- package/esm/ai/src/planner/dag-scheduler.mjs.map +0 -1
- package/esm/ai/src/planner/index.mjs +0 -6
- package/esm/ai/src/planner/plan-prompt.mjs +0 -31
- package/esm/ai/src/planner/plan-prompt.mjs.map +0 -1
- package/esm/ai/src/planner/plan-schema.mjs +0 -120
- package/esm/ai/src/planner/plan-schema.mjs.map +0 -1
- package/esm/ai/src/planner/planner-run.mjs +0 -769
- package/esm/ai/src/planner/planner-run.mjs.map +0 -1
- package/esm/ai/src/planner/planner.mjs +0 -144
- package/esm/ai/src/planner/planner.mjs.map +0 -1
- package/esm/ai/src/planner/signature.mjs +0 -27
- package/esm/ai/src/planner/signature.mjs.map +0 -1
- package/esm/ai/src/planner/snapshot.mjs +0 -95
- package/esm/ai/src/planner/snapshot.mjs.map +0 -1
- package/esm/ai/src/prompt/errors.mjs +0 -73
- package/esm/ai/src/prompt/errors.mjs.map +0 -1
- package/esm/ai/src/prompt/index.mjs +0 -4
- package/esm/ai/src/prompt/prompt-langfuse-sync.mjs +0 -104
- package/esm/ai/src/prompt/prompt-langfuse-sync.mjs.map +0 -1
- package/esm/ai/src/prompt/prompt-validate.mjs +0 -170
- package/esm/ai/src/prompt/prompt-validate.mjs.map +0 -1
- package/esm/ai/src/prompt/prompt.mjs +0 -218
- package/esm/ai/src/prompt/prompt.mjs.map +0 -1
- package/esm/ai/src/prompts/index.mjs +0 -3
- package/esm/ai/src/prompts/prompts-manager.mjs +0 -410
- package/esm/ai/src/prompts/prompts-manager.mjs.map +0 -1
- package/esm/ai/src/prompts/prompts-validate.mjs +0 -0
- package/esm/ai/src/prompts/prompts-validate.mjs.map +0 -1
- package/esm/ai/src/rag/as-tool.mjs +0 -48
- package/esm/ai/src/rag/as-tool.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/chunk.mjs +0 -44
- package/esm/ai/src/rag/chunk/chunk.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/fixed.mjs +0 -32
- package/esm/ai/src/rag/chunk/fixed.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/markdown.mjs +0 -75
- package/esm/ai/src/rag/chunk/markdown.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/recursive.mjs +0 -132
- package/esm/ai/src/rag/chunk/recursive.mjs.map +0 -1
- package/esm/ai/src/rag/chunk/sentence.mjs +0 -73
- package/esm/ai/src/rag/chunk/sentence.mjs.map +0 -1
- package/esm/ai/src/rag/hybrid/bm25.mjs +0 -51
- package/esm/ai/src/rag/hybrid/bm25.mjs.map +0 -1
- package/esm/ai/src/rag/hybrid/hybrid-rank.mjs +0 -29
- package/esm/ai/src/rag/hybrid/hybrid-rank.mjs.map +0 -1
- package/esm/ai/src/rag/hybrid/rrf.mjs +0 -30
- package/esm/ai/src/rag/hybrid/rrf.mjs.map +0 -1
- package/esm/ai/src/rag/index.mjs +0 -18
- package/esm/ai/src/rag/loaders/errors.mjs +0 -25
- package/esm/ai/src/rag/loaders/errors.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/index.mjs +0 -7
- package/esm/ai/src/rag/loaders/load-html.mjs +0 -138
- package/esm/ai/src/rag/loaders/load-html.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/load-pdf.mjs +0 -150
- package/esm/ai/src/rag/loaders/load-pdf.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/load-text.mjs +0 -60
- package/esm/ai/src/rag/loaders/load-text.mjs.map +0 -1
- package/esm/ai/src/rag/loaders/load-web.mjs +0 -89
- package/esm/ai/src/rag/loaders/load-web.mjs.map +0 -1
- package/esm/ai/src/rag/rag.mjs +0 -126
- package/esm/ai/src/rag/rag.mjs.map +0 -1
- package/esm/ai/src/rag/rerank/keyword-reranker.mjs +0 -58
- package/esm/ai/src/rag/rerank/keyword-reranker.mjs.map +0 -1
- package/esm/ai/src/rag/rerank/llm-reranker.mjs +0 -85
- package/esm/ai/src/rag/rerank/llm-reranker.mjs.map +0 -1
- package/esm/ai/src/rag/retrieve.mjs +0 -68
- package/esm/ai/src/rag/retrieve.mjs.map +0 -1
- package/esm/ai/src/rag/store/cache-vector-store.mjs +0 -48
- package/esm/ai/src/rag/store/cache-vector-store.mjs.map +0 -1
- package/esm/ai/src/rag/store/pg-vector-store.mjs +0 -328
- package/esm/ai/src/rag/store/pg-vector-store.mjs.map +0 -1
- package/esm/ai/src/rag/transforms/multi-query.mjs +0 -41
- package/esm/ai/src/rag/transforms/multi-query.mjs.map +0 -1
- package/esm/ai/src/security/index.mjs +0 -5
- package/esm/ai/src/security/outbound-policy.mjs +0 -187
- package/esm/ai/src/security/outbound-policy.mjs.map +0 -1
- package/esm/ai/src/security/private-ip.mjs +0 -48
- package/esm/ai/src/security/private-ip.mjs.map +0 -1
- package/esm/ai/src/security/redact.mjs +0 -60
- package/esm/ai/src/security/redact.mjs.map +0 -1
- package/esm/ai/src/serve/serve.mjs +0 -90
- package/esm/ai/src/serve/serve.mjs.map +0 -1
- package/esm/ai/src/serve/sse.mjs +0 -25
- package/esm/ai/src/serve/sse.mjs.map +0 -1
- package/esm/ai/src/serve/stream-to-sse.mjs +0 -37
- package/esm/ai/src/serve/stream-to-sse.mjs.map +0 -1
- package/esm/ai/src/skills/catalog.mjs +0 -140
- package/esm/ai/src/skills/catalog.mjs.map +0 -1
- package/esm/ai/src/skills/index.mjs +0 -11
- package/esm/ai/src/skills/load-skill-tool.mjs +0 -65
- package/esm/ai/src/skills/load-skill-tool.mjs.map +0 -1
- package/esm/ai/src/skills/save-skill-tool.mjs +0 -65
- package/esm/ai/src/skills/save-skill-tool.mjs.map +0 -1
- package/esm/ai/src/skills/skills.mjs +0 -109
- package/esm/ai/src/skills/skills.mjs.map +0 -1
- package/esm/ai/src/skills/sources/directory-source.mjs +0 -108
- package/esm/ai/src/skills/sources/directory-source.mjs.map +0 -1
- package/esm/ai/src/skills/sources/index.mjs +0 -27
- package/esm/ai/src/skills/sources/index.mjs.map +0 -1
- package/esm/ai/src/skills/sources/parse-frontmatter.mjs +0 -46
- package/esm/ai/src/skills/sources/parse-frontmatter.mjs.map +0 -1
- package/esm/ai/src/skills/sources/store-source.mjs +0 -15
- package/esm/ai/src/skills/sources/store-source.mjs.map +0 -1
- package/esm/ai/src/skills/sources/url-source.mjs +0 -117
- package/esm/ai/src/skills/sources/url-source.mjs.map +0 -1
- package/esm/ai/src/snapshot/memory.mjs +0 -81
- package/esm/ai/src/snapshot/memory.mjs.map +0 -1
- package/esm/ai/src/snapshot/pg.mjs +0 -146
- package/esm/ai/src/snapshot/pg.mjs.map +0 -1
- package/esm/ai/src/snapshot/redis.mjs +0 -101
- package/esm/ai/src/snapshot/redis.mjs.map +0 -1
- package/esm/ai/src/speech/index.mjs +0 -3
- package/esm/ai/src/speech/speech.mjs +0 -122
- package/esm/ai/src/speech/speech.mjs.map +0 -1
- package/esm/ai/src/supervisor/as-tool.mjs +0 -74
- package/esm/ai/src/supervisor/as-tool.mjs.map +0 -1
- package/esm/ai/src/supervisor/cancellation.mjs +0 -22
- package/esm/ai/src/supervisor/cancellation.mjs.map +0 -1
- package/esm/ai/src/supervisor/decide.mjs +0 -272
- package/esm/ai/src/supervisor/decide.mjs.map +0 -1
- package/esm/ai/src/supervisor/emitter.mjs +0 -47
- package/esm/ai/src/supervisor/emitter.mjs.map +0 -1
- package/esm/ai/src/supervisor/entries.mjs +0 -206
- package/esm/ai/src/supervisor/entries.mjs.map +0 -1
- package/esm/ai/src/supervisor/execution.mjs +0 -1921
- package/esm/ai/src/supervisor/execution.mjs.map +0 -1
- package/esm/ai/src/supervisor/fan-out.mjs +0 -65
- package/esm/ai/src/supervisor/fan-out.mjs.map +0 -1
- package/esm/ai/src/supervisor/index.mjs +0 -14
- package/esm/ai/src/supervisor/router-factory.mjs +0 -141
- package/esm/ai/src/supervisor/router-factory.mjs.map +0 -1
- package/esm/ai/src/supervisor/router-prompt.mjs +0 -52
- package/esm/ai/src/supervisor/router-prompt.mjs.map +0 -1
- package/esm/ai/src/supervisor/signature.mjs +0 -89
- package/esm/ai/src/supervisor/signature.mjs.map +0 -1
- package/esm/ai/src/supervisor/snapshot.mjs +0 -69
- package/esm/ai/src/supervisor/snapshot.mjs.map +0 -1
- package/esm/ai/src/supervisor/supervisor-stream.mjs +0 -89
- package/esm/ai/src/supervisor/supervisor-stream.mjs.map +0 -1
- package/esm/ai/src/supervisor/supervisor.mjs +0 -144
- package/esm/ai/src/supervisor/supervisor.mjs.map +0 -1
- package/esm/ai/src/system-prompt/index.mjs +0 -7
- package/esm/ai/src/system-prompt/instruction.mjs +0 -57
- package/esm/ai/src/system-prompt/instruction.mjs.map +0 -1
- package/esm/ai/src/system-prompt/persona.mjs +0 -57
- package/esm/ai/src/system-prompt/persona.mjs.map +0 -1
- package/esm/ai/src/system-prompt/refined-system-prompt.mjs +0 -461
- package/esm/ai/src/system-prompt/refined-system-prompt.mjs.map +0 -1
- package/esm/ai/src/system-prompt/render-placeholders.mjs +0 -58
- package/esm/ai/src/system-prompt/render-placeholders.mjs.map +0 -1
- package/esm/ai/src/system-prompt/system-prompt.mjs +0 -286
- package/esm/ai/src/system-prompt/system-prompt.mjs.map +0 -1
- package/esm/ai/src/team/gates.mjs +0 -48
- package/esm/ai/src/team/gates.mjs.map +0 -1
- package/esm/ai/src/team/index.mjs +0 -3
- package/esm/ai/src/team/team.mjs +0 -94
- package/esm/ai/src/team/team.mjs.map +0 -1
- package/esm/ai/src/tool/executable-as-tool.mjs +0 -81
- package/esm/ai/src/tool/executable-as-tool.mjs.map +0 -1
- package/esm/ai/src/tool/index.mjs +0 -4
- package/esm/ai/src/tool/tool.mjs +0 -185
- package/esm/ai/src/tool/tool.mjs.map +0 -1
- package/esm/ai/src/transcribe/audio-input.mjs +0 -84
- package/esm/ai/src/transcribe/audio-input.mjs.map +0 -1
- package/esm/ai/src/transcribe/index.mjs +0 -4
- package/esm/ai/src/transcribe/transcribe.mjs +0 -127
- package/esm/ai/src/transcribe/transcribe.mjs.map +0 -1
- package/esm/ai/src/utils/compute-cost.mjs +0 -112
- package/esm/ai/src/utils/compute-cost.mjs.map +0 -1
- package/esm/ai/src/utils/extract-json-lenient.mjs +0 -97
- package/esm/ai/src/utils/extract-json-lenient.mjs.map +0 -1
- package/esm/ai/src/utils/extract-json-payload.mjs +0 -39
- package/esm/ai/src/utils/extract-json-payload.mjs.map +0 -1
- package/esm/ai/src/utils/generate-run-id.mjs +0 -23
- package/esm/ai/src/utils/generate-run-id.mjs.map +0 -1
- package/esm/ai/src/utils/index.mjs +0 -12
- package/esm/ai/src/utils/json-schema.mjs +0 -89
- package/esm/ai/src/utils/json-schema.mjs.map +0 -1
- package/esm/ai/src/utils/prepare-attachment-part.mjs +0 -232
- package/esm/ai/src/utils/prepare-attachment-part.mjs.map +0 -1
- package/esm/ai/src/utils/resolve-attachment.mjs +0 -74
- package/esm/ai/src/utils/resolve-attachment.mjs.map +0 -1
- package/esm/ai/src/utils/run-context.mjs +0 -89
- package/esm/ai/src/utils/run-context.mjs.map +0 -1
- package/esm/ai/src/utils/safe-json-parse.mjs +0 -22
- package/esm/ai/src/utils/safe-json-parse.mjs.map +0 -1
- package/esm/ai/src/utils/stamp-report-lineage.mjs +0 -45
- package/esm/ai/src/utils/stamp-report-lineage.mjs.map +0 -1
- package/esm/ai/src/vcr/cassette-io.mjs +0 -57
- package/esm/ai/src/vcr/cassette-io.mjs.map +0 -1
- package/esm/ai/src/vcr/errors.mjs +0 -37
- package/esm/ai/src/vcr/errors.mjs.map +0 -1
- package/esm/ai/src/vcr/hash-request.mjs +0 -118
- package/esm/ai/src/vcr/hash-request.mjs.map +0 -1
- package/esm/ai/src/vcr/index.mjs +0 -5
- package/esm/ai/src/vcr/vcr.mjs +0 -248
- package/esm/ai/src/vcr/vcr.mjs.map +0 -1
- package/esm/ai/src/workflow/as-tool.mjs +0 -49
- package/esm/ai/src/workflow/as-tool.mjs.map +0 -1
- package/esm/ai/src/workflow/cancellation.mjs +0 -44
- package/esm/ai/src/workflow/cancellation.mjs.map +0 -1
- package/esm/ai/src/workflow/emitter.mjs +0 -40
- package/esm/ai/src/workflow/emitter.mjs.map +0 -1
- package/esm/ai/src/workflow/engine.mjs +0 -363
- package/esm/ai/src/workflow/engine.mjs.map +0 -1
- package/esm/ai/src/workflow/index.mjs +0 -5
- package/esm/ai/src/workflow/retry.mjs +0 -32
- package/esm/ai/src/workflow/retry.mjs.map +0 -1
- package/esm/ai/src/workflow/router.mjs +0 -56
- package/esm/ai/src/workflow/router.mjs.map +0 -1
- package/esm/ai/src/workflow/run-scoped-emitter.mjs +0 -32
- package/esm/ai/src/workflow/run-scoped-emitter.mjs.map +0 -1
- package/esm/ai/src/workflow/signature.mjs +0 -34
- package/esm/ai/src/workflow/signature.mjs.map +0 -1
- package/esm/ai/src/workflow/snapshot.mjs +0 -77
- package/esm/ai/src/workflow/snapshot.mjs.map +0 -1
- package/esm/ai/src/workflow/state.mjs +0 -37
- package/esm/ai/src/workflow/state.mjs.map +0 -1
- package/esm/ai/src/workflow/step-runner.mjs +0 -370
- package/esm/ai/src/workflow/step-runner.mjs.map +0 -1
- package/esm/ai/src/workflow/step.mjs +0 -37
- package/esm/ai/src/workflow/step.mjs.map +0 -1
- package/esm/ai/src/workflow/workflow.mjs +0 -122
- package/esm/ai/src/workflow/workflow.mjs.map +0 -1
- package/esm/ai-openai/src/embedder.mjs +0 -4
- package/esm/ai-openai/src/image.mjs +0 -5
- package/esm/ai-openai/src/index.mjs +0 -7
- package/esm/ai-openai/src/model.mjs +0 -5
- package/esm/ai-openai/src/sdk.mjs +0 -9
- package/esm/ai-openai/src/speech.mjs +0 -5
- package/esm/ai-openai/src/transcription.mjs +0 -6
- package/esm/ai-openai/src/utils/index.mjs +0 -5
- package/esm/ai-openai/src/utils/to-openai-messages.mjs +0 -3
- package/esm/ai-openai/src/utils/to-openai-tools.mjs +0 -3
- package/esm/ai-openai/src/utils/wrap-openai-error.mjs +0 -4
- package/esm/node_modules/langfuse/lib/index.mjs +0 -1827
- package/esm/node_modules/langfuse/lib/index.mjs.map +0 -1
- package/esm/node_modules/langfuse-core/lib/index.mjs +0 -1770
- package/esm/node_modules/langfuse-core/lib/index.mjs.map +0 -1
- package/esm/node_modules/mustache/mustache.mjs +0 -587
- package/esm/node_modules/mustache/mustache.mjs.map +0 -1
- package/esm/node_modules/openai/_vendor/partial-json-parser/parser.mjs +0 -180
- package/esm/node_modules/openai/_vendor/partial-json-parser/parser.mjs.map +0 -1
- package/esm/node_modules/openai/auth/workload-identity-auth.mjs +0 -80
- package/esm/node_modules/openai/auth/workload-identity-auth.mjs.map +0 -1
- package/esm/node_modules/openai/azure.mjs +0 -82
- package/esm/node_modules/openai/azure.mjs.map +0 -1
- package/esm/node_modules/openai/client.mjs +0 -638
- package/esm/node_modules/openai/client.mjs.map +0 -1
- package/esm/node_modules/openai/core/api-promise.mjs +0 -75
- package/esm/node_modules/openai/core/api-promise.mjs.map +0 -1
- package/esm/node_modules/openai/core/error.mjs +0 -110
- package/esm/node_modules/openai/core/error.mjs.map +0 -1
- package/esm/node_modules/openai/core/pagination.mjs +0 -160
- package/esm/node_modules/openai/core/pagination.mjs.map +0 -1
- package/esm/node_modules/openai/core/resource.mjs +0 -10
- package/esm/node_modules/openai/core/resource.mjs.map +0 -1
- package/esm/node_modules/openai/core/streaming.mjs +0 -238
- package/esm/node_modules/openai/core/streaming.mjs.map +0 -1
- package/esm/node_modules/openai/index.mjs +0 -8
- package/esm/node_modules/openai/internal/decoders/line.mjs +0 -91
- package/esm/node_modules/openai/internal/decoders/line.mjs.map +0 -1
- package/esm/node_modules/openai/internal/detect-platform.mjs +0 -123
- package/esm/node_modules/openai/internal/detect-platform.mjs.map +0 -1
- package/esm/node_modules/openai/internal/errors.mjs +0 -26
- package/esm/node_modules/openai/internal/errors.mjs.map +0 -1
- package/esm/node_modules/openai/internal/headers.mjs +0 -65
- package/esm/node_modules/openai/internal/headers.mjs.map +0 -1
- package/esm/node_modules/openai/internal/parse.mjs +0 -41
- package/esm/node_modules/openai/internal/parse.mjs.map +0 -1
- package/esm/node_modules/openai/internal/qs/formats.mjs +0 -12
- package/esm/node_modules/openai/internal/qs/formats.mjs.map +0 -1
- package/esm/node_modules/openai/internal/qs/stringify.mjs +0 -179
- package/esm/node_modules/openai/internal/qs/stringify.mjs.map +0 -1
- package/esm/node_modules/openai/internal/qs/utils.mjs +0 -65
- package/esm/node_modules/openai/internal/qs/utils.mjs.map +0 -1
- package/esm/node_modules/openai/internal/request-options.mjs +0 -11
- package/esm/node_modules/openai/internal/request-options.mjs.map +0 -1
- package/esm/node_modules/openai/internal/shims.mjs +0 -77
- package/esm/node_modules/openai/internal/shims.mjs.map +0 -1
- package/esm/node_modules/openai/internal/to-file.mjs +0 -63
- package/esm/node_modules/openai/internal/to-file.mjs.map +0 -1
- package/esm/node_modules/openai/internal/tslib.mjs +0 -16
- package/esm/node_modules/openai/internal/tslib.mjs.map +0 -1
- package/esm/node_modules/openai/internal/uploads.mjs +0 -94
- package/esm/node_modules/openai/internal/uploads.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/base64.mjs +0 -22
- package/esm/node_modules/openai/internal/utils/base64.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/bytes.mjs +0 -26
- package/esm/node_modules/openai/internal/utils/bytes.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/env.mjs +0 -16
- package/esm/node_modules/openai/internal/utils/env.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/log.mjs +0 -58
- package/esm/node_modules/openai/internal/utils/log.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/path.mjs +0 -62
- package/esm/node_modules/openai/internal/utils/path.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/query.mjs +0 -10
- package/esm/node_modules/openai/internal/utils/query.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/sleep.mjs +0 -6
- package/esm/node_modules/openai/internal/utils/sleep.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/uuid.mjs +0 -18
- package/esm/node_modules/openai/internal/utils/uuid.mjs.map +0 -1
- package/esm/node_modules/openai/internal/utils/values.mjs +0 -41
- package/esm/node_modules/openai/internal/utils/values.mjs.map +0 -1
- package/esm/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +0 -247
- package/esm/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +0 -1
- package/esm/node_modules/openai/lib/AssistantStream.mjs +0 -472
- package/esm/node_modules/openai/lib/AssistantStream.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ChatCompletionRunner.mjs +0 -26
- package/esm/node_modules/openai/lib/ChatCompletionRunner.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ChatCompletionStream.mjs +0 -423
- package/esm/node_modules/openai/lib/ChatCompletionStream.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +0 -26
- package/esm/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map +0 -1
- package/esm/node_modules/openai/lib/EventStream.mjs +0 -163
- package/esm/node_modules/openai/lib/EventStream.mjs.map +0 -1
- package/esm/node_modules/openai/lib/ResponsesParser.mjs +0 -94
- package/esm/node_modules/openai/lib/ResponsesParser.mjs.map +0 -1
- package/esm/node_modules/openai/lib/RunnableFunction.mjs +0 -8
- package/esm/node_modules/openai/lib/RunnableFunction.mjs.map +0 -1
- package/esm/node_modules/openai/lib/Util.mjs +0 -19
- package/esm/node_modules/openai/lib/Util.mjs.map +0 -1
- package/esm/node_modules/openai/lib/chatCompletionUtils.mjs +0 -11
- package/esm/node_modules/openai/lib/chatCompletionUtils.mjs.map +0 -1
- package/esm/node_modules/openai/lib/parser.mjs +0 -88
- package/esm/node_modules/openai/lib/parser.mjs.map +0 -1
- package/esm/node_modules/openai/lib/responses/ResponseStream.mjs +0 -231
- package/esm/node_modules/openai/lib/responses/ResponseStream.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/admin.mjs +0 -15
- package/esm/node_modules/openai/resources/admin/admin.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/admin-api-keys.mjs +0 -81
- package/esm/node_modules/openai/resources/admin/organization/admin-api-keys.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/audit-logs.mjs +0 -31
- package/esm/node_modules/openai/resources/admin/organization/audit-logs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/certificates.mjs +0 -153
- package/esm/node_modules/openai/resources/admin/organization/certificates.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/data-retention.mjs +0 -42
- package/esm/node_modules/openai/resources/admin/organization/data-retention.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/groups/groups.mjs +0 -106
- package/esm/node_modules/openai/resources/admin/organization/groups/groups.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/groups/roles.mjs +0 -88
- package/esm/node_modules/openai/resources/admin/organization/groups/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/groups/users.mjs +0 -88
- package/esm/node_modules/openai/resources/admin/organization/groups/users.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/invites.mjs +0 -83
- package/esm/node_modules/openai/resources/admin/organization/invites.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/organization.mjs +0 -45
- package/esm/node_modules/openai/resources/admin/organization/organization.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/api-keys.mjs +0 -72
- package/esm/node_modules/openai/resources/admin/organization/projects/api-keys.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/certificates.mjs +0 -78
- package/esm/node_modules/openai/resources/admin/organization/projects/certificates.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/data-retention.mjs +0 -46
- package/esm/node_modules/openai/resources/admin/organization/projects/data-retention.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs +0 -95
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs +0 -91
- package/esm/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs +0 -45
- package/esm/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs +0 -63
- package/esm/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/projects.mjs +0 -137
- package/esm/node_modules/openai/resources/admin/organization/projects/projects.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs +0 -51
- package/esm/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/roles.mjs +0 -108
- package/esm/node_modules/openai/resources/admin/organization/projects/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs +0 -112
- package/esm/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs +0 -106
- package/esm/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/users/roles.mjs +0 -91
- package/esm/node_modules/openai/resources/admin/organization/projects/users/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/projects/users/users.mjs +0 -118
- package/esm/node_modules/openai/resources/admin/organization/projects/users/users.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/roles.mjs +0 -96
- package/esm/node_modules/openai/resources/admin/organization/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/spend-alerts.mjs +0 -97
- package/esm/node_modules/openai/resources/admin/organization/spend-alerts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/usage.mjs +0 -207
- package/esm/node_modules/openai/resources/admin/organization/usage.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/users/roles.mjs +0 -88
- package/esm/node_modules/openai/resources/admin/organization/users/roles.mjs.map +0 -1
- package/esm/node_modules/openai/resources/admin/organization/users/users.mjs +0 -82
- package/esm/node_modules/openai/resources/admin/organization/users/users.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/audio.mjs +0 -21
- package/esm/node_modules/openai/resources/audio/audio.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/speech.mjs +0 -39
- package/esm/node_modules/openai/resources/audio/speech.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/transcriptions.mjs +0 -22
- package/esm/node_modules/openai/resources/audio/transcriptions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/audio/translations.mjs +0 -21
- package/esm/node_modules/openai/resources/audio/translations.mjs.map +0 -1
- package/esm/node_modules/openai/resources/batches.mjs +0 -54
- package/esm/node_modules/openai/resources/batches.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/assistants.mjs +0 -78
- package/esm/node_modules/openai/resources/beta/assistants.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/beta.mjs +0 -24
- package/esm/node_modules/openai/resources/beta/beta.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/chatkit/chatkit.mjs +0 -18
- package/esm/node_modules/openai/resources/beta/chatkit/chatkit.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/chatkit/sessions.mjs +0 -49
- package/esm/node_modules/openai/resources/beta/chatkit/sessions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/chatkit/threads.mjs +0 -85
- package/esm/node_modules/openai/resources/beta/chatkit/threads.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/realtime/realtime.mjs +0 -21
- package/esm/node_modules/openai/resources/beta/realtime/realtime.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/realtime/sessions.mjs +0 -33
- package/esm/node_modules/openai/resources/beta/realtime/sessions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs +0 -33
- package/esm/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/messages.mjs +0 -83
- package/esm/node_modules/openai/resources/beta/threads/messages.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/runs/runs.mjs +0 -183
- package/esm/node_modules/openai/resources/beta/threads/runs/runs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/runs/steps.mjs +0 -45
- package/esm/node_modules/openai/resources/beta/threads/runs/steps.mjs.map +0 -1
- package/esm/node_modules/openai/resources/beta/threads/threads.mjs +0 -101
- package/esm/node_modules/openai/resources/beta/threads/threads.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/chat.mjs +0 -15
- package/esm/node_modules/openai/resources/chat/chat.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/completions/completions.mjs +0 -123
- package/esm/node_modules/openai/resources/chat/completions/completions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/completions/index.mjs +0 -7
- package/esm/node_modules/openai/resources/chat/completions/messages.mjs +0 -35
- package/esm/node_modules/openai/resources/chat/completions/messages.mjs.map +0 -1
- package/esm/node_modules/openai/resources/chat/index.mjs +0 -5
- package/esm/node_modules/openai/resources/completions.mjs +0 -20
- package/esm/node_modules/openai/resources/completions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/containers/containers.mjs +0 -57
- package/esm/node_modules/openai/resources/containers/containers.mjs.map +0 -1
- package/esm/node_modules/openai/resources/containers/files/content.mjs +0 -23
- package/esm/node_modules/openai/resources/containers/files/content.mjs.map +0 -1
- package/esm/node_modules/openai/resources/containers/files/files.mjs +0 -63
- package/esm/node_modules/openai/resources/containers/files/files.mjs.map +0 -1
- package/esm/node_modules/openai/resources/conversations/conversations.mjs +0 -57
- package/esm/node_modules/openai/resources/conversations/conversations.mjs.map +0 -1
- package/esm/node_modules/openai/resources/conversations/items.mjs +0 -57
- package/esm/node_modules/openai/resources/conversations/items.mjs.map +0 -1
- package/esm/node_modules/openai/resources/embeddings.mjs +0 -48
- package/esm/node_modules/openai/resources/embeddings.mjs.map +0 -1
- package/esm/node_modules/openai/resources/evals/evals.mjs +0 -73
- package/esm/node_modules/openai/resources/evals/evals.mjs.map +0 -1
- package/esm/node_modules/openai/resources/evals/runs/output-items.mjs +0 -35
- package/esm/node_modules/openai/resources/evals/runs/output-items.mjs.map +0 -1
- package/esm/node_modules/openai/resources/evals/runs/runs.mjs +0 -72
- package/esm/node_modules/openai/resources/evals/runs/runs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/files.mjs +0 -111
- package/esm/node_modules/openai/resources/files.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs +0 -15
- package/esm/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/alpha/graders.mjs +0 -60
- package/esm/node_modules/openai/resources/fine-tuning/alpha/graders.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs +0 -15
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs +0 -102
- package/esm/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/fine-tuning.mjs +0 -24
- package/esm/node_modules/openai/resources/fine-tuning/fine-tuning.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs +0 -34
- package/esm/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs +0 -148
- package/esm/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs.map +0 -1
- package/esm/node_modules/openai/resources/fine-tuning/methods.mjs +0 -8
- package/esm/node_modules/openai/resources/fine-tuning/methods.mjs.map +0 -1
- package/esm/node_modules/openai/resources/graders/grader-models.mjs +0 -8
- package/esm/node_modules/openai/resources/graders/grader-models.mjs.map +0 -1
- package/esm/node_modules/openai/resources/graders/graders.mjs +0 -15
- package/esm/node_modules/openai/resources/graders/graders.mjs.map +0 -1
- package/esm/node_modules/openai/resources/images.mjs +0 -46
- package/esm/node_modules/openai/resources/images.mjs.map +0 -1
- package/esm/node_modules/openai/resources/index.mjs +0 -27
- package/esm/node_modules/openai/resources/models.mjs +0 -44
- package/esm/node_modules/openai/resources/models.mjs.map +0 -1
- package/esm/node_modules/openai/resources/moderations.mjs +0 -23
- package/esm/node_modules/openai/resources/moderations.mjs.map +0 -1
- package/esm/node_modules/openai/resources/realtime/calls.mjs +0 -79
- package/esm/node_modules/openai/resources/realtime/calls.mjs.map +0 -1
- package/esm/node_modules/openai/resources/realtime/client-secrets.mjs +0 -39
- package/esm/node_modules/openai/resources/realtime/client-secrets.mjs.map +0 -1
- package/esm/node_modules/openai/resources/realtime/realtime.mjs +0 -18
- package/esm/node_modules/openai/resources/realtime/realtime.mjs.map +0 -1
- package/esm/node_modules/openai/resources/responses/input-items.mjs +0 -31
- package/esm/node_modules/openai/resources/responses/input-items.mjs.map +0 -1
- package/esm/node_modules/openai/resources/responses/input-tokens.mjs +0 -27
- package/esm/node_modules/openai/resources/responses/input-tokens.mjs.map +0 -1
- package/esm/node_modules/openai/resources/responses/responses.mjs +0 -110
- package/esm/node_modules/openai/resources/responses/responses.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/content.mjs +0 -22
- package/esm/node_modules/openai/resources/skills/content.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/skills.mjs +0 -69
- package/esm/node_modules/openai/resources/skills/skills.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/versions/content.mjs +0 -23
- package/esm/node_modules/openai/resources/skills/versions/content.mjs.map +0 -1
- package/esm/node_modules/openai/resources/skills/versions/versions.mjs +0 -58
- package/esm/node_modules/openai/resources/skills/versions/versions.mjs.map +0 -1
- package/esm/node_modules/openai/resources/uploads/parts.mjs +0 -34
- package/esm/node_modules/openai/resources/uploads/parts.mjs.map +0 -1
- package/esm/node_modules/openai/resources/uploads/uploads.mjs +0 -84
- package/esm/node_modules/openai/resources/uploads/uploads.mjs.map +0 -1
- package/esm/node_modules/openai/resources/vector-stores/file-batches.mjs +0 -126
- package/esm/node_modules/openai/resources/vector-stores/file-batches.mjs.map +0 -1
- package/esm/node_modules/openai/resources/vector-stores/files.mjs +0 -147
- package/esm/node_modules/openai/resources/vector-stores/files.mjs.map +0 -1
- package/esm/node_modules/openai/resources/vector-stores/vector-stores.mjs +0 -87
- package/esm/node_modules/openai/resources/vector-stores/vector-stores.mjs.map +0 -1
- package/esm/node_modules/openai/resources/videos.mjs +0 -115
- package/esm/node_modules/openai/resources/videos.mjs.map +0 -1
- package/esm/node_modules/openai/resources/webhooks/index.mjs +0 -3
- package/esm/node_modules/openai/resources/webhooks/webhooks.mjs +0 -69
- package/esm/node_modules/openai/resources/webhooks/webhooks.mjs.map +0 -1
- package/esm/node_modules/openai/resources/webhooks.mjs +0 -4
- package/esm/node_modules/openai/streaming.mjs +0 -3
- package/esm/node_modules/openai/version.mjs +0 -6
- package/esm/node_modules/openai/version.mjs.map +0 -1
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { formatRequestDetails, loggerFor } from "./utils/log.mjs";
|
|
2
|
-
import { Stream } from "../core/streaming.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../@warlock.js/node_modules/openai/internal/parse.mjs
|
|
5
|
-
async function defaultParseResponse(client, props) {
|
|
6
|
-
const { response, requestLogID, retryOfRequestLogID, startTime } = props;
|
|
7
|
-
const body = await (async () => {
|
|
8
|
-
if (props.options.stream) {
|
|
9
|
-
loggerFor(client).debug("response", response.status, response.url, response.headers, response.body);
|
|
10
|
-
if (props.options.__streamClass) return props.options.__streamClass.fromSSEResponse(response, props.controller, client, props.options.__synthesizeEventData);
|
|
11
|
-
return Stream.fromSSEResponse(response, props.controller, client, props.options.__synthesizeEventData);
|
|
12
|
-
}
|
|
13
|
-
if (response.status === 204) return null;
|
|
14
|
-
if (props.options.__binaryResponse) return response;
|
|
15
|
-
const mediaType = response.headers.get("content-type")?.split(";")[0]?.trim();
|
|
16
|
-
if (mediaType?.includes("application/json") || mediaType?.endsWith("+json")) {
|
|
17
|
-
if (response.headers.get("content-length") === "0") return;
|
|
18
|
-
return addRequestID(await response.json(), response);
|
|
19
|
-
}
|
|
20
|
-
return await response.text();
|
|
21
|
-
})();
|
|
22
|
-
loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({
|
|
23
|
-
retryOfRequestLogID,
|
|
24
|
-
url: response.url,
|
|
25
|
-
status: response.status,
|
|
26
|
-
body,
|
|
27
|
-
durationMs: Date.now() - startTime
|
|
28
|
-
}));
|
|
29
|
-
return body;
|
|
30
|
-
}
|
|
31
|
-
function addRequestID(value, response) {
|
|
32
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
33
|
-
return Object.defineProperty(value, "_request_id", {
|
|
34
|
-
value: response.headers.get("x-request-id"),
|
|
35
|
-
enumerable: false
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { addRequestID, defaultParseResponse };
|
|
41
|
-
//# sourceMappingURL=parse.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/node_modules/openai/internal/parse.mjs"],"sourcesContent":["// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\nimport { Stream } from \"../core/streaming.mjs\";\nimport { formatRequestDetails, loggerFor } from \"./utils/log.mjs\";\nexport async function defaultParseResponse(client, props) {\n const { response, requestLogID, retryOfRequestLogID, startTime } = props;\n const body = await (async () => {\n if (props.options.stream) {\n loggerFor(client).debug('response', response.status, response.url, response.headers, response.body);\n // Note: there is an invariant here that isn't represented in the type system\n // that if you set `stream: true` the response type must also be `Stream<T>`\n if (props.options.__streamClass) {\n return props.options.__streamClass.fromSSEResponse(response, props.controller, client, props.options.__synthesizeEventData);\n }\n return Stream.fromSSEResponse(response, props.controller, client, props.options.__synthesizeEventData);\n }\n // fetch refuses to read the body when the status code is 204.\n if (response.status === 204) {\n return null;\n }\n if (props.options.__binaryResponse) {\n return response;\n }\n const contentType = response.headers.get('content-type');\n const mediaType = contentType?.split(';')[0]?.trim();\n const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');\n if (isJSON) {\n const contentLength = response.headers.get('content-length');\n if (contentLength === '0') {\n // if there is no content we can't do anything\n return undefined;\n }\n const json = await response.json();\n return addRequestID(json, response);\n }\n const text = await response.text();\n return text;\n })();\n loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({\n retryOfRequestLogID,\n url: response.url,\n status: response.status,\n body,\n durationMs: Date.now() - startTime,\n }));\n return body;\n}\nexport function addRequestID(value, response) {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return value;\n }\n return Object.defineProperty(value, '_request_id', {\n value: response.headers.get('x-request-id'),\n enumerable: false,\n });\n}\n//# sourceMappingURL=parse.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;AAGA,eAAsB,qBAAqB,QAAQ,OAAO;CACtD,MAAM,EAAE,UAAU,cAAc,qBAAqB,cAAc;CACnE,MAAM,OAAO,OAAO,YAAY;EAC5B,IAAI,MAAM,QAAQ,QAAQ;GACtB,UAAU,MAAM,CAAC,CAAC,MAAM,YAAY,SAAS,QAAQ,SAAS,KAAK,SAAS,SAAS,SAAS,IAAI;GAGlG,IAAI,MAAM,QAAQ,eACd,OAAO,MAAM,QAAQ,cAAc,gBAAgB,UAAU,MAAM,YAAY,QAAQ,MAAM,QAAQ,qBAAqB;GAE9H,OAAO,OAAO,gBAAgB,UAAU,MAAM,YAAY,QAAQ,MAAM,QAAQ,qBAAqB;EACzG;EAEA,IAAI,SAAS,WAAW,KACpB,OAAO;EAEX,IAAI,MAAM,QAAQ,kBACd,OAAO;EAGX,MAAM,YADc,SAAS,QAAQ,IAAI,cACb,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK;EAEnD,IADe,WAAW,SAAS,kBAAkB,KAAK,WAAW,SAAS,OAAO,GACzE;GAER,IADsB,SAAS,QAAQ,IAAI,gBAC3B,MAAM,KAElB;GAGJ,OAAO,aAAa,MADD,SAAS,KAAK,GACP,QAAQ;EACtC;EAEA,OAAO,MADY,SAAS,KAAK;CAErC,EAAC,CAAE;CACH,UAAU,MAAM,CAAC,CAAC,MAAM,IAAI,aAAa,oBAAoB,qBAAqB;EAC9E;EACA,KAAK,SAAS;EACd,QAAQ,SAAS;EACjB;EACA,YAAY,KAAK,IAAI,IAAI;CAC7B,CAAC,CAAC;CACF,OAAO;AACX;AACA,SAAgB,aAAa,OAAO,UAAU;CAC1C,IAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAC1D,OAAO;CAEX,OAAO,OAAO,eAAe,OAAO,eAAe;EAC/C,OAAO,SAAS,QAAQ,IAAI,cAAc;EAC1C,YAAY;CAChB,CAAC;AACL"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region ../@warlock.js/node_modules/openai/internal/qs/formats.mjs
|
|
2
|
-
const default_format = "RFC3986";
|
|
3
|
-
const default_formatter = (v) => String(v);
|
|
4
|
-
const formatters = {
|
|
5
|
-
RFC1738: (v) => String(v).replace(/%20/g, "+"),
|
|
6
|
-
RFC3986: default_formatter
|
|
7
|
-
};
|
|
8
|
-
const RFC1738 = "RFC1738";
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { RFC1738, default_format, default_formatter, formatters };
|
|
12
|
-
//# sourceMappingURL=formats.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formats.mjs","names":[],"sources":["../../../../../../../../../../@warlock.js/node_modules/openai/internal/qs/formats.mjs"],"sourcesContent":["export const default_format = 'RFC3986';\nexport const default_formatter = (v) => String(v);\nexport const formatters = {\n RFC1738: (v) => String(v).replace(/%20/g, '+'),\n RFC3986: default_formatter,\n};\nexport const RFC1738 = 'RFC1738';\nexport const RFC3986 = 'RFC3986';\n//# sourceMappingURL=formats.mjs.map"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAa,iBAAiB;AAC9B,MAAa,qBAAqB,MAAM,OAAO,CAAC;AAChD,MAAa,aAAa;CACtB,UAAU,MAAM,OAAO,CAAC,CAAC,CAAC,QAAQ,QAAQ,GAAG;CAC7C,SAAS;AACb;AACA,MAAa,UAAU"}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { isArray } from "../utils/values.mjs";
|
|
2
|
-
import { default_format, default_formatter, formatters } from "./formats.mjs";
|
|
3
|
-
import { encode, has, is_buffer, maybe_map } from "./utils.mjs";
|
|
4
|
-
|
|
5
|
-
//#region ../@warlock.js/node_modules/openai/internal/qs/stringify.mjs
|
|
6
|
-
const array_prefix_generators = {
|
|
7
|
-
brackets(prefix) {
|
|
8
|
-
return String(prefix) + "[]";
|
|
9
|
-
},
|
|
10
|
-
comma: "comma",
|
|
11
|
-
indices(prefix, key) {
|
|
12
|
-
return String(prefix) + "[" + key + "]";
|
|
13
|
-
},
|
|
14
|
-
repeat(prefix) {
|
|
15
|
-
return String(prefix);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const push_to_array = function(arr, value_or_array) {
|
|
19
|
-
Array.prototype.push.apply(arr, isArray(value_or_array) ? value_or_array : [value_or_array]);
|
|
20
|
-
};
|
|
21
|
-
let toISOString;
|
|
22
|
-
const defaults = {
|
|
23
|
-
addQueryPrefix: false,
|
|
24
|
-
allowDots: false,
|
|
25
|
-
allowEmptyArrays: false,
|
|
26
|
-
arrayFormat: "indices",
|
|
27
|
-
charset: "utf-8",
|
|
28
|
-
charsetSentinel: false,
|
|
29
|
-
delimiter: "&",
|
|
30
|
-
encode: true,
|
|
31
|
-
encodeDotInKeys: false,
|
|
32
|
-
encoder: encode,
|
|
33
|
-
encodeValuesOnly: false,
|
|
34
|
-
format: default_format,
|
|
35
|
-
formatter: default_formatter,
|
|
36
|
-
/** @deprecated */
|
|
37
|
-
indices: false,
|
|
38
|
-
serializeDate(date) {
|
|
39
|
-
return (toISOString ?? (toISOString = Function.prototype.call.bind(Date.prototype.toISOString)))(date);
|
|
40
|
-
},
|
|
41
|
-
skipNulls: false,
|
|
42
|
-
strictNullHandling: false
|
|
43
|
-
};
|
|
44
|
-
function is_non_nullish_primitive(v) {
|
|
45
|
-
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
46
|
-
}
|
|
47
|
-
const sentinel = {};
|
|
48
|
-
function inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
|
|
49
|
-
let obj = object;
|
|
50
|
-
let tmp_sc = sideChannel;
|
|
51
|
-
let step = 0;
|
|
52
|
-
let find_flag = false;
|
|
53
|
-
while ((tmp_sc = tmp_sc.get(sentinel)) !== void 0 && !find_flag) {
|
|
54
|
-
const pos = tmp_sc.get(object);
|
|
55
|
-
step += 1;
|
|
56
|
-
if (typeof pos !== "undefined") if (pos === step) throw new RangeError("Cyclic object value");
|
|
57
|
-
else find_flag = true;
|
|
58
|
-
if (typeof tmp_sc.get(sentinel) === "undefined") step = 0;
|
|
59
|
-
}
|
|
60
|
-
if (typeof filter === "function") obj = filter(prefix, obj);
|
|
61
|
-
else if (obj instanceof Date) obj = serializeDate?.(obj);
|
|
62
|
-
else if (generateArrayPrefix === "comma" && isArray(obj)) obj = maybe_map(obj, function(value) {
|
|
63
|
-
if (value instanceof Date) return serializeDate?.(value);
|
|
64
|
-
return value;
|
|
65
|
-
});
|
|
66
|
-
if (obj === null) {
|
|
67
|
-
if (strictNullHandling) return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
|
|
68
|
-
obj = "";
|
|
69
|
-
}
|
|
70
|
-
if (is_non_nullish_primitive(obj) || is_buffer(obj)) {
|
|
71
|
-
if (encoder) {
|
|
72
|
-
const key_value = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
|
|
73
|
-
return [formatter?.(key_value) + "=" + formatter?.(encoder(obj, defaults.encoder, charset, "value", format))];
|
|
74
|
-
}
|
|
75
|
-
return [formatter?.(prefix) + "=" + formatter?.(String(obj))];
|
|
76
|
-
}
|
|
77
|
-
const values = [];
|
|
78
|
-
if (typeof obj === "undefined") return values;
|
|
79
|
-
let obj_keys;
|
|
80
|
-
if (generateArrayPrefix === "comma" && isArray(obj)) {
|
|
81
|
-
if (encodeValuesOnly && encoder) obj = maybe_map(obj, encoder);
|
|
82
|
-
obj_keys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
83
|
-
} else if (isArray(filter)) obj_keys = filter;
|
|
84
|
-
else {
|
|
85
|
-
const keys = Object.keys(obj);
|
|
86
|
-
obj_keys = sort ? keys.sort(sort) : keys;
|
|
87
|
-
}
|
|
88
|
-
const encoded_prefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
|
|
89
|
-
const adjusted_prefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encoded_prefix + "[]" : encoded_prefix;
|
|
90
|
-
if (allowEmptyArrays && isArray(obj) && obj.length === 0) return adjusted_prefix + "[]";
|
|
91
|
-
for (let j = 0; j < obj_keys.length; ++j) {
|
|
92
|
-
const key = obj_keys[j];
|
|
93
|
-
const value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
94
|
-
if (skipNulls && value === null) continue;
|
|
95
|
-
const encoded_key = allowDots && encodeDotInKeys ? key.replace(/\./g, "%2E") : key;
|
|
96
|
-
const key_prefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjusted_prefix, encoded_key) : adjusted_prefix : adjusted_prefix + (allowDots ? "." + encoded_key : "[" + encoded_key + "]");
|
|
97
|
-
sideChannel.set(object, step);
|
|
98
|
-
const valueSideChannel = /* @__PURE__ */ new WeakMap();
|
|
99
|
-
valueSideChannel.set(sentinel, sideChannel);
|
|
100
|
-
push_to_array(values, inner_stringify(value, key_prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
|
|
101
|
-
}
|
|
102
|
-
return values;
|
|
103
|
-
}
|
|
104
|
-
function normalize_stringify_options(opts = defaults) {
|
|
105
|
-
if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
106
|
-
if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
107
|
-
if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") throw new TypeError("Encoder has to be a function.");
|
|
108
|
-
const charset = opts.charset || defaults.charset;
|
|
109
|
-
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
110
|
-
let format = default_format;
|
|
111
|
-
if (typeof opts.format !== "undefined") {
|
|
112
|
-
if (!has(formatters, opts.format)) throw new TypeError("Unknown format option provided.");
|
|
113
|
-
format = opts.format;
|
|
114
|
-
}
|
|
115
|
-
const formatter = formatters[format];
|
|
116
|
-
let filter = defaults.filter;
|
|
117
|
-
if (typeof opts.filter === "function" || isArray(opts.filter)) filter = opts.filter;
|
|
118
|
-
let arrayFormat;
|
|
119
|
-
if (opts.arrayFormat && opts.arrayFormat in array_prefix_generators) arrayFormat = opts.arrayFormat;
|
|
120
|
-
else if ("indices" in opts) arrayFormat = opts.indices ? "indices" : "repeat";
|
|
121
|
-
else arrayFormat = defaults.arrayFormat;
|
|
122
|
-
if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
123
|
-
const allowDots = typeof opts.allowDots === "undefined" ? !!opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
124
|
-
return {
|
|
125
|
-
addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
|
126
|
-
allowDots,
|
|
127
|
-
allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
128
|
-
arrayFormat,
|
|
129
|
-
charset,
|
|
130
|
-
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
131
|
-
commaRoundTrip: !!opts.commaRoundTrip,
|
|
132
|
-
delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
|
|
133
|
-
encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
|
|
134
|
-
encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
|
|
135
|
-
encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
|
|
136
|
-
encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
|
137
|
-
filter,
|
|
138
|
-
format,
|
|
139
|
-
formatter,
|
|
140
|
-
serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
|
|
141
|
-
skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
|
|
142
|
-
sort: typeof opts.sort === "function" ? opts.sort : null,
|
|
143
|
-
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function stringify(object, opts = {}) {
|
|
147
|
-
let obj = object;
|
|
148
|
-
const options = normalize_stringify_options(opts);
|
|
149
|
-
let obj_keys;
|
|
150
|
-
let filter;
|
|
151
|
-
if (typeof options.filter === "function") {
|
|
152
|
-
filter = options.filter;
|
|
153
|
-
obj = filter("", obj);
|
|
154
|
-
} else if (isArray(options.filter)) {
|
|
155
|
-
filter = options.filter;
|
|
156
|
-
obj_keys = filter;
|
|
157
|
-
}
|
|
158
|
-
const keys = [];
|
|
159
|
-
if (typeof obj !== "object" || obj === null) return "";
|
|
160
|
-
const generateArrayPrefix = array_prefix_generators[options.arrayFormat];
|
|
161
|
-
const commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
|
|
162
|
-
if (!obj_keys) obj_keys = Object.keys(obj);
|
|
163
|
-
if (options.sort) obj_keys.sort(options.sort);
|
|
164
|
-
const sideChannel = /* @__PURE__ */ new WeakMap();
|
|
165
|
-
for (let i = 0; i < obj_keys.length; ++i) {
|
|
166
|
-
const key = obj_keys[i];
|
|
167
|
-
if (options.skipNulls && obj[key] === null) continue;
|
|
168
|
-
push_to_array(keys, inner_stringify(obj[key], key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));
|
|
169
|
-
}
|
|
170
|
-
const joined = keys.join(options.delimiter);
|
|
171
|
-
let prefix = options.addQueryPrefix === true ? "?" : "";
|
|
172
|
-
if (options.charsetSentinel) if (options.charset === "iso-8859-1") prefix += "utf8=%26%2310003%3B&";
|
|
173
|
-
else prefix += "utf8=%E2%9C%93&";
|
|
174
|
-
return joined.length > 0 ? prefix + joined : "";
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
//#endregion
|
|
178
|
-
export { stringify };
|
|
179
|
-
//# sourceMappingURL=stringify.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stringify.mjs","names":[],"sources":["../../../../../../../../../../@warlock.js/node_modules/openai/internal/qs/stringify.mjs"],"sourcesContent":["import { encode, is_buffer, maybe_map, has } from \"./utils.mjs\";\nimport { default_format, default_formatter, formatters } from \"./formats.mjs\";\nimport { isArray } from \"../utils/values.mjs\";\nconst array_prefix_generators = {\n brackets(prefix) {\n return String(prefix) + '[]';\n },\n comma: 'comma',\n indices(prefix, key) {\n return String(prefix) + '[' + key + ']';\n },\n repeat(prefix) {\n return String(prefix);\n },\n};\nconst push_to_array = function (arr, value_or_array) {\n Array.prototype.push.apply(arr, isArray(value_or_array) ? value_or_array : [value_or_array]);\n};\nlet toISOString;\nconst defaults = {\n addQueryPrefix: false,\n allowDots: false,\n allowEmptyArrays: false,\n arrayFormat: 'indices',\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encodeDotInKeys: false,\n encoder: encode,\n encodeValuesOnly: false,\n format: default_format,\n formatter: default_formatter,\n /** @deprecated */\n indices: false,\n serializeDate(date) {\n return (toISOString ?? (toISOString = Function.prototype.call.bind(Date.prototype.toISOString)))(date);\n },\n skipNulls: false,\n strictNullHandling: false,\n};\nfunction is_non_nullish_primitive(v) {\n return (typeof v === 'string' ||\n typeof v === 'number' ||\n typeof v === 'boolean' ||\n typeof v === 'symbol' ||\n typeof v === 'bigint');\n}\nconst sentinel = {};\nfunction inner_stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {\n let obj = object;\n let tmp_sc = sideChannel;\n let step = 0;\n let find_flag = false;\n while ((tmp_sc = tmp_sc.get(sentinel)) !== void undefined && !find_flag) {\n // Where object last appeared in the ref tree\n const pos = tmp_sc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n }\n else {\n find_flag = true; // Break while\n }\n }\n if (typeof tmp_sc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n }\n else if (obj instanceof Date) {\n obj = serializeDate?.(obj);\n }\n else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = maybe_map(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate?.(value);\n }\n return value;\n });\n }\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ?\n // @ts-expect-error\n encoder(prefix, defaults.encoder, charset, 'key', format)\n : prefix;\n }\n obj = '';\n }\n if (is_non_nullish_primitive(obj) || is_buffer(obj)) {\n if (encoder) {\n const key_value = encodeValuesOnly ? prefix\n // @ts-expect-error\n : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [\n formatter?.(key_value) +\n '=' +\n // @ts-expect-error\n formatter?.(encoder(obj, defaults.encoder, charset, 'value', format)),\n ];\n }\n return [formatter?.(prefix) + '=' + formatter?.(String(obj))];\n }\n const values = [];\n if (typeof obj === 'undefined') {\n return values;\n }\n let obj_keys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n // @ts-expect-error values only\n obj = maybe_map(obj, encoder);\n }\n obj_keys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n }\n else if (isArray(filter)) {\n obj_keys = filter;\n }\n else {\n const keys = Object.keys(obj);\n obj_keys = sort ? keys.sort(sort) : keys;\n }\n const encoded_prefix = encodeDotInKeys ? String(prefix).replace(/\\./g, '%2E') : String(prefix);\n const adjusted_prefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encoded_prefix + '[]' : encoded_prefix;\n if (allowEmptyArrays && isArray(obj) && obj.length === 0) {\n return adjusted_prefix + '[]';\n }\n for (let j = 0; j < obj_keys.length; ++j) {\n const key = obj_keys[j];\n const value = \n // @ts-ignore\n typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n if (skipNulls && value === null) {\n continue;\n }\n // @ts-ignore\n const encoded_key = allowDots && encodeDotInKeys ? key.replace(/\\./g, '%2E') : key;\n const key_prefix = isArray(obj) ?\n typeof generateArrayPrefix === 'function' ?\n generateArrayPrefix(adjusted_prefix, encoded_key)\n : adjusted_prefix\n : adjusted_prefix + (allowDots ? '.' + encoded_key : '[' + encoded_key + ']');\n sideChannel.set(object, step);\n const valueSideChannel = new WeakMap();\n valueSideChannel.set(sentinel, sideChannel);\n push_to_array(values, inner_stringify(value, key_prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, \n // @ts-ignore\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));\n }\n return values;\n}\nfunction normalize_stringify_options(opts = defaults) {\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {\n throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n const charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n let format = default_format;\n if (typeof opts.format !== 'undefined') {\n if (!has(formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n const formatter = formatters[format];\n let filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n let arrayFormat;\n if (opts.arrayFormat && opts.arrayFormat in array_prefix_generators) {\n arrayFormat = opts.arrayFormat;\n }\n else if ('indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n }\n else {\n arrayFormat = defaults.arrayFormat;\n }\n if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n const allowDots = typeof opts.allowDots === 'undefined' ?\n !!opts.encodeDotInKeys === true ?\n true\n : defaults.allowDots\n : !!opts.allowDots;\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n // @ts-ignore\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n arrayFormat: arrayFormat,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n commaRoundTrip: !!opts.commaRoundTrip,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n // @ts-ignore\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,\n };\n}\nexport function stringify(object, opts = {}) {\n let obj = object;\n const options = normalize_stringify_options(opts);\n let obj_keys;\n let filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n }\n else if (isArray(options.filter)) {\n filter = options.filter;\n obj_keys = filter;\n }\n const keys = [];\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n const generateArrayPrefix = array_prefix_generators[options.arrayFormat];\n const commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;\n if (!obj_keys) {\n obj_keys = Object.keys(obj);\n }\n if (options.sort) {\n obj_keys.sort(options.sort);\n }\n const sideChannel = new WeakMap();\n for (let i = 0; i < obj_keys.length; ++i) {\n const key = obj_keys[i];\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n push_to_array(keys, inner_stringify(obj[key], key, \n // @ts-expect-error\n generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));\n }\n const joined = keys.join(options.delimiter);\n let prefix = options.addQueryPrefix === true ? '?' : '';\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n }\n else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n return joined.length > 0 ? prefix + joined : '';\n}\n//# sourceMappingURL=stringify.mjs.map"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { isArray } from "../utils/values.mjs";
|
|
2
|
-
import { RFC1738 } from "./formats.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../@warlock.js/node_modules/openai/internal/qs/utils.mjs
|
|
5
|
-
let has = (obj, key) => (has = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty), has(obj, key));
|
|
6
|
-
const hex_table = /* @__PURE__ */ (() => {
|
|
7
|
-
const array = [];
|
|
8
|
-
for (let i = 0; i < 256; ++i) array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
|
|
9
|
-
return array;
|
|
10
|
-
})();
|
|
11
|
-
const limit = 1024;
|
|
12
|
-
const encode = (str, _defaultEncoder, charset, _kind, format) => {
|
|
13
|
-
if (str.length === 0) return str;
|
|
14
|
-
let string = str;
|
|
15
|
-
if (typeof str === "symbol") string = Symbol.prototype.toString.call(str);
|
|
16
|
-
else if (typeof str !== "string") string = String(str);
|
|
17
|
-
if (charset === "iso-8859-1") return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
|
|
18
|
-
return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
|
|
19
|
-
});
|
|
20
|
-
let out = "";
|
|
21
|
-
for (let j = 0; j < string.length; j += limit) {
|
|
22
|
-
const segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
23
|
-
const arr = [];
|
|
24
|
-
for (let i = 0; i < segment.length; ++i) {
|
|
25
|
-
let c = segment.charCodeAt(i);
|
|
26
|
-
if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === "RFC1738" && (c === 40 || c === 41)) {
|
|
27
|
-
arr[arr.length] = segment.charAt(i);
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
if (c < 128) {
|
|
31
|
-
arr[arr.length] = hex_table[c];
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (c < 2048) {
|
|
35
|
-
arr[arr.length] = hex_table[192 | c >> 6] + hex_table[128 | c & 63];
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (c < 55296 || c >= 57344) {
|
|
39
|
-
arr[arr.length] = hex_table[224 | c >> 12] + hex_table[128 | c >> 6 & 63] + hex_table[128 | c & 63];
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
i += 1;
|
|
43
|
-
c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
|
|
44
|
-
arr[arr.length] = hex_table[240 | c >> 18] + hex_table[128 | c >> 12 & 63] + hex_table[128 | c >> 6 & 63] + hex_table[128 | c & 63];
|
|
45
|
-
}
|
|
46
|
-
out += arr.join("");
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
49
|
-
};
|
|
50
|
-
function is_buffer(obj) {
|
|
51
|
-
if (!obj || typeof obj !== "object") return false;
|
|
52
|
-
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
53
|
-
}
|
|
54
|
-
function maybe_map(val, fn) {
|
|
55
|
-
if (isArray(val)) {
|
|
56
|
-
const mapped = [];
|
|
57
|
-
for (let i = 0; i < val.length; i += 1) mapped.push(fn(val[i]));
|
|
58
|
-
return mapped;
|
|
59
|
-
}
|
|
60
|
-
return fn(val);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
//#endregion
|
|
64
|
-
export { encode, has, is_buffer, maybe_map };
|
|
65
|
-
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../../../../../../@warlock.js/node_modules/openai/internal/qs/utils.mjs"],"sourcesContent":["import { RFC1738 } from \"./formats.mjs\";\nimport { isArray } from \"../utils/values.mjs\";\nexport let has = (obj, key) => ((has = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty)),\n has(obj, key));\nconst hex_table = /* @__PURE__ */ (() => {\n const array = [];\n for (let i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n return array;\n})();\nfunction compact_queue(queue) {\n while (queue.length > 1) {\n const item = queue.pop();\n if (!item)\n continue;\n const obj = item.obj[item.prop];\n if (isArray(obj)) {\n const compacted = [];\n for (let j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n // @ts-ignore\n item.obj[item.prop] = compacted;\n }\n }\n}\nfunction array_to_object(source, options) {\n const obj = options && options.plainObjects ? Object.create(null) : {};\n for (let i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n return obj;\n}\nexport function merge(target, source, options = {}) {\n if (!source) {\n return target;\n }\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n }\n else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) {\n target[source] = true;\n }\n }\n else {\n return [target, source];\n }\n return target;\n }\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n let mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n // @ts-ignore\n mergeTarget = array_to_object(target, options);\n }\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has(target, i)) {\n const targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n }\n else {\n target.push(item);\n }\n }\n else {\n target[i] = item;\n }\n });\n return target;\n }\n return Object.keys(source).reduce(function (acc, key) {\n const value = source[key];\n if (has(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n }\n else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n}\nexport function assign_single_source(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n}\nexport function decode(str, _, charset) {\n const strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n }\n catch (e) {\n return strWithoutPlus;\n }\n}\nconst limit = 1024;\nexport const encode = (str, _defaultEncoder, charset, _kind, format) => {\n // This code was originally written by Brian White for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n let string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n }\n else if (typeof str !== 'string') {\n string = String(str);\n }\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n let out = '';\n for (let j = 0; j < string.length; j += limit) {\n const segment = string.length >= limit ? string.slice(j, j + limit) : string;\n const arr = [];\n for (let i = 0; i < segment.length; ++i) {\n let c = segment.charCodeAt(i);\n if (c === 0x2d || // -\n c === 0x2e || // .\n c === 0x5f || // _\n c === 0x7e || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5a) || // a-z\n (c >= 0x61 && c <= 0x7a) || // A-Z\n (format === RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n arr[arr.length] = segment.charAt(i);\n continue;\n }\n if (c < 0x80) {\n arr[arr.length] = hex_table[c];\n continue;\n }\n if (c < 0x800) {\n arr[arr.length] = hex_table[0xc0 | (c >> 6)] + hex_table[0x80 | (c & 0x3f)];\n continue;\n }\n if (c < 0xd800 || c >= 0xe000) {\n arr[arr.length] =\n hex_table[0xe0 | (c >> 12)] + hex_table[0x80 | ((c >> 6) & 0x3f)] + hex_table[0x80 | (c & 0x3f)];\n continue;\n }\n i += 1;\n c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));\n arr[arr.length] =\n hex_table[0xf0 | (c >> 18)] +\n hex_table[0x80 | ((c >> 12) & 0x3f)] +\n hex_table[0x80 | ((c >> 6) & 0x3f)] +\n hex_table[0x80 | (c & 0x3f)];\n }\n out += arr.join('');\n }\n return out;\n};\nexport function compact(value) {\n const queue = [{ obj: { o: value }, prop: 'o' }];\n const refs = [];\n for (let i = 0; i < queue.length; ++i) {\n const item = queue[i];\n // @ts-ignore\n const obj = item.obj[item.prop];\n const keys = Object.keys(obj);\n for (let j = 0; j < keys.length; ++j) {\n const key = keys[j];\n const val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n compact_queue(queue);\n return value;\n}\nexport function is_regexp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\nexport function is_buffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n}\nexport function combine(a, b) {\n return [].concat(a, b);\n}\nexport function maybe_map(val, fn) {\n if (isArray(val)) {\n const mapped = [];\n for (let i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n}\n//# sourceMappingURL=utils.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;AAEA,IAAW,OAAO,KAAK,SAAU,MAAM,OAAO,UAAU,SAAS,UAAU,KAAK,KAAK,OAAO,UAAU,cAAc,GAChH,IAAI,KAAK,GAAG;AAChB,MAAM,YAA4B,uBAAO;CACrC,MAAM,QAAQ,CAAC;CACf,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,EAAE,GACvB,MAAM,KAAK,QAAQ,IAAI,KAAK,MAAM,MAAM,EAAE,SAAS,EAAE,EAAC,CAAE,YAAY,CAAC;CAEzE,OAAO;AACX,EAAC,CAAE;AAsGH,MAAM,QAAQ;AACd,MAAa,UAAU,KAAK,iBAAiB,SAAS,OAAO,WAAW;CAGpE,IAAI,IAAI,WAAW,GACf,OAAO;CAEX,IAAI,SAAS;CACb,IAAI,OAAO,QAAQ,UACf,SAAS,OAAO,UAAU,SAAS,KAAK,GAAG;MAE1C,IAAI,OAAO,QAAQ,UACpB,SAAS,OAAO,GAAG;CAEvB,IAAI,YAAY,cACZ,OAAO,OAAO,MAAM,CAAC,CAAC,QAAQ,mBAAmB,SAAU,IAAI;EAC3D,OAAO,WAAW,SAAS,GAAG,MAAM,CAAC,GAAG,EAAE,IAAI;CAClD,CAAC;CAEL,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK,OAAO;EAC3C,MAAM,UAAU,OAAO,UAAU,QAAQ,OAAO,MAAM,GAAG,IAAI,KAAK,IAAI;EACtE,MAAM,MAAM,CAAC;EACb,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,EAAE,GAAG;GACrC,IAAI,IAAI,QAAQ,WAAW,CAAC;GAC5B,IAAI,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,OACL,KAAK,MAAQ,KAAK,MAClB,KAAK,MAAQ,KAAK,MAClB,KAAK,MAAQ,KAAK,OAClB,yBAAuB,MAAM,MAAQ,MAAM,KAC9C;IACE,IAAI,IAAI,UAAU,QAAQ,OAAO,CAAC;IAClC;GACJ;GACA,IAAI,IAAI,KAAM;IACV,IAAI,IAAI,UAAU,UAAU;IAC5B;GACJ;GACA,IAAI,IAAI,MAAO;IACX,IAAI,IAAI,UAAU,UAAU,MAAQ,KAAK,KAAM,UAAU,MAAQ,IAAI;IACrE;GACJ;GACA,IAAI,IAAI,SAAU,KAAK,OAAQ;IAC3B,IAAI,IAAI,UACJ,UAAU,MAAQ,KAAK,MAAO,UAAU,MAAS,KAAK,IAAK,MAAS,UAAU,MAAQ,IAAI;IAC9F;GACJ;GACA,KAAK;GACL,IAAI,UAAa,IAAI,SAAU,KAAO,QAAQ,WAAW,CAAC,IAAI;GAC9D,IAAI,IAAI,UACJ,UAAU,MAAQ,KAAK,MACnB,UAAU,MAAS,KAAK,KAAM,MAC9B,UAAU,MAAS,KAAK,IAAK,MAC7B,UAAU,MAAQ,IAAI;EAClC;EACA,OAAO,IAAI,KAAK,EAAE;CACtB;CACA,OAAO;AACX;AAwBA,SAAgB,UAAU,KAAK;CAC3B,IAAI,CAAC,OAAO,OAAO,QAAQ,UACvB,OAAO;CAEX,OAAO,CAAC,EAAE,IAAI,eAAe,IAAI,YAAY,YAAY,IAAI,YAAY,SAAS,GAAG;AACzF;AAIA,SAAgB,UAAU,KAAK,IAAI;CAC/B,IAAI,QAAQ,GAAG,GAAG;EACd,MAAM,SAAS,CAAC;EAChB,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK,GACjC,OAAO,KAAK,GAAG,IAAI,EAAE,CAAC;EAE1B,OAAO;CACX;CACA,OAAO,GAAG,GAAG;AACjB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ../@warlock.js/node_modules/openai/internal/request-options.mjs
|
|
2
|
-
const FallbackEncoder = ({ headers, body }) => {
|
|
3
|
-
return {
|
|
4
|
-
bodyHeaders: { "content-type": "application/json" },
|
|
5
|
-
body: JSON.stringify(body)
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { FallbackEncoder };
|
|
11
|
-
//# sourceMappingURL=request-options.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-options.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/node_modules/openai/internal/request-options.mjs"],"sourcesContent":["// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\nexport const FallbackEncoder = ({ headers, body }) => {\n return {\n bodyHeaders: {\n 'content-type': 'application/json',\n },\n body: JSON.stringify(body),\n };\n};\n//# sourceMappingURL=request-options.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAa,mBAAmB,EAAE,SAAS,WAAW;CAClD,OAAO;EACH,aAAa,EACT,gBAAgB,mBACpB;EACA,MAAM,KAAK,UAAU,IAAI;CAC7B;AACJ"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
//#region ../@warlock.js/node_modules/openai/internal/shims.mjs
|
|
2
|
-
function getDefaultFetch() {
|
|
3
|
-
if (typeof fetch !== "undefined") return fetch;
|
|
4
|
-
throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`");
|
|
5
|
-
}
|
|
6
|
-
function makeReadableStream(...args) {
|
|
7
|
-
const ReadableStream = globalThis.ReadableStream;
|
|
8
|
-
if (typeof ReadableStream === "undefined") throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");
|
|
9
|
-
return new ReadableStream(...args);
|
|
10
|
-
}
|
|
11
|
-
function ReadableStreamFrom(iterable) {
|
|
12
|
-
let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
13
|
-
return makeReadableStream({
|
|
14
|
-
start() {},
|
|
15
|
-
async pull(controller) {
|
|
16
|
-
const { done, value } = await iter.next();
|
|
17
|
-
if (done) controller.close();
|
|
18
|
-
else controller.enqueue(value);
|
|
19
|
-
},
|
|
20
|
-
async cancel() {
|
|
21
|
-
await iter.return?.();
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
27
|
-
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
28
|
-
*
|
|
29
|
-
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
30
|
-
*/
|
|
31
|
-
function ReadableStreamToAsyncIterable(stream) {
|
|
32
|
-
if (stream[Symbol.asyncIterator]) return stream;
|
|
33
|
-
const reader = stream.getReader();
|
|
34
|
-
return {
|
|
35
|
-
async next() {
|
|
36
|
-
try {
|
|
37
|
-
const result = await reader.read();
|
|
38
|
-
if (result?.done) reader.releaseLock();
|
|
39
|
-
return result;
|
|
40
|
-
} catch (e) {
|
|
41
|
-
reader.releaseLock();
|
|
42
|
-
throw e;
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
async return() {
|
|
46
|
-
const cancelPromise = reader.cancel();
|
|
47
|
-
reader.releaseLock();
|
|
48
|
-
await cancelPromise;
|
|
49
|
-
return {
|
|
50
|
-
done: true,
|
|
51
|
-
value: void 0
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
[Symbol.asyncIterator]() {
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Cancels a ReadableStream we don't need to consume.
|
|
61
|
-
* See https://undici.nodejs.org/#/?id=garbage-collection
|
|
62
|
-
*/
|
|
63
|
-
async function CancelReadableStream(stream) {
|
|
64
|
-
if (stream === null || typeof stream !== "object") return;
|
|
65
|
-
if (stream[Symbol.asyncIterator]) {
|
|
66
|
-
await stream[Symbol.asyncIterator]().return?.();
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const reader = stream.getReader();
|
|
70
|
-
const cancelPromise = reader.cancel();
|
|
71
|
-
reader.releaseLock();
|
|
72
|
-
await cancelPromise;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
export { CancelReadableStream, ReadableStreamFrom, ReadableStreamToAsyncIterable, getDefaultFetch, makeReadableStream };
|
|
77
|
-
//# sourceMappingURL=shims.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shims.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/node_modules/openai/internal/shims.mjs"],"sourcesContent":["// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\nexport function getDefaultFetch() {\n if (typeof fetch !== 'undefined') {\n return fetch;\n }\n throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');\n}\nexport function makeReadableStream(...args) {\n const ReadableStream = globalThis.ReadableStream;\n if (typeof ReadableStream === 'undefined') {\n // Note: All of the platforms / runtimes we officially support already define\n // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.\n throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`');\n }\n return new ReadableStream(...args);\n}\nexport function ReadableStreamFrom(iterable) {\n let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n return makeReadableStream({\n start() { },\n async pull(controller) {\n const { done, value } = await iter.next();\n if (done) {\n controller.close();\n }\n else {\n controller.enqueue(value);\n }\n },\n async cancel() {\n await iter.return?.();\n },\n });\n}\n/**\n * Most browsers don't yet have async iterable support for ReadableStream,\n * and Node has a very different way of reading bytes from its \"ReadableStream\".\n *\n * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490\n */\nexport function ReadableStreamToAsyncIterable(stream) {\n if (stream[Symbol.asyncIterator])\n return stream;\n const reader = stream.getReader();\n return {\n async next() {\n try {\n const result = await reader.read();\n if (result?.done)\n reader.releaseLock(); // release lock when stream becomes closed\n return result;\n }\n catch (e) {\n reader.releaseLock(); // release lock when stream becomes errored\n throw e;\n }\n },\n async return() {\n const cancelPromise = reader.cancel();\n reader.releaseLock();\n await cancelPromise;\n return { done: true, value: undefined };\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n/**\n * Cancels a ReadableStream we don't need to consume.\n * See https://undici.nodejs.org/#/?id=garbage-collection\n */\nexport async function CancelReadableStream(stream) {\n if (stream === null || typeof stream !== 'object')\n return;\n if (stream[Symbol.asyncIterator]) {\n await stream[Symbol.asyncIterator]().return?.();\n return;\n }\n const reader = stream.getReader();\n const cancelPromise = reader.cancel();\n reader.releaseLock();\n await cancelPromise;\n}\n//# sourceMappingURL=shims.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,SAAgB,kBAAkB;CAC9B,IAAI,OAAO,UAAU,aACjB,OAAO;CAEX,MAAM,IAAI,MAAM,mJAAmJ;AACvK;AACA,SAAgB,mBAAmB,GAAG,MAAM;CACxC,MAAM,iBAAiB,WAAW;CAClC,IAAI,OAAO,mBAAmB,aAG1B,MAAM,IAAI,MAAM,yHAAyH;CAE7I,OAAO,IAAI,eAAe,GAAG,IAAI;AACrC;AACA,SAAgB,mBAAmB,UAAU;CACzC,IAAI,OAAO,OAAO,iBAAiB,WAAW,SAAS,OAAO,cAAc,CAAC,IAAI,SAAS,OAAO,SAAS,CAAC;CAC3G,OAAO,mBAAmB;EACtB,QAAQ,CAAE;EACV,MAAM,KAAK,YAAY;GACnB,MAAM,EAAE,MAAM,UAAU,MAAM,KAAK,KAAK;GACxC,IAAI,MACA,WAAW,MAAM;QAGjB,WAAW,QAAQ,KAAK;EAEhC;EACA,MAAM,SAAS;GACX,MAAM,KAAK,SAAS;EACxB;CACJ,CAAC;AACL;;;;;;;AAOA,SAAgB,8BAA8B,QAAQ;CAClD,IAAI,OAAO,OAAO,gBACd,OAAO;CACX,MAAM,SAAS,OAAO,UAAU;CAChC,OAAO;EACH,MAAM,OAAO;GACT,IAAI;IACA,MAAM,SAAS,MAAM,OAAO,KAAK;IACjC,IAAI,QAAQ,MACR,OAAO,YAAY;IACvB,OAAO;GACX,SACO,GAAG;IACN,OAAO,YAAY;IACnB,MAAM;GACV;EACJ;EACA,MAAM,SAAS;GACX,MAAM,gBAAgB,OAAO,OAAO;GACpC,OAAO,YAAY;GACnB,MAAM;GACN,OAAO;IAAE,MAAM;IAAM,OAAO;GAAU;EAC1C;EACA,CAAC,OAAO,iBAAiB;GACrB,OAAO;EACX;CACJ;AACJ;;;;;AAKA,eAAsB,qBAAqB,QAAQ;CAC/C,IAAI,WAAW,QAAQ,OAAO,WAAW,UACrC;CACJ,IAAI,OAAO,OAAO,gBAAgB;EAC9B,MAAM,OAAO,OAAO,cAAc,CAAC,CAAC,CAAC,SAAS;EAC9C;CACJ;CACA,MAAM,SAAS,OAAO,UAAU;CAChC,MAAM,gBAAgB,OAAO,OAAO;CACpC,OAAO,YAAY;CACnB,MAAM;AACV"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { checkFileSupport, getName, isAsyncIterable, makeFile } from "./uploads.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../@warlock.js/node_modules/openai/internal/to-file.mjs
|
|
4
|
-
/**
|
|
5
|
-
* This check adds the arrayBuffer() method type because it is available and used at runtime
|
|
6
|
-
*/
|
|
7
|
-
const isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
|
|
8
|
-
/**
|
|
9
|
-
* This check adds the arrayBuffer() method type because it is available and used at runtime
|
|
10
|
-
*/
|
|
11
|
-
const isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
12
|
-
const isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
|
|
13
|
-
/**
|
|
14
|
-
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
15
|
-
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
16
|
-
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
17
|
-
* @param {Object=} options additional properties
|
|
18
|
-
* @param {string=} options.type the MIME type of the content
|
|
19
|
-
* @param {number=} options.lastModified the last modified timestamp
|
|
20
|
-
* @returns a {@link File} with the given properties
|
|
21
|
-
*/
|
|
22
|
-
async function toFile(value, name, options) {
|
|
23
|
-
checkFileSupport();
|
|
24
|
-
value = await value;
|
|
25
|
-
if (isFileLike(value)) {
|
|
26
|
-
if (value instanceof File) return value;
|
|
27
|
-
return makeFile([await value.arrayBuffer()], value.name);
|
|
28
|
-
}
|
|
29
|
-
if (isResponseLike(value)) {
|
|
30
|
-
const blob = await value.blob();
|
|
31
|
-
name || (name = new URL(value.url).pathname.split(/[\\/]/).pop());
|
|
32
|
-
return makeFile(await getBytes(blob), name, options);
|
|
33
|
-
}
|
|
34
|
-
const parts = await getBytes(value);
|
|
35
|
-
name || (name = getName(value));
|
|
36
|
-
if (!options?.type) {
|
|
37
|
-
const type = parts.find((part) => typeof part === "object" && "type" in part && part.type);
|
|
38
|
-
if (typeof type === "string") options = {
|
|
39
|
-
...options,
|
|
40
|
-
type
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return makeFile(parts, name, options);
|
|
44
|
-
}
|
|
45
|
-
async function getBytes(value) {
|
|
46
|
-
let parts = [];
|
|
47
|
-
if (typeof value === "string" || ArrayBuffer.isView(value) || value instanceof ArrayBuffer) parts.push(value);
|
|
48
|
-
else if (isBlobLike(value)) parts.push(value instanceof Blob ? value : await value.arrayBuffer());
|
|
49
|
-
else if (isAsyncIterable(value)) for await (const chunk of value) parts.push(...await getBytes(chunk));
|
|
50
|
-
else {
|
|
51
|
-
const constructor = value?.constructor?.name;
|
|
52
|
-
throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ""}${propsForError(value)}`);
|
|
53
|
-
}
|
|
54
|
-
return parts;
|
|
55
|
-
}
|
|
56
|
-
function propsForError(value) {
|
|
57
|
-
if (typeof value !== "object" || value === null) return "";
|
|
58
|
-
return `; props: [${Object.getOwnPropertyNames(value).map((p) => `"${p}"`).join(", ")}]`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { toFile };
|
|
63
|
-
//# sourceMappingURL=to-file.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"to-file.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/node_modules/openai/internal/to-file.mjs"],"sourcesContent":["import { getName, makeFile, isAsyncIterable } from \"./uploads.mjs\";\nimport { checkFileSupport } from \"./uploads.mjs\";\n/**\n * This check adds the arrayBuffer() method type because it is available and used at runtime\n */\nconst isBlobLike = (value) => value != null &&\n typeof value === 'object' &&\n typeof value.size === 'number' &&\n typeof value.type === 'string' &&\n typeof value.text === 'function' &&\n typeof value.slice === 'function' &&\n typeof value.arrayBuffer === 'function';\n/**\n * This check adds the arrayBuffer() method type because it is available and used at runtime\n */\nconst isFileLike = (value) => value != null &&\n typeof value === 'object' &&\n typeof value.name === 'string' &&\n typeof value.lastModified === 'number' &&\n isBlobLike(value);\nconst isResponseLike = (value) => value != null &&\n typeof value === 'object' &&\n typeof value.url === 'string' &&\n typeof value.blob === 'function';\n/**\n * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats\n * @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts\n * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible\n * @param {Object=} options additional properties\n * @param {string=} options.type the MIME type of the content\n * @param {number=} options.lastModified the last modified timestamp\n * @returns a {@link File} with the given properties\n */\nexport async function toFile(value, name, options) {\n checkFileSupport();\n // If it's a promise, resolve it.\n value = await value;\n // If we've been given a `File` we don't need to do anything\n if (isFileLike(value)) {\n if (value instanceof File) {\n return value;\n }\n return makeFile([await value.arrayBuffer()], value.name);\n }\n if (isResponseLike(value)) {\n const blob = await value.blob();\n name || (name = new URL(value.url).pathname.split(/[\\\\/]/).pop());\n return makeFile(await getBytes(blob), name, options);\n }\n const parts = await getBytes(value);\n name || (name = getName(value));\n if (!options?.type) {\n const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type);\n if (typeof type === 'string') {\n options = { ...options, type };\n }\n }\n return makeFile(parts, name, options);\n}\nasync function getBytes(value) {\n let parts = [];\n if (typeof value === 'string' ||\n ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc.\n value instanceof ArrayBuffer) {\n parts.push(value);\n }\n else if (isBlobLike(value)) {\n parts.push(value instanceof Blob ? value : await value.arrayBuffer());\n }\n else if (isAsyncIterable(value) // includes Readable, ReadableStream, etc.\n ) {\n for await (const chunk of value) {\n parts.push(...(await getBytes(chunk))); // TODO, consider validating?\n }\n }\n else {\n const constructor = value?.constructor?.name;\n throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ''}${propsForError(value)}`);\n }\n return parts;\n}\nfunction propsForError(value) {\n if (typeof value !== 'object' || value === null)\n return '';\n const props = Object.getOwnPropertyNames(value);\n return `; props: [${props.map((p) => `\"${p}\"`).join(', ')}]`;\n}\n//# sourceMappingURL=to-file.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AAKA,MAAM,cAAc,UAAU,SAAS,QACnC,OAAO,UAAU,YACjB,OAAO,MAAM,SAAS,YACtB,OAAO,MAAM,SAAS,YACtB,OAAO,MAAM,SAAS,cACtB,OAAO,MAAM,UAAU,cACvB,OAAO,MAAM,gBAAgB;;;;AAIjC,MAAM,cAAc,UAAU,SAAS,QACnC,OAAO,UAAU,YACjB,OAAO,MAAM,SAAS,YACtB,OAAO,MAAM,iBAAiB,YAC9B,WAAW,KAAK;AACpB,MAAM,kBAAkB,UAAU,SAAS,QACvC,OAAO,UAAU,YACjB,OAAO,MAAM,QAAQ,YACrB,OAAO,MAAM,SAAS;;;;;;;;;;AAU1B,eAAsB,OAAO,OAAO,MAAM,SAAS;CAC/C,iBAAiB;CAEjB,QAAQ,MAAM;CAEd,IAAI,WAAW,KAAK,GAAG;EACnB,IAAI,iBAAiB,MACjB,OAAO;EAEX,OAAO,SAAS,CAAC,MAAM,MAAM,YAAY,CAAC,GAAG,MAAM,IAAI;CAC3D;CACA,IAAI,eAAe,KAAK,GAAG;EACvB,MAAM,OAAO,MAAM,MAAM,KAAK;EAC9B,SAAS,OAAO,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC,SAAS,MAAM,OAAO,CAAC,CAAC,IAAI;EAC/D,OAAO,SAAS,MAAM,SAAS,IAAI,GAAG,MAAM,OAAO;CACvD;CACA,MAAM,QAAQ,MAAM,SAAS,KAAK;CAClC,SAAS,OAAO,QAAQ,KAAK;CAC7B,IAAI,CAAC,SAAS,MAAM;EAChB,MAAM,OAAO,MAAM,MAAM,SAAS,OAAO,SAAS,YAAY,UAAU,QAAQ,KAAK,IAAI;EACzF,IAAI,OAAO,SAAS,UAChB,UAAU;GAAE,GAAG;GAAS;EAAK;CAErC;CACA,OAAO,SAAS,OAAO,MAAM,OAAO;AACxC;AACA,eAAe,SAAS,OAAO;CAC3B,IAAI,QAAQ,CAAC;CACb,IAAI,OAAO,UAAU,YACjB,YAAY,OAAO,KAAK,KACxB,iBAAiB,aACjB,MAAM,KAAK,KAAK;MAEf,IAAI,WAAW,KAAK,GACrB,MAAM,KAAK,iBAAiB,OAAO,QAAQ,MAAM,MAAM,YAAY,CAAC;MAEnE,IAAI,gBAAgB,KAAK,GAE1B,WAAW,MAAM,SAAS,OACtB,MAAM,KAAK,GAAI,MAAM,SAAS,KAAK,CAAE;MAGxC;EACD,MAAM,cAAc,OAAO,aAAa;EACxC,MAAM,IAAI,MAAM,yBAAyB,OAAO,QAAQ,cAAc,kBAAkB,gBAAgB,KAAK,cAAc,KAAK,GAAG;CACvI;CACA,OAAO;AACX;AACA,SAAS,cAAc,OAAO;CAC1B,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,OAAO;CAEX,OAAO,aADO,OAAO,oBAAoB,KACjB,CAAC,CAAC,KAAK,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;AAC9D"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region ../@warlock.js/node_modules/openai/internal/tslib.mjs
|
|
2
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
7
|
-
}
|
|
8
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { __classPrivateFieldGet, __classPrivateFieldSet };
|
|
16
|
-
//# sourceMappingURL=tslib.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tslib.mjs","names":[],"sources":["../../../../../../../../../@warlock.js/node_modules/openai/internal/tslib.mjs"],"sourcesContent":["function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;\n}\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport { __classPrivateFieldSet, __classPrivateFieldGet };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,uBAAuB,UAAU,OAAO,OAAO,MAAM,GAAG;CAC7D,IAAI,SAAS,KACT,MAAM,IAAI,UAAU,gCAAgC;CACxD,IAAI,SAAS,OAAO,CAAC,GACjB,MAAM,IAAI,UAAU,+CAA+C;CACvE,IAAI,OAAO,UAAU,aAAa,aAAa,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,QAAQ,GAC5E,MAAM,IAAI,UAAU,yEAAyE;CACjG,OAAO,SAAS,MAAM,EAAE,KAAK,UAAU,KAAK,IAAI,IAAK,EAAE,QAAQ,QAAS,MAAM,IAAI,UAAU,KAAK,GAAG;AACxG;AACA,SAAS,uBAAuB,UAAU,OAAO,MAAM,GAAG;CACtD,IAAI,SAAS,OAAO,CAAC,GACjB,MAAM,IAAI,UAAU,+CAA+C;CACvE,IAAI,OAAO,UAAU,aAAa,aAAa,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,QAAQ,GAC5E,MAAM,IAAI,UAAU,0EAA0E;CAClG,OAAO,SAAS,MAAM,IAAI,SAAS,MAAM,EAAE,KAAK,QAAQ,IAAI,IAAI,EAAE,QAAQ,MAAM,IAAI,QAAQ;AAChG"}
|