UNPKG

jsonv-ts

Version:

JSON Schema builder and validator for TypeScript with static type inference, Hono middleware for OpenAPI generation and validation, and MCP server/client implementation. Lightweight, dependency-free, and built on Web Standards.

78 lines (77 loc) 3.17 kB
import * as s from "jsonv-ts"; import { RpcMessage, RpcNotification, type TRpcRequest } from "../rpc"; export declare class InitializeMessage extends RpcMessage { method: string; params: s.ObjectSchema<{ readonly protocolVersion: s.StringSchema<s.IStringOptions> & s.IStringOptions; readonly capabilities: s.ObjectSchema<{}, s.IObjectOptions> & s.IObjectOptions; readonly clientInfo: { default?: any; enum?: (readonly any[] | any[]) | undefined; const?: any; properties: {}; additionalProperties?: (s.Schema | false) | undefined; patternProperties?: Record<string, s.Schema> | undefined; required: string[] | undefined; minProperties?: number | undefined; maxProperties?: number | undefined; propertyNames?: s.Schema | undefined; $defs?: Record<string, s.Schema> | undefined; strict: () => s.ObjectSchema<{}, s.Merge<s.IObjectOptions & { additionalProperties: false; }>>; partial: () => s.ObjectSchema<{}, s.IObjectOptions>; } & s.Schema<s.ISchemaOptions, { [x: string]: unknown; } | undefined, { [x: string]: unknown; } | undefined>; readonly serverInfo: { default?: any; enum?: (readonly any[] | any[]) | undefined; const?: any; properties: {}; additionalProperties?: (s.Schema | false) | undefined; patternProperties?: Record<string, s.Schema> | undefined; required: string[] | undefined; minProperties?: number | undefined; maxProperties?: number | undefined; propertyNames?: s.Schema | undefined; $defs?: Record<string, s.Schema> | undefined; strict: () => s.ObjectSchema<{}, s.Merge<s.IObjectOptions & { additionalProperties: false; }>>; partial: () => s.ObjectSchema<{}, s.IObjectOptions>; } & s.Schema<s.ISchemaOptions, { [x: string]: unknown; } | undefined, { [x: string]: unknown; } | undefined>; readonly instructions: { default?: any; enum?: (readonly any[] | any[]) | undefined; const?: any; pattern?: (string | RegExp) | undefined; minLength?: number | undefined; maxLength?: number | undefined; format?: string | undefined; } & s.Schema<s.ISchemaOptions, string | undefined, string | undefined>; }, s.IObjectOptions> & s.IObjectOptions; respond(message: TRpcRequest): Promise<import("..").TRpcResponse<{ protocolVersion: string; capabilities: { tools: {} | undefined; resources: {} | undefined; logging: {}; completions: {}; }; serverInfo: { name: string; version: string; }; }>>; } export declare class InitializedNotificationMessage extends RpcNotification { method: string; handle(message: TRpcRequest): Promise<void>; }