aws-runtime-bridge 1.9.135 → 1.9.139
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/dist/adapter/AcodeSdkAdapter.d.ts +10 -0
- package/dist/adapter/AcodeSdkAdapter.js +5 -5
- package/dist/adapter/ClaudeSdkAdapter.js +3 -3
- package/dist/adapter/CodexSdkAdapter.js +3 -3
- package/dist/adapter/OpencodeSdkAdapter.js +3 -3
- package/dist/browser/browser-pool.js +1 -1
- package/dist/browser/built-in-browser-tools.d.ts +1 -2
- package/dist/browser/built-in-browser-tools.js +1 -1
- package/dist/browser/ws-server.js +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.js +2 -2
- package/dist/index.js +1 -1
- package/dist/middleware/auth.js +1 -1
- package/dist/remote-desktop/computer-control.d.ts +1 -1
- package/dist/remote-desktop/index.d.ts +1 -1
- package/dist/remote-desktop/index.js +2 -2
- package/dist/remote-desktop/session-manager.d.ts +2 -2
- package/dist/remote-desktop/session-manager.js +1 -1
- package/dist/remote-desktop/system-backend.js +3 -3
- package/dist/routes/ai-sources.js +1 -1
- package/dist/routes/background-tasks.js +1 -1
- package/dist/routes/browser-listeners.js +1 -1
- package/dist/routes/capabilities.d.ts +2 -0
- package/dist/routes/capabilities.js +2 -0
- package/dist/routes/dashboard.js +1 -1
- package/dist/routes/file-change-diff.js +3 -3
- package/dist/routes/file-diff-rollback.js +1 -1
- package/dist/routes/file-snapshot.js +1 -1
- package/dist/routes/git.js +1 -1
- package/dist/routes/instance.d.ts +0 -1
- package/dist/routes/instance.js +1 -1
- package/dist/routes/launch.js +1 -1
- package/dist/routes/mcp-extra.d.ts +2 -0
- package/dist/routes/mcp-extra.js +3 -0
- package/dist/routes/mcp.d.ts +1 -0
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/plugins.d.ts +2 -0
- package/dist/routes/plugins.js +2 -0
- package/dist/routes/properties.js +1 -1
- package/dist/routes/pty.d.ts +1 -1
- package/dist/routes/pty.js +1 -1
- package/dist/routes/runtime-binding.js +1 -1
- package/dist/routes/skills.d.ts +1 -0
- package/dist/routes/skills.js +1 -1
- package/dist/routes/sub-agents.js +1 -1
- package/dist/routes/task-context.js +1 -1
- package/dist/routes/terminal.js +25 -25
- package/dist/routes/yml.js +1 -1
- package/dist/services/access-control.js +1 -1
- package/dist/services/acode-bg-manager.js +1 -1
- package/dist/services/agent-capability-sync.d.ts +7 -0
- package/dist/services/agent-capability-sync.js +2 -0
- package/dist/services/agent-process-manager.d.ts +1 -1
- package/dist/services/agent-process-manager.js +1 -1
- package/{package/cc-switch-sdk/dist → dist}/services/ai-config-service.d.ts +3 -0
- package/dist/services/ai-config-service.js +4 -0
- package/dist/services/ai-source-apply.d.ts +1 -1
- package/dist/services/ai-source-apply.js +1 -1
- package/dist/services/auto-register.js +1 -1
- package/dist/services/bridge-package-publish-hooks.js +1 -1
- package/dist/services/browser-session-manager.d.ts +3 -3
- package/dist/services/browser-session-manager.js +1 -1
- package/dist/services/capability-config.d.ts +21 -0
- package/dist/services/capability-config.js +3 -0
- package/dist/services/cli-commands.js +2 -2
- package/dist/services/desktop-mcp-manager.js +1 -1
- package/dist/services/fileSnapshotStore.js +1 -1
- package/dist/services/instance-ai-config-service.d.ts +1 -0
- package/dist/services/instance-ai-config-service.js +1 -1
- package/dist/services/instance-features.d.ts +21 -0
- package/dist/services/instance-features.js +1 -1
- package/dist/services/instance-init-service.d.ts +7 -4
- package/dist/services/instance-init-service.js +1 -1
- package/dist/services/instance-state.js +1 -1
- package/dist/services/jdk-scanner.js +1 -1
- package/dist/services/launch-manager.js +1 -1
- package/dist/services/legacy-path-migration.d.ts +2 -0
- package/dist/services/legacy-path-migration.js +1 -1
- package/dist/services/lifecycle-state.js +2 -2
- package/dist/services/mcp-deploy.d.ts +49 -0
- package/dist/services/mcp-deploy.js +4 -0
- package/dist/services/orphan-monitor.js +1 -1
- package/dist/services/plugin-event-buffer.d.ts +49 -0
- package/dist/services/plugin-event-buffer.js +2 -0
- package/dist/services/plugin-manager.d.ts +262 -0
- package/dist/services/plugin-manager.js +16 -0
- package/dist/services/plugin-package.d.ts +8 -0
- package/dist/services/plugin-package.js +2 -0
- package/dist/services/process-detail.js +2 -2
- package/dist/services/process-detector.js +10 -10
- package/dist/services/process-registry.js +1 -1
- package/dist/services/process-top.js +2 -2
- package/dist/services/runtime-binding.js +4 -4
- package/dist/services/sdk-tool-file-change-recorder.js +1 -1
- package/dist/services/skill-manager.d.ts +41 -0
- package/dist/services/skill-manager.js +3 -0
- package/dist/services/startup-config-wizard.js +6 -6
- package/dist/services/system-metrics.js +1 -1
- package/dist/services/tunnel-client.js +1 -1
- package/dist/services/update-notifier.js +2 -2
- package/dist/services/windows-service-manager.js +1 -1
- package/dist/services/workspace-files.js +1 -1
- package/dist/services/workspaceTaskChangeWatcher.js +3 -3
- package/dist/types.d.ts +11 -61
- package/dist/utils/file-utils.d.ts +9 -6
- package/dist/utils/file-utils.js +2 -2
- package/dist/utils/instance-ai-config-debug-logger.js +1 -1
- package/dist/utils/mcp-utils.d.ts +1 -37
- package/dist/utils/mcp-utils.js +1 -1
- package/dist/utils/yaml-utils.js +1 -1
- package/package/acode/dist/built-in-file-tools.js +2 -2
- package/package/acode/dist/commands/commandRegistry.d.ts +2 -0
- package/package/acode/dist/commands/commandRegistry.js +1 -1
- package/package/acode/dist/index.d.ts +2 -0
- package/package/acode/dist/index.js +1 -1
- package/package/acode/dist/plugin-tools.d.ts +14 -0
- package/package/acode/dist/plugin-tools.js +9 -0
- package/package/acode/dist/plugin-types.d.ts +119 -0
- package/package/acode/dist/runtime.d.ts +4 -0
- package/package/acode/dist/runtime.js +19 -19
- package/package/acode/dist/sub-agent-manager.js +1 -1
- package/package/acode/dist/types.d.ts +5 -0
- package/package/aws-client-agent-mcp/dist/agent-client.d.ts +9 -1
- package/package/aws-client-agent-mcp/dist/agent-client.js +1 -1
- package/package/aws-client-agent-mcp/dist/http-client.js +1 -1
- package/package/aws-client-agent-mcp/dist/mcp-server.d.ts +10 -0
- package/package/aws-client-agent-mcp/dist/mcp-server.js +21 -21
- package/package/aws-client-agent-mcp/dist/mcp-tools.js +2 -4
- package/package/aws-client-agent-mcp/dist/memory-tools.js +12 -14
- package/package/aws-client-agent-mcp/dist/server-memory-store.d.ts +1 -1
- package/package/aws-client-agent-mcp/dist/server-memory-store.js +1 -1
- package/package/aws-client-agent-mcp/dist/status-reporter.d.ts +2 -0
- package/package/aws-client-agent-mcp/dist/status-reporter.js +3 -2
- package/package/aws-client-agent-mcp/dist/types.d.ts +22 -0
- package/package.json +4 -10
- package/dist/adapters/cc-switch/common.d.ts +0 -41
- package/dist/adapters/cc-switch/common.js +0 -2
- package/dist/adapters/cc-switch/index.d.ts +0 -19
- package/dist/adapters/cc-switch/index.js +0 -2
- package/dist/adapters/cc-switch/mcp-acode.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-acode.js +0 -2
- package/dist/adapters/cc-switch/mcp-claude.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-claude.js +0 -2
- package/dist/adapters/cc-switch/mcp-claudecode.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-claudecode.js +0 -2
- package/dist/adapters/cc-switch/mcp-codex.d.ts +0 -10
- package/dist/adapters/cc-switch/mcp-codex.js +0 -11
- package/dist/adapters/cc-switch/mcp-opencode.d.ts +0 -14
- package/dist/adapters/cc-switch/mcp-opencode.js +0 -2
- package/dist/adapters/cc-switch/mcp-placeholder.d.ts +0 -9
- package/dist/adapters/cc-switch/mcp-placeholder.js +0 -2
- package/dist/adapters/cc-switch/skill-acode.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-acode.js +0 -2
- package/dist/adapters/cc-switch/skill-claude.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-claude.js +0 -2
- package/dist/adapters/cc-switch/skill-claudecode.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-claudecode.js +0 -2
- package/dist/adapters/cc-switch/skill-codex.d.ts +0 -4
- package/dist/adapters/cc-switch/skill-codex.js +0 -2
- package/dist/adapters/cc-switch/skill-directory.d.ts +0 -9
- package/dist/adapters/cc-switch/skill-directory.js +0 -3
- package/dist/adapters/cc-switch/skill-opencode.d.ts +0 -5
- package/dist/adapters/cc-switch/skill-opencode.js +0 -2
- package/dist/adapters/cc-switch/skill-placeholder.d.ts +0 -9
- package/dist/adapters/cc-switch/skill-placeholder.js +0 -2
- package/dist/services/cc-switch-sdk.d.ts +0 -17
- package/dist/services/cc-switch-sdk.js +0 -2
- package/dist/services/instance-service.d.ts +0 -78
- package/dist/services/instance-service.js +0 -2
- package/node_modules/@cc-switch/sdk/README.md +0 -541
- package/node_modules/@cc-switch/sdk/dist/constants.d.ts +0 -8
- package/node_modules/@cc-switch/sdk/dist/constants.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/errors.d.ts +0 -5
- package/node_modules/@cc-switch/sdk/dist/errors.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/index.d.ts +0 -5
- package/node_modules/@cc-switch/sdk/dist/index.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/schemas.d.ts +0 -7
- package/node_modules/@cc-switch/sdk/dist/schemas.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/sdk.d.ts +0 -59
- package/node_modules/@cc-switch/sdk/dist/sdk.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/ai-config-service.d.ts +0 -81
- package/node_modules/@cc-switch/sdk/dist/services/ai-config-service.js +0 -4
- package/node_modules/@cc-switch/sdk/dist/services/mcp-model.d.ts +0 -16
- package/node_modules/@cc-switch/sdk/dist/services/mcp-model.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/mcp-service.d.ts +0 -17
- package/node_modules/@cc-switch/sdk/dist/services/mcp-service.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/skill-model.d.ts +0 -16
- package/node_modules/@cc-switch/sdk/dist/services/skill-model.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/services/skill-service.d.ts +0 -16
- package/node_modules/@cc-switch/sdk/dist/services/skill-service.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/state.d.ts +0 -3
- package/node_modules/@cc-switch/sdk/dist/state.js +0 -2
- package/node_modules/@cc-switch/sdk/dist/types.d.ts +0 -78
- package/node_modules/@cc-switch/sdk/dist/utils/fs.d.ts +0 -10
- package/node_modules/@cc-switch/sdk/dist/utils/fs.js +0 -3
- package/node_modules/@cc-switch/sdk/dist/utils/id.d.ts +0 -3
- package/node_modules/@cc-switch/sdk/dist/utils/id.js +0 -2
- package/node_modules/@cc-switch/sdk/package.json +0 -31
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/locales/index.cjs +0 -17
- package/node_modules/zod/locales/index.d.cts +0 -1
- package/node_modules/zod/locales/index.d.ts +0 -1
- package/node_modules/zod/locales/index.js +0 -1
- package/node_modules/zod/locales/package.json +0 -6
- package/node_modules/zod/mini/index.cjs +0 -17
- package/node_modules/zod/mini/index.d.cts +0 -1
- package/node_modules/zod/mini/index.d.ts +0 -1
- package/node_modules/zod/mini/index.js +0 -1
- package/node_modules/zod/mini/package.json +0 -6
- package/node_modules/zod/package.json +0 -135
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/locales/index.ts +0 -1
- package/node_modules/zod/src/mini/index.ts +0 -1
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5138
- package/node_modules/zod/src/v4/classic/checks.ts +0 -31
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -70
- package/node_modules/zod/src/v4/classic/errors.ts +0 -82
- package/node_modules/zod/src/v4/classic/external.ts +0 -50
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -82
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2197
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -276
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -562
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -365
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -661
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -595
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -308
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -844
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -270
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -609
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -136
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -340
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -282
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -356
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -582
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -605
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1080
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -763
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2622
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -361
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1621
- package/node_modules/zod/src/v4/core/checks.ts +0 -1287
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -115
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -413
- package/node_modules/zod/src/v4/core/index.ts +0 -14
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
- package/node_modules/zod/src/v4/core/parse.ts +0 -195
- package/node_modules/zod/src/v4/core/regexes.ts +0 -177
- package/node_modules/zod/src/v4/core/registries.ts +0 -97
- package/node_modules/zod/src/v4/core/schemas.ts +0 -4317
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -18
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -1044
- package/node_modules/zod/src/v4/core/util.ts +0 -910
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -125
- package/node_modules/zod/src/v4/locales/az.ts +0 -121
- package/node_modules/zod/src/v4/locales/be.ts +0 -184
- package/node_modules/zod/src/v4/locales/bg.ts +0 -136
- package/node_modules/zod/src/v4/locales/ca.ts +0 -127
- package/node_modules/zod/src/v4/locales/cs.ts +0 -142
- package/node_modules/zod/src/v4/locales/da.ts +0 -141
- package/node_modules/zod/src/v4/locales/de.ts +0 -124
- package/node_modules/zod/src/v4/locales/en.ts +0 -127
- package/node_modules/zod/src/v4/locales/eo.ts +0 -125
- package/node_modules/zod/src/v4/locales/es.ts +0 -159
- package/node_modules/zod/src/v4/locales/fa.ts +0 -134
- package/node_modules/zod/src/v4/locales/fi.ts +0 -131
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
- package/node_modules/zod/src/v4/locales/fr.ts +0 -124
- package/node_modules/zod/src/v4/locales/he.ts +0 -125
- package/node_modules/zod/src/v4/locales/hu.ts +0 -126
- package/node_modules/zod/src/v4/locales/id.ts +0 -125
- package/node_modules/zod/src/v4/locales/index.ts +0 -47
- package/node_modules/zod/src/v4/locales/is.ts +0 -127
- package/node_modules/zod/src/v4/locales/it.ts +0 -125
- package/node_modules/zod/src/v4/locales/ja.ts +0 -122
- package/node_modules/zod/src/v4/locales/ka.ts +0 -138
- package/node_modules/zod/src/v4/locales/kh.ts +0 -7
- package/node_modules/zod/src/v4/locales/km.ts +0 -126
- package/node_modules/zod/src/v4/locales/ko.ts +0 -131
- package/node_modules/zod/src/v4/locales/lt.ts +0 -265
- package/node_modules/zod/src/v4/locales/mk.ts +0 -127
- package/node_modules/zod/src/v4/locales/ms.ts +0 -124
- package/node_modules/zod/src/v4/locales/nl.ts +0 -126
- package/node_modules/zod/src/v4/locales/no.ts +0 -124
- package/node_modules/zod/src/v4/locales/ota.ts +0 -125
- package/node_modules/zod/src/v4/locales/pl.ts +0 -126
- package/node_modules/zod/src/v4/locales/ps.ts +0 -133
- package/node_modules/zod/src/v4/locales/pt.ts +0 -123
- package/node_modules/zod/src/v4/locales/ru.ts +0 -184
- package/node_modules/zod/src/v4/locales/sl.ts +0 -126
- package/node_modules/zod/src/v4/locales/sv.ts +0 -127
- package/node_modules/zod/src/v4/locales/ta.ts +0 -125
- package/node_modules/zod/src/v4/locales/th.ts +0 -126
- package/node_modules/zod/src/v4/locales/tr.ts +0 -121
- package/node_modules/zod/src/v4/locales/ua.ts +0 -7
- package/node_modules/zod/src/v4/locales/uk.ts +0 -126
- package/node_modules/zod/src/v4/locales/ur.ts +0 -126
- package/node_modules/zod/src/v4/locales/vi.ts +0 -125
- package/node_modules/zod/src/v4/locales/yo.ts +0 -131
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
- package/node_modules/zod/src/v4/mini/external.ts +0 -40
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -62
- package/node_modules/zod/src/v4/mini/parse.ts +0 -14
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1725
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -529
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -899
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -200
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -315
- package/node_modules/zod/src/v4-mini/index.ts +0 -1
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -112
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/package.json +0 -6
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3777
- package/node_modules/zod/v3/types.d.cts +0 -1034
- package/node_modules/zod/v3/types.d.ts +0 -1034
- package/node_modules/zod/v3/types.js +0 -3695
- package/node_modules/zod/v4/classic/checks.cjs +0 -32
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -61
- package/node_modules/zod/v4/classic/compat.d.cts +0 -50
- package/node_modules/zod/v4/classic/compat.d.ts +0 -50
- package/node_modules/zod/v4/classic/compat.js +0 -31
- package/node_modules/zod/v4/classic/errors.cjs +0 -74
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -48
- package/node_modules/zod/v4/classic/external.cjs +0 -70
- package/node_modules/zod/v4/classic/external.d.cts +0 -13
- package/node_modules/zod/v4/classic/external.d.ts +0 -13
- package/node_modules/zod/v4/classic/external.js +0 -18
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/package.json +0 -6
- package/node_modules/zod/v4/classic/parse.cjs +0 -41
- package/node_modules/zod/v4/classic/parse.d.cts +0 -31
- package/node_modules/zod/v4/classic/parse.d.ts +0 -31
- package/node_modules/zod/v4/classic/parse.js +0 -15
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1151
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -673
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -673
- package/node_modules/zod/v4/classic/schemas.js +0 -1040
- package/node_modules/zod/v4/core/api.cjs +0 -1060
- package/node_modules/zod/v4/core/api.d.cts +0 -295
- package/node_modules/zod/v4/core/api.d.ts +0 -295
- package/node_modules/zod/v4/core/api.js +0 -925
- package/node_modules/zod/v4/core/checks.cjs +0 -595
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -569
- package/node_modules/zod/v4/core/core.cjs +0 -74
- package/node_modules/zod/v4/core/core.d.cts +0 -52
- package/node_modules/zod/v4/core/core.d.ts +0 -52
- package/node_modules/zod/v4/core/core.js +0 -67
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -213
- package/node_modules/zod/v4/core/errors.d.cts +0 -210
- package/node_modules/zod/v4/core/errors.d.ts +0 -210
- package/node_modules/zod/v4/core/errors.js +0 -182
- package/node_modules/zod/v4/core/index.cjs +0 -43
- package/node_modules/zod/v4/core/index.d.cts +0 -14
- package/node_modules/zod/v4/core/index.d.ts +0 -14
- package/node_modules/zod/v4/core/index.js +0 -14
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/package.json +0 -6
- package/node_modules/zod/v4/core/parse.cjs +0 -131
- package/node_modules/zod/v4/core/parse.d.cts +0 -49
- package/node_modules/zod/v4/core/parse.d.ts +0 -49
- package/node_modules/zod/v4/core/parse.js +0 -93
- package/node_modules/zod/v4/core/regexes.cjs +0 -136
- package/node_modules/zod/v4/core/regexes.d.cts +0 -78
- package/node_modules/zod/v4/core/regexes.d.ts +0 -78
- package/node_modules/zod/v4/core/regexes.js +0 -127
- package/node_modules/zod/v4/core/registries.cjs +0 -57
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -52
- package/node_modules/zod/v4/core/schemas.cjs +0 -1986
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1113
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1113
- package/node_modules/zod/v4/core/schemas.js +0 -1955
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -920
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -90
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -90
- package/node_modules/zod/v4/core/to-json-schema.js +0 -915
- package/node_modules/zod/v4/core/util.cjs +0 -658
- package/node_modules/zod/v4/core/util.d.cts +0 -197
- package/node_modules/zod/v4/core/util.d.ts +0 -197
- package/node_modules/zod/v4/core/util.js +0 -601
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -143
- package/node_modules/zod/v4/locales/ar.d.cts +0 -5
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -116
- package/node_modules/zod/v4/locales/az.cjs +0 -142
- package/node_modules/zod/v4/locales/az.d.cts +0 -5
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -115
- package/node_modules/zod/v4/locales/be.cjs +0 -191
- package/node_modules/zod/v4/locales/be.d.cts +0 -5
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -164
- package/node_modules/zod/v4/locales/bg.cjs +0 -156
- package/node_modules/zod/v4/locales/bg.d.cts +0 -5
- package/node_modules/zod/v4/locales/bg.d.ts +0 -5
- package/node_modules/zod/v4/locales/bg.js +0 -128
- package/node_modules/zod/v4/locales/ca.cjs +0 -145
- package/node_modules/zod/v4/locales/ca.d.cts +0 -5
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -118
- package/node_modules/zod/v4/locales/cs.cjs +0 -162
- package/node_modules/zod/v4/locales/cs.d.cts +0 -5
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -135
- package/node_modules/zod/v4/locales/da.cjs +0 -158
- package/node_modules/zod/v4/locales/da.d.cts +0 -5
- package/node_modules/zod/v4/locales/da.d.ts +0 -4
- package/node_modules/zod/v4/locales/da.js +0 -131
- package/node_modules/zod/v4/locales/de.cjs +0 -143
- package/node_modules/zod/v4/locales/de.d.cts +0 -5
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -116
- package/node_modules/zod/v4/locales/en.cjs +0 -145
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/en.js +0 -117
- package/node_modules/zod/v4/locales/eo.cjs +0 -144
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.js +0 -116
- package/node_modules/zod/v4/locales/es.cjs +0 -176
- package/node_modules/zod/v4/locales/es.d.cts +0 -5
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -149
- package/node_modules/zod/v4/locales/fa.cjs +0 -149
- package/node_modules/zod/v4/locales/fa.d.cts +0 -5
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -122
- package/node_modules/zod/v4/locales/fi.cjs +0 -149
- package/node_modules/zod/v4/locales/fi.d.cts +0 -5
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -122
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -144
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -117
- package/node_modules/zod/v4/locales/fr.cjs +0 -143
- package/node_modules/zod/v4/locales/fr.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -116
- package/node_modules/zod/v4/locales/he.cjs +0 -144
- package/node_modules/zod/v4/locales/he.d.cts +0 -5
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -117
- package/node_modules/zod/v4/locales/hu.cjs +0 -144
- package/node_modules/zod/v4/locales/hu.d.cts +0 -5
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -117
- package/node_modules/zod/v4/locales/id.cjs +0 -143
- package/node_modules/zod/v4/locales/id.d.cts +0 -5
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -116
- package/node_modules/zod/v4/locales/index.cjs +0 -100
- package/node_modules/zod/v4/locales/index.d.cts +0 -47
- package/node_modules/zod/v4/locales/index.d.ts +0 -47
- package/node_modules/zod/v4/locales/index.js +0 -47
- package/node_modules/zod/v4/locales/is.cjs +0 -145
- package/node_modules/zod/v4/locales/is.d.cts +0 -5
- package/node_modules/zod/v4/locales/is.d.ts +0 -5
- package/node_modules/zod/v4/locales/is.js +0 -117
- package/node_modules/zod/v4/locales/it.cjs +0 -144
- package/node_modules/zod/v4/locales/it.d.cts +0 -5
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -117
- package/node_modules/zod/v4/locales/ja.cjs +0 -142
- package/node_modules/zod/v4/locales/ja.d.cts +0 -5
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -115
- package/node_modules/zod/v4/locales/ka.cjs +0 -153
- package/node_modules/zod/v4/locales/ka.d.cts +0 -5
- package/node_modules/zod/v4/locales/ka.d.ts +0 -5
- package/node_modules/zod/v4/locales/ka.js +0 -125
- package/node_modules/zod/v4/locales/kh.cjs +0 -12
- package/node_modules/zod/v4/locales/kh.d.cts +0 -5
- package/node_modules/zod/v4/locales/kh.d.ts +0 -5
- package/node_modules/zod/v4/locales/kh.js +0 -5
- package/node_modules/zod/v4/locales/km.cjs +0 -144
- package/node_modules/zod/v4/locales/km.d.cts +0 -5
- package/node_modules/zod/v4/locales/km.d.ts +0 -4
- package/node_modules/zod/v4/locales/km.js +0 -117
- package/node_modules/zod/v4/locales/ko.cjs +0 -148
- package/node_modules/zod/v4/locales/ko.d.cts +0 -5
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -121
- package/node_modules/zod/v4/locales/lt.cjs +0 -258
- package/node_modules/zod/v4/locales/lt.d.cts +0 -5
- package/node_modules/zod/v4/locales/lt.d.ts +0 -5
- package/node_modules/zod/v4/locales/lt.js +0 -230
- package/node_modules/zod/v4/locales/mk.cjs +0 -145
- package/node_modules/zod/v4/locales/mk.d.cts +0 -5
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -118
- package/node_modules/zod/v4/locales/ms.cjs +0 -143
- package/node_modules/zod/v4/locales/ms.d.cts +0 -5
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -116
- package/node_modules/zod/v4/locales/nl.cjs +0 -144
- package/node_modules/zod/v4/locales/nl.d.cts +0 -5
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -117
- package/node_modules/zod/v4/locales/no.cjs +0 -143
- package/node_modules/zod/v4/locales/no.d.cts +0 -5
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -116
- package/node_modules/zod/v4/locales/ota.cjs +0 -144
- package/node_modules/zod/v4/locales/ota.d.cts +0 -5
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -117
- package/node_modules/zod/v4/locales/package.json +0 -6
- package/node_modules/zod/v4/locales/pl.cjs +0 -144
- package/node_modules/zod/v4/locales/pl.d.cts +0 -5
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -117
- package/node_modules/zod/v4/locales/ps.cjs +0 -149
- package/node_modules/zod/v4/locales/ps.d.cts +0 -5
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -122
- package/node_modules/zod/v4/locales/pt.cjs +0 -143
- package/node_modules/zod/v4/locales/pt.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -116
- package/node_modules/zod/v4/locales/ru.cjs +0 -191
- package/node_modules/zod/v4/locales/ru.d.cts +0 -5
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -164
- package/node_modules/zod/v4/locales/sl.cjs +0 -144
- package/node_modules/zod/v4/locales/sl.d.cts +0 -5
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -117
- package/node_modules/zod/v4/locales/sv.cjs +0 -145
- package/node_modules/zod/v4/locales/sv.d.cts +0 -5
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -118
- package/node_modules/zod/v4/locales/ta.cjs +0 -144
- package/node_modules/zod/v4/locales/ta.d.cts +0 -5
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -117
- package/node_modules/zod/v4/locales/th.cjs +0 -144
- package/node_modules/zod/v4/locales/th.d.cts +0 -5
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -117
- package/node_modules/zod/v4/locales/tr.cjs +0 -143
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/tr.js +0 -115
- package/node_modules/zod/v4/locales/ua.cjs +0 -12
- package/node_modules/zod/v4/locales/ua.d.cts +0 -5
- package/node_modules/zod/v4/locales/ua.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.js +0 -5
- package/node_modules/zod/v4/locales/uk.cjs +0 -144
- package/node_modules/zod/v4/locales/uk.d.cts +0 -5
- package/node_modules/zod/v4/locales/uk.d.ts +0 -4
- package/node_modules/zod/v4/locales/uk.js +0 -117
- package/node_modules/zod/v4/locales/ur.cjs +0 -144
- package/node_modules/zod/v4/locales/ur.d.cts +0 -5
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -117
- package/node_modules/zod/v4/locales/vi.cjs +0 -143
- package/node_modules/zod/v4/locales/vi.d.cts +0 -5
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -116
- package/node_modules/zod/v4/locales/yo.cjs +0 -142
- package/node_modules/zod/v4/locales/yo.d.cts +0 -5
- package/node_modules/zod/v4/locales/yo.d.ts +0 -4
- package/node_modules/zod/v4/locales/yo.js +0 -115
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -143
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -116
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -144
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -117
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -47
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -17
- package/node_modules/zod/v4/mini/external.cjs +0 -62
- package/node_modules/zod/v4/mini/external.d.cts +0 -11
- package/node_modules/zod/v4/mini/external.d.ts +0 -11
- package/node_modules/zod/v4/mini/external.js +0 -13
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -60
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -30
- package/node_modules/zod/v4/mini/package.json +0 -6
- package/node_modules/zod/v4/mini/parse.cjs +0 -16
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -892
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -407
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -407
- package/node_modules/zod/v4/mini/schemas.js +0 -775
- package/node_modules/zod/v4/package.json +0 -6
- package/node_modules/zod/v4-mini/index.cjs +0 -17
- package/node_modules/zod/v4-mini/index.d.cts +0 -1
- package/node_modules/zod/v4-mini/index.d.ts +0 -1
- package/node_modules/zod/v4-mini/index.js +0 -1
- package/node_modules/zod/v4-mini/package.json +0 -6
- package/package/cc-switch-sdk/README.md +0 -541
- package/package/cc-switch-sdk/dist/constants.d.ts +0 -8
- package/package/cc-switch-sdk/dist/constants.js +0 -2
- package/package/cc-switch-sdk/dist/errors.d.ts +0 -5
- package/package/cc-switch-sdk/dist/errors.js +0 -2
- package/package/cc-switch-sdk/dist/index.d.ts +0 -5
- package/package/cc-switch-sdk/dist/index.js +0 -2
- package/package/cc-switch-sdk/dist/schemas.d.ts +0 -7
- package/package/cc-switch-sdk/dist/schemas.js +0 -2
- package/package/cc-switch-sdk/dist/sdk.d.ts +0 -59
- package/package/cc-switch-sdk/dist/sdk.js +0 -2
- package/package/cc-switch-sdk/dist/services/ai-config-service.js +0 -4
- package/package/cc-switch-sdk/dist/services/mcp-model.d.ts +0 -16
- package/package/cc-switch-sdk/dist/services/mcp-model.js +0 -2
- package/package/cc-switch-sdk/dist/services/mcp-service.d.ts +0 -17
- package/package/cc-switch-sdk/dist/services/mcp-service.js +0 -2
- package/package/cc-switch-sdk/dist/services/skill-model.d.ts +0 -16
- package/package/cc-switch-sdk/dist/services/skill-model.js +0 -2
- package/package/cc-switch-sdk/dist/services/skill-service.d.ts +0 -16
- package/package/cc-switch-sdk/dist/services/skill-service.js +0 -2
- package/package/cc-switch-sdk/dist/state.d.ts +0 -3
- package/package/cc-switch-sdk/dist/state.js +0 -2
- package/package/cc-switch-sdk/dist/types.d.ts +0 -78
- package/package/cc-switch-sdk/dist/types.js +0 -1
- package/package/cc-switch-sdk/dist/utils/fs.d.ts +0 -10
- package/package/cc-switch-sdk/dist/utils/fs.js +0 -3
- package/package/cc-switch-sdk/dist/utils/id.d.ts +0 -3
- package/package/cc-switch-sdk/dist/utils/id.js +0 -2
- package/package/cc-switch-sdk/package.json +0 -31
- /package/{node_modules/@cc-switch/sdk/dist/types.js → package/acode/dist/plugin-types.js} +0 -0
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export interface AiConfigTemplate {
|
|
2
|
-
baseUrl: string;
|
|
3
|
-
apiKey: string;
|
|
4
|
-
model: string;
|
|
5
|
-
models?: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface ClaudeCodeConfig {
|
|
8
|
-
env?: {
|
|
9
|
-
ANTHROPIC_BASE_URL?: string;
|
|
10
|
-
ANTHROPIC_AUTH_TOKEN?: string;
|
|
11
|
-
ANTHROPIC_MODEL?: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export interface OpenCodeProviderConfig {
|
|
15
|
-
npm?: string;
|
|
16
|
-
model?: string;
|
|
17
|
-
options?: {
|
|
18
|
-
baseURL?: string;
|
|
19
|
-
apiKey?: string;
|
|
20
|
-
};
|
|
21
|
-
models?: Record<string, {
|
|
22
|
-
name: string;
|
|
23
|
-
modalities?: {
|
|
24
|
-
input: string[];
|
|
25
|
-
output: string[];
|
|
26
|
-
};
|
|
27
|
-
}>;
|
|
28
|
-
}
|
|
29
|
-
export interface OpenCodeConfig {
|
|
30
|
-
provider?: {
|
|
31
|
-
default?: OpenCodeProviderConfig;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface CodexModelProviderConfig {
|
|
35
|
-
name?: string;
|
|
36
|
-
base_url?: string;
|
|
37
|
-
wire_api?: "responses" | "chat" | string;
|
|
38
|
-
env_key?: string;
|
|
39
|
-
env_key_instructions?: string;
|
|
40
|
-
requires_openai_auth?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface CodexConfig {
|
|
43
|
-
model?: string;
|
|
44
|
-
model_provider?: string;
|
|
45
|
-
openai_base_url?: string;
|
|
46
|
-
model_providers?: Record<string, CodexModelProviderConfig>;
|
|
47
|
-
}
|
|
48
|
-
export interface AiConfigPaths {
|
|
49
|
-
acodeConfigFile: string;
|
|
50
|
-
claudecodeConfigFile: string;
|
|
51
|
-
codexConfigFile: string;
|
|
52
|
-
opencodeConfigFile: string;
|
|
53
|
-
}
|
|
54
|
-
export declare function buildToolSpecificAiConfig(template: AiConfigTemplate): {
|
|
55
|
-
acode: OpenCodeConfig;
|
|
56
|
-
claudecode: ClaudeCodeConfig;
|
|
57
|
-
codex: CodexConfig;
|
|
58
|
-
opencode: OpenCodeConfig;
|
|
59
|
-
} | null;
|
|
60
|
-
export declare class AiConfigService {
|
|
61
|
-
private readonly paths;
|
|
62
|
-
constructor(paths: AiConfigPaths);
|
|
63
|
-
readClaudeCodeConfig(): Promise<ClaudeCodeConfig>;
|
|
64
|
-
readAcodeConfig(): Promise<OpenCodeConfig>;
|
|
65
|
-
readOpenCodeConfig(): Promise<OpenCodeConfig>;
|
|
66
|
-
readCodexConfig(): Promise<CodexConfig>;
|
|
67
|
-
writeClaudeCodeConfig(config: ClaudeCodeConfig): Promise<void>;
|
|
68
|
-
writeAcodeConfig(config: OpenCodeConfig): Promise<void>;
|
|
69
|
-
writeOpenCodeConfig(config: OpenCodeConfig): Promise<void>;
|
|
70
|
-
writeCodexConfig(config: CodexConfig): Promise<void>;
|
|
71
|
-
applyClaudeCodeConfig(patch: ClaudeCodeConfig): Promise<ClaudeCodeConfig>;
|
|
72
|
-
applyOpenCodeConfig(patch: OpenCodeConfig): Promise<OpenCodeConfig>;
|
|
73
|
-
applyAcodeConfig(patch: OpenCodeConfig): Promise<OpenCodeConfig>;
|
|
74
|
-
applyCodexConfig(patch: CodexConfig): Promise<CodexConfig>;
|
|
75
|
-
applyAiConfigTemplate(template: AiConfigTemplate): Promise<{
|
|
76
|
-
acode: OpenCodeConfig;
|
|
77
|
-
claudecode: ClaudeCodeConfig;
|
|
78
|
-
codex: CodexConfig;
|
|
79
|
-
opencode: OpenCodeConfig;
|
|
80
|
-
} | null>;
|
|
81
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import _ from"node:path";import{promises as l}from"node:fs";function g(r){const e=new Set,i=o=>{const n=String(o||"").trim();n&&e.add(n)};return Array.isArray(r.models)&&r.models.forEach(i),i(r.model),[...e]}async function f(r,e){try{const i=await l.readFile(r,"utf-8"),o=JSON.parse(i);return o&&typeof o=="object"&&!Array.isArray(o)?o:{...e}}catch{return{...e}}}async function m(r,e){const i=_.dirname(r);await l.mkdir(i,{recursive:!0}),await l.writeFile(r,JSON.stringify(e,null,2),"utf-8")}function u(r,e){if(!e||typeof e!="object"||Array.isArray(e))return r;const i={...r};for(const[o,n]of Object.entries(e))n!==void 0&&(n!==null&&typeof n=="object"&&!Array.isArray(n)&&i[o]!==null&&typeof i[o]=="object"&&!Array.isArray(i[o])?i[o]=u(i[o],n):i[o]=n);return i}function v(r){return y(r)}function a(r){return String(r||"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function h(r){const e=String(r||"").trim();return e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"):e}function w(r){const e=String(r||"").trim().toLowerCase();if(e==="true")return!0;if(e==="false")return!1}function A(r){const e={model_providers:{}};let i=null;for(const o of r.split(/\r?\n/)){const n=o.trim();if(!n||n.startsWith("#"))continue;const s=n.match(/^\[model_providers\.([^\]]+)\]$/);if(s){i=s[1],e.model_providers=e.model_providers||{},e.model_providers[i]=e.model_providers[i]||{};continue}if(n.startsWith("[")){i=null;continue}const d=n.match(/^([A-Za-z0-9_-]+)\s*=\s*(.+)$/);if(!d)continue;const[,t,c]=d;if(i){const p=e.model_providers?.[i]||{};if(t==="requires_openai_auth"){const C=w(c);C!==void 0&&(p.requires_openai_auth=C)}else["name","base_url","wire_api","env_key","env_key_instructions"].includes(t)&&(p[t]=h(c));e.model_providers={...e.model_providers||{},[i]:p};continue}["model","model_provider","openai_base_url"].includes(t)&&(e[t]=h(c))}return e}function b(r){const e=[];r.model&&e.push(`model = "${a(r.model)}"`),r.model_provider&&e.push(`model_provider = "${a(r.model_provider)}"`),r.openai_base_url&&e.push(`openai_base_url = "${a(r.openai_base_url)}"`);const i=r.model_providers||{};for(const[o,n]of Object.entries(i))e.push(""),e.push(`[model_providers.${o}]`),n.name&&e.push(`name = "${a(n.name)}"`),n.base_url&&e.push(`base_url = "${a(n.base_url)}"`),n.wire_api&&e.push(`wire_api = "${a(n.wire_api)}"`),n.env_key&&e.push(`env_key = "${a(n.env_key)}"`),n.env_key_instructions&&e.push(`env_key_instructions = "${a(n.env_key_instructions)}"`),n.requires_openai_auth!==void 0&&e.push(`requires_openai_auth = ${n.requires_openai_auth?"true":"false"}`);return`${e.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`}function x(r){let e=String(r.baseUrl||"").trim();const i=String(r.apiKey||"").trim(),o=g(r),n=String(r.model||"").trim()||o[0];if(!e||!i||!n)return null;e&&!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`https://${e}`),e=e.replace(/\/+$/,"");const s=y(e),d=v(e),t=Object.fromEntries(o.map(c=>[c,{name:c,modalities:{input:["text","image"],output:["text"]}}]));return{acode:{provider:{default:{npm:"@ai-sdk/openai-compatible",model:n,options:{baseURL:s,apiKey:i},models:t}}},claudecode:{env:{ANTHROPIC_BASE_URL:e,ANTHROPIC_AUTH_TOKEN:i,ANTHROPIC_MODEL:n}},codex:{model:n,model_provider:"default",model_providers:{default:{name:"Default",base_url:d,wire_api:"responses",env_key:"OPENAI_API_KEY",env_key_instructions:"Set OPENAI_API_KEY in your environment"}}},opencode:{provider:{default:{npm:"@ai-sdk/openai-compatible",model:n,options:{baseURL:s,apiKey:i},models:t}}}}}function y(r){const e=String(r||"").trim().replace(/\/+$/,"");return e&&(e.endsWith("/v1")?e:`${e}/v1`)}class ${constructor(e){this.paths=e}async readClaudeCodeConfig(){return f(this.paths.claudecodeConfigFile,{})}async readAcodeConfig(){return f(this.paths.acodeConfigFile,{})}async readOpenCodeConfig(){return f(this.paths.opencodeConfigFile,{})}async readCodexConfig(){try{const e=await l.readFile(this.paths.codexConfigFile,"utf-8");return A(e)}catch{return{}}}async writeClaudeCodeConfig(e){await m(this.paths.claudecodeConfigFile,e)}async writeAcodeConfig(e){await m(this.paths.acodeConfigFile,e)}async writeOpenCodeConfig(e){await m(this.paths.opencodeConfigFile,e)}async writeCodexConfig(e){const i=_.dirname(this.paths.codexConfigFile);await l.mkdir(i,{recursive:!0}),await l.writeFile(this.paths.codexConfigFile,b(e),"utf-8")}async applyClaudeCodeConfig(e){const i=await this.readClaudeCodeConfig(),o=u(i,e);return await this.writeClaudeCodeConfig(o),o}async applyOpenCodeConfig(e){const i=await this.readOpenCodeConfig(),o=u(i,e);return await this.writeOpenCodeConfig(o),o}async applyAcodeConfig(e){const i=await this.readAcodeConfig(),o=u(i,e);return await this.writeAcodeConfig(o),o}async applyCodexConfig(e){const i=await this.readCodexConfig(),o=u(i,e);return await this.writeCodexConfig(o),o}async applyAiConfigTemplate(e){const i=x(e);if(!i)return null;const o=await this.applyAcodeConfig(i.acode),n=await this.applyClaudeCodeConfig(i.claudecode),s=await this.applyCodexConfig(i.codex),d=await this.applyOpenCodeConfig(i.opencode);return{acode:o,claudecode:n,codex:s,opencode:d}}}export{$ as AiConfigService,x as buildToolSpecificAiConfig};
|
|
4
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AppId, AppFlags, McpServer } from "../types.js";
|
|
2
|
-
export interface CreateMcpInput {
|
|
3
|
-
name: string;
|
|
4
|
-
server: McpServer["server"];
|
|
5
|
-
description?: string;
|
|
6
|
-
apps?: Partial<AppFlags>;
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateMcpInput {
|
|
9
|
-
name?: string;
|
|
10
|
-
server?: McpServer["server"];
|
|
11
|
-
description?: string;
|
|
12
|
-
apps?: Partial<AppFlags>;
|
|
13
|
-
}
|
|
14
|
-
export declare function buildMcpFromInput(input: CreateMcpInput): McpServer;
|
|
15
|
-
export declare function mergeMcp(current: McpServer, patch: UpdateMcpInput): McpServer;
|
|
16
|
-
export declare function applyMcpAppFlag(server: McpServer, appId: AppId, enabled: boolean): McpServer;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{normalizeAppFlags as s}from"../constants.js";import{createId as i}from"../utils/id.js";function d(p){return{id:i("mcp"),name:p.name,server:p.server,description:p.description,apps:s(p.apps)}}function c(p,e){return{...p,name:e.name??p.name,server:e.server??p.server,description:e.description??p.description,apps:e.apps?{...p.apps,...s({...p.apps,...e.apps})}:p.apps}}function l(p,e,a){const o=e==="claude"?"claudecode":e,r={...p.apps,[o]:a,claude:!1};return{...p,apps:r}}export{l as applyMcpAppFlag,d as buildMcpFromInput,c as mergeMcp};
|
|
2
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AppId, McpServer } from "../types.js";
|
|
2
|
-
export interface CreateMcpServerInput {
|
|
3
|
-
name: string;
|
|
4
|
-
server: McpServer["server"];
|
|
5
|
-
description?: string;
|
|
6
|
-
apps?: Partial<McpServer["apps"]>;
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateMcpServerInput {
|
|
9
|
-
name?: string;
|
|
10
|
-
server?: McpServer["server"];
|
|
11
|
-
description?: string;
|
|
12
|
-
apps?: Partial<McpServer["apps"]>;
|
|
13
|
-
}
|
|
14
|
-
export declare function syncMcpServerToApps(server: McpServer, adapters: Record<AppId, {
|
|
15
|
-
syncServer(server: McpServer): Promise<void>;
|
|
16
|
-
removeServer(server: McpServer): Promise<void>;
|
|
17
|
-
}>): Promise<void>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AppId, AppFlags, InstalledSkill } from "../types.js";
|
|
2
|
-
export interface CreateSkillInput {
|
|
3
|
-
name?: string;
|
|
4
|
-
sourceDir: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
apps?: Partial<AppFlags>;
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateSkillInput {
|
|
9
|
-
name?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
apps?: Partial<AppFlags>;
|
|
12
|
-
}
|
|
13
|
-
export declare function buildSkillFromInput(input: CreateSkillInput): InstalledSkill;
|
|
14
|
-
export declare function mergeSkill(current: InstalledSkill, patch: UpdateSkillInput): InstalledSkill;
|
|
15
|
-
export declare function skillSourceDir(ssotSkillsDir: string, skill: InstalledSkill): string;
|
|
16
|
-
export declare function applySkillAppFlag(skill: InstalledSkill, appId: AppId, enabled: boolean): InstalledSkill;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import s from"node:path";import{normalizeAppFlags as e}from"../constants.js";import{createId as n,toNameFromPath as l}from"../utils/id.js";function c(o){return{id:n("skill"),name:o.name??l(o.sourceDir),directory:o.sourceDir,description:o.description,apps:e(o.apps),installedAt:Date.now()}}function f(o,p){return{...o,name:p.name??o.name,description:p.description??o.description,apps:p.apps?{...o.apps,...e({...o.apps,...p.apps})}:o.apps}}function u(o,p){return s.join(o,p.id)}function k(o,p,i){const a=p==="claude"?"claudecode":p,r={...o.apps,[a]:i,claude:!1};return{...o,apps:r}}export{k as applySkillAppFlag,c as buildSkillFromInput,f as mergeSkill,u as skillSourceDir};
|
|
2
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AppId, InstalledSkill, SkillSyncMethod } from "../types.js";
|
|
2
|
-
export interface CreateSkillInput {
|
|
3
|
-
sourceDir: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
apps?: Partial<InstalledSkill["apps"]>;
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateSkillInput {
|
|
9
|
-
name?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
apps?: Partial<InstalledSkill["apps"]>;
|
|
12
|
-
}
|
|
13
|
-
export declare function syncSkillToApps(skill: InstalledSkill, sourceDir: string, skillSyncMethod: SkillSyncMethod, adapters: Record<AppId, {
|
|
14
|
-
syncSkill(skill: InstalledSkill, sourceDir: string, method: SkillSyncMethod): Promise<void>;
|
|
15
|
-
removeSkill(skill: InstalledSkill): Promise<void>;
|
|
16
|
-
}>): Promise<void>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{readJsonFile as a,writeJsonFile as r}from"./utils/fs.js";import{sdkStateSchema as o}from"./schemas.js";async function c(e){const s=await a(e,{mcpServers:{},skills:{}}),t=o.safeParse(s);return t.success?t.data:{mcpServers:{},skills:{}}}async function l(e,s){await r(e,s)}export{c as loadState,l as saveState};
|
|
2
|
-
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export type AppId = "acode" | "claude" | "claudecode" | "codex" | "gemini" | "opencode" | "openclaw";
|
|
2
|
-
export type McpServerType = "stdio" | "sse" | "http";
|
|
3
|
-
export interface McpServerSpec {
|
|
4
|
-
type?: McpServerType;
|
|
5
|
-
command?: string;
|
|
6
|
-
args?: string[];
|
|
7
|
-
env?: Record<string, string>;
|
|
8
|
-
cwd?: string;
|
|
9
|
-
url?: string;
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
[key: string]: unknown;
|
|
12
|
-
}
|
|
13
|
-
export interface AppFlags {
|
|
14
|
-
acode: boolean;
|
|
15
|
-
claude: boolean;
|
|
16
|
-
claudecode: boolean;
|
|
17
|
-
codex: boolean;
|
|
18
|
-
gemini: boolean;
|
|
19
|
-
opencode: boolean;
|
|
20
|
-
openclaw: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface McpServer {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
server: McpServerSpec;
|
|
26
|
-
description?: string;
|
|
27
|
-
apps: AppFlags;
|
|
28
|
-
}
|
|
29
|
-
export interface InstalledSkill {
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
directory: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
apps: AppFlags;
|
|
35
|
-
installedAt: number;
|
|
36
|
-
}
|
|
37
|
-
export type SkillSyncMethod = "auto" | "symlink" | "copy";
|
|
38
|
-
export interface SdkState {
|
|
39
|
-
mcpServers: Record<string, McpServer>;
|
|
40
|
-
skills: Record<string, InstalledSkill>;
|
|
41
|
-
}
|
|
42
|
-
export interface SdkPaths {
|
|
43
|
-
stateFile: string;
|
|
44
|
-
backupDir: string;
|
|
45
|
-
claudeConfigFile: string;
|
|
46
|
-
claudeSkillsDir: string;
|
|
47
|
-
claudecodeConfigFile: string;
|
|
48
|
-
claudecodeSkillsDir: string;
|
|
49
|
-
codexConfigFile: string;
|
|
50
|
-
codexSkillsDir: string;
|
|
51
|
-
acodeConfigFile: string;
|
|
52
|
-
acodeSkillsDir: string;
|
|
53
|
-
opencodeConfigFile: string;
|
|
54
|
-
opencodeSkillsDir: string;
|
|
55
|
-
ssotSkillsDir: string;
|
|
56
|
-
}
|
|
57
|
-
export interface AdapterOverrides {
|
|
58
|
-
mcp?: Partial<Record<AppId, IMcpAdapter>>;
|
|
59
|
-
skill?: Partial<Record<AppId, ISkillAdapter>>;
|
|
60
|
-
}
|
|
61
|
-
export interface SdkOptions {
|
|
62
|
-
rootDir?: string;
|
|
63
|
-
paths?: Partial<SdkPaths>;
|
|
64
|
-
skillSyncMethod?: SkillSyncMethod;
|
|
65
|
-
adapters?: AdapterOverrides;
|
|
66
|
-
}
|
|
67
|
-
export interface IMcpAdapter {
|
|
68
|
-
readonly appId: AppId;
|
|
69
|
-
importServers(): Promise<McpServer[]>;
|
|
70
|
-
syncServer(server: McpServer): Promise<void>;
|
|
71
|
-
removeServer(server: McpServer): Promise<void>;
|
|
72
|
-
}
|
|
73
|
-
export interface ISkillAdapter {
|
|
74
|
-
readonly appId: AppId;
|
|
75
|
-
importSkills(): Promise<Array<Pick<InstalledSkill, "id" | "name" | "directory" | "description">>>;
|
|
76
|
-
syncSkill(skill: InstalledSkill, sourceDir: string, method: SkillSyncMethod): Promise<void>;
|
|
77
|
-
removeSkill(skill: InstalledSkill): Promise<void>;
|
|
78
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function pathExists(targetPath: string): Promise<boolean>;
|
|
2
|
-
export declare function ensureDir(targetDir: string): Promise<void>;
|
|
3
|
-
export declare function ensureParentDir(targetPath: string): Promise<void>;
|
|
4
|
-
export declare function readJsonFile<T>(targetPath: string, fallback: T): Promise<T>;
|
|
5
|
-
export declare function writeJsonFile(targetPath: string, data: unknown): Promise<void>;
|
|
6
|
-
export declare function writeTextFile(targetPath: string, content: string): Promise<void>;
|
|
7
|
-
export declare function copyFile(sourcePath: string, targetPath: string): Promise<void>;
|
|
8
|
-
export declare function removeIfExists(targetPath: string): Promise<void>;
|
|
9
|
-
export declare function copyDir(sourceDir: string, targetDir: string): Promise<void>;
|
|
10
|
-
export declare function copyDirIfExists(sourceDir: string, targetDir: string): Promise<boolean>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import e from"node:fs/promises";import o from"node:path";const c=new Map;async function u(i,t){const n=o.resolve(i),a=c.get(n)??Promise.resolve();let r;const s=new Promise(w=>{r=w});c.set(n,a.then(()=>s)),await a;try{await t()}finally{r(),c.get(n)===s&&c.delete(n)}}async function l(i,t){await y(i);const n=o.dirname(i),a=o.basename(i),r=o.join(n,`.${a}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`);await e.writeFile(r,t,"utf-8"),await e.rename(r,i)}async function f(i){try{return await e.access(i),!0}catch{return!1}}async function p(i){await e.mkdir(i,{recursive:!0})}async function y(i){await p(o.dirname(i))}async function v(i,t){if(!await f(i))return t;const n=await e.readFile(i,"utf-8");return JSON.parse(n)}async function E(i,t){await u(i,async()=>{await l(i,`${JSON.stringify(t,null,2)}
|
|
2
|
-
`)})}async function $(i,t){await u(i,async()=>{await l(i,t)})}async function b(i,t){await u(t,async()=>{await y(t),await e.copyFile(i,t)})}async function d(i){await f(i)&&await e.rm(i,{recursive:!0,force:!0})}async function m(i,t){await p(t);const n=await e.readdir(i,{withFileTypes:!0});await Promise.all(n.map(async a=>{const r=o.join(i,a.name),s=o.join(t,a.name);if(a.isDirectory()){await m(r,s);return}if(a.isSymbolicLink()){const w=await e.readlink(r);await e.symlink(w,s);return}await e.copyFile(r,s)}))}function x(i){if(typeof i!="object"||i===null||!("code"in i))return!1;const{code:t}=i;return t==="ENOENT"}async function h(i,t){if(!await f(i))return!1;try{return await m(i,t),!0}catch(n){if(x(n))return await d(t),!1;throw n}}export{m as copyDir,h as copyDirIfExists,b as copyFile,p as ensureDir,y as ensureParentDir,f as pathExists,v as readJsonFile,d as removeIfExists,E as writeJsonFile,$ as writeTextFile};
|
|
3
|
-
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{randomUUID as t}from"node:crypto";function a(){return t().replace(/-/g,"")}function c(e){return`${e}_${t().replace(/-/g,"")}`}function l(e){const r=e.replace(/\\/g,"/").split("/").filter(Boolean);return r[r.length-1]??e}export{c as createId,a as generateId,l as toNameFromPath};
|
|
2
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cc-switch/sdk",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Node SDK for MCP and Skill management",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"default": "./dist/index.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc -p tsconfig.json && node ../../scripts/minify-dist.mjs",
|
|
19
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
20
|
-
"test": "vitest run --config vitest.config.ts",
|
|
21
|
-
"test:watch": "vitest --config vitest.config.ts"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"zod": "^4.1.12"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@types/node": "^20.0.0",
|
|
28
|
-
"typescript": "^5.3.0",
|
|
29
|
-
"vitest": "^2.0.5"
|
|
30
|
-
}
|
|
31
|
-
}
|
package/node_modules/zod/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Colin McDonnell
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="logo.svg" width="200px" align="center" alt="Zod logo" />
|
|
3
|
-
<h1 align="center">Zod</h1>
|
|
4
|
-
<p align="center">
|
|
5
|
-
TypeScript-first schema validation with static type inference
|
|
6
|
-
<br/>
|
|
7
|
-
by <a href="https://x.com/colinhacks">@colinhacks</a>
|
|
8
|
-
</p>
|
|
9
|
-
</p>
|
|
10
|
-
<br/>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="https://github.com/colinhacks/zod/actions?query=branch%3Amain"><img src="https://github.com/colinhacks/zod/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Zod CI status" /></a>
|
|
14
|
-
<a href="https://opensource.org/licenses/MIT" rel="nofollow"><img src="https://img.shields.io/github/license/colinhacks/zod" alt="License"></a>
|
|
15
|
-
<a href="https://www.npmjs.com/package/zod" rel="nofollow"><img src="https://img.shields.io/npm/dw/zod.svg" alt="npm"></a>
|
|
16
|
-
<a href="https://discord.gg/KaSRdyX2vc" rel="nofollow"><img src="https://img.shields.io/discord/893487829802418277?label=Discord&logo=discord&logoColor=white" alt="discord server"></a>
|
|
17
|
-
<a href="https://github.com/colinhacks/zod" rel="nofollow"><img src="https://img.shields.io/github/stars/colinhacks/zod" alt="stars"></a>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
<div align="center">
|
|
21
|
-
<a href="https://zod.dev/api">Docs</a>
|
|
22
|
-
<span> • </span>
|
|
23
|
-
<a href="https://discord.gg/RcG33DQJdf">Discord</a>
|
|
24
|
-
<span> • </span>
|
|
25
|
-
<a href="https://twitter.com/colinhacks">𝕏</a>
|
|
26
|
-
<span> • </span>
|
|
27
|
-
<a href="https://bsky.app/profile/zod.dev">Bluesky</a>
|
|
28
|
-
<br />
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<br/>
|
|
32
|
-
<br/>
|
|
33
|
-
|
|
34
|
-
<h2 align="center">Featured sponsor: Jazz</h2>
|
|
35
|
-
|
|
36
|
-
<div align="center">
|
|
37
|
-
<a href="https://jazz.tools/?utm_source=zod">
|
|
38
|
-
<picture width="85%" >
|
|
39
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/garden-co/jazz/938f6767e46cdfded60e50d99bf3b533f4809c68/homepage/homepage/public/Zod%20sponsor%20message.png">
|
|
40
|
-
<img alt="jazz logo" src="https://raw.githubusercontent.com/garden-co/jazz/938f6767e46cdfded60e50d99bf3b533f4809c68/homepage/homepage/public/Zod%20sponsor%20message.png" width="85%">
|
|
41
|
-
</picture>
|
|
42
|
-
</a>
|
|
43
|
-
<br/>
|
|
44
|
-
<p><sub>Learn more about <a target="_blank" rel="noopener noreferrer" href="mailto:sponsorship@colinhacks.com">featured sponsorships</a></sub></p>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<br/>
|
|
48
|
-
<br/>
|
|
49
|
-
<br/>
|
|
50
|
-
|
|
51
|
-
### [Read the docs →](https://zod.dev/api)
|
|
52
|
-
|
|
53
|
-
<br/>
|
|
54
|
-
<br/>
|
|
55
|
-
|
|
56
|
-
## What is Zod?
|
|
57
|
-
|
|
58
|
-
Zod is a TypeScript-first validation library. Define a schema and parse some data with it. You'll get back a strongly typed, validated result.
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
import * as z from "zod";
|
|
62
|
-
|
|
63
|
-
const User = z.object({
|
|
64
|
-
name: z.string(),
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// some untrusted data...
|
|
68
|
-
const input = {
|
|
69
|
-
/* stuff */
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// the parsed result is validated and type safe!
|
|
73
|
-
const data = User.parse(input);
|
|
74
|
-
|
|
75
|
-
// so you can use it with confidence :)
|
|
76
|
-
console.log(data.name);
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
<br/>
|
|
80
|
-
|
|
81
|
-
## Features
|
|
82
|
-
|
|
83
|
-
- Zero external dependencies
|
|
84
|
-
- Works in Node.js and all modern browsers
|
|
85
|
-
- Tiny: `2kb` core bundle (gzipped)
|
|
86
|
-
- Immutable API: methods return a new instance
|
|
87
|
-
- Concise interface
|
|
88
|
-
- Works with TypeScript and plain JS
|
|
89
|
-
- Built-in JSON Schema conversion
|
|
90
|
-
- Extensive ecosystem
|
|
91
|
-
|
|
92
|
-
<br/>
|
|
93
|
-
|
|
94
|
-
## Installation
|
|
95
|
-
|
|
96
|
-
```sh
|
|
97
|
-
npm install zod
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
<br/>
|
|
101
|
-
|
|
102
|
-
## Basic usage
|
|
103
|
-
|
|
104
|
-
Before you can do anything else, you need to define a schema. For the purposes of this guide, we'll use a simple object schema.
|
|
105
|
-
|
|
106
|
-
```ts
|
|
107
|
-
import * as z from "zod";
|
|
108
|
-
|
|
109
|
-
const Player = z.object({
|
|
110
|
-
username: z.string(),
|
|
111
|
-
xp: z.number(),
|
|
112
|
-
});
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Parsing data
|
|
116
|
-
|
|
117
|
-
Given any Zod schema, use `.parse` to validate an input. If it's valid, Zod returns a strongly-typed _deep clone_ of the input.
|
|
118
|
-
|
|
119
|
-
```ts
|
|
120
|
-
Player.parse({ username: "billie", xp: 100 });
|
|
121
|
-
// => returns { username: "billie", xp: 100 }
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](https://zod.dev/api#refinements) or [transforms](https://zod.dev/api#transforms), you'll need to use the `.parseAsync()` method instead.
|
|
125
|
-
|
|
126
|
-
```ts
|
|
127
|
-
const schema = z.string().refine(async (val) => val.length <= 8);
|
|
128
|
-
|
|
129
|
-
await schema.parseAsync("hello");
|
|
130
|
-
// => "hello"
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Handling errors
|
|
134
|
-
|
|
135
|
-
When validation fails, the `.parse()` method will throw a `ZodError` instance with granular information about the validation issues.
|
|
136
|
-
|
|
137
|
-
```ts
|
|
138
|
-
try {
|
|
139
|
-
Player.parse({ username: 42, xp: "100" });
|
|
140
|
-
} catch (err) {
|
|
141
|
-
if (err instanceof z.ZodError) {
|
|
142
|
-
err.issues;
|
|
143
|
-
/* [
|
|
144
|
-
{
|
|
145
|
-
expected: 'string',
|
|
146
|
-
code: 'invalid_type',
|
|
147
|
-
path: [ 'username' ],
|
|
148
|
-
message: 'Invalid input: expected string'
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
expected: 'number',
|
|
152
|
-
code: 'invalid_type',
|
|
153
|
-
path: [ 'xp' ],
|
|
154
|
-
message: 'Invalid input: expected number'
|
|
155
|
-
}
|
|
156
|
-
] */
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
To avoid a `try/catch` block, you can use the `.safeParse()` method to get back a plain result object containing either the successfully parsed data or a `ZodError`. The result type is a [discriminated union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions), so you can handle both cases conveniently.
|
|
162
|
-
|
|
163
|
-
```ts
|
|
164
|
-
const result = Player.safeParse({ username: 42, xp: "100" });
|
|
165
|
-
if (!result.success) {
|
|
166
|
-
result.error; // ZodError instance
|
|
167
|
-
} else {
|
|
168
|
-
result.data; // { username: string; xp: number }
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](#refine) or [transforms](#transform), you'll need to use the `.safeParseAsync()` method instead.
|
|
173
|
-
|
|
174
|
-
```ts
|
|
175
|
-
const schema = z.string().refine(async (val) => val.length <= 8);
|
|
176
|
-
|
|
177
|
-
await schema.safeParseAsync("hello");
|
|
178
|
-
// => { success: true; data: "hello" }
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Inferring types
|
|
182
|
-
|
|
183
|
-
Zod infers a static type from your schema definitions. You can extract this type with the `z.infer<>` utility and use it however you like.
|
|
184
|
-
|
|
185
|
-
```ts
|
|
186
|
-
const Player = z.object({
|
|
187
|
-
username: z.string(),
|
|
188
|
-
xp: z.number(),
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
// extract the inferred type
|
|
192
|
-
type Player = z.infer<typeof Player>;
|
|
193
|
-
|
|
194
|
-
// use it in your code
|
|
195
|
-
const player: Player = { username: "billie", xp: 100 };
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
In some cases, the input & output types of a schema can diverge. For instance, the `.transform()` API can convert the input from one type to another. In these cases, you can extract the input and output types independently:
|
|
199
|
-
|
|
200
|
-
```ts
|
|
201
|
-
const mySchema = z.string().transform((val) => val.length);
|
|
202
|
-
|
|
203
|
-
type MySchemaIn = z.input<typeof mySchema>;
|
|
204
|
-
// => string
|
|
205
|
-
|
|
206
|
-
type MySchemaOut = z.output<typeof mySchema>; // equivalent to z.infer<typeof mySchema>
|
|
207
|
-
// number
|
|
208
|
-
```
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.z = void 0;
|
|
30
|
-
const z = __importStar(require("./v4/classic/external.cjs"));
|
|
31
|
-
exports.z = z;
|
|
32
|
-
__exportStar(require("./v4/classic/external.cjs"), exports);
|
|
33
|
-
exports.default = z;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("../v4/locales/index.cjs"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../v4/locales/index.cjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../v4/locales/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../v4/locales/index.js";
|