export type JsonPrimitive = string | number | boolean | null; interface JsonSchemaBase { readonly description?: string; readonly enum?: readonly JsonPrimitive[]; readonly const?: JsonPrimitive; } export interface JsonSchemaString extends JsonSchemaBase { readonly type: 'string'; readonly minLength?: number; readonly maxLength?: number; readonly pattern?: string; readonly format?: 'uuid' | 'date-time'; } export interface JsonSchemaNumber extends JsonSchemaBase { readonly type: 'number' | 'integer'; readonly minimum?: number; readonly maximum?: number; } export interface JsonSchemaBoolean extends JsonSchemaBase { readonly type: 'boolean'; } export interface JsonSchemaNull extends JsonSchemaBase { readonly type: 'null'; } export interface JsonSchemaArray extends JsonSchemaBase { readonly type: 'array'; readonly minItems?: number; readonly maxItems: number; readonly uniqueItems?: boolean; readonly items: JsonSchema; } export interface JsonSchemaObject extends JsonSchemaBase { readonly type: 'object'; readonly additionalProperties: false; readonly required: readonly string[]; readonly properties: Readonly>; readonly minProperties?: number; readonly maxProperties?: number; } export interface JsonSchemaUnion { readonly oneOf: readonly JsonSchema[]; readonly description?: string; } export type JsonSchema = JsonSchemaString | JsonSchemaNumber | JsonSchemaBoolean | JsonSchemaNull | JsonSchemaArray | JsonSchemaObject | JsonSchemaUnion; export interface JsonSchemaValidationOptions { /** Stable code distinguishes provider arguments from executor results. */ direction?: 'INPUT' | 'OUTPUT' | 'SCHEMA'; maxDepth?: number; maxNodes?: number; maxBytes?: number; } /** * Fields the model must never supply. They are injected from authenticated * session, dispatch, approval, and lease context. */ export declare const FORBIDDEN_AGENT_AUTHORITY_FIELDS: readonly ["userId", "ownerUserId", "appId", "projectId", "gridId", "sessionId", "runId", "toolCallId", "clientEpoch", "leaseId", "lease", "approval", "approvalGrant", "argumentHash", "descriptorDigest", "idempotencyKey", "deadline", "token", "authorization", "headers", "endpoint", "url", "permissions", "authority"]; /** Validate a schema itself before it enters an immutable registry. */ export declare function assertBoundedJsonSchema(schema: JsonSchemaObject, options?: { rejectAuthorityFields?: boolean; }): void; /** Strictly validate JSON data and reject unknown fields or unbounded values. */ export declare function validateJsonSchemaValue(schema: JsonSchema, value: unknown, options?: JsonSchemaValidationOptions): void; /** RFC-8785-compatible canonical JSON for the JSON subset used by contracts. */ export declare function canonicalJson(value: unknown): string; /** Synchronous browser-safe SHA-256 used for descriptor and content digests. */ export declare function sha256Digest(value: string | Uint8Array): `sha256:${string}`; export declare function digestCanonicalJson(value: unknown): `sha256:${string}`; /** Recursively freeze a JSON-like contract object. */ export declare function deepFreeze(value: T): Readonly; export declare function isDecimalString(value: string): boolean; export {}; //# sourceMappingURL=schema.d.ts.map