|
Some checks failed
Documentation Lint & Validation / Markdown Linting (push) Has been cancelled
Documentation Lint & Validation / Validate mdBook Configuration (push) Has been cancelled
Documentation Lint & Validation / Content & Structure Validation (push) Has been cancelled
mdBook Build & Deploy / Build mdBook (push) Has been cancelled
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
Documentation Lint & Validation / Lint & Validation Summary (push) Has been cancelled
mdBook Build & Deploy / Documentation Quality Check (push) Has been cancelled
mdBook Build & Deploy / Deploy to GitHub Pages (push) Has been cancelled
mdBook Build & Deploy / Notification (push) Has been cancelled
on+re:
- core.ncl: 5 new Practice nodes (notification-channels,
vapora-capabilities, agent-hot-reload-stable-identity,
merkle-audit-trail, notification-channels) + 5 new edges;
knowledge-graph-execution-history updated with HNSW+BM25+RRF
- state.ncl: production-readiness blocker/catalyst updated (hot-reload
complete, BudgetManager/LLMRouter still require restart);
ontoref-integration catalyst updated (vapora-ontology/reflection
crates, api-catalog.json, nickel contracts)
ADRs (NCL):
- adr-013: KG hybrid search — HNSW+BM25+RRF, rejected in-process scan
- adr-014: capability packages — AgentDefinition→vapora-shared,
DashMap shard-before-await constraint
- adr-015: Merkle audit trail — SHA-256 hash chain, rejected HMAC
- adr-016: agent hot-reload — stable_id=role, learning_profiles survive
drain, BudgetManager excluded from reload scope
landing page:
- 2 new feature boxes: VCS-Agnostic Worktree (jj/git), Ontology Protocol
- KG box: 20→28 tests, HNSW+BM25+RRF description
- Agents box: 71→82 tests, hot-reload + stable_id
- tech stack: Rust 21→23 crates, added jj, Radicle, ontoref badges
- status badge: 620→691 tests
|
||
|---|---|---|
| .. | ||
| agents | ||
| tools | ||
| agent-task.ncl | ||
| README.md | ||
VAPORA Validation Schemas
Nickel schemas for runtime validation of MCP tools and agent tasks.
Directory Structure
schemas/
├── tools/ # MCP tool parameter validation
│ ├── kanban_create_task.ncl
│ ├── kanban_update_task.ncl
│ ├── assign_task_to_agent.ncl
│ ├── get_project_summary.ncl
│ └── get_agent_capabilities.ncl
│
└── agents/ # Agent task assignment validation
└── task_assignment.ncl
Schema Format
Nickel schemas define:
- Field types (String, Number, Bool, Array, Object)
- Required/optional fields (via
defaultvalues) - Validation contracts (NonEmpty, Email, UUID, Range, Pattern, etc.)
- Documentation (via
docannotations)
Example
{
tool_name = "example_tool",
parameters = {
# Required field with contracts
user_id
| String
| doc "User UUID"
| std.string.NonEmpty
| std.string.match "^[0-9a-f]{8}-[0-9a-f]{4}-...$",
# Optional field with default
priority
| Number
| doc "Priority score (0-100)"
| std.number.between 0 100
| default = 50,
},
}
Supported Contracts
| Contract | Description | Example |
|---|---|---|
std.string.NonEmpty |
String cannot be empty | Required text fields |
std.string.length.min N |
Minimum length | min 3 for titles |
std.string.length.max N |
Maximum length | max 200 for titles |
std.string.match PATTERN |
Regex validation | UUID format |
std.number.between A B |
Numeric range | between 0 100 |
std.number.greater_than N |
Minimum value (exclusive) | > -1 |
std.number.less_than N |
Maximum value (exclusive) | < 1000 |
std.string.Email |
Email format | user@example.com |
std.string.Url |
URL format | https://... |
std.string.Uuid |
UUID format | xxxxxxxx-xxxx-... |
std.enum.TaggedUnion |
Enum validation | `[ |
Usage
Schemas are loaded by ValidationPipeline at runtime:
use vapora_shared::validation::{SchemaRegistry, ValidationPipeline};
let registry = Arc::new(SchemaRegistry::new(PathBuf::from("schemas")));
let pipeline = ValidationPipeline::new(registry);
// Validate MCP tool input
let result = pipeline.validate("tools/kanban_create_task", &input).await?;
if !result.valid {
return (StatusCode::BAD_REQUEST, Json(result.errors));
}
Testing Schemas
Validate schema syntax:
nickel typecheck schemas/tools/kanban_create_task.ncl
Export schema as JSON:
nickel export schemas/tools/kanban_create_task.ncl
Query specific field:
nickel query --field parameters.title schemas/tools/kanban_create_task.ncl
Adding New Schemas
- Create
.nclfile in appropriate directory - Define
tool_nameorschema_name - Define
parametersorfieldswith types and contracts - Add
docannotations for documentation - Test with
nickel typecheck - Restart services to reload schemas (or use hot-reload)
Hot Reload
Invalidate cached schema without restart:
registry.invalidate("tools/kanban_create_task").await;
Invalidate all schemas:
registry.invalidate_all().await;