trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
16 lines • 725 B
TypeScript
/**
* Schema Validation Middleware
*
* Validates mutations against ontology schemas. Blocks operations that
* violate schema constraints (required fields, type mismatches, etc.).
*/
import type { KernelMiddleware } from './middleware.js';
import type { SchemaDefinition } from '../ontology/types.js';
export interface SchemaMiddlewareConfig {
/** Live ontology index — refreshed per op so schema edits apply immediately. */
getOntologies: () => Map<string, SchemaDefinition>;
/** Whether to block on validation errors (default: true) */
strict?: boolean;
}
export declare function createSchemaMiddleware(config: SchemaMiddlewareConfig): KernelMiddleware;
//# sourceMappingURL=schema-middleware.d.ts.map