Version range check: npm, PEP 440, Cargo, Maven

$0.005 USDC per call · Developer and security · POST /api/v1/semver-check · Id semver-check

Parses a dependency version range in npm (node-semver), PEP 440 specifier, Cargo requirement or Maven range syntax and tests up to 100 candidate versions against it, for agents that write or review manifests. Returns per-version satisfies/violates with the failing comparator, the normalized range, the sorted versions and the highest match; pre-release, caret on 0.x, epoch and local-version rules follow each ecosystem's own spec. Does not resolve dependency graphs, query registries or know which versions exist.

What you get

Wrong-ecosystem range semantics (caret on 0.x, pre-releases, PEP 440 epochs) cause silent upgrades or unsatisfiable pins.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/semver-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/semver-check \
  -H 'content-type: application/json' \
  -d '{"ecosystem":"npm","range":"^0.2.3","versions":["0.2.9","0.3.0","0.2.4-beta.1"]}'

Input

FieldTypeRequiredDescription
ecosystemstring; one of "npm", "pep440", "cargo", "maven"yesWhich range syntax and version ordering to apply.
rangestring; length 0..300yesThe range: npm '^1.2.3 || >=2', PEP 440 '>=1.0,<2', Cargo '>=1.2, <1.5', Maven '[1.0,2.0)'.
versionsarray<string; length 0..100>; max 100 itemsnoCandidate versions to test; omit to only validate the range.
prereleasesbooleannonpm includePrerelease / PEP 440 prereleases=true. Default false (ecosystem default exclusion applies).

Example request body

{
  "ecosystem": "npm",
  "range": "^0.2.3",
  "versions": [
    "0.2.9",
    "0.3.0",
    "0.2.4-beta.1"
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
ecosystemstringno
rangeValidbooleanno
normalizedRangestringnoCanonical range: npm comparator sets (^ and ~ desugared as in node-semver), PEP 440 clauses, Maven restrictions.
rangeKindstringno
resultsarray<object>no
highestSatisfyingstringno
sortedAscendingarray<string>no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the code-preflight-kit package.

Machine-readable