Version range check: npm, PEP 440, Cargo, Maven
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
| Field | Type | Required | Description |
|---|---|---|---|
ecosystem | string; one of "npm", "pep440", "cargo", "maven" | yes | Which range syntax and version ordering to apply. |
range | string; length 0..300 | yes | The range: npm '^1.2.3 || >=2', PEP 440 '>=1.0,<2', Cargo '>=1.2, <1.5', Maven '[1.0,2.0)'. |
versions | array<string; length 0..100>; max 100 items | no | Candidate versions to test; omit to only validate the range. |
prereleases | boolean | no | npm 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.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: 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. |
ecosystem | string | no | |
rangeValid | boolean | no | |
normalizedRange | string | no | Canonical range: npm comparator sets (^ and ~ desugared as in node-semver), PEP 440 clauses, Maven restrictions. |
rangeKind | string | no | |
results | array<object> | no | |
highestSatisfying | string | no | |
sortedAscending | array<string> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always 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
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent