{
  "id": "checked-json-artifact",
  "name": "Checked JSON Artifact Bundle",
  "description": "Repair one JSON document, require a valid caller-schema result, serialize and SHA-256 hash it before one x402 settlement. Fixed four-step local profile; no partial result, RFC 8785 or guaranteed delivery.",
  "category": "document-assurance",
  "priceUsd": "0.016",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.016",
    "sixDecimalTokenBaseUnits": "16000",
    "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": [
    "Repair, schema-check, serialize and hash one JSON document before one service charge",
    "Produce a checked JSON artifact with its exact UTF-8 SHA-256 and reviewable repair evidence"
  ],
  "whenToUse": [
    "The caller needs all four successful local steps as one x402-only fixed job",
    "Withhold partial results and stop before new settlement if repair or schema acceptance fails"
  ],
  "whenNotToUse": [
    "Arbitrary workflows, operation lists, bindings, external requests, MPP, or per-step pricing",
    "Only repair, only validation, or a job that does not need an artifact digest",
    "Full JSON Schema, RFC 8785, semantic truth, authenticity or guaranteed delivery"
  ],
  "capabilities": [
    "Exactly four trusted local components, one fixed proposed total and one outer protocol receipt",
    "Caller-owned safe-json-schema-subset-v1 gate; false/rejected reports abort the bundle",
    "Full repair original and edit evidence only in the complete successful result",
    "Artifact SHA-256 differs from the outer result-packet provenance hash",
    "Payment and response-delivery uncertainty require reconciliation using the original request identity"
  ],
  "related": [
    "json-repair",
    "json-schema-check",
    "json-canonicalize",
    "content-digest"
  ],
  "limits": {
    "steps": 4,
    "sourceItems": 1,
    "bindings": 3,
    "inputBytes": 32768,
    "sourceCodeUnits": 8000,
    "sourceBytesUtf8": 16000,
    "schemaBytes": 8192,
    "schemaNodes": 64,
    "schemaDepth": 8,
    "combinatorMembers": 4,
    "enumConstBytes": 8192,
    "valueNodes": 2000,
    "valueDepth": 16,
    "valueCollectionEntries": 256,
    "repairEdits": 100,
    "resolvedInputBytes": 32768,
    "resolvedInputNodes": 4000,
    "resolvedInputDepth": 20,
    "intermediateOutputBytes": 65536,
    "aggregateBytes": 196608,
    "aggregateNodes": 16000,
    "outputBytes": 131072,
    "jsonDepth": 24,
    "jsonNodes": 16000,
    "profile": "checked-json-artifact-v1",
    "networkAccess": "none-for-local-transformations",
    "schemaDialect": "safe-json-schema-subset-v1",
    "serializationProfile": "sorted-key-javascript-json-not-rfc8785",
    "paymentProtocol": "x402-only",
    "priceStatus": "proposed-unverified",
    "delivery": "not-guaranteed"
  },
  "errorCodes": [
    "BUNDLE_INPUT_LIMIT",
    "BUNDLE_PROFILE_INVALID",
    "BUNDLE_REPAIR_REJECTED",
    "BUNDLE_SCHEMA_REJECTED",
    "BUNDLE_STEP_INVALID",
    "BUNDLE_WORK_LIMIT",
    "BUNDLE_OUTPUT_LIMIT",
    "BUNDLE_INTERNAL_CONTRACT"
  ],
  "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": false,
      "operation.id": "checked-json-artifact",
      "operation.category": "document-assurance",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 32768,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 131072,
      "limit.jsonDepth": 24,
      "limit.jsonNodes": 16000,
      "bundle.profile": "checked-json-artifact-v1",
      "bundle.stepCount": 4,
      "bundle.fixedDataflow": true,
      "bundle.singleServiceCharge": true,
      "bundle.singleReceipt": true,
      "bundle.preSettlementSuccessGates": true,
      "bundle.repairRequiredSuccess": true,
      "bundle.schemaRequiredValid": true,
      "bundle.artifactDigest": "SHA-256-UTF8-no-newline",
      "bundle.serializer": "sorted-key-javascript-json-not-rfc8785",
      "bundle.arbitraryWorkflows": false,
      "bundle.dynamicPricing": false,
      "bundle.allFailuresFree": false,
      "bundle.exactlyOnceDelivery": false,
      "bundle.guaranteedDelivery": false,
      "bundle.persistentArtifactRecovery": false,
      "bundle.fullJsonSchema": false,
      "bundle.artifactAuthenticity": false,
      "input.steps.minItems": 4
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/checked-json-artifact.md",
  "serviceContract": "/reference/services/checked-json-artifact.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"
    ],
    "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": false,
      "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/checked-json-artifact"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "profile": {
        "const": "checked-json-artifact-v1"
      },
      "steps": {
        "type": "array",
        "prefixItems": [
          {
            "type": "object",
            "properties": {
              "id": {
                "const": "repair"
              },
              "operation": {
                "const": "json-repair"
              },
              "input": {
                "type": "object",
                "properties": {
                  "profile": {
                    "const": "conservative-json-repair-v1"
                  },
                  "items": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "const": "document"
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 8000
                          }
                        },
                        "required": [
                          "id",
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "items": false,
                    "minItems": 1
                  }
                },
                "required": [
                  "profile",
                  "items"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "const": "validate"
              },
              "operation": {
                "const": "json-schema-check"
              },
              "input": {
                "type": "object",
                "properties": {
                  "schema": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "required": [
                  "schema"
                ],
                "additionalProperties": false
              },
              "bindings": {
                "const": [
                  {
                    "target": "/value",
                    "from": {
                      "step": "repair",
                      "pointer": "/results/0/value"
                    }
                  }
                ]
              }
            },
            "required": [
              "id",
              "operation",
              "input",
              "bindings"
            ],
            "additionalProperties": false
          },
          {
            "const": {
              "id": "serialize",
              "operation": "json-canonicalize",
              "input": {},
              "bindings": [
                {
                  "target": "/value",
                  "from": {
                    "step": "repair",
                    "pointer": "/results/0/value"
                  }
                }
              ]
            }
          },
          {
            "const": {
              "id": "digest",
              "operation": "content-digest",
              "input": {
                "algorithm": "SHA-256"
              },
              "bindings": [
                {
                  "target": "/text",
                  "from": {
                    "step": "serialize",
                    "pointer": "/canonical"
                  }
                }
              ]
            }
          }
        ],
        "items": false,
        "minItems": 4
      }
    },
    "required": [
      "profile",
      "steps"
    ],
    "additionalProperties": false,
    "$defs": {
      "__schema0": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/$defs/__schema0"
            }
          }
        ]
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "checked-json-artifact",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "profile": {
            "const": "checked-json-artifact-v1"
          },
          "status": {
            "const": "complete"
          },
          "stepCount": {
            "const": 4
          },
          "steps": {
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "const": "repair"
                  },
                  "operation": {
                    "const": "json-repair"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "const": "conservative-json-repair-v1"
                      },
                      "offsetUnit": {
                        "const": "utf16-code-units"
                      },
                      "itemCount": {
                        "const": 1
                      },
                      "successCount": {
                        "const": 1
                      },
                      "rejectedCount": {
                        "const": 0
                      },
                      "results": {
                        "type": "array",
                        "prefixItems": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "const": "document"
                              },
                              "originalText": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "repaired",
                                  "unchanged"
                                ]
                              },
                              "originalSha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "originalWasValidJson": {
                                "type": "boolean"
                              },
                              "repairedText": {
                                "type": "string"
                              },
                              "repairedSha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "value": {
                                "$ref": "#/properties/result/$defs/__schema0"
                              },
                              "edits": {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "remove-bom",
                                        "remove-fence",
                                        "replace-comment",
                                        "remove-trailing-comma",
                                        "quote-key",
                                        "convert-single-quoted-string",
                                        "convert-python-literal"
                                      ]
                                    },
                                    "start": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "end": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "before": {
                                      "type": "string"
                                    },
                                    "after": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "start",
                                    "end",
                                    "before",
                                    "after"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "id",
                              "originalText",
                              "status",
                              "originalSha256",
                              "originalWasValidJson",
                              "repairedText",
                              "repairedSha256",
                              "value",
                              "edits"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "items": false,
                        "minItems": 1
                      }
                    },
                    "required": [
                      "profile",
                      "offsetUnit",
                      "itemCount",
                      "successCount",
                      "rejectedCount",
                      "results"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "operation",
                  "result"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "const": "validate"
                  },
                  "operation": {
                    "const": "json-schema-check"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "valid": {
                        "const": true
                      },
                      "errors": {
                        "maxItems": 0,
                        "type": "array",
                        "items": {
                          "not": {}
                        }
                      },
                      "dialect": {
                        "const": "safe-json-schema-subset-v1"
                      }
                    },
                    "required": [
                      "valid",
                      "errors",
                      "dialect"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "operation",
                  "result"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "const": "serialize"
                  },
                  "operation": {
                    "const": "json-canonicalize"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "canonical": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "bytesUtf8": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "canonical",
                      "bytesUtf8"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "operation",
                  "result"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "const": "digest"
                  },
                  "operation": {
                    "const": "content-digest"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "algorithm": {
                        "const": "SHA-256"
                      },
                      "hex": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "base64": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9+/]{43}=$"
                      },
                      "byteLength": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "algorithm",
                      "hex",
                      "base64",
                      "byteLength"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "operation",
                  "result"
                ],
                "additionalProperties": false
              }
            ],
            "items": false,
            "minItems": 4
          },
          "externalRequests": {
            "const": 0
          }
        },
        "required": [
          "profile",
          "status",
          "stepCount",
          "steps",
          "externalRequests"
        ],
        "additionalProperties": false,
        "$defs": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/properties/result/$defs/__schema0"
                }
              },
              {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/properties/result/$defs/__schema0"
                }
              }
            ]
          }
        }
      },
      "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": {
    "profile": "checked-json-artifact-v1",
    "steps": [
      {
        "id": "repair",
        "operation": "json-repair",
        "input": {
          "profile": "conservative-json-repair-v1",
          "items": [
            {
              "id": "document",
              "text": "True"
            }
          ]
        }
      },
      {
        "id": "validate",
        "operation": "json-schema-check",
        "input": {
          "schema": {
            "type": "boolean"
          }
        },
        "bindings": [
          {
            "target": "/value",
            "from": {
              "step": "repair",
              "pointer": "/results/0/value"
            }
          }
        ]
      },
      {
        "id": "serialize",
        "operation": "json-canonicalize",
        "input": {},
        "bindings": [
          {
            "target": "/value",
            "from": {
              "step": "repair",
              "pointer": "/results/0/value"
            }
          }
        ]
      },
      {
        "id": "digest",
        "operation": "content-digest",
        "input": {
          "algorithm": "SHA-256"
        },
        "bindings": [
          {
            "target": "/text",
            "from": {
              "step": "serialize",
              "pointer": "/canonical"
            }
          }
        ]
      }
    ]
  },
  "exampleResponse": {
    "operation": "checked-json-artifact",
    "version": "0.29.0",
    "result": {
      "profile": "checked-json-artifact-v1",
      "status": "complete",
      "stepCount": 4,
      "steps": [
        {
          "id": "repair",
          "operation": "json-repair",
          "result": {
            "profile": "conservative-json-repair-v1",
            "offsetUnit": "utf16-code-units",
            "itemCount": 1,
            "successCount": 1,
            "rejectedCount": 0,
            "results": [
              {
                "id": "document",
                "originalText": "True",
                "status": "repaired",
                "originalSha256": "3cbc87c7681f34db4617feaa2c8801931bc5e42d8d0f560e756dd4cd92885f18",
                "originalWasValidJson": false,
                "repairedText": "true",
                "repairedSha256": "b5bea41b6c623f7c09f1bf24dcae58ebab3c0cdd90ad966bc43a45b44867e12b",
                "value": true,
                "edits": [
                  {
                    "kind": "convert-python-literal",
                    "start": 0,
                    "end": 4,
                    "before": "True",
                    "after": "true"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "validate",
          "operation": "json-schema-check",
          "result": {
            "valid": true,
            "errors": [],
            "dialect": "safe-json-schema-subset-v1"
          }
        },
        {
          "id": "serialize",
          "operation": "json-canonicalize",
          "result": {
            "canonical": "true",
            "bytesUtf8": 4
          }
        },
        {
          "id": "digest",
          "operation": "content-digest",
          "result": {
            "algorithm": "SHA-256",
            "hex": "b5bea41b6c623f7c09f1bf24dcae58ebab3c0cdd90ad966bc43a45b44867e12b",
            "base64": "tb6kG2xiP3wJ8b8k3K5Y66s8DN2QrZZrxDpFtEhn4Ss=",
            "byteLength": 4
          }
        }
      ],
      "externalRequests": 0
    },
    "provenance": {
      "inputSha256": "978b1678c043303983abb687f36066ac3901dd8cc25faad57c5b549bdd20d606",
      "outputSha256": "0ce678cb0e4d06c619e9da513aea8a2e9c162bdf8c513bff1ebc48b4b1b9735a",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/checked-json-artifact.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."
  }
}
