Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Check SemVer Range

code.check_semver_range

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

When you need a yes-or-no answer on version compatibility, we parse your version and range under the grammar you pick — strict SemVer 2.0.0 comparators or npm-style caret, tilde, hyphen, and x-ranges. Build metadata never affects precedence; you control whether prereleases count. We do not resolve dependency trees or pick versions from a registry — do not use this when you need installation or resolution.

SemVer and npm range rules are easy to get wrong by hand. We apply the same precedence rules every time so your gates stay consistent.

Reliability

STRICT and deterministic for identical inputs. Domain errors (not retryable; fix the input — unchanged retry will not succeed): INVALID_SEMVER (version is not valid SemVer — send a well-formed version); INVALID_SEMVER_RANGE (range cannot be parsed — fix the range syntax); SEMVER_RANGE_TOO_COMPLEX (range exceeds complexity limits — simplify the range); SEMVER_GRAMMAR_UNSUPPORTED (grammar is not semver_2 or npm — pick a supported grammar).

Context footprint

Returns satisfies, normalized version/range, an optional reason, and small _meta. A successful call costs 1 execution credit.

When to use it

When you have a concrete version and range and need a deterministic satisfies answer.

When you need to resolve, install, or pick versions from a registry.

Scope

Note
Tests whether a version satisfies a range under the grammar you choose.

Non-goals

  • Does not guess the grammar
  • Does not resolve dependency trees
  • Does not fetch registries
  • Does not pick a best matching version

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2.5 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
versionstringYesVersion value to test.
rangestringYesRange expression under the selected grammar.
grammarstringNoRange grammar; omit it for npm.
includePrereleasebooleanNoWhether prereleases may satisfy stable comparators; omit it for false.
loosebooleanNoWhether leading markers and partial versions are accepted; omit it for false.

Output schema

FieldTypeRequiredDescription
satisfiesbooleanYesWhether the version satisfies the range.
normalizedVersionstringYesCanonical rendering of the tested version.
normalizedRangestringYesCanonical comparator-set rendering of the range.
reasonstringNoStable negative-verdict reason; omitted when satisfied.
comparatorSetCountintegerYesNumber of OR-separated comparator sets.
_metaobjectYesClosed applied grammar-version receipt naming npm-compatible-1 or semver-2.0.0.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"code.check_semver_range","input":{"version":"1.4.0","range":"^1.2.0","grammar":"npm"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("code.check_semver_range", {"range":"^1.2.0","grammar":"npm","version":"1.2.3-beta.1"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
INVALID_SEMVER400NoThe request payload failed this skill's input validation.
INVALID_SEMVER_RANGE400NoThe request payload failed this skill's input validation.
SEMVER_RANGE_TOO_COMPLEX429NoA size, quota, rate, or time limit was exceeded.
SEMVER_GRAMMAR_UNSUPPORTED400NoThe skill does not support the requested variant.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not guess the grammar
  • Does not resolve dependency trees
  • Does not fetch registries
  • Does not pick a best matching version
  • Full dependency resolution
  • Registry lookups or version picking

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "code.check_semver_range",
  "input": {
    "range": "^1.2.0",
    "grammar": "npm",
    "version": "1.2.3-beta.1"
  }
}

Examples

Caret range excludes prerelease by default

Inputjson
{
  "range": "^1.2.0",
  "grammar": "npm",
  "version": "1.2.3-beta.1"
}
Expected outputjson
{
  "reason": "PRERELEASE_EXCLUDED",
  "satisfies": false,
  "normalizedVersion": "1.2.3-beta.1",
  "normalizedRange": ">=1.2.0 <2.0.0-0",
  "_meta": {
    "grammarVersion": "npm-compatible-1"
  },
  "comparatorSetCount": 1
}

Stable version satisfies npm caret range

Inputjson
{
  "range": "^1.2.0",
  "grammar": "npm",
  "version": "1.4.0"
}
Expected outputjson
{
  "_meta": {
    "grammarVersion": "npm-compatible-1"
  },
  "normalizedVersion": "1.4.0",
  "comparatorSetCount": 1,
  "normalizedRange": ">=1.2.0 <2.0.0-0",
  "satisfies": true
}
  • Gate a dependency version against an allowed range in CI
  • Validate release candidates against npm caret constraints
  • Check strict SemVer comparator sets deterministically

Avoid for

  • Full dependency resolution
  • Registry lookups or version picking

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

codevalidationsemver