@songtonyli/dsh-cli 0.1.91 → 0.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +8 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.i18n.yaml +18 -12
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +16 -8
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +18 -6
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +19 -4
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +14 -14
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +47 -1
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +27 -5
- package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +7 -0
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +7 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +3 -2
- package/node_modules/@earendil-works/pi-ai/README.md +35 -35
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +59 -71
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +125 -103
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +51 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +57 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +17 -44
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +0 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +42 -54
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +58 -57
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +24 -9
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +4 -11
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +4 -22
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +1 -14
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +9 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/trusted-url.js +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.js +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +144 -111
- 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 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/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-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +7 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +41 -30
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/schema-builders.js +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/typesafe.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/telemetry.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/openrouter-cost.js +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/streaming-json.js +513 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/{typebox-helpers.js → string-enum.js} +5 -6
- package/node_modules/@earendil-works/pi-ai/dist/utils/text.js +9 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +27 -277
- package/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +6 -5
- package/node_modules/@earendil-works/pi-schema/CHANGELOG.md +13 -0
- package/node_modules/@earendil-works/pi-schema/README.md +296 -0
- package/node_modules/@earendil-works/pi-schema/dist/annotations.js +193 -0
- package/node_modules/@earendil-works/pi-schema/dist/builders.js +98 -0
- package/node_modules/@earendil-works/pi-schema/dist/checks.js +447 -0
- package/node_modules/@earendil-works/pi-schema/dist/coerce.js +585 -0
- package/node_modules/@earendil-works/pi-schema/dist/compiler.js +532 -0
- package/node_modules/@earendil-works/pi-schema/dist/explain.js +381 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/index.js +51 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date.js +47 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date_time.js +39 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/duration.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/email.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/hostname.js +38 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_email.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_hostname.js +39 -0
- package/node_modules/{typebox/build/format/idna/format/bidi.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/format/bidi.js} +49 -15
- package/node_modules/{typebox/build/format/idna/format/puny.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/format/puny.js} +36 -8
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/hostname.js +43 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/idn-hostname.js +71 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/index.js +30 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/ascii.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/puny.js +56 -0
- package/node_modules/{typebox/build/format/idna/label/unicode.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/label/unicode.js} +34 -6
- package/node_modules/{typebox/build/format/idna/pattern/pattern.mjs → @earendil-works/pi-schema/dist/formats/typebox/idna/pattern/pattern.js} +34 -6
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv4.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv6.js +36 -0
- package/node_modules/{typebox/build/format/iri.mjs → @earendil-works/pi-schema/dist/formats/typebox/iri.js} +30 -2
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/iri_reference.js +40 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer_uri_fragment.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/regex.js +41 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/relative_json_pointer.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/time.js +60 -0
- package/node_modules/{typebox/build/format/uri.mjs → @earendil-works/pi-schema/dist/formats/typebox/uri.js} +28 -0
- package/node_modules/{typebox/build/format/uri_reference.mjs → @earendil-works/pi-schema/dist/formats/typebox/uri_reference.js} +28 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri_template.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/url.js +36 -0
- package/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uuid.js +37 -0
- package/node_modules/@earendil-works/pi-schema/dist/index.js +5 -0
- package/node_modules/@earendil-works/pi-schema/dist/resolver.js +202 -0
- package/node_modules/@earendil-works/pi-schema/dist/shared.js +33 -0
- package/node_modules/@earendil-works/pi-schema/dist/typebox-static.js +5 -0
- package/node_modules/@earendil-works/pi-schema/dist/types.js +3 -0
- package/node_modules/@earendil-works/pi-schema/dist/validator.js +71 -0
- package/node_modules/@earendil-works/pi-schema/package.json +53 -0
- package/node_modules/@earendil-works/pi-telemetry/package.json +4 -2
- package/node_modules/@shikijs/core/dist/index.mjs +57 -43
- package/node_modules/@shikijs/core/package.json +5 -5
- package/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +2 -3
- package/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +2 -3
- package/node_modules/@shikijs/engine-javascript/dist/index.mjs +1 -1
- package/node_modules/@shikijs/engine-javascript/dist/{string-TLTPtCPs.mjs → string-CFc1qfdw.mjs} +2 -4
- package/node_modules/@shikijs/engine-javascript/package.json +3 -3
- package/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +1 -1
- package/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +6 -4
- package/node_modules/@shikijs/engine-oniguruma/package.json +3 -3
- package/node_modules/@shikijs/langs/package.json +2 -2
- package/node_modules/@shikijs/primitive/dist/index.mjs +30 -33
- package/node_modules/@shikijs/primitive/package.json +3 -3
- package/node_modules/@shikijs/themes/package.json +2 -2
- package/node_modules/@shikijs/types/dist/index.mjs +1 -2
- package/node_modules/@shikijs/types/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -2
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/http2-wrapper/package.json +2 -23
- package/node_modules/http2-wrapper/source/agent.js +70 -4
- package/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
- package/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/shiki/dist/bundle-full.mjs +4 -5
- package/node_modules/shiki/dist/bundle-web.mjs +4 -6
- package/node_modules/shiki/dist/core-unwasm.mjs +1 -2
- package/node_modules/shiki/dist/core.mjs +1 -1
- package/node_modules/shiki/dist/engine-oniguruma-XLVxwJtN.mjs +6 -0
- package/node_modules/shiki/dist/engine-oniguruma.mjs +2 -7
- package/node_modules/shiki/dist/index.mjs +2 -2
- package/node_modules/shiki/dist/{langs-bundle-full-xQVO1Cek.mjs → langs-bundle-full-CSdmXkDy.mjs} +1 -2
- package/node_modules/shiki/dist/langs.mjs +1 -2
- package/node_modules/shiki/dist/{rolldown-runtime-BBjsoOtd.mjs → rolldown-runtime-782esTHO.mjs} +1 -2
- package/node_modules/shiki/dist/themes.mjs +1 -2
- package/node_modules/shiki/dist/wasm.mjs +1 -2
- package/node_modules/shiki/package.json +8 -8
- package/node_modules/tslib/README.md +3 -8
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.es6.js +10 -1
- package/node_modules/tslib/tslib.es6.mjs +10 -1
- package/node_modules/tslib/tslib.js +10 -1
- package/package.json +34 -34
- package/node_modules/typebox/build/compile/code.mjs +0 -65
- package/node_modules/typebox/build/compile/compile.mjs +0 -12
- package/node_modules/typebox/build/compile/index.mjs +0 -14
- package/node_modules/typebox/build/compile/validator.mjs +0 -91
- package/node_modules/typebox/build/error/errors.mjs +0 -18
- package/node_modules/typebox/build/error/index.mjs +0 -1
- package/node_modules/typebox/build/format/_registry.mjs +0 -96
- package/node_modules/typebox/build/format/date.mjs +0 -19
- package/node_modules/typebox/build/format/date_time.mjs +0 -11
- package/node_modules/typebox/build/format/duration.mjs +0 -8
- package/node_modules/typebox/build/format/email.mjs +0 -8
- package/node_modules/typebox/build/format/format.mjs +0 -22
- package/node_modules/typebox/build/format/hostname.mjs +0 -10
- package/node_modules/typebox/build/format/idn_email.mjs +0 -8
- package/node_modules/typebox/build/format/idn_hostname.mjs +0 -11
- package/node_modules/typebox/build/format/idna/hostname.mjs +0 -16
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +0 -43
- package/node_modules/typebox/build/format/idna/index.mjs +0 -2
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +0 -9
- package/node_modules/typebox/build/format/idna/label/puny.mjs +0 -28
- package/node_modules/typebox/build/format/index.mjs +0 -4
- package/node_modules/typebox/build/format/ipv4.mjs +0 -8
- package/node_modules/typebox/build/format/ipv6.mjs +0 -8
- package/node_modules/typebox/build/format/iri_reference.mjs +0 -14
- package/node_modules/typebox/build/format/json_pointer.mjs +0 -9
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +0 -9
- package/node_modules/typebox/build/format/regex.mjs +0 -13
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +0 -9
- package/node_modules/typebox/build/format/time.mjs +0 -32
- package/node_modules/typebox/build/format/uri_template.mjs +0 -9
- package/node_modules/typebox/build/format/url.mjs +0 -8
- package/node_modules/typebox/build/format/uuid.mjs +0 -9
- package/node_modules/typebox/build/guard/emit.mjs +0 -191
- package/node_modules/typebox/build/guard/globals.mjs +0 -90
- package/node_modules/typebox/build/guard/guard.mjs +0 -221
- package/node_modules/typebox/build/guard/index.mjs +0 -6
- package/node_modules/typebox/build/guard/native.mjs +0 -60
- package/node_modules/typebox/build/guard/string.mjs +0 -168
- package/node_modules/typebox/build/index.mjs +0 -14
- package/node_modules/typebox/build/schema/build.mjs +0 -118
- package/node_modules/typebox/build/schema/check.mjs +0 -14
- package/node_modules/typebox/build/schema/compile.mjs +0 -46
- package/node_modules/typebox/build/schema/engine/_context.mjs +0 -124
- package/node_modules/typebox/build/schema/engine/_exact_optional.mjs +0 -20
- package/node_modules/typebox/build/schema/engine/_externals.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/_functions.mjs +0 -65
- package/node_modules/typebox/build/schema/engine/_reducer.mjs +0 -45
- package/node_modules/typebox/build/schema/engine/_refine.mjs +0 -29
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +0 -4
- package/node_modules/typebox/build/schema/engine/_stack.mjs +0 -209
- package/node_modules/typebox/build/schema/engine/_unique.mjs +0 -5
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +0 -60
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +0 -123
- package/node_modules/typebox/build/schema/engine/allOf.mjs +0 -47
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +0 -52
- package/node_modules/typebox/build/schema/engine/boolean.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/const.mjs +0 -30
- package/node_modules/typebox/build/schema/engine/contains.mjs +0 -54
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +0 -45
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +0 -40
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +0 -38
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/enum.mjs +0 -33
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/format.mjs +0 -26
- package/node_modules/typebox/build/schema/engine/if.mjs +0 -47
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -54
- package/node_modules/typebox/build/schema/engine/items.mjs +0 -88
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +0 -42
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/maximum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minContains.mjs +0 -51
- package/node_modules/typebox/build/schema/engine/minItems.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minLength.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/minimum.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/not.mjs +0 -39
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +0 -59
- package/node_modules/typebox/build/schema/engine/pattern.mjs +0 -29
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +0 -45
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +0 -35
- package/node_modules/typebox/build/schema/engine/properties.mjs +0 -75
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +0 -37
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +0 -25
- package/node_modules/typebox/build/schema/engine/ref.mjs +0 -52
- package/node_modules/typebox/build/schema/engine/required.mjs +0 -32
- package/node_modules/typebox/build/schema/engine/schema.mjs +0 -362
- package/node_modules/typebox/build/schema/engine/type.mjs +0 -70
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +0 -51
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +0 -51
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +0 -51
- package/node_modules/typebox/build/schema/errors.mjs +0 -18
- package/node_modules/typebox/build/schema/index.mjs +0 -9
- package/node_modules/typebox/build/schema/intern/index.mjs +0 -1
- package/node_modules/typebox/build/schema/intern/intern.mjs +0 -259
- package/node_modules/typebox/build/schema/parse.mjs +0 -32
- package/node_modules/typebox/build/schema/pointer/index.mjs +0 -2
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +0 -106
- package/node_modules/typebox/build/schema/pointer/pointer_get.mjs +0 -2
- package/node_modules/typebox/build/schema/resolve/index.mjs +0 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +0 -327
- package/node_modules/typebox/build/schema/schema.mjs +0 -11
- package/node_modules/typebox/build/schema/static/_canonical.mjs +0 -2
- package/node_modules/typebox/build/schema/static/_comparer.mjs +0 -2
- package/node_modules/typebox/build/schema/static/_elements.mjs +0 -2
- package/node_modules/typebox/build/schema/static/additionalProperties.mjs +0 -3
- package/node_modules/typebox/build/schema/static/allOf.mjs +0 -2
- package/node_modules/typebox/build/schema/static/anyOf.mjs +0 -2
- package/node_modules/typebox/build/schema/static/const.mjs +0 -2
- package/node_modules/typebox/build/schema/static/enum.mjs +0 -2
- package/node_modules/typebox/build/schema/static/if.mjs +0 -2
- package/node_modules/typebox/build/schema/static/index.mjs +0 -1
- package/node_modules/typebox/build/schema/static/items.mjs +0 -2
- package/node_modules/typebox/build/schema/static/oneOf.mjs +0 -2
- package/node_modules/typebox/build/schema/static/patternProperties.mjs +0 -2
- package/node_modules/typebox/build/schema/static/prefixItems.mjs +0 -2
- package/node_modules/typebox/build/schema/static/properties.mjs +0 -2
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +0 -3
- package/node_modules/typebox/build/schema/static/ref.mjs +0 -3
- package/node_modules/typebox/build/schema/static/required.mjs +0 -3
- package/node_modules/typebox/build/schema/static/schema.mjs +0 -2
- package/node_modules/typebox/build/schema/static/static.mjs +0 -3
- package/node_modules/typebox/build/schema/static/type.mjs +0 -3
- package/node_modules/typebox/build/schema/static/unevaluatedProperties.mjs +0 -3
- package/node_modules/typebox/build/schema/types/_refine.mjs +0 -18
- package/node_modules/typebox/build/schema/types/additionalItems.mjs +0 -14
- package/node_modules/typebox/build/schema/types/additionalProperties.mjs +0 -14
- package/node_modules/typebox/build/schema/types/allOf.mjs +0 -15
- package/node_modules/typebox/build/schema/types/anchor.mjs +0 -12
- package/node_modules/typebox/build/schema/types/anyOf.mjs +0 -15
- package/node_modules/typebox/build/schema/types/const.mjs +0 -12
- package/node_modules/typebox/build/schema/types/contains.mjs +0 -14
- package/node_modules/typebox/build/schema/types/default.mjs +0 -12
- package/node_modules/typebox/build/schema/types/defs.mjs +0 -12
- package/node_modules/typebox/build/schema/types/dependencies.mjs +0 -16
- package/node_modules/typebox/build/schema/types/dependentRequired.mjs +0 -15
- package/node_modules/typebox/build/schema/types/dependentSchemas.mjs +0 -15
- package/node_modules/typebox/build/schema/types/dynamicAnchor.mjs +0 -12
- package/node_modules/typebox/build/schema/types/dynamicRef.mjs +0 -12
- package/node_modules/typebox/build/schema/types/else.mjs +0 -14
- package/node_modules/typebox/build/schema/types/enum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/format.mjs +0 -13
- package/node_modules/typebox/build/schema/types/id.mjs +0 -13
- package/node_modules/typebox/build/schema/types/if.mjs +0 -14
- package/node_modules/typebox/build/schema/types/index.mjs +0 -57
- package/node_modules/typebox/build/schema/types/items.mjs +0 -26
- package/node_modules/typebox/build/schema/types/maxContains.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maxItems.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maxLength.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maxProperties.mjs +0 -13
- package/node_modules/typebox/build/schema/types/maximum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minContains.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minItems.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minLength.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minProperties.mjs +0 -13
- package/node_modules/typebox/build/schema/types/minimum.mjs +0 -13
- package/node_modules/typebox/build/schema/types/multipleOf.mjs +0 -13
- package/node_modules/typebox/build/schema/types/not.mjs +0 -14
- package/node_modules/typebox/build/schema/types/oneOf.mjs +0 -15
- package/node_modules/typebox/build/schema/types/pattern.mjs +0 -14
- package/node_modules/typebox/build/schema/types/patternProperties.mjs +0 -15
- package/node_modules/typebox/build/schema/types/prefixItems.mjs +0 -14
- package/node_modules/typebox/build/schema/types/properties.mjs +0 -15
- package/node_modules/typebox/build/schema/types/propertyNames.mjs +0 -15
- package/node_modules/typebox/build/schema/types/recursiveAnchor.mjs +0 -19
- package/node_modules/typebox/build/schema/types/recursiveRef.mjs +0 -12
- package/node_modules/typebox/build/schema/types/ref.mjs +0 -13
- package/node_modules/typebox/build/schema/types/required.mjs +0 -14
- package/node_modules/typebox/build/schema/types/schema.mjs +0 -14
- package/node_modules/typebox/build/schema/types/then.mjs +0 -14
- package/node_modules/typebox/build/schema/types/type.mjs +0 -15
- package/node_modules/typebox/build/schema/types/unevaluatedItems.mjs +0 -14
- package/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs +0 -14
- package/node_modules/typebox/build/schema/types/uniqueItems.mjs +0 -13
- package/node_modules/typebox/build/system/arguments/arguments.mjs +0 -9
- package/node_modules/typebox/build/system/arguments/index.mjs +0 -1
- package/node_modules/typebox/build/system/environment/environment.mjs +0 -1
- package/node_modules/typebox/build/system/environment/evaluate.mjs +0 -37
- package/node_modules/typebox/build/system/environment/index.mjs +0 -1
- package/node_modules/typebox/build/system/hashing/hash.mjs +0 -232
- package/node_modules/typebox/build/system/hashing/index.mjs +0 -1
- package/node_modules/typebox/build/system/index.mjs +0 -4
- package/node_modules/typebox/build/system/locale/_config.mjs +0 -15
- package/node_modules/typebox/build/system/locale/_locale.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -40
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -40
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -40
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -40
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -39
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -40
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -40
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -40
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -40
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -40
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -40
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -40
- package/node_modules/typebox/build/system/locale/index.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -40
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -40
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -40
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -40
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -40
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -40
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -40
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -40
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -40
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -40
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -40
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -40
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -40
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -40
- package/node_modules/typebox/build/system/memory/assign.mjs +0 -12
- package/node_modules/typebox/build/system/memory/clone.mjs +0 -113
- package/node_modules/typebox/build/system/memory/create.mjs +0 -29
- package/node_modules/typebox/build/system/memory/discard.mjs +0 -18
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
- package/node_modules/typebox/build/system/memory/index.mjs +0 -1
- package/node_modules/typebox/build/system/memory/memory.mjs +0 -7
- package/node_modules/typebox/build/system/memory/metrics.mjs +0 -8
- package/node_modules/typebox/build/system/memory/update.mjs +0 -33
- package/node_modules/typebox/build/system/settings/index.mjs +0 -1
- package/node_modules/typebox/build/system/settings/settings.mjs +0 -36
- package/node_modules/typebox/build/system/system.mjs +0 -6
- package/node_modules/typebox/build/system/unreachable/index.mjs +0 -1
- package/node_modules/typebox/build/system/unreachable/unreachable.mjs +0 -6
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +0 -11
- package/node_modules/typebox/build/type/action/_add_optional.mjs +0 -11
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +0 -11
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +0 -11
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +0 -11
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +0 -11
- package/node_modules/typebox/build/type/action/capitalize.mjs +0 -11
- package/node_modules/typebox/build/type/action/conditional.mjs +0 -13
- package/node_modules/typebox/build/type/action/constructor_parameters.mjs +0 -11
- package/node_modules/typebox/build/type/action/evaluate.mjs +0 -11
- package/node_modules/typebox/build/type/action/exclude.mjs +0 -11
- package/node_modules/typebox/build/type/action/extract.mjs +0 -11
- package/node_modules/typebox/build/type/action/index.mjs +0 -30
- package/node_modules/typebox/build/type/action/indexed.mjs +0 -14
- package/node_modules/typebox/build/type/action/instance_type.mjs +0 -11
- package/node_modules/typebox/build/type/action/interface.mjs +0 -22
- package/node_modules/typebox/build/type/action/keyof.mjs +0 -11
- package/node_modules/typebox/build/type/action/lowercase.mjs +0 -11
- package/node_modules/typebox/build/type/action/mapped.mjs +0 -13
- package/node_modules/typebox/build/type/action/module.mjs +0 -13
- package/node_modules/typebox/build/type/action/non_nullable.mjs +0 -11
- package/node_modules/typebox/build/type/action/omit.mjs +0 -14
- package/node_modules/typebox/build/type/action/parameters.mjs +0 -11
- package/node_modules/typebox/build/type/action/partial.mjs +0 -11
- package/node_modules/typebox/build/type/action/pick.mjs +0 -14
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -19
- package/node_modules/typebox/build/type/action/required.mjs +0 -11
- package/node_modules/typebox/build/type/action/return_type.mjs +0 -11
- package/node_modules/typebox/build/type/action/uncapitalize.mjs +0 -11
- package/node_modules/typebox/build/type/action/uppercase.mjs +0 -11
- package/node_modules/typebox/build/type/action/with.mjs +0 -11
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +0 -66
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +0 -79
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +0 -33
- package/node_modules/typebox/build/type/engine/call/resolve_target.mjs +0 -27
- package/node_modules/typebox/build/type/engine/conditional/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/conditional/instantiate.mjs +0 -23
- package/node_modules/typebox/build/type/engine/constructor_parameters/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +0 -25
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +0 -16
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +0 -45
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +0 -47
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +0 -47
- package/node_modules/typebox/build/type/engine/cyclic/index.mjs +0 -6
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +0 -31
- package/node_modules/typebox/build/type/engine/cyclic/target.mjs +0 -16
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs +0 -9
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +0 -37
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +0 -18
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +0 -60
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +0 -33
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +0 -56
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +0 -10
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +0 -8
- package/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs +0 -12
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +0 -31
- package/node_modules/typebox/build/type/engine/exclude/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/exclude/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +0 -22
- package/node_modules/typebox/build/type/engine/extract/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/extract/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +0 -22
- package/node_modules/typebox/build/type/engine/helpers/index.mjs +0 -3
- package/node_modules/typebox/build/type/engine/helpers/keys.mjs +0 -8
- package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs +0 -15
- package/node_modules/typebox/build/type/engine/helpers/union.mjs +0 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +0 -14
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +0 -14
- package/node_modules/typebox/build/type/engine/index.mjs +0 -37
- package/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_literal.mjs +0 -5
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +0 -8
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +0 -25
- package/node_modules/typebox/build/type/engine/indexable/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs +0 -14
- package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs +0 -12
- package/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs +0 -18
- package/node_modules/typebox/build/type/engine/indexed/from_array.mjs +0 -35
- package/node_modules/typebox/build/type/engine/indexed/from_object.mjs +0 -40
- package/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs +0 -35
- package/node_modules/typebox/build/type/engine/indexed/from_type.mjs +0 -14
- package/node_modules/typebox/build/type/engine/indexed/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +0 -28
- package/node_modules/typebox/build/type/engine/instance_type/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs +0 -21
- package/node_modules/typebox/build/type/engine/instantiate.mjs +0 -158
- package/node_modules/typebox/build/type/engine/interface/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/interface/instantiate.mjs +0 -23
- package/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs +0 -9
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +0 -8
- package/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs +0 -13
- package/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/intrinsics/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs +0 -52
- package/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs +0 -4
- package/node_modules/typebox/build/type/engine/keyof/from_any.mjs +0 -8
- package/node_modules/typebox/build/type/engine/keyof/from_array.mjs +0 -5
- package/node_modules/typebox/build/type/engine/keyof/from_object.mjs +0 -20
- package/node_modules/typebox/build/type/engine/keyof/from_record.mjs +0 -5
- package/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs +0 -7
- package/node_modules/typebox/build/type/engine/keyof/from_type.mjs +0 -23
- package/node_modules/typebox/build/type/engine/keyof/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +0 -29
- package/node_modules/typebox/build/type/engine/mapped/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/mapped/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +0 -42
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +0 -39
- package/node_modules/typebox/build/type/engine/module/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +0 -36
- package/node_modules/typebox/build/type/engine/non_nullable/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs +0 -22
- package/node_modules/typebox/build/type/engine/object/collapse.mjs +0 -14
- package/node_modules/typebox/build/type/engine/object/from_cyclic.mjs +0 -8
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +0 -22
- package/node_modules/typebox/build/type/engine/object/from_object.mjs +0 -4
- package/node_modules/typebox/build/type/engine/object/from_tuple.mjs +0 -9
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +0 -23
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +0 -19
- package/node_modules/typebox/build/type/engine/object/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/omit/from_type.mjs +0 -18
- package/node_modules/typebox/build/type/engine/omit/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/omit/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +0 -14
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +0 -14
- package/node_modules/typebox/build/type/engine/parameters/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +0 -25
- package/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs +0 -11
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +0 -11
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +0 -20
- package/node_modules/typebox/build/type/engine/partial/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/partial/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/partial/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/patterns/index.mjs +0 -2
- package/node_modules/typebox/build/type/engine/patterns/pattern.mjs +0 -11
- package/node_modules/typebox/build/type/engine/patterns/template.mjs +0 -20
- package/node_modules/typebox/build/type/engine/pick/from_type.mjs +0 -20
- package/node_modules/typebox/build/type/engine/pick/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/pick/instantiate.mjs +0 -16
- package/node_modules/typebox/build/type/engine/priority/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +0 -27
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +0 -14
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +0 -14
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +0 -7
- package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs +0 -11
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +0 -11
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +0 -7
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +0 -25
- package/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/readonly_object/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/record/from_key.mjs +0 -40
- package/node_modules/typebox/build/type/engine/record/from_key_any.mjs +0 -6
- package/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs +0 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +0 -8
- package/node_modules/typebox/build/type/engine/record/from_key_integer.mjs +0 -7
- package/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/record/from_key_literal.mjs +0 -10
- package/node_modules/typebox/build/type/engine/record/from_key_number.mjs +0 -7
- package/node_modules/typebox/build/type/engine/record/from_key_string.mjs +0 -12
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +0 -12
- package/node_modules/typebox/build/type/engine/record/from_key_union.mjs +0 -39
- package/node_modules/typebox/build/type/engine/record/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/record/instantiate.mjs +0 -17
- package/node_modules/typebox/build/type/engine/record/record_create.mjs +0 -7
- package/node_modules/typebox/build/type/engine/ref/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +0 -10
- package/node_modules/typebox/build/type/engine/required/from_cyclic.mjs +0 -11
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +0 -8
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +0 -11
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +0 -20
- package/node_modules/typebox/build/type/engine/required/from_union.mjs +0 -7
- package/node_modules/typebox/build/type/engine/required/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/required/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/rest/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/rest/spread.mjs +0 -19
- package/node_modules/typebox/build/type/engine/return_type/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/return_type/instantiate.mjs +0 -21
- package/node_modules/typebox/build/type/engine/template_literal/create.mjs +0 -5
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +0 -81
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +0 -81
- package/node_modules/typebox/build/type/engine/template_literal/index.mjs +0 -6
- package/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs +0 -15
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +0 -26
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +0 -10
- package/node_modules/typebox/build/type/engine/template_literal/static.mjs +0 -2
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +0 -26
- package/node_modules/typebox/build/type/engine/tuple/to_object.mjs +0 -14
- package/node_modules/typebox/build/type/engine/with/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/with/instantiate.mjs +0 -14
- package/node_modules/typebox/build/type/extends/any.mjs +0 -12
- package/node_modules/typebox/build/type/extends/array.mjs +0 -21
- package/node_modules/typebox/build/type/extends/bigint.mjs +0 -9
- package/node_modules/typebox/build/type/extends/boolean.mjs +0 -9
- package/node_modules/typebox/build/type/extends/constructor.mjs +0 -17
- package/node_modules/typebox/build/type/extends/dependent.mjs +0 -6
- package/node_modules/typebox/build/type/extends/enum.mjs +0 -7
- package/node_modules/typebox/build/type/extends/extends.mjs +0 -17
- package/node_modules/typebox/build/type/extends/extends_left.mjs +0 -80
- package/node_modules/typebox/build/type/extends/extends_right.mjs +0 -49
- package/node_modules/typebox/build/type/extends/function.mjs +0 -17
- package/node_modules/typebox/build/type/extends/index.mjs +0 -2
- package/node_modules/typebox/build/type/extends/inference.mjs +0 -62
- package/node_modules/typebox/build/type/extends/integer.mjs +0 -10
- package/node_modules/typebox/build/type/extends/intersect.mjs +0 -15
- package/node_modules/typebox/build/type/extends/literal.mjs +0 -44
- package/node_modules/typebox/build/type/extends/never.mjs +0 -9
- package/node_modules/typebox/build/type/extends/null.mjs +0 -9
- package/node_modules/typebox/build/type/extends/number.mjs +0 -9
- package/node_modules/typebox/build/type/extends/object.mjs +0 -109
- package/node_modules/typebox/build/type/extends/parameters.mjs +0 -28
- package/node_modules/typebox/build/type/extends/record.mjs +0 -23
- package/node_modules/typebox/build/type/extends/result.mjs +0 -36
- package/node_modules/typebox/build/type/extends/return_type.mjs +0 -9
- package/node_modules/typebox/build/type/extends/string.mjs +0 -9
- package/node_modules/typebox/build/type/extends/symbol.mjs +0 -9
- package/node_modules/typebox/build/type/extends/template_literal.mjs +0 -7
- package/node_modules/typebox/build/type/extends/tuple.mjs +0 -61
- package/node_modules/typebox/build/type/extends/undefined.mjs +0 -10
- package/node_modules/typebox/build/type/extends/union.mjs +0 -24
- package/node_modules/typebox/build/type/extends/unknown.mjs +0 -12
- package/node_modules/typebox/build/type/extends/void.mjs +0 -9
- package/node_modules/typebox/build/type/index.mjs +0 -5
- package/node_modules/typebox/build/type/script/index.mjs +0 -1
- package/node_modules/typebox/build/type/script/mapping.mjs +0 -528
- package/node_modules/typebox/build/type/script/parser.mjs +0 -140
- package/node_modules/typebox/build/type/script/script.mjs +0 -22
- package/node_modules/typebox/build/type/script/token/bigint.mjs +0 -14
- package/node_modules/typebox/build/type/script/token/const.mjs +0 -18
- package/node_modules/typebox/build/type/script/token/ident.mjs +0 -26
- package/node_modules/typebox/build/type/script/token/index.mjs +0 -12
- package/node_modules/typebox/build/type/script/token/integer.mjs +0 -19
- package/node_modules/typebox/build/type/script/token/internal/char.mjs +0 -26
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +0 -15
- package/node_modules/typebox/build/type/script/token/internal/many.mjs +0 -14
- package/node_modules/typebox/build/type/script/token/internal/match.mjs +0 -11
- package/node_modules/typebox/build/type/script/token/internal/optional.mjs +0 -9
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +0 -30
- package/node_modules/typebox/build/type/script/token/internal/trim.mjs +0 -34
- package/node_modules/typebox/build/type/script/token/number.mjs +0 -19
- package/node_modules/typebox/build/type/script/token/rest.mjs +0 -9
- package/node_modules/typebox/build/type/script/token/span.mjs +0 -24
- package/node_modules/typebox/build/type/script/token/string.mjs +0 -20
- package/node_modules/typebox/build/type/script/token/unsigned_integer.mjs +0 -26
- package/node_modules/typebox/build/type/script/token/unsigned_number.mjs +0 -38
- package/node_modules/typebox/build/type/script/token/until.mjs +0 -21
- package/node_modules/typebox/build/type/script/token/until_1.mjs +0 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -60
- package/node_modules/typebox/build/type/types/_immutable.mjs +0 -18
- package/node_modules/typebox/build/type/types/_optional.mjs +0 -18
- package/node_modules/typebox/build/type/types/_readonly.mjs +0 -18
- package/node_modules/typebox/build/type/types/_refine.mjs +0 -36
- package/node_modules/typebox/build/type/types/any.mjs +0 -18
- package/node_modules/typebox/build/type/types/array.mjs +0 -25
- package/node_modules/typebox/build/type/types/bigint.mjs +0 -21
- package/node_modules/typebox/build/type/types/boolean.mjs +0 -17
- package/node_modules/typebox/build/type/types/call.mjs +0 -23
- package/node_modules/typebox/build/type/types/constructor.mjs +0 -24
- package/node_modules/typebox/build/type/types/cyclic.mjs +0 -29
- package/node_modules/typebox/build/type/types/deferred.mjs +0 -16
- package/node_modules/typebox/build/type/types/dependent.mjs +0 -24
- package/node_modules/typebox/build/type/types/enum.mjs +0 -22
- package/node_modules/typebox/build/type/types/function.mjs +0 -25
- package/node_modules/typebox/build/type/types/generic.mjs +0 -17
- package/node_modules/typebox/build/type/types/identifier.mjs +0 -17
- package/node_modules/typebox/build/type/types/index.mjs +0 -51
- package/node_modules/typebox/build/type/types/infer.mjs +0 -20
- package/node_modules/typebox/build/type/types/integer.mjs +0 -21
- package/node_modules/typebox/build/type/types/intersect.mjs +0 -24
- package/node_modules/typebox/build/type/types/literal.mjs +0 -62
- package/node_modules/typebox/build/type/types/never.mjs +0 -22
- package/node_modules/typebox/build/type/types/null.mjs +0 -17
- package/node_modules/typebox/build/type/types/number.mjs +0 -21
- package/node_modules/typebox/build/type/types/object.mjs +0 -28
- package/node_modules/typebox/build/type/types/parameter.mjs +0 -21
- package/node_modules/typebox/build/type/types/properties.mjs +0 -15
- package/node_modules/typebox/build/type/types/record.mjs +0 -66
- package/node_modules/typebox/build/type/types/ref.mjs +0 -18
- package/node_modules/typebox/build/type/types/rest.mjs +0 -17
- package/node_modules/typebox/build/type/types/schema.mjs +0 -15
- package/node_modules/typebox/build/type/types/static.mjs +0 -3
- package/node_modules/typebox/build/type/types/string.mjs +0 -22
- package/node_modules/typebox/build/type/types/symbol.mjs +0 -17
- package/node_modules/typebox/build/type/types/template_literal.mjs +0 -37
- package/node_modules/typebox/build/type/types/this.mjs +0 -17
- package/node_modules/typebox/build/type/types/tuple.mjs +0 -25
- package/node_modules/typebox/build/type/types/undefined.mjs +0 -17
- package/node_modules/typebox/build/type/types/union.mjs +0 -24
- package/node_modules/typebox/build/type/types/unknown.mjs +0 -17
- package/node_modules/typebox/build/type/types/unsafe.mjs +0 -20
- package/node_modules/typebox/build/type/types/void.mjs +0 -17
- package/node_modules/typebox/build/typebox.mjs +0 -85
- package/node_modules/typebox/build/value/assert/assert.mjs +0 -28
- package/node_modules/typebox/build/value/assert/index.mjs +0 -1
- package/node_modules/typebox/build/value/check/check.mjs +0 -11
- package/node_modules/typebox/build/value/check/index.mjs +0 -1
- package/node_modules/typebox/build/value/clean/additional.mjs +0 -6
- package/node_modules/typebox/build/value/clean/clean.mjs +0 -17
- package/node_modules/typebox/build/value/clean/from_array.mjs +0 -8
- package/node_modules/typebox/build/value/clean/from_cyclic.mjs +0 -6
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +0 -26
- package/node_modules/typebox/build/value/clean/from_object.mjs +0 -31
- package/node_modules/typebox/build/value/clean/from_record.mjs +0 -32
- package/node_modules/typebox/build/value/clean/from_ref.mjs +0 -8
- package/node_modules/typebox/build/value/clean/from_tuple.mjs +0 -14
- package/node_modules/typebox/build/value/clean/from_type.mjs +0 -21
- package/node_modules/typebox/build/value/clean/from_union.mjs +0 -12
- package/node_modules/typebox/build/value/clean/index.mjs +0 -1
- package/node_modules/typebox/build/value/clone/clone.mjs +0 -12
- package/node_modules/typebox/build/value/clone/index.mjs +0 -1
- package/node_modules/typebox/build/value/codec/callback.mjs +0 -25
- package/node_modules/typebox/build/value/codec/decode.mjs +0 -52
- package/node_modules/typebox/build/value/codec/encode.mjs +0 -52
- package/node_modules/typebox/build/value/codec/from_array.mjs +0 -35
- package/node_modules/typebox/build/value/codec/from_cyclic.mjs +0 -8
- package/node_modules/typebox/build/value/codec/from_intersect.mjs +0 -58
- package/node_modules/typebox/build/value/codec/from_object.mjs +0 -42
- package/node_modules/typebox/build/value/codec/from_record.mjs +0 -39
- package/node_modules/typebox/build/value/codec/from_ref.mjs +0 -31
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +0 -32
- package/node_modules/typebox/build/value/codec/from_type.mjs +0 -22
- package/node_modules/typebox/build/value/codec/from_union.mjs +0 -39
- package/node_modules/typebox/build/value/codec/has.mjs +0 -93
- package/node_modules/typebox/build/value/codec/index.mjs +0 -3
- package/node_modules/typebox/build/value/convert/convert.mjs +0 -15
- package/node_modules/typebox/build/value/convert/from_additional.mjs +0 -18
- package/node_modules/typebox/build/value/convert/from_array.mjs +0 -7
- package/node_modules/typebox/build/value/convert/from_bigint.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_boolean.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_cyclic.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_enum.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_integer.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/value/convert/from_literal.mjs +0 -44
- package/node_modules/typebox/build/value/convert/from_null.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_number.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_object.mjs +0 -28
- package/node_modules/typebox/build/value/convert/from_record.mjs +0 -23
- package/node_modules/typebox/build/value/convert/from_ref.mjs +0 -8
- package/node_modules/typebox/build/value/convert/from_string.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_tuple.mjs +0 -11
- package/node_modules/typebox/build/value/convert/from_type.mjs +0 -43
- package/node_modules/typebox/build/value/convert/from_undefined.mjs +0 -6
- package/node_modules/typebox/build/value/convert/from_union.mjs +0 -13
- package/node_modules/typebox/build/value/convert/from_void.mjs +0 -6
- package/node_modules/typebox/build/value/convert/index.mjs +0 -1
- package/node_modules/typebox/build/value/convert/try/index.mjs +0 -1
- package/node_modules/typebox/build/value/convert/try/try.mjs +0 -8
- package/node_modules/typebox/build/value/convert/try/try_array.mjs +0 -6
- package/node_modules/typebox/build/value/convert/try/try_bigint.mjs +0 -45
- package/node_modules/typebox/build/value/convert/try/try_boolean.mjs +0 -41
- package/node_modules/typebox/build/value/convert/try/try_null.mjs +0 -44
- package/node_modules/typebox/build/value/convert/try/try_number.mjs +0 -44
- package/node_modules/typebox/build/value/convert/try/try_result.mjs +0 -17
- package/node_modules/typebox/build/value/convert/try/try_string.mjs +0 -12
- package/node_modules/typebox/build/value/convert/try/try_undefined.mjs +0 -44
- package/node_modules/typebox/build/value/create/create.mjs +0 -11
- package/node_modules/typebox/build/value/create/error.mjs +0 -7
- package/node_modules/typebox/build/value/create/from_array.mjs +0 -10
- package/node_modules/typebox/build/value/create/from_bigint.mjs +0 -7
- package/node_modules/typebox/build/value/create/from_boolean.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_constructor.mjs +0 -10
- package/node_modules/typebox/build/value/create/from_cyclic.mjs +0 -6
- package/node_modules/typebox/build/value/create/from_default.mjs +0 -10
- package/node_modules/typebox/build/value/create/from_enum.mjs +0 -6
- package/node_modules/typebox/build/value/create/from_function.mjs +0 -6
- package/node_modules/typebox/build/value/create/from_integer.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_literal.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_never.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_null.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_number.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_object.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_record.mjs +0 -8
- package/node_modules/typebox/build/value/create/from_ref.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_string.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_symbol.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_template_literal.mjs +0 -11
- package/node_modules/typebox/build/value/create/from_tuple.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_type.mjs +0 -61
- package/node_modules/typebox/build/value/create/from_undefined.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_union.mjs +0 -9
- package/node_modules/typebox/build/value/create/from_void.mjs +0 -4
- package/node_modules/typebox/build/value/create/index.mjs +0 -2
- package/node_modules/typebox/build/value/default/default.mjs +0 -15
- package/node_modules/typebox/build/value/default/from_array.mjs +0 -12
- package/node_modules/typebox/build/value/default/from_cyclic.mjs +0 -7
- package/node_modules/typebox/build/value/default/from_default.mjs +0 -13
- package/node_modules/typebox/build/value/default/from_intersect.mjs +0 -9
- package/node_modules/typebox/build/value/default/from_object.mjs +0 -32
- package/node_modules/typebox/build/value/default/from_record.mjs +0 -26
- package/node_modules/typebox/build/value/default/from_ref.mjs +0 -9
- package/node_modules/typebox/build/value/default/from_tuple.mjs +0 -14
- package/node_modules/typebox/build/value/default/from_type.mjs +0 -25
- package/node_modules/typebox/build/value/default/from_union.mjs +0 -14
- package/node_modules/typebox/build/value/default/index.mjs +0 -1
- package/node_modules/typebox/build/value/delta/diff.mjs +0 -135
- package/node_modules/typebox/build/value/delta/edit.mjs +0 -17
- package/node_modules/typebox/build/value/delta/index.mjs +0 -3
- package/node_modules/typebox/build/value/delta/patch.mjs +0 -42
- package/node_modules/typebox/build/value/equal/equal.mjs +0 -6
- package/node_modules/typebox/build/value/equal/index.mjs +0 -1
- package/node_modules/typebox/build/value/errors/errors.mjs +0 -12
- package/node_modules/typebox/build/value/errors/index.mjs +0 -1
- package/node_modules/typebox/build/value/hash/hash.mjs +0 -10
- package/node_modules/typebox/build/value/hash/index.mjs +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -29
- package/node_modules/typebox/build/value/parse/index.mjs +0 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +0 -47
- package/node_modules/typebox/build/value/pipeline/index.mjs +0 -1
- package/node_modules/typebox/build/value/pipeline/pipeline.mjs +0 -15
- package/node_modules/typebox/build/value/pointer/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/error.mjs +0 -8
- package/node_modules/typebox/build/value/repair/from_array.mjs +0 -39
- package/node_modules/typebox/build/value/repair/from_enum.mjs +0 -6
- package/node_modules/typebox/build/value/repair/from_intersect.mjs +0 -8
- package/node_modules/typebox/build/value/repair/from_object.mjs +0 -33
- package/node_modules/typebox/build/value/repair/from_record.mjs +0 -33
- package/node_modules/typebox/build/value/repair/from_ref.mjs +0 -9
- package/node_modules/typebox/build/value/repair/from_template_literal.mjs +0 -7
- package/node_modules/typebox/build/value/repair/from_tuple.mjs +0 -12
- package/node_modules/typebox/build/value/repair/from_type.mjs +0 -88
- package/node_modules/typebox/build/value/repair/from_union.mjs +0 -24
- package/node_modules/typebox/build/value/repair/from_unknown.mjs +0 -12
- package/node_modules/typebox/build/value/repair/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/repair.mjs +0 -20
- package/node_modules/typebox/build/value/shared/index.mjs +0 -4
- package/node_modules/typebox/build/value/shared/optional_undefined.mjs +0 -15
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +0 -72
- package/node_modules/typebox/build/value/shared/union_score_select.mjs +0 -51
- package/node_modules/typebox/build/value/value.mjs +0 -15
- package/node_modules/typebox/package.json +0 -87
- package/node_modules/typebox/readme.md +0 -371
- /package/node_modules/{typebox/license → @earendil-works/pi-schema/LICENSES/typebox-LICENSE} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// This file is auto-generated by
|
|
1
|
+
// This file is auto-generated by catalog/generate.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/xiaomi-token-plan-sgp.json" with { type: "json" };
|
|
4
4
|
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// This file is auto-generated by
|
|
1
|
+
// This file is auto-generated by catalog/generate.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/xiaomi.json" with { type: "json" };
|
|
4
4
|
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// This file is auto-generated by
|
|
1
|
+
// This file is auto-generated by catalog/generate.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/zai-coding-cn.json" with { type: "json" };
|
|
4
4
|
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// This file is auto-generated by
|
|
1
|
+
// This file is auto-generated by catalog/generate.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/zai.json" with { type: "json" };
|
|
4
4
|
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createTypedMetrics, createTypedSpanStarter, defineTelemetrySchema, NOOP_TELEMETRY_CONTEXT, NOOP_TELEMETRY_METRICS, } from "@earendil-works/pi-telemetry";
|
|
2
|
+
import { ownedSlice } from "./utils/text.js";
|
|
2
3
|
const provider = { type: "string", description: "Provider identifier.", required: true };
|
|
3
4
|
const model = { type: "string", description: "Requested model identifier.", required: true };
|
|
4
5
|
const stop = {
|
|
@@ -172,7 +173,7 @@ export function observeModelRequest(requestedModel, options, poll) {
|
|
|
172
173
|
if (message.stopReason === "error") {
|
|
173
174
|
span.setStatus({
|
|
174
175
|
status: "error",
|
|
175
|
-
error: { name: "provider_error", message: message.errorMessage
|
|
176
|
+
error: { name: "provider_error", message: ownedSlice(message.errorMessage ?? "", 0, 500) },
|
|
176
177
|
});
|
|
177
178
|
}
|
|
178
179
|
requestDuration.record(performance.now() - started, { ...attributes, stop: message.stopReason }, span);
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// composes into its display string. The `messageCarriesBody` flag captures the
|
|
13
13
|
// Anthropic / `@google/genai` happy path where the SDK already folded the body
|
|
14
14
|
// into the message, so providers can preserve it without double-printing.
|
|
15
|
+
import { ownedSlice } from "./text.js";
|
|
15
16
|
export const MAX_PROVIDER_ERROR_BODY_CHARS = 4000;
|
|
16
17
|
export function normalizeProviderError(error) {
|
|
17
18
|
if (!(error instanceof Error)) {
|
|
@@ -119,7 +120,7 @@ export function formatProviderError(norm, prefix) {
|
|
|
119
120
|
export function truncateErrorText(text, maxChars) {
|
|
120
121
|
if (text.length <= maxChars)
|
|
121
122
|
return text;
|
|
122
|
-
return `${text
|
|
123
|
+
return `${ownedSlice(text, 0, maxChars)}... [truncated ${text.length - maxChars} chars]`;
|
|
123
124
|
}
|
|
124
125
|
export function safeJsonStringify(value) {
|
|
125
126
|
try {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function isValidCost(value) {
|
|
2
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
3
|
+
}
|
|
4
|
+
export function isOpenRouterModel(model) {
|
|
5
|
+
return model.provider === "openrouter" || model.baseUrl.includes("openrouter.ai");
|
|
6
|
+
}
|
|
7
|
+
/** Replace the catalog total with OpenRouter's billed cost when the response contains complete, valid accounting. */
|
|
8
|
+
export function applyOpenRouterReportedCost(usage, reported) {
|
|
9
|
+
if (!isValidCost(reported.cost))
|
|
10
|
+
return;
|
|
11
|
+
if (reported.is_byok === false) {
|
|
12
|
+
usage.cost.total = reported.cost;
|
|
13
|
+
usage.cost.totalFromProvider = true;
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (reported.is_byok === true) {
|
|
17
|
+
const details = reported.cost_details;
|
|
18
|
+
if (!details)
|
|
19
|
+
return;
|
|
20
|
+
let upstreamCost = details.upstream_inference_cost;
|
|
21
|
+
if (upstreamCost === null) {
|
|
22
|
+
if (!isValidCost(details.upstream_inference_prompt_cost) ||
|
|
23
|
+
!isValidCost(details.upstream_inference_completions_cost)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
upstreamCost = details.upstream_inference_prompt_cost + details.upstream_inference_completions_cost;
|
|
27
|
+
}
|
|
28
|
+
if (!isValidCost(upstreamCost))
|
|
29
|
+
return;
|
|
30
|
+
usage.cost.total = reported.cost + upstreamCost;
|
|
31
|
+
usage.cost.totalFromProvider = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=openrouter-cost.js.map
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* - Anthropic: "413 {\"error\":{\"type\":\"request_too_large\",\"message\":\"Request exceeds the maximum size\"}}"
|
|
11
11
|
* - OpenAI: "Your input exceeds the context window of this model"
|
|
12
12
|
* - OpenAI/LiteLLM: "Requested token count exceeds the model's maximum context length of 131072 tokens"
|
|
13
|
+
* - LiteLLM pre-call check: "litellm.ContextWindowExceededError: ... Context Window exceeded for given call."
|
|
13
14
|
* - OpenAI-compatible: "Input length (265330) exceeds model's maximum context length (262144)."
|
|
14
15
|
* - Google: "The input token count (1196265) exceeds the maximum number of tokens allowed (1048575)"
|
|
15
16
|
* - xAI: "This model's maximum prompt length is 131072 but the request contains 537812 tokens"
|
|
@@ -40,6 +41,7 @@ const OVERFLOW_PATTERNS = [
|
|
|
40
41
|
/input is too long for requested model/i, // Amazon Bedrock
|
|
41
42
|
/exceeds the context window/i, // OpenAI (Completions & Responses API)
|
|
42
43
|
/exceeds (?:the )?(?:model'?s )?maximum context length(?: of [\d,]+ tokens?|\s*\([\d,]+\))/i, // OpenAI-compatible proxies (LiteLLM)
|
|
44
|
+
/context window exceeded/i, // LiteLLM pre-call check (ContextWindowExceededError)
|
|
43
45
|
/input token count.*exceeds the maximum/i, // Google (Gemini)
|
|
44
46
|
/maximum prompt length is \d+/i, // xAI (Grok)
|
|
45
47
|
/reduce the length of the messages/i, // Groq
|
|
@@ -22,6 +22,9 @@ const NON_RETRYABLE_PROVIDER_LIMIT_ERROR_PATTERN = buildProviderErrorPattern([
|
|
|
22
22
|
// Sign in with ChatGPT on a ChatGPT Business plan: a usage limit set by the
|
|
23
23
|
// workspace admin. Only the admin can raise it.
|
|
24
24
|
"subscription_sharing_workplace_individual_usage_limit_exceeded",
|
|
25
|
+
// Zhipu/Z.ai (open.bigmodel.cn) error code 1308: the plan's usage limit is
|
|
26
|
+
// reached, sent as HTTP 429. It resets after hours, not seconds (#11537).
|
|
27
|
+
'"code"\\s*:\\s*"?1308(?![0-9])',
|
|
25
28
|
]);
|
|
26
29
|
const RETRYABLE_PROVIDER_ERROR_PATTERN = buildProviderErrorPattern([
|
|
27
30
|
// Generic provider load, HTTP status, and server-side transient failures.
|
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incremental, tolerant parsing of JSON text that arrives in pieces, such as streamed tool-call arguments.
|
|
3
|
+
*
|
|
4
|
+
* `StreamingJsonParser.append()` reads each piece once, so a stream costs time and memory linear in its length, and
|
|
5
|
+
* `snapshot()` returns the value of the text read so far. Snapshots are plain JSON values and never change once
|
|
6
|
+
* returned: the parser copies the containers that are still open (the "open path") into every new snapshot and shares
|
|
7
|
+
* completed containers and strings. The rules for incomplete text follow `parseStreamingJson()`:
|
|
8
|
+
*
|
|
9
|
+
* - An unterminated string shows the characters read so far; an unterminated escape is held back until complete.
|
|
10
|
+
* - An unterminated container shows the members and elements read so far.
|
|
11
|
+
* - A member whose key or value has not started is omitted.
|
|
12
|
+
* - An unterminated literal shows its value once it is a prefix of `true`, `false` or `null`; an unterminated number
|
|
13
|
+
* shows its value when the digits read so far form a number (an exponent without digits is ignored).
|
|
14
|
+
*
|
|
15
|
+
* Malformed text is read leniently, the way `repairJson()` and `parseStreamingJson()` treat it: raw control characters
|
|
16
|
+
* in strings are kept, an invalid escape such as `\d` stays literal text, missing commas and colons are tolerated,
|
|
17
|
+
* values in invalid positions and unknown words are dropped, and text after the root value is ignored. The parser never
|
|
18
|
+
* throws. Callers that need the exact value of the finished text parse it once, e.g. with `parseToolCallArguments()`.
|
|
19
|
+
*
|
|
20
|
+
* Differences from `parseStreamingJson()` on incomplete text: trailing whitespace inside an unterminated string is
|
|
21
|
+
* kept (it was trimmed), a string that contains a raw control character or an invalid escape stays visible while it
|
|
22
|
+
* streams (it was dropped until the document was complete), and `NaN` and `Infinity` words are dropped.
|
|
23
|
+
*
|
|
24
|
+
* `append()` also returns the changes the piece made, for a writer that keeps its own copy of the value and applies
|
|
25
|
+
* them instead of re-assigning snapshots: `set` when a key, an array item or a finished value appears (a new string is
|
|
26
|
+
* set once with its first text, a container empty), `append` when the piece extended an open string. Unterminated
|
|
27
|
+
* numbers and literals are not reported until they end. A container nested more than 32 levels deep is reported as one
|
|
28
|
+
* `set` of its whole value when it closes, so paths stay short.
|
|
29
|
+
*
|
|
30
|
+
* Cost: copying the open path costs its member and element count. Each `append()` earns copy credit proportional to its
|
|
31
|
+
* length plus a constant; `snapshot()` spends it and returns the previous snapshot while the open path costs more than
|
|
32
|
+
* the credit. So a document that keeps a very large container open (thousands of elements) shows a preview that lags
|
|
33
|
+
* a little behind the text, and no input makes the total work grow faster than the text.
|
|
34
|
+
*/
|
|
35
|
+
import { parseToolCallArguments } from "./json-parse.js";
|
|
36
|
+
// Changes are reported at most this deep, so a path costs O(1) to build.
|
|
37
|
+
const MAX_REPORTED_DEPTH = 32;
|
|
38
|
+
const ROOT_SLOT = { kind: "root" };
|
|
39
|
+
// Copy credit per append and per appended character. The floor keeps small documents fresh at every snapshot.
|
|
40
|
+
const CREDIT_PER_APPEND = 256;
|
|
41
|
+
const CREDIT_PER_CHARACTER = 8;
|
|
42
|
+
// An unterminated number longer than this is not shown until it ends, so `snapshot()` stays cheap.
|
|
43
|
+
const MAX_PENDING_SCALAR_LENGTH = 64;
|
|
44
|
+
const NUMBER = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
|
|
45
|
+
const NUMBER_WITHOUT_EXPONENT_DIGITS = /^(-?(?:0|[1-9]\d*)(?:\.\d+)?)[eE][+-]?$/;
|
|
46
|
+
const LITERALS = [
|
|
47
|
+
["true", true],
|
|
48
|
+
["false", false],
|
|
49
|
+
["null", null],
|
|
50
|
+
];
|
|
51
|
+
const QUOTE = 0x22;
|
|
52
|
+
const BACKSLASH = 0x5c;
|
|
53
|
+
/** Incremental, tolerant JSON parser; see the module comment for its rules and costs. */
|
|
54
|
+
export class StreamingJsonParser {
|
|
55
|
+
#root = undefined;
|
|
56
|
+
#done = false;
|
|
57
|
+
#stack = [];
|
|
58
|
+
#string = undefined;
|
|
59
|
+
#scalar = "";
|
|
60
|
+
#scalarSlot = undefined;
|
|
61
|
+
/** Sum of `size + 1` over the open path: what a fresh snapshot copies. */
|
|
62
|
+
#pathCost = 0;
|
|
63
|
+
#credit = 0;
|
|
64
|
+
#dirty = false;
|
|
65
|
+
#snapshot = undefined;
|
|
66
|
+
/** Changes of the piece being read. */
|
|
67
|
+
#changes = [];
|
|
68
|
+
/**
|
|
69
|
+
* Read the next piece of text; returns the changes it made, in order. Costs time linear in `text.length`.
|
|
70
|
+
*/
|
|
71
|
+
append(text) {
|
|
72
|
+
this.#credit += CREDIT_PER_APPEND + CREDIT_PER_CHARACTER * text.length;
|
|
73
|
+
this.#changes = [];
|
|
74
|
+
if (this.#string !== undefined)
|
|
75
|
+
this.#string.change = undefined;
|
|
76
|
+
let index = 0;
|
|
77
|
+
while (index < text.length && !this.#done) {
|
|
78
|
+
const open = this.#string;
|
|
79
|
+
if (open !== undefined)
|
|
80
|
+
index = this.#readString(open, text, index);
|
|
81
|
+
else if (this.#scalar !== "")
|
|
82
|
+
index = this.#readScalar(text, index);
|
|
83
|
+
else
|
|
84
|
+
this.#structural(text[index++]);
|
|
85
|
+
}
|
|
86
|
+
return this.#changes;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The value of the text read so far: `undefined` before a value starts, otherwise a plain JSON value that never
|
|
90
|
+
* changes afterwards. Returns the previous snapshot while the text read since did not change the value, or while a
|
|
91
|
+
* fresh copy of the open path is not yet paid for (see the module comment).
|
|
92
|
+
*/
|
|
93
|
+
snapshot() {
|
|
94
|
+
if (!this.#dirty)
|
|
95
|
+
return this.#snapshot;
|
|
96
|
+
const pending = this.#pendingScalar();
|
|
97
|
+
const cost = this.#pathCost + (pending === undefined ? 0 : 1);
|
|
98
|
+
if (cost > this.#credit)
|
|
99
|
+
return this.#snapshot;
|
|
100
|
+
this.#credit -= cost;
|
|
101
|
+
this.#dirty = false;
|
|
102
|
+
this.#snapshot = this.#copyOpenPath(pending);
|
|
103
|
+
return this.#snapshot;
|
|
104
|
+
}
|
|
105
|
+
/** Read string characters from `start` until the string ends or the text does; returns the next index. */
|
|
106
|
+
#readString(open, text, start) {
|
|
107
|
+
let runStart = start;
|
|
108
|
+
for (let index = start; index < text.length; index++) {
|
|
109
|
+
const code = text.charCodeAt(index);
|
|
110
|
+
if (open.escape !== "") {
|
|
111
|
+
if (this.#continueEscape(open, text[index])) {
|
|
112
|
+
runStart = index + 1;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
// Not part of the escape: read it as a normal string character below.
|
|
116
|
+
runStart = index;
|
|
117
|
+
}
|
|
118
|
+
if (code === QUOTE) {
|
|
119
|
+
if (index > runStart)
|
|
120
|
+
this.#appendString(open, text.slice(runStart, index));
|
|
121
|
+
this.#endString(open);
|
|
122
|
+
return index + 1;
|
|
123
|
+
}
|
|
124
|
+
if (code === BACKSLASH) {
|
|
125
|
+
if (index > runStart)
|
|
126
|
+
this.#appendString(open, text.slice(runStart, index));
|
|
127
|
+
open.escape = "\\";
|
|
128
|
+
runStart = index + 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (text.length > runStart)
|
|
132
|
+
this.#appendString(open, text.slice(runStart));
|
|
133
|
+
return text.length;
|
|
134
|
+
}
|
|
135
|
+
/** Read number or literal characters from `start` up to the next delimiter; returns the delimiter's index. */
|
|
136
|
+
#readScalar(text, start) {
|
|
137
|
+
let end = start;
|
|
138
|
+
while (end < text.length && !isDelimiter(text[end]))
|
|
139
|
+
end++;
|
|
140
|
+
if (end > start) {
|
|
141
|
+
this.#scalar += text.slice(start, end);
|
|
142
|
+
if (this.#scalarSlot !== undefined)
|
|
143
|
+
this.#dirty = true;
|
|
144
|
+
}
|
|
145
|
+
if (end < text.length)
|
|
146
|
+
this.#endScalar();
|
|
147
|
+
return end;
|
|
148
|
+
}
|
|
149
|
+
/** Handle one character outside strings. */
|
|
150
|
+
#structural(char) {
|
|
151
|
+
switch (char) {
|
|
152
|
+
case " ":
|
|
153
|
+
case "\t":
|
|
154
|
+
case "\n":
|
|
155
|
+
case "\r":
|
|
156
|
+
return;
|
|
157
|
+
case '"':
|
|
158
|
+
this.#startString();
|
|
159
|
+
return;
|
|
160
|
+
case "{":
|
|
161
|
+
case "[":
|
|
162
|
+
this.#openContainer(char === "{" ? {} : []);
|
|
163
|
+
return;
|
|
164
|
+
case "}":
|
|
165
|
+
case "]":
|
|
166
|
+
this.#closeContainer();
|
|
167
|
+
return;
|
|
168
|
+
case ":": {
|
|
169
|
+
const frame = this.#stack.at(-1);
|
|
170
|
+
if (frame !== undefined && !Array.isArray(frame.container) && frame.phase === "colon")
|
|
171
|
+
frame.phase = "value";
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
case ",": {
|
|
175
|
+
const frame = this.#stack.at(-1);
|
|
176
|
+
if (frame !== undefined)
|
|
177
|
+
frame.phase = Array.isArray(frame.container) ? "value" : "key";
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
default:
|
|
181
|
+
this.#scalar = char;
|
|
182
|
+
this.#scalarSlot = this.#valueSlot();
|
|
183
|
+
if (this.#scalarSlot !== undefined)
|
|
184
|
+
this.#dirty = true;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** Where a value starting now goes, or `undefined` when this position takes no value. */
|
|
188
|
+
#valueSlot() {
|
|
189
|
+
const frame = this.#stack.at(-1);
|
|
190
|
+
if (frame === undefined)
|
|
191
|
+
return this.#root === undefined ? ROOT_SLOT : undefined;
|
|
192
|
+
if (Array.isArray(frame.container))
|
|
193
|
+
return { kind: "element", index: frame.container.length };
|
|
194
|
+
// A missing colon is tolerated: `{"a" 1}` reads as `{"a": 1}`.
|
|
195
|
+
if ((frame.phase === "value" || frame.phase === "colon") && frame.key !== undefined) {
|
|
196
|
+
return { kind: "member", key: frame.key };
|
|
197
|
+
}
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
#startString() {
|
|
201
|
+
const frame = this.#stack.at(-1);
|
|
202
|
+
// A missing comma is tolerated: `{"a": 1 "b": 2}` reads the second member.
|
|
203
|
+
if (frame !== undefined &&
|
|
204
|
+
!Array.isArray(frame.container) &&
|
|
205
|
+
(frame.phase === "key" || frame.phase === "comma")) {
|
|
206
|
+
this.#string = { target: "key", slot: undefined, text: "", escape: "", path: undefined, change: undefined };
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const slot = this.#valueSlot();
|
|
210
|
+
const path = this.#reportedPath(slot);
|
|
211
|
+
this.#string = { target: "value", slot, text: "", escape: "", path, change: undefined };
|
|
212
|
+
this.#place(slot, "");
|
|
213
|
+
if (path !== undefined)
|
|
214
|
+
this.#string.change = this.#report({ kind: "set", path, value: "" });
|
|
215
|
+
}
|
|
216
|
+
/** The path of a value at `slot` in the innermost open container, when its changes are reported. */
|
|
217
|
+
#reportedPath(slot) {
|
|
218
|
+
if (slot === undefined)
|
|
219
|
+
return undefined;
|
|
220
|
+
if (slot.kind === "root")
|
|
221
|
+
return [];
|
|
222
|
+
const frame = this.#stack.at(-1);
|
|
223
|
+
if (!frame.reportsInside)
|
|
224
|
+
return undefined;
|
|
225
|
+
return [...frame.path, slot.kind === "member" ? slot.key : slot.index];
|
|
226
|
+
}
|
|
227
|
+
#report(change) {
|
|
228
|
+
this.#changes.push(change);
|
|
229
|
+
return change;
|
|
230
|
+
}
|
|
231
|
+
/** Continue an escape with `char`; returns false when `char` is not part of it and must be read normally. */
|
|
232
|
+
#continueEscape(open, char) {
|
|
233
|
+
if (open.escape === "\\") {
|
|
234
|
+
const decoded = SIMPLE_ESCAPES[char];
|
|
235
|
+
if (decoded !== undefined) {
|
|
236
|
+
open.escape = "";
|
|
237
|
+
this.#appendString(open, decoded);
|
|
238
|
+
return true;
|
|
239
|
+
}
|
|
240
|
+
if (char === "u") {
|
|
241
|
+
open.escape = "\\u";
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
// Invalid escape: keep the backslash as text and read the character normally, as repairJson() does.
|
|
245
|
+
open.escape = "";
|
|
246
|
+
this.#appendString(open, "\\");
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
if (isHexDigit(char)) {
|
|
250
|
+
open.escape += char;
|
|
251
|
+
if (open.escape.length < 6)
|
|
252
|
+
return true;
|
|
253
|
+
const decoded = String.fromCharCode(Number.parseInt(open.escape.slice(2), 16));
|
|
254
|
+
open.escape = "";
|
|
255
|
+
this.#appendString(open, decoded);
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
// `\u` without four hex digits: keep it as text and read the character normally, as repairJson() does.
|
|
259
|
+
const literal = open.escape;
|
|
260
|
+
open.escape = "";
|
|
261
|
+
this.#appendString(open, literal);
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
#appendString(open, text) {
|
|
265
|
+
open.text += text;
|
|
266
|
+
if (open.target !== "value")
|
|
267
|
+
return;
|
|
268
|
+
this.#place(open.slot, open.text);
|
|
269
|
+
if (open.path === undefined)
|
|
270
|
+
return;
|
|
271
|
+
// Extend this string's newest change while nothing came after it; otherwise report an append.
|
|
272
|
+
const change = open.change;
|
|
273
|
+
if (change !== undefined && this.#changes.at(-1) === change) {
|
|
274
|
+
if (change.kind === "set")
|
|
275
|
+
change.value = change.value + text;
|
|
276
|
+
else
|
|
277
|
+
change.text += text;
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
open.change = this.#report({ kind: "append", path: open.path, text });
|
|
281
|
+
}
|
|
282
|
+
#endString(open) {
|
|
283
|
+
this.#string = undefined;
|
|
284
|
+
const frame = this.#stack.at(-1);
|
|
285
|
+
if (open.target === "key") {
|
|
286
|
+
if (frame === undefined)
|
|
287
|
+
return;
|
|
288
|
+
frame.key = open.text;
|
|
289
|
+
frame.phase = "colon";
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
this.#valueEnded(frame);
|
|
293
|
+
}
|
|
294
|
+
#endScalar() {
|
|
295
|
+
const token = this.#scalar;
|
|
296
|
+
const slot = this.#scalarSlot;
|
|
297
|
+
this.#scalar = "";
|
|
298
|
+
this.#scalarSlot = undefined;
|
|
299
|
+
const value = scalarValue(token);
|
|
300
|
+
if (value !== undefined) {
|
|
301
|
+
this.#place(slot, value);
|
|
302
|
+
const path = this.#reportedPath(slot);
|
|
303
|
+
if (path !== undefined)
|
|
304
|
+
this.#report({ kind: "set", path, value });
|
|
305
|
+
}
|
|
306
|
+
this.#valueEnded(this.#stack.at(-1));
|
|
307
|
+
}
|
|
308
|
+
/** The value of the unterminated scalar at the end of the text, if it shows. */
|
|
309
|
+
#pendingScalar() {
|
|
310
|
+
const slot = this.#scalarSlot;
|
|
311
|
+
const token = this.#scalar;
|
|
312
|
+
if (slot === undefined || token === "" || token.length > MAX_PENDING_SCALAR_LENGTH)
|
|
313
|
+
return undefined;
|
|
314
|
+
const value = pendingScalarValue(token);
|
|
315
|
+
return value === undefined ? undefined : { slot, value };
|
|
316
|
+
}
|
|
317
|
+
#openContainer(container) {
|
|
318
|
+
const slot = this.#valueSlot();
|
|
319
|
+
const path = this.#reportedPath(slot);
|
|
320
|
+
this.#place(slot, container);
|
|
321
|
+
this.#stack.push({
|
|
322
|
+
container,
|
|
323
|
+
slot,
|
|
324
|
+
path,
|
|
325
|
+
reportsInside: path !== undefined && path.length < MAX_REPORTED_DEPTH,
|
|
326
|
+
size: 0,
|
|
327
|
+
key: undefined,
|
|
328
|
+
phase: Array.isArray(container) ? "value" : "key",
|
|
329
|
+
});
|
|
330
|
+
this.#pathCost += 1;
|
|
331
|
+
this.#dirty = true;
|
|
332
|
+
// A fresh container: the working one keeps changing, and a change never does.
|
|
333
|
+
if (path !== undefined)
|
|
334
|
+
this.#report({ kind: "set", path, value: Array.isArray(container) ? [] : {} });
|
|
335
|
+
}
|
|
336
|
+
#closeContainer() {
|
|
337
|
+
const frame = this.#stack.pop();
|
|
338
|
+
// A stray closer outside any container is ignored.
|
|
339
|
+
if (frame === undefined)
|
|
340
|
+
return;
|
|
341
|
+
this.#pathCost -= frame.size + 1;
|
|
342
|
+
this.#dirty = true;
|
|
343
|
+
// Too deep to report inside: the whole value, final now that it is closed.
|
|
344
|
+
if (frame.path !== undefined && !frame.reportsInside) {
|
|
345
|
+
this.#report({ kind: "set", path: frame.path, value: frame.container });
|
|
346
|
+
}
|
|
347
|
+
this.#valueEnded(this.#stack.at(-1));
|
|
348
|
+
}
|
|
349
|
+
/** A value in `frame`, or the root value when there is no frame, has ended. */
|
|
350
|
+
#valueEnded(frame) {
|
|
351
|
+
if (frame === undefined) {
|
|
352
|
+
// Text after the root value is ignored, but only once a root value exists.
|
|
353
|
+
if (this.#root !== undefined)
|
|
354
|
+
this.#done = true;
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
frame.phase = "comma";
|
|
358
|
+
}
|
|
359
|
+
/** Set the value at `slot` in the open path; nothing for a value in an invalid position. */
|
|
360
|
+
#place(slot, value) {
|
|
361
|
+
if (slot === undefined)
|
|
362
|
+
return;
|
|
363
|
+
this.#dirty = true;
|
|
364
|
+
if (slot.kind === "root") {
|
|
365
|
+
this.#root = value;
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const frame = this.#stack.at(-1);
|
|
369
|
+
if (slot.kind === "element") {
|
|
370
|
+
const elements = frame.container;
|
|
371
|
+
if (slot.index === elements.length) {
|
|
372
|
+
frame.size++;
|
|
373
|
+
this.#pathCost++;
|
|
374
|
+
}
|
|
375
|
+
elements[slot.index] = value;
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const members = frame.container;
|
|
379
|
+
if (!Object.hasOwn(members, slot.key)) {
|
|
380
|
+
frame.size++;
|
|
381
|
+
this.#pathCost++;
|
|
382
|
+
}
|
|
383
|
+
setMember(members, slot.key, value);
|
|
384
|
+
}
|
|
385
|
+
/** A fresh snapshot: copies of the open containers, innermost first, each holding the copy of its open child. */
|
|
386
|
+
#copyOpenPath(pending) {
|
|
387
|
+
if (this.#stack.length === 0)
|
|
388
|
+
return pending?.slot.kind === "root" ? pending.value : this.#root;
|
|
389
|
+
let child;
|
|
390
|
+
let childSlot;
|
|
391
|
+
for (let depth = this.#stack.length - 1; depth >= 0; depth--) {
|
|
392
|
+
const frame = this.#stack[depth];
|
|
393
|
+
const copy = Array.isArray(frame.container) ? frame.container.slice() : { ...frame.container };
|
|
394
|
+
if (depth === this.#stack.length - 1 && pending !== undefined)
|
|
395
|
+
setSlot(copy, pending.slot, pending.value);
|
|
396
|
+
if (child !== undefined && childSlot !== undefined)
|
|
397
|
+
setSlot(copy, childSlot, child);
|
|
398
|
+
child = copy;
|
|
399
|
+
childSlot = frame.slot;
|
|
400
|
+
}
|
|
401
|
+
// The outermost open container is the root unless it sits in an invalid position.
|
|
402
|
+
return childSlot?.kind === "root" ? child : this.#root;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* The arguments of one streaming tool call: the raw text, for the one full parse when the call ends, and a
|
|
407
|
+
* `StreamingJsonParser` for the partial arguments in between. Providers keep one per call in their own stream state,
|
|
408
|
+
* never on the content block, so the raw text never reaches partial messages or transcripts.
|
|
409
|
+
*/
|
|
410
|
+
export class ToolCallArgumentsStream {
|
|
411
|
+
#text = "";
|
|
412
|
+
#parser = new StreamingJsonParser();
|
|
413
|
+
#snapshot = undefined;
|
|
414
|
+
#arguments = {};
|
|
415
|
+
/** The raw argument text received so far. */
|
|
416
|
+
get text() {
|
|
417
|
+
return this.#text;
|
|
418
|
+
}
|
|
419
|
+
/** Append a piece of argument text; returns the partial arguments, a new object whenever they changed. */
|
|
420
|
+
append(delta) {
|
|
421
|
+
this.#text += delta;
|
|
422
|
+
this.#parser.append(delta);
|
|
423
|
+
return this.#partial();
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Take the provider's complete argument text. When it continues the text so far, returns the missing piece as
|
|
427
|
+
* `delta`; otherwise starts over with `text`. Either way returns the partial arguments of `text`.
|
|
428
|
+
*/
|
|
429
|
+
replace(text) {
|
|
430
|
+
if (text.startsWith(this.#text)) {
|
|
431
|
+
const delta = text.slice(this.#text.length);
|
|
432
|
+
return { delta, arguments: delta === "" ? this.#partial() : this.append(delta) };
|
|
433
|
+
}
|
|
434
|
+
this.#text = "";
|
|
435
|
+
this.#parser = new StreamingJsonParser();
|
|
436
|
+
return { delta: undefined, arguments: this.append(text) };
|
|
437
|
+
}
|
|
438
|
+
/** The final arguments: one full parse of the complete text, which reports malformed arguments. */
|
|
439
|
+
finish() {
|
|
440
|
+
return parseToolCallArguments(this.#text);
|
|
441
|
+
}
|
|
442
|
+
#partial() {
|
|
443
|
+
const snapshot = this.#parser.snapshot();
|
|
444
|
+
if (snapshot === this.#snapshot)
|
|
445
|
+
return this.#arguments;
|
|
446
|
+
this.#snapshot = snapshot;
|
|
447
|
+
// Tool arguments are an object; any other partial value shows as no arguments yet.
|
|
448
|
+
this.#arguments =
|
|
449
|
+
typeof snapshot === "object" && snapshot !== null && !Array.isArray(snapshot)
|
|
450
|
+
? snapshot
|
|
451
|
+
: {};
|
|
452
|
+
return this.#arguments;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
const SIMPLE_ESCAPES = {
|
|
456
|
+
'"': '"',
|
|
457
|
+
"\\": "\\",
|
|
458
|
+
"/": "/",
|
|
459
|
+
b: "\b",
|
|
460
|
+
f: "\f",
|
|
461
|
+
n: "\n",
|
|
462
|
+
r: "\r",
|
|
463
|
+
t: "\t",
|
|
464
|
+
};
|
|
465
|
+
function isDelimiter(char) {
|
|
466
|
+
return (char === " " ||
|
|
467
|
+
char === "\t" ||
|
|
468
|
+
char === "\n" ||
|
|
469
|
+
char === "\r" ||
|
|
470
|
+
char === "," ||
|
|
471
|
+
char === ":" ||
|
|
472
|
+
char === "{" ||
|
|
473
|
+
char === "}" ||
|
|
474
|
+
char === "[" ||
|
|
475
|
+
char === "]" ||
|
|
476
|
+
char === '"');
|
|
477
|
+
}
|
|
478
|
+
function isHexDigit(char) {
|
|
479
|
+
return (char >= "0" && char <= "9") || (char >= "a" && char <= "f") || (char >= "A" && char <= "F");
|
|
480
|
+
}
|
|
481
|
+
/** The value of a complete number or literal token; `undefined` for anything else, which is dropped. */
|
|
482
|
+
function scalarValue(token) {
|
|
483
|
+
for (const [literal, value] of LITERALS)
|
|
484
|
+
if (token === literal)
|
|
485
|
+
return value;
|
|
486
|
+
return NUMBER.test(token) ? Number(token) : undefined;
|
|
487
|
+
}
|
|
488
|
+
/** The value an unterminated number or literal token shows. */
|
|
489
|
+
function pendingScalarValue(token) {
|
|
490
|
+
for (const [literal, value] of LITERALS)
|
|
491
|
+
if (literal.startsWith(token))
|
|
492
|
+
return value;
|
|
493
|
+
if (NUMBER.test(token))
|
|
494
|
+
return Number(token);
|
|
495
|
+
const mantissa = NUMBER_WITHOUT_EXPONENT_DIGITS.exec(token);
|
|
496
|
+
return mantissa === null ? undefined : Number(mantissa[1]);
|
|
497
|
+
}
|
|
498
|
+
function setSlot(container, slot, value) {
|
|
499
|
+
if (slot.kind === "element")
|
|
500
|
+
container[slot.index] = value;
|
|
501
|
+
else if (slot.kind === "member")
|
|
502
|
+
setMember(container, slot.key, value);
|
|
503
|
+
}
|
|
504
|
+
function setMember(members, key, value) {
|
|
505
|
+
// `__proto__` must become an own member, as in JSON.parse(), not the prototype.
|
|
506
|
+
if (key === "__proto__") {
|
|
507
|
+
Object.defineProperty(members, key, { value, writable: true, enumerable: true, configurable: true });
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
members[key] = value;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
//# sourceMappingURL=streaming-json.js.map
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { Type } from "typebox";
|
|
2
1
|
/**
|
|
3
2
|
* Creates a string enum schema compatible with Google's API and other providers
|
|
4
|
-
* that don't support anyOf/const patterns
|
|
3
|
+
* that don't support anyOf/const patterns: `{ type: "string", enum: [...] }`.
|
|
5
4
|
*
|
|
6
5
|
* @example
|
|
7
6
|
* const OperationSchema = StringEnum(["add", "subtract", "multiply", "divide"], {
|
|
8
7
|
* description: "The operation to perform"
|
|
9
8
|
* });
|
|
10
9
|
*
|
|
11
|
-
* type Operation = Static<typeof OperationSchema>; // "add" | "subtract" | "multiply" | "divide"
|
|
10
|
+
* type Operation = Static<typeof OperationSchema>; // "add" | "subtract" | "multiply" | "divide" (Static from @earendil-works/pi-schema)
|
|
12
11
|
*/
|
|
13
12
|
export function StringEnum(values, options) {
|
|
14
|
-
return
|
|
13
|
+
return {
|
|
15
14
|
type: "string",
|
|
16
15
|
enum: values,
|
|
17
16
|
...(options?.description && { description: options.description }),
|
|
18
17
|
...(options?.default && { default: options.default }),
|
|
19
|
-
}
|
|
18
|
+
};
|
|
20
19
|
}
|
|
21
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=string-enum.js.map
|