aontu
v0.76.1
Published
JSON-superset unification language and validation gate for AI-agent ground truth - evaluate, vet, diff, query, and evolution-check structured models.
Maintainers
Readme
aontu
JSON structure unifier. A small language, and an engine that merges partial structures into one consistent result: or reports exactly where they conflict.
Schema, defaults and data are the same kind of thing, combined by one operation: unification. Any JSON document is already valid aontu, so an agent's output can be checked against a definition with no conversion step.
npm install -g aontuThe 30-second version
# a schema, a default, and data — one notation, one operation
port: integer
port: *8080|integer
host: string
host: "localhost"$ aontu service.aontu
{ "host": "localhost", "port": 8080 }A second port: "high" does not overwrite anything: it is a located
conflict, reported with both sites.
Validate, query, explain
aontu vet service.aontu deploy.json # does this data satisfy this schema?
aontu model get '$.services.auth' sys.aontu # one evaluated slice
aontu model why '$.services.auth.port' sys.aontu # what contributed, and where
aontu breaking --against git#main sys.aontu # is the new version compatible?
aontu hash sys.aontu # a pin over MEANING, not bytesvet exits by verdict class (0 valid, 1 invalid, 3 incomplete, 4 the
schema itself is broken), so an agent loop can branch on it, and speaks
JSON and SARIF as well as text.
There is also an MCP server (aontu-mcp) exposing vet, get, why,
diff, canon and summary over the same contracts the CLI prints,
and a language server (aontu-lsp).
Library
const { Aontu, vet } = require('aontu')
const report = vet(schemaSrc, dataSrc, { trust: { include: 'none' } })
report.verdict // 'valid' | 'invalid' | 'incomplete' | 'error'
report.findings // located, coded, with the sites that conflictedEvaluating a document you did not write runs it. @"…" resolves
through the filesystem and package chain by default, so pass a trust
profile ({ include: 'none' }, a virtual file set, or a confined
root) whenever the source is not yours. See
the trust contract.
Two implementations, one specification
TypeScript (this package) is canonical; a Go port
(github.com/aontu-lang/aontu/go) mirrors it. Both are checked against
one language-agnostic suite of .tsv rows, so the same document means
the same thing in a Node agent harness and a Go gateway.
Documentation
- Documentation home
- Tutorials
- Language reference
- Generation reference
- Functions reference
- Error reference
- API and CLI reference
- Agent skill
aontu is inspired by CUE, as a purpose-specific dialect.
License
MIT
