The same validator is available as a command-line tool, a Node.js library and a browser module without eval: npm install @agenticworkflowprotocol/validator. Every GitHub release also contains the package tarball and the browser bundle.
Command line
npm install --save-dev @agenticworkflowprotocol/validator
npx awp validate --profiles core,mcp workflow.yaml
npx awp validate --output json workflow.yaml
Exit codes: 0 valid, 1 invalid, 2 usage error, 3 unreadable file.
Node.js
import { validateText, validateManifest } from '@agenticworkflowprotocol/validator';
const { documents } = validateText(yamlText, {
file: 'workflow.yaml',
profiles: ['core', 'mcp'],
});
const ok = documents.every((d) => d.valid);
// already parsed (e.g. a request body)
const result = validateManifest(manifest, { profiles: ['core'] });
Browser
import { validateText } from '@agenticworkflowprotocol/validator/browser';
// or the file awp-validator.mjs from the release
One ES module, no dependencies, works under a strict Content-Security-Policy.