{
  "id": "records-link-candidates",
  "name": "Exact Record Link Candidates",
  "description": "Produce every admissible cross-table candidate using explicitly normalized Unicode-scalar Levenshtein distances and exact integer weighted costs. Includes all tied best candidates; never selects an identity, asserts duplicates or merges records.",
  "category": "data-assurance",
  "priceUsd": "0.006",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.006",
    "sixDecimalTokenBaseUnits": "6000",
    "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."
  },
  "intents": [
    "Find reproducible near-spelling candidates between small supplied part catalogues",
    "Compare asset labels under explicit normalization and edit-distance cutoffs"
  ],
  "whenToUse": [
    "Return a complete bounded candidate queue with exact field-distance evidence"
  ],
  "whenNotToUse": [
    "Identity resolution, true-duplicate assertions, automatic merging, confidence probabilities or semantic similarity",
    "Medical, employment, credit or other high-impact decisions about people",
    "Large-table nearest neighbors, top-k retrieval or transposition distance",
    "Network requests, file changes, external execution, publishing or deployment"
  ],
  "capabilities": [
    "Exact unit-cost scalar Levenshtein over every cross pair and field; no pruning or truncation",
    "Unicode normalization then ASCII lowercase then ASCII whitespace collapse/trim, each explicitly selected",
    "Unicode normalization supplied by the pinned Worker runtime; NFKC can erase meaningful distinctions",
    "Candidate sort: exact UTF-16 left ID, numeric cost, exact UTF-16 right ID; IDs are never normalized",
    "Complete bounded result computed during semantic preflight before payment challenge; recomputed during execution",
    "Supplied-data-only artifact; externalRequests=0"
  ],
  "related": [
    "records-project",
    "records-join",
    "assignment-cost-optimize"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 300000,
    "jsonNodes": 12000,
    "depth": 20,
    "dpCells": 262144,
    "rowsPerSide": 16,
    "fields": 3,
    "valueScalars": 128,
    "idCodeUnits": 80,
    "weight": 100,
    "maxWeightedDistance": 38400,
    "candidates": 256,
    "comparisonUnit": "unicode-scalars",
    "normalizationOrder": "unicodeForm,asciiCase,asciiWhitespace",
    "candidateSet": "complete-for-declared-rules"
  },
  "errorCodes": [
    "INVALID_INPUT",
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "INVALID_JSON",
    "INVALID_NUMBER",
    "INVALID_UNICODE",
    "UNSAFE_KEY",
    "WORK_LIMIT",
    "DUPLICATE_ID",
    "FIELD_WIDTH",
    "VALUE_LENGTH"
  ],
  "requirementsProfile": {
    "format": "declared-requirements-v1",
    "facts": {
      "execution.suppliedCode": false,
      "execution.remoteMutation": false,
      "execution.llmInference": false,
      "execution.paidMcp": false,
      "verification.semanticTruth": false,
      "verification.sourceAuthenticity": false,
      "verification.liveVulnerabilities": false,
      "numbers.arbitraryPrecisionJson": false,
      "numbers.model": "ieee754-binary64",
      "privacy.requestBodyPersisted": false,
      "execution.deterministic": true,
      "execution.networkAccess": false,
      "privacy.resultBodyPersisted": false,
      "payment.x402": true,
      "payment.mpp": true,
      "operation.id": "records-link-candidates",
      "operation.category": "data-assurance",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 300000,
      "limit.jsonDepth": 20,
      "limit.jsonNodes": 12000,
      "recordLink.profile": "explicit-normalized-levenshtein-candidates-v1",
      "recordLink.comparisonUnit": "unicode-scalars",
      "recordLink.normalizationOrder": "unicodeForm,asciiCase,asciiWhitespace",
      "recordLink.unicodeNormalizationProvider": "pinned-worker-runtime",
      "recordLink.candidateSetComplete": true,
      "recordLink.allBestTiesRetained": true,
      "recordLink.costModel": "exact-integer-weighted-unit-edit-distance",
      "recordLink.maxRowsPerSide": 16,
      "recordLink.maxFields": 3,
      "recordLink.maxValueScalars": 128,
      "recordLink.maxDpCells": 262144,
      "recordLink.identityVerified": false,
      "recordLink.trueDuplicatesVerified": false,
      "recordLink.semanticSimilarity": false,
      "recordLink.calibratedProbability": false,
      "recordLink.automaticMerge": false,
      "recordLink.transpositionSingleEdit": false,
      "input.left.maxItems": 16,
      "input.right.maxItems": 16,
      "input.fields.maxItems": 3,
      "input.fields.minItems": 1,
      "input.maxWeightedDistance.maximum": 38400,
      "input.maxWeightedDistance.minimum": 0
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/records-link-candidates.md",
  "serviceContract": "/reference/services/records-link-candidates.json",
  "errors": [
    {
      "status": 400,
      "meaning": "Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch",
      "retry": "Correct the request before payment"
    },
    {
      "status": 402,
      "meaning": "Payment challenge or rejected payment",
      "retry": "Use official protocol SDK; inspect payment outcome before another payment"
    },
    {
      "status": 409,
      "meaning": "Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN",
      "retry": "Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay"
    },
    {
      "status": 413,
      "meaning": "Input or generated output too large",
      "retry": "Reduce input; no payment attempted for validation failure"
    },
    {
      "status": 415,
      "meaning": "Unsupported media type or compression",
      "retry": "Send uncompressed application/json"
    },
    {
      "status": 422,
      "meaning": "Schema or service-specific semantic validation failure",
      "retry": "Correct input using returned error code; no payment attempted"
    },
    {
      "status": 429,
      "meaning": "Request/payment-attempt rate exceeded",
      "retry": "Wait for rate limit window; preserve existing payment identity"
    },
    {
      "status": 503,
      "meaning": "Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement",
      "retry": "Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation"
    }
  ],
  "numericPrecision": "JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.",
  "paymentWorkflow": {
    "discoveryOnly": false,
    "supportedProtocols": [
      "x402",
      "mpp"
    ],
    "x402": {
      "credentialHeader": "PAYMENT-SIGNATURE",
      "challengeHeader": "PAYMENT-REQUIRED",
      "receiptHeader": "PAYMENT-RESPONSE",
      "version": 2,
      "scheme": "exact",
      "paymentIdentifier": "payment-identifier extension MUST equal the HTTP Idempotency-Key",
      "sdk": "@x402/core with @x402/evm"
    },
    "mpp": {
      "supported": true,
      "credentialHeader": "Authorization",
      "challengeHeader": "WWW-Authenticate",
      "receiptHeader": "Payment-Receipt",
      "method": "tempo",
      "intent": "charge",
      "sdk": "mppx",
      "tokenDecimals": 6
    },
    "steps": [
      "Check configured readiness and the exact service schema",
      "Generate a fresh random Idempotency-Key for this operation; never use a discovery probe fixture for purchases",
      "Send valid input without a credential to obtain the official protocol challenge",
      "Use the official SDK and authorized wallet to fulfill the challenge",
      "Retry only with identical key, body, protocol and credential",
      "On PAYMENT_UNCERTAIN stop and request operator reconciliation; never blindly pay again"
    ],
    "versionedRetries": "Request fingerprint includes service release version. Retries across a version upgrade can conflict; coordinate upgrades outside the 24-hour replay window and reconcile pending attempts.",
    "docs": "/llms.txt"
  },
  "method": "POST",
  "paths": {
    "x402": "/v1/x402/records-link-candidates",
    "mpp": "/v1/mpp/records-link-candidates"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "left": {
        "maxItems": 16,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "values": {
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 256
              }
            }
          },
          "required": [
            "id",
            "values"
          ],
          "additionalProperties": false
        }
      },
      "right": {
        "maxItems": 16,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "values": {
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 256
              }
            }
          },
          "required": [
            "id",
            "values"
          ],
          "additionalProperties": false
        }
      },
      "fields": {
        "minItems": 1,
        "maxItems": 3,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "weight": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "maxDistance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 128
            },
            "normalization": {
              "type": "object",
              "properties": {
                "unicodeForm": {
                  "type": "string",
                  "enum": [
                    "none",
                    "NFC",
                    "NFKC"
                  ]
                },
                "asciiCase": {
                  "type": "string",
                  "enum": [
                    "preserve",
                    "lower"
                  ]
                },
                "asciiWhitespace": {
                  "type": "string",
                  "enum": [
                    "preserve",
                    "collapse-trim"
                  ]
                }
              },
              "required": [
                "unicodeForm",
                "asciiCase",
                "asciiWhitespace"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "id",
            "weight",
            "maxDistance",
            "normalization"
          ],
          "additionalProperties": false
        }
      },
      "maxWeightedDistance": {
        "type": "integer",
        "minimum": 0,
        "maximum": 38400
      }
    },
    "required": [
      "left",
      "right",
      "fields",
      "maxWeightedDistance"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "records-link-candidates",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "const": "explicit-normalized-levenshtein-candidates-v1"
          },
          "fields": {
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "weight": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100
                },
                "maxDistance": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 128
                },
                "normalization": {
                  "type": "object",
                  "properties": {
                    "unicodeForm": {
                      "type": "string",
                      "enum": [
                        "none",
                        "NFC",
                        "NFKC"
                      ]
                    },
                    "asciiCase": {
                      "type": "string",
                      "enum": [
                        "preserve",
                        "lower"
                      ]
                    },
                    "asciiWhitespace": {
                      "type": "string",
                      "enum": [
                        "preserve",
                        "collapse-trim"
                      ]
                    }
                  },
                  "required": [
                    "unicodeForm",
                    "asciiCase",
                    "asciiWhitespace"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "weight",
                "maxDistance",
                "normalization"
              ],
              "additionalProperties": false
            }
          },
          "maxWeightedDistance": {
            "type": "integer",
            "minimum": 0,
            "maximum": 38400
          },
          "normalizedLeft": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "values": {
                  "minItems": 1,
                  "maxItems": 3,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              },
              "required": [
                "id",
                "values"
              ],
              "additionalProperties": false
            }
          },
          "normalizedRight": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "values": {
                  "minItems": 1,
                  "maxItems": 3,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              },
              "required": [
                "id",
                "values"
              ],
              "additionalProperties": false
            }
          },
          "candidates": {
            "maxItems": 256,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "leftId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "rightId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "fieldDistances": {
                  "minItems": 1,
                  "maxItems": 3,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "fieldId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "distance": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 128
                      },
                      "weightedDistance": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 12800
                      }
                    },
                    "required": [
                      "fieldId",
                      "distance",
                      "weightedDistance"
                    ],
                    "additionalProperties": false
                  }
                },
                "cost": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                }
              },
              "required": [
                "leftId",
                "rightId",
                "fieldDistances",
                "cost"
              ],
              "additionalProperties": false
            }
          },
          "perLeft": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "leftId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "candidateCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 16
                },
                "minimumCost": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "bestRightIds": {
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              },
              "required": [
                "leftId",
                "candidateCount",
                "minimumCost",
                "bestRightIds"
              ],
              "additionalProperties": false
            }
          },
          "noCandidateLeftIds": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "pairComparisonCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 256
          },
          "fieldComparisonCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 768
          },
          "dpCellCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 262144
          },
          "candidateSetComplete": {
            "type": "boolean",
            "const": true
          },
          "identityResolved": {
            "type": "boolean",
            "const": false
          },
          "externalRequests": {
            "type": "number",
            "const": 0
          }
        },
        "required": [
          "profile",
          "fields",
          "maxWeightedDistance",
          "normalizedLeft",
          "normalizedRight",
          "candidates",
          "perLeft",
          "noCandidateLeftIds",
          "pairComparisonCount",
          "fieldComparisonCount",
          "dpCellCount",
          "candidateSetComplete",
          "identityResolved",
          "externalRequests"
        ],
        "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
  },
  "exampleInput": {
    "fields": [
      {
        "id": "label",
        "weight": 2,
        "maxDistance": 2,
        "normalization": {
          "unicodeForm": "NFC",
          "asciiCase": "lower",
          "asciiWhitespace": "collapse-trim"
        }
      },
      {
        "id": "family",
        "weight": 1,
        "maxDistance": 0,
        "normalization": {
          "unicodeForm": "NFC",
          "asciiCase": "lower",
          "asciiWhitespace": "collapse-trim"
        }
      }
    ],
    "maxWeightedDistance": 4,
    "left": [
      {
        "id": "L1",
        "values": [
          " Axle  12 ",
          "CHASSIS"
        ]
      },
      {
        "id": "L2",
        "values": [
          "pump",
          "fluid"
        ]
      }
    ],
    "right": [
      {
        "id": "R1",
        "values": [
          "axle 12",
          "chassis"
        ]
      },
      {
        "id": "R2",
        "values": [
          "axel 12",
          "chassis"
        ]
      },
      {
        "id": "R3",
        "values": [
          "pump",
          "fluid"
        ]
      }
    ]
  },
  "exampleResponse": {
    "operation": "records-link-candidates",
    "version": "0.29.0",
    "result": {
      "profile": "explicit-normalized-levenshtein-candidates-v1",
      "fields": [
        {
          "id": "label",
          "weight": 2,
          "maxDistance": 2,
          "normalization": {
            "unicodeForm": "NFC",
            "asciiCase": "lower",
            "asciiWhitespace": "collapse-trim"
          }
        },
        {
          "id": "family",
          "weight": 1,
          "maxDistance": 0,
          "normalization": {
            "unicodeForm": "NFC",
            "asciiCase": "lower",
            "asciiWhitespace": "collapse-trim"
          }
        }
      ],
      "maxWeightedDistance": 4,
      "normalizedLeft": [
        {
          "id": "L1",
          "values": [
            "axle 12",
            "chassis"
          ]
        },
        {
          "id": "L2",
          "values": [
            "pump",
            "fluid"
          ]
        }
      ],
      "normalizedRight": [
        {
          "id": "R1",
          "values": [
            "axle 12",
            "chassis"
          ]
        },
        {
          "id": "R2",
          "values": [
            "axel 12",
            "chassis"
          ]
        },
        {
          "id": "R3",
          "values": [
            "pump",
            "fluid"
          ]
        }
      ],
      "candidates": [
        {
          "leftId": "L1",
          "rightId": "R1",
          "fieldDistances": [
            {
              "fieldId": "label",
              "distance": 0,
              "weightedDistance": 0
            },
            {
              "fieldId": "family",
              "distance": 0,
              "weightedDistance": 0
            }
          ],
          "cost": "0"
        },
        {
          "leftId": "L1",
          "rightId": "R2",
          "fieldDistances": [
            {
              "fieldId": "label",
              "distance": 2,
              "weightedDistance": 4
            },
            {
              "fieldId": "family",
              "distance": 0,
              "weightedDistance": 0
            }
          ],
          "cost": "4"
        },
        {
          "leftId": "L2",
          "rightId": "R3",
          "fieldDistances": [
            {
              "fieldId": "label",
              "distance": 0,
              "weightedDistance": 0
            },
            {
              "fieldId": "family",
              "distance": 0,
              "weightedDistance": 0
            }
          ],
          "cost": "0"
        }
      ],
      "perLeft": [
        {
          "leftId": "L1",
          "candidateCount": 2,
          "minimumCost": "0",
          "bestRightIds": [
            "R1"
          ]
        },
        {
          "leftId": "L2",
          "candidateCount": 1,
          "minimumCost": "0",
          "bestRightIds": [
            "R3"
          ]
        }
      ],
      "noCandidateLeftIds": [],
      "pairComparisonCount": 6,
      "fieldComparisonCount": 12,
      "dpCellCount": 581,
      "candidateSetComplete": true,
      "identityResolved": false,
      "externalRequests": 0
    },
    "provenance": {
      "inputSha256": "588279a822903512cb726f70c274fe5639f800e1c38cb18a1f1212977f108aa1",
      "outputSha256": "066667d2abaa77c4727ecf26453c0db3274d95e1008d452b7555be3af7f429eb",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/records-link-candidates.json",
  "execution": {
    "deterministic": true,
    "externalRequests": 0,
    "maxExternalRequests": 0,
    "resultSnapshotPersisted": false,
    "fixedExampleIsIllustrativeSnapshot": false,
    "requiresPayment": true,
    "supportsMcpExecution": false
  },
  "releaseSnapshot": {
    "format": "static-release-reference-v1",
    "sourceVersion": "0.29.0",
    "sourceRegistrySha256": "a2b5ec09bf6c38b9d2879d746a4fded374f5928b445377b0270ef6aa8e6cac65",
    "generatedAt": "2026-10-06T15:38:00Z",
    "releaseAcceptance": "not-verified-by-generator",
    "runtimeReadiness": "not-evaluated",
    "livePaymentsVerified": false,
    "indexingVerified": false,
    "apiOrigin": null,
    "notice": "Build-time release reference. Runtime readiness, deployment, payment settlement and external indexing are not evaluated here. Prices are proposed; this file cannot authorize execution or payment."
  }
}
