Repository navigation
"# Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[Unreleased]
[0.9.0] - 2026-07-13
Added
- Three-stage validation pipeline: syntax check, structure validation against
JSON Schema Draft 2020-12, and semantic rules with custom keywords. valj-corelibrary: schema compilation, validation engine, structured error
reporting with typedExpectationenum,PathSegment/JsonPathnewtype.- Built-in semantic rules: reference integrity (
x-ref), conditional required
fields (x-required-if), and circular reference detection with cycle
guards. - Optional
rulefield on every finding — schema-derived human-readable
description of the violated construct, resolved via a path-walk adapter
strategy with$reffollowing and cycle detection (max depth 16). Supports
Required, AnyOf, OneOf, allOf, if/then/else, dependentRequired, and
dependentSchemas keywords. valj-formatlibrary: three output modes — human-readable terminal output
with ANSI colours (owo-colors), machine-readable JSON array, and
LLM-optimised text with fix instructions.valjCLI tool: validates JSON documents against schemas withvalidate
andcheck-schemasubcommands. Supports--format json|human|llm,
--color auto|always|never,--max-errors, stdin input via-, and
implicit Stage-1 syntax check when no subcommand is given.-o/--forceoutput file flags for the CLI: write the validated document
to disk on success;--forcepermits overwriting an existing file.valj-mcpserver: stdio-based JSON Schema validation server for Model
Context Protocol clients. Exposes four tools:valj_validate,
valj_check_schema,valj_list_schemas, andvalj_register_schema
(dynamic mode only).- Schema hot-reload:
valj-mcpreloads the schema file on modification time
change at everyvalidatecall. - Registry configuration via
valj.toml: load multiple named schemas at
startup with--config; individual failures are reported without aborting
the server. - Optional dynamic schema registration behind
[server] dynamic = truewith
a sandboxedschema_root(symlink-escape resistant, canonical-path check). output_path/overwriteparameters for the MCPvalj_validatetool:
pretty-print and write the validated document to an absolute path on success.- Man pages:
valj(1),valj-mcp(1),valj-mcp.toml(5),valj-schema(5),
valj-protocol(7). Built viajust build-man(pandoc) and included in the
DEB package under/usr/share/man/. - Shell completions for Bash, Zsh, and Fish via
just build-completions. scripts/mcp-smoke.sh: wire-level bash smoke test forvalj-mcp(MCP spec
2025-11-25). Pipes JSON-RPC 2.0 messages into the binary and asserts on the
captured stdout.justfilerecipes:build-man,lint-man,build-completions,
build-deb,clean-man,clean-completions.xtaskbinary: build-time helpers for manpage OPTIONS snippet generation
(gen-man-options) and shell completion generation (gen-completions).- Supply-chain tooling:
deny.tomlfor cargo-deny, cargo-machete integration. - Release tooling:
release.toml(cargo-release, workspace-wide version tags).
Changed
valj_validateMCP tool accepts an optionalschema_nameparameter and
returns a tagged response object (syntax_onlymode withoutschema_name,
fullmode withschema_name).valj-formatJSON output emits therulefield in every finding when
present; the field is omitted when the rule isNone.valj-formatLLM output emits aRule:line in every error block; text is
truncated at 500 characters with...suffix when the rule exceeds the
limit; the schema block is omitted when a rule is present to reduce token
count.valj-mcpMcpFindingexposes an optionalrulefield; tool descriptions
and server instructions document the rule in findings.valj-coregainstracingdependency for diagnostic warnings at the API
boundary.- Rule resolver follows
$refmid-walk during pointer traversal and accepts
the literal/$ref/segments thatjsonschema 0.29emits in
schema_path. Cycle detection and a max ref depth of 16 levels are in
place. - AnyOf, OneOf, and dependentRequired adapters derive the container pointer
parametrically fromschema_pointer(rightmost matching segment with
boundary check) instead of hardcoding keyword paths from the schema root. - Required adapter preserves nesting context by stripping only the trailing
/required(or/$ref/required) suffix and appending the property segment. - Property names containing
/or~are RFC 6901 escaped (~1,~0) when
synthesised into pointer segments.
Fixed
- Contract-lock tests pin the empirical
schema_pathshape ofjsonschema 0.29
and theValidationErrorKind::Requiredreuse fordependentRequired
violations. cargo debfinds man-page and completion assets in the workspacetarget
directory.- OPTIONS snippet injection in
build-manworks correctly with multiple
*.options.rofffiles present. CLAP_OPTIONSplaceholder in manpages is correctly replaced via fixed sed
pattern escaping.- Duplicate
.SH OPTIONSsection invalj.1eliminated; redundant.br/
blank-line sequences fromclap_mangenno longer tripmandoc -T lint. - MCP protocol-version negotiation verified against MCP spec 2025-11-25
lifecycle: exact-match, older-known, and unknown-future versions handled
correctly.
"