Conformance test suite for OJCP (Open Job Context Protocol) implementations. Validates that a provider's manifest, job postings, and MCP tool responses conform to the OJCP v0.1 specification.
Test a live endpoint:
npx @ojcp/conformance https://ojcp.devOutput:
OJCP Conformance Suite v0.1.0
Target: https://ojcp.dev
✓ manifest-valid
✓ manifest-has-version
✓ manifest-has-tools
✓ manifest-has-search-jobs
✓ manifest-has-mcp-endpoint
✓ mcp-endpoint-reachable — Server: ojcp-reference-provider
✓ search-jobs-returns-jobs — 8 jobs returned
✓ search-jobs-valid-schema
✓ get-job-detail-returns-job
✓ begin-application-returns-session
10 passed 0 failed 0 skipped
Run the full conformance suite against a live OJCP endpoint.
npx @ojcp/conformance test https://careers.acme.com
npx @ojcp/conformance test https://ojcp.dev --json # JSON output for CIYou can also pass a URL directly without test:
npx @ojcp/conformance https://ojcp.devValidate a local JSON file against OJCP schemas.
npx @ojcp/conformance validate manifest.json
npx @ojcp/conformance validate job-posting.json --type job-postingAuto-detects schema type from the JSON structure. Use --type to override.
| Test | Description | When |
|---|---|---|
manifest-valid |
Manifest validates against OJCP JSON Schema | Always |
manifest-has-version |
ojcp_version is present |
Always |
manifest-has-tools |
tools array is present |
Always |
manifest-has-search-jobs |
search_jobs listed (REQUIRED per spec) |
Always |
manifest-has-mcp-endpoint |
mcp_endpoint is declared |
Always |
mcp-endpoint-reachable |
MCP endpoint responds to initialize |
If declared |
search-jobs-returns-jobs |
search_jobs returns a jobs array |
If MCP available |
search-jobs-valid-schema |
First job validates against JobPosting schema | If jobs returned |
get-job-detail-returns-job |
get_job_detail returns a job object |
If tool declared |
begin-application-returns-session |
begin_application returns session |
If tool declared |
import {
validateManifest,
validateJobPosting,
validateCandidateContext,
validateAgentDeclaration,
validateVerificationProof,
validateVerifierManifest,
validateToolResponse,
runConformanceSuite,
} from "@ojcp/conformance";
// Validate a single object
const { valid, errors } = validateManifest(myManifest);
// Validate a tool response
const result = validateToolResponse("search-jobs", searchResponse);
// Run full suite against a live endpoint
const report = await runConformanceSuite("https://careers.acme.com");
console.log(`${report.passed} passed, ${report.failed} failed`);interface ValidationResult {
valid: boolean;
errors: ValidationError[] | null;
}
interface ConformanceReport {
target: string;
passed: number;
failed: number;
skipped: number;
results: TestResult[];
}Use --json for machine-readable output:
npx @ojcp/conformance test https://ojcp.dev --jsonExit code is 1 if any tests fail, 0 if all pass.
Schemas are vendored from ojcp-org/ojcp. To update after a spec change:
pnpm sync-schemasUSER_MANDATE_FIXTURES defines authorization decisions proposed by
OJCP RFC 0003: platform identity, candidate identity,
and user authorization are separate claims. The fixtures cover mandate absence, issuer admission,
agent-key binding, ATS and employer binding, candidate-data substitution, expiry, revocation, and
single-use replay.
They are deliberately semantic fixtures, not an SD-JWT VC implementation. An integration must
verify HTTP signatures, credential signatures, holder proof, and revocation data before passing
the corresponding facts to evaluateUserMandateFixture. This API and fixture set remain
experimental until RFC 0003 is accepted.
See the OJCP contributing guide.
Apache 2.0