Exact finite dependency version selector
Select the lexicographically highest jointly compatible stable versions in caller-declared package priority from a complete supplied finite catalogue, with first-failure witnesses for every earlier combination. Valid infeasibility is a normal paid result; never contacts a registry or installs packages.
data-assurance · Operation ID: dependency-version-select
Choose this operation when
- Choosing one supplied version of every package for a bounded offline release fixture
- Resolving conditional version requirements, including self-dependencies and cycles
- Regenerating and checking every rejected higher-priority combination from explicit evidence
Outside this profile
- Registry lookup, download, installation, native npm lockfile generation or unseen releases
- Prerelease/build metadata or npm/pnpm/yarn range, peer, optional, workspace, platform or engine semantics
- Authenticity, vulnerability or license checks; minimum-change objectives; installation ordering
- Fetching sources, changing external state or executing supplied data
Exact release references
Static JSON contract · Markdown reference · Fixed example response
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"packages": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"versions": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"type": "string",
"maxLength": 32,
"pattern": "^(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)$"
},
"requires": {
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"anyOf": {
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "object",
"properties": {
"minInclusive": {
"anyOf": [
{
"type": "string",
"maxLength": 32,
"pattern": "^(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)$"
},
{
"type": "null"
}
]
},
"maxExclusive": {
"anyOf": [
{
"type": "string",
"maxLength": 32,
"pattern": "^(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)$"
},
{
"type": "null"
}
]
}
},
"required": [
"minInclusive",
"maxExclusive"
],
"additionalProperties": false
}
}
},
"required": [
"package",
"anyOf"
],
"additionalProperties": false
}
}
},
"required": [
"version",
"requires"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"versions"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"anyOf": {
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "object",
"properties": {
"minInclusive": {
"anyOf": [
{
"type": "string",
"maxLength": 32,
"pattern": "^(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)$"
},
{
"type": "null"
}
]
},
"maxExclusive": {
"anyOf": [
{
"type": "string",
"maxLength": 32,
"pattern": "^(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)$"
},
{
"type": "null"
}
]
}
},
"required": [
"minInclusive",
"maxExclusive"
],
"additionalProperties": false
}
}
},
"required": [
"package",
"anyOf"
],
"additionalProperties": false
}
}
},
"required": [
"packages",
"requirements"
],
"additionalProperties": false
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "dependency-version-select",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "closed-set-stable-semver-selection-v1"
},
"selectionPolicy": {
"type": "string",
"const": "input-package-priority-highest-stable-version"
},
"candidateSourceOrders": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 7
}
}
},
"constraintSourcePointers": {
"maxItems": 128,
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"pattern": "^(?:\\/requirements\\/\\d+|\\/packages\\/\\d+\\/versions\\/\\d+\\/requires\\/\\d+)$"
}
},
"status": {
"type": "string",
"const": "selected"
},
"selected": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"packageIndex": {
"type": "integer",
"minimum": 0,
"maximum": 15
},
"packageId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"candidateIndex": {
"type": "integer",
"minimum": 0,
"maximum": 7
},
"version": {
"type": "string",
"maxLength": 32,
"pattern": "^(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)\\.(?:0|[1-9]\\d{0,8}|1000000000)$"
}
},
"required": [
"packageIndex",
"packageId",
"candidateIndex",
"version"
],
"additionalProperties": false
}
},
"proof": {
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "mixed-radix-first-failure-v1"
},
"searchSpaceSize": {
"type": "integer",
"minimum": 1,
"maximum": 4096
},
"rejectionConstraintIndexes": {
"maxItems": 4096,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 127
}
},
"selectedOrdinal": {
"type": "integer",
"minimum": 0,
"maximum": 4095
}
},
"required": [
"profile",
"searchSpaceSize",
"rejectionConstraintIndexes",
"selectedOrdinal"
],
"additionalProperties": false
}
},
"required": [
"profile",
"selectionPolicy",
"candidateSourceOrders",
"constraintSourcePointers",
"status",
"selected",
"proof"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "closed-set-stable-semver-selection-v1"
},
"selectionPolicy": {
"type": "string",
"const": "input-package-priority-highest-stable-version"
},
"candidateSourceOrders": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 7
}
}
},
"constraintSourcePointers": {
"maxItems": 128,
"type": "array",
"items": {
"type": "string",
"maxLength": 64,
"pattern": "^(?:\\/requirements\\/\\d+|\\/packages\\/\\d+\\/versions\\/\\d+\\/requires\\/\\d+)$"
}
},
"status": {
"type": "string",
"const": "infeasible"
},
"selected": {
"type": "null"
},
"proof": {
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "mixed-radix-first-failure-v1"
},
"searchSpaceSize": {
"type": "integer",
"minimum": 1,
"maximum": 4096
},
"rejectionConstraintIndexes": {
"maxItems": 4096,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 127
}
},
"selectedOrdinal": {
"type": "null"
}
},
"required": [
"profile",
"searchSpaceSize",
"rejectionConstraintIndexes",
"selectedOrdinal"
],
"additionalProperties": false
}
},
"required": [
"profile",
"selectionPolicy",
"candidateSourceOrders",
"constraintSourcePointers",
"status",
"selected",
"proof"
],
"additionalProperties": false
}
]
},
"provenance": {
"type": "object",
"required": [
"inputSha256",
"outputSha256",
"deterministic",
"externalRequests"
],
"properties": {
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"outputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"deterministic": {
"const": true
},
"externalRequests": {
"const": 0
}
}
}
},
"additionalProperties": false
}
Fixed example
One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.
Example input
{
"packages": [
{
"id": "renderer",
"versions": [
{
"version": "2.0.0",
"requires": [
{
"package": "core",
"anyOf": [
{
"minInclusive": "2.0.0",
"maxExclusive": "3.0.0"
}
]
}
]
},
{
"version": "1.5.0",
"requires": [
{
"package": "core",
"anyOf": [
{
"minInclusive": "1.0.0",
"maxExclusive": "2.0.0"
}
]
}
]
}
]
},
{
"id": "exporter",
"versions": [
{
"version": "1.0.0",
"requires": [
{
"package": "core",
"anyOf": [
{
"minInclusive": "1.0.0",
"maxExclusive": "2.0.0"
}
]
}
]
}
]
},
{
"id": "core",
"versions": [
{
"version": "2.1.0",
"requires": []
},
{
"version": "1.9.0",
"requires": []
}
]
}
],
"requirements": []
}
Example response
{
"operation": "dependency-version-select",
"version": "0.29.0",
"result": {
"profile": "closed-set-stable-semver-selection-v1",
"selectionPolicy": "input-package-priority-highest-stable-version",
"candidateSourceOrders": [
[
0,
1
],
[
0
],
[
0,
1
]
],
"constraintSourcePointers": [
"/packages/0/versions/0/requires/0",
"/packages/0/versions/1/requires/0",
"/packages/1/versions/0/requires/0"
],
"status": "selected",
"selected": [
{
"packageIndex": 0,
"packageId": "renderer",
"candidateIndex": 1,
"version": "1.5.0"
},
{
"packageIndex": 1,
"packageId": "exporter",
"candidateIndex": 0,
"version": "1.0.0"
},
{
"packageIndex": 2,
"packageId": "core",
"candidateIndex": 1,
"version": "1.9.0"
}
],
"proof": {
"profile": "mixed-radix-first-failure-v1",
"searchSpaceSize": 4,
"rejectionConstraintIndexes": [
2,
0,
1
],
"selectedOrdinal": 3
}
},
"provenance": {
"inputSha256": "1a43376351d4e6394d1bd8a5ba6158ade9566c0f0245f59a982bc40329a54d24",
"outputSha256": "8d93e328f273dc0a99e6a07467368db39f5e7fafd216896d368194aea13ff6a6",
"deterministic": true,
"externalRequests": 0
}
}
Bounds and precision
JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.
{
"global": {
"requestBytes": 131072,
"responseBytes": 524288,
"jsonDepth": 32,
"jsonNodes": 20000,
"requestsPerMinute": 60,
"paidAttemptsPerMinute": 20,
"idempotencyHours": 24
},
"operation": {
"inputBytes": 100000,
"outputBytes": 300000,
"jsonNodes": 10000,
"depth": 20,
"profile": "closed-set-stable-semver-selection-v1",
"packages": 16,
"candidatesPerPackage": 8,
"candidates": 64,
"reachableCandidatesUnderJointCaps": 44,
"constraints": 128,
"intervalsPerConstraint": 4,
"intervals": 512,
"versionComponentMaximum": 1000000000,
"identifierUtf8Bytes": 128,
"completeCombinations": 4096,
"constraintVisits": 524288,
"membershipTests": 4096,
"endpointTriples": 1024,
"packagePositions": 65536
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.008",
"sixDecimalTokenBaseUnits": "8000",
"subscription": false,
"includesPayerWalletOrNetworkFees": false,
"liveQuoteVerified": false,
"condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
}
Protocol definitions: x402, mpp. MPP uses Tempo charge. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.
API path templates, not endpoints on this documentation host
{
"x402": "/v1/x402/dependency-version-select",
"mpp": "/v1/mpp/dependency-version-select"
}
Required headers
{
"Content-Type": "application/json",
"Idempotency-Key": "random 16–128 character operation identifier"
}
Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.
Execution profile and provider conditions
{
"deterministic": true,
"externalRequests": 0,
"maxExternalRequests": 0,
"resultSnapshotPersisted": false,
"fixedExampleIsIllustrativeSnapshot": false,
"requiresPayment": true,
"supportsMcpExecution": false
}
Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.
Failure handling
- HTTP 400: Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch Correct the request before payment
- HTTP 402: Payment challenge or rejected payment Use official protocol SDK; inspect payment outcome before another payment
- HTTP 409: Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay
- HTTP 413: Input or generated output too large Reduce input; no payment attempted for validation failure
- HTTP 415: Unsupported media type or compression Send uncompressed application/json
- HTTP 422: Schema or service-specific semantic validation failure Correct input using returned error code; no payment attempted
- HTTP 429: Request/payment-attempt rate exceeded Wait for rate limit window; preserve existing payment identity
- HTTP 503: Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation
Declared requirements
Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.