@songtonyli/dsh-cli 0.1.68 → 0.1.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +182 -0
- package/node_modules/@anthropic-ai/sdk/README.md +1 -1
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +66 -53
- package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +66 -53
- package/node_modules/@anthropic-ai/sdk/client.js +871 -856
- package/node_modules/@anthropic-ai/sdk/client.mjs +872 -851
- package/node_modules/@anthropic-ai/sdk/core/api-promise.js +71 -69
- package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +71 -65
- package/node_modules/@anthropic-ai/sdk/core/error.js +5 -3
- package/node_modules/@anthropic-ai/sdk/core/error.mjs +5 -3
- package/node_modules/@anthropic-ai/sdk/core/pagination.js +56 -51
- package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +56 -42
- package/node_modules/@anthropic-ai/sdk/core/resource.js +0 -1
- package/node_modules/@anthropic-ai/sdk/core/resource.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.js +214 -240
- package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +215 -241
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js +14 -19
- package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs +14 -13
- package/node_modules/@anthropic-ai/sdk/index.js +7 -7
- package/node_modules/@anthropic-ai/sdk/index.mjs +3 -3
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/constants.js +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +27 -24
- package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +27 -24
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +52 -49
- package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +52 -43
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/errors.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/errors.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/file-store.js +256 -258
- package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs +256 -243
- package/node_modules/@anthropic-ai/sdk/internal/headers.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/node.browser.mjs +7 -7
- package/node_modules/@anthropic-ai/sdk/internal/parse.js +2 -3
- package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +3 -4
- package/node_modules/@anthropic-ai/sdk/internal/request-options.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shim-types.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shim-types.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shims.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/shims.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.js +12 -7
- package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.mjs +6 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.js +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs +1 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/types.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/uploads.js +5 -2
- package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs +5 -2
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js +66 -63
- package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs +66 -56
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +12 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +11 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.js +0 -1
- package/node_modules/@anthropic-ai/sdk/internal/utils.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +596 -590
- package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +596 -590
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +544 -541
- package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +544 -541
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js +180 -174
- package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs +180 -153
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js +375 -359
- package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs +374 -319
- package/node_modules/@anthropic-ai/sdk/lib/internal/BetaToolRunnerStream.js +137 -0
- package/node_modules/@anthropic-ai/sdk/lib/internal/BetaToolRunnerStream.mjs +137 -0
- package/node_modules/@anthropic-ai/sdk/lib/internal/stub.js +6 -0
- package/node_modules/@anthropic-ai/sdk/lib/internal/stub.mjs +3 -0
- package/node_modules/@anthropic-ai/sdk/lib/internal/types.js +3 -0
- package/node_modules/@anthropic-ai/sdk/lib/internal/types.mjs +2 -0
- package/node_modules/@anthropic-ai/sdk/lib/middleware.js +20 -2
- package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs +20 -2
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js +628 -361
- package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs +629 -355
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js +600 -594
- package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs +599 -550
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.js +39 -36
- package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.mjs +39 -13
- package/node_modules/@anthropic-ai/sdk/lib/transform-json-schema.js +7 -5
- package/node_modules/@anthropic-ai/sdk/lib/transform-json-schema.mjs +7 -5
- package/node_modules/@anthropic-ai/sdk/package.json +3 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js +135 -133
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs +135 -133
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +39 -37
- package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +39 -37
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js +45 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs +45 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js +157 -155
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs +157 -155
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js +255 -253
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs +255 -253
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +8 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +1 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js +150 -148
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs +150 -148
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js +4 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs +2 -3
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +132 -112
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +131 -111
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/api-keys.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/api-keys.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/compliance-settings.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/compliance-settings.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/external-keys.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/external-keys.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/federation.js +11 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/federation.mjs +11 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/issuers.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/issuers.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules/rules.js +187 -185
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules/rules.mjs +187 -185
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules/workspaces.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules/workspaces.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation/rules.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/federation.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/invites.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/invites.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/organization.js +38 -36
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/organization.mjs +38 -36
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/rate-limits.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/rate-limits.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts/service-accounts.js +163 -161
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts/service-accounts.mjs +163 -161
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts/workspaces.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts/workspaces.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/service-accounts.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/users.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/users.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/members.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/members.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/rate-limits.js +6 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/rate-limits.mjs +6 -5
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/service-accounts.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/service-accounts.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/workspaces.js +97 -95
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/workspaces.mjs +97 -95
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/organization.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js +118 -116
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs +118 -116
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js +161 -159
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs +161 -159
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js +86 -84
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs +86 -84
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js +104 -102
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs +104 -102
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js +188 -186
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs +188 -186
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.js +25 -11
- package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs +25 -11
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.js +156 -154
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.mjs +156 -154
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/files.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/files.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +115 -113
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +115 -113
- package/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/models.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/shared.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/shared.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js +88 -86
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs +88 -86
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/skills.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -1
- package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -1
- package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +71 -56
- package/node_modules/@anthropic-ai/sdk/src/client.ts +138 -98
- package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/core/error.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/core/resource.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +3 -39
- package/node_modules/@anthropic-ai/sdk/src/index.ts +10 -17
- package/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/errors.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/node.browser.ts +7 -7
- package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +8 -13
- package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +1 -3
- package/node_modules/@anthropic-ai/sdk/src/internal/shim-types.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/shims.ts +4 -5
- package/node_modules/@anthropic-ai/sdk/src/internal/stainless-helper-header.ts +7 -1
- package/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/src/internal/types.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts +5 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +16 -4
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/query.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/internal/utils.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -2
- package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +9 -6
- package/node_modules/@anthropic-ai/sdk/src/lib/beta-parser.ts +1 -3
- package/node_modules/@anthropic-ai/sdk/src/lib/environments/worker.ts +29 -15
- package/node_modules/@anthropic-ai/sdk/src/lib/internal/BetaToolRunnerStream.ts +170 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/internal/stub.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/internal/types.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/src/lib/middleware.ts +20 -2
- package/node_modules/@anthropic-ai/sdk/src/lib/parser.ts +1 -3
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaRunnableTool.ts +2 -1
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaToolRunner.ts +579 -240
- package/node_modules/@anthropic-ai/sdk/src/lib/transform-json-schema.ts +8 -6
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/agents.ts +147 -53
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/index.ts +1 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/versions.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +67 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployment-runs.ts +13 -8
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployments.ts +43 -27
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/dreams.ts +279 -89
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/environments.ts +5 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/work.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +191 -161
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memories.ts +82 -23
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-stores.ts +6 -5
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-versions.ts +60 -43
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +27 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +47 -21
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +741 -176
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +30 -7
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/api-keys.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/compliance-settings.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/external-keys.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/federation.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/issuers.ts +4 -7
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/rules/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/rules/rules.ts +4 -8
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/rules/workspaces.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation/rules.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/federation.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/index.ts +6 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/invites.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/organization.ts +12 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/rate-limits.ts +112 -6
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/service-accounts/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/service-accounts/service-accounts.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/service-accounts/workspaces.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/service-accounts.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/users.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/workspaces/index.ts +2 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/workspaces/members.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/workspaces/rate-limits.ts +58 -14
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/workspaces/service-accounts.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/workspaces/workspaces.ts +7 -5
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/workspaces.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/events.ts +234 -82
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/index.ts +10 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/resources.ts +5 -9
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/sessions.ts +85 -46
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/events.ts +2 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/threads.ts +21 -15
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/skills.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/versions.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/certificates.ts +7 -7
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/tunnels.ts +3 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/user-profiles.ts +300 -38
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/credentials.ts +37 -35
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/vaults.ts +1 -3
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/webhooks.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +3 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/files.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +17 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +17 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +289 -93
- package/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/models.ts +12 -9
- package/node_modules/@anthropic-ai/sdk/src/resources/shared.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/index.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/skills.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/versions.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/skills.ts +0 -2
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.ts +3 -2
- package/node_modules/@anthropic-ai/sdk/src/tsconfig.json +13 -3
- package/node_modules/@anthropic-ai/sdk/src/version.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js +0 -6
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs +0 -6
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js +694 -691
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs +691 -631
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js +12 -12
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js +207 -200
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs +197 -186
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js +5 -5
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js +3 -3
- package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js +2 -2
- package/node_modules/@anthropic-ai/sdk/version.js +1 -1
- package/node_modules/@anthropic-ai/sdk/version.mjs +1 -1
- package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh/lib/bin.js +1 -1
- package/node_modules/@deepseek-ai/dsh/package.json +121 -117
- package/node_modules/@deepseek-ai/dsh-acp/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-acp/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-acp/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-acp/lib/index.js +59 -17
- package/node_modules/@deepseek-ai/dsh-acp/package.json +23 -22
- package/node_modules/@deepseek-ai/dsh-acp-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-acp-app/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-acp-app/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-acp-app/cordis.patch.yml +0 -1
- package/node_modules/@deepseek-ai/dsh-acp-app/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-agent/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-agent-instructions/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-agent-instructions/README.md +15 -7
- package/node_modules/@deepseek-ai/dsh-agent-instructions/README.zh.md +15 -7
- package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +226 -91
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +24 -22
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +6 -3
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +6 -3
- package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +67 -25
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +17 -21
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/practices.md +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/lib/index.js +1 -5
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +477 -237
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +41 -41
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +44 -20
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +43 -13
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +227 -41
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +199 -21
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js +36 -11
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/projection-store.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.js +7 -3
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +40 -10
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +6 -4
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/skill-catalog.js +7 -6
- package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +73 -70
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/index.js +13 -9
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +21 -17
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.remote-client.js +10 -10
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/index.js +13 -10
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +18 -17
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-app-boot/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +61 -8
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-authorization/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-base/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-base/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +13 -25
- package/node_modules/@deepseek-ai/dsh-base/package.json +94 -94
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-connection/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-connection/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +94 -38
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-store/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +19 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +19 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +5539 -4837
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +38 -38
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +26 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +33 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +26 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +46 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +13 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +22 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.i18n.yaml +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +11 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +9 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +9 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +303 -94
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +6 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +6 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/CommandText.module.css +12 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DisclosureRow.module.css +15 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ImageLightbox.module.css +12 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TerminalBlock.module.css +3 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +224 -120
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/CommandText.d.ts +16 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PermissionIcon.d.ts +12 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TerminalBlock.d.ts +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/lib/client.js +87 -87
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +54 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +437 -91
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +73 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +27 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +50 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +19 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +13 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +13 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +471 -104
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/index.js +134 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +5 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +5 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +52 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +28 -26
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +60 -43
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.md +3 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.zh.md +3 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +20 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +52 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-commands/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-config-editor/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +153 -41
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/index.js +9 -9
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +30 -22
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.remote-client.js +12 -12
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/index.js +12 -8
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-credentials-local/lib/index.js +7 -3
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/lib/index.js +25 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/lib/types/index.js +22 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-deque/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +35 -35
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +19 -21
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +19 -21
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +748 -978
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +44 -22
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/lifecycle.js +18 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +4 -19
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/session-message.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/cordis.patch.yml +0 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +7 -5
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/index.js +4 -5
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +41 -39
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/icon.svg +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/{dsh-hook-protocol → dsh-experimental-badge-skill-bundle}/package.json +18 -8
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/README.md +90 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/README.zh.md +90 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/lib/client.js +4766 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/lib/index.js +250 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/lib/typert.host.js +137 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/lib/typert.remote-client.js +72 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +100 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +298 -24
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +34 -32
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/README.md +81 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/README.zh.md +81 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/cordis.patch.yml +8 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/icon.svg +5 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +52 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/AutocompleteHistory-BJXpeT8x.js +73 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{FormatterActions-FcPgI0uV.js → FormatterActions-D6HaA-6R.js} +17 -6
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/MapUtilities-C6UNTa-e.js +50 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/ResolverBase-BwI5i_Uj.js +33 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/Runnable-Mz0aa-Zm.js +22 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/StorageItem-_wZ3i4k_.js +12 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/StringUtilities-CMDxNrEc.js +190 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{accessibility-BY7oM_Zr.js → accessibility-B8zUkXQh.js} +225 -226
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{acorn-_jSanihy.js → acorn-yx0Qbj0X.js} +58 -51
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{adorners-CGSl65ls.js → adorners-DUGSZ7j5.js} +2 -4
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{ai_assistance-B1wOs26S.js → ai_assistance-Clc1xIf6.js} +571 -558
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{angular-Dutmu-L9.js → angular-CyYAyotN.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{animation-1CaxAvi1.js → animation-Cb5WQenF.js} +91 -92
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{application-a6KsIIks.js → application-oBBqvcZp.js} +2237 -2232
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{autofill-DRlJ5WO3.js → autofill--bByRQmk.js} +24 -24
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/autofill_manager-XEkk9oZ5.js +59 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{bindings-Cr5O2fL5.js → bindings-CAIo-k1a.js} +492 -462
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{browser-DL1S1Kiu.js → browser-DveWkZD5.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{browser_debugger-DfivmPio.js → browser_debugger--7vbe3d1.js} +146 -145
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{changes-CzTmqALz.js → changes-DjWi1v9d.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{changes-o7rU211I.js → changes-xRx2n786.js} +46 -45
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{code_highlighter-Bh9ro2mP.js → code_highlighter-H8UOTYgG.js} +6 -3
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{codemirror-CBR9VJma.js → codemirror-CENmPHF2.js} +157 -137
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{color_picker-D9TxczuM.js → color_picker-BIF87165.js} +273 -273
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{common-qd_KLeYO.js → common-DMSVbaSb.js} +1077 -1439
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{common-LSsbP0lU.js → common-Ec_cVEiV.js} +2683 -2500
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{common-DhyylFJO.js → common-kU2bwxmb.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{components-DB4oenRq.js → components-B3I3NG-4.js} +68 -67
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{components-CT445-PD.js → components-CaH94O_V.js} +170 -116
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{components-CSVBAbW3.js → components-CsKivuxU.js} +258 -293
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{console-DwIHHkNd.js → console-BmwBLvHk.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{console-VAMtSW-X.js → console-CUdjJ9Xp.js} +596 -601
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{console_counters-BpgnYGWt.js → console_counters-BScL6IPX.js} +26 -26
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{coverage-4LvbYA2T.js → coverage-HrH22f9l.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{coverage-CYnEOg6T.js → coverage-NhXPoU6-.js} +156 -150
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{cpp-CdElSCaB.js → cpp-DaQzQ7EV.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{css_overview-s6ziZpq8.js → css_overview-CxLMtTr9.js} +344 -345
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{data_grid-UqFJQMC9.js → data_grid-CWSfqJp7.js} +109 -102
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{developer_resources-BEGIXIcF.js → developer_resources-BATAp86N.js} +38 -37
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{diff-qn55JSCS.js → diff-DXcO6Sla.js} +24 -7
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{dom_extension-B0UaTHZj.js → dom_extension-BLny9Waw.js} +38 -14
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{elements-B5_H3hT1.js → elements-BU8z2iUE.js} +1881 -1776
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{elements-KASgrHtM.js → elements-Ck9kJ4zi.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{emulation-DZ65TT-w.js → emulation-BIhr0HsX.js} +61 -59
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{emulation-CbCy_GsY.js → emulation-CJ_3s3iH.js} +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{emulation-C518g-x2.js → emulation-CczS-vUV.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{emulation-3hQQL2yf.js → emulation-DSV_4uNT.js} +277 -271
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{event_listeners-DhTNoGOp.js → event_listeners-DnM83R-t.js} +63 -63
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/explain-D5jDyrH1.js +745 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{greendev-yysgT4ng.js → greendev-IsUdA61g.js} +38 -38
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{heap_snapshot-CZt2KUPL.js → heap_snapshot-CTdRQlts.js} +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{helper-DbYCW1m0.js → helper-YgGAtBRb.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{helpers-C-Rya7xk.js → helpers-BQtqX6SJ.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{i18n--ZipiwZ9.js → i18n-BX_qxSex.js} +4 -3
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{icon_button-BKsdgzo3.js → icon_button-AiKYfeBf.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{inline_editor-DaZpS-8x.js → inline_editor-C2tEGunK.js} +218 -215
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{inspector_main-DkFTp37J.js → inspector_main-BqySmYv0.js} +75 -73
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{issue_counter-rspQhd2r.js → issue_counter-BX-KAvOZ.js} +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{issues-DrqiU8Pw.js → issues-DaMGmAC2.js} +469 -468
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{issues_manager-DZmsx4wr.js → issues_manager-e2pmpVIp.js} +537 -599
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{java-7g_qfFa2.js → java-62KG1Vpd.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{layer_viewer-farvqWTo.js → layer_viewer-pReGOxmi.js} +101 -100
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{layers-BO25qbXj.js → layers-BsFRGUMJ.js} +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{legacy-DOCLCisy.js → legacy-BYV0pRId.js} +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{legacy-Dv5Py_9p.js → legacy-md3HQs_7.js} +6124 -5944
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{less-DXiRNbd4.js → less-DmILOm_5.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{lighthouse-BvKq1-jB.js → lighthouse-BZB1Bmby.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{lighthouse-CawSQT5Y.js → lighthouse-NimZl1cI.js} +181 -191
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{linear_memory_inspector-CGR2Z7Ph.js → linear_memory_inspector-p2-Ih16z.js} +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{live-metrics-4EBbno52.js → live-metrics-CTk3dlLJ.js} +73 -73
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{main-DY6diJ-3.js → main-B8aRedWL.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/main-CU6VhZTa.js +753 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{markdown-tZoR6Bsu.js → markdown-rVMoMV9q.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{markdown_view-CxbhmCgQ.js → markdown_view-JGM1CTOq.js} +15 -12
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{marked-zGgfoDxO.js → marked-CGxJO_CC.js} +20 -14
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{media-DEVFcgOQ.js → media-Cf52Rd9o.js} +236 -234
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{media-BeuRvD7L.js → media-Z6GjdmRm.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{menus-Cjq-uD73.js → menus-Cu1y5CSe.js} +85 -83
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{mobile_throttling-CuGRbE5B.js → mobile_throttling-CvudVoXO.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{mobile_throttling-B_3ewTmi.js → mobile_throttling-dNBk2ECF.js} +174 -172
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{network-CpKopkw0.js → network-BX1qe3_D.js} +1237 -1230
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{network-C-3jvhoX.js → network-B_IYxadp.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{object_ui-cmgZzf81.js → object_ui-Bkc4pMRS.js} +255 -249
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{object_ui-BLzT-Z2e.js → object_ui-CYZ9Q9W6.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{perf_ui-uax9xKLn.js → perf_ui-Ch0z1TZ3.js} +409 -405
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{perf_ui-CYbvqQmF.js → perf_ui-Dlpk1iY7.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{performance_monitor-B_RXvxih.js → performance_monitor-BTc9fFSa.js} +55 -56
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{php-tl5gKrxu.js → php-DVXaM5js.js} +7 -5
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/platform-D4TUCh2P.js +7 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{profiler-C7HGH_E8.js → profiler-CBSzVAE7.js} +707 -703
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{protocol_client-Cwf_jb8R.js → protocol_client-L4-X1Qrb.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/protocol_monitor-B0h70b5w.js +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{protocol_monitor-DW-p-6yH.js → protocol_monitor-DOPDE4ZB.js} +221 -225
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{puppeteer-ZLIws8kb.js → puppeteer-xGpmPP-i.js} +71 -89
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{python-D9AdRkMm.js → python-kisakN4d.js} +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{quick_open-C_ga_4Hq.js → quick_open-BUuhuOIx.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{quick_open-DJB3P9Ki.js → quick_open-CdyeK7mh.js} +92 -94
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{recorder-DGA0ByVf.js → recorder-DJPAdS_H.js} +365 -365
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{request_link_icon-DPUTK49Y.js → request_link_icon-D2WGdvuX.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{root-DbVQo07X.js → root-DdvV-xPu.js} +52 -74
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{sass-BPQlMmw2.js → sass-CIsRpUiU.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{security-BvuW7HEs.js → security-D2VNjFFC.js} +175 -181
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{sensors-xT8kT9Ea.js → sensors-DjLhEaOA.js} +62 -62
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{settings-z07EmGki.js → settings-D4dmilBC.js} +235 -229
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{settings_ui-gaRa3Hhd.js → settings_ui-DJR_-8cd.js} +54 -53
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{snackbars-CGAwPElE.js → snackbars-DazoAb8B.js} +1169 -1172
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{snippets-Dfmqv8f-.js → snippets-BKl1jevC.js} +51 -50
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{source_frame-_RZ4t3FM.js → source_frame-DpMQZC8A.js} +166 -165
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{sources-DbXkdCVM.js → sources-BS1uHO2R.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{sources-C5ZQ_xfd.js → sources-D4DLpkXp.js} +1131 -1140
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{suggestion_input-Dw2hCSbK.js → suggestion_input-oulk6E-b.js} +6 -16
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{svelte-DJS1itbE.js → svelte-C62W4gaL.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{text_editor-DLc_XoDa.js → text_editor-zHwTtDDW.js} +374 -444
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{text_utils-ohNt_gua.js → text_utils-DWSliayn.js} +161 -82
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{theme_support-DXvy8kfg.js → theme_support-BF2WpOah.js} +49 -34
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{third-party-web-DGiPoc0U.js → third-party-web-Dm5IRT3g.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{timeline-E7l2B_oh.js → timeline-Dt3nmxBb.js} +2407 -2389
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{timeline-Cg6JhvmN.js → timeline-yO_pXh7Z.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{utils-CIWN0B30.js → utils-TeCpVsRE.js} +50 -52
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{vue-CjH9yovn.js → vue-rRx4yj6I.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{wast-CbGHiqaW.js → wast-BJdLzx63.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{web_audio-CbMU64Js.js → web_audio-DuonfZJu.js} +25 -25
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{webauthn-Dlb2Haex.js → webauthn-5JQ01zyM.js} +24 -24
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{whats_new-DtTF4nMn.js → whats_new-nGMut_wC.js} +18 -19
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{xml-DI9dcP5w.js → xml-qmN-BlAu.js} +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/entrypoints/devtools_app/devtools_app.js +2444 -2443
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/entrypoints/formatter_worker/formatter_worker-entrypoint.js +116 -118
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +289 -192
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/entrypoints/lighthouse_worker/lighthouse_worker.js +428 -403
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +31 -44
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/panels/recorder/injected/injected.generated.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/resource-manifest.json +387 -357
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/index.js +9 -0
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/cordis.patch.yml +16 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/icon.svg +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +50 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +15 -7
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/README.md +82 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/README.zh.md +82 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/cordis.patch.yml +14 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/icon.svg +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +50 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/cordis.patch.yml +12 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/icon.svg +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +49 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +8 -6
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/worker.js +15 -1
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +10 -8
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/cordis.patch.yml +19 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/icon.svg +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +51 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +11 -16
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.i18n.yaml +46 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.md +96 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.zh.md +96 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/cordis.patch.yml +5 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/icon.svg +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/lib/index.js +66 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +67 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/README.i18n.yaml +49 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/README.md +124 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/README.zh.md +124 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/index.js +935 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/deepseek.js +283 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/error.js +14 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/index.js +148 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/provider.js +215 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/storage.js +215 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +68 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +6 -6
- package/node_modules/{@octokit/request-error → @deepseek-ai/dsh-experimental-worktree}/LICENSE +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/README.md +98 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/README.zh.md +98 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/index.js +368 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/directory.d.ts +7 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/index.d.ts +54 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/process.d.ts +29 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/types.d.ts +20 -0
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +58 -0
- package/node_modules/@deepseek-ai/dsh-file-reference/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-file-reference-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-file-reference-local/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-file-reference-local/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-file-reference-local/lib/index.js +15 -10
- package/node_modules/@deepseek-ai/dsh-file-reference-local/lib/types/index.js +12 -10
- package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +15 -11
- package/node_modules/@deepseek-ai/dsh-fs/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-goal/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-headless/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-headless/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-headless/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-headless/cordis.patch.yml +0 -1
- package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +20 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +24 -17
- package/node_modules/@deepseek-ai/dsh-hmr/lib/index.js +9 -3
- package/node_modules/@deepseek-ai/dsh-hmr/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-home-paths/README.i18n.yaml +13 -10
- package/node_modules/@deepseek-ai/dsh-home-paths/README.md +16 -5
- package/node_modules/@deepseek-ai/dsh-home-paths/README.zh.md +16 -5
- package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +65 -4
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/lib/index.js +30 -18
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +15 -13
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-host-webserver/README.i18n.yaml +23 -20
- package/node_modules/@deepseek-ai/dsh-host-webserver/README.md +31 -10
- package/node_modules/@deepseek-ai/dsh-host-webserver/README.zh.md +31 -10
- package/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +207 -63
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +5 -3
- package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm/README.md +19 -0
- package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +19 -0
- package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +21 -8
- package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +12 -4
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +19 -8
- package/node_modules/@deepseek-ai/dsh-llm/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +37 -14
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +37 -37
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/lib/index.js +8 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +10 -4
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +10 -4
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +150 -61
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +21 -8
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-otel/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-otel/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-otel/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-otel/lib/index.js +14 -4
- package/node_modules/@deepseek-ai/dsh-otel/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-persona/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-plan-mode/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-plan-mode/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-plan-mode/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-plan-mode/lib/index.js +31 -26
- package/node_modules/@deepseek-ai/dsh-plan-mode/lib/types/index.js +35 -27
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +7 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +7 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +142 -20
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +24 -17
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +19 -12
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/build-approval.js +35 -5
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +55 -24
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/official-install-target.js +54 -0
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/tools.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/lib/index.js +22 -13
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/lib/types/index.js +25 -15
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.md +2 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.zh.md +2 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/index.js +37 -12
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +21 -8
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.i18n.yaml +14 -14
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-app/cordis.patch.yml +4 -9
- package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +93 -11
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +23 -21
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/README.md +6 -6
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/README.zh.md +6 -6
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/cordis.patch.yml +9 -0
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +29 -26
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.md +6 -1
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.zh.md +6 -1
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session/README.i18n.yaml +7 -4
- package/node_modules/@deepseek-ai/dsh-session/README.md +13 -1
- package/node_modules/@deepseek-ai/dsh-session/README.zh.md +13 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +134 -18
- package/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +120 -5
- package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session/lib/types/types.js +14 -14
- package/node_modules/@deepseek-ai/dsh-session/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-format/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-format/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-format/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/index.js +4 -1
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/types/index.js +4 -1
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-session-persistence/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-persistence/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-session-persistence/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +23 -19
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +92 -12
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-projection/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-projection/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection/lib/index.js +1 -2
- package/node_modules/@deepseek-ai/dsh-session-projection/lib/types/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-query/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-session-query/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-session-query/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +9 -7
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +35 -34
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/lib/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +22 -24
- package/node_modules/@deepseek-ai/dsh-session-title/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-session-title/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-session-title/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-session-title/lib/index.js +8 -4
- package/node_modules/@deepseek-ai/dsh-session-title/lib/types/index.js +9 -4
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/README.i18n.yaml +64 -0
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/README.md +120 -0
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/README.zh.md +120 -0
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/lib/index.js +127 -0
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +48 -0
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/README.i18n.yaml +16 -16
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/README.md +10 -10
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/README.zh.md +10 -10
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/lib/index.js +91 -8
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +15 -13
- package/node_modules/@deepseek-ai/dsh-session-title-llm/README.i18n.yaml +29 -29
- package/node_modules/@deepseek-ai/dsh-session-title-llm/README.md +21 -20
- package/node_modules/@deepseek-ai/dsh-session-title-llm/README.zh.md +21 -20
- package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +60 -81
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-settings/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-shell/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-skill/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-skill-badge/README.i18n.yaml +13 -13
- package/node_modules/@deepseek-ai/dsh-skill-badge/README.md +10 -8
- package/node_modules/@deepseek-ai/dsh-skill-badge/README.zh.md +10 -8
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +17 -14
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-skill-office/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-spill/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +34 -34
- package/node_modules/@deepseek-ai/dsh-subagent/README.md +32 -26
- package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +32 -26
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1552 -1477
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +59 -48
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/activation.js +112 -0
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/catalog.js +34 -30
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +1 -3
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/continuation-messages.js +18 -23
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/descriptor.js +20 -21
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +75 -95
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/lifecycle.js +9 -100
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/list-children.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +1294 -0
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/out-of-process.js +25 -45
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/structured.js +130 -0
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/types.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +48 -48
- package/node_modules/@deepseek-ai/dsh-subagent-acp/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-subagent-acp/README.md +3 -4
- package/node_modules/@deepseek-ai/dsh-subagent-acp/README.zh.md +3 -4
- package/node_modules/@deepseek-ai/dsh-subagent-acp/lib/index.js +5 -55
- package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/README.i18n.yaml +14 -14
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/README.md +8 -9
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/README.zh.md +8 -9
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/lib/index.js +0 -5
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +11 -13
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.i18n.yaml +14 -14
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.md +6 -7
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.zh.md +6 -7
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/lib/index.js +0 -4
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +15 -16
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.md +2 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.zh.md +2 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/index.js +5 -3
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-system-prompt/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-system-prompt/README.md +10 -6
- package/node_modules/@deepseek-ai/dsh-system-prompt/README.zh.md +10 -6
- package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +50 -9
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-terminal/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-terminal/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-terminal-bash/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-terminal-bash/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +3 -2
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +20 -18
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-timeout/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-timeout/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-timeout/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-timeout/lib/index.js +12 -3
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +21 -8
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/lib/index.js +35 -21
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +33 -30
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/lib/index.js +7 -3
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +22 -20
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +293 -94
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +6 -3
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +6 -3
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +69 -56
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +32 -30
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +25 -21
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +27 -25
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-tool-jobs/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-tool-jobs/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-jobs/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-present/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-present/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-tool-present/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-tool-present/lib/index.js +7 -4
- package/node_modules/@deepseek-ai/dsh-tool-present/lib/types/index.js +3 -5
- package/node_modules/@deepseek-ai/dsh-tool-present/package.json +19 -17
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.md +4 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.zh.md +4 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/lib/index.js +37 -20
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +31 -28
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.md +3 -0
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.zh.md +3 -0
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/lib/index.js +7 -3
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +24 -22
- package/node_modules/@deepseek-ai/dsh-tool-ralph/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-tool-ralph/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-ralph/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-tool-session-query/README.i18n.yaml +97 -0
- package/node_modules/@deepseek-ai/dsh-tool-session-query/README.md +186 -0
- package/node_modules/@deepseek-ai/dsh-tool-session-query/README.zh.md +186 -0
- package/node_modules/@deepseek-ai/dsh-tool-session-query/lib/index.js +1034 -0
- package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +61 -0
- package/node_modules/@deepseek-ai/dsh-tool-skill/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-skill/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-skill/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-skill/lib/index.js +97 -5
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +16 -14
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +51 -51
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +27 -29
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +26 -28
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +108 -237
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +20 -24
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +4 -5
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +4 -5
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-terminal/README.i18n.yaml +100 -0
- package/node_modules/@deepseek-ai/dsh-tool-terminal/README.md +186 -0
- package/node_modules/@deepseek-ai/dsh-tool-terminal/README.zh.md +186 -0
- package/node_modules/@deepseek-ai/dsh-tool-terminal/lib/index.js +650 -0
- package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +64 -0
- package/node_modules/@deepseek-ai/dsh-tool-todo/lib/types/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/README.i18n.yaml +46 -0
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/README.md +90 -0
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/README.zh.md +90 -0
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/lib/index.js +45 -0
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +45 -0
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-tools/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-tools/README.md +9 -7
- package/node_modules/@deepseek-ai/dsh-tools/README.zh.md +9 -7
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +17 -19
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/index.js +17 -10
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/ptc.js +4 -2
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +1 -2
- package/node_modules/@deepseek-ai/dsh-tools/package.json +24 -22
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +5 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +5 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/cordis.patch.yml +0 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +117 -53
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +79 -79
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +9 -5
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-time/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +18 -21
- package/node_modules/@deepseek-ai/dsh-web-app/README.md +30 -22
- package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +30 -22
- package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +18 -24
- package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +44 -41
- package/node_modules/@deepseek-ai/dsh-web-app/lib/startup.js +17 -6
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +142 -143
- package/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +1 -26
- package/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +1 -26
- package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +1 -26
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-C5TXjxs_.js +127 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-CyN1a9tV.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/asciidoc-CSVQ5wI8.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{bat-BkioyH1T.js → bat-CickPsom.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DddhVWhK.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{graphql-DujV8YkJ.js → graphql-B1S3xuDR.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{http-DcV90OkR.js → http-Ddl8tKhJ.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{julia-BpJ6DjL_.js → julia-BfSmLjIk.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{latex-B4C7GdlO.js → latex-B2nUCzCX.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{php-LEPfNACG.js → php-G1-V1D4R.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{powershell-Dpen1YoG.js → powershell-BmBUJMz7.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/r-Cf5RLm7j.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{rst-BbocfKWr.js → rst-qb8661zE.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-R292Iif0.js → ruby-D3_WCtdO.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{scala-C151Ov-r.js → scala-CqE71os6.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{svelte-DNMY6jOf.js → svelte-Dhjv0SwI.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-C2oV4EkX.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/system-verilog-0hqHdDBg.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{vb-D17OF-Vu.js → vb-Cu-pLBUe.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/verilog-nZwndyjY.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{vue-Dq2x6432.js → vue-CjW_c7H6.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-CCJJTK99.js → vendor-BlFz1smR.js} +32 -32
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/vendor-D2ODLP6r.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +4 -4
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +25 -22
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-win32-process/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +25 -14
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +36 -33
- package/node_modules/@deepseek-ai/dsh-working-directory/README.i18n.yaml +46 -0
- package/node_modules/@deepseek-ai/dsh-working-directory/README.md +90 -0
- package/node_modules/@deepseek-ai/dsh-working-directory/README.zh.md +90 -0
- package/node_modules/@deepseek-ai/dsh-working-directory/lib/index.js +167 -0
- package/node_modules/@deepseek-ai/dsh-working-directory/package.json +56 -0
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-workspace-changes/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-workspace-changes/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-workspace-changes/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +25 -34
- package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/capture.js +0 -27
- package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +22 -4
- package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.js +4 -8
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +18 -11
- package/node_modules/@earendil-works/pi-ai/README.md +16 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +30 -29
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js +76 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +11 -79
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +58 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js +98 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +15 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +5 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js +162 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +6 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +9 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +10 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +5 -89
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +65 -7
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js +11 -14
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +51 -27
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/models.js +6 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js +46 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +25 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +12 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +4 -12
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth-page.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +5 -2
- package/node_modules/@earendil-works/pi-ai/package.json +3 -3
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +474 -114
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +468 -115
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/{src-NAgB4Mp8.cjs → src-oZBjf3U1.cjs} +131 -41
- package/node_modules/@modelcontextprotocol/client/dist/{src-D_zzAWoS.mjs → src-xKF0PJN-.mjs} +120 -36
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +8 -2
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +8 -2
- package/node_modules/@modelcontextprotocol/client/package.json +4 -4
- package/node_modules/@modelcontextprotocol/core/dist/{auth-CUe6YdwF.mjs → auth-BNDyLTqp.mjs} +7 -4
- package/node_modules/@modelcontextprotocol/core/dist/{auth-CfDMXiII.cjs → auth-D1CeV_Jr.cjs} +7 -4
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +1 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +1 -1
- package/node_modules/@modelcontextprotocol/core/package.json +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/types/LogRecord.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/api-logs/package.json +7 -7
- package/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/core/build/src/ExportResult.js +1 -1
- package/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js +1 -1
- package/node_modules/@opentelemetry/core/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/core/package.json +7 -7
- package/node_modules/@opentelemetry/otlp-exporter-base/README.md +30 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/ExporterMetrics.js +104 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/OTLPExporterBase.js +3 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/create-legacy-browser-delegate.js +36 -2
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/index-browser-http.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/index-node-http.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/index.js +1 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-browser-http-export-delegate.js +8 -4
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-export-delegate.js +19 -6
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-http-export-delegate.js +30 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-network-export-delegate.js +2 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/semconv.js +100 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/ExporterMetrics.js +104 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/OTLPExporterBase.js +3 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/configuration/create-legacy-browser-delegate.js +36 -2
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/index-browser-http.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/index-node-http.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/index.js +1 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/otlp-browser-http-export-delegate.js +8 -4
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/otlp-export-delegate.js +19 -6
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/otlp-http-export-delegate.js +30 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/otlp-network-export-delegate.js +2 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/semconv.js +100 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/ExporterMetrics.js +108 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/OTLPExporterBase.js +3 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/configuration/create-legacy-browser-delegate.js +38 -3
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/configuration/legacy-node-configuration.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/index-browser-http.js +2 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/index-node-http.js +2 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/index.js +3 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/otlp-browser-http-export-delegate.js +8 -4
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/otlp-export-delegate.js +19 -6
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/otlp-http-export-delegate.js +32 -2
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/otlp-network-export-delegate.js +2 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/semconv.js +103 -0
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/package.json +9 -9
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/i-exporter-metrics-helper.js +6 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/index.js +3 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/index.js +7 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/json/logs.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/protobuf/logs.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/index.js +12 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/index.js +4 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/i-exporter-metrics-helper.js +6 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/index.js +3 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/index.js +7 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/json/logs.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/protobuf/logs.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/metrics/index.js +12 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/index.js +4 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/i-exporter-metrics-helper.js +7 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/src/index.js +7 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/index.js +8 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal-types.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/json/logs.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/protobuf/logs.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/index.js +13 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal-types.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/trace/index.js +5 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal-types.js +2 -2
- package/node_modules/@opentelemetry/otlp-transformer/package.json +15 -15
- package/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ServiceInstanceIdDetector.js +6 -1
- package/node_modules/@opentelemetry/resources/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/esnext/detectors/platform/node/ServiceInstanceIdDetector.js +6 -1
- package/node_modules/@opentelemetry/resources/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ServiceInstanceIdDetector.js +6 -1
- package/node_modules/@opentelemetry/resources/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/resources/package.json +9 -9
- package/node_modules/@opentelemetry/sdk-logs/README.md +5 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.js +33 -6
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LoggerProvider.js +3 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esm/MultiLogRecordProcessor.js +3 -5
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/BatchLogRecordProcessorBase.js +19 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/LogRecordProcessorMetrics.js +63 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/{SdkLogRecord.js → ReadWriteLogRecord.js} +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SimpleLogRecordProcessor.js +10 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/LoggerProviderSharedState.js +2 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esm/semconv.js +106 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.js +33 -6
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LoggerProvider.js +3 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/MultiLogRecordProcessor.js +3 -5
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/BatchLogRecordProcessorBase.js +19 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/LogRecordProcessorMetrics.js +63 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/{SdkLogRecord.js → ReadWriteLogRecord.js} +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SimpleLogRecordProcessor.js +10 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/LoggerProviderSharedState.js +2 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/semconv.js +106 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.js +33 -6
- package/node_modules/@opentelemetry/sdk-logs/build/src/LoggerProvider.js +3 -4
- package/node_modules/@opentelemetry/sdk-logs/build/src/MultiLogRecordProcessor.js +3 -5
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.js +18 -3
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/LogRecordProcessorMetrics.js +67 -0
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/{SdkLogRecord.js → ReadWriteLogRecord.js} +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/SimpleLogRecordProcessor.js +10 -0
- package/node_modules/@opentelemetry/sdk-logs/build/src/internal/LoggerProviderSharedState.js +2 -4
- package/node_modules/@opentelemetry/sdk-logs/build/src/semconv.js +107 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/package.json +11 -11
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/ExponentialHistogram.js +3 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/ExponentMapping.js +3 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/LogarithmMapping.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/ieee754.js +24 -23
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/view/Aggregation.js +4 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/aggregator/ExponentialHistogram.js +3 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/aggregator/exponential-histogram/mapping/ExponentMapping.js +3 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/aggregator/exponential-histogram/mapping/LogarithmMapping.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/aggregator/exponential-histogram/mapping/ieee754.js +24 -23
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/view/Aggregation.js +4 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.js +3 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ExponentMapping.js +3 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/LogarithmMapping.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ieee754.js +26 -25
- package/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.js +2 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/package.json +9 -9
- package/node_modules/@opentelemetry/sdk-trace/build/esm/TracerProvider.js +2 -2
- package/node_modules/@opentelemetry/sdk-trace/build/esm/export/SimpleSpanProcessor.js +19 -3
- package/node_modules/@opentelemetry/sdk-trace/build/esm/sampler/TraceIdRatioBasedSampler.js +2 -1
- package/node_modules/@opentelemetry/sdk-trace/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace/build/esnext/TracerProvider.js +2 -2
- package/node_modules/@opentelemetry/sdk-trace/build/esnext/export/SimpleSpanProcessor.js +19 -3
- package/node_modules/@opentelemetry/sdk-trace/build/esnext/sampler/TraceIdRatioBasedSampler.js +2 -1
- package/node_modules/@opentelemetry/sdk-trace/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace/build/src/Sampler.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace/build/src/TracerProvider.js +2 -2
- package/node_modules/@opentelemetry/sdk-trace/build/src/export/SimpleSpanProcessor.js +19 -3
- package/node_modules/@opentelemetry/sdk-trace/build/src/sampler/TraceIdRatioBasedSampler.js +2 -1
- package/node_modules/@opentelemetry/sdk-trace/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace/package.json +11 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/node-addon-native-custom-loader/package.json +1 -1
- package/node_modules/node-addon-require-builtin/package.json +2 -2
- package/node_modules/node-pty/lib/windowsPtyAgent.js +2 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/package.json +342 -336
- package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.js +0 -28
- package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.mjs +0 -25
- package/node_modules/@anthropic-ai/sdk/src/lib/tools/CompactionControl.ts +0 -57
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/autofill_manager-CxcaWQiv.js +0 -58
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/explain-CNIdfhW8.js +0 -747
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/main-BLMNMheT.js +0 -755
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/platform-BzB373NB.js +0 -600
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/protocol_monitor-mWRlFT7z.js +0 -2
- package/node_modules/@deepseek-ai/dsh-hook-protocol/README.i18n.yaml +0 -61
- package/node_modules/@deepseek-ai/dsh-hook-protocol/README.md +0 -142
- package/node_modules/@deepseek-ai/dsh-hook-protocol/README.zh.md +0 -142
- package/node_modules/@deepseek-ai/dsh-hook-protocol/lib/index.js +0 -377
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/README.i18n.yaml +0 -88
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/README.md +0 -193
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/README.zh.md +0 -193
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/lib/index.js +0 -405
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/package.json +0 -57
- package/node_modules/@deepseek-ai/dsh-hooks-codex/README.i18n.yaml +0 -88
- package/node_modules/@deepseek-ai/dsh-hooks-codex/README.md +0 -188
- package/node_modules/@deepseek-ai/dsh-hooks-codex/README.zh.md +0 -188
- package/node_modules/@deepseek-ai/dsh-hooks-codex/lib/index.js +0 -346
- package/node_modules/@deepseek-ai/dsh-hooks-codex/package.json +0 -55
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/README.i18n.yaml +0 -106
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/README.md +0 -176
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/README.zh.md +0 -176
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/lib/index.js +0 -254
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +0 -59
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DBK_Mahs.css +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DjTxlw_T.js +0 -127
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/asciidoc-Ve4PFQV2.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DIPi6g--.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/r-Dspwwk_N.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-D82vCrfD.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/system-verilog-CnnmHF94.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/verilog-BQ8w6xss.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/vendor-BNsW4eBh.css +0 -1
- package/node_modules/@deepseek-ai/dsh-webhook/README.i18n.yaml +0 -46
- package/node_modules/@deepseek-ai/dsh-webhook/README.md +0 -86
- package/node_modules/@deepseek-ai/dsh-webhook/README.zh.md +0 -86
- package/node_modules/@deepseek-ai/dsh-webhook/lib/index.js +0 -352
- package/node_modules/@deepseek-ai/dsh-webhook/lib/types/brand.js +0 -26
- package/node_modules/@deepseek-ai/dsh-webhook/lib/types/index.js +0 -138
- package/node_modules/@deepseek-ai/dsh-webhook/lib/types/invariant.js +0 -38
- package/node_modules/@deepseek-ai/dsh-webhook/lib/types/session.js +0 -211
- package/node_modules/@deepseek-ai/dsh-webhook/lib/types/types.js +0 -3
- package/node_modules/@deepseek-ai/dsh-webhook/package.json +0 -62
- package/node_modules/@deepseek-ai/dsh-webhook-github/README.i18n.yaml +0 -37
- package/node_modules/@deepseek-ai/dsh-webhook-github/README.md +0 -86
- package/node_modules/@deepseek-ai/dsh-webhook-github/README.zh.md +0 -86
- package/node_modules/@deepseek-ai/dsh-webhook-github/lib/index.js +0 -193
- package/node_modules/@deepseek-ai/dsh-webhook-github/lib/types/body.js +0 -65
- package/node_modules/@deepseek-ai/dsh-webhook-github/lib/types/handler.js +0 -115
- package/node_modules/@deepseek-ai/dsh-webhook-github/lib/types/index.js +0 -39
- package/node_modules/@deepseek-ai/dsh-webhook-github/lib/types/types.js +0 -3
- package/node_modules/@deepseek-ai/dsh-webhook-github/package.json +0 -55
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +0 -14
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +0 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +0 -1
- package/node_modules/@octokit/openapi-types/LICENSE +0 -7
- package/node_modules/@octokit/openapi-types/README.md +0 -17
- package/node_modules/@octokit/openapi-types/package.json +0 -21
- package/node_modules/@octokit/openapi-webhooks-types/LICENSE +0 -7
- package/node_modules/@octokit/openapi-webhooks-types/README.md +0 -17
- package/node_modules/@octokit/openapi-webhooks-types/package.json +0 -18
- package/node_modules/@octokit/request-error/README.md +0 -93
- package/node_modules/@octokit/request-error/dist-src/index.js +0 -41
- package/node_modules/@octokit/request-error/package.json +0 -50
- package/node_modules/@octokit/types/LICENSE +0 -7
- package/node_modules/@octokit/types/README.md +0 -65
- package/node_modules/@octokit/types/package.json +0 -41
- package/node_modules/@octokit/webhooks/LICENSE.md +0 -20
- package/node_modules/@octokit/webhooks/README.md +0 -786
- package/node_modules/@octokit/webhooks/dist-bundle/index.js +0 -871
- package/node_modules/@octokit/webhooks/dist-src/concat-uint8array.js +0 -22
- package/node_modules/@octokit/webhooks/dist-src/create-logger.js +0 -20
- package/node_modules/@octokit/webhooks/dist-src/event-handler/index.js +0 -27
- package/node_modules/@octokit/webhooks/dist-src/event-handler/on.js +0 -31
- package/node_modules/@octokit/webhooks/dist-src/event-handler/receive.js +0 -61
- package/node_modules/@octokit/webhooks/dist-src/event-handler/remove-listener.js +0 -20
- package/node_modules/@octokit/webhooks/dist-src/event-handler/validate-event-name.js +0 -33
- package/node_modules/@octokit/webhooks/dist-src/event-handler/wrap-error-handler.js +0 -18
- package/node_modules/@octokit/webhooks/dist-src/generated/webhook-identifiers.js +0 -0
- package/node_modules/@octokit/webhooks/dist-src/generated/webhook-names.js +0 -328
- package/node_modules/@octokit/webhooks/dist-src/index.js +0 -48
- package/node_modules/@octokit/webhooks/dist-src/middleware/create-middleware.js +0 -147
- package/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js +0 -30
- package/node_modules/@octokit/webhooks/dist-src/middleware/node/get-request-header.js +0 -6
- package/node_modules/@octokit/webhooks/dist-src/middleware/node/handle-response.js +0 -11
- package/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js +0 -23
- package/node_modules/@octokit/webhooks/dist-src/middleware/web/get-payload.js +0 -6
- package/node_modules/@octokit/webhooks/dist-src/middleware/web/get-request-header.js +0 -6
- package/node_modules/@octokit/webhooks/dist-src/middleware/web/handle-response.js +0 -12
- package/node_modules/@octokit/webhooks/dist-src/middleware/web/index.js +0 -23
- package/node_modules/@octokit/webhooks/dist-src/normalize-trailing-slashes.js +0 -18
- package/node_modules/@octokit/webhooks/dist-src/verify-and-receive.js +0 -33
- package/node_modules/@octokit/webhooks/package.json +0 -54
- package/node_modules/@octokit/webhooks-methods/LICENSE +0 -9
- package/node_modules/@octokit/webhooks-methods/README.md +0 -249
- package/node_modules/@octokit/webhooks-methods/dist-node/index.js +0 -65
- package/node_modules/@octokit/webhooks-methods/dist-src/index.js +0 -22
- package/node_modules/@octokit/webhooks-methods/dist-src/node/sign.js +0 -18
- package/node_modules/@octokit/webhooks-methods/dist-src/node/verify.js +0 -26
- package/node_modules/@octokit/webhooks-methods/dist-src/version.js +0 -4
- package/node_modules/@octokit/webhooks-methods/dist-src/web.js +0 -83
- package/node_modules/@octokit/webhooks-methods/dist-web/index.js +0 -84
- package/node_modules/@octokit/webhooks-methods/package.json +0 -53
- /package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/devtools/chunks/{chunk-DF993M8W.js → rolldown-runtime-DF993M8W.js} +0 -0
|
@@ -0,0 +1,4766 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@deepseek-ai/dsh-experimental-client-ui-cot-translation",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
11
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
12
|
+
var _a$1;
|
|
13
|
+
function $constructor(name, initializer, params) {
|
|
14
|
+
function init(inst, def) {
|
|
15
|
+
if (!inst._zod) Object.defineProperty(inst, "_zod", {
|
|
16
|
+
value: {
|
|
17
|
+
def,
|
|
18
|
+
constr: _,
|
|
19
|
+
traits: /* @__PURE__ */ new Set()
|
|
20
|
+
},
|
|
21
|
+
enumerable: false
|
|
22
|
+
});
|
|
23
|
+
if (inst._zod.traits.has(name)) return;
|
|
24
|
+
inst._zod.traits.add(name);
|
|
25
|
+
initializer(inst, def);
|
|
26
|
+
const proto = _.prototype;
|
|
27
|
+
const keys = Object.keys(proto);
|
|
28
|
+
for (let i = 0; i < keys.length; i++) {
|
|
29
|
+
const k = keys[i];
|
|
30
|
+
if (!(k in inst)) inst[k] = proto[k].bind(inst);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const Parent = params?.Parent ?? Object;
|
|
34
|
+
class Definition extends Parent {}
|
|
35
|
+
Object.defineProperty(Definition, "name", { value: name });
|
|
36
|
+
function _(def) {
|
|
37
|
+
var _a;
|
|
38
|
+
const inst = params?.Parent ? new Definition() : this;
|
|
39
|
+
init(inst, def);
|
|
40
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
41
|
+
for (const fn of inst._zod.deferred) fn();
|
|
42
|
+
return inst;
|
|
43
|
+
}
|
|
44
|
+
Object.defineProperty(_, "init", { value: init });
|
|
45
|
+
Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => {
|
|
46
|
+
if (params?.Parent && inst instanceof params.Parent) return true;
|
|
47
|
+
return inst?._zod?.traits?.has(name);
|
|
48
|
+
} });
|
|
49
|
+
Object.defineProperty(_, "name", { value: name });
|
|
50
|
+
return _;
|
|
51
|
+
}
|
|
52
|
+
var $ZodAsyncError = class extends Error {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var $ZodEncodeError = class extends Error {
|
|
58
|
+
constructor(name) {
|
|
59
|
+
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
60
|
+
this.name = "ZodEncodeError";
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
(_a$1 = globalThis).__zod_globalConfig ?? (_a$1.__zod_globalConfig = {});
|
|
64
|
+
const globalConfig = globalThis.__zod_globalConfig;
|
|
65
|
+
function config(newConfig) {
|
|
66
|
+
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
67
|
+
return globalConfig;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
71
|
+
function getEnumValues(entries) {
|
|
72
|
+
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
73
|
+
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
74
|
+
}
|
|
75
|
+
function jsonStringifyReplacer(_, value) {
|
|
76
|
+
if (typeof value === "bigint") return value.toString();
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
function cached(getter) {
|
|
80
|
+
return { get value() {
|
|
81
|
+
{
|
|
82
|
+
const value = getter();
|
|
83
|
+
Object.defineProperty(this, "value", { value });
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
throw new Error("cached value already set");
|
|
87
|
+
} };
|
|
88
|
+
}
|
|
89
|
+
function nullish(input) {
|
|
90
|
+
return input === null || input === void 0;
|
|
91
|
+
}
|
|
92
|
+
function cleanRegex(source) {
|
|
93
|
+
const start = source.startsWith("^") ? 1 : 0;
|
|
94
|
+
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
95
|
+
return source.slice(start, end);
|
|
96
|
+
}
|
|
97
|
+
function floatSafeRemainder(val, step) {
|
|
98
|
+
const ratio = val / step;
|
|
99
|
+
const roundedRatio = Math.round(ratio);
|
|
100
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
101
|
+
if (Math.abs(ratio - roundedRatio) < tolerance) return 0;
|
|
102
|
+
return ratio - roundedRatio;
|
|
103
|
+
}
|
|
104
|
+
const EVALUATING = /* @__PURE__*/ Symbol("evaluating");
|
|
105
|
+
function defineLazy(object, key, getter) {
|
|
106
|
+
let value = void 0;
|
|
107
|
+
Object.defineProperty(object, key, {
|
|
108
|
+
get() {
|
|
109
|
+
if (value === EVALUATING) return;
|
|
110
|
+
if (value === void 0) {
|
|
111
|
+
value = EVALUATING;
|
|
112
|
+
value = getter();
|
|
113
|
+
}
|
|
114
|
+
return value;
|
|
115
|
+
},
|
|
116
|
+
set(v) {
|
|
117
|
+
Object.defineProperty(object, key, { value: v });
|
|
118
|
+
},
|
|
119
|
+
configurable: true
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function assignProp(target, prop, value) {
|
|
123
|
+
Object.defineProperty(target, prop, {
|
|
124
|
+
value,
|
|
125
|
+
writable: true,
|
|
126
|
+
enumerable: true,
|
|
127
|
+
configurable: true
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function mergeDefs(...defs) {
|
|
131
|
+
const mergedDescriptors = {};
|
|
132
|
+
for (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));
|
|
133
|
+
return Object.defineProperties({}, mergedDescriptors);
|
|
134
|
+
}
|
|
135
|
+
function esc(str) {
|
|
136
|
+
return JSON.stringify(str);
|
|
137
|
+
}
|
|
138
|
+
function slugify(input) {
|
|
139
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
140
|
+
}
|
|
141
|
+
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
142
|
+
function isObject(data) {
|
|
143
|
+
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
144
|
+
}
|
|
145
|
+
const allowsEval = /* @__PURE__*/ cached(() => {
|
|
146
|
+
if (globalConfig.jitless) return false;
|
|
147
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
148
|
+
try {
|
|
149
|
+
new Function("");
|
|
150
|
+
return true;
|
|
151
|
+
} catch (_) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
function isPlainObject(o) {
|
|
156
|
+
if (isObject(o) === false) return false;
|
|
157
|
+
const ctor = o.constructor;
|
|
158
|
+
if (ctor === void 0) return true;
|
|
159
|
+
if (typeof ctor !== "function") return true;
|
|
160
|
+
const prot = ctor.prototype;
|
|
161
|
+
if (isObject(prot) === false) return false;
|
|
162
|
+
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
function shallowClone(o) {
|
|
166
|
+
if (isPlainObject(o)) return { ...o };
|
|
167
|
+
if (Array.isArray(o)) return [...o];
|
|
168
|
+
if (o instanceof Map) return new Map(o);
|
|
169
|
+
if (o instanceof Set) return new Set(o);
|
|
170
|
+
return o;
|
|
171
|
+
}
|
|
172
|
+
const propertyKeyTypes = /* @__PURE__*/ new Set([
|
|
173
|
+
"string",
|
|
174
|
+
"number",
|
|
175
|
+
"symbol"
|
|
176
|
+
]);
|
|
177
|
+
function escapeRegex(str) {
|
|
178
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
179
|
+
}
|
|
180
|
+
function clone(inst, def, params) {
|
|
181
|
+
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
182
|
+
if (!def || params?.parent) cl._zod.parent = inst;
|
|
183
|
+
return cl;
|
|
184
|
+
}
|
|
185
|
+
function normalizeParams(_params) {
|
|
186
|
+
const params = _params;
|
|
187
|
+
if (!params) return {};
|
|
188
|
+
if (typeof params === "string") return { error: () => params };
|
|
189
|
+
if (params?.message !== void 0) {
|
|
190
|
+
if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
|
|
191
|
+
params.error = params.message;
|
|
192
|
+
}
|
|
193
|
+
delete params.message;
|
|
194
|
+
if (typeof params.error === "string") return {
|
|
195
|
+
...params,
|
|
196
|
+
error: () => params.error
|
|
197
|
+
};
|
|
198
|
+
return params;
|
|
199
|
+
}
|
|
200
|
+
function optionalKeys(shape) {
|
|
201
|
+
return Object.keys(shape).filter((k) => {
|
|
202
|
+
return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
const NUMBER_FORMAT_RANGES = {
|
|
206
|
+
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
207
|
+
int32: [-2147483648, 2147483647],
|
|
208
|
+
uint32: [0, 4294967295],
|
|
209
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
210
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
211
|
+
};
|
|
212
|
+
function pick(schema, mask) {
|
|
213
|
+
const currDef = schema._zod.def;
|
|
214
|
+
const checks = currDef.checks;
|
|
215
|
+
if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
216
|
+
return clone(schema, mergeDefs(schema._zod.def, {
|
|
217
|
+
get shape() {
|
|
218
|
+
const newShape = {};
|
|
219
|
+
for (const key in mask) {
|
|
220
|
+
if (!(key in currDef.shape)) throw new Error(`Unrecognized key: "${key}"`);
|
|
221
|
+
if (!mask[key]) continue;
|
|
222
|
+
newShape[key] = currDef.shape[key];
|
|
223
|
+
}
|
|
224
|
+
assignProp(this, "shape", newShape);
|
|
225
|
+
return newShape;
|
|
226
|
+
},
|
|
227
|
+
checks: []
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
function omit(schema, mask) {
|
|
231
|
+
const currDef = schema._zod.def;
|
|
232
|
+
const checks = currDef.checks;
|
|
233
|
+
if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
234
|
+
return clone(schema, mergeDefs(schema._zod.def, {
|
|
235
|
+
get shape() {
|
|
236
|
+
const newShape = { ...schema._zod.def.shape };
|
|
237
|
+
for (const key in mask) {
|
|
238
|
+
if (!(key in currDef.shape)) throw new Error(`Unrecognized key: "${key}"`);
|
|
239
|
+
if (!mask[key]) continue;
|
|
240
|
+
delete newShape[key];
|
|
241
|
+
}
|
|
242
|
+
assignProp(this, "shape", newShape);
|
|
243
|
+
return newShape;
|
|
244
|
+
},
|
|
245
|
+
checks: []
|
|
246
|
+
}));
|
|
247
|
+
}
|
|
248
|
+
function extend(schema, shape) {
|
|
249
|
+
if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
|
|
250
|
+
const checks = schema._zod.def.checks;
|
|
251
|
+
if (checks && checks.length > 0) {
|
|
252
|
+
const existingShape = schema._zod.def.shape;
|
|
253
|
+
for (const key in shape) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
254
|
+
}
|
|
255
|
+
return clone(schema, mergeDefs(schema._zod.def, { get shape() {
|
|
256
|
+
const _shape = {
|
|
257
|
+
...schema._zod.def.shape,
|
|
258
|
+
...shape
|
|
259
|
+
};
|
|
260
|
+
assignProp(this, "shape", _shape);
|
|
261
|
+
return _shape;
|
|
262
|
+
} }));
|
|
263
|
+
}
|
|
264
|
+
function safeExtend(schema, shape) {
|
|
265
|
+
if (!isPlainObject(shape)) throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
266
|
+
return clone(schema, mergeDefs(schema._zod.def, { get shape() {
|
|
267
|
+
const _shape = {
|
|
268
|
+
...schema._zod.def.shape,
|
|
269
|
+
...shape
|
|
270
|
+
};
|
|
271
|
+
assignProp(this, "shape", _shape);
|
|
272
|
+
return _shape;
|
|
273
|
+
} }));
|
|
274
|
+
}
|
|
275
|
+
function merge(a, b) {
|
|
276
|
+
if (a._zod.def.checks?.length) throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
277
|
+
return clone(a, mergeDefs(a._zod.def, {
|
|
278
|
+
get shape() {
|
|
279
|
+
const _shape = {
|
|
280
|
+
...a._zod.def.shape,
|
|
281
|
+
...b._zod.def.shape
|
|
282
|
+
};
|
|
283
|
+
assignProp(this, "shape", _shape);
|
|
284
|
+
return _shape;
|
|
285
|
+
},
|
|
286
|
+
get catchall() {
|
|
287
|
+
return b._zod.def.catchall;
|
|
288
|
+
},
|
|
289
|
+
checks: b._zod.def.checks ?? []
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
function partial(Class, schema, mask) {
|
|
293
|
+
const checks = schema._zod.def.checks;
|
|
294
|
+
if (checks && checks.length > 0) throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
295
|
+
return clone(schema, mergeDefs(schema._zod.def, {
|
|
296
|
+
get shape() {
|
|
297
|
+
const oldShape = schema._zod.def.shape;
|
|
298
|
+
const shape = { ...oldShape };
|
|
299
|
+
if (mask) for (const key in mask) {
|
|
300
|
+
if (!(key in oldShape)) throw new Error(`Unrecognized key: "${key}"`);
|
|
301
|
+
if (!mask[key]) continue;
|
|
302
|
+
shape[key] = Class ? new Class({
|
|
303
|
+
type: "optional",
|
|
304
|
+
innerType: oldShape[key]
|
|
305
|
+
}) : oldShape[key];
|
|
306
|
+
}
|
|
307
|
+
else for (const key in oldShape) shape[key] = Class ? new Class({
|
|
308
|
+
type: "optional",
|
|
309
|
+
innerType: oldShape[key]
|
|
310
|
+
}) : oldShape[key];
|
|
311
|
+
assignProp(this, "shape", shape);
|
|
312
|
+
return shape;
|
|
313
|
+
},
|
|
314
|
+
checks: []
|
|
315
|
+
}));
|
|
316
|
+
}
|
|
317
|
+
function required(Class, schema, mask) {
|
|
318
|
+
return clone(schema, mergeDefs(schema._zod.def, { get shape() {
|
|
319
|
+
const oldShape = schema._zod.def.shape;
|
|
320
|
+
const shape = { ...oldShape };
|
|
321
|
+
if (mask) for (const key in mask) {
|
|
322
|
+
if (!(key in shape)) throw new Error(`Unrecognized key: "${key}"`);
|
|
323
|
+
if (!mask[key]) continue;
|
|
324
|
+
shape[key] = new Class({
|
|
325
|
+
type: "nonoptional",
|
|
326
|
+
innerType: oldShape[key]
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
else for (const key in oldShape) shape[key] = new Class({
|
|
330
|
+
type: "nonoptional",
|
|
331
|
+
innerType: oldShape[key]
|
|
332
|
+
});
|
|
333
|
+
assignProp(this, "shape", shape);
|
|
334
|
+
return shape;
|
|
335
|
+
} }));
|
|
336
|
+
}
|
|
337
|
+
function aborted(x, startIndex = 0) {
|
|
338
|
+
if (x.aborted === true) return true;
|
|
339
|
+
for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
343
|
+
if (x.aborted === true) return true;
|
|
344
|
+
for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue === false) return true;
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
function prefixIssues(path, issues) {
|
|
348
|
+
return issues.map((iss) => {
|
|
349
|
+
var _a;
|
|
350
|
+
(_a = iss).path ?? (_a.path = []);
|
|
351
|
+
iss.path.unshift(path);
|
|
352
|
+
return iss;
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
function unwrapMessage(message) {
|
|
356
|
+
return typeof message === "string" ? message : message?.message;
|
|
357
|
+
}
|
|
358
|
+
function finalizeIssue(iss, ctx, config) {
|
|
359
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
|
|
360
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
361
|
+
rest.path ?? (rest.path = []);
|
|
362
|
+
rest.message = message;
|
|
363
|
+
if (ctx?.reportInput) rest.input = _input;
|
|
364
|
+
return rest;
|
|
365
|
+
}
|
|
366
|
+
function getLengthableOrigin(input) {
|
|
367
|
+
if (Array.isArray(input)) return "array";
|
|
368
|
+
if (typeof input === "string") return "string";
|
|
369
|
+
return "unknown";
|
|
370
|
+
}
|
|
371
|
+
function issue(...args) {
|
|
372
|
+
const [iss, input, inst] = args;
|
|
373
|
+
if (typeof iss === "string") return {
|
|
374
|
+
message: iss,
|
|
375
|
+
code: "custom",
|
|
376
|
+
input,
|
|
377
|
+
inst
|
|
378
|
+
};
|
|
379
|
+
return { ...iss };
|
|
380
|
+
}
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
383
|
+
const initializer$1 = (inst, def) => {
|
|
384
|
+
inst.name = "$ZodError";
|
|
385
|
+
Object.defineProperty(inst, "_zod", {
|
|
386
|
+
value: inst._zod,
|
|
387
|
+
enumerable: false
|
|
388
|
+
});
|
|
389
|
+
Object.defineProperty(inst, "issues", {
|
|
390
|
+
value: def,
|
|
391
|
+
enumerable: false
|
|
392
|
+
});
|
|
393
|
+
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
394
|
+
Object.defineProperty(inst, "toString", {
|
|
395
|
+
value: () => inst.message,
|
|
396
|
+
enumerable: false
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
400
|
+
const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
|
|
401
|
+
function flattenError(error, mapper = (issue) => issue.message) {
|
|
402
|
+
const fieldErrors = {};
|
|
403
|
+
const formErrors = [];
|
|
404
|
+
for (const sub of error.issues) if (sub.path.length > 0) {
|
|
405
|
+
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
406
|
+
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
407
|
+
} else formErrors.push(mapper(sub));
|
|
408
|
+
return {
|
|
409
|
+
formErrors,
|
|
410
|
+
fieldErrors
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function formatError(error, mapper = (issue) => issue.message) {
|
|
414
|
+
const fieldErrors = { _errors: [] };
|
|
415
|
+
const processError = (error, path = []) => {
|
|
416
|
+
for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
417
|
+
else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
418
|
+
else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
419
|
+
else {
|
|
420
|
+
const fullpath = [...path, ...issue.path];
|
|
421
|
+
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue));
|
|
422
|
+
else {
|
|
423
|
+
let curr = fieldErrors;
|
|
424
|
+
let i = 0;
|
|
425
|
+
while (i < fullpath.length) {
|
|
426
|
+
const el = fullpath[i];
|
|
427
|
+
if (!(i === fullpath.length - 1)) curr[el] = curr[el] || { _errors: [] };
|
|
428
|
+
else {
|
|
429
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
430
|
+
curr[el]._errors.push(mapper(issue));
|
|
431
|
+
}
|
|
432
|
+
curr = curr[el];
|
|
433
|
+
i++;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
processError(error);
|
|
439
|
+
return fieldErrors;
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
443
|
+
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
444
|
+
const ctx = _ctx ? {
|
|
445
|
+
..._ctx,
|
|
446
|
+
async: false
|
|
447
|
+
} : { async: false };
|
|
448
|
+
const result = schema._zod.run({
|
|
449
|
+
value,
|
|
450
|
+
issues: []
|
|
451
|
+
}, ctx);
|
|
452
|
+
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
453
|
+
if (result.issues.length) {
|
|
454
|
+
const e = new ((_params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
455
|
+
captureStackTrace(e, _params?.callee);
|
|
456
|
+
throw e;
|
|
457
|
+
}
|
|
458
|
+
return result.value;
|
|
459
|
+
};
|
|
460
|
+
const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
461
|
+
const ctx = _ctx ? {
|
|
462
|
+
..._ctx,
|
|
463
|
+
async: true
|
|
464
|
+
} : { async: true };
|
|
465
|
+
let result = schema._zod.run({
|
|
466
|
+
value,
|
|
467
|
+
issues: []
|
|
468
|
+
}, ctx);
|
|
469
|
+
if (result instanceof Promise) result = await result;
|
|
470
|
+
if (result.issues.length) {
|
|
471
|
+
const e = new ((params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
472
|
+
captureStackTrace(e, params?.callee);
|
|
473
|
+
throw e;
|
|
474
|
+
}
|
|
475
|
+
return result.value;
|
|
476
|
+
};
|
|
477
|
+
const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
478
|
+
const ctx = _ctx ? {
|
|
479
|
+
..._ctx,
|
|
480
|
+
async: false
|
|
481
|
+
} : { async: false };
|
|
482
|
+
const result = schema._zod.run({
|
|
483
|
+
value,
|
|
484
|
+
issues: []
|
|
485
|
+
}, ctx);
|
|
486
|
+
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
487
|
+
return result.issues.length ? {
|
|
488
|
+
success: false,
|
|
489
|
+
error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
490
|
+
} : {
|
|
491
|
+
success: true,
|
|
492
|
+
data: result.value
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
const safeParse$1 = /* @__PURE__*/ _safeParse($ZodRealError);
|
|
496
|
+
const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
497
|
+
const ctx = _ctx ? {
|
|
498
|
+
..._ctx,
|
|
499
|
+
async: true
|
|
500
|
+
} : { async: true };
|
|
501
|
+
let result = schema._zod.run({
|
|
502
|
+
value,
|
|
503
|
+
issues: []
|
|
504
|
+
}, ctx);
|
|
505
|
+
if (result instanceof Promise) result = await result;
|
|
506
|
+
return result.issues.length ? {
|
|
507
|
+
success: false,
|
|
508
|
+
error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
509
|
+
} : {
|
|
510
|
+
success: true,
|
|
511
|
+
data: result.value
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
const safeParseAsync$1 = /* @__PURE__*/ _safeParseAsync($ZodRealError);
|
|
515
|
+
const _encode = (_Err) => (schema, value, _ctx) => {
|
|
516
|
+
const ctx = _ctx ? {
|
|
517
|
+
..._ctx,
|
|
518
|
+
direction: "backward"
|
|
519
|
+
} : { direction: "backward" };
|
|
520
|
+
return _parse(_Err)(schema, value, ctx);
|
|
521
|
+
};
|
|
522
|
+
const _decode = (_Err) => (schema, value, _ctx) => {
|
|
523
|
+
return _parse(_Err)(schema, value, _ctx);
|
|
524
|
+
};
|
|
525
|
+
const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
526
|
+
const ctx = _ctx ? {
|
|
527
|
+
..._ctx,
|
|
528
|
+
direction: "backward"
|
|
529
|
+
} : { direction: "backward" };
|
|
530
|
+
return _parseAsync(_Err)(schema, value, ctx);
|
|
531
|
+
};
|
|
532
|
+
const _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
533
|
+
return _parseAsync(_Err)(schema, value, _ctx);
|
|
534
|
+
};
|
|
535
|
+
const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
536
|
+
const ctx = _ctx ? {
|
|
537
|
+
..._ctx,
|
|
538
|
+
direction: "backward"
|
|
539
|
+
} : { direction: "backward" };
|
|
540
|
+
return _safeParse(_Err)(schema, value, ctx);
|
|
541
|
+
};
|
|
542
|
+
const _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
543
|
+
return _safeParse(_Err)(schema, value, _ctx);
|
|
544
|
+
};
|
|
545
|
+
const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
546
|
+
const ctx = _ctx ? {
|
|
547
|
+
..._ctx,
|
|
548
|
+
direction: "backward"
|
|
549
|
+
} : { direction: "backward" };
|
|
550
|
+
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
551
|
+
};
|
|
552
|
+
const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
553
|
+
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
554
|
+
};
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
557
|
+
/**
|
|
558
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
559
|
+
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
560
|
+
* See https://github.com/paralleldrive/cuid.
|
|
561
|
+
*/
|
|
562
|
+
const cuid = /^[cC][0-9a-z]{6,}$/;
|
|
563
|
+
const cuid2 = /^[0-9a-z]+$/;
|
|
564
|
+
const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
565
|
+
const xid = /^[0-9a-vA-V]{20}$/;
|
|
566
|
+
const ksuid = /^[A-Za-z0-9]{27}$/;
|
|
567
|
+
const nanoid = /^[a-zA-Z0-9_-]{21}$/;
|
|
568
|
+
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
|
|
569
|
+
const duration$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
|
|
570
|
+
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
|
|
571
|
+
const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
572
|
+
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
573
|
+
*
|
|
574
|
+
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
575
|
+
const uuid = (version) => {
|
|
576
|
+
if (!version) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
577
|
+
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
578
|
+
};
|
|
579
|
+
/** Practical email validation */
|
|
580
|
+
const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
581
|
+
const _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
582
|
+
function emoji() {
|
|
583
|
+
return new RegExp(_emoji$1, "u");
|
|
584
|
+
}
|
|
585
|
+
const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
586
|
+
const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
587
|
+
const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
588
|
+
const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
589
|
+
const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
590
|
+
const base64url = /^[A-Za-z0-9_-]*$/;
|
|
591
|
+
const httpProtocol = /^https?$/;
|
|
592
|
+
const e164 = /^\+[1-9]\d{6,14}$/;
|
|
593
|
+
const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
594
|
+
const date$1 = /*@__PURE__*/ new RegExp(`^${dateSource}$`);
|
|
595
|
+
function timeSource(args) {
|
|
596
|
+
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
597
|
+
return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
598
|
+
}
|
|
599
|
+
function time$1(args) {
|
|
600
|
+
return new RegExp(`^${timeSource(args)}$`);
|
|
601
|
+
}
|
|
602
|
+
function datetime$1(args) {
|
|
603
|
+
const time = timeSource({ precision: args.precision });
|
|
604
|
+
const opts = ["Z"];
|
|
605
|
+
if (args.local) opts.push("");
|
|
606
|
+
if (args.offset) opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
|
|
607
|
+
const timeRegex = `${time}(?:${opts.join("|")})`;
|
|
608
|
+
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
609
|
+
}
|
|
610
|
+
const string$1 = (params) => {
|
|
611
|
+
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
612
|
+
return new RegExp(`^${regex}$`);
|
|
613
|
+
};
|
|
614
|
+
const integer = /^-?\d+$/;
|
|
615
|
+
const number$1 = /^-?\d+(?:\.\d+)?$/;
|
|
616
|
+
const lowercase = /^[^A-Z]*$/;
|
|
617
|
+
const uppercase = /^[^a-z]*$/;
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
|
|
620
|
+
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
621
|
+
var _a;
|
|
622
|
+
inst._zod ?? (inst._zod = {});
|
|
623
|
+
inst._zod.def = def;
|
|
624
|
+
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
625
|
+
});
|
|
626
|
+
const numericOriginMap = {
|
|
627
|
+
number: "number",
|
|
628
|
+
bigint: "bigint",
|
|
629
|
+
object: "date"
|
|
630
|
+
};
|
|
631
|
+
const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
632
|
+
$ZodCheck.init(inst, def);
|
|
633
|
+
const origin = numericOriginMap[typeof def.value];
|
|
634
|
+
inst._zod.onattach.push((inst) => {
|
|
635
|
+
const bag = inst._zod.bag;
|
|
636
|
+
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
637
|
+
if (def.value < curr) if (def.inclusive) bag.maximum = def.value;
|
|
638
|
+
else bag.exclusiveMaximum = def.value;
|
|
639
|
+
});
|
|
640
|
+
inst._zod.check = (payload) => {
|
|
641
|
+
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;
|
|
642
|
+
payload.issues.push({
|
|
643
|
+
origin,
|
|
644
|
+
code: "too_big",
|
|
645
|
+
maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
646
|
+
input: payload.value,
|
|
647
|
+
inclusive: def.inclusive,
|
|
648
|
+
inst,
|
|
649
|
+
continue: !def.abort
|
|
650
|
+
});
|
|
651
|
+
};
|
|
652
|
+
});
|
|
653
|
+
const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
654
|
+
$ZodCheck.init(inst, def);
|
|
655
|
+
const origin = numericOriginMap[typeof def.value];
|
|
656
|
+
inst._zod.onattach.push((inst) => {
|
|
657
|
+
const bag = inst._zod.bag;
|
|
658
|
+
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
659
|
+
if (def.value > curr) if (def.inclusive) bag.minimum = def.value;
|
|
660
|
+
else bag.exclusiveMinimum = def.value;
|
|
661
|
+
});
|
|
662
|
+
inst._zod.check = (payload) => {
|
|
663
|
+
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;
|
|
664
|
+
payload.issues.push({
|
|
665
|
+
origin,
|
|
666
|
+
code: "too_small",
|
|
667
|
+
minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
668
|
+
input: payload.value,
|
|
669
|
+
inclusive: def.inclusive,
|
|
670
|
+
inst,
|
|
671
|
+
continue: !def.abort
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
});
|
|
675
|
+
const $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
676
|
+
$ZodCheck.init(inst, def);
|
|
677
|
+
inst._zod.onattach.push((inst) => {
|
|
678
|
+
var _a;
|
|
679
|
+
(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
680
|
+
});
|
|
681
|
+
inst._zod.check = (payload) => {
|
|
682
|
+
if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
683
|
+
if (typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
|
|
684
|
+
payload.issues.push({
|
|
685
|
+
origin: typeof payload.value,
|
|
686
|
+
code: "not_multiple_of",
|
|
687
|
+
divisor: def.value,
|
|
688
|
+
input: payload.value,
|
|
689
|
+
inst,
|
|
690
|
+
continue: !def.abort
|
|
691
|
+
});
|
|
692
|
+
};
|
|
693
|
+
});
|
|
694
|
+
const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
695
|
+
$ZodCheck.init(inst, def);
|
|
696
|
+
def.format = def.format || "float64";
|
|
697
|
+
const isInt = def.format?.includes("int");
|
|
698
|
+
const origin = isInt ? "int" : "number";
|
|
699
|
+
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
700
|
+
inst._zod.onattach.push((inst) => {
|
|
701
|
+
const bag = inst._zod.bag;
|
|
702
|
+
bag.format = def.format;
|
|
703
|
+
bag.minimum = minimum;
|
|
704
|
+
bag.maximum = maximum;
|
|
705
|
+
if (isInt) bag.pattern = integer;
|
|
706
|
+
});
|
|
707
|
+
inst._zod.check = (payload) => {
|
|
708
|
+
const input = payload.value;
|
|
709
|
+
if (isInt) {
|
|
710
|
+
if (!Number.isInteger(input)) {
|
|
711
|
+
payload.issues.push({
|
|
712
|
+
expected: origin,
|
|
713
|
+
format: def.format,
|
|
714
|
+
code: "invalid_type",
|
|
715
|
+
continue: false,
|
|
716
|
+
input,
|
|
717
|
+
inst
|
|
718
|
+
});
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
if (!Number.isSafeInteger(input)) {
|
|
722
|
+
if (input > 0) payload.issues.push({
|
|
723
|
+
input,
|
|
724
|
+
code: "too_big",
|
|
725
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
726
|
+
note: "Integers must be within the safe integer range.",
|
|
727
|
+
inst,
|
|
728
|
+
origin,
|
|
729
|
+
inclusive: true,
|
|
730
|
+
continue: !def.abort
|
|
731
|
+
});
|
|
732
|
+
else payload.issues.push({
|
|
733
|
+
input,
|
|
734
|
+
code: "too_small",
|
|
735
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
736
|
+
note: "Integers must be within the safe integer range.",
|
|
737
|
+
inst,
|
|
738
|
+
origin,
|
|
739
|
+
inclusive: true,
|
|
740
|
+
continue: !def.abort
|
|
741
|
+
});
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
if (input < minimum) payload.issues.push({
|
|
746
|
+
origin: "number",
|
|
747
|
+
input,
|
|
748
|
+
code: "too_small",
|
|
749
|
+
minimum,
|
|
750
|
+
inclusive: true,
|
|
751
|
+
inst,
|
|
752
|
+
continue: !def.abort
|
|
753
|
+
});
|
|
754
|
+
if (input > maximum) payload.issues.push({
|
|
755
|
+
origin: "number",
|
|
756
|
+
input,
|
|
757
|
+
code: "too_big",
|
|
758
|
+
maximum,
|
|
759
|
+
inclusive: true,
|
|
760
|
+
inst,
|
|
761
|
+
continue: !def.abort
|
|
762
|
+
});
|
|
763
|
+
};
|
|
764
|
+
});
|
|
765
|
+
const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
766
|
+
var _a;
|
|
767
|
+
$ZodCheck.init(inst, def);
|
|
768
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
769
|
+
const val = payload.value;
|
|
770
|
+
return !nullish(val) && val.length !== void 0;
|
|
771
|
+
});
|
|
772
|
+
inst._zod.onattach.push((inst) => {
|
|
773
|
+
const curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
774
|
+
if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
|
|
775
|
+
});
|
|
776
|
+
inst._zod.check = (payload) => {
|
|
777
|
+
const input = payload.value;
|
|
778
|
+
if (input.length <= def.maximum) return;
|
|
779
|
+
const origin = getLengthableOrigin(input);
|
|
780
|
+
payload.issues.push({
|
|
781
|
+
origin,
|
|
782
|
+
code: "too_big",
|
|
783
|
+
maximum: def.maximum,
|
|
784
|
+
inclusive: true,
|
|
785
|
+
input,
|
|
786
|
+
inst,
|
|
787
|
+
continue: !def.abort
|
|
788
|
+
});
|
|
789
|
+
};
|
|
790
|
+
});
|
|
791
|
+
const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
792
|
+
var _a;
|
|
793
|
+
$ZodCheck.init(inst, def);
|
|
794
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
795
|
+
const val = payload.value;
|
|
796
|
+
return !nullish(val) && val.length !== void 0;
|
|
797
|
+
});
|
|
798
|
+
inst._zod.onattach.push((inst) => {
|
|
799
|
+
const curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
800
|
+
if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
|
|
801
|
+
});
|
|
802
|
+
inst._zod.check = (payload) => {
|
|
803
|
+
const input = payload.value;
|
|
804
|
+
if (input.length >= def.minimum) return;
|
|
805
|
+
const origin = getLengthableOrigin(input);
|
|
806
|
+
payload.issues.push({
|
|
807
|
+
origin,
|
|
808
|
+
code: "too_small",
|
|
809
|
+
minimum: def.minimum,
|
|
810
|
+
inclusive: true,
|
|
811
|
+
input,
|
|
812
|
+
inst,
|
|
813
|
+
continue: !def.abort
|
|
814
|
+
});
|
|
815
|
+
};
|
|
816
|
+
});
|
|
817
|
+
const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
818
|
+
var _a;
|
|
819
|
+
$ZodCheck.init(inst, def);
|
|
820
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
821
|
+
const val = payload.value;
|
|
822
|
+
return !nullish(val) && val.length !== void 0;
|
|
823
|
+
});
|
|
824
|
+
inst._zod.onattach.push((inst) => {
|
|
825
|
+
const bag = inst._zod.bag;
|
|
826
|
+
bag.minimum = def.length;
|
|
827
|
+
bag.maximum = def.length;
|
|
828
|
+
bag.length = def.length;
|
|
829
|
+
});
|
|
830
|
+
inst._zod.check = (payload) => {
|
|
831
|
+
const input = payload.value;
|
|
832
|
+
const length = input.length;
|
|
833
|
+
if (length === def.length) return;
|
|
834
|
+
const origin = getLengthableOrigin(input);
|
|
835
|
+
const tooBig = length > def.length;
|
|
836
|
+
payload.issues.push({
|
|
837
|
+
origin,
|
|
838
|
+
...tooBig ? {
|
|
839
|
+
code: "too_big",
|
|
840
|
+
maximum: def.length
|
|
841
|
+
} : {
|
|
842
|
+
code: "too_small",
|
|
843
|
+
minimum: def.length
|
|
844
|
+
},
|
|
845
|
+
inclusive: true,
|
|
846
|
+
exact: true,
|
|
847
|
+
input: payload.value,
|
|
848
|
+
inst,
|
|
849
|
+
continue: !def.abort
|
|
850
|
+
});
|
|
851
|
+
};
|
|
852
|
+
});
|
|
853
|
+
const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
854
|
+
var _a, _b;
|
|
855
|
+
$ZodCheck.init(inst, def);
|
|
856
|
+
inst._zod.onattach.push((inst) => {
|
|
857
|
+
const bag = inst._zod.bag;
|
|
858
|
+
bag.format = def.format;
|
|
859
|
+
if (def.pattern) {
|
|
860
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
861
|
+
bag.patterns.add(def.pattern);
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
865
|
+
def.pattern.lastIndex = 0;
|
|
866
|
+
if (def.pattern.test(payload.value)) return;
|
|
867
|
+
payload.issues.push({
|
|
868
|
+
origin: "string",
|
|
869
|
+
code: "invalid_format",
|
|
870
|
+
format: def.format,
|
|
871
|
+
input: payload.value,
|
|
872
|
+
...def.pattern ? { pattern: def.pattern.toString() } : {},
|
|
873
|
+
inst,
|
|
874
|
+
continue: !def.abort
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
else (_b = inst._zod).check ?? (_b.check = () => {});
|
|
878
|
+
});
|
|
879
|
+
const $ZodCheckRegex = /*@__PURE__*/ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
880
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
881
|
+
inst._zod.check = (payload) => {
|
|
882
|
+
def.pattern.lastIndex = 0;
|
|
883
|
+
if (def.pattern.test(payload.value)) return;
|
|
884
|
+
payload.issues.push({
|
|
885
|
+
origin: "string",
|
|
886
|
+
code: "invalid_format",
|
|
887
|
+
format: "regex",
|
|
888
|
+
input: payload.value,
|
|
889
|
+
pattern: def.pattern.toString(),
|
|
890
|
+
inst,
|
|
891
|
+
continue: !def.abort
|
|
892
|
+
});
|
|
893
|
+
};
|
|
894
|
+
});
|
|
895
|
+
const $ZodCheckLowerCase = /*@__PURE__*/ $constructor("$ZodCheckLowerCase", (inst, def) => {
|
|
896
|
+
def.pattern ?? (def.pattern = lowercase);
|
|
897
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
898
|
+
});
|
|
899
|
+
const $ZodCheckUpperCase = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (inst, def) => {
|
|
900
|
+
def.pattern ?? (def.pattern = uppercase);
|
|
901
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
902
|
+
});
|
|
903
|
+
const $ZodCheckIncludes = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (inst, def) => {
|
|
904
|
+
$ZodCheck.init(inst, def);
|
|
905
|
+
const escapedRegex = escapeRegex(def.includes);
|
|
906
|
+
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
|
|
907
|
+
def.pattern = pattern;
|
|
908
|
+
inst._zod.onattach.push((inst) => {
|
|
909
|
+
const bag = inst._zod.bag;
|
|
910
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
911
|
+
bag.patterns.add(pattern);
|
|
912
|
+
});
|
|
913
|
+
inst._zod.check = (payload) => {
|
|
914
|
+
if (payload.value.includes(def.includes, def.position)) return;
|
|
915
|
+
payload.issues.push({
|
|
916
|
+
origin: "string",
|
|
917
|
+
code: "invalid_format",
|
|
918
|
+
format: "includes",
|
|
919
|
+
includes: def.includes,
|
|
920
|
+
input: payload.value,
|
|
921
|
+
inst,
|
|
922
|
+
continue: !def.abort
|
|
923
|
+
});
|
|
924
|
+
};
|
|
925
|
+
});
|
|
926
|
+
const $ZodCheckStartsWith = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (inst, def) => {
|
|
927
|
+
$ZodCheck.init(inst, def);
|
|
928
|
+
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
929
|
+
def.pattern ?? (def.pattern = pattern);
|
|
930
|
+
inst._zod.onattach.push((inst) => {
|
|
931
|
+
const bag = inst._zod.bag;
|
|
932
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
933
|
+
bag.patterns.add(pattern);
|
|
934
|
+
});
|
|
935
|
+
inst._zod.check = (payload) => {
|
|
936
|
+
if (payload.value.startsWith(def.prefix)) return;
|
|
937
|
+
payload.issues.push({
|
|
938
|
+
origin: "string",
|
|
939
|
+
code: "invalid_format",
|
|
940
|
+
format: "starts_with",
|
|
941
|
+
prefix: def.prefix,
|
|
942
|
+
input: payload.value,
|
|
943
|
+
inst,
|
|
944
|
+
continue: !def.abort
|
|
945
|
+
});
|
|
946
|
+
};
|
|
947
|
+
});
|
|
948
|
+
const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst, def) => {
|
|
949
|
+
$ZodCheck.init(inst, def);
|
|
950
|
+
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
951
|
+
def.pattern ?? (def.pattern = pattern);
|
|
952
|
+
inst._zod.onattach.push((inst) => {
|
|
953
|
+
const bag = inst._zod.bag;
|
|
954
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
955
|
+
bag.patterns.add(pattern);
|
|
956
|
+
});
|
|
957
|
+
inst._zod.check = (payload) => {
|
|
958
|
+
if (payload.value.endsWith(def.suffix)) return;
|
|
959
|
+
payload.issues.push({
|
|
960
|
+
origin: "string",
|
|
961
|
+
code: "invalid_format",
|
|
962
|
+
format: "ends_with",
|
|
963
|
+
suffix: def.suffix,
|
|
964
|
+
input: payload.value,
|
|
965
|
+
inst,
|
|
966
|
+
continue: !def.abort
|
|
967
|
+
});
|
|
968
|
+
};
|
|
969
|
+
});
|
|
970
|
+
const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
971
|
+
$ZodCheck.init(inst, def);
|
|
972
|
+
inst._zod.check = (payload) => {
|
|
973
|
+
payload.value = def.tx(payload.value);
|
|
974
|
+
};
|
|
975
|
+
});
|
|
976
|
+
//#endregion
|
|
977
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
|
|
978
|
+
var Doc = class {
|
|
979
|
+
constructor(args = []) {
|
|
980
|
+
this.content = [];
|
|
981
|
+
this.indent = 0;
|
|
982
|
+
if (this) this.args = args;
|
|
983
|
+
}
|
|
984
|
+
indented(fn) {
|
|
985
|
+
this.indent += 1;
|
|
986
|
+
fn(this);
|
|
987
|
+
this.indent -= 1;
|
|
988
|
+
}
|
|
989
|
+
write(arg) {
|
|
990
|
+
if (typeof arg === "function") {
|
|
991
|
+
arg(this, { execution: "sync" });
|
|
992
|
+
arg(this, { execution: "async" });
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
const lines = arg.split("\n").filter((x) => x);
|
|
996
|
+
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
|
|
997
|
+
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
|
|
998
|
+
for (const line of dedented) this.content.push(line);
|
|
999
|
+
}
|
|
1000
|
+
compile() {
|
|
1001
|
+
const F = Function;
|
|
1002
|
+
const args = this?.args;
|
|
1003
|
+
const lines = [...(this?.content ?? [``]).map((x) => ` ${x}`)];
|
|
1004
|
+
return new F(...args, lines.join("\n"));
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
//#endregion
|
|
1008
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
1009
|
+
const version = {
|
|
1010
|
+
major: 4,
|
|
1011
|
+
minor: 4,
|
|
1012
|
+
patch: 3
|
|
1013
|
+
};
|
|
1014
|
+
//#endregion
|
|
1015
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
|
|
1016
|
+
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1017
|
+
var _a;
|
|
1018
|
+
inst ?? (inst = {});
|
|
1019
|
+
inst._zod.def = def;
|
|
1020
|
+
inst._zod.bag = inst._zod.bag || {};
|
|
1021
|
+
inst._zod.version = version;
|
|
1022
|
+
const checks = [...inst._zod.def.checks ?? []];
|
|
1023
|
+
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
1024
|
+
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
1025
|
+
if (checks.length === 0) {
|
|
1026
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
1027
|
+
inst._zod.deferred?.push(() => {
|
|
1028
|
+
inst._zod.run = inst._zod.parse;
|
|
1029
|
+
});
|
|
1030
|
+
} else {
|
|
1031
|
+
const runChecks = (payload, checks, ctx) => {
|
|
1032
|
+
let isAborted = aborted(payload);
|
|
1033
|
+
let asyncResult;
|
|
1034
|
+
for (const ch of checks) {
|
|
1035
|
+
if (ch._zod.def.when) {
|
|
1036
|
+
if (explicitlyAborted(payload)) continue;
|
|
1037
|
+
if (!ch._zod.def.when(payload)) continue;
|
|
1038
|
+
} else if (isAborted) continue;
|
|
1039
|
+
const currLen = payload.issues.length;
|
|
1040
|
+
const _ = ch._zod.check(payload);
|
|
1041
|
+
if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
|
|
1042
|
+
if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
1043
|
+
await _;
|
|
1044
|
+
if (payload.issues.length === currLen) return;
|
|
1045
|
+
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
1046
|
+
});
|
|
1047
|
+
else {
|
|
1048
|
+
if (payload.issues.length === currLen) continue;
|
|
1049
|
+
if (!isAborted) isAborted = aborted(payload, currLen);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
if (asyncResult) return asyncResult.then(() => {
|
|
1053
|
+
return payload;
|
|
1054
|
+
});
|
|
1055
|
+
return payload;
|
|
1056
|
+
};
|
|
1057
|
+
const handleCanaryResult = (canary, payload, ctx) => {
|
|
1058
|
+
if (aborted(canary)) {
|
|
1059
|
+
canary.aborted = true;
|
|
1060
|
+
return canary;
|
|
1061
|
+
}
|
|
1062
|
+
const checkResult = runChecks(payload, checks, ctx);
|
|
1063
|
+
if (checkResult instanceof Promise) {
|
|
1064
|
+
if (ctx.async === false) throw new $ZodAsyncError();
|
|
1065
|
+
return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
|
|
1066
|
+
}
|
|
1067
|
+
return inst._zod.parse(checkResult, ctx);
|
|
1068
|
+
};
|
|
1069
|
+
inst._zod.run = (payload, ctx) => {
|
|
1070
|
+
if (ctx.skipChecks) return inst._zod.parse(payload, ctx);
|
|
1071
|
+
if (ctx.direction === "backward") {
|
|
1072
|
+
const canary = inst._zod.parse({
|
|
1073
|
+
value: payload.value,
|
|
1074
|
+
issues: []
|
|
1075
|
+
}, {
|
|
1076
|
+
...ctx,
|
|
1077
|
+
skipChecks: true
|
|
1078
|
+
});
|
|
1079
|
+
if (canary instanceof Promise) return canary.then((canary) => {
|
|
1080
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
1081
|
+
});
|
|
1082
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
1083
|
+
}
|
|
1084
|
+
const result = inst._zod.parse(payload, ctx);
|
|
1085
|
+
if (result instanceof Promise) {
|
|
1086
|
+
if (ctx.async === false) throw new $ZodAsyncError();
|
|
1087
|
+
return result.then((result) => runChecks(result, checks, ctx));
|
|
1088
|
+
}
|
|
1089
|
+
return runChecks(result, checks, ctx);
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
defineLazy(inst, "~standard", () => ({
|
|
1093
|
+
validate: (value) => {
|
|
1094
|
+
try {
|
|
1095
|
+
const r = safeParse$1(inst, value);
|
|
1096
|
+
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
1097
|
+
} catch (_) {
|
|
1098
|
+
return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
vendor: "zod",
|
|
1102
|
+
version: 1
|
|
1103
|
+
}));
|
|
1104
|
+
});
|
|
1105
|
+
const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
|
|
1106
|
+
$ZodType.init(inst, def);
|
|
1107
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
|
|
1108
|
+
inst._zod.parse = (payload, _) => {
|
|
1109
|
+
if (def.coerce) try {
|
|
1110
|
+
payload.value = String(payload.value);
|
|
1111
|
+
} catch (_) {}
|
|
1112
|
+
if (typeof payload.value === "string") return payload;
|
|
1113
|
+
payload.issues.push({
|
|
1114
|
+
expected: "string",
|
|
1115
|
+
code: "invalid_type",
|
|
1116
|
+
input: payload.value,
|
|
1117
|
+
inst
|
|
1118
|
+
});
|
|
1119
|
+
return payload;
|
|
1120
|
+
};
|
|
1121
|
+
});
|
|
1122
|
+
const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => {
|
|
1123
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
1124
|
+
$ZodString.init(inst, def);
|
|
1125
|
+
});
|
|
1126
|
+
const $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
|
|
1127
|
+
def.pattern ?? (def.pattern = guid);
|
|
1128
|
+
$ZodStringFormat.init(inst, def);
|
|
1129
|
+
});
|
|
1130
|
+
const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
|
|
1131
|
+
if (def.version) {
|
|
1132
|
+
const v = {
|
|
1133
|
+
v1: 1,
|
|
1134
|
+
v2: 2,
|
|
1135
|
+
v3: 3,
|
|
1136
|
+
v4: 4,
|
|
1137
|
+
v5: 5,
|
|
1138
|
+
v6: 6,
|
|
1139
|
+
v7: 7,
|
|
1140
|
+
v8: 8
|
|
1141
|
+
}[def.version];
|
|
1142
|
+
if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
1143
|
+
def.pattern ?? (def.pattern = uuid(v));
|
|
1144
|
+
} else def.pattern ?? (def.pattern = uuid());
|
|
1145
|
+
$ZodStringFormat.init(inst, def);
|
|
1146
|
+
});
|
|
1147
|
+
const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
|
|
1148
|
+
def.pattern ?? (def.pattern = email);
|
|
1149
|
+
$ZodStringFormat.init(inst, def);
|
|
1150
|
+
});
|
|
1151
|
+
const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
|
|
1152
|
+
$ZodStringFormat.init(inst, def);
|
|
1153
|
+
inst._zod.check = (payload) => {
|
|
1154
|
+
try {
|
|
1155
|
+
const trimmed = payload.value.trim();
|
|
1156
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
1157
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
1158
|
+
payload.issues.push({
|
|
1159
|
+
code: "invalid_format",
|
|
1160
|
+
format: "url",
|
|
1161
|
+
note: "Invalid URL format",
|
|
1162
|
+
input: payload.value,
|
|
1163
|
+
inst,
|
|
1164
|
+
continue: !def.abort
|
|
1165
|
+
});
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
const url = new URL(trimmed);
|
|
1170
|
+
if (def.hostname) {
|
|
1171
|
+
def.hostname.lastIndex = 0;
|
|
1172
|
+
if (!def.hostname.test(url.hostname)) payload.issues.push({
|
|
1173
|
+
code: "invalid_format",
|
|
1174
|
+
format: "url",
|
|
1175
|
+
note: "Invalid hostname",
|
|
1176
|
+
pattern: def.hostname.source,
|
|
1177
|
+
input: payload.value,
|
|
1178
|
+
inst,
|
|
1179
|
+
continue: !def.abort
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
if (def.protocol) {
|
|
1183
|
+
def.protocol.lastIndex = 0;
|
|
1184
|
+
if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({
|
|
1185
|
+
code: "invalid_format",
|
|
1186
|
+
format: "url",
|
|
1187
|
+
note: "Invalid protocol",
|
|
1188
|
+
pattern: def.protocol.source,
|
|
1189
|
+
input: payload.value,
|
|
1190
|
+
inst,
|
|
1191
|
+
continue: !def.abort
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
if (def.normalize) payload.value = url.href;
|
|
1195
|
+
else payload.value = trimmed;
|
|
1196
|
+
return;
|
|
1197
|
+
} catch (_) {
|
|
1198
|
+
payload.issues.push({
|
|
1199
|
+
code: "invalid_format",
|
|
1200
|
+
format: "url",
|
|
1201
|
+
input: payload.value,
|
|
1202
|
+
inst,
|
|
1203
|
+
continue: !def.abort
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
});
|
|
1208
|
+
const $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
|
|
1209
|
+
def.pattern ?? (def.pattern = emoji());
|
|
1210
|
+
$ZodStringFormat.init(inst, def);
|
|
1211
|
+
});
|
|
1212
|
+
const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
|
|
1213
|
+
def.pattern ?? (def.pattern = nanoid);
|
|
1214
|
+
$ZodStringFormat.init(inst, def);
|
|
1215
|
+
});
|
|
1216
|
+
/**
|
|
1217
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1218
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1219
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1220
|
+
*/
|
|
1221
|
+
const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
|
|
1222
|
+
def.pattern ?? (def.pattern = cuid);
|
|
1223
|
+
$ZodStringFormat.init(inst, def);
|
|
1224
|
+
});
|
|
1225
|
+
const $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
|
|
1226
|
+
def.pattern ?? (def.pattern = cuid2);
|
|
1227
|
+
$ZodStringFormat.init(inst, def);
|
|
1228
|
+
});
|
|
1229
|
+
const $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
|
|
1230
|
+
def.pattern ?? (def.pattern = ulid);
|
|
1231
|
+
$ZodStringFormat.init(inst, def);
|
|
1232
|
+
});
|
|
1233
|
+
const $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
|
|
1234
|
+
def.pattern ?? (def.pattern = xid);
|
|
1235
|
+
$ZodStringFormat.init(inst, def);
|
|
1236
|
+
});
|
|
1237
|
+
const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
|
|
1238
|
+
def.pattern ?? (def.pattern = ksuid);
|
|
1239
|
+
$ZodStringFormat.init(inst, def);
|
|
1240
|
+
});
|
|
1241
|
+
const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
|
|
1242
|
+
def.pattern ?? (def.pattern = datetime$1(def));
|
|
1243
|
+
$ZodStringFormat.init(inst, def);
|
|
1244
|
+
});
|
|
1245
|
+
const $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
|
|
1246
|
+
def.pattern ?? (def.pattern = date$1);
|
|
1247
|
+
$ZodStringFormat.init(inst, def);
|
|
1248
|
+
});
|
|
1249
|
+
const $ZodISOTime = /*@__PURE__*/ $constructor("$ZodISOTime", (inst, def) => {
|
|
1250
|
+
def.pattern ?? (def.pattern = time$1(def));
|
|
1251
|
+
$ZodStringFormat.init(inst, def);
|
|
1252
|
+
});
|
|
1253
|
+
const $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def) => {
|
|
1254
|
+
def.pattern ?? (def.pattern = duration$1);
|
|
1255
|
+
$ZodStringFormat.init(inst, def);
|
|
1256
|
+
});
|
|
1257
|
+
const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
|
|
1258
|
+
def.pattern ?? (def.pattern = ipv4);
|
|
1259
|
+
$ZodStringFormat.init(inst, def);
|
|
1260
|
+
inst._zod.bag.format = `ipv4`;
|
|
1261
|
+
});
|
|
1262
|
+
const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
|
|
1263
|
+
def.pattern ?? (def.pattern = ipv6);
|
|
1264
|
+
$ZodStringFormat.init(inst, def);
|
|
1265
|
+
inst._zod.bag.format = `ipv6`;
|
|
1266
|
+
inst._zod.check = (payload) => {
|
|
1267
|
+
try {
|
|
1268
|
+
new URL(`http://[${payload.value}]`);
|
|
1269
|
+
} catch {
|
|
1270
|
+
payload.issues.push({
|
|
1271
|
+
code: "invalid_format",
|
|
1272
|
+
format: "ipv6",
|
|
1273
|
+
input: payload.value,
|
|
1274
|
+
inst,
|
|
1275
|
+
continue: !def.abort
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
});
|
|
1280
|
+
const $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
1281
|
+
def.pattern ?? (def.pattern = cidrv4);
|
|
1282
|
+
$ZodStringFormat.init(inst, def);
|
|
1283
|
+
});
|
|
1284
|
+
const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
1285
|
+
def.pattern ?? (def.pattern = cidrv6);
|
|
1286
|
+
$ZodStringFormat.init(inst, def);
|
|
1287
|
+
inst._zod.check = (payload) => {
|
|
1288
|
+
const parts = payload.value.split("/");
|
|
1289
|
+
try {
|
|
1290
|
+
if (parts.length !== 2) throw new Error();
|
|
1291
|
+
const [address, prefix] = parts;
|
|
1292
|
+
if (!prefix) throw new Error();
|
|
1293
|
+
const prefixNum = Number(prefix);
|
|
1294
|
+
if (`${prefixNum}` !== prefix) throw new Error();
|
|
1295
|
+
if (prefixNum < 0 || prefixNum > 128) throw new Error();
|
|
1296
|
+
new URL(`http://[${address}]`);
|
|
1297
|
+
} catch {
|
|
1298
|
+
payload.issues.push({
|
|
1299
|
+
code: "invalid_format",
|
|
1300
|
+
format: "cidrv6",
|
|
1301
|
+
input: payload.value,
|
|
1302
|
+
inst,
|
|
1303
|
+
continue: !def.abort
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
};
|
|
1307
|
+
});
|
|
1308
|
+
function isValidBase64(data) {
|
|
1309
|
+
if (data === "") return true;
|
|
1310
|
+
if (/\s/.test(data)) return false;
|
|
1311
|
+
if (data.length % 4 !== 0) return false;
|
|
1312
|
+
try {
|
|
1313
|
+
atob(data);
|
|
1314
|
+
return true;
|
|
1315
|
+
} catch {
|
|
1316
|
+
return false;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
|
|
1320
|
+
def.pattern ?? (def.pattern = base64);
|
|
1321
|
+
$ZodStringFormat.init(inst, def);
|
|
1322
|
+
inst._zod.bag.contentEncoding = "base64";
|
|
1323
|
+
inst._zod.check = (payload) => {
|
|
1324
|
+
if (isValidBase64(payload.value)) return;
|
|
1325
|
+
payload.issues.push({
|
|
1326
|
+
code: "invalid_format",
|
|
1327
|
+
format: "base64",
|
|
1328
|
+
input: payload.value,
|
|
1329
|
+
inst,
|
|
1330
|
+
continue: !def.abort
|
|
1331
|
+
});
|
|
1332
|
+
};
|
|
1333
|
+
});
|
|
1334
|
+
function isValidBase64URL(data) {
|
|
1335
|
+
if (!base64url.test(data)) return false;
|
|
1336
|
+
const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
1337
|
+
return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
|
|
1338
|
+
}
|
|
1339
|
+
const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
|
|
1340
|
+
def.pattern ?? (def.pattern = base64url);
|
|
1341
|
+
$ZodStringFormat.init(inst, def);
|
|
1342
|
+
inst._zod.bag.contentEncoding = "base64url";
|
|
1343
|
+
inst._zod.check = (payload) => {
|
|
1344
|
+
if (isValidBase64URL(payload.value)) return;
|
|
1345
|
+
payload.issues.push({
|
|
1346
|
+
code: "invalid_format",
|
|
1347
|
+
format: "base64url",
|
|
1348
|
+
input: payload.value,
|
|
1349
|
+
inst,
|
|
1350
|
+
continue: !def.abort
|
|
1351
|
+
});
|
|
1352
|
+
};
|
|
1353
|
+
});
|
|
1354
|
+
const $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
|
|
1355
|
+
def.pattern ?? (def.pattern = e164);
|
|
1356
|
+
$ZodStringFormat.init(inst, def);
|
|
1357
|
+
});
|
|
1358
|
+
function isValidJWT(token, algorithm = null) {
|
|
1359
|
+
try {
|
|
1360
|
+
const tokensParts = token.split(".");
|
|
1361
|
+
if (tokensParts.length !== 3) return false;
|
|
1362
|
+
const [header] = tokensParts;
|
|
1363
|
+
if (!header) return false;
|
|
1364
|
+
const parsedHeader = JSON.parse(atob(header));
|
|
1365
|
+
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
|
|
1366
|
+
if (!parsedHeader.alg) return false;
|
|
1367
|
+
if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;
|
|
1368
|
+
return true;
|
|
1369
|
+
} catch {
|
|
1370
|
+
return false;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
|
|
1374
|
+
$ZodStringFormat.init(inst, def);
|
|
1375
|
+
inst._zod.check = (payload) => {
|
|
1376
|
+
if (isValidJWT(payload.value, def.alg)) return;
|
|
1377
|
+
payload.issues.push({
|
|
1378
|
+
code: "invalid_format",
|
|
1379
|
+
format: "jwt",
|
|
1380
|
+
input: payload.value,
|
|
1381
|
+
inst,
|
|
1382
|
+
continue: !def.abort
|
|
1383
|
+
});
|
|
1384
|
+
};
|
|
1385
|
+
});
|
|
1386
|
+
const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
|
|
1387
|
+
$ZodType.init(inst, def);
|
|
1388
|
+
inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
|
|
1389
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
1390
|
+
if (def.coerce) try {
|
|
1391
|
+
payload.value = Number(payload.value);
|
|
1392
|
+
} catch (_) {}
|
|
1393
|
+
const input = payload.value;
|
|
1394
|
+
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
|
|
1395
|
+
const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
|
|
1396
|
+
payload.issues.push({
|
|
1397
|
+
expected: "number",
|
|
1398
|
+
code: "invalid_type",
|
|
1399
|
+
input,
|
|
1400
|
+
inst,
|
|
1401
|
+
...received ? { received } : {}
|
|
1402
|
+
});
|
|
1403
|
+
return payload;
|
|
1404
|
+
};
|
|
1405
|
+
});
|
|
1406
|
+
const $ZodNumberFormat = /*@__PURE__*/ $constructor("$ZodNumberFormat", (inst, def) => {
|
|
1407
|
+
$ZodCheckNumberFormat.init(inst, def);
|
|
1408
|
+
$ZodNumber.init(inst, def);
|
|
1409
|
+
});
|
|
1410
|
+
const $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
|
|
1411
|
+
$ZodType.init(inst, def);
|
|
1412
|
+
inst._zod.parse = (payload) => payload;
|
|
1413
|
+
});
|
|
1414
|
+
const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
|
|
1415
|
+
$ZodType.init(inst, def);
|
|
1416
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
1417
|
+
payload.issues.push({
|
|
1418
|
+
expected: "never",
|
|
1419
|
+
code: "invalid_type",
|
|
1420
|
+
input: payload.value,
|
|
1421
|
+
inst
|
|
1422
|
+
});
|
|
1423
|
+
return payload;
|
|
1424
|
+
};
|
|
1425
|
+
});
|
|
1426
|
+
function handleArrayResult(result, final, index) {
|
|
1427
|
+
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
1428
|
+
final.value[index] = result.value;
|
|
1429
|
+
}
|
|
1430
|
+
const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
|
|
1431
|
+
$ZodType.init(inst, def);
|
|
1432
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1433
|
+
const input = payload.value;
|
|
1434
|
+
if (!Array.isArray(input)) {
|
|
1435
|
+
payload.issues.push({
|
|
1436
|
+
expected: "array",
|
|
1437
|
+
code: "invalid_type",
|
|
1438
|
+
input,
|
|
1439
|
+
inst
|
|
1440
|
+
});
|
|
1441
|
+
return payload;
|
|
1442
|
+
}
|
|
1443
|
+
payload.value = Array(input.length);
|
|
1444
|
+
const proms = [];
|
|
1445
|
+
for (let i = 0; i < input.length; i++) {
|
|
1446
|
+
const item = input[i];
|
|
1447
|
+
const result = def.element._zod.run({
|
|
1448
|
+
value: item,
|
|
1449
|
+
issues: []
|
|
1450
|
+
}, ctx);
|
|
1451
|
+
if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
|
|
1452
|
+
else handleArrayResult(result, payload, i);
|
|
1453
|
+
}
|
|
1454
|
+
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
1455
|
+
return payload;
|
|
1456
|
+
};
|
|
1457
|
+
});
|
|
1458
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
1459
|
+
const isPresent = key in input;
|
|
1460
|
+
if (result.issues.length) {
|
|
1461
|
+
if (isOptionalIn && isOptionalOut && !isPresent) return;
|
|
1462
|
+
final.issues.push(...prefixIssues(key, result.issues));
|
|
1463
|
+
}
|
|
1464
|
+
if (!isPresent && !isOptionalIn) {
|
|
1465
|
+
if (!result.issues.length) final.issues.push({
|
|
1466
|
+
code: "invalid_type",
|
|
1467
|
+
expected: "nonoptional",
|
|
1468
|
+
input: void 0,
|
|
1469
|
+
path: [key]
|
|
1470
|
+
});
|
|
1471
|
+
return;
|
|
1472
|
+
}
|
|
1473
|
+
if (result.value === void 0) {
|
|
1474
|
+
if (isPresent) final.value[key] = void 0;
|
|
1475
|
+
} else final.value[key] = result.value;
|
|
1476
|
+
}
|
|
1477
|
+
function normalizeDef(def) {
|
|
1478
|
+
const keys = Object.keys(def.shape);
|
|
1479
|
+
for (const k of keys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
1480
|
+
const okeys = optionalKeys(def.shape);
|
|
1481
|
+
return {
|
|
1482
|
+
...def,
|
|
1483
|
+
keys,
|
|
1484
|
+
keySet: new Set(keys),
|
|
1485
|
+
numKeys: keys.length,
|
|
1486
|
+
optionalKeys: new Set(okeys)
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
1490
|
+
const unrecognized = [];
|
|
1491
|
+
const keySet = def.keySet;
|
|
1492
|
+
const _catchall = def.catchall._zod;
|
|
1493
|
+
const t = _catchall.def.type;
|
|
1494
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
1495
|
+
const isOptionalOut = _catchall.optout === "optional";
|
|
1496
|
+
for (const key in input) {
|
|
1497
|
+
if (key === "__proto__") continue;
|
|
1498
|
+
if (keySet.has(key)) continue;
|
|
1499
|
+
if (t === "never") {
|
|
1500
|
+
unrecognized.push(key);
|
|
1501
|
+
continue;
|
|
1502
|
+
}
|
|
1503
|
+
const r = _catchall.run({
|
|
1504
|
+
value: input[key],
|
|
1505
|
+
issues: []
|
|
1506
|
+
}, ctx);
|
|
1507
|
+
if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
1508
|
+
else handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
1509
|
+
}
|
|
1510
|
+
if (unrecognized.length) payload.issues.push({
|
|
1511
|
+
code: "unrecognized_keys",
|
|
1512
|
+
keys: unrecognized,
|
|
1513
|
+
input,
|
|
1514
|
+
inst
|
|
1515
|
+
});
|
|
1516
|
+
if (!proms.length) return payload;
|
|
1517
|
+
return Promise.all(proms).then(() => {
|
|
1518
|
+
return payload;
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
1522
|
+
$ZodType.init(inst, def);
|
|
1523
|
+
if (!Object.getOwnPropertyDescriptor(def, "shape")?.get) {
|
|
1524
|
+
const sh = def.shape;
|
|
1525
|
+
Object.defineProperty(def, "shape", { get: () => {
|
|
1526
|
+
const newSh = { ...sh };
|
|
1527
|
+
Object.defineProperty(def, "shape", { value: newSh });
|
|
1528
|
+
return newSh;
|
|
1529
|
+
} });
|
|
1530
|
+
}
|
|
1531
|
+
const _normalized = cached(() => normalizeDef(def));
|
|
1532
|
+
defineLazy(inst._zod, "propValues", () => {
|
|
1533
|
+
const shape = def.shape;
|
|
1534
|
+
const propValues = {};
|
|
1535
|
+
for (const key in shape) {
|
|
1536
|
+
const field = shape[key]._zod;
|
|
1537
|
+
if (field.values) {
|
|
1538
|
+
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
1539
|
+
for (const v of field.values) propValues[key].add(v);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
return propValues;
|
|
1543
|
+
});
|
|
1544
|
+
const isObject$1 = isObject;
|
|
1545
|
+
const catchall = def.catchall;
|
|
1546
|
+
let value;
|
|
1547
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1548
|
+
value ?? (value = _normalized.value);
|
|
1549
|
+
const input = payload.value;
|
|
1550
|
+
if (!isObject$1(input)) {
|
|
1551
|
+
payload.issues.push({
|
|
1552
|
+
expected: "object",
|
|
1553
|
+
code: "invalid_type",
|
|
1554
|
+
input,
|
|
1555
|
+
inst
|
|
1556
|
+
});
|
|
1557
|
+
return payload;
|
|
1558
|
+
}
|
|
1559
|
+
payload.value = {};
|
|
1560
|
+
const proms = [];
|
|
1561
|
+
const shape = value.shape;
|
|
1562
|
+
for (const key of value.keys) {
|
|
1563
|
+
const el = shape[key];
|
|
1564
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
1565
|
+
const isOptionalOut = el._zod.optout === "optional";
|
|
1566
|
+
const r = el._zod.run({
|
|
1567
|
+
value: input[key],
|
|
1568
|
+
issues: []
|
|
1569
|
+
}, ctx);
|
|
1570
|
+
if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
1571
|
+
else handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
1572
|
+
}
|
|
1573
|
+
if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
1574
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
1575
|
+
};
|
|
1576
|
+
});
|
|
1577
|
+
const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
1578
|
+
$ZodObject.init(inst, def);
|
|
1579
|
+
const superParse = inst._zod.parse;
|
|
1580
|
+
const _normalized = cached(() => normalizeDef(def));
|
|
1581
|
+
const generateFastpass = (shape) => {
|
|
1582
|
+
const doc = new Doc([
|
|
1583
|
+
"shape",
|
|
1584
|
+
"payload",
|
|
1585
|
+
"ctx"
|
|
1586
|
+
]);
|
|
1587
|
+
const normalized = _normalized.value;
|
|
1588
|
+
const parseStr = (key) => {
|
|
1589
|
+
const k = esc(key);
|
|
1590
|
+
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1591
|
+
};
|
|
1592
|
+
doc.write(`const input = payload.value;`);
|
|
1593
|
+
const ids = Object.create(null);
|
|
1594
|
+
let counter = 0;
|
|
1595
|
+
for (const key of normalized.keys) ids[key] = `key_${counter++}`;
|
|
1596
|
+
doc.write(`const newResult = {};`);
|
|
1597
|
+
for (const key of normalized.keys) {
|
|
1598
|
+
const id = ids[key];
|
|
1599
|
+
const k = esc(key);
|
|
1600
|
+
const schema = shape[key];
|
|
1601
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
1602
|
+
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
1603
|
+
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
1604
|
+
if (isOptionalIn && isOptionalOut) doc.write(`
|
|
1605
|
+
if (${id}.issues.length) {
|
|
1606
|
+
if (${k} in input) {
|
|
1607
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
1608
|
+
...iss,
|
|
1609
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
1610
|
+
})));
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
if (${id}.value === undefined) {
|
|
1615
|
+
if (${k} in input) {
|
|
1616
|
+
newResult[${k}] = undefined;
|
|
1617
|
+
}
|
|
1618
|
+
} else {
|
|
1619
|
+
newResult[${k}] = ${id}.value;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
`);
|
|
1623
|
+
else if (!isOptionalIn) doc.write(`
|
|
1624
|
+
const ${id}_present = ${k} in input;
|
|
1625
|
+
if (${id}.issues.length) {
|
|
1626
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
1627
|
+
...iss,
|
|
1628
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
1629
|
+
})));
|
|
1630
|
+
}
|
|
1631
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
1632
|
+
payload.issues.push({
|
|
1633
|
+
code: "invalid_type",
|
|
1634
|
+
expected: "nonoptional",
|
|
1635
|
+
input: undefined,
|
|
1636
|
+
path: [${k}]
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
if (${id}_present) {
|
|
1641
|
+
if (${id}.value === undefined) {
|
|
1642
|
+
newResult[${k}] = undefined;
|
|
1643
|
+
} else {
|
|
1644
|
+
newResult[${k}] = ${id}.value;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
`);
|
|
1649
|
+
else doc.write(`
|
|
1650
|
+
if (${id}.issues.length) {
|
|
1651
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
1652
|
+
...iss,
|
|
1653
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
1654
|
+
})));
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
if (${id}.value === undefined) {
|
|
1658
|
+
if (${k} in input) {
|
|
1659
|
+
newResult[${k}] = undefined;
|
|
1660
|
+
}
|
|
1661
|
+
} else {
|
|
1662
|
+
newResult[${k}] = ${id}.value;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
`);
|
|
1666
|
+
}
|
|
1667
|
+
doc.write(`payload.value = newResult;`);
|
|
1668
|
+
doc.write(`return payload;`);
|
|
1669
|
+
const fn = doc.compile();
|
|
1670
|
+
return (payload, ctx) => fn(shape, payload, ctx);
|
|
1671
|
+
};
|
|
1672
|
+
let fastpass;
|
|
1673
|
+
const isObject$2 = isObject;
|
|
1674
|
+
const jit = !globalConfig.jitless;
|
|
1675
|
+
const fastEnabled = jit && allowsEval.value;
|
|
1676
|
+
const catchall = def.catchall;
|
|
1677
|
+
let value;
|
|
1678
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1679
|
+
value ?? (value = _normalized.value);
|
|
1680
|
+
const input = payload.value;
|
|
1681
|
+
if (!isObject$2(input)) {
|
|
1682
|
+
payload.issues.push({
|
|
1683
|
+
expected: "object",
|
|
1684
|
+
code: "invalid_type",
|
|
1685
|
+
input,
|
|
1686
|
+
inst
|
|
1687
|
+
});
|
|
1688
|
+
return payload;
|
|
1689
|
+
}
|
|
1690
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
1691
|
+
if (!fastpass) fastpass = generateFastpass(def.shape);
|
|
1692
|
+
payload = fastpass(payload, ctx);
|
|
1693
|
+
if (!catchall) return payload;
|
|
1694
|
+
return handleCatchall([], input, payload, ctx, value, inst);
|
|
1695
|
+
}
|
|
1696
|
+
return superParse(payload, ctx);
|
|
1697
|
+
};
|
|
1698
|
+
});
|
|
1699
|
+
function handleUnionResults(results, final, inst, ctx) {
|
|
1700
|
+
for (const result of results) if (result.issues.length === 0) {
|
|
1701
|
+
final.value = result.value;
|
|
1702
|
+
return final;
|
|
1703
|
+
}
|
|
1704
|
+
const nonaborted = results.filter((r) => !aborted(r));
|
|
1705
|
+
if (nonaborted.length === 1) {
|
|
1706
|
+
final.value = nonaborted[0].value;
|
|
1707
|
+
return nonaborted[0];
|
|
1708
|
+
}
|
|
1709
|
+
final.issues.push({
|
|
1710
|
+
code: "invalid_union",
|
|
1711
|
+
input: final.value,
|
|
1712
|
+
inst,
|
|
1713
|
+
errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
1714
|
+
});
|
|
1715
|
+
return final;
|
|
1716
|
+
}
|
|
1717
|
+
const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
|
|
1718
|
+
$ZodType.init(inst, def);
|
|
1719
|
+
defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
|
|
1720
|
+
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
1721
|
+
defineLazy(inst._zod, "values", () => {
|
|
1722
|
+
if (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
1723
|
+
});
|
|
1724
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
1725
|
+
if (def.options.every((o) => o._zod.pattern)) {
|
|
1726
|
+
const patterns = def.options.map((o) => o._zod.pattern);
|
|
1727
|
+
return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
1731
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1732
|
+
if (first) return first(payload, ctx);
|
|
1733
|
+
let async = false;
|
|
1734
|
+
const results = [];
|
|
1735
|
+
for (const option of def.options) {
|
|
1736
|
+
const result = option._zod.run({
|
|
1737
|
+
value: payload.value,
|
|
1738
|
+
issues: []
|
|
1739
|
+
}, ctx);
|
|
1740
|
+
if (result instanceof Promise) {
|
|
1741
|
+
results.push(result);
|
|
1742
|
+
async = true;
|
|
1743
|
+
} else {
|
|
1744
|
+
if (result.issues.length === 0) return result;
|
|
1745
|
+
results.push(result);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
if (!async) return handleUnionResults(results, payload, inst, ctx);
|
|
1749
|
+
return Promise.all(results).then((results) => {
|
|
1750
|
+
return handleUnionResults(results, payload, inst, ctx);
|
|
1751
|
+
});
|
|
1752
|
+
};
|
|
1753
|
+
});
|
|
1754
|
+
const $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
|
|
1755
|
+
$ZodType.init(inst, def);
|
|
1756
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1757
|
+
const input = payload.value;
|
|
1758
|
+
const left = def.left._zod.run({
|
|
1759
|
+
value: input,
|
|
1760
|
+
issues: []
|
|
1761
|
+
}, ctx);
|
|
1762
|
+
const right = def.right._zod.run({
|
|
1763
|
+
value: input,
|
|
1764
|
+
issues: []
|
|
1765
|
+
}, ctx);
|
|
1766
|
+
if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {
|
|
1767
|
+
return handleIntersectionResults(payload, left, right);
|
|
1768
|
+
});
|
|
1769
|
+
return handleIntersectionResults(payload, left, right);
|
|
1770
|
+
};
|
|
1771
|
+
});
|
|
1772
|
+
function mergeValues(a, b) {
|
|
1773
|
+
if (a === b) return {
|
|
1774
|
+
valid: true,
|
|
1775
|
+
data: a
|
|
1776
|
+
};
|
|
1777
|
+
if (a instanceof Date && b instanceof Date && +a === +b) return {
|
|
1778
|
+
valid: true,
|
|
1779
|
+
data: a
|
|
1780
|
+
};
|
|
1781
|
+
if (isPlainObject(a) && isPlainObject(b)) {
|
|
1782
|
+
const bKeys = Object.keys(b);
|
|
1783
|
+
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
1784
|
+
const newObj = {
|
|
1785
|
+
...a,
|
|
1786
|
+
...b
|
|
1787
|
+
};
|
|
1788
|
+
for (const key of sharedKeys) {
|
|
1789
|
+
const sharedValue = mergeValues(a[key], b[key]);
|
|
1790
|
+
if (!sharedValue.valid) return {
|
|
1791
|
+
valid: false,
|
|
1792
|
+
mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
|
|
1793
|
+
};
|
|
1794
|
+
newObj[key] = sharedValue.data;
|
|
1795
|
+
}
|
|
1796
|
+
return {
|
|
1797
|
+
valid: true,
|
|
1798
|
+
data: newObj
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
1802
|
+
if (a.length !== b.length) return {
|
|
1803
|
+
valid: false,
|
|
1804
|
+
mergeErrorPath: []
|
|
1805
|
+
};
|
|
1806
|
+
const newArray = [];
|
|
1807
|
+
for (let index = 0; index < a.length; index++) {
|
|
1808
|
+
const itemA = a[index];
|
|
1809
|
+
const itemB = b[index];
|
|
1810
|
+
const sharedValue = mergeValues(itemA, itemB);
|
|
1811
|
+
if (!sharedValue.valid) return {
|
|
1812
|
+
valid: false,
|
|
1813
|
+
mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
|
|
1814
|
+
};
|
|
1815
|
+
newArray.push(sharedValue.data);
|
|
1816
|
+
}
|
|
1817
|
+
return {
|
|
1818
|
+
valid: true,
|
|
1819
|
+
data: newArray
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
return {
|
|
1823
|
+
valid: false,
|
|
1824
|
+
mergeErrorPath: []
|
|
1825
|
+
};
|
|
1826
|
+
}
|
|
1827
|
+
function handleIntersectionResults(result, left, right) {
|
|
1828
|
+
const unrecKeys = /* @__PURE__ */ new Map();
|
|
1829
|
+
let unrecIssue;
|
|
1830
|
+
for (const iss of left.issues) if (iss.code === "unrecognized_keys") {
|
|
1831
|
+
unrecIssue ?? (unrecIssue = iss);
|
|
1832
|
+
for (const k of iss.keys) {
|
|
1833
|
+
if (!unrecKeys.has(k)) unrecKeys.set(k, {});
|
|
1834
|
+
unrecKeys.get(k).l = true;
|
|
1835
|
+
}
|
|
1836
|
+
} else result.issues.push(iss);
|
|
1837
|
+
for (const iss of right.issues) if (iss.code === "unrecognized_keys") for (const k of iss.keys) {
|
|
1838
|
+
if (!unrecKeys.has(k)) unrecKeys.set(k, {});
|
|
1839
|
+
unrecKeys.get(k).r = true;
|
|
1840
|
+
}
|
|
1841
|
+
else result.issues.push(iss);
|
|
1842
|
+
const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
|
|
1843
|
+
if (bothKeys.length && unrecIssue) result.issues.push({
|
|
1844
|
+
...unrecIssue,
|
|
1845
|
+
keys: bothKeys
|
|
1846
|
+
});
|
|
1847
|
+
if (aborted(result)) return result;
|
|
1848
|
+
const merged = mergeValues(left.value, right.value);
|
|
1849
|
+
if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
|
|
1850
|
+
result.value = merged.data;
|
|
1851
|
+
return result;
|
|
1852
|
+
}
|
|
1853
|
+
const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
|
|
1854
|
+
$ZodType.init(inst, def);
|
|
1855
|
+
const values = getEnumValues(def.entries);
|
|
1856
|
+
const valuesSet = new Set(values);
|
|
1857
|
+
inst._zod.values = valuesSet;
|
|
1858
|
+
inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
1859
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
1860
|
+
const input = payload.value;
|
|
1861
|
+
if (valuesSet.has(input)) return payload;
|
|
1862
|
+
payload.issues.push({
|
|
1863
|
+
code: "invalid_value",
|
|
1864
|
+
values,
|
|
1865
|
+
input,
|
|
1866
|
+
inst
|
|
1867
|
+
});
|
|
1868
|
+
return payload;
|
|
1869
|
+
};
|
|
1870
|
+
});
|
|
1871
|
+
const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
|
|
1872
|
+
$ZodType.init(inst, def);
|
|
1873
|
+
if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
|
|
1874
|
+
const values = new Set(def.values);
|
|
1875
|
+
inst._zod.values = values;
|
|
1876
|
+
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
1877
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
1878
|
+
const input = payload.value;
|
|
1879
|
+
if (values.has(input)) return payload;
|
|
1880
|
+
payload.issues.push({
|
|
1881
|
+
code: "invalid_value",
|
|
1882
|
+
values: def.values,
|
|
1883
|
+
input,
|
|
1884
|
+
inst
|
|
1885
|
+
});
|
|
1886
|
+
return payload;
|
|
1887
|
+
};
|
|
1888
|
+
});
|
|
1889
|
+
const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
|
|
1890
|
+
$ZodType.init(inst, def);
|
|
1891
|
+
inst._zod.optin = "optional";
|
|
1892
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1893
|
+
if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
|
|
1894
|
+
const _out = def.transform(payload.value, payload);
|
|
1895
|
+
if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
|
|
1896
|
+
payload.value = output;
|
|
1897
|
+
payload.fallback = true;
|
|
1898
|
+
return payload;
|
|
1899
|
+
});
|
|
1900
|
+
if (_out instanceof Promise) throw new $ZodAsyncError();
|
|
1901
|
+
payload.value = _out;
|
|
1902
|
+
payload.fallback = true;
|
|
1903
|
+
return payload;
|
|
1904
|
+
};
|
|
1905
|
+
});
|
|
1906
|
+
function handleOptionalResult(result, input) {
|
|
1907
|
+
if (input === void 0 && (result.issues.length || result.fallback)) return {
|
|
1908
|
+
issues: [],
|
|
1909
|
+
value: void 0
|
|
1910
|
+
};
|
|
1911
|
+
return result;
|
|
1912
|
+
}
|
|
1913
|
+
const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
|
|
1914
|
+
$ZodType.init(inst, def);
|
|
1915
|
+
inst._zod.optin = "optional";
|
|
1916
|
+
inst._zod.optout = "optional";
|
|
1917
|
+
defineLazy(inst._zod, "values", () => {
|
|
1918
|
+
return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
|
|
1919
|
+
});
|
|
1920
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
1921
|
+
const pattern = def.innerType._zod.pattern;
|
|
1922
|
+
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
|
|
1923
|
+
});
|
|
1924
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1925
|
+
if (def.innerType._zod.optin === "optional") {
|
|
1926
|
+
const input = payload.value;
|
|
1927
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
1928
|
+
if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, input));
|
|
1929
|
+
return handleOptionalResult(result, input);
|
|
1930
|
+
}
|
|
1931
|
+
if (payload.value === void 0) return payload;
|
|
1932
|
+
return def.innerType._zod.run(payload, ctx);
|
|
1933
|
+
};
|
|
1934
|
+
});
|
|
1935
|
+
const $ZodExactOptional = /*@__PURE__*/ $constructor("$ZodExactOptional", (inst, def) => {
|
|
1936
|
+
$ZodOptional.init(inst, def);
|
|
1937
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1938
|
+
defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
|
|
1939
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1940
|
+
return def.innerType._zod.run(payload, ctx);
|
|
1941
|
+
};
|
|
1942
|
+
});
|
|
1943
|
+
const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
|
|
1944
|
+
$ZodType.init(inst, def);
|
|
1945
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
1946
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1947
|
+
defineLazy(inst._zod, "pattern", () => {
|
|
1948
|
+
const pattern = def.innerType._zod.pattern;
|
|
1949
|
+
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
|
|
1950
|
+
});
|
|
1951
|
+
defineLazy(inst._zod, "values", () => {
|
|
1952
|
+
return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
|
|
1953
|
+
});
|
|
1954
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1955
|
+
if (payload.value === null) return payload;
|
|
1956
|
+
return def.innerType._zod.run(payload, ctx);
|
|
1957
|
+
};
|
|
1958
|
+
});
|
|
1959
|
+
const $ZodDefault = /*@__PURE__*/ $constructor("$ZodDefault", (inst, def) => {
|
|
1960
|
+
$ZodType.init(inst, def);
|
|
1961
|
+
inst._zod.optin = "optional";
|
|
1962
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1963
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1964
|
+
if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
|
|
1965
|
+
if (payload.value === void 0) {
|
|
1966
|
+
payload.value = def.defaultValue;
|
|
1967
|
+
/**
|
|
1968
|
+
* $ZodDefault returns the default value immediately in forward direction.
|
|
1969
|
+
* It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
|
|
1970
|
+
return payload;
|
|
1971
|
+
}
|
|
1972
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
1973
|
+
if (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));
|
|
1974
|
+
return handleDefaultResult(result, def);
|
|
1975
|
+
};
|
|
1976
|
+
});
|
|
1977
|
+
function handleDefaultResult(payload, def) {
|
|
1978
|
+
if (payload.value === void 0) payload.value = def.defaultValue;
|
|
1979
|
+
return payload;
|
|
1980
|
+
}
|
|
1981
|
+
const $ZodPrefault = /*@__PURE__*/ $constructor("$ZodPrefault", (inst, def) => {
|
|
1982
|
+
$ZodType.init(inst, def);
|
|
1983
|
+
inst._zod.optin = "optional";
|
|
1984
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1985
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1986
|
+
if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
|
|
1987
|
+
if (payload.value === void 0) payload.value = def.defaultValue;
|
|
1988
|
+
return def.innerType._zod.run(payload, ctx);
|
|
1989
|
+
};
|
|
1990
|
+
});
|
|
1991
|
+
const $ZodNonOptional = /*@__PURE__*/ $constructor("$ZodNonOptional", (inst, def) => {
|
|
1992
|
+
$ZodType.init(inst, def);
|
|
1993
|
+
defineLazy(inst._zod, "values", () => {
|
|
1994
|
+
const v = def.innerType._zod.values;
|
|
1995
|
+
return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
|
|
1996
|
+
});
|
|
1997
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1998
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
1999
|
+
if (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));
|
|
2000
|
+
return handleNonOptionalResult(result, inst);
|
|
2001
|
+
};
|
|
2002
|
+
});
|
|
2003
|
+
function handleNonOptionalResult(payload, inst) {
|
|
2004
|
+
if (!payload.issues.length && payload.value === void 0) payload.issues.push({
|
|
2005
|
+
code: "invalid_type",
|
|
2006
|
+
expected: "nonoptional",
|
|
2007
|
+
input: payload.value,
|
|
2008
|
+
inst
|
|
2009
|
+
});
|
|
2010
|
+
return payload;
|
|
2011
|
+
}
|
|
2012
|
+
const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
|
|
2013
|
+
$ZodType.init(inst, def);
|
|
2014
|
+
inst._zod.optin = "optional";
|
|
2015
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
2016
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2017
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2018
|
+
if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
|
|
2019
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2020
|
+
if (result instanceof Promise) return result.then((result) => {
|
|
2021
|
+
payload.value = result.value;
|
|
2022
|
+
if (result.issues.length) {
|
|
2023
|
+
payload.value = def.catchValue({
|
|
2024
|
+
...payload,
|
|
2025
|
+
error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
|
|
2026
|
+
input: payload.value
|
|
2027
|
+
});
|
|
2028
|
+
payload.issues = [];
|
|
2029
|
+
payload.fallback = true;
|
|
2030
|
+
}
|
|
2031
|
+
return payload;
|
|
2032
|
+
});
|
|
2033
|
+
payload.value = result.value;
|
|
2034
|
+
if (result.issues.length) {
|
|
2035
|
+
payload.value = def.catchValue({
|
|
2036
|
+
...payload,
|
|
2037
|
+
error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
|
|
2038
|
+
input: payload.value
|
|
2039
|
+
});
|
|
2040
|
+
payload.issues = [];
|
|
2041
|
+
payload.fallback = true;
|
|
2042
|
+
}
|
|
2043
|
+
return payload;
|
|
2044
|
+
};
|
|
2045
|
+
});
|
|
2046
|
+
const $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
|
|
2047
|
+
$ZodType.init(inst, def);
|
|
2048
|
+
defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
2049
|
+
defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
2050
|
+
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
2051
|
+
defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
|
|
2052
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2053
|
+
if (ctx.direction === "backward") {
|
|
2054
|
+
const right = def.out._zod.run(payload, ctx);
|
|
2055
|
+
if (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));
|
|
2056
|
+
return handlePipeResult(right, def.in, ctx);
|
|
2057
|
+
}
|
|
2058
|
+
const left = def.in._zod.run(payload, ctx);
|
|
2059
|
+
if (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));
|
|
2060
|
+
return handlePipeResult(left, def.out, ctx);
|
|
2061
|
+
};
|
|
2062
|
+
});
|
|
2063
|
+
function handlePipeResult(left, next, ctx) {
|
|
2064
|
+
if (left.issues.length) {
|
|
2065
|
+
left.aborted = true;
|
|
2066
|
+
return left;
|
|
2067
|
+
}
|
|
2068
|
+
return next._zod.run({
|
|
2069
|
+
value: left.value,
|
|
2070
|
+
issues: left.issues,
|
|
2071
|
+
fallback: left.fallback
|
|
2072
|
+
}, ctx);
|
|
2073
|
+
}
|
|
2074
|
+
const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
|
|
2075
|
+
$ZodType.init(inst, def);
|
|
2076
|
+
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
2077
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2078
|
+
defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
|
|
2079
|
+
defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
|
|
2080
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2081
|
+
if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
|
|
2082
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2083
|
+
if (result instanceof Promise) return result.then(handleReadonlyResult);
|
|
2084
|
+
return handleReadonlyResult(result);
|
|
2085
|
+
};
|
|
2086
|
+
});
|
|
2087
|
+
function handleReadonlyResult(payload) {
|
|
2088
|
+
payload.value = Object.freeze(payload.value);
|
|
2089
|
+
return payload;
|
|
2090
|
+
}
|
|
2091
|
+
const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
|
|
2092
|
+
$ZodCheck.init(inst, def);
|
|
2093
|
+
$ZodType.init(inst, def);
|
|
2094
|
+
inst._zod.parse = (payload, _) => {
|
|
2095
|
+
return payload;
|
|
2096
|
+
};
|
|
2097
|
+
inst._zod.check = (payload) => {
|
|
2098
|
+
const input = payload.value;
|
|
2099
|
+
const r = def.fn(input);
|
|
2100
|
+
if (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));
|
|
2101
|
+
handleRefineResult(r, payload, input, inst);
|
|
2102
|
+
};
|
|
2103
|
+
});
|
|
2104
|
+
function handleRefineResult(result, payload, input, inst) {
|
|
2105
|
+
if (!result) {
|
|
2106
|
+
const _iss = {
|
|
2107
|
+
code: "custom",
|
|
2108
|
+
input,
|
|
2109
|
+
inst,
|
|
2110
|
+
path: [...inst._zod.def.path ?? []],
|
|
2111
|
+
continue: !inst._zod.def.abort
|
|
2112
|
+
};
|
|
2113
|
+
if (inst._zod.def.params) _iss.params = inst._zod.def.params;
|
|
2114
|
+
payload.issues.push(issue(_iss));
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
//#endregion
|
|
2118
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
2119
|
+
var _a;
|
|
2120
|
+
var $ZodRegistry = class {
|
|
2121
|
+
constructor() {
|
|
2122
|
+
this._map = /* @__PURE__ */ new WeakMap();
|
|
2123
|
+
this._idmap = /* @__PURE__ */ new Map();
|
|
2124
|
+
}
|
|
2125
|
+
add(schema, ..._meta) {
|
|
2126
|
+
const meta = _meta[0];
|
|
2127
|
+
this._map.set(schema, meta);
|
|
2128
|
+
if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
|
|
2129
|
+
return this;
|
|
2130
|
+
}
|
|
2131
|
+
clear() {
|
|
2132
|
+
this._map = /* @__PURE__ */ new WeakMap();
|
|
2133
|
+
this._idmap = /* @__PURE__ */ new Map();
|
|
2134
|
+
return this;
|
|
2135
|
+
}
|
|
2136
|
+
remove(schema) {
|
|
2137
|
+
const meta = this._map.get(schema);
|
|
2138
|
+
if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
|
|
2139
|
+
this._map.delete(schema);
|
|
2140
|
+
return this;
|
|
2141
|
+
}
|
|
2142
|
+
get(schema) {
|
|
2143
|
+
const p = schema._zod.parent;
|
|
2144
|
+
if (p) {
|
|
2145
|
+
const pm = { ...this.get(p) ?? {} };
|
|
2146
|
+
delete pm.id;
|
|
2147
|
+
const f = {
|
|
2148
|
+
...pm,
|
|
2149
|
+
...this._map.get(schema)
|
|
2150
|
+
};
|
|
2151
|
+
return Object.keys(f).length ? f : void 0;
|
|
2152
|
+
}
|
|
2153
|
+
return this._map.get(schema);
|
|
2154
|
+
}
|
|
2155
|
+
has(schema) {
|
|
2156
|
+
return this._map.has(schema);
|
|
2157
|
+
}
|
|
2158
|
+
};
|
|
2159
|
+
function registry() {
|
|
2160
|
+
return new $ZodRegistry();
|
|
2161
|
+
}
|
|
2162
|
+
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
2163
|
+
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
2164
|
+
//#endregion
|
|
2165
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
2166
|
+
// @__NO_SIDE_EFFECTS__
|
|
2167
|
+
function _string(Class, params) {
|
|
2168
|
+
return new Class({
|
|
2169
|
+
type: "string",
|
|
2170
|
+
...normalizeParams(params)
|
|
2171
|
+
});
|
|
2172
|
+
}
|
|
2173
|
+
// @__NO_SIDE_EFFECTS__
|
|
2174
|
+
function _email(Class, params) {
|
|
2175
|
+
return new Class({
|
|
2176
|
+
type: "string",
|
|
2177
|
+
format: "email",
|
|
2178
|
+
check: "string_format",
|
|
2179
|
+
abort: false,
|
|
2180
|
+
...normalizeParams(params)
|
|
2181
|
+
});
|
|
2182
|
+
}
|
|
2183
|
+
// @__NO_SIDE_EFFECTS__
|
|
2184
|
+
function _guid(Class, params) {
|
|
2185
|
+
return new Class({
|
|
2186
|
+
type: "string",
|
|
2187
|
+
format: "guid",
|
|
2188
|
+
check: "string_format",
|
|
2189
|
+
abort: false,
|
|
2190
|
+
...normalizeParams(params)
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
// @__NO_SIDE_EFFECTS__
|
|
2194
|
+
function _uuid(Class, params) {
|
|
2195
|
+
return new Class({
|
|
2196
|
+
type: "string",
|
|
2197
|
+
format: "uuid",
|
|
2198
|
+
check: "string_format",
|
|
2199
|
+
abort: false,
|
|
2200
|
+
...normalizeParams(params)
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
// @__NO_SIDE_EFFECTS__
|
|
2204
|
+
function _uuidv4(Class, params) {
|
|
2205
|
+
return new Class({
|
|
2206
|
+
type: "string",
|
|
2207
|
+
format: "uuid",
|
|
2208
|
+
check: "string_format",
|
|
2209
|
+
abort: false,
|
|
2210
|
+
version: "v4",
|
|
2211
|
+
...normalizeParams(params)
|
|
2212
|
+
});
|
|
2213
|
+
}
|
|
2214
|
+
// @__NO_SIDE_EFFECTS__
|
|
2215
|
+
function _uuidv6(Class, params) {
|
|
2216
|
+
return new Class({
|
|
2217
|
+
type: "string",
|
|
2218
|
+
format: "uuid",
|
|
2219
|
+
check: "string_format",
|
|
2220
|
+
abort: false,
|
|
2221
|
+
version: "v6",
|
|
2222
|
+
...normalizeParams(params)
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2225
|
+
// @__NO_SIDE_EFFECTS__
|
|
2226
|
+
function _uuidv7(Class, params) {
|
|
2227
|
+
return new Class({
|
|
2228
|
+
type: "string",
|
|
2229
|
+
format: "uuid",
|
|
2230
|
+
check: "string_format",
|
|
2231
|
+
abort: false,
|
|
2232
|
+
version: "v7",
|
|
2233
|
+
...normalizeParams(params)
|
|
2234
|
+
});
|
|
2235
|
+
}
|
|
2236
|
+
// @__NO_SIDE_EFFECTS__
|
|
2237
|
+
function _url(Class, params) {
|
|
2238
|
+
return new Class({
|
|
2239
|
+
type: "string",
|
|
2240
|
+
format: "url",
|
|
2241
|
+
check: "string_format",
|
|
2242
|
+
abort: false,
|
|
2243
|
+
...normalizeParams(params)
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
// @__NO_SIDE_EFFECTS__
|
|
2247
|
+
function _emoji(Class, params) {
|
|
2248
|
+
return new Class({
|
|
2249
|
+
type: "string",
|
|
2250
|
+
format: "emoji",
|
|
2251
|
+
check: "string_format",
|
|
2252
|
+
abort: false,
|
|
2253
|
+
...normalizeParams(params)
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
// @__NO_SIDE_EFFECTS__
|
|
2257
|
+
function _nanoid(Class, params) {
|
|
2258
|
+
return new Class({
|
|
2259
|
+
type: "string",
|
|
2260
|
+
format: "nanoid",
|
|
2261
|
+
check: "string_format",
|
|
2262
|
+
abort: false,
|
|
2263
|
+
...normalizeParams(params)
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2268
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
2269
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2270
|
+
*/
|
|
2271
|
+
// @__NO_SIDE_EFFECTS__
|
|
2272
|
+
function _cuid(Class, params) {
|
|
2273
|
+
return new Class({
|
|
2274
|
+
type: "string",
|
|
2275
|
+
format: "cuid",
|
|
2276
|
+
check: "string_format",
|
|
2277
|
+
abort: false,
|
|
2278
|
+
...normalizeParams(params)
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
// @__NO_SIDE_EFFECTS__
|
|
2282
|
+
function _cuid2(Class, params) {
|
|
2283
|
+
return new Class({
|
|
2284
|
+
type: "string",
|
|
2285
|
+
format: "cuid2",
|
|
2286
|
+
check: "string_format",
|
|
2287
|
+
abort: false,
|
|
2288
|
+
...normalizeParams(params)
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
// @__NO_SIDE_EFFECTS__
|
|
2292
|
+
function _ulid(Class, params) {
|
|
2293
|
+
return new Class({
|
|
2294
|
+
type: "string",
|
|
2295
|
+
format: "ulid",
|
|
2296
|
+
check: "string_format",
|
|
2297
|
+
abort: false,
|
|
2298
|
+
...normalizeParams(params)
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
// @__NO_SIDE_EFFECTS__
|
|
2302
|
+
function _xid(Class, params) {
|
|
2303
|
+
return new Class({
|
|
2304
|
+
type: "string",
|
|
2305
|
+
format: "xid",
|
|
2306
|
+
check: "string_format",
|
|
2307
|
+
abort: false,
|
|
2308
|
+
...normalizeParams(params)
|
|
2309
|
+
});
|
|
2310
|
+
}
|
|
2311
|
+
// @__NO_SIDE_EFFECTS__
|
|
2312
|
+
function _ksuid(Class, params) {
|
|
2313
|
+
return new Class({
|
|
2314
|
+
type: "string",
|
|
2315
|
+
format: "ksuid",
|
|
2316
|
+
check: "string_format",
|
|
2317
|
+
abort: false,
|
|
2318
|
+
...normalizeParams(params)
|
|
2319
|
+
});
|
|
2320
|
+
}
|
|
2321
|
+
// @__NO_SIDE_EFFECTS__
|
|
2322
|
+
function _ipv4(Class, params) {
|
|
2323
|
+
return new Class({
|
|
2324
|
+
type: "string",
|
|
2325
|
+
format: "ipv4",
|
|
2326
|
+
check: "string_format",
|
|
2327
|
+
abort: false,
|
|
2328
|
+
...normalizeParams(params)
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
// @__NO_SIDE_EFFECTS__
|
|
2332
|
+
function _ipv6(Class, params) {
|
|
2333
|
+
return new Class({
|
|
2334
|
+
type: "string",
|
|
2335
|
+
format: "ipv6",
|
|
2336
|
+
check: "string_format",
|
|
2337
|
+
abort: false,
|
|
2338
|
+
...normalizeParams(params)
|
|
2339
|
+
});
|
|
2340
|
+
}
|
|
2341
|
+
// @__NO_SIDE_EFFECTS__
|
|
2342
|
+
function _cidrv4(Class, params) {
|
|
2343
|
+
return new Class({
|
|
2344
|
+
type: "string",
|
|
2345
|
+
format: "cidrv4",
|
|
2346
|
+
check: "string_format",
|
|
2347
|
+
abort: false,
|
|
2348
|
+
...normalizeParams(params)
|
|
2349
|
+
});
|
|
2350
|
+
}
|
|
2351
|
+
// @__NO_SIDE_EFFECTS__
|
|
2352
|
+
function _cidrv6(Class, params) {
|
|
2353
|
+
return new Class({
|
|
2354
|
+
type: "string",
|
|
2355
|
+
format: "cidrv6",
|
|
2356
|
+
check: "string_format",
|
|
2357
|
+
abort: false,
|
|
2358
|
+
...normalizeParams(params)
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
// @__NO_SIDE_EFFECTS__
|
|
2362
|
+
function _base64(Class, params) {
|
|
2363
|
+
return new Class({
|
|
2364
|
+
type: "string",
|
|
2365
|
+
format: "base64",
|
|
2366
|
+
check: "string_format",
|
|
2367
|
+
abort: false,
|
|
2368
|
+
...normalizeParams(params)
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
// @__NO_SIDE_EFFECTS__
|
|
2372
|
+
function _base64url(Class, params) {
|
|
2373
|
+
return new Class({
|
|
2374
|
+
type: "string",
|
|
2375
|
+
format: "base64url",
|
|
2376
|
+
check: "string_format",
|
|
2377
|
+
abort: false,
|
|
2378
|
+
...normalizeParams(params)
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
// @__NO_SIDE_EFFECTS__
|
|
2382
|
+
function _e164(Class, params) {
|
|
2383
|
+
return new Class({
|
|
2384
|
+
type: "string",
|
|
2385
|
+
format: "e164",
|
|
2386
|
+
check: "string_format",
|
|
2387
|
+
abort: false,
|
|
2388
|
+
...normalizeParams(params)
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
// @__NO_SIDE_EFFECTS__
|
|
2392
|
+
function _jwt(Class, params) {
|
|
2393
|
+
return new Class({
|
|
2394
|
+
type: "string",
|
|
2395
|
+
format: "jwt",
|
|
2396
|
+
check: "string_format",
|
|
2397
|
+
abort: false,
|
|
2398
|
+
...normalizeParams(params)
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
// @__NO_SIDE_EFFECTS__
|
|
2402
|
+
function _isoDateTime(Class, params) {
|
|
2403
|
+
return new Class({
|
|
2404
|
+
type: "string",
|
|
2405
|
+
format: "datetime",
|
|
2406
|
+
check: "string_format",
|
|
2407
|
+
offset: false,
|
|
2408
|
+
local: false,
|
|
2409
|
+
precision: null,
|
|
2410
|
+
...normalizeParams(params)
|
|
2411
|
+
});
|
|
2412
|
+
}
|
|
2413
|
+
// @__NO_SIDE_EFFECTS__
|
|
2414
|
+
function _isoDate(Class, params) {
|
|
2415
|
+
return new Class({
|
|
2416
|
+
type: "string",
|
|
2417
|
+
format: "date",
|
|
2418
|
+
check: "string_format",
|
|
2419
|
+
...normalizeParams(params)
|
|
2420
|
+
});
|
|
2421
|
+
}
|
|
2422
|
+
// @__NO_SIDE_EFFECTS__
|
|
2423
|
+
function _isoTime(Class, params) {
|
|
2424
|
+
return new Class({
|
|
2425
|
+
type: "string",
|
|
2426
|
+
format: "time",
|
|
2427
|
+
check: "string_format",
|
|
2428
|
+
precision: null,
|
|
2429
|
+
...normalizeParams(params)
|
|
2430
|
+
});
|
|
2431
|
+
}
|
|
2432
|
+
// @__NO_SIDE_EFFECTS__
|
|
2433
|
+
function _isoDuration(Class, params) {
|
|
2434
|
+
return new Class({
|
|
2435
|
+
type: "string",
|
|
2436
|
+
format: "duration",
|
|
2437
|
+
check: "string_format",
|
|
2438
|
+
...normalizeParams(params)
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
// @__NO_SIDE_EFFECTS__
|
|
2442
|
+
function _number(Class, params) {
|
|
2443
|
+
return new Class({
|
|
2444
|
+
type: "number",
|
|
2445
|
+
checks: [],
|
|
2446
|
+
...normalizeParams(params)
|
|
2447
|
+
});
|
|
2448
|
+
}
|
|
2449
|
+
// @__NO_SIDE_EFFECTS__
|
|
2450
|
+
function _int(Class, params) {
|
|
2451
|
+
return new Class({
|
|
2452
|
+
type: "number",
|
|
2453
|
+
check: "number_format",
|
|
2454
|
+
abort: false,
|
|
2455
|
+
format: "safeint",
|
|
2456
|
+
...normalizeParams(params)
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
// @__NO_SIDE_EFFECTS__
|
|
2460
|
+
function _unknown(Class) {
|
|
2461
|
+
return new Class({ type: "unknown" });
|
|
2462
|
+
}
|
|
2463
|
+
// @__NO_SIDE_EFFECTS__
|
|
2464
|
+
function _never(Class, params) {
|
|
2465
|
+
return new Class({
|
|
2466
|
+
type: "never",
|
|
2467
|
+
...normalizeParams(params)
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
// @__NO_SIDE_EFFECTS__
|
|
2471
|
+
function _lt(value, params) {
|
|
2472
|
+
return new $ZodCheckLessThan({
|
|
2473
|
+
check: "less_than",
|
|
2474
|
+
...normalizeParams(params),
|
|
2475
|
+
value,
|
|
2476
|
+
inclusive: false
|
|
2477
|
+
});
|
|
2478
|
+
}
|
|
2479
|
+
// @__NO_SIDE_EFFECTS__
|
|
2480
|
+
function _lte(value, params) {
|
|
2481
|
+
return new $ZodCheckLessThan({
|
|
2482
|
+
check: "less_than",
|
|
2483
|
+
...normalizeParams(params),
|
|
2484
|
+
value,
|
|
2485
|
+
inclusive: true
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
// @__NO_SIDE_EFFECTS__
|
|
2489
|
+
function _gt(value, params) {
|
|
2490
|
+
return new $ZodCheckGreaterThan({
|
|
2491
|
+
check: "greater_than",
|
|
2492
|
+
...normalizeParams(params),
|
|
2493
|
+
value,
|
|
2494
|
+
inclusive: false
|
|
2495
|
+
});
|
|
2496
|
+
}
|
|
2497
|
+
// @__NO_SIDE_EFFECTS__
|
|
2498
|
+
function _gte(value, params) {
|
|
2499
|
+
return new $ZodCheckGreaterThan({
|
|
2500
|
+
check: "greater_than",
|
|
2501
|
+
...normalizeParams(params),
|
|
2502
|
+
value,
|
|
2503
|
+
inclusive: true
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
// @__NO_SIDE_EFFECTS__
|
|
2507
|
+
function _multipleOf(value, params) {
|
|
2508
|
+
return new $ZodCheckMultipleOf({
|
|
2509
|
+
check: "multiple_of",
|
|
2510
|
+
...normalizeParams(params),
|
|
2511
|
+
value
|
|
2512
|
+
});
|
|
2513
|
+
}
|
|
2514
|
+
// @__NO_SIDE_EFFECTS__
|
|
2515
|
+
function _maxLength(maximum, params) {
|
|
2516
|
+
return new $ZodCheckMaxLength({
|
|
2517
|
+
check: "max_length",
|
|
2518
|
+
...normalizeParams(params),
|
|
2519
|
+
maximum
|
|
2520
|
+
});
|
|
2521
|
+
}
|
|
2522
|
+
// @__NO_SIDE_EFFECTS__
|
|
2523
|
+
function _minLength(minimum, params) {
|
|
2524
|
+
return new $ZodCheckMinLength({
|
|
2525
|
+
check: "min_length",
|
|
2526
|
+
...normalizeParams(params),
|
|
2527
|
+
minimum
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
// @__NO_SIDE_EFFECTS__
|
|
2531
|
+
function _length(length, params) {
|
|
2532
|
+
return new $ZodCheckLengthEquals({
|
|
2533
|
+
check: "length_equals",
|
|
2534
|
+
...normalizeParams(params),
|
|
2535
|
+
length
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2538
|
+
// @__NO_SIDE_EFFECTS__
|
|
2539
|
+
function _regex(pattern, params) {
|
|
2540
|
+
return new $ZodCheckRegex({
|
|
2541
|
+
check: "string_format",
|
|
2542
|
+
format: "regex",
|
|
2543
|
+
...normalizeParams(params),
|
|
2544
|
+
pattern
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
// @__NO_SIDE_EFFECTS__
|
|
2548
|
+
function _lowercase(params) {
|
|
2549
|
+
return new $ZodCheckLowerCase({
|
|
2550
|
+
check: "string_format",
|
|
2551
|
+
format: "lowercase",
|
|
2552
|
+
...normalizeParams(params)
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
// @__NO_SIDE_EFFECTS__
|
|
2556
|
+
function _uppercase(params) {
|
|
2557
|
+
return new $ZodCheckUpperCase({
|
|
2558
|
+
check: "string_format",
|
|
2559
|
+
format: "uppercase",
|
|
2560
|
+
...normalizeParams(params)
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
// @__NO_SIDE_EFFECTS__
|
|
2564
|
+
function _includes(includes, params) {
|
|
2565
|
+
return new $ZodCheckIncludes({
|
|
2566
|
+
check: "string_format",
|
|
2567
|
+
format: "includes",
|
|
2568
|
+
...normalizeParams(params),
|
|
2569
|
+
includes
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
// @__NO_SIDE_EFFECTS__
|
|
2573
|
+
function _startsWith(prefix, params) {
|
|
2574
|
+
return new $ZodCheckStartsWith({
|
|
2575
|
+
check: "string_format",
|
|
2576
|
+
format: "starts_with",
|
|
2577
|
+
...normalizeParams(params),
|
|
2578
|
+
prefix
|
|
2579
|
+
});
|
|
2580
|
+
}
|
|
2581
|
+
// @__NO_SIDE_EFFECTS__
|
|
2582
|
+
function _endsWith(suffix, params) {
|
|
2583
|
+
return new $ZodCheckEndsWith({
|
|
2584
|
+
check: "string_format",
|
|
2585
|
+
format: "ends_with",
|
|
2586
|
+
...normalizeParams(params),
|
|
2587
|
+
suffix
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
// @__NO_SIDE_EFFECTS__
|
|
2591
|
+
function _overwrite(tx) {
|
|
2592
|
+
return new $ZodCheckOverwrite({
|
|
2593
|
+
check: "overwrite",
|
|
2594
|
+
tx
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
// @__NO_SIDE_EFFECTS__
|
|
2598
|
+
function _normalize(form) {
|
|
2599
|
+
return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
|
|
2600
|
+
}
|
|
2601
|
+
// @__NO_SIDE_EFFECTS__
|
|
2602
|
+
function _trim() {
|
|
2603
|
+
return /* @__PURE__ */ _overwrite((input) => input.trim());
|
|
2604
|
+
}
|
|
2605
|
+
// @__NO_SIDE_EFFECTS__
|
|
2606
|
+
function _toLowerCase() {
|
|
2607
|
+
return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
|
|
2608
|
+
}
|
|
2609
|
+
// @__NO_SIDE_EFFECTS__
|
|
2610
|
+
function _toUpperCase() {
|
|
2611
|
+
return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
|
|
2612
|
+
}
|
|
2613
|
+
// @__NO_SIDE_EFFECTS__
|
|
2614
|
+
function _slugify() {
|
|
2615
|
+
return /* @__PURE__ */ _overwrite((input) => slugify(input));
|
|
2616
|
+
}
|
|
2617
|
+
// @__NO_SIDE_EFFECTS__
|
|
2618
|
+
function _array(Class, element, params) {
|
|
2619
|
+
return new Class({
|
|
2620
|
+
type: "array",
|
|
2621
|
+
element,
|
|
2622
|
+
...normalizeParams(params)
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
// @__NO_SIDE_EFFECTS__
|
|
2626
|
+
function _refine(Class, fn, _params) {
|
|
2627
|
+
return new Class({
|
|
2628
|
+
type: "custom",
|
|
2629
|
+
check: "custom",
|
|
2630
|
+
fn,
|
|
2631
|
+
...normalizeParams(_params)
|
|
2632
|
+
});
|
|
2633
|
+
}
|
|
2634
|
+
// @__NO_SIDE_EFFECTS__
|
|
2635
|
+
function _superRefine(fn, params) {
|
|
2636
|
+
const ch = /* @__PURE__ */ _check((payload) => {
|
|
2637
|
+
payload.addIssue = (issue$2) => {
|
|
2638
|
+
if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
|
|
2639
|
+
else {
|
|
2640
|
+
const _issue = issue$2;
|
|
2641
|
+
if (_issue.fatal) _issue.continue = false;
|
|
2642
|
+
_issue.code ?? (_issue.code = "custom");
|
|
2643
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
2644
|
+
_issue.inst ?? (_issue.inst = ch);
|
|
2645
|
+
_issue.continue ?? (_issue.continue = !ch._zod.def.abort);
|
|
2646
|
+
payload.issues.push(issue(_issue));
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2649
|
+
return fn(payload.value, payload);
|
|
2650
|
+
}, params);
|
|
2651
|
+
return ch;
|
|
2652
|
+
}
|
|
2653
|
+
// @__NO_SIDE_EFFECTS__
|
|
2654
|
+
function _check(fn, params) {
|
|
2655
|
+
const ch = new $ZodCheck({
|
|
2656
|
+
check: "custom",
|
|
2657
|
+
...normalizeParams(params)
|
|
2658
|
+
});
|
|
2659
|
+
ch._zod.check = fn;
|
|
2660
|
+
return ch;
|
|
2661
|
+
}
|
|
2662
|
+
//#endregion
|
|
2663
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
2664
|
+
function initializeContext(params) {
|
|
2665
|
+
let target = params?.target ?? "draft-2020-12";
|
|
2666
|
+
if (target === "draft-4") target = "draft-04";
|
|
2667
|
+
if (target === "draft-7") target = "draft-07";
|
|
2668
|
+
return {
|
|
2669
|
+
processors: params.processors ?? {},
|
|
2670
|
+
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
2671
|
+
target,
|
|
2672
|
+
unrepresentable: params?.unrepresentable ?? "throw",
|
|
2673
|
+
override: params?.override ?? (() => {}),
|
|
2674
|
+
io: params?.io ?? "output",
|
|
2675
|
+
counter: 0,
|
|
2676
|
+
seen: /* @__PURE__ */ new Map(),
|
|
2677
|
+
cycles: params?.cycles ?? "ref",
|
|
2678
|
+
reused: params?.reused ?? "inline",
|
|
2679
|
+
external: params?.external ?? void 0
|
|
2680
|
+
};
|
|
2681
|
+
}
|
|
2682
|
+
function process(schema, ctx, _params = {
|
|
2683
|
+
path: [],
|
|
2684
|
+
schemaPath: []
|
|
2685
|
+
}) {
|
|
2686
|
+
var _a;
|
|
2687
|
+
const def = schema._zod.def;
|
|
2688
|
+
const seen = ctx.seen.get(schema);
|
|
2689
|
+
if (seen) {
|
|
2690
|
+
seen.count++;
|
|
2691
|
+
if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
|
|
2692
|
+
return seen.schema;
|
|
2693
|
+
}
|
|
2694
|
+
const result = {
|
|
2695
|
+
schema: {},
|
|
2696
|
+
count: 1,
|
|
2697
|
+
cycle: void 0,
|
|
2698
|
+
path: _params.path
|
|
2699
|
+
};
|
|
2700
|
+
ctx.seen.set(schema, result);
|
|
2701
|
+
const overrideSchema = schema._zod.toJSONSchema?.();
|
|
2702
|
+
if (overrideSchema) result.schema = overrideSchema;
|
|
2703
|
+
else {
|
|
2704
|
+
const params = {
|
|
2705
|
+
..._params,
|
|
2706
|
+
schemaPath: [..._params.schemaPath, schema],
|
|
2707
|
+
path: _params.path
|
|
2708
|
+
};
|
|
2709
|
+
if (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);
|
|
2710
|
+
else {
|
|
2711
|
+
const _json = result.schema;
|
|
2712
|
+
const processor = ctx.processors[def.type];
|
|
2713
|
+
if (!processor) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
|
|
2714
|
+
processor(schema, ctx, _json, params);
|
|
2715
|
+
}
|
|
2716
|
+
const parent = schema._zod.parent;
|
|
2717
|
+
if (parent) {
|
|
2718
|
+
if (!result.ref) result.ref = parent;
|
|
2719
|
+
process(parent, ctx, params);
|
|
2720
|
+
ctx.seen.get(parent).isParent = true;
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
const meta = ctx.metadataRegistry.get(schema);
|
|
2724
|
+
if (meta) Object.assign(result.schema, meta);
|
|
2725
|
+
if (ctx.io === "input" && isTransforming(schema)) {
|
|
2726
|
+
delete result.schema.examples;
|
|
2727
|
+
delete result.schema.default;
|
|
2728
|
+
}
|
|
2729
|
+
if (ctx.io === "input" && "_prefault" in result.schema) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
|
|
2730
|
+
delete result.schema._prefault;
|
|
2731
|
+
return ctx.seen.get(schema).schema;
|
|
2732
|
+
}
|
|
2733
|
+
function extractDefs(ctx, schema) {
|
|
2734
|
+
const root = ctx.seen.get(schema);
|
|
2735
|
+
if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
2736
|
+
const idToSchema = /* @__PURE__ */ new Map();
|
|
2737
|
+
for (const entry of ctx.seen.entries()) {
|
|
2738
|
+
const id = ctx.metadataRegistry.get(entry[0])?.id;
|
|
2739
|
+
if (id) {
|
|
2740
|
+
const existing = idToSchema.get(id);
|
|
2741
|
+
if (existing && existing !== entry[0]) throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
2742
|
+
idToSchema.set(id, entry[0]);
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
const makeURI = (entry) => {
|
|
2746
|
+
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
2747
|
+
if (ctx.external) {
|
|
2748
|
+
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
2749
|
+
const uriGenerator = ctx.external.uri ?? ((id) => id);
|
|
2750
|
+
if (externalId) return { ref: uriGenerator(externalId) };
|
|
2751
|
+
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
2752
|
+
entry[1].defId = id;
|
|
2753
|
+
return {
|
|
2754
|
+
defId: id,
|
|
2755
|
+
ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
|
|
2756
|
+
};
|
|
2757
|
+
}
|
|
2758
|
+
if (entry[1] === root) return { ref: "#" };
|
|
2759
|
+
const defUriPrefix = `#/${defsSegment}/`;
|
|
2760
|
+
const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
|
|
2761
|
+
return {
|
|
2762
|
+
defId,
|
|
2763
|
+
ref: defUriPrefix + defId
|
|
2764
|
+
};
|
|
2765
|
+
};
|
|
2766
|
+
const extractToDef = (entry) => {
|
|
2767
|
+
if (entry[1].schema.$ref) return;
|
|
2768
|
+
const seen = entry[1];
|
|
2769
|
+
const { ref, defId } = makeURI(entry);
|
|
2770
|
+
seen.def = { ...seen.schema };
|
|
2771
|
+
if (defId) seen.defId = defId;
|
|
2772
|
+
const schema = seen.schema;
|
|
2773
|
+
for (const key in schema) delete schema[key];
|
|
2774
|
+
schema.$ref = ref;
|
|
2775
|
+
};
|
|
2776
|
+
if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
|
|
2777
|
+
const seen = entry[1];
|
|
2778
|
+
if (seen.cycle) throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
|
|
2779
|
+
|
|
2780
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
2781
|
+
}
|
|
2782
|
+
for (const entry of ctx.seen.entries()) {
|
|
2783
|
+
const seen = entry[1];
|
|
2784
|
+
if (schema === entry[0]) {
|
|
2785
|
+
extractToDef(entry);
|
|
2786
|
+
continue;
|
|
2787
|
+
}
|
|
2788
|
+
if (ctx.external) {
|
|
2789
|
+
const ext = ctx.external.registry.get(entry[0])?.id;
|
|
2790
|
+
if (schema !== entry[0] && ext) {
|
|
2791
|
+
extractToDef(entry);
|
|
2792
|
+
continue;
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
if (ctx.metadataRegistry.get(entry[0])?.id) {
|
|
2796
|
+
extractToDef(entry);
|
|
2797
|
+
continue;
|
|
2798
|
+
}
|
|
2799
|
+
if (seen.cycle) {
|
|
2800
|
+
extractToDef(entry);
|
|
2801
|
+
continue;
|
|
2802
|
+
}
|
|
2803
|
+
if (seen.count > 1) {
|
|
2804
|
+
if (ctx.reused === "ref") {
|
|
2805
|
+
extractToDef(entry);
|
|
2806
|
+
continue;
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
function finalize(ctx, schema) {
|
|
2812
|
+
const root = ctx.seen.get(schema);
|
|
2813
|
+
if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
2814
|
+
const flattenRef = (zodSchema) => {
|
|
2815
|
+
const seen = ctx.seen.get(zodSchema);
|
|
2816
|
+
if (seen.ref === null) return;
|
|
2817
|
+
const schema = seen.def ?? seen.schema;
|
|
2818
|
+
const _cached = { ...schema };
|
|
2819
|
+
const ref = seen.ref;
|
|
2820
|
+
seen.ref = null;
|
|
2821
|
+
if (ref) {
|
|
2822
|
+
flattenRef(ref);
|
|
2823
|
+
const refSeen = ctx.seen.get(ref);
|
|
2824
|
+
const refSchema = refSeen.schema;
|
|
2825
|
+
if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
|
|
2826
|
+
schema.allOf = schema.allOf ?? [];
|
|
2827
|
+
schema.allOf.push(refSchema);
|
|
2828
|
+
} else Object.assign(schema, refSchema);
|
|
2829
|
+
Object.assign(schema, _cached);
|
|
2830
|
+
if (zodSchema._zod.parent === ref) for (const key in schema) {
|
|
2831
|
+
if (key === "$ref" || key === "allOf") continue;
|
|
2832
|
+
if (!(key in _cached)) delete schema[key];
|
|
2833
|
+
}
|
|
2834
|
+
if (refSchema.$ref && refSeen.def) for (const key in schema) {
|
|
2835
|
+
if (key === "$ref" || key === "allOf") continue;
|
|
2836
|
+
if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
const parent = zodSchema._zod.parent;
|
|
2840
|
+
if (parent && parent !== ref) {
|
|
2841
|
+
flattenRef(parent);
|
|
2842
|
+
const parentSeen = ctx.seen.get(parent);
|
|
2843
|
+
if (parentSeen?.schema.$ref) {
|
|
2844
|
+
schema.$ref = parentSeen.schema.$ref;
|
|
2845
|
+
if (parentSeen.def) for (const key in schema) {
|
|
2846
|
+
if (key === "$ref" || key === "allOf") continue;
|
|
2847
|
+
if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
ctx.override({
|
|
2852
|
+
zodSchema,
|
|
2853
|
+
jsonSchema: schema,
|
|
2854
|
+
path: seen.path ?? []
|
|
2855
|
+
});
|
|
2856
|
+
};
|
|
2857
|
+
for (const entry of [...ctx.seen.entries()].reverse()) flattenRef(entry[0]);
|
|
2858
|
+
const result = {};
|
|
2859
|
+
if (ctx.target === "draft-2020-12") result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
2860
|
+
else if (ctx.target === "draft-07") result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
2861
|
+
else if (ctx.target === "draft-04") result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
2862
|
+
else if (ctx.target === "openapi-3.0") {}
|
|
2863
|
+
if (ctx.external?.uri) {
|
|
2864
|
+
const id = ctx.external.registry.get(schema)?.id;
|
|
2865
|
+
if (!id) throw new Error("Schema is missing an `id` property");
|
|
2866
|
+
result.$id = ctx.external.uri(id);
|
|
2867
|
+
}
|
|
2868
|
+
Object.assign(result, root.def ?? root.schema);
|
|
2869
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
2870
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId) delete result.id;
|
|
2871
|
+
const defs = ctx.external?.defs ?? {};
|
|
2872
|
+
for (const entry of ctx.seen.entries()) {
|
|
2873
|
+
const seen = entry[1];
|
|
2874
|
+
if (seen.def && seen.defId) {
|
|
2875
|
+
if (seen.def.id === seen.defId) delete seen.def.id;
|
|
2876
|
+
defs[seen.defId] = seen.def;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
if (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === "draft-2020-12") result.$defs = defs;
|
|
2880
|
+
else result.definitions = defs;
|
|
2881
|
+
try {
|
|
2882
|
+
const finalized = JSON.parse(JSON.stringify(result));
|
|
2883
|
+
Object.defineProperty(finalized, "~standard", {
|
|
2884
|
+
value: {
|
|
2885
|
+
...schema["~standard"],
|
|
2886
|
+
jsonSchema: {
|
|
2887
|
+
input: createStandardJSONSchemaMethod(schema, "input", ctx.processors),
|
|
2888
|
+
output: createStandardJSONSchemaMethod(schema, "output", ctx.processors)
|
|
2889
|
+
}
|
|
2890
|
+
},
|
|
2891
|
+
enumerable: false,
|
|
2892
|
+
writable: false
|
|
2893
|
+
});
|
|
2894
|
+
return finalized;
|
|
2895
|
+
} catch (_err) {
|
|
2896
|
+
throw new Error("Error converting schema to JSON.");
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
function isTransforming(_schema, _ctx) {
|
|
2900
|
+
const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
|
|
2901
|
+
if (ctx.seen.has(_schema)) return false;
|
|
2902
|
+
ctx.seen.add(_schema);
|
|
2903
|
+
const def = _schema._zod.def;
|
|
2904
|
+
if (def.type === "transform") return true;
|
|
2905
|
+
if (def.type === "array") return isTransforming(def.element, ctx);
|
|
2906
|
+
if (def.type === "set") return isTransforming(def.valueType, ctx);
|
|
2907
|
+
if (def.type === "lazy") return isTransforming(def.getter(), ctx);
|
|
2908
|
+
if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") return isTransforming(def.innerType, ctx);
|
|
2909
|
+
if (def.type === "intersection") return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
2910
|
+
if (def.type === "record" || def.type === "map") return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
2911
|
+
if (def.type === "pipe") {
|
|
2912
|
+
if (_schema._zod.traits.has("$ZodCodec")) return true;
|
|
2913
|
+
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
2914
|
+
}
|
|
2915
|
+
if (def.type === "object") {
|
|
2916
|
+
for (const key in def.shape) if (isTransforming(def.shape[key], ctx)) return true;
|
|
2917
|
+
return false;
|
|
2918
|
+
}
|
|
2919
|
+
if (def.type === "union") {
|
|
2920
|
+
for (const option of def.options) if (isTransforming(option, ctx)) return true;
|
|
2921
|
+
return false;
|
|
2922
|
+
}
|
|
2923
|
+
if (def.type === "tuple") {
|
|
2924
|
+
for (const item of def.items) if (isTransforming(item, ctx)) return true;
|
|
2925
|
+
if (def.rest && isTransforming(def.rest, ctx)) return true;
|
|
2926
|
+
return false;
|
|
2927
|
+
}
|
|
2928
|
+
return false;
|
|
2929
|
+
}
|
|
2930
|
+
/**
|
|
2931
|
+
* Creates a toJSONSchema method for a schema instance.
|
|
2932
|
+
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
|
|
2933
|
+
*/
|
|
2934
|
+
const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
2935
|
+
const ctx = initializeContext({
|
|
2936
|
+
...params,
|
|
2937
|
+
processors
|
|
2938
|
+
});
|
|
2939
|
+
process(schema, ctx);
|
|
2940
|
+
extractDefs(ctx, schema);
|
|
2941
|
+
return finalize(ctx, schema);
|
|
2942
|
+
};
|
|
2943
|
+
const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
2944
|
+
const { libraryOptions, target } = params ?? {};
|
|
2945
|
+
const ctx = initializeContext({
|
|
2946
|
+
...libraryOptions ?? {},
|
|
2947
|
+
target,
|
|
2948
|
+
io,
|
|
2949
|
+
processors
|
|
2950
|
+
});
|
|
2951
|
+
process(schema, ctx);
|
|
2952
|
+
extractDefs(ctx, schema);
|
|
2953
|
+
return finalize(ctx, schema);
|
|
2954
|
+
};
|
|
2955
|
+
//#endregion
|
|
2956
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
|
|
2957
|
+
const formatMap = {
|
|
2958
|
+
guid: "uuid",
|
|
2959
|
+
url: "uri",
|
|
2960
|
+
datetime: "date-time",
|
|
2961
|
+
json_string: "json-string",
|
|
2962
|
+
regex: ""
|
|
2963
|
+
};
|
|
2964
|
+
const stringProcessor = (schema, ctx, _json, _params) => {
|
|
2965
|
+
const json = _json;
|
|
2966
|
+
json.type = "string";
|
|
2967
|
+
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
2968
|
+
if (typeof minimum === "number") json.minLength = minimum;
|
|
2969
|
+
if (typeof maximum === "number") json.maxLength = maximum;
|
|
2970
|
+
if (format) {
|
|
2971
|
+
json.format = formatMap[format] ?? format;
|
|
2972
|
+
if (json.format === "") delete json.format;
|
|
2973
|
+
if (format === "time") delete json.format;
|
|
2974
|
+
}
|
|
2975
|
+
if (contentEncoding) json.contentEncoding = contentEncoding;
|
|
2976
|
+
if (patterns && patterns.size > 0) {
|
|
2977
|
+
const regexes = [...patterns];
|
|
2978
|
+
if (regexes.length === 1) json.pattern = regexes[0].source;
|
|
2979
|
+
else if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({
|
|
2980
|
+
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2981
|
+
pattern: regex.source
|
|
2982
|
+
}))];
|
|
2983
|
+
}
|
|
2984
|
+
};
|
|
2985
|
+
const numberProcessor = (schema, ctx, _json, _params) => {
|
|
2986
|
+
const json = _json;
|
|
2987
|
+
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
2988
|
+
if (typeof format === "string" && format.includes("int")) json.type = "integer";
|
|
2989
|
+
else json.type = "number";
|
|
2990
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
2991
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
2992
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
2993
|
+
if (exMin) if (legacy) {
|
|
2994
|
+
json.minimum = exclusiveMinimum;
|
|
2995
|
+
json.exclusiveMinimum = true;
|
|
2996
|
+
} else json.exclusiveMinimum = exclusiveMinimum;
|
|
2997
|
+
else if (typeof minimum === "number") json.minimum = minimum;
|
|
2998
|
+
if (exMax) if (legacy) {
|
|
2999
|
+
json.maximum = exclusiveMaximum;
|
|
3000
|
+
json.exclusiveMaximum = true;
|
|
3001
|
+
} else json.exclusiveMaximum = exclusiveMaximum;
|
|
3002
|
+
else if (typeof maximum === "number") json.maximum = maximum;
|
|
3003
|
+
if (typeof multipleOf === "number") json.multipleOf = multipleOf;
|
|
3004
|
+
};
|
|
3005
|
+
const neverProcessor = (_schema, _ctx, json, _params) => {
|
|
3006
|
+
json.not = {};
|
|
3007
|
+
};
|
|
3008
|
+
const enumProcessor = (schema, _ctx, json, _params) => {
|
|
3009
|
+
const def = schema._zod.def;
|
|
3010
|
+
const values = getEnumValues(def.entries);
|
|
3011
|
+
if (values.every((v) => typeof v === "number")) json.type = "number";
|
|
3012
|
+
if (values.every((v) => typeof v === "string")) json.type = "string";
|
|
3013
|
+
json.enum = values;
|
|
3014
|
+
};
|
|
3015
|
+
const literalProcessor = (schema, ctx, json, _params) => {
|
|
3016
|
+
const def = schema._zod.def;
|
|
3017
|
+
const vals = [];
|
|
3018
|
+
for (const val of def.values) if (val === void 0) {
|
|
3019
|
+
if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
3020
|
+
} else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
3021
|
+
else vals.push(Number(val));
|
|
3022
|
+
else vals.push(val);
|
|
3023
|
+
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
3024
|
+
const val = vals[0];
|
|
3025
|
+
json.type = val === null ? "null" : typeof val;
|
|
3026
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
|
|
3027
|
+
else json.const = val;
|
|
3028
|
+
} else {
|
|
3029
|
+
if (vals.every((v) => typeof v === "number")) json.type = "number";
|
|
3030
|
+
if (vals.every((v) => typeof v === "string")) json.type = "string";
|
|
3031
|
+
if (vals.every((v) => typeof v === "boolean")) json.type = "boolean";
|
|
3032
|
+
if (vals.every((v) => v === null)) json.type = "null";
|
|
3033
|
+
json.enum = vals;
|
|
3034
|
+
}
|
|
3035
|
+
};
|
|
3036
|
+
const customProcessor = (_schema, ctx, _json, _params) => {
|
|
3037
|
+
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
3038
|
+
};
|
|
3039
|
+
const transformProcessor = (_schema, ctx, _json, _params) => {
|
|
3040
|
+
if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
|
|
3041
|
+
};
|
|
3042
|
+
const arrayProcessor = (schema, ctx, _json, params) => {
|
|
3043
|
+
const json = _json;
|
|
3044
|
+
const def = schema._zod.def;
|
|
3045
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
3046
|
+
if (typeof minimum === "number") json.minItems = minimum;
|
|
3047
|
+
if (typeof maximum === "number") json.maxItems = maximum;
|
|
3048
|
+
json.type = "array";
|
|
3049
|
+
json.items = process(def.element, ctx, {
|
|
3050
|
+
...params,
|
|
3051
|
+
path: [...params.path, "items"]
|
|
3052
|
+
});
|
|
3053
|
+
};
|
|
3054
|
+
const objectProcessor = (schema, ctx, _json, params) => {
|
|
3055
|
+
const json = _json;
|
|
3056
|
+
const def = schema._zod.def;
|
|
3057
|
+
json.type = "object";
|
|
3058
|
+
json.properties = {};
|
|
3059
|
+
const shape = def.shape;
|
|
3060
|
+
for (const key in shape) json.properties[key] = process(shape[key], ctx, {
|
|
3061
|
+
...params,
|
|
3062
|
+
path: [
|
|
3063
|
+
...params.path,
|
|
3064
|
+
"properties",
|
|
3065
|
+
key
|
|
3066
|
+
]
|
|
3067
|
+
});
|
|
3068
|
+
const allKeys = new Set(Object.keys(shape));
|
|
3069
|
+
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
3070
|
+
const v = def.shape[key]._zod;
|
|
3071
|
+
if (ctx.io === "input") return v.optin === void 0;
|
|
3072
|
+
else return v.optout === void 0;
|
|
3073
|
+
}));
|
|
3074
|
+
if (requiredKeys.size > 0) json.required = Array.from(requiredKeys);
|
|
3075
|
+
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
3076
|
+
else if (!def.catchall) {
|
|
3077
|
+
if (ctx.io === "output") json.additionalProperties = false;
|
|
3078
|
+
} else if (def.catchall) json.additionalProperties = process(def.catchall, ctx, {
|
|
3079
|
+
...params,
|
|
3080
|
+
path: [...params.path, "additionalProperties"]
|
|
3081
|
+
});
|
|
3082
|
+
};
|
|
3083
|
+
const unionProcessor = (schema, ctx, json, params) => {
|
|
3084
|
+
const def = schema._zod.def;
|
|
3085
|
+
const isExclusive = def.inclusive === false;
|
|
3086
|
+
const options = def.options.map((x, i) => process(x, ctx, {
|
|
3087
|
+
...params,
|
|
3088
|
+
path: [
|
|
3089
|
+
...params.path,
|
|
3090
|
+
isExclusive ? "oneOf" : "anyOf",
|
|
3091
|
+
i
|
|
3092
|
+
]
|
|
3093
|
+
}));
|
|
3094
|
+
if (isExclusive) json.oneOf = options;
|
|
3095
|
+
else json.anyOf = options;
|
|
3096
|
+
};
|
|
3097
|
+
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
3098
|
+
const def = schema._zod.def;
|
|
3099
|
+
const a = process(def.left, ctx, {
|
|
3100
|
+
...params,
|
|
3101
|
+
path: [
|
|
3102
|
+
...params.path,
|
|
3103
|
+
"allOf",
|
|
3104
|
+
0
|
|
3105
|
+
]
|
|
3106
|
+
});
|
|
3107
|
+
const b = process(def.right, ctx, {
|
|
3108
|
+
...params,
|
|
3109
|
+
path: [
|
|
3110
|
+
...params.path,
|
|
3111
|
+
"allOf",
|
|
3112
|
+
1
|
|
3113
|
+
]
|
|
3114
|
+
});
|
|
3115
|
+
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
3116
|
+
json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
3117
|
+
};
|
|
3118
|
+
const nullableProcessor = (schema, ctx, json, params) => {
|
|
3119
|
+
const def = schema._zod.def;
|
|
3120
|
+
const inner = process(def.innerType, ctx, params);
|
|
3121
|
+
const seen = ctx.seen.get(schema);
|
|
3122
|
+
if (ctx.target === "openapi-3.0") {
|
|
3123
|
+
seen.ref = def.innerType;
|
|
3124
|
+
json.nullable = true;
|
|
3125
|
+
} else json.anyOf = [inner, { type: "null" }];
|
|
3126
|
+
};
|
|
3127
|
+
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
3128
|
+
const def = schema._zod.def;
|
|
3129
|
+
process(def.innerType, ctx, params);
|
|
3130
|
+
const seen = ctx.seen.get(schema);
|
|
3131
|
+
seen.ref = def.innerType;
|
|
3132
|
+
};
|
|
3133
|
+
const defaultProcessor = (schema, ctx, json, params) => {
|
|
3134
|
+
const def = schema._zod.def;
|
|
3135
|
+
process(def.innerType, ctx, params);
|
|
3136
|
+
const seen = ctx.seen.get(schema);
|
|
3137
|
+
seen.ref = def.innerType;
|
|
3138
|
+
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
3139
|
+
};
|
|
3140
|
+
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
3141
|
+
const def = schema._zod.def;
|
|
3142
|
+
process(def.innerType, ctx, params);
|
|
3143
|
+
const seen = ctx.seen.get(schema);
|
|
3144
|
+
seen.ref = def.innerType;
|
|
3145
|
+
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
3146
|
+
};
|
|
3147
|
+
const catchProcessor = (schema, ctx, json, params) => {
|
|
3148
|
+
const def = schema._zod.def;
|
|
3149
|
+
process(def.innerType, ctx, params);
|
|
3150
|
+
const seen = ctx.seen.get(schema);
|
|
3151
|
+
seen.ref = def.innerType;
|
|
3152
|
+
let catchValue;
|
|
3153
|
+
try {
|
|
3154
|
+
catchValue = def.catchValue(void 0);
|
|
3155
|
+
} catch {
|
|
3156
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
3157
|
+
}
|
|
3158
|
+
json.default = catchValue;
|
|
3159
|
+
};
|
|
3160
|
+
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
3161
|
+
const def = schema._zod.def;
|
|
3162
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
3163
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
3164
|
+
process(innerType, ctx, params);
|
|
3165
|
+
const seen = ctx.seen.get(schema);
|
|
3166
|
+
seen.ref = innerType;
|
|
3167
|
+
};
|
|
3168
|
+
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
3169
|
+
const def = schema._zod.def;
|
|
3170
|
+
process(def.innerType, ctx, params);
|
|
3171
|
+
const seen = ctx.seen.get(schema);
|
|
3172
|
+
seen.ref = def.innerType;
|
|
3173
|
+
json.readOnly = true;
|
|
3174
|
+
};
|
|
3175
|
+
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
3176
|
+
const def = schema._zod.def;
|
|
3177
|
+
process(def.innerType, ctx, params);
|
|
3178
|
+
const seen = ctx.seen.get(schema);
|
|
3179
|
+
seen.ref = def.innerType;
|
|
3180
|
+
};
|
|
3181
|
+
//#endregion
|
|
3182
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
|
|
3183
|
+
const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
3184
|
+
$ZodISODateTime.init(inst, def);
|
|
3185
|
+
ZodStringFormat.init(inst, def);
|
|
3186
|
+
});
|
|
3187
|
+
function datetime(params) {
|
|
3188
|
+
return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
|
|
3189
|
+
}
|
|
3190
|
+
const ZodISODate = /*@__PURE__*/ $constructor("ZodISODate", (inst, def) => {
|
|
3191
|
+
$ZodISODate.init(inst, def);
|
|
3192
|
+
ZodStringFormat.init(inst, def);
|
|
3193
|
+
});
|
|
3194
|
+
function date(params) {
|
|
3195
|
+
return /* @__PURE__ */ _isoDate(ZodISODate, params);
|
|
3196
|
+
}
|
|
3197
|
+
const ZodISOTime = /*@__PURE__*/ $constructor("ZodISOTime", (inst, def) => {
|
|
3198
|
+
$ZodISOTime.init(inst, def);
|
|
3199
|
+
ZodStringFormat.init(inst, def);
|
|
3200
|
+
});
|
|
3201
|
+
function time(params) {
|
|
3202
|
+
return /* @__PURE__ */ _isoTime(ZodISOTime, params);
|
|
3203
|
+
}
|
|
3204
|
+
const ZodISODuration = /*@__PURE__*/ $constructor("ZodISODuration", (inst, def) => {
|
|
3205
|
+
$ZodISODuration.init(inst, def);
|
|
3206
|
+
ZodStringFormat.init(inst, def);
|
|
3207
|
+
});
|
|
3208
|
+
function duration(params) {
|
|
3209
|
+
return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
|
|
3210
|
+
}
|
|
3211
|
+
//#endregion
|
|
3212
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
|
|
3213
|
+
const initializer = (inst, issues) => {
|
|
3214
|
+
$ZodError.init(inst, issues);
|
|
3215
|
+
inst.name = "ZodError";
|
|
3216
|
+
Object.defineProperties(inst, {
|
|
3217
|
+
format: { value: (mapper) => formatError(inst, mapper) },
|
|
3218
|
+
flatten: { value: (mapper) => flattenError(inst, mapper) },
|
|
3219
|
+
addIssue: { value: (issue) => {
|
|
3220
|
+
inst.issues.push(issue);
|
|
3221
|
+
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
3222
|
+
} },
|
|
3223
|
+
addIssues: { value: (issues) => {
|
|
3224
|
+
inst.issues.push(...issues);
|
|
3225
|
+
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
3226
|
+
} },
|
|
3227
|
+
isEmpty: { get() {
|
|
3228
|
+
return inst.issues.length === 0;
|
|
3229
|
+
} }
|
|
3230
|
+
});
|
|
3231
|
+
};
|
|
3232
|
+
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, { Parent: Error });
|
|
3233
|
+
//#endregion
|
|
3234
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
3235
|
+
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
3236
|
+
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
3237
|
+
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
3238
|
+
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
3239
|
+
const encode = /* @__PURE__ */ _encode(ZodRealError);
|
|
3240
|
+
const decode = /* @__PURE__ */ _decode(ZodRealError);
|
|
3241
|
+
const encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);
|
|
3242
|
+
const decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);
|
|
3243
|
+
const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
3244
|
+
const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
3245
|
+
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
3246
|
+
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
3247
|
+
//#endregion
|
|
3248
|
+
//#region ../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
3249
|
+
const _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
3250
|
+
function _installLazyMethods(inst, group, methods) {
|
|
3251
|
+
const proto = Object.getPrototypeOf(inst);
|
|
3252
|
+
let installed = _installedGroups.get(proto);
|
|
3253
|
+
if (!installed) {
|
|
3254
|
+
installed = /* @__PURE__ */ new Set();
|
|
3255
|
+
_installedGroups.set(proto, installed);
|
|
3256
|
+
}
|
|
3257
|
+
if (installed.has(group)) return;
|
|
3258
|
+
installed.add(group);
|
|
3259
|
+
for (const key in methods) {
|
|
3260
|
+
const fn = methods[key];
|
|
3261
|
+
Object.defineProperty(proto, key, {
|
|
3262
|
+
configurable: true,
|
|
3263
|
+
enumerable: false,
|
|
3264
|
+
get() {
|
|
3265
|
+
const bound = fn.bind(this);
|
|
3266
|
+
Object.defineProperty(this, key, {
|
|
3267
|
+
configurable: true,
|
|
3268
|
+
writable: true,
|
|
3269
|
+
enumerable: true,
|
|
3270
|
+
value: bound
|
|
3271
|
+
});
|
|
3272
|
+
return bound;
|
|
3273
|
+
},
|
|
3274
|
+
set(v) {
|
|
3275
|
+
Object.defineProperty(this, key, {
|
|
3276
|
+
configurable: true,
|
|
3277
|
+
writable: true,
|
|
3278
|
+
enumerable: true,
|
|
3279
|
+
value: v
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
|
|
3286
|
+
$ZodType.init(inst, def);
|
|
3287
|
+
Object.assign(inst["~standard"], { jsonSchema: {
|
|
3288
|
+
input: createStandardJSONSchemaMethod(inst, "input"),
|
|
3289
|
+
output: createStandardJSONSchemaMethod(inst, "output")
|
|
3290
|
+
} });
|
|
3291
|
+
inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
|
|
3292
|
+
inst.def = def;
|
|
3293
|
+
inst.type = def.type;
|
|
3294
|
+
Object.defineProperty(inst, "_def", { value: def });
|
|
3295
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
3296
|
+
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
3297
|
+
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
3298
|
+
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
3299
|
+
inst.spa = inst.safeParseAsync;
|
|
3300
|
+
inst.encode = (data, params) => encode(inst, data, params);
|
|
3301
|
+
inst.decode = (data, params) => decode(inst, data, params);
|
|
3302
|
+
inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
|
|
3303
|
+
inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
|
|
3304
|
+
inst.safeEncode = (data, params) => safeEncode(inst, data, params);
|
|
3305
|
+
inst.safeDecode = (data, params) => safeDecode(inst, data, params);
|
|
3306
|
+
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
|
|
3307
|
+
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
|
|
3308
|
+
_installLazyMethods(inst, "ZodType", {
|
|
3309
|
+
check(...chks) {
|
|
3310
|
+
const def = this.def;
|
|
3311
|
+
return this.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...chks.map((ch) => typeof ch === "function" ? { _zod: {
|
|
3312
|
+
check: ch,
|
|
3313
|
+
def: { check: "custom" },
|
|
3314
|
+
onattach: []
|
|
3315
|
+
} } : ch)] }), { parent: true });
|
|
3316
|
+
},
|
|
3317
|
+
with(...chks) {
|
|
3318
|
+
return this.check(...chks);
|
|
3319
|
+
},
|
|
3320
|
+
clone(def, params) {
|
|
3321
|
+
return clone(this, def, params);
|
|
3322
|
+
},
|
|
3323
|
+
brand() {
|
|
3324
|
+
return this;
|
|
3325
|
+
},
|
|
3326
|
+
register(reg, meta) {
|
|
3327
|
+
reg.add(this, meta);
|
|
3328
|
+
return this;
|
|
3329
|
+
},
|
|
3330
|
+
refine(check, params) {
|
|
3331
|
+
return this.check(refine(check, params));
|
|
3332
|
+
},
|
|
3333
|
+
superRefine(refinement, params) {
|
|
3334
|
+
return this.check(superRefine(refinement, params));
|
|
3335
|
+
},
|
|
3336
|
+
overwrite(fn) {
|
|
3337
|
+
return this.check(/* @__PURE__ */ _overwrite(fn));
|
|
3338
|
+
},
|
|
3339
|
+
optional() {
|
|
3340
|
+
return optional(this);
|
|
3341
|
+
},
|
|
3342
|
+
exactOptional() {
|
|
3343
|
+
return exactOptional(this);
|
|
3344
|
+
},
|
|
3345
|
+
nullable() {
|
|
3346
|
+
return nullable(this);
|
|
3347
|
+
},
|
|
3348
|
+
nullish() {
|
|
3349
|
+
return optional(nullable(this));
|
|
3350
|
+
},
|
|
3351
|
+
nonoptional(params) {
|
|
3352
|
+
return nonoptional(this, params);
|
|
3353
|
+
},
|
|
3354
|
+
array() {
|
|
3355
|
+
return array(this);
|
|
3356
|
+
},
|
|
3357
|
+
or(arg) {
|
|
3358
|
+
return union([this, arg]);
|
|
3359
|
+
},
|
|
3360
|
+
and(arg) {
|
|
3361
|
+
return intersection(this, arg);
|
|
3362
|
+
},
|
|
3363
|
+
transform(tx) {
|
|
3364
|
+
return pipe(this, transform(tx));
|
|
3365
|
+
},
|
|
3366
|
+
default(d) {
|
|
3367
|
+
return _default(this, d);
|
|
3368
|
+
},
|
|
3369
|
+
prefault(d) {
|
|
3370
|
+
return prefault(this, d);
|
|
3371
|
+
},
|
|
3372
|
+
catch(params) {
|
|
3373
|
+
return _catch(this, params);
|
|
3374
|
+
},
|
|
3375
|
+
pipe(target) {
|
|
3376
|
+
return pipe(this, target);
|
|
3377
|
+
},
|
|
3378
|
+
readonly() {
|
|
3379
|
+
return readonly(this);
|
|
3380
|
+
},
|
|
3381
|
+
describe(description) {
|
|
3382
|
+
const cl = this.clone();
|
|
3383
|
+
globalRegistry.add(cl, { description });
|
|
3384
|
+
return cl;
|
|
3385
|
+
},
|
|
3386
|
+
meta(...args) {
|
|
3387
|
+
if (args.length === 0) return globalRegistry.get(this);
|
|
3388
|
+
const cl = this.clone();
|
|
3389
|
+
globalRegistry.add(cl, args[0]);
|
|
3390
|
+
return cl;
|
|
3391
|
+
},
|
|
3392
|
+
isOptional() {
|
|
3393
|
+
return this.safeParse(void 0).success;
|
|
3394
|
+
},
|
|
3395
|
+
isNullable() {
|
|
3396
|
+
return this.safeParse(null).success;
|
|
3397
|
+
},
|
|
3398
|
+
apply(fn) {
|
|
3399
|
+
return fn(this);
|
|
3400
|
+
}
|
|
3401
|
+
});
|
|
3402
|
+
Object.defineProperty(inst, "description", {
|
|
3403
|
+
get() {
|
|
3404
|
+
return globalRegistry.get(inst)?.description;
|
|
3405
|
+
},
|
|
3406
|
+
configurable: true
|
|
3407
|
+
});
|
|
3408
|
+
return inst;
|
|
3409
|
+
});
|
|
3410
|
+
/** @internal */
|
|
3411
|
+
const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
|
|
3412
|
+
$ZodString.init(inst, def);
|
|
3413
|
+
ZodType.init(inst, def);
|
|
3414
|
+
inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
|
|
3415
|
+
const bag = inst._zod.bag;
|
|
3416
|
+
inst.format = bag.format ?? null;
|
|
3417
|
+
inst.minLength = bag.minimum ?? null;
|
|
3418
|
+
inst.maxLength = bag.maximum ?? null;
|
|
3419
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
3420
|
+
regex(...args) {
|
|
3421
|
+
return this.check(/* @__PURE__ */ _regex(...args));
|
|
3422
|
+
},
|
|
3423
|
+
includes(...args) {
|
|
3424
|
+
return this.check(/* @__PURE__ */ _includes(...args));
|
|
3425
|
+
},
|
|
3426
|
+
startsWith(...args) {
|
|
3427
|
+
return this.check(/* @__PURE__ */ _startsWith(...args));
|
|
3428
|
+
},
|
|
3429
|
+
endsWith(...args) {
|
|
3430
|
+
return this.check(/* @__PURE__ */ _endsWith(...args));
|
|
3431
|
+
},
|
|
3432
|
+
min(...args) {
|
|
3433
|
+
return this.check(/* @__PURE__ */ _minLength(...args));
|
|
3434
|
+
},
|
|
3435
|
+
max(...args) {
|
|
3436
|
+
return this.check(/* @__PURE__ */ _maxLength(...args));
|
|
3437
|
+
},
|
|
3438
|
+
length(...args) {
|
|
3439
|
+
return this.check(/* @__PURE__ */ _length(...args));
|
|
3440
|
+
},
|
|
3441
|
+
nonempty(...args) {
|
|
3442
|
+
return this.check(/* @__PURE__ */ _minLength(1, ...args));
|
|
3443
|
+
},
|
|
3444
|
+
lowercase(params) {
|
|
3445
|
+
return this.check(/* @__PURE__ */ _lowercase(params));
|
|
3446
|
+
},
|
|
3447
|
+
uppercase(params) {
|
|
3448
|
+
return this.check(/* @__PURE__ */ _uppercase(params));
|
|
3449
|
+
},
|
|
3450
|
+
trim() {
|
|
3451
|
+
return this.check(/* @__PURE__ */ _trim());
|
|
3452
|
+
},
|
|
3453
|
+
normalize(...args) {
|
|
3454
|
+
return this.check(/* @__PURE__ */ _normalize(...args));
|
|
3455
|
+
},
|
|
3456
|
+
toLowerCase() {
|
|
3457
|
+
return this.check(/* @__PURE__ */ _toLowerCase());
|
|
3458
|
+
},
|
|
3459
|
+
toUpperCase() {
|
|
3460
|
+
return this.check(/* @__PURE__ */ _toUpperCase());
|
|
3461
|
+
},
|
|
3462
|
+
slugify() {
|
|
3463
|
+
return this.check(/* @__PURE__ */ _slugify());
|
|
3464
|
+
}
|
|
3465
|
+
});
|
|
3466
|
+
});
|
|
3467
|
+
const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
|
|
3468
|
+
$ZodString.init(inst, def);
|
|
3469
|
+
_ZodString.init(inst, def);
|
|
3470
|
+
inst.email = (params) => inst.check(/* @__PURE__ */ _email(ZodEmail, params));
|
|
3471
|
+
inst.url = (params) => inst.check(/* @__PURE__ */ _url(ZodURL, params));
|
|
3472
|
+
inst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt(ZodJWT, params));
|
|
3473
|
+
inst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
|
|
3474
|
+
inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
3475
|
+
inst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid(ZodUUID, params));
|
|
3476
|
+
inst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
|
|
3477
|
+
inst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
|
|
3478
|
+
inst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
|
|
3479
|
+
inst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
|
|
3480
|
+
inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
3481
|
+
inst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid(ZodCUID, params));
|
|
3482
|
+
inst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
|
|
3483
|
+
inst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid(ZodULID, params));
|
|
3484
|
+
inst.base64 = (params) => inst.check(/* @__PURE__ */ _base64(ZodBase64, params));
|
|
3485
|
+
inst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
|
|
3486
|
+
inst.xid = (params) => inst.check(/* @__PURE__ */ _xid(ZodXID, params));
|
|
3487
|
+
inst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
|
|
3488
|
+
inst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
|
|
3489
|
+
inst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
|
|
3490
|
+
inst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
|
|
3491
|
+
inst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
|
|
3492
|
+
inst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));
|
|
3493
|
+
inst.datetime = (params) => inst.check(datetime(params));
|
|
3494
|
+
inst.date = (params) => inst.check(date(params));
|
|
3495
|
+
inst.time = (params) => inst.check(time(params));
|
|
3496
|
+
inst.duration = (params) => inst.check(duration(params));
|
|
3497
|
+
});
|
|
3498
|
+
function string(params) {
|
|
3499
|
+
return /* @__PURE__ */ _string(ZodString, params);
|
|
3500
|
+
}
|
|
3501
|
+
const ZodStringFormat = /*@__PURE__*/ $constructor("ZodStringFormat", (inst, def) => {
|
|
3502
|
+
$ZodStringFormat.init(inst, def);
|
|
3503
|
+
_ZodString.init(inst, def);
|
|
3504
|
+
});
|
|
3505
|
+
const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
|
|
3506
|
+
$ZodEmail.init(inst, def);
|
|
3507
|
+
ZodStringFormat.init(inst, def);
|
|
3508
|
+
});
|
|
3509
|
+
const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
|
|
3510
|
+
$ZodGUID.init(inst, def);
|
|
3511
|
+
ZodStringFormat.init(inst, def);
|
|
3512
|
+
});
|
|
3513
|
+
const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
|
|
3514
|
+
$ZodUUID.init(inst, def);
|
|
3515
|
+
ZodStringFormat.init(inst, def);
|
|
3516
|
+
});
|
|
3517
|
+
const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
|
|
3518
|
+
$ZodURL.init(inst, def);
|
|
3519
|
+
ZodStringFormat.init(inst, def);
|
|
3520
|
+
});
|
|
3521
|
+
const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
|
|
3522
|
+
$ZodEmoji.init(inst, def);
|
|
3523
|
+
ZodStringFormat.init(inst, def);
|
|
3524
|
+
});
|
|
3525
|
+
const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
|
|
3526
|
+
$ZodNanoID.init(inst, def);
|
|
3527
|
+
ZodStringFormat.init(inst, def);
|
|
3528
|
+
});
|
|
3529
|
+
/**
|
|
3530
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3531
|
+
* (timestamps embedded in the id). Use {@link ZodCUID2} instead.
|
|
3532
|
+
* See https://github.com/paralleldrive/cuid.
|
|
3533
|
+
*/
|
|
3534
|
+
const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
|
|
3535
|
+
$ZodCUID.init(inst, def);
|
|
3536
|
+
ZodStringFormat.init(inst, def);
|
|
3537
|
+
});
|
|
3538
|
+
const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
|
|
3539
|
+
$ZodCUID2.init(inst, def);
|
|
3540
|
+
ZodStringFormat.init(inst, def);
|
|
3541
|
+
});
|
|
3542
|
+
const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
|
|
3543
|
+
$ZodULID.init(inst, def);
|
|
3544
|
+
ZodStringFormat.init(inst, def);
|
|
3545
|
+
});
|
|
3546
|
+
const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
|
|
3547
|
+
$ZodXID.init(inst, def);
|
|
3548
|
+
ZodStringFormat.init(inst, def);
|
|
3549
|
+
});
|
|
3550
|
+
const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
|
|
3551
|
+
$ZodKSUID.init(inst, def);
|
|
3552
|
+
ZodStringFormat.init(inst, def);
|
|
3553
|
+
});
|
|
3554
|
+
const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
|
|
3555
|
+
$ZodIPv4.init(inst, def);
|
|
3556
|
+
ZodStringFormat.init(inst, def);
|
|
3557
|
+
});
|
|
3558
|
+
const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
|
|
3559
|
+
$ZodIPv6.init(inst, def);
|
|
3560
|
+
ZodStringFormat.init(inst, def);
|
|
3561
|
+
});
|
|
3562
|
+
const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
|
|
3563
|
+
$ZodCIDRv4.init(inst, def);
|
|
3564
|
+
ZodStringFormat.init(inst, def);
|
|
3565
|
+
});
|
|
3566
|
+
const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
|
|
3567
|
+
$ZodCIDRv6.init(inst, def);
|
|
3568
|
+
ZodStringFormat.init(inst, def);
|
|
3569
|
+
});
|
|
3570
|
+
const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
|
|
3571
|
+
$ZodBase64.init(inst, def);
|
|
3572
|
+
ZodStringFormat.init(inst, def);
|
|
3573
|
+
});
|
|
3574
|
+
const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
|
|
3575
|
+
$ZodBase64URL.init(inst, def);
|
|
3576
|
+
ZodStringFormat.init(inst, def);
|
|
3577
|
+
});
|
|
3578
|
+
const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
|
|
3579
|
+
$ZodE164.init(inst, def);
|
|
3580
|
+
ZodStringFormat.init(inst, def);
|
|
3581
|
+
});
|
|
3582
|
+
const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
|
|
3583
|
+
$ZodJWT.init(inst, def);
|
|
3584
|
+
ZodStringFormat.init(inst, def);
|
|
3585
|
+
});
|
|
3586
|
+
const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
|
|
3587
|
+
$ZodNumber.init(inst, def);
|
|
3588
|
+
ZodType.init(inst, def);
|
|
3589
|
+
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
3590
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
3591
|
+
gt(value, params) {
|
|
3592
|
+
return this.check(/* @__PURE__ */ _gt(value, params));
|
|
3593
|
+
},
|
|
3594
|
+
gte(value, params) {
|
|
3595
|
+
return this.check(/* @__PURE__ */ _gte(value, params));
|
|
3596
|
+
},
|
|
3597
|
+
min(value, params) {
|
|
3598
|
+
return this.check(/* @__PURE__ */ _gte(value, params));
|
|
3599
|
+
},
|
|
3600
|
+
lt(value, params) {
|
|
3601
|
+
return this.check(/* @__PURE__ */ _lt(value, params));
|
|
3602
|
+
},
|
|
3603
|
+
lte(value, params) {
|
|
3604
|
+
return this.check(/* @__PURE__ */ _lte(value, params));
|
|
3605
|
+
},
|
|
3606
|
+
max(value, params) {
|
|
3607
|
+
return this.check(/* @__PURE__ */ _lte(value, params));
|
|
3608
|
+
},
|
|
3609
|
+
int(params) {
|
|
3610
|
+
return this.check(int(params));
|
|
3611
|
+
},
|
|
3612
|
+
safe(params) {
|
|
3613
|
+
return this.check(int(params));
|
|
3614
|
+
},
|
|
3615
|
+
positive(params) {
|
|
3616
|
+
return this.check(/* @__PURE__ */ _gt(0, params));
|
|
3617
|
+
},
|
|
3618
|
+
nonnegative(params) {
|
|
3619
|
+
return this.check(/* @__PURE__ */ _gte(0, params));
|
|
3620
|
+
},
|
|
3621
|
+
negative(params) {
|
|
3622
|
+
return this.check(/* @__PURE__ */ _lt(0, params));
|
|
3623
|
+
},
|
|
3624
|
+
nonpositive(params) {
|
|
3625
|
+
return this.check(/* @__PURE__ */ _lte(0, params));
|
|
3626
|
+
},
|
|
3627
|
+
multipleOf(value, params) {
|
|
3628
|
+
return this.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
3629
|
+
},
|
|
3630
|
+
step(value, params) {
|
|
3631
|
+
return this.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
3632
|
+
},
|
|
3633
|
+
finite() {
|
|
3634
|
+
return this;
|
|
3635
|
+
}
|
|
3636
|
+
});
|
|
3637
|
+
const bag = inst._zod.bag;
|
|
3638
|
+
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
3639
|
+
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
3640
|
+
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? .5);
|
|
3641
|
+
inst.isFinite = true;
|
|
3642
|
+
inst.format = bag.format ?? null;
|
|
3643
|
+
});
|
|
3644
|
+
function number(params) {
|
|
3645
|
+
return /* @__PURE__ */ _number(ZodNumber, params);
|
|
3646
|
+
}
|
|
3647
|
+
const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
|
|
3648
|
+
$ZodNumberFormat.init(inst, def);
|
|
3649
|
+
ZodNumber.init(inst, def);
|
|
3650
|
+
});
|
|
3651
|
+
function int(params) {
|
|
3652
|
+
return /* @__PURE__ */ _int(ZodNumberFormat, params);
|
|
3653
|
+
}
|
|
3654
|
+
const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
|
|
3655
|
+
$ZodUnknown.init(inst, def);
|
|
3656
|
+
ZodType.init(inst, def);
|
|
3657
|
+
inst._zod.processJSONSchema = (ctx, json, params) => void 0;
|
|
3658
|
+
});
|
|
3659
|
+
function unknown() {
|
|
3660
|
+
return /* @__PURE__ */ _unknown(ZodUnknown);
|
|
3661
|
+
}
|
|
3662
|
+
const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
|
|
3663
|
+
$ZodNever.init(inst, def);
|
|
3664
|
+
ZodType.init(inst, def);
|
|
3665
|
+
inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
|
|
3666
|
+
});
|
|
3667
|
+
function never(params) {
|
|
3668
|
+
return /* @__PURE__ */ _never(ZodNever, params);
|
|
3669
|
+
}
|
|
3670
|
+
const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
|
|
3671
|
+
$ZodArray.init(inst, def);
|
|
3672
|
+
ZodType.init(inst, def);
|
|
3673
|
+
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
3674
|
+
inst.element = def.element;
|
|
3675
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
3676
|
+
min(n, params) {
|
|
3677
|
+
return this.check(/* @__PURE__ */ _minLength(n, params));
|
|
3678
|
+
},
|
|
3679
|
+
nonempty(params) {
|
|
3680
|
+
return this.check(/* @__PURE__ */ _minLength(1, params));
|
|
3681
|
+
},
|
|
3682
|
+
max(n, params) {
|
|
3683
|
+
return this.check(/* @__PURE__ */ _maxLength(n, params));
|
|
3684
|
+
},
|
|
3685
|
+
length(n, params) {
|
|
3686
|
+
return this.check(/* @__PURE__ */ _length(n, params));
|
|
3687
|
+
},
|
|
3688
|
+
unwrap() {
|
|
3689
|
+
return this.element;
|
|
3690
|
+
}
|
|
3691
|
+
});
|
|
3692
|
+
});
|
|
3693
|
+
function array(element, params) {
|
|
3694
|
+
return /* @__PURE__ */ _array(ZodArray, element, params);
|
|
3695
|
+
}
|
|
3696
|
+
const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
|
|
3697
|
+
$ZodObjectJIT.init(inst, def);
|
|
3698
|
+
ZodType.init(inst, def);
|
|
3699
|
+
inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
|
|
3700
|
+
defineLazy(inst, "shape", () => {
|
|
3701
|
+
return def.shape;
|
|
3702
|
+
});
|
|
3703
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
3704
|
+
keyof() {
|
|
3705
|
+
return _enum(Object.keys(this._zod.def.shape));
|
|
3706
|
+
},
|
|
3707
|
+
catchall(catchall) {
|
|
3708
|
+
return this.clone({
|
|
3709
|
+
...this._zod.def,
|
|
3710
|
+
catchall
|
|
3711
|
+
});
|
|
3712
|
+
},
|
|
3713
|
+
passthrough() {
|
|
3714
|
+
return this.clone({
|
|
3715
|
+
...this._zod.def,
|
|
3716
|
+
catchall: unknown()
|
|
3717
|
+
});
|
|
3718
|
+
},
|
|
3719
|
+
loose() {
|
|
3720
|
+
return this.clone({
|
|
3721
|
+
...this._zod.def,
|
|
3722
|
+
catchall: unknown()
|
|
3723
|
+
});
|
|
3724
|
+
},
|
|
3725
|
+
strict() {
|
|
3726
|
+
return this.clone({
|
|
3727
|
+
...this._zod.def,
|
|
3728
|
+
catchall: never()
|
|
3729
|
+
});
|
|
3730
|
+
},
|
|
3731
|
+
strip() {
|
|
3732
|
+
return this.clone({
|
|
3733
|
+
...this._zod.def,
|
|
3734
|
+
catchall: void 0
|
|
3735
|
+
});
|
|
3736
|
+
},
|
|
3737
|
+
extend(incoming) {
|
|
3738
|
+
return extend(this, incoming);
|
|
3739
|
+
},
|
|
3740
|
+
safeExtend(incoming) {
|
|
3741
|
+
return safeExtend(this, incoming);
|
|
3742
|
+
},
|
|
3743
|
+
merge(other) {
|
|
3744
|
+
return merge(this, other);
|
|
3745
|
+
},
|
|
3746
|
+
pick(mask) {
|
|
3747
|
+
return pick(this, mask);
|
|
3748
|
+
},
|
|
3749
|
+
omit(mask) {
|
|
3750
|
+
return omit(this, mask);
|
|
3751
|
+
},
|
|
3752
|
+
partial(...args) {
|
|
3753
|
+
return partial(ZodOptional, this, args[0]);
|
|
3754
|
+
},
|
|
3755
|
+
required(...args) {
|
|
3756
|
+
return required(ZodNonOptional, this, args[0]);
|
|
3757
|
+
}
|
|
3758
|
+
});
|
|
3759
|
+
});
|
|
3760
|
+
function object(shape, params) {
|
|
3761
|
+
return new ZodObject({
|
|
3762
|
+
type: "object",
|
|
3763
|
+
shape: shape ?? {},
|
|
3764
|
+
...normalizeParams(params)
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3767
|
+
const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
|
|
3768
|
+
$ZodUnion.init(inst, def);
|
|
3769
|
+
ZodType.init(inst, def);
|
|
3770
|
+
inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
|
|
3771
|
+
inst.options = def.options;
|
|
3772
|
+
});
|
|
3773
|
+
function union(options, params) {
|
|
3774
|
+
return new ZodUnion({
|
|
3775
|
+
type: "union",
|
|
3776
|
+
options,
|
|
3777
|
+
...normalizeParams(params)
|
|
3778
|
+
});
|
|
3779
|
+
}
|
|
3780
|
+
const ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
|
|
3781
|
+
$ZodIntersection.init(inst, def);
|
|
3782
|
+
ZodType.init(inst, def);
|
|
3783
|
+
inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
|
|
3784
|
+
});
|
|
3785
|
+
function intersection(left, right) {
|
|
3786
|
+
return new ZodIntersection({
|
|
3787
|
+
type: "intersection",
|
|
3788
|
+
left,
|
|
3789
|
+
right
|
|
3790
|
+
});
|
|
3791
|
+
}
|
|
3792
|
+
const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
|
|
3793
|
+
$ZodEnum.init(inst, def);
|
|
3794
|
+
ZodType.init(inst, def);
|
|
3795
|
+
inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
|
|
3796
|
+
inst.enum = def.entries;
|
|
3797
|
+
inst.options = Object.values(def.entries);
|
|
3798
|
+
const keys = new Set(Object.keys(def.entries));
|
|
3799
|
+
inst.extract = (values, params) => {
|
|
3800
|
+
const newEntries = {};
|
|
3801
|
+
for (const value of values) if (keys.has(value)) newEntries[value] = def.entries[value];
|
|
3802
|
+
else throw new Error(`Key ${value} not found in enum`);
|
|
3803
|
+
return new ZodEnum({
|
|
3804
|
+
...def,
|
|
3805
|
+
checks: [],
|
|
3806
|
+
...normalizeParams(params),
|
|
3807
|
+
entries: newEntries
|
|
3808
|
+
});
|
|
3809
|
+
};
|
|
3810
|
+
inst.exclude = (values, params) => {
|
|
3811
|
+
const newEntries = { ...def.entries };
|
|
3812
|
+
for (const value of values) if (keys.has(value)) delete newEntries[value];
|
|
3813
|
+
else throw new Error(`Key ${value} not found in enum`);
|
|
3814
|
+
return new ZodEnum({
|
|
3815
|
+
...def,
|
|
3816
|
+
checks: [],
|
|
3817
|
+
...normalizeParams(params),
|
|
3818
|
+
entries: newEntries
|
|
3819
|
+
});
|
|
3820
|
+
};
|
|
3821
|
+
});
|
|
3822
|
+
function _enum(values, params) {
|
|
3823
|
+
return new ZodEnum({
|
|
3824
|
+
type: "enum",
|
|
3825
|
+
entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,
|
|
3826
|
+
...normalizeParams(params)
|
|
3827
|
+
});
|
|
3828
|
+
}
|
|
3829
|
+
const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
|
|
3830
|
+
$ZodLiteral.init(inst, def);
|
|
3831
|
+
ZodType.init(inst, def);
|
|
3832
|
+
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
3833
|
+
inst.values = new Set(def.values);
|
|
3834
|
+
Object.defineProperty(inst, "value", { get() {
|
|
3835
|
+
if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3836
|
+
return def.values[0];
|
|
3837
|
+
} });
|
|
3838
|
+
});
|
|
3839
|
+
function literal(value, params) {
|
|
3840
|
+
return new ZodLiteral({
|
|
3841
|
+
type: "literal",
|
|
3842
|
+
values: Array.isArray(value) ? value : [value],
|
|
3843
|
+
...normalizeParams(params)
|
|
3844
|
+
});
|
|
3845
|
+
}
|
|
3846
|
+
const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
|
|
3847
|
+
$ZodTransform.init(inst, def);
|
|
3848
|
+
ZodType.init(inst, def);
|
|
3849
|
+
inst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);
|
|
3850
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
3851
|
+
if (_ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
|
|
3852
|
+
payload.addIssue = (issue$1) => {
|
|
3853
|
+
if (typeof issue$1 === "string") payload.issues.push(issue(issue$1, payload.value, def));
|
|
3854
|
+
else {
|
|
3855
|
+
const _issue = issue$1;
|
|
3856
|
+
if (_issue.fatal) _issue.continue = false;
|
|
3857
|
+
_issue.code ?? (_issue.code = "custom");
|
|
3858
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
3859
|
+
_issue.inst ?? (_issue.inst = inst);
|
|
3860
|
+
payload.issues.push(issue(_issue));
|
|
3861
|
+
}
|
|
3862
|
+
};
|
|
3863
|
+
const output = def.transform(payload.value, payload);
|
|
3864
|
+
if (output instanceof Promise) return output.then((output) => {
|
|
3865
|
+
payload.value = output;
|
|
3866
|
+
payload.fallback = true;
|
|
3867
|
+
return payload;
|
|
3868
|
+
});
|
|
3869
|
+
payload.value = output;
|
|
3870
|
+
payload.fallback = true;
|
|
3871
|
+
return payload;
|
|
3872
|
+
};
|
|
3873
|
+
});
|
|
3874
|
+
function transform(fn) {
|
|
3875
|
+
return new ZodTransform({
|
|
3876
|
+
type: "transform",
|
|
3877
|
+
transform: fn
|
|
3878
|
+
});
|
|
3879
|
+
}
|
|
3880
|
+
const ZodOptional = /*@__PURE__*/ $constructor("ZodOptional", (inst, def) => {
|
|
3881
|
+
$ZodOptional.init(inst, def);
|
|
3882
|
+
ZodType.init(inst, def);
|
|
3883
|
+
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
3884
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3885
|
+
});
|
|
3886
|
+
function optional(innerType) {
|
|
3887
|
+
return new ZodOptional({
|
|
3888
|
+
type: "optional",
|
|
3889
|
+
innerType
|
|
3890
|
+
});
|
|
3891
|
+
}
|
|
3892
|
+
const ZodExactOptional = /*@__PURE__*/ $constructor("ZodExactOptional", (inst, def) => {
|
|
3893
|
+
$ZodExactOptional.init(inst, def);
|
|
3894
|
+
ZodType.init(inst, def);
|
|
3895
|
+
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
3896
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3897
|
+
});
|
|
3898
|
+
function exactOptional(innerType) {
|
|
3899
|
+
return new ZodExactOptional({
|
|
3900
|
+
type: "optional",
|
|
3901
|
+
innerType
|
|
3902
|
+
});
|
|
3903
|
+
}
|
|
3904
|
+
const ZodNullable = /*@__PURE__*/ $constructor("ZodNullable", (inst, def) => {
|
|
3905
|
+
$ZodNullable.init(inst, def);
|
|
3906
|
+
ZodType.init(inst, def);
|
|
3907
|
+
inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
|
|
3908
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3909
|
+
});
|
|
3910
|
+
function nullable(innerType) {
|
|
3911
|
+
return new ZodNullable({
|
|
3912
|
+
type: "nullable",
|
|
3913
|
+
innerType
|
|
3914
|
+
});
|
|
3915
|
+
}
|
|
3916
|
+
const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
|
|
3917
|
+
$ZodDefault.init(inst, def);
|
|
3918
|
+
ZodType.init(inst, def);
|
|
3919
|
+
inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
|
|
3920
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3921
|
+
inst.removeDefault = inst.unwrap;
|
|
3922
|
+
});
|
|
3923
|
+
function _default(innerType, defaultValue) {
|
|
3924
|
+
return new ZodDefault({
|
|
3925
|
+
type: "default",
|
|
3926
|
+
innerType,
|
|
3927
|
+
get defaultValue() {
|
|
3928
|
+
return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
|
|
3929
|
+
}
|
|
3930
|
+
});
|
|
3931
|
+
}
|
|
3932
|
+
const ZodPrefault = /*@__PURE__*/ $constructor("ZodPrefault", (inst, def) => {
|
|
3933
|
+
$ZodPrefault.init(inst, def);
|
|
3934
|
+
ZodType.init(inst, def);
|
|
3935
|
+
inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
|
|
3936
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3937
|
+
});
|
|
3938
|
+
function prefault(innerType, defaultValue) {
|
|
3939
|
+
return new ZodPrefault({
|
|
3940
|
+
type: "prefault",
|
|
3941
|
+
innerType,
|
|
3942
|
+
get defaultValue() {
|
|
3943
|
+
return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
|
|
3944
|
+
}
|
|
3945
|
+
});
|
|
3946
|
+
}
|
|
3947
|
+
const ZodNonOptional = /*@__PURE__*/ $constructor("ZodNonOptional", (inst, def) => {
|
|
3948
|
+
$ZodNonOptional.init(inst, def);
|
|
3949
|
+
ZodType.init(inst, def);
|
|
3950
|
+
inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
|
|
3951
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3952
|
+
});
|
|
3953
|
+
function nonoptional(innerType, params) {
|
|
3954
|
+
return new ZodNonOptional({
|
|
3955
|
+
type: "nonoptional",
|
|
3956
|
+
innerType,
|
|
3957
|
+
...normalizeParams(params)
|
|
3958
|
+
});
|
|
3959
|
+
}
|
|
3960
|
+
const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
|
|
3961
|
+
$ZodCatch.init(inst, def);
|
|
3962
|
+
ZodType.init(inst, def);
|
|
3963
|
+
inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
|
|
3964
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3965
|
+
inst.removeCatch = inst.unwrap;
|
|
3966
|
+
});
|
|
3967
|
+
function _catch(innerType, catchValue) {
|
|
3968
|
+
return new ZodCatch({
|
|
3969
|
+
type: "catch",
|
|
3970
|
+
innerType,
|
|
3971
|
+
catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
|
|
3972
|
+
});
|
|
3973
|
+
}
|
|
3974
|
+
const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
|
|
3975
|
+
$ZodPipe.init(inst, def);
|
|
3976
|
+
ZodType.init(inst, def);
|
|
3977
|
+
inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
|
|
3978
|
+
inst.in = def.in;
|
|
3979
|
+
inst.out = def.out;
|
|
3980
|
+
});
|
|
3981
|
+
function pipe(in_, out) {
|
|
3982
|
+
return new ZodPipe({
|
|
3983
|
+
type: "pipe",
|
|
3984
|
+
in: in_,
|
|
3985
|
+
out
|
|
3986
|
+
});
|
|
3987
|
+
}
|
|
3988
|
+
const ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
|
|
3989
|
+
$ZodReadonly.init(inst, def);
|
|
3990
|
+
ZodType.init(inst, def);
|
|
3991
|
+
inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
|
|
3992
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3993
|
+
});
|
|
3994
|
+
function readonly(innerType) {
|
|
3995
|
+
return new ZodReadonly({
|
|
3996
|
+
type: "readonly",
|
|
3997
|
+
innerType
|
|
3998
|
+
});
|
|
3999
|
+
}
|
|
4000
|
+
const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
|
|
4001
|
+
$ZodCustom.init(inst, def);
|
|
4002
|
+
ZodType.init(inst, def);
|
|
4003
|
+
inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
|
|
4004
|
+
});
|
|
4005
|
+
function refine(fn, _params = {}) {
|
|
4006
|
+
return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
|
|
4007
|
+
}
|
|
4008
|
+
function superRefine(fn, params) {
|
|
4009
|
+
return /* @__PURE__ */ _superRefine(fn, params);
|
|
4010
|
+
}
|
|
4011
|
+
//#endregion
|
|
4012
|
+
//#region lib/typert.remote-client.js
|
|
4013
|
+
let _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_limits_result$schema$value;
|
|
4014
|
+
const _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_limits_result$schema = () => _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_limits_result$schema$value ??= object({
|
|
4015
|
+
"maxTextChars": number(),
|
|
4016
|
+
"preferences": object({
|
|
4017
|
+
"provider": union([
|
|
4018
|
+
literal("google"),
|
|
4019
|
+
literal("bing"),
|
|
4020
|
+
literal("deepseek-account"),
|
|
4021
|
+
literal("deepseek-official")
|
|
4022
|
+
]),
|
|
4023
|
+
"targetLanguage": string()
|
|
4024
|
+
}),
|
|
4025
|
+
"availableProviders": array(union([
|
|
4026
|
+
literal("google"),
|
|
4027
|
+
literal("bing"),
|
|
4028
|
+
literal("deepseek-account"),
|
|
4029
|
+
literal("deepseek-official")
|
|
4030
|
+
]))
|
|
4031
|
+
});
|
|
4032
|
+
let _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_parameter_0$schema$value;
|
|
4033
|
+
const _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_parameter_0$schema = () => _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_parameter_0$schema$value ??= object({
|
|
4034
|
+
"text": string().readonly(),
|
|
4035
|
+
"targetLanguage": string().readonly(),
|
|
4036
|
+
"sourceLanguage": string().readonly().optional(),
|
|
4037
|
+
"provider": union([
|
|
4038
|
+
literal("google"),
|
|
4039
|
+
literal("bing"),
|
|
4040
|
+
literal("deepseek-account"),
|
|
4041
|
+
literal("deepseek-official")
|
|
4042
|
+
]).readonly().optional(),
|
|
4043
|
+
"sessionId": intersection(string(), unknown()).readonly().optional()
|
|
4044
|
+
});
|
|
4045
|
+
let _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_result$schema$value;
|
|
4046
|
+
const _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_result$schema = () => _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_result$schema$value ??= string();
|
|
4047
|
+
const TYPERT_REMOTE = {
|
|
4048
|
+
package: "@deepseek-ai/dsh-experimental-client-ui-cot-translation",
|
|
4049
|
+
descriptors: [{
|
|
4050
|
+
id: "@deepseek-ai/dsh-experimental-client-ui-cot-translation#cotTranslation/limits",
|
|
4051
|
+
service: "cotTranslation",
|
|
4052
|
+
namespace: "cotTranslation",
|
|
4053
|
+
method: "limits",
|
|
4054
|
+
invocation: { kind: "direct" },
|
|
4055
|
+
parameters: [],
|
|
4056
|
+
cancellation: { parameter: "signal" },
|
|
4057
|
+
result: {
|
|
4058
|
+
mode: "strict",
|
|
4059
|
+
typeSymbol: "@deepseek-ai/dsh-experimental-client-ui-cot-translation/types#CotTranslationSnapshot",
|
|
4060
|
+
create: _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_limits_result$schema
|
|
4061
|
+
},
|
|
4062
|
+
sourceLocation: {
|
|
4063
|
+
"file": "packages/experimental/client-ui-cot-translation/src/index.ts",
|
|
4064
|
+
"line": 47,
|
|
4065
|
+
"column": 9
|
|
4066
|
+
}
|
|
4067
|
+
}, {
|
|
4068
|
+
id: "@deepseek-ai/dsh-experimental-client-ui-cot-translation#cotTranslation/translate",
|
|
4069
|
+
service: "cotTranslation",
|
|
4070
|
+
namespace: "cotTranslation",
|
|
4071
|
+
method: "translate",
|
|
4072
|
+
invocation: { kind: "direct" },
|
|
4073
|
+
parameters: [{
|
|
4074
|
+
name: "request",
|
|
4075
|
+
wire: "request",
|
|
4076
|
+
source: "json",
|
|
4077
|
+
codec: {
|
|
4078
|
+
mode: "strict",
|
|
4079
|
+
typeSymbol: "@deepseek-ai/dsh-experimental-translator/types#TranslationRequest",
|
|
4080
|
+
create: _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_parameter_0$schema
|
|
4081
|
+
}
|
|
4082
|
+
}],
|
|
4083
|
+
cancellation: { parameter: "signal" },
|
|
4084
|
+
result: {
|
|
4085
|
+
mode: "strict",
|
|
4086
|
+
typeSymbol: "@deepseek-ai/dsh-experimental-client-ui-cot-translation#cotTranslation/translate:result",
|
|
4087
|
+
create: _deepseek_ai_dsh_experimental_client_ui_cot_translation_cotTranslation_translate_result$schema
|
|
4088
|
+
},
|
|
4089
|
+
sourceLocation: {
|
|
4090
|
+
"file": "packages/experimental/client-ui-cot-translation/src/index.ts",
|
|
4091
|
+
"line": 64,
|
|
4092
|
+
"column": 9
|
|
4093
|
+
}
|
|
4094
|
+
}]
|
|
4095
|
+
};
|
|
4096
|
+
//#endregion
|
|
4097
|
+
//#region lib/types/client/translation.js
|
|
4098
|
+
/**
|
|
4099
|
+
* Split reasoning into completed paragraphs and request-sized fragments.
|
|
4100
|
+
* @param text - original reasoning, including its exact whitespace.
|
|
4101
|
+
* @param running - whether the final paragraph may still grow.
|
|
4102
|
+
* @param maxTextChars - translator's configured UTF-16 request limit.
|
|
4103
|
+
* @returns whitespace-preserving fragments with completion flags for translation eligibility.
|
|
4104
|
+
*/
|
|
4105
|
+
function reasoningFragments(text, running, maxTextChars) {
|
|
4106
|
+
const result = [];
|
|
4107
|
+
const separator = /\r?\n(?:[\t ]*\r?\n)+/g;
|
|
4108
|
+
let start = 0;
|
|
4109
|
+
while (true) {
|
|
4110
|
+
const match = separator.exec(text);
|
|
4111
|
+
let remaining = text.slice(start, match?.index ?? text.length);
|
|
4112
|
+
while (remaining.length > maxTextChars) {
|
|
4113
|
+
let cut = maxTextChars;
|
|
4114
|
+
if (/[\uD800-\uDBFF]/.test(remaining.charAt(cut - 1))) cut -= 1;
|
|
4115
|
+
const whitespace = remaining.slice(0, cut).search(/\s+\S*$/);
|
|
4116
|
+
if (whitespace > 0) cut = whitespace;
|
|
4117
|
+
const source = remaining.slice(0, cut);
|
|
4118
|
+
remaining = remaining.slice(cut);
|
|
4119
|
+
const suffix = remaining.match(/^\s+/)?.[0] ?? "";
|
|
4120
|
+
remaining = remaining.slice(suffix.length);
|
|
4121
|
+
result.push({
|
|
4122
|
+
text: source,
|
|
4123
|
+
suffix,
|
|
4124
|
+
complete: true
|
|
4125
|
+
});
|
|
4126
|
+
}
|
|
4127
|
+
result.push({
|
|
4128
|
+
text: remaining,
|
|
4129
|
+
suffix: match?.[0] ?? "",
|
|
4130
|
+
complete: match !== null || !running
|
|
4131
|
+
});
|
|
4132
|
+
if (match === null) return result;
|
|
4133
|
+
start = match.index + match[0].length;
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4136
|
+
/** One lifecycle controller owns cancellation, request ordering, and stale-result exclusion. */
|
|
4137
|
+
var ReasoningTranslation = class {
|
|
4138
|
+
selection;
|
|
4139
|
+
maxTextChars;
|
|
4140
|
+
translate;
|
|
4141
|
+
publish;
|
|
4142
|
+
controller = new AbortController();
|
|
4143
|
+
cache = /* @__PURE__ */ new Map();
|
|
4144
|
+
fragments = [];
|
|
4145
|
+
pending = false;
|
|
4146
|
+
failed = false;
|
|
4147
|
+
/**
|
|
4148
|
+
* @param selection - explicit provider and resolved target language.
|
|
4149
|
+
* @param maxTextChars - configured translator request limit.
|
|
4150
|
+
* @param translate - one cancellation-aware Remote request.
|
|
4151
|
+
* @param publish - component-local display state update.
|
|
4152
|
+
*/
|
|
4153
|
+
constructor(selection, maxTextChars, translate, publish) {
|
|
4154
|
+
this.selection = selection;
|
|
4155
|
+
this.maxTextChars = maxTextChars;
|
|
4156
|
+
this.translate = translate;
|
|
4157
|
+
this.publish = publish;
|
|
4158
|
+
}
|
|
4159
|
+
/**
|
|
4160
|
+
* Adopt the current source and enqueue newly completed fragments.
|
|
4161
|
+
* @param text - current original reasoning.
|
|
4162
|
+
* @param running - whether its tail is still streaming.
|
|
4163
|
+
*/
|
|
4164
|
+
update(text, running) {
|
|
4165
|
+
this.fragments = reasoningFragments(text, running, this.maxTextChars);
|
|
4166
|
+
this.emit();
|
|
4167
|
+
this.run();
|
|
4168
|
+
}
|
|
4169
|
+
/** Retry untranslated fragments after a failed request. */
|
|
4170
|
+
retry() {
|
|
4171
|
+
this.failed = false;
|
|
4172
|
+
this.run();
|
|
4173
|
+
}
|
|
4174
|
+
/** Abort the disclosure's requests and suppress all later publications. */
|
|
4175
|
+
dispose() {
|
|
4176
|
+
this.controller.abort();
|
|
4177
|
+
}
|
|
4178
|
+
isDisposed() {
|
|
4179
|
+
return this.controller.signal.aborted;
|
|
4180
|
+
}
|
|
4181
|
+
emit() {
|
|
4182
|
+
if (this.isDisposed()) return;
|
|
4183
|
+
const text = this.fragments.map((fragment) => {
|
|
4184
|
+
return (fragment.complete ? this.cache.get(fragment.text) ?? fragment.text : fragment.text) + fragment.suffix;
|
|
4185
|
+
}).join("");
|
|
4186
|
+
this.publish({
|
|
4187
|
+
text,
|
|
4188
|
+
pending: this.pending,
|
|
4189
|
+
failed: this.failed
|
|
4190
|
+
});
|
|
4191
|
+
}
|
|
4192
|
+
async run() {
|
|
4193
|
+
if (this.pending || this.failed || this.isDisposed()) return;
|
|
4194
|
+
let next = this.fragments.find((fragment) => fragment.complete && fragment.text.trim() !== "" && !this.cache.has(fragment.text));
|
|
4195
|
+
if (next === void 0) return;
|
|
4196
|
+
this.pending = true;
|
|
4197
|
+
this.emit();
|
|
4198
|
+
try {
|
|
4199
|
+
while (next !== void 0) {
|
|
4200
|
+
const translated = await this.translate({
|
|
4201
|
+
...this.selection,
|
|
4202
|
+
text: next.text
|
|
4203
|
+
}, this.controller.signal);
|
|
4204
|
+
if (this.isDisposed()) return;
|
|
4205
|
+
this.cache.set(next.text, translated);
|
|
4206
|
+
this.emit();
|
|
4207
|
+
next = this.fragments.find((fragment) => fragment.complete && fragment.text.trim() !== "" && !this.cache.has(fragment.text));
|
|
4208
|
+
}
|
|
4209
|
+
} catch (_error) {
|
|
4210
|
+
if (!this.isDisposed()) this.failed = true;
|
|
4211
|
+
} finally {
|
|
4212
|
+
this.pending = false;
|
|
4213
|
+
this.emit();
|
|
4214
|
+
}
|
|
4215
|
+
}
|
|
4216
|
+
};
|
|
4217
|
+
//#endregion
|
|
4218
|
+
//#region \0dsh-css:/Users/songli/deepseek-harness/packages/experimental/client-ui-cot-translation/src/client/Translation.module.css.mjs
|
|
4219
|
+
const css = ".CUpHxa_toolbar{flex-wrap:wrap;align-items:center;gap:4px;min-height:28px;margin-bottom:4px;display:flex}.CUpHxa_toolbar>.CUpHxa_viewToggle{color:var(--dsw-alias-label-tertiary);margin-inline-start:-10px}.CUpHxa_toolbar>.CUpHxa_viewToggle:hover:not(:disabled),.CUpHxa_toolbar>.CUpHxa_viewToggle:active:not(:disabled),.CUpHxa_toolbar>.CUpHxa_viewToggle:focus-visible:not(:disabled){color:var(--dsw-alias-label-secondary)}.CUpHxa_failure{color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size-secondary,13px)}.CUpHxa_field{flex-direction:column;gap:8px;display:flex}.CUpHxa_field label{color:var(--dsw-alias-label-primary);font-size:13px}.CUpHxa_field select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-base);min-height:32px;color:var(--dsw-alias-label-primary);font:inherit;padding:0 8px}.CUpHxa_notice{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:20px}.CUpHxa_spinner{animation:1s linear infinite CUpHxa_cot-translation-spin}@keyframes CUpHxa_cot-translation-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.CUpHxa_spinner{animation:none}}";
|
|
4220
|
+
const tagId = "@deepseek-ai/dsh-experimental-client-ui-cot-translation/Translation.module.css";
|
|
4221
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
4222
|
+
const tag = document.createElement("style");
|
|
4223
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-experimental-client-ui-cot-translation";
|
|
4224
|
+
tag.dataset.pluginCss = tagId;
|
|
4225
|
+
tag.textContent = css;
|
|
4226
|
+
document.head.appendChild(tag);
|
|
4227
|
+
}
|
|
4228
|
+
var Translation_module_css_default = {
|
|
4229
|
+
"cot-translation-spin": "CUpHxa_cot-translation-spin",
|
|
4230
|
+
"failure": "CUpHxa_failure",
|
|
4231
|
+
"field": "CUpHxa_field",
|
|
4232
|
+
"notice": "CUpHxa_notice",
|
|
4233
|
+
"spinner": "CUpHxa_spinner",
|
|
4234
|
+
"toolbar": "CUpHxa_toolbar",
|
|
4235
|
+
"viewToggle": "CUpHxa_viewToggle"
|
|
4236
|
+
};
|
|
4237
|
+
//#endregion
|
|
4238
|
+
//#region lib/types/client/TranslationBody.js
|
|
4239
|
+
/** Translation controls for one expanded reasoning body. */
|
|
4240
|
+
/**
|
|
4241
|
+
* Render translated reasoning, retaining the complete original until a failed request is retried.
|
|
4242
|
+
* @param props - original reasoning, translation preferences, and cancellation-aware callback.
|
|
4243
|
+
* @returns compact Markdown and translation status with a retry action on failure.
|
|
4244
|
+
*/
|
|
4245
|
+
function TranslationBody(props) {
|
|
4246
|
+
const { text, running, translate, t, renderFactorySlot } = props;
|
|
4247
|
+
const preferences = props.usePreferences((value) => value);
|
|
4248
|
+
const locale = props.useTranslationLocale((value) => value.active);
|
|
4249
|
+
const maxTextChars = props.useTranslationLimit((value) => value);
|
|
4250
|
+
const targetLanguage = preferences.targetLanguage === "auto" ? locale : preferences.targetLanguage;
|
|
4251
|
+
const [state, setState] = (0, react.useState)({
|
|
4252
|
+
text,
|
|
4253
|
+
pending: false,
|
|
4254
|
+
failed: false
|
|
4255
|
+
});
|
|
4256
|
+
const [original, setOriginal] = (0, react.useState)(false);
|
|
4257
|
+
const translation = (0, react.useRef)();
|
|
4258
|
+
(0, react.useEffect)(() => {
|
|
4259
|
+
const controller = new ReasoningTranslation({
|
|
4260
|
+
provider: preferences.provider,
|
|
4261
|
+
targetLanguage
|
|
4262
|
+
}, maxTextChars, translate, setState);
|
|
4263
|
+
translation.current = controller;
|
|
4264
|
+
return () => {
|
|
4265
|
+
controller.dispose();
|
|
4266
|
+
translation.current = void 0;
|
|
4267
|
+
};
|
|
4268
|
+
}, [
|
|
4269
|
+
preferences.provider,
|
|
4270
|
+
targetLanguage,
|
|
4271
|
+
maxTextChars,
|
|
4272
|
+
translate
|
|
4273
|
+
]);
|
|
4274
|
+
(0, react.useEffect)(() => {
|
|
4275
|
+
translation.current?.update(text, running);
|
|
4276
|
+
}, [
|
|
4277
|
+
text,
|
|
4278
|
+
running,
|
|
4279
|
+
preferences.provider,
|
|
4280
|
+
targetLanguage,
|
|
4281
|
+
maxTextChars,
|
|
4282
|
+
translate
|
|
4283
|
+
]);
|
|
4284
|
+
const labels = (0, react.useMemo)(() => ({
|
|
4285
|
+
code: {
|
|
4286
|
+
copyLabel: t("copy"),
|
|
4287
|
+
copiedLabel: t("copied"),
|
|
4288
|
+
toolbarLabels: {
|
|
4289
|
+
codeLabel: t("codeTitle"),
|
|
4290
|
+
wrapLabel: t("wrap"),
|
|
4291
|
+
unwrapLabel: t("unwrap")
|
|
4292
|
+
}
|
|
4293
|
+
},
|
|
4294
|
+
footnotes: t("footnotes")
|
|
4295
|
+
}), [t]);
|
|
4296
|
+
const showOriginal = original || state.failed;
|
|
4297
|
+
const actionLabel = t(showOriginal ? "translation" : "original");
|
|
4298
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4299
|
+
"data-cot-translation": "true",
|
|
4300
|
+
"data-translation-state": state.failed ? "failed" : state.pending ? "pending" : "ready",
|
|
4301
|
+
"data-translation-view": showOriginal ? "original" : "translated",
|
|
4302
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
4303
|
+
className: Translation_module_css_default.toolbar,
|
|
4304
|
+
children: [
|
|
4305
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4306
|
+
className: Translation_module_css_default.viewToggle,
|
|
4307
|
+
size: "sm",
|
|
4308
|
+
variant: "ghost",
|
|
4309
|
+
disabled: state.failed,
|
|
4310
|
+
onClick: () => {
|
|
4311
|
+
setOriginal(!showOriginal);
|
|
4312
|
+
},
|
|
4313
|
+
children: actionLabel
|
|
4314
|
+
}),
|
|
4315
|
+
state.pending && (0, react_jsx_runtime.jsx)("span", {
|
|
4316
|
+
role: "status",
|
|
4317
|
+
"aria-label": t("translating"),
|
|
4318
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, {
|
|
4319
|
+
size: 14,
|
|
4320
|
+
className: Translation_module_css_default.spinner
|
|
4321
|
+
})
|
|
4322
|
+
}),
|
|
4323
|
+
state.failed && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4324
|
+
className: Translation_module_css_default.failure,
|
|
4325
|
+
role: "status",
|
|
4326
|
+
children: t("failed")
|
|
4327
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4328
|
+
size: "sm",
|
|
4329
|
+
variant: "ghost",
|
|
4330
|
+
onClick: () => {
|
|
4331
|
+
translation.current?.retry();
|
|
4332
|
+
},
|
|
4333
|
+
children: t("retry")
|
|
4334
|
+
})] })
|
|
4335
|
+
]
|
|
4336
|
+
}), renderFactorySlot("conversation.chat.reasoning.content", {
|
|
4337
|
+
text: showOriginal ? text : state.text,
|
|
4338
|
+
running,
|
|
4339
|
+
labels
|
|
4340
|
+
})]
|
|
4341
|
+
});
|
|
4342
|
+
}
|
|
4343
|
+
//#endregion
|
|
4344
|
+
//#region lib/types/client/locales.js
|
|
4345
|
+
/** Dictionary namespace for this plugin. */
|
|
4346
|
+
const NS = "cotTranslation";
|
|
4347
|
+
/** English copy and key source. */
|
|
4348
|
+
const en = {
|
|
4349
|
+
provider: "Translation service",
|
|
4350
|
+
google: "Google",
|
|
4351
|
+
bing: "Bing",
|
|
4352
|
+
deepseekAccount: "DeepSeek Flash — Account (paid)",
|
|
4353
|
+
deepseekOfficial: "DeepSeek Flash — Official API (paid)",
|
|
4354
|
+
providerUnavailableOption: "{provider} — unavailable",
|
|
4355
|
+
providerUnavailable: "This provider is unavailable. Configure your DeepSeek account or Official API provider, or choose an available service.",
|
|
4356
|
+
paidNotice: "Each uncached fragment sends a separate paid DeepSeek Flash request through the selected account or Official API credentials. Reopening reasoning reuses saved results; changing the provider, language, source text, or request settings may send a new paid request.",
|
|
4357
|
+
anonymousNotice: "Bing and Google need no translation login or API key. Their anonymous endpoints may reject or limit requests.",
|
|
4358
|
+
targetLanguage: "Target language",
|
|
4359
|
+
targetLanguageHint: "auto follows the UI language; language codes such as zh, en, and ja also work.",
|
|
4360
|
+
privacy: "Expanded reasoning is sent to the selected service. It may contain private code or conversation details.",
|
|
4361
|
+
translation: "View translation",
|
|
4362
|
+
original: "View original",
|
|
4363
|
+
retry: "Retry",
|
|
4364
|
+
failed: "Translation failed. Showing the original.",
|
|
4365
|
+
translating: "Translating reasoning",
|
|
4366
|
+
invalidProvider: "Choose a translation service.",
|
|
4367
|
+
invalidLanguage: "Enter auto or a language code, such as zh, en, or ja.",
|
|
4368
|
+
overridden: "Overridden",
|
|
4369
|
+
reset: "Reset to default",
|
|
4370
|
+
unavailable: "Translation preferences are unavailable.",
|
|
4371
|
+
readOnly: "This deployment stores settings read-only.",
|
|
4372
|
+
saveFailed: "The deployment did not accept these values; they were left for you to correct.",
|
|
4373
|
+
save: "Save",
|
|
4374
|
+
saving: "Saving…",
|
|
4375
|
+
copy: "Copy",
|
|
4376
|
+
copied: "Copied",
|
|
4377
|
+
codeTitle: "Code block",
|
|
4378
|
+
wrap: "Wrap lines",
|
|
4379
|
+
unwrap: "Unwrap lines",
|
|
4380
|
+
footnotes: "Footnotes"
|
|
4381
|
+
};
|
|
4382
|
+
/** Chinese copy. */
|
|
4383
|
+
const zh = {
|
|
4384
|
+
provider: "翻译服务",
|
|
4385
|
+
google: "Google",
|
|
4386
|
+
bing: "Bing",
|
|
4387
|
+
deepseekAccount: "DeepSeek Flash · 账号(付费)",
|
|
4388
|
+
deepseekOfficial: "DeepSeek Flash · 官方 API(付费)",
|
|
4389
|
+
providerUnavailableOption: "{provider} — 不可用",
|
|
4390
|
+
providerUnavailable: "此服务暂不可用,请配置 DeepSeek 账号或官方 API 服务,或选择可用的翻译服务",
|
|
4391
|
+
paidNotice: "每个未缓存片段都会通过所选账号或官方 API 凭据单独发送一次付费的 DeepSeek Flash 请求;重新展开会复用已保存的译文,更改服务、语言、原文或请求设置可能发送新的付费请求",
|
|
4392
|
+
anonymousNotice: "Bing 和 Google 翻译无需额外登录或 API key,但匿名接口可能拒绝或限制请求",
|
|
4393
|
+
targetLanguage: "目标语言",
|
|
4394
|
+
targetLanguageHint: "auto 使用界面语言;也可填写语言代码,例如 zh、en、ja",
|
|
4395
|
+
privacy: "展开的思考内容会发送给所选翻译服务,可能包含私有代码或对话细节。",
|
|
4396
|
+
translation: "查看译文",
|
|
4397
|
+
original: "查看原文",
|
|
4398
|
+
retry: "重试",
|
|
4399
|
+
failed: "翻译暂不可用,已显示原文",
|
|
4400
|
+
translating: "正在翻译思考内容",
|
|
4401
|
+
invalidProvider: "请选择翻译服务",
|
|
4402
|
+
invalidLanguage: "请填写 auto 或语言代码,例如 zh、en、ja",
|
|
4403
|
+
overridden: "已覆盖",
|
|
4404
|
+
reset: "恢复默认",
|
|
4405
|
+
unavailable: "翻译设置暂不可用",
|
|
4406
|
+
readOnly: "本部署的设置为只读",
|
|
4407
|
+
saveFailed: "本部署没有接受这些值,已保留供你修改",
|
|
4408
|
+
save: "保存",
|
|
4409
|
+
saving: "保存中…",
|
|
4410
|
+
copy: "复制",
|
|
4411
|
+
copied: "已复制",
|
|
4412
|
+
codeTitle: "代码块",
|
|
4413
|
+
wrap: "自动换行",
|
|
4414
|
+
unwrap: "不换行",
|
|
4415
|
+
footnotes: "脚注"
|
|
4416
|
+
};
|
|
4417
|
+
/**
|
|
4418
|
+
* Read shared form chrome from the plugin dictionary.
|
|
4419
|
+
* @param t - current locale reader.
|
|
4420
|
+
* @returns localized form labels.
|
|
4421
|
+
*/
|
|
4422
|
+
function formLabels(t) {
|
|
4423
|
+
return {
|
|
4424
|
+
unavailable: t("unavailable"),
|
|
4425
|
+
readOnly: t("readOnly"),
|
|
4426
|
+
saveFailed: t("saveFailed"),
|
|
4427
|
+
save: t("save"),
|
|
4428
|
+
saving: t("saving")
|
|
4429
|
+
};
|
|
4430
|
+
}
|
|
4431
|
+
//#endregion
|
|
4432
|
+
//#region lib/types/client/TranslationSettings.js
|
|
4433
|
+
function providerLabel(provider, t) {
|
|
4434
|
+
switch (provider) {
|
|
4435
|
+
case "bing": return t("bing");
|
|
4436
|
+
case "google": return t("google");
|
|
4437
|
+
case "deepseek-account": return t("deepseekAccount");
|
|
4438
|
+
case "deepseek-official": return t("deepseekOfficial");
|
|
4439
|
+
default: return provider;
|
|
4440
|
+
}
|
|
4441
|
+
}
|
|
4442
|
+
/**
|
|
4443
|
+
* Render staged translation preferences and name which text leaves the Host.
|
|
4444
|
+
* @param props - current draft fields, accepted-value metadata, and save actions.
|
|
4445
|
+
* @returns the bundle's translation preferences.
|
|
4446
|
+
*/
|
|
4447
|
+
function TranslationSettings(props) {
|
|
4448
|
+
const { t } = props;
|
|
4449
|
+
const providerId = (0, react.useId)(), languageId = (0, react.useId)();
|
|
4450
|
+
const state = props.useTranslationForm((value) => value);
|
|
4451
|
+
const availableProviders = props.useAvailableProviders((value) => value);
|
|
4452
|
+
(0, react.useEffect)(() => {
|
|
4453
|
+
props.refreshProviders();
|
|
4454
|
+
}, [props.refreshProviders]);
|
|
4455
|
+
const missingProvider = state.provider.text !== "" && !availableProviders.some((provider) => provider === state.provider.text);
|
|
4456
|
+
const paid = state.provider.text === "deepseek-account" || state.provider.text === "deepseek-official";
|
|
4457
|
+
const disabled = !state.writable || state.saving;
|
|
4458
|
+
return (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.SettingsForm, {
|
|
4459
|
+
labels: formLabels(t),
|
|
4460
|
+
state,
|
|
4461
|
+
onSave: props.save,
|
|
4462
|
+
onDiscard: props.discard,
|
|
4463
|
+
children: [
|
|
4464
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
4465
|
+
className: Translation_module_css_default.notice,
|
|
4466
|
+
children: t("privacy")
|
|
4467
|
+
}),
|
|
4468
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
4469
|
+
className: Translation_module_css_default.notice,
|
|
4470
|
+
children: t(paid ? "paidNotice" : "anonymousNotice")
|
|
4471
|
+
}),
|
|
4472
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
4473
|
+
className: Translation_module_css_default.field,
|
|
4474
|
+
children: [
|
|
4475
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
4476
|
+
className: Translation_module_css_default.toolbar,
|
|
4477
|
+
children: [(0, react_jsx_runtime.jsx)("label", {
|
|
4478
|
+
htmlFor: providerId,
|
|
4479
|
+
children: t("provider")
|
|
4480
|
+
}), state.provider.overridden && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
4481
|
+
tone: "neutral",
|
|
4482
|
+
children: t("overridden")
|
|
4483
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4484
|
+
size: "sm",
|
|
4485
|
+
disabled,
|
|
4486
|
+
onClick: () => {
|
|
4487
|
+
props.resetField("provider");
|
|
4488
|
+
},
|
|
4489
|
+
children: t("reset")
|
|
4490
|
+
})] })]
|
|
4491
|
+
}),
|
|
4492
|
+
(0, react_jsx_runtime.jsxs)("select", {
|
|
4493
|
+
id: providerId,
|
|
4494
|
+
value: state.provider.text,
|
|
4495
|
+
disabled,
|
|
4496
|
+
"aria-invalid": state.provider.invalid || void 0,
|
|
4497
|
+
onChange: (event) => {
|
|
4498
|
+
props.edit("provider", event.target.value);
|
|
4499
|
+
},
|
|
4500
|
+
children: [missingProvider && (0, react_jsx_runtime.jsx)("option", {
|
|
4501
|
+
value: state.provider.text,
|
|
4502
|
+
disabled: true,
|
|
4503
|
+
children: t("providerUnavailableOption", { provider: providerLabel(state.provider.text, t) })
|
|
4504
|
+
}), availableProviders.map((provider) => (0, react_jsx_runtime.jsx)("option", {
|
|
4505
|
+
value: provider,
|
|
4506
|
+
children: providerLabel(provider, t)
|
|
4507
|
+
}, provider))]
|
|
4508
|
+
}),
|
|
4509
|
+
state.provider.invalid && (0, react_jsx_runtime.jsx)("p", {
|
|
4510
|
+
role: "status",
|
|
4511
|
+
children: t("invalidProvider")
|
|
4512
|
+
}),
|
|
4513
|
+
missingProvider && !state.provider.invalid && (0, react_jsx_runtime.jsx)("p", {
|
|
4514
|
+
role: "status",
|
|
4515
|
+
className: Translation_module_css_default.notice,
|
|
4516
|
+
children: t("providerUnavailable")
|
|
4517
|
+
})
|
|
4518
|
+
]
|
|
4519
|
+
}),
|
|
4520
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SettingsValueField, {
|
|
4521
|
+
id: languageId,
|
|
4522
|
+
label: t("targetLanguage"),
|
|
4523
|
+
hint: t("targetLanguageHint"),
|
|
4524
|
+
...state.targetLanguage,
|
|
4525
|
+
overriddenLabel: t("overridden"),
|
|
4526
|
+
resetLabel: t("reset"),
|
|
4527
|
+
invalidLabel: t("invalidLanguage"),
|
|
4528
|
+
disabled,
|
|
4529
|
+
onEdit: (value) => {
|
|
4530
|
+
props.edit("targetLanguage", value);
|
|
4531
|
+
},
|
|
4532
|
+
onReset: () => {
|
|
4533
|
+
props.resetField("targetLanguage");
|
|
4534
|
+
}
|
|
4535
|
+
})
|
|
4536
|
+
]
|
|
4537
|
+
});
|
|
4538
|
+
}
|
|
4539
|
+
//#endregion
|
|
4540
|
+
//#region lib/types/preferences.js
|
|
4541
|
+
/** Language preference accepted by both Host configuration and browser drafts. */
|
|
4542
|
+
const LANGUAGE_PREFERENCE_PATTERN = /^(?:auto|[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*)$/;
|
|
4543
|
+
/** Explicit provider choices accepted by Host configuration and browser drafts. */
|
|
4544
|
+
const PROVIDER_PREFERENCES = [
|
|
4545
|
+
"bing",
|
|
4546
|
+
"google",
|
|
4547
|
+
"deepseek-account",
|
|
4548
|
+
"deepseek-official"
|
|
4549
|
+
];
|
|
4550
|
+
//#endregion
|
|
4551
|
+
//#region lib/types/client/preferences-form.js
|
|
4552
|
+
/** Staged translation preferences using the shared Plugins form model. */
|
|
4553
|
+
/** Stages provider and language edits until the reader saves them. */
|
|
4554
|
+
var TranslationPreferencesForm = class {
|
|
4555
|
+
form;
|
|
4556
|
+
state;
|
|
4557
|
+
/** @param scope - Host-backed configuration form for this plugin. */
|
|
4558
|
+
constructor(scope) {
|
|
4559
|
+
this.form = new _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel(scope, [{
|
|
4560
|
+
...(0, _deepseek_ai_dsh_client_ui_primitives.settingsTextField)("provider"),
|
|
4561
|
+
parse: (text) => {
|
|
4562
|
+
const provider = text.trim();
|
|
4563
|
+
return provider === "" ? { kind: "clear" } : PROVIDER_PREFERENCES.some((choice) => choice === provider) ? {
|
|
4564
|
+
kind: "set",
|
|
4565
|
+
value: provider
|
|
4566
|
+
} : void 0;
|
|
4567
|
+
}
|
|
4568
|
+
}, {
|
|
4569
|
+
...(0, _deepseek_ai_dsh_client_ui_primitives.settingsTextField)("targetLanguage"),
|
|
4570
|
+
parse: (text) => LANGUAGE_PREFERENCE_PATTERN.test(text.trim()) ? {
|
|
4571
|
+
kind: "set",
|
|
4572
|
+
value: text.trim()
|
|
4573
|
+
} : void 0
|
|
4574
|
+
}]);
|
|
4575
|
+
this.state = this.form.bind(() => ({
|
|
4576
|
+
...this.form.shell(),
|
|
4577
|
+
provider: this.form.field("provider"),
|
|
4578
|
+
targetLanguage: this.form.field("targetLanguage")
|
|
4579
|
+
}));
|
|
4580
|
+
}
|
|
4581
|
+
/**
|
|
4582
|
+
* Build the registration face for the preferences form.
|
|
4583
|
+
* @returns draft observable and shared edit/save actions.
|
|
4584
|
+
*/
|
|
4585
|
+
inject() {
|
|
4586
|
+
return {
|
|
4587
|
+
hooks: { translationForm: this.state },
|
|
4588
|
+
...this.form.actions()
|
|
4589
|
+
};
|
|
4590
|
+
}
|
|
4591
|
+
/** Release the accepted-preference subscription. */
|
|
4592
|
+
dispose() {
|
|
4593
|
+
this.form.dispose();
|
|
4594
|
+
}
|
|
4595
|
+
};
|
|
4596
|
+
//#endregion
|
|
4597
|
+
//#region lib/types/client/mount.js
|
|
4598
|
+
/** Services required to mount the optional Remote and UI contributions. */
|
|
4599
|
+
const inject = [
|
|
4600
|
+
"remote",
|
|
4601
|
+
"slots",
|
|
4602
|
+
"locale",
|
|
4603
|
+
"configForms"
|
|
4604
|
+
];
|
|
4605
|
+
async function registerUi(ctx, lifetime) {
|
|
4606
|
+
let readTask;
|
|
4607
|
+
let updating;
|
|
4608
|
+
let revision = 0, lastReadRevision = -1, acceptedRevision = -1;
|
|
4609
|
+
const isDisposed = () => lifetime.signal.aborted || ctx.fiber.uid === null;
|
|
4610
|
+
ctx.effect(() => async () => {
|
|
4611
|
+
lifetime.abort();
|
|
4612
|
+
await Promise.allSettled([readTask, updating]);
|
|
4613
|
+
}, "cot-translation: metadata queries");
|
|
4614
|
+
const invalidate = () => {
|
|
4615
|
+
revision += 1;
|
|
4616
|
+
refresh();
|
|
4617
|
+
};
|
|
4618
|
+
ctx.effect(() => [
|
|
4619
|
+
ctx.remote.$on("settings/document-updated", invalidate),
|
|
4620
|
+
ctx.remote.$on("llm/adapters-updated", invalidate),
|
|
4621
|
+
ctx.remote.$on("deepseek-account/session-expired", invalidate),
|
|
4622
|
+
ctx.remote.$on("deepseek-account/model-sign-in-required", invalidate),
|
|
4623
|
+
ctx.remote.$on("credentials/record-updated", invalidate),
|
|
4624
|
+
ctx.remote.$on("credentials/reference-updated", invalidate)
|
|
4625
|
+
]);
|
|
4626
|
+
ctx.on("connection/reset", invalidate);
|
|
4627
|
+
const read = async () => {
|
|
4628
|
+
while (true) {
|
|
4629
|
+
const observed = revision;
|
|
4630
|
+
lastReadRevision = observed;
|
|
4631
|
+
readTask = ctx.remote.cotTranslation.limits(lifetime.signal);
|
|
4632
|
+
const result = await readTask;
|
|
4633
|
+
if (isDisposed()) return void 0;
|
|
4634
|
+
if (observed === revision) return result;
|
|
4635
|
+
}
|
|
4636
|
+
};
|
|
4637
|
+
let initial;
|
|
4638
|
+
try {
|
|
4639
|
+
initial = await read();
|
|
4640
|
+
} catch (error) {
|
|
4641
|
+
if (isDisposed()) return;
|
|
4642
|
+
throw error;
|
|
4643
|
+
}
|
|
4644
|
+
if (initial === void 0) return;
|
|
4645
|
+
if (!initial.ok) throw initial.error;
|
|
4646
|
+
const preferences = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(initial.value.preferences);
|
|
4647
|
+
const translationLimit = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(initial.value.maxTextChars);
|
|
4648
|
+
const availableProviders = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(initial.value.availableProviders);
|
|
4649
|
+
acceptedRevision = lastReadRevision;
|
|
4650
|
+
function refresh() {
|
|
4651
|
+
if (updating !== void 0 || acceptedRevision < 0 || isDisposed()) return;
|
|
4652
|
+
updating = (async () => {
|
|
4653
|
+
try {
|
|
4654
|
+
const result = await read();
|
|
4655
|
+
if (result?.ok) {
|
|
4656
|
+
preferences.set(result.value.preferences);
|
|
4657
|
+
translationLimit.set(result.value.maxTextChars);
|
|
4658
|
+
availableProviders.set(result.value.availableProviders);
|
|
4659
|
+
acceptedRevision = lastReadRevision;
|
|
4660
|
+
}
|
|
4661
|
+
} catch (_error) {
|
|
4662
|
+
if (!isDisposed()) ctx.logger.warn("cot-translation: could not refresh Host preferences and request limits");
|
|
4663
|
+
}
|
|
4664
|
+
})().finally(() => {
|
|
4665
|
+
updating = void 0;
|
|
4666
|
+
if (revision !== lastReadRevision && !isDisposed()) refresh();
|
|
4667
|
+
});
|
|
4668
|
+
}
|
|
4669
|
+
const scope = ctx.configForms.get("cot-translation");
|
|
4670
|
+
ctx.effect(() => scope.subscribe(invalidate));
|
|
4671
|
+
ctx.effect(() => ctx.locale.register(NS, {
|
|
4672
|
+
en,
|
|
4673
|
+
zh
|
|
4674
|
+
}));
|
|
4675
|
+
const form = new TranslationPreferencesForm(scope);
|
|
4676
|
+
ctx.effect(() => () => {
|
|
4677
|
+
form.dispose();
|
|
4678
|
+
});
|
|
4679
|
+
const injected = (sessionId) => ({
|
|
4680
|
+
hooks: {
|
|
4681
|
+
preferences,
|
|
4682
|
+
translationLocale: ctx.locale,
|
|
4683
|
+
translationLimit
|
|
4684
|
+
},
|
|
4685
|
+
translate: async (request, signal) => {
|
|
4686
|
+
if (acceptedRevision !== revision) refresh();
|
|
4687
|
+
while (updating !== void 0) await updating;
|
|
4688
|
+
signal.throwIfAborted();
|
|
4689
|
+
const accepted = preferences.getSnapshot();
|
|
4690
|
+
if (isDisposed() || acceptedRevision !== revision || request.provider !== accepted.provider || accepted.targetLanguage !== "auto" && request.targetLanguage !== accepted.targetLanguage || request.text.length > translationLimit.getSnapshot()) throw new Error("Translation preferences or limits changed");
|
|
4691
|
+
const result = await ctx.remote.cotTranslation.translate({
|
|
4692
|
+
...request,
|
|
4693
|
+
sessionId
|
|
4694
|
+
}, signal);
|
|
4695
|
+
if (!result.ok) throw result.error;
|
|
4696
|
+
return result.value;
|
|
4697
|
+
}
|
|
4698
|
+
});
|
|
4699
|
+
ctx.slots.inject("conversation.chat.reasoning.body", () => ctx.slots.register({
|
|
4700
|
+
name: "conversation.chat.reasoning.body",
|
|
4701
|
+
locale: NS,
|
|
4702
|
+
inject: injected
|
|
4703
|
+
}, TranslationBody));
|
|
4704
|
+
ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
|
|
4705
|
+
name: "plugins.bundle.config",
|
|
4706
|
+
key: "@deepseek-ai/dsh-experimental-cot-translation-bundle",
|
|
4707
|
+
locale: NS,
|
|
4708
|
+
inject: () => {
|
|
4709
|
+
const face = form.inject();
|
|
4710
|
+
return {
|
|
4711
|
+
...face,
|
|
4712
|
+
hooks: {
|
|
4713
|
+
...face.hooks,
|
|
4714
|
+
availableProviders
|
|
4715
|
+
},
|
|
4716
|
+
refreshProviders: invalidate
|
|
4717
|
+
};
|
|
4718
|
+
}
|
|
4719
|
+
}, TranslationSettings));
|
|
4720
|
+
}
|
|
4721
|
+
/**
|
|
4722
|
+
* Mount Session-bound translation and withdraw UI before its generated Remote.
|
|
4723
|
+
* @param ctx - Client plugin lifetime.
|
|
4724
|
+
* @param contribution - generated controller Remote definitions.
|
|
4725
|
+
* @returns disposer that removes both contributions.
|
|
4726
|
+
*/
|
|
4727
|
+
async function mountTranslation(ctx, contribution) {
|
|
4728
|
+
const lifetime = new AbortController();
|
|
4729
|
+
ctx.on("internal/plugin", (fiber) => {
|
|
4730
|
+
if (fiber === ctx.fiber && fiber.uid === null) lifetime.abort();
|
|
4731
|
+
});
|
|
4732
|
+
ctx.effect(() => () => {
|
|
4733
|
+
lifetime.abort();
|
|
4734
|
+
}, "cot-translation: query cancellation");
|
|
4735
|
+
const unmountRemote = await ctx.remote.$mount(contribution);
|
|
4736
|
+
const ui = ctx.inject(["remote.cotTranslation", ...inject.slice(1)], (child) => registerUi(child, lifetime));
|
|
4737
|
+
try {
|
|
4738
|
+
await ui;
|
|
4739
|
+
} catch (error) {
|
|
4740
|
+
await ui.dispose();
|
|
4741
|
+
await unmountRemote();
|
|
4742
|
+
throw error;
|
|
4743
|
+
}
|
|
4744
|
+
return async () => {
|
|
4745
|
+
await ui.dispose();
|
|
4746
|
+
await unmountRemote();
|
|
4747
|
+
};
|
|
4748
|
+
}
|
|
4749
|
+
//#endregion
|
|
4750
|
+
//#region lib/types/client/index.js
|
|
4751
|
+
/**
|
|
4752
|
+
* Mount the experimental reasoning presentation and its Remote methods.
|
|
4753
|
+
* @param ctx - browser plugin context.
|
|
4754
|
+
* @returns disposer joining UI and Remote withdrawal.
|
|
4755
|
+
*/
|
|
4756
|
+
async function apply(ctx) {
|
|
4757
|
+
return await mountTranslation(ctx, TYPERT_REMOTE);
|
|
4758
|
+
}
|
|
4759
|
+
//#endregion
|
|
4760
|
+
exports.apply = apply;
|
|
4761
|
+
exports.inject = inject;
|
|
4762
|
+
return module.exports;
|
|
4763
|
+
}
|
|
4764
|
+
});
|
|
4765
|
+
|
|
4766
|
+
//# sourceMappingURL=client.js.map
|