@songtonyli/dsh-cli 0.1.92 → 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,11 +1,12 @@
|
|
|
1
1
|
import { calculateCost, clampThinkingLevel } from "../models.js";
|
|
2
2
|
import { combineAbortSignals } from "../utils/abort-signals.js";
|
|
3
|
+
import { truncateErrorText } from "../utils/error-body.js";
|
|
3
4
|
import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
4
5
|
import { shortHash } from "../utils/hash.js";
|
|
5
6
|
import { headersToRecord } from "../utils/headers.js";
|
|
6
7
|
import { getIdentityHeaders } from "../utils/identity.js";
|
|
7
|
-
import { parseStreamingJson, parseToolCallArguments } from "../utils/json-parse.js";
|
|
8
8
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
9
|
+
import { ToolCallArgumentsStream } from "../utils/streaming-json.js";
|
|
9
10
|
import { getSystemMessageText, renderSystemMessageUpdate } from "../utils/text.js";
|
|
10
11
|
import { getCurrentTools, resolveTranscript } from "../utils/transcript.js";
|
|
11
12
|
import { getJsonSchemaToolParameters, resolveJsonSchemaStrictSampling } from "./constrained-sampling.js";
|
|
@@ -49,10 +50,6 @@ export const stream = (model, context, options) => {
|
|
|
49
50
|
stream.end();
|
|
50
51
|
}
|
|
51
52
|
catch (error) {
|
|
52
|
-
for (const block of output.content) {
|
|
53
|
-
// partialArgs is only a streaming scratch buffer; never persist it.
|
|
54
|
-
delete block.partialArgs;
|
|
55
|
-
}
|
|
56
53
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
57
54
|
output.errorMessage = formatMistralError(error);
|
|
58
55
|
stream.push({ type: "error", reason: output.stopReason, error: output });
|
|
@@ -151,11 +148,6 @@ function formatMistralError(error) {
|
|
|
151
148
|
}
|
|
152
149
|
return safeJsonStringify(error);
|
|
153
150
|
}
|
|
154
|
-
function truncateErrorText(text, maxChars) {
|
|
155
|
-
if (text.length <= maxChars)
|
|
156
|
-
return text;
|
|
157
|
-
return `${text.slice(0, maxChars)}... [truncated ${text.length - maxChars} chars]`;
|
|
158
|
-
}
|
|
159
151
|
function safeJsonStringify(value) {
|
|
160
152
|
try {
|
|
161
153
|
const serialized = JSON.stringify(value);
|
|
@@ -417,7 +409,8 @@ async function consumeChatStream(model, output, stream, mistralStream, onProvide
|
|
|
417
409
|
let currentBlock = null;
|
|
418
410
|
const blocks = output.content;
|
|
419
411
|
const blockIndex = () => blocks.length - 1;
|
|
420
|
-
|
|
412
|
+
// Stream state per Mistral tool call, kept off the content blocks so it never reaches partials.
|
|
413
|
+
const toolCallsByKey = new Map();
|
|
421
414
|
const finishCurrentBlock = (block) => {
|
|
422
415
|
if (!block)
|
|
423
416
|
return;
|
|
@@ -546,53 +539,33 @@ async function consumeChatStream(model, output, stream, mistralStream, onProvide
|
|
|
546
539
|
? toolCall.id
|
|
547
540
|
: deriveMistralToolCallId(`toolcall:${toolCall.index ?? 0}`, 0);
|
|
548
541
|
const key = toolCall.index ?? callId;
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
if (!block) {
|
|
558
|
-
block = {
|
|
559
|
-
type: "toolCall",
|
|
560
|
-
id: callId,
|
|
561
|
-
name: toolCall.function.name,
|
|
562
|
-
arguments: {},
|
|
563
|
-
partialArgs: "",
|
|
564
|
-
};
|
|
565
|
-
output.content.push(block);
|
|
566
|
-
toolBlocksByKey.set(key, output.content.length - 1);
|
|
567
|
-
stream.push({ type: "toolcall_start", contentIndex: output.content.length - 1, partial: output });
|
|
542
|
+
let open = toolCallsByKey.get(key);
|
|
543
|
+
if (!open) {
|
|
544
|
+
output.content.push({ type: "toolCall", id: callId, name: toolCall.function.name, arguments: {} });
|
|
545
|
+
open = { contentIndex: output.content.length - 1, arguments: new ToolCallArgumentsStream() };
|
|
546
|
+
toolCallsByKey.set(key, open);
|
|
547
|
+
stream.push({ type: "toolcall_start", contentIndex: open.contentIndex, partial: output });
|
|
568
548
|
}
|
|
569
549
|
const argsDelta = typeof toolCall.function.arguments === "string"
|
|
570
550
|
? toolCall.function.arguments
|
|
571
551
|
: JSON.stringify(toolCall.function.arguments || {});
|
|
572
|
-
|
|
573
|
-
block.arguments = parseStreamingJson(block.partialArgs);
|
|
552
|
+
output.content[open.contentIndex].arguments = open.arguments.append(argsDelta);
|
|
574
553
|
stream.push({
|
|
575
554
|
type: "toolcall_delta",
|
|
576
|
-
contentIndex:
|
|
555
|
+
contentIndex: open.contentIndex,
|
|
577
556
|
delta: argsDelta,
|
|
578
557
|
partial: output,
|
|
579
558
|
});
|
|
580
559
|
}
|
|
581
560
|
}
|
|
582
561
|
finishCurrentBlock(currentBlock);
|
|
583
|
-
for (const
|
|
584
|
-
const block = output.content[
|
|
585
|
-
|
|
586
|
-
continue;
|
|
587
|
-
const toolBlock = block;
|
|
588
|
-
Object.assign(toolBlock, parseToolCallArguments(toolBlock.partialArgs));
|
|
589
|
-
// Finalize in-place and strip the scratch buffer so replay only
|
|
590
|
-
// carries parsed arguments.
|
|
591
|
-
delete toolBlock.partialArgs;
|
|
562
|
+
for (const open of toolCallsByKey.values()) {
|
|
563
|
+
const block = output.content[open.contentIndex];
|
|
564
|
+
Object.assign(block, open.arguments.finish());
|
|
592
565
|
stream.push({
|
|
593
566
|
type: "toolcall_end",
|
|
594
|
-
contentIndex:
|
|
595
|
-
toolCall:
|
|
567
|
+
contentIndex: open.contentIndex,
|
|
568
|
+
toolCall: block,
|
|
596
569
|
partial: output,
|
|
597
570
|
});
|
|
598
571
|
}
|
|
@@ -341,11 +341,6 @@ export const stream = (model, context, options) => {
|
|
|
341
341
|
stream.end();
|
|
342
342
|
}
|
|
343
343
|
catch (error) {
|
|
344
|
-
for (const block of output.content) {
|
|
345
|
-
// Streaming scratch buffers are only used during parsing; never persist them.
|
|
346
|
-
delete block.partialJson;
|
|
347
|
-
delete block.customInput;
|
|
348
|
-
}
|
|
349
344
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
350
345
|
output.errorMessage = formatProviderError(normalizeProviderError(error));
|
|
351
346
|
stream.push({ type: "error", reason: output.stopReason, error: output });
|
|
@@ -5,13 +5,14 @@ import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
|
5
5
|
import { shortHash } from "../utils/hash.js";
|
|
6
6
|
import { headersToRecord } from "../utils/headers.js";
|
|
7
7
|
import { getIdentityHeaders } from "../utils/identity.js";
|
|
8
|
-
import {
|
|
8
|
+
import { applyOpenRouterReportedCost, isOpenRouterModel, } from "../utils/openrouter-cost.js";
|
|
9
9
|
import { getProviderEnvValue } from "../utils/provider-env.js";
|
|
10
10
|
import { retryProviderRequest } from "../utils/provider-retry.js";
|
|
11
11
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
12
|
+
import { ToolCallArgumentsStream } from "../utils/streaming-json.js";
|
|
12
13
|
import { getSystemMessageText, renderSystemMessageUpdate } from "../utils/text.js";
|
|
13
14
|
import { getDeclaredTools, resolveTranscript, resolveTranscriptTools, } from "../utils/transcript.js";
|
|
14
|
-
import { appendGrammarToolInputJsonDelta, createGrammarToolInputProperties, getGrammarToolInput, getJsonSchemaToolParameters, resolveGrammarConstrainedSampling, resolveJsonSchemaStrictSampling, } from "./constrained-sampling.js";
|
|
15
|
+
import { appendGrammarToolInputJsonDelta, closeGrammarToolInputJson, createGrammarToolInputProperties, getGrammarToolInput, getJsonSchemaToolParameters, resolveGrammarConstrainedSampling, resolveJsonSchemaStrictSampling, } from "./constrained-sampling.js";
|
|
15
16
|
import { buildCopilotDynamicHeaders, hasCopilotVisionInput } from "./github-copilot-headers.js";
|
|
16
17
|
import { clampOpenAIPromptCacheKey } from "./openai-prompt-cache.js";
|
|
17
18
|
import { buildBaseOptions, clampThinkingBudgetToAnswerRoom, resolveSamplingParams, thinkingBudgetForLevel, } from "./simple-options.js";
|
|
@@ -206,23 +207,14 @@ export const stream = (model, context, options) => {
|
|
|
206
207
|
let hasFinishReason = false;
|
|
207
208
|
const toolCallBlocksByIndex = new Map();
|
|
208
209
|
const toolCallBlocksById = new Map();
|
|
210
|
+
const toolCallStates = new Map();
|
|
209
211
|
const blocks = output.content;
|
|
210
212
|
const getContentIndex = (block) => blocks.indexOf(block);
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return typeof value === "string" ? value : "";
|
|
217
|
-
};
|
|
218
|
-
const appendCustomToolCallInput = (block, nextInput, close) => {
|
|
219
|
-
const customInput = block.customInput;
|
|
220
|
-
if (!customInput)
|
|
221
|
-
return undefined;
|
|
222
|
-
const delta = appendGrammarToolInputJsonDelta(customInput.jsonBuffer, customInput.property, nextInput, close);
|
|
223
|
-
block.arguments = { [customInput.property]: nextInput };
|
|
224
|
-
return delta;
|
|
225
|
-
};
|
|
213
|
+
const customInput = (property) => ({
|
|
214
|
+
kind: "custom",
|
|
215
|
+
property,
|
|
216
|
+
buffer: { input: "", started: false, closed: false },
|
|
217
|
+
});
|
|
226
218
|
const finishBlock = (block) => {
|
|
227
219
|
const contentIndex = getContentIndex(block);
|
|
228
220
|
if (contentIndex === -1) {
|
|
@@ -246,8 +238,10 @@ export const stream = (model, context, options) => {
|
|
|
246
238
|
});
|
|
247
239
|
}
|
|
248
240
|
else if (block.type === "toolCall") {
|
|
249
|
-
|
|
250
|
-
|
|
241
|
+
const input = toolCallStates.get(block).input;
|
|
242
|
+
toolCallStates.delete(block);
|
|
243
|
+
if (input.kind === "custom") {
|
|
244
|
+
const delta = closeGrammarToolInputJson(input.buffer, input.property, undefined);
|
|
251
245
|
if (delta !== undefined) {
|
|
252
246
|
stream.push({
|
|
253
247
|
type: "toolcall_delta",
|
|
@@ -258,13 +252,8 @@ export const stream = (model, context, options) => {
|
|
|
258
252
|
}
|
|
259
253
|
}
|
|
260
254
|
else {
|
|
261
|
-
Object.assign(block,
|
|
255
|
+
Object.assign(block, input.arguments.finish());
|
|
262
256
|
}
|
|
263
|
-
// Finalize in-place and strip the scratch buffers so replay only
|
|
264
|
-
// carries parsed arguments.
|
|
265
|
-
delete block.partialArgs;
|
|
266
|
-
delete block.customInput;
|
|
267
|
-
delete block.streamIndex;
|
|
268
257
|
stream.push({
|
|
269
258
|
type: "toolcall_end",
|
|
270
259
|
contentIndex,
|
|
@@ -304,18 +293,18 @@ export const stream = (model, context, options) => {
|
|
|
304
293
|
// Note: the "input" fallback here should/must not be taken. in case the LLM makes up
|
|
305
294
|
// a tool we don't knwo about, we at least have a place to stash our stuff.
|
|
306
295
|
const customInputProperty = toolCall.custom && !toolCall.function ? (grammarToolInputProperties.get(name) ?? "input") : undefined;
|
|
307
|
-
const hasCustomInput = customInputProperty !== undefined;
|
|
308
296
|
block = {
|
|
309
297
|
type: "toolCall",
|
|
310
298
|
id: toolCall.id || "",
|
|
311
299
|
name,
|
|
312
|
-
arguments:
|
|
313
|
-
partialArgs: hasCustomInput ? undefined : "",
|
|
314
|
-
customInput: hasCustomInput
|
|
315
|
-
? { property: customInputProperty, jsonBuffer: { input: "", started: false, closed: false } }
|
|
316
|
-
: undefined,
|
|
317
|
-
streamIndex,
|
|
300
|
+
arguments: customInputProperty !== undefined ? { [customInputProperty]: "" } : {},
|
|
318
301
|
};
|
|
302
|
+
toolCallStates.set(block, {
|
|
303
|
+
streamIndex,
|
|
304
|
+
input: customInputProperty !== undefined
|
|
305
|
+
? customInput(customInputProperty)
|
|
306
|
+
: { kind: "json", arguments: new ToolCallArgumentsStream() },
|
|
307
|
+
});
|
|
319
308
|
if (streamIndex !== undefined) {
|
|
320
309
|
toolCallBlocksByIndex.set(streamIndex, block);
|
|
321
310
|
}
|
|
@@ -329,8 +318,9 @@ export const stream = (model, context, options) => {
|
|
|
329
318
|
partial: output,
|
|
330
319
|
});
|
|
331
320
|
}
|
|
332
|
-
|
|
333
|
-
|
|
321
|
+
const state = toolCallStates.get(block);
|
|
322
|
+
if (streamIndex !== undefined && state.streamIndex === undefined) {
|
|
323
|
+
state.streamIndex = streamIndex;
|
|
334
324
|
toolCallBlocksByIndex.set(streamIndex, block);
|
|
335
325
|
}
|
|
336
326
|
if (toolCall.id) {
|
|
@@ -339,16 +329,12 @@ export const stream = (model, context, options) => {
|
|
|
339
329
|
if (!block.name && name) {
|
|
340
330
|
block.name = name;
|
|
341
331
|
}
|
|
342
|
-
if (toolCall.custom && !toolCall.function &&
|
|
332
|
+
if (toolCall.custom && !toolCall.function && state.input.kind !== "custom") {
|
|
343
333
|
const customInputProperty = grammarToolInputProperties.get(block.name) ?? "input";
|
|
344
334
|
block.arguments = { [customInputProperty]: "" };
|
|
345
|
-
|
|
346
|
-
property: customInputProperty,
|
|
347
|
-
jsonBuffer: { input: "", started: false, closed: false },
|
|
348
|
-
};
|
|
349
|
-
delete block.partialArgs;
|
|
335
|
+
state.input = customInput(customInputProperty);
|
|
350
336
|
}
|
|
351
|
-
return block;
|
|
337
|
+
return { block, state };
|
|
352
338
|
};
|
|
353
339
|
for await (const chunk of openaiStream) {
|
|
354
340
|
await options?.onProviderStreamEvent?.(chunk, model);
|
|
@@ -440,7 +426,7 @@ export const stream = (model, context, options) => {
|
|
|
440
426
|
}
|
|
441
427
|
if (choice?.delta?.tool_calls) {
|
|
442
428
|
for (const toolCall of choice.delta.tool_calls) {
|
|
443
|
-
const block = ensureToolCallBlock(toolCall);
|
|
429
|
+
const { block, state } = ensureToolCallBlock(toolCall);
|
|
444
430
|
if (!block.id && toolCall.id) {
|
|
445
431
|
block.id = toolCall.id;
|
|
446
432
|
toolCallBlocksById.set(toolCall.id, block);
|
|
@@ -450,14 +436,15 @@ export const stream = (model, context, options) => {
|
|
|
450
436
|
block.name = name;
|
|
451
437
|
}
|
|
452
438
|
let delta = "";
|
|
453
|
-
|
|
439
|
+
const input = state.input;
|
|
440
|
+
if (toolCall.function?.arguments && input.kind === "json") {
|
|
454
441
|
delta = toolCall.function.arguments;
|
|
455
|
-
block.
|
|
456
|
-
block.arguments = parseStreamingJson(block.partialArgs);
|
|
442
|
+
block.arguments = input.arguments.append(delta);
|
|
457
443
|
}
|
|
458
|
-
else if (toolCall.custom?.input) {
|
|
459
|
-
|
|
460
|
-
|
|
444
|
+
else if (toolCall.custom?.input && input.kind === "custom") {
|
|
445
|
+
delta =
|
|
446
|
+
appendGrammarToolInputJsonDelta(input.buffer, input.property, toolCall.custom.input) ?? "";
|
|
447
|
+
block.arguments = { [input.property]: input.buffer.input };
|
|
461
448
|
}
|
|
462
449
|
stream.push({
|
|
463
450
|
type: "toolcall_delta",
|
|
@@ -495,11 +482,6 @@ export const stream = (model, context, options) => {
|
|
|
495
482
|
if (block.type === "thinking") {
|
|
496
483
|
applyStreamedReasoningDetails(block);
|
|
497
484
|
}
|
|
498
|
-
delete block.index;
|
|
499
|
-
// Streaming scratch buffers are only used during parsing; never persist them.
|
|
500
|
-
delete block.partialArgs;
|
|
501
|
-
delete block.customInput;
|
|
502
|
-
delete block.streamIndex;
|
|
503
485
|
}
|
|
504
486
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
505
487
|
output.errorMessage = formatProviderError(normalizeProviderError(error));
|
|
@@ -1168,7 +1150,10 @@ function convertTools(tools, compat) {
|
|
|
1168
1150
|
};
|
|
1169
1151
|
});
|
|
1170
1152
|
}
|
|
1171
|
-
function parseChunkUsage(
|
|
1153
|
+
function parseChunkUsage(
|
|
1154
|
+
// OpenRouter adds billing fields to streamed usage at runtime,
|
|
1155
|
+
// although the OpenAI SDK does not type those fields.
|
|
1156
|
+
rawUsage, model) {
|
|
1172
1157
|
const promptTokens = rawUsage.prompt_tokens || 0;
|
|
1173
1158
|
const cacheReadTokens = rawUsage.prompt_tokens_details?.cached_tokens ?? rawUsage.prompt_cache_hit_tokens ?? rawUsage.cached_tokens ?? 0;
|
|
1174
1159
|
const cacheWriteTokens = rawUsage.prompt_tokens_details?.cache_write_tokens || 0;
|
|
@@ -1196,6 +1181,9 @@ function parseChunkUsage(rawUsage, model) {
|
|
|
1196
1181
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
|
1197
1182
|
};
|
|
1198
1183
|
calculateCost(model, usage);
|
|
1184
|
+
if (isOpenRouterModel(model)) {
|
|
1185
|
+
applyOpenRouterReportedCost(usage, rawUsage);
|
|
1186
|
+
}
|
|
1199
1187
|
return usage;
|
|
1200
1188
|
}
|
|
1201
1189
|
function mapStopReason(reason) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { calculateCost } from "../models.js";
|
|
2
2
|
import { shortHash } from "../utils/hash.js";
|
|
3
|
-
import { parseStreamingJson, parseToolCallArguments } from "../utils/json-parse.js";
|
|
4
3
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
4
|
+
import { ToolCallArgumentsStream } from "../utils/streaming-json.js";
|
|
5
5
|
import { getSystemMessageText, renderSystemMessageUpdate } from "../utils/text.js";
|
|
6
6
|
import { resolveTranscript, resolveTranscriptTools } from "../utils/transcript.js";
|
|
7
|
-
import { appendGrammarToolInputJsonDelta, getGrammarToolInput, getJsonSchemaToolParameters, resolveGrammarConstrainedSampling, resolveJsonSchemaStrictSampling, } from "./constrained-sampling.js";
|
|
7
|
+
import { appendGrammarToolInputJsonDelta, closeGrammarToolInputJson, getGrammarToolInput, getJsonSchemaToolParameters, resolveGrammarConstrainedSampling, resolveJsonSchemaStrictSampling, } from "./constrained-sampling.js";
|
|
8
8
|
import { transformMessages } from "./transform-messages.js";
|
|
9
9
|
// =============================================================================
|
|
10
10
|
// Utilities
|
|
@@ -368,24 +368,11 @@ export function convertResponsesTools(tools, options) {
|
|
|
368
368
|
return functionTool;
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
function getCustomToolCallInput(block) {
|
|
372
|
-
const property = block.customInput?.property;
|
|
373
|
-
if (property === undefined)
|
|
374
|
-
return "";
|
|
375
|
-
const value = block.arguments[property];
|
|
376
|
-
return typeof value === "string" ? value : "";
|
|
377
|
-
}
|
|
378
|
-
function appendCustomToolCallInput(block, nextInput, close) {
|
|
379
|
-
const customInput = block.customInput;
|
|
380
|
-
if (!customInput)
|
|
381
|
-
return undefined;
|
|
382
|
-
const delta = appendGrammarToolInputJsonDelta(customInput.jsonBuffer, customInput.property, nextInput, close);
|
|
383
|
-
block.arguments = { [customInput.property]: nextInput };
|
|
384
|
-
return delta;
|
|
385
|
-
}
|
|
386
371
|
export async function processResponsesStream(openaiStream, output, stream, model, options) {
|
|
387
372
|
let sawTerminalResponseEvent = false;
|
|
388
373
|
const outputSlots = new Map();
|
|
374
|
+
// Tool calls whose output_item.done has not arrived yet.
|
|
375
|
+
const unfinishedToolCalls = new Set();
|
|
389
376
|
const reasoningBlocksById = new Map();
|
|
390
377
|
const applyMessagePhaseStopReason = (item) => {
|
|
391
378
|
if (item.type === "message" && item.phase === "final_answer") {
|
|
@@ -429,19 +416,21 @@ export async function processResponsesStream(openaiStream, output, stream, model
|
|
|
429
416
|
return slot;
|
|
430
417
|
}
|
|
431
418
|
if (item.type === "function_call") {
|
|
419
|
+
const args = new ToolCallArgumentsStream();
|
|
432
420
|
const block = {
|
|
433
421
|
type: "toolCall",
|
|
434
422
|
id: `${item.call_id}|${item.id}`,
|
|
435
423
|
name: item.name,
|
|
436
|
-
arguments: {},
|
|
424
|
+
arguments: item.arguments ? args.append(item.arguments) : {},
|
|
437
425
|
...(item.namespace !== undefined ? { namespace: item.namespace } : {}),
|
|
438
|
-
partialJson: item.arguments || "",
|
|
439
426
|
};
|
|
440
427
|
output.content.push(block);
|
|
428
|
+
unfinishedToolCalls.add(block);
|
|
441
429
|
const slot = {
|
|
442
430
|
type: "toolCall",
|
|
443
431
|
block,
|
|
444
432
|
contentIndex: output.content.length - 1,
|
|
433
|
+
input: { kind: "json", arguments: args },
|
|
445
434
|
};
|
|
446
435
|
outputSlots.set(outputIndex, slot);
|
|
447
436
|
stream.push({ type: "toolcall_start", contentIndex: slot.contentIndex, partial: output });
|
|
@@ -456,16 +445,14 @@ export async function processResponsesStream(openaiStream, output, stream, model
|
|
|
456
445
|
name: item.name,
|
|
457
446
|
arguments: { [inputProperty]: input },
|
|
458
447
|
...(item.namespace !== undefined ? { namespace: item.namespace } : {}),
|
|
459
|
-
customInput: {
|
|
460
|
-
property: inputProperty,
|
|
461
|
-
jsonBuffer: { input: "", started: false, closed: false },
|
|
462
|
-
},
|
|
463
448
|
};
|
|
464
449
|
output.content.push(block);
|
|
450
|
+
unfinishedToolCalls.add(block);
|
|
465
451
|
const slot = {
|
|
466
452
|
type: "toolCall",
|
|
467
453
|
block,
|
|
468
454
|
contentIndex: output.content.length - 1,
|
|
455
|
+
input: customInput(inputProperty, input),
|
|
469
456
|
};
|
|
470
457
|
outputSlots.set(outputIndex, slot);
|
|
471
458
|
stream.push({ type: "toolcall_start", contentIndex: slot.contentIndex, partial: output });
|
|
@@ -610,36 +597,31 @@ export async function processResponsesStream(openaiStream, output, stream, model
|
|
|
610
597
|
}
|
|
611
598
|
else if (event.type === "response.function_call_arguments.delta") {
|
|
612
599
|
const slot = getSlot(event.output_index, "toolCall");
|
|
613
|
-
if (
|
|
600
|
+
if (slot?.input.kind !== "json")
|
|
614
601
|
continue;
|
|
615
|
-
slot.block.
|
|
616
|
-
slot.block.arguments = parseStreamingJson(slot.block.partialJson);
|
|
602
|
+
slot.block.arguments = slot.input.arguments.append(event.delta);
|
|
617
603
|
pushToolCallDelta(slot, event.delta);
|
|
618
604
|
}
|
|
619
605
|
else if (event.type === "response.function_call_arguments.done") {
|
|
620
606
|
const slot = getSlot(event.output_index, "toolCall");
|
|
621
|
-
if (
|
|
607
|
+
if (slot?.input.kind !== "json")
|
|
622
608
|
continue;
|
|
623
|
-
const
|
|
624
|
-
slot.block.
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
const delta = event.arguments.slice(previousPartialJson.length);
|
|
628
|
-
if (delta.length > 0)
|
|
629
|
-
pushToolCallDelta(slot, delta);
|
|
630
|
-
}
|
|
609
|
+
const replaced = slot.input.arguments.replace(event.arguments);
|
|
610
|
+
slot.block.arguments = replaced.arguments;
|
|
611
|
+
if (replaced.delta)
|
|
612
|
+
pushToolCallDelta(slot, replaced.delta);
|
|
631
613
|
}
|
|
632
614
|
else if (event.type === "response.custom_tool_call_input.delta") {
|
|
633
615
|
const slot = getSlot(event.output_index, "toolCall");
|
|
634
|
-
if (
|
|
616
|
+
if (slot?.input.kind !== "custom")
|
|
635
617
|
continue;
|
|
636
|
-
pushToolCallDelta(slot,
|
|
618
|
+
pushToolCallDelta(slot, appendCustomInput(slot.block, slot.input, event.delta));
|
|
637
619
|
}
|
|
638
620
|
else if (event.type === "response.custom_tool_call_input.done") {
|
|
639
621
|
const slot = getSlot(event.output_index, "toolCall");
|
|
640
|
-
if (
|
|
622
|
+
if (slot?.input.kind !== "custom")
|
|
641
623
|
continue;
|
|
642
|
-
pushToolCallDelta(slot,
|
|
624
|
+
pushToolCallDelta(slot, closeCustomInput(slot.block, slot.input, event.input));
|
|
643
625
|
}
|
|
644
626
|
else if (event.type === "response.output_item.done") {
|
|
645
627
|
const item = event.item;
|
|
@@ -670,15 +652,13 @@ export async function processResponsesStream(openaiStream, output, stream, model
|
|
|
670
652
|
});
|
|
671
653
|
outputSlots.delete(event.output_index);
|
|
672
654
|
}
|
|
673
|
-
else if (item.type === "function_call" &&
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
Object.assign(slot.block,
|
|
655
|
+
else if (item.type === "function_call" && slot?.type === "toolCall" && slot.input.kind === "json") {
|
|
656
|
+
if (item.arguments)
|
|
657
|
+
slot.input.arguments.replace(item.arguments);
|
|
658
|
+
Object.assign(slot.block, slot.input.arguments.finish());
|
|
677
659
|
if (item.namespace !== undefined)
|
|
678
660
|
slot.block.namespace = item.namespace;
|
|
679
|
-
|
|
680
|
-
// carries parsed arguments.
|
|
681
|
-
delete slot.block.partialJson;
|
|
661
|
+
unfinishedToolCalls.delete(slot.block);
|
|
682
662
|
stream.push({
|
|
683
663
|
type: "toolcall_end",
|
|
684
664
|
contentIndex: slot.contentIndex,
|
|
@@ -687,11 +667,11 @@ export async function processResponsesStream(openaiStream, output, stream, model
|
|
|
687
667
|
});
|
|
688
668
|
outputSlots.delete(event.output_index);
|
|
689
669
|
}
|
|
690
|
-
else if (item.type === "custom_tool_call" && slot?.type === "toolCall" && slot.
|
|
691
|
-
pushToolCallDelta(slot,
|
|
670
|
+
else if (item.type === "custom_tool_call" && slot?.type === "toolCall" && slot.input.kind === "custom") {
|
|
671
|
+
pushToolCallDelta(slot, closeCustomInput(slot.block, slot.input, item.input));
|
|
692
672
|
if (item.namespace !== undefined)
|
|
693
673
|
slot.block.namespace = item.namespace;
|
|
694
|
-
delete
|
|
674
|
+
unfinishedToolCalls.delete(slot.block);
|
|
695
675
|
stream.push({
|
|
696
676
|
type: "toolcall_end",
|
|
697
677
|
contentIndex: slot.contentIndex,
|
|
@@ -725,18 +705,39 @@ export async function processResponsesStream(openaiStream, output, stream, model
|
|
|
725
705
|
}
|
|
726
706
|
// The agent runs every tool call in the final message. Refuse to hand over calls whose
|
|
727
707
|
// output_item.done never arrived: their arguments may be cut off or mixed up, e.g. when a
|
|
728
|
-
// non-compliant server omits output_index.
|
|
708
|
+
// non-compliant server omits output_index.
|
|
729
709
|
if (output.stopReason === "toolUse") {
|
|
730
|
-
for (const
|
|
731
|
-
|
|
732
|
-
continue;
|
|
733
|
-
const toolCall = block;
|
|
734
|
-
if (toolCall.partialJson !== undefined || toolCall.customInput !== undefined) {
|
|
735
|
-
throw new Error(`OpenAI Responses stream completed with an unfinished tool call: ${toolCall.name} (${toolCall.id})`);
|
|
736
|
-
}
|
|
710
|
+
for (const toolCall of unfinishedToolCalls) {
|
|
711
|
+
throw new Error(`OpenAI Responses stream completed with an unfinished tool call: ${toolCall.name} (${toolCall.id})`);
|
|
737
712
|
}
|
|
738
713
|
}
|
|
739
714
|
}
|
|
715
|
+
/** Stream state of a custom tool call that starts with `initialInput`. */
|
|
716
|
+
function customInput(property, initialInput) {
|
|
717
|
+
const buffer = { input: "", started: false, closed: false };
|
|
718
|
+
return {
|
|
719
|
+
kind: "custom",
|
|
720
|
+
property,
|
|
721
|
+
buffer,
|
|
722
|
+
unsent: appendGrammarToolInputJsonDelta(buffer, property, initialInput) ?? "",
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
/** Append to a streaming custom tool input; returns the matching piece of its JSON arguments text. */
|
|
726
|
+
function appendCustomInput(block, input, delta) {
|
|
727
|
+
return sendCustomInput(block, input, appendGrammarToolInputJsonDelta(input.buffer, input.property, delta));
|
|
728
|
+
}
|
|
729
|
+
/** Close a custom tool input with the provider's complete input, if it sent one. */
|
|
730
|
+
function closeCustomInput(block, input, finalInput) {
|
|
731
|
+
return sendCustomInput(block, input, closeGrammarToolInputJson(input.buffer, input.property, finalInput));
|
|
732
|
+
}
|
|
733
|
+
function sendCustomInput(block, input, jsonDelta) {
|
|
734
|
+
block.arguments = { [input.property]: input.buffer.input };
|
|
735
|
+
if (input.unsent === "")
|
|
736
|
+
return jsonDelta;
|
|
737
|
+
const sent = input.unsent + (jsonDelta ?? "");
|
|
738
|
+
input.unsent = "";
|
|
739
|
+
return sent;
|
|
740
|
+
}
|
|
740
741
|
function mapStopReason(status, incompleteReason) {
|
|
741
742
|
if (!status)
|
|
742
743
|
return { stopReason: "stop" };
|
|
@@ -172,12 +172,6 @@ export const stream = (model, context, options) => {
|
|
|
172
172
|
stream.end();
|
|
173
173
|
}
|
|
174
174
|
catch (error) {
|
|
175
|
-
for (const block of output.content) {
|
|
176
|
-
delete block.index;
|
|
177
|
-
// Streaming scratch buffers are only used during parsing; never persist them.
|
|
178
|
-
delete block.partialJson;
|
|
179
|
-
delete block.customInput;
|
|
180
|
-
}
|
|
181
175
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
182
176
|
const errorMessage = formatProviderError(normalizeProviderError(error), `${model.provider === "openai" ? "OpenAI" : model.provider} API error`);
|
|
183
177
|
// Sign in with ChatGPT shares the subscription's usage limit with other apps.
|
|
@@ -126,6 +126,7 @@ function parseUsage(rawUsage, model) {
|
|
|
126
126
|
cacheRead: (model.cost.cacheRead / 1000000) * cacheReadTokens,
|
|
127
127
|
cacheWrite: (model.cost.cacheWrite / 1000000) * cacheWriteTokens,
|
|
128
128
|
total: 0,
|
|
129
|
+
totalFromProvider: false,
|
|
129
130
|
},
|
|
130
131
|
};
|
|
131
132
|
usage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;
|
|
@@ -12,8 +12,9 @@ import { appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic } fr
|
|
|
12
12
|
import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
13
13
|
import { headersToRecord, providerHeadersToRecord } from "../utils/headers.js";
|
|
14
14
|
import { getIdentityHeaders } from "../utils/identity.js";
|
|
15
|
-
import { parseStreamingJson } from "../utils/json-parse.js";
|
|
16
15
|
import { getProviderEnvValue } from "../utils/provider-env.js";
|
|
16
|
+
import { ToolCallArgumentsStream } from "../utils/streaming-json.js";
|
|
17
|
+
import { ownedSlice } from "../utils/text.js";
|
|
17
18
|
export class PiMessagesResponseError extends Error {
|
|
18
19
|
code;
|
|
19
20
|
diagnosticDetails;
|
|
@@ -36,7 +37,7 @@ function parsePiMessagesErrorBody(body) {
|
|
|
36
37
|
}
|
|
37
38
|
function truncateDiagnosticString(value) {
|
|
38
39
|
const maxLength = 8192;
|
|
39
|
-
return value.length > maxLength ? `${value
|
|
40
|
+
return value.length > maxLength ? `${ownedSlice(value, 0, maxLength)}…` : value;
|
|
40
41
|
}
|
|
41
42
|
function formatPiMessagesResponseError(response, body, errorBody) {
|
|
42
43
|
const message = typeof errorBody?.error?.message === "string" ? errorBody.error.message : undefined;
|
|
@@ -91,8 +92,17 @@ function createEventConverter(model) {
|
|
|
91
92
|
stopReason: "pending",
|
|
92
93
|
timestamp: Date.now(),
|
|
93
94
|
};
|
|
94
|
-
const
|
|
95
|
+
const toolArguments = new Map();
|
|
95
96
|
return (event) => {
|
|
97
|
+
if ("contentIndex" in event) {
|
|
98
|
+
// The index comes from the wire and keys the content array: `__proto__` would reach Array.prototype, and a huge
|
|
99
|
+
// index would make a sparse array of billions of holes. A start adds the next block; other events need one.
|
|
100
|
+
const index = event.contentIndex;
|
|
101
|
+
const limit = event.type.endsWith("_start") ? partial.content.length : partial.content.length - 1;
|
|
102
|
+
if (typeof index !== "number" || !Number.isInteger(index) || index < 0 || index > limit) {
|
|
103
|
+
throw new Error(`Invalid contentIndex ${JSON.stringify(index)} in pi-messages ${event.type} event`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
96
106
|
switch (event.type) {
|
|
97
107
|
case "done":
|
|
98
108
|
Object.assign(partial, {
|
|
@@ -100,6 +110,9 @@ function createEventConverter(model) {
|
|
|
100
110
|
usage: event.usage,
|
|
101
111
|
responseId: event.responseId,
|
|
102
112
|
});
|
|
113
|
+
if (event.responseModel !== undefined) {
|
|
114
|
+
partial.responseModel = event.responseModel;
|
|
115
|
+
}
|
|
103
116
|
if (event.providerThinkingLevel !== undefined) {
|
|
104
117
|
partial.providerThinkingLevel = event.providerThinkingLevel;
|
|
105
118
|
}
|
|
@@ -112,6 +125,9 @@ function createEventConverter(model) {
|
|
|
112
125
|
errorMessage: event.errorMessage,
|
|
113
126
|
responseId: event.responseId,
|
|
114
127
|
});
|
|
128
|
+
if (event.responseModel !== undefined) {
|
|
129
|
+
partial.responseModel = event.responseModel;
|
|
130
|
+
}
|
|
115
131
|
if (event.providerThinkingLevel !== undefined) {
|
|
116
132
|
partial.providerThinkingLevel = event.providerThinkingLevel;
|
|
117
133
|
}
|
|
@@ -151,18 +167,17 @@ function createEventConverter(model) {
|
|
|
151
167
|
name: event.toolName,
|
|
152
168
|
arguments: {},
|
|
153
169
|
};
|
|
154
|
-
|
|
170
|
+
toolArguments.set(event.contentIndex, new ToolCallArgumentsStream());
|
|
155
171
|
break;
|
|
156
172
|
case "toolcall_delta": {
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
parseStreamingJson(json);
|
|
173
|
+
const args = toolArguments.get(event.contentIndex);
|
|
174
|
+
if (args !== undefined)
|
|
175
|
+
partial.content[event.contentIndex].arguments = args.append(event.delta);
|
|
161
176
|
break;
|
|
162
177
|
}
|
|
163
178
|
case "toolcall_end":
|
|
164
179
|
Object.assign(partial.content[event.contentIndex], event.toolCall);
|
|
165
|
-
|
|
180
|
+
toolArguments.delete(event.contentIndex);
|
|
166
181
|
return {
|
|
167
182
|
type: "toolcall_end",
|
|
168
183
|
contentIndex: event.contentIndex,
|