Files
SnowLuma/.pnpm-store/v11/files/7d/0a8429640f7ccac8849694a779b80cda245929c4e5b87d915d14a34b9bd73c53458d6ccaf088da99ed288beb03283cbc360aa069b6cc1d368e0471848af57d
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

24 lines
1.2 KiB
Plaintext

import type { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 } from "@standard-schema/spec";
import type { StandardSchemaWithJSON } from "@modelcontextprotocol/client";
/**
* A schema that implements both Standard Schema (validation) and Standard JSON
* Schema (serialization). Zod v4, ArkType, and Valibot (via
* `@valibot/to-json-schema`) all satisfy this. Re-exported from the SDK so
* View authors can import it alongside {@link app!App `App`}.
*
* @see https://standardschema.dev/
*/
export type { StandardJSONSchemaV1, StandardSchemaV1, StandardSchemaWithJSON, StandardTypedV1, };
/**
* Serialize a Standard Schema to JSON Schema for the given direction.
*
* Requires `~standard.jsonSchema` (zod v4, ArkType, Valibot, …); schemas
* without it throw.
*/
export declare function standardSchemaToJsonSchema(schema: StandardSchemaV1, io: "input" | "output"): Promise<Record<string, unknown>>;
/**
* Validate a value against a Standard Schema. Returns the parsed value on
* success or throws with a formatted issue list (optionally prefixed).
*/
export declare function validateStandardSchema<S extends StandardSchemaV1>(schema: S, value: unknown, errorPrefix?: string): Promise<StandardSchemaV1.InferOutput<S>>;