0.4.0 • Published 12 months ago
@blahai/schema v0.4.0
@blahai/schema
JSON Schema and validator for blah.json configuration files. This package provides tools to validate your blah.json configurations and ensure they follow the correct structure.
Installation
npm install @blahai/schemaUsage
import { BlahValidator } from "@blahai/schema";
const validator = new BlahValidator();
const config = {
name: "my-blah-manifest",
version: "1.0.0",
// ... rest of your config
};
const result = validator.validate(config);
if (result.valid) {
console.log("Configuration is valid!");
} else {
console.error("Validation errors:", result.errors);
}Schema Structure
A valid blah.json configuration must include:
name: Name of your blah manifestversion: Version of your manifest
Optional fields include:
alias: Name used when tools are listeddescription: Description of your manifestenv: Environment variablestools: Array of tool configurationsflows: Array of flow configurationsprompts: Reserved for future useresources: Reserved for future usetags: Array of string tagsconfig: Additional configuration options
See the example configuration for a complete example.
License
MIT