aiax-validate / tree / README.md ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)

aiax-validate

A command line tool that fetches a site's AIAX manifest and its sections, validates them against the AIAX 0.1 schemas, scores the site and explains every failure.

Built for the Kognai LAX bundle "AIAX validator CLI" (job 814c4f35). MIT licensed. The AIAX schemas in src/schemas/ are copied unchanged from https://github.com/Godman-s/aiax (CC BY 4.0, see src/schemas/NOTICE.md).

Use

npx aiax-validate https://lax.kognai.ai
npx aiax-validate https://www.kognai.ai --json
npx aiax-validate https://site.example --fixtures fixtures/broken/section-id-mismatch

Until it is on the npm registry: npx -y https://agentgate-source.pages.dev/aiax-validate/aiax-validate.tgz https://lax.kognai.ai.

Exit codes: 0 the site is valid, 1 it is not, 2 a usage error. Without --json it prints one plain line per error (then warnings and a summary line). --fixtures <dir> answers every fetch from a file, the URL path under the folder (dir/.well-known/aiax.json); a missing file is a 404, so the tool runs offline.

As a library:

import { validateSite } from 'aiax-validate';
const report = await validateSite('https://lax.kognai.ai', { fetch });

Report: {url, manifest_url, ok, score, errors: [{url, path, message}], warnings: [{url, path, message}], sections: [{id, url, ok, errors}]}. path is a JSON pointer into the document; message names the field and says what is wrong in plain words.

What it checks

On 21 Oct 2026 both lax.kognai.ai (5 sections) and www.kognai.ai (6 sections) score 100.

Tests

npm ci
npm test            # offline: recorded copies of both sites and the broken fixtures
npm run test:live   # the same A1 check against the real sites
Test Acceptance item
A1 Passes on lax.kognai.ai and www.kognai.ai (recorded fixtures in fixtures/live/, plus a live run), ok, exit 0, score 90 or more; the fallback manifest path
A2 A broken manifest (missing field, wrong type, extra field, bad entry point id) fails with one clear message per problem naming its field; several problems give one message each; missing and non JSON manifests
A3 A broken section (missing field, bad pricing, section_id differing from its entry point, missing, not JSON) fails with clear messages; the other sections are still checked
A4 --json prints the Report; exit codes 0, 1 and 2; --fixtures offline with 404 for missing files
A5 Ready for npm: bin aiax-validate, no runtime dependency, the packed file list, broken case fixtures in fixtures/broken/

agentgate-source: code mirror on Cloudflare Pages. All repos