Redwood Agent Supply Redwood Agent Supply

SemVer range evaluator

Evaluate an npm-style range against candidate versions with SemVer precedence and a SHA-256 output digest.

$0.02

One call: the result comes back in the paid request.

Sample product output

{
  "highest": "1.3.0",
  "limits": [
    "Max 200 candidate versions, 256 range characters, 128 characters per version.",
    "Max 32 written comparators across all alternatives; hyphen ranges count as two.",
    "Prereleases require an explicit prerelease comparator for the same version core.",
    "Build metadata does not affect precedence; ties retain input order."
  ],
  "lowest": "1.2.0",
  "matches": [
    "1.2.0",
    "1.3.0"
  ],
  "output_sha256": "501c587312d3ce5e5b19dc7a59bf3bb708851a0cec261d9a79354c085ca6def9",
  "unmatched_count": 2,
  "upgrade_from_current": "minor",
  "valid": true
}

Input fields

{
  "example": {
    "current": "1.2.0",
    "range": "^1.2.0",
    "versions": [
      "2.0.0",
      "1.3.0",
      "1.2.0",
      "1.4.0-beta.1"
    ]
  },
  "properties": {
    "current": {
      "description": "Optional current version.",
      "example": "1.2.0",
      "maxLength": 128,
      "minLength": 5,
      "type": "string",
      "x-preserve-whitespace": true
    },
    "range": {
      "description": "npm-style range.",
      "example": "^1.2.0",
      "maxLength": 256,
      "minLength": 0,
      "type": "string",
      "x-preserve-whitespace": true
    },
    "versions": {
      "description": "Candidate versions to test.",
      "example": [
        "2.0.0",
        "1.3.0",
        "1.2.0",
        "1.4.0-beta.1"
      ],
      "items": {
        "description": "SemVer 2.0 version.",
        "example": "1.2.3",
        "maxLength": 128,
        "minLength": 5,
        "type": "string",
        "x-preserve-whitespace": true
      },
      "maxItems": 200,
      "minItems": 0,
      "type": "array"
    }
  },
  "required": [
    "range",
    "versions"
  ],
  "type": "object"
}

One-step x402 buy

POST https://redwoodagentsupply.com/api/v1/buy/utility-semver-range-eval
Content-Type: application/json

{
  "inputs": {
    "current": "1.2.0",
    "range": "^1.2.0",
    "versions": [
      "2.0.0",
      "1.3.0",
      "1.2.0",
      "1.4.0-beta.1"
    ]
  }
}

Paid orders settle before background work starts. A failed job is run again once, free and automatically. If it fails twice, ask the operator to run it again using the order ID. Keep your order credential private. All sales are final.

Catalog at /api/v1/catalog

API documentation

Assistant instructions

Read the catalog and request a quote using the example below.
Create an order with that quote and a unique Idempotency-Key.
Keep the order credential private. Send it as Bearer authorization.
Request a payment attempt, then fetch the result after settlement.

Quote request example

POST /api/v1/quotes
Content-Type: application/json

{
  "slug": "utility-semver-range-eval",
  "inputs": {
    "current": "1.2.0",
    "range": "^1.2.0",
    "versions": [
      "2.0.0",
      "1.3.0",
      "1.2.0",
      "1.4.0-beta.1"
    ]
  }
}