{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hydracept-com/json-schema/hydracept-com-hydracept-receipt-schema.json",
  "title": "HydraceptReceipt",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hydracept-com-openapi.json#/components/schemas/HydraceptReceipt",
  "properties": {
    "receiptId": {
      "type": "string",
      "title": "Receiptid"
    },
    "jobId": {
      "type": "string",
      "title": "Jobid"
    },
    "capabilityKey": {
      "type": "string",
      "title": "Capabilitykey"
    },
    "principalId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Principalid"
    },
    "projectId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Projectid"
    },
    "productId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Productid"
    },
    "externalRef": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Externalref"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags"
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Metadata"
    },
    "environment": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Environment"
    },
    "admission": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptReceiptAdmission"
        },
        {
          "type": "null"
        }
      ]
    },
    "route": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptReceiptRoute"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimatedCost": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Estimatedcost",
      "description": "Legacy compatibility field mirroring pricing.quote.customerTotal. Prefer pricing.quote."
    },
    "actualCost": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Actualcost",
      "description": "Legacy compatibility field mirroring pricing.charge.customerCharge. Prefer pricing.charge."
    },
    "currency": {
      "type": "string",
      "title": "Currency",
      "default": "USD"
    },
    "artifacts": {
      "items": {
        "$ref": "#/$defs/HydraceptJobArtifactRef"
      },
      "type": "array",
      "title": "Artifacts"
    },
    "timestamps": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptReceiptTimestamps"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptJobStatus"
        },
        {
          "type": "string"
        }
      ],
      "title": "Status"
    },
    "seal": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptReceiptSeal"
        },
        {
          "type": "null"
        }
      ]
    },
    "provenance": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptReceiptProvenance"
        },
        {
          "type": "null"
        }
      ]
    },
    "text": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Text"
    },
    "media": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Media"
    },
    "pricing": {
      "anyOf": [
        {
          "$ref": "#/$defs/HydraceptReceiptPricing"
        },
        {
          "type": "null"
        }
      ]
    },
    "routing": {
      "anyOf": [
        {
          "$ref": "#/$defs/RoutingSelection"
        },
        {
          "type": "null"
        }
      ]
    },
    "targetRouting": {
      "anyOf": [
        {
          "$ref": "#/$defs/TargetRoutingRecord"
        },
        {
          "type": "null"
        }
      ]
    },
    "benchmarkContext": {
      "anyOf": [
        {
          "$ref": "#/$defs/BenchmarkContextRecord"
        },
        {
          "type": "null"
        }
      ]
    },
    "customerSavings": {
      "anyOf": [
        {
          "$ref": "#/$defs/CustomerSavings"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "receiptId",
    "jobId",
    "capabilityKey",
    "status"
  ],
  "$defs": {
    "BenchmarkContextRecord": {
      "properties": {
        "benchmarkPolicyId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Benchmarkpolicyid"
        },
        "workloadProfileId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Workloadprofileid"
        },
        "derivedScoreHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Derivedscorehash"
        }
      },
      "type": "object",
      "title": "BenchmarkContextRecord",
      "description": "Stable benchmark ids. derivedScoreHash is null when no comparison was computed."
    },
    "ComputeLevel": {
      "type": "string",
      "enum": [
        "auto",
        "low",
        "medium",
        "high"
      ],
      "title": "ComputeLevel",
      "description": "Provider-neutral inference effort requested by the routing authority."
    },
    "CredentialPricingMode": {
      "type": "string",
      "enum": [
        "byok",
        "managed"
      ],
      "title": "CredentialPricingMode"
    },
    "CustomerCharge": {
      "properties": {
        "upstreamMicros": {
          "type": "integer",
          "title": "Upstreammicros"
        },
        "hydraceptFeeMicros": {
          "type": "integer",
          "title": "Hydraceptfeemicros"
        },
        "customerTotalMicros": {
          "type": "integer",
          "title": "Customertotalmicros"
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "default": "USD"
        },
        "lineItems": {
          "items": {
            "$ref": "#/$defs/PricingLineItem"
          },
          "type": "array",
          "title": "Lineitems"
        }
      },
      "type": "object",
      "required": [
        "upstreamMicros",
        "hydraceptFeeMicros",
        "customerTotalMicros"
      ],
      "title": "CustomerCharge"
    },
    "CustomerSavings": {
      "properties": {
        "selectedPlanCostMicros": {
          "type": "integer",
          "title": "Selectedplancostmicros"
        },
        "comparisonBaselineMicros": {
          "type": "integer",
          "title": "Comparisonbaselinemicros"
        },
        "baselinePlanId": {
          "type": "string",
          "title": "Baselineplanid"
        },
        "estimatedSavingsMicros": {
          "type": "integer",
          "title": "Estimatedsavingsmicros"
        },
        "savingsPercent": {
          "type": "number",
          "title": "Savingspercent"
        }
      },
      "type": "object",
      "required": [
        "selectedPlanCostMicros",
        "comparisonBaselineMicros",
        "baselinePlanId",
        "estimatedSavingsMicros",
        "savingsPercent"
      ],
      "title": "CustomerSavings"
    },
    "HydraceptJobArtifactRef": {
      "properties": {
        "artifactId": {
          "type": "string",
          "title": "Artifactid"
        },
        "mediaType": {
          "type": "string",
          "title": "Mediatype"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "downloadPath": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Downloadpath"
        },
        "sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sha256"
        },
        "exportSha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exportsha256",
          "description": "SHA-256 of default export bytes (neutral generator metadata) when they differ from sha256."
        },
        "byteLength": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bytelength"
        },
        "variantIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Variantindex"
        },
        "slotStatus": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Slotstatus"
        },
        "selected": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Selected"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        },
        "filename": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Filename"
        },
        "sliceCellId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Slicecellid"
        }
      },
      "type": "object",
      "required": [
        "artifactId",
        "mediaType",
        "kind"
      ],
      "title": "HydraceptJobArtifactRef"
    },
    "HydraceptJobStatus": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "awaiting_approval",
        "succeeded",
        "failed",
        "canceling",
        "canceled",
        "needs_attention"
      ],
      "title": "HydraceptJobStatus"
    },
    "HydraceptReceiptAdmission": {
      "properties": {
        "admitted": {
          "type": "boolean",
          "title": "Admitted"
        },
        "rejectionCode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rejectioncode"
        },
        "rejectionMessage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rejectionmessage"
        }
      },
      "type": "object",
      "required": [
        "admitted"
      ],
      "title": "HydraceptReceiptAdmission"
    },
    "HydraceptReceiptHydracept": {
      "properties": {
        "serviceFeeRateBps": {
          "type": "integer",
          "title": "Servicefeeratebps",
          "default": 0
        },
        "inferenceFeeMicros": {
          "type": "integer",
          "title": "Inferencefeemicros",
          "default": 0
        }
      },
      "type": "object",
      "title": "HydraceptReceiptHydracept"
    },
    "HydraceptReceiptPricing": {
      "properties": {
        "quote": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReceiptQuote"
            },
            {
              "type": "null"
            }
          ]
        },
        "charge": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReceiptCharge"
            },
            {
              "type": "null"
            }
          ]
        },
        "providerUsage": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReceiptProviderUsage"
            },
            {
              "type": "null"
            }
          ]
        },
        "providerCost": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReceiptProviderCost"
            },
            {
              "type": "null"
            }
          ]
        },
        "policy": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReceiptPricingPolicy"
            },
            {
              "type": "null"
            }
          ]
        },
        "presentation": {
          "anyOf": [
            {
              "$ref": "#/$defs/PresentationMoney"
            },
            {
              "type": "null"
            }
          ]
        },
        "mode": {
          "anyOf": [
            {
              "$ref": "#/$defs/CredentialPricingMode"
            },
            {
              "type": "null"
            }
          ]
        },
        "estimatedProviderPriceBasisMicros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimatedproviderpricebasismicros"
        },
        "observedUsage": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Observedusage"
        },
        "hydraceptInferenceFeeMicros": {
          "type": "integer",
          "title": "Hydraceptinferencefeemicros",
          "default": 0
        },
        "providerReportedCostMicros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Providerreportedcostmicros"
        },
        "customerCharge": {
          "anyOf": [
            {
              "$ref": "#/$defs/CustomerCharge"
            },
            {
              "type": "null"
            }
          ]
        },
        "hydracept": {
          "anyOf": [
            {
              "$ref": "#/$defs/HydraceptReceiptHydracept"
            },
            {
              "type": "null"
            }
          ]
        },
        "executionPlanId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Executionplanid"
        },
        "pricingSnapshotIds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Pricingsnapshotids"
        },
        "quoteId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quoteid"
        },
        "estimateId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimateid",
          "description": "Inbound/outbound alias of quoteId. Prefer quoteId and pricing.quote."
        },
        "pricingVersion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pricingversion"
        },
        "pricingInputFingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pricinginputfingerprint"
        },
        "resolvedRoute": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Resolvedroute"
        },
        "estimatedCharge": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimatedcharge"
        },
        "maximumAuthorizedCharge": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Maximumauthorizedcharge"
        },
        "actualCharge": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actualcharge"
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "description": "Retail price of the capability for this execution. Independent of wallet debit."
        },
        "basisEstimated": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Basisestimated"
        },
        "basisActual": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Basisactual"
        },
        "fundingSource": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fundingsource"
        },
        "trialCoveredMicros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Trialcoveredmicros"
        },
        "customerDebitedMicros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Customerdebitedmicros"
        },
        "actualChargeMicros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actualchargemicros"
        }
      },
      "type": "object",
      "title": "HydraceptReceiptPricing",
      "description": "Canonical pricing on a receipt. Legacy micros fields remain for compatibility."
    },
    "HydraceptReceiptProvenance": {
      "properties": {
        "bundleVersion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bundleversion"
        },
        "bundleHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bundlehash"
        },
        "policyHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Policyhash"
        },
        "receiptHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Receipthash"
        },
        "generator": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Generator",
          "description": "Passive first-party generator label when org/project allows attribution."
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "Public receipt URL (https://hydracept.com/r/{receiptId}) when attribution is enabled."
        },
        "execution": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Execution"
        },
        "engine": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Engine"
        },
        "providerBacked": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Providerbacked"
        },
        "modelBacked": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Modelbacked"
        },
        "deterministic": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deterministic"
        }
      },
      "type": "object",
      "title": "HydraceptReceiptProvenance"
    },
    "HydraceptReceiptRoute": {
      "properties": {
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider"
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model"
        },
        "routeBundleVersion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Routebundleversion"
        },
        "routeBundleHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Routebundlehash"
        },
        "requestedModel": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requestedmodel"
        },
        "requestedMode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requestedmode"
        },
        "routingPolicy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Routingpolicy"
        },
        "fallbackReason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fallbackreason"
        }
      },
      "type": "object",
      "title": "HydraceptReceiptRoute"
    },
    "HydraceptReceiptSeal": {
      "properties": {
        "algorithm": {
          "type": "string",
          "title": "Algorithm",
          "default": "Ed25519"
        },
        "keyId": {
          "type": "string",
          "title": "Keyid"
        },
        "publicKey": {
          "type": "string",
          "title": "Publickey"
        },
        "receiptHash": {
          "type": "string",
          "title": "Receipthash"
        },
        "signature": {
          "type": "string",
          "title": "Signature"
        },
        "signedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Signedat"
        }
      },
      "type": "object",
      "required": [
        "keyId",
        "publicKey",
        "receiptHash",
        "signature"
      ],
      "title": "HydraceptReceiptSeal",
      "description": "Tamper-evident seal over the receipt as issued.\n\n``receiptHash`` covers the canonical JSON without the ``seal`` member;\n``signature`` is an Ed25519 signature over the same bytes. ``publicKey`` is\nthe base64url Ed25519 public key; compare it with\n``GET /v1/public/receipts/verification-key`` before trusting a receipt from\nan untrusted channel."
    },
    "HydraceptReceiptTimestamps": {
      "properties": {
        "createdAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Createdat"
        },
        "startedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Startedat"
        },
        "completedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Completedat"
        }
      },
      "type": "object",
      "title": "HydraceptReceiptTimestamps"
    },
    "Money": {
      "properties": {
        "amountMicros": {
          "type": "integer",
          "title": "Amountmicros"
        },
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "amountMinor": {
          "type": "integer",
          "title": "Amountminor"
        },
        "display": {
          "type": "string",
          "title": "Display"
        }
      },
      "type": "object",
      "required": [
        "amountMicros",
        "currency",
        "amountMinor",
        "display"
      ],
      "title": "Money",
      "description": "Hydracept price before transactional tax. ``amountMicros`` is authority."
    },
    "PresentationMoney": {
      "properties": {
        "convertedTotal": {
          "$ref": "#/$defs/Money"
        },
        "fx": {
          "$ref": "#/$defs/ScaledFxRate"
        }
      },
      "type": "object",
      "required": [
        "convertedTotal",
        "fx"
      ],
      "title": "PresentationMoney",
      "description": "Optional converted display of a charge. Not part of the financial receipt."
    },
    "PricingLineItem": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "upstreamMicros": {
          "type": "integer",
          "title": "Upstreammicros"
        },
        "hydraceptFeeMicros": {
          "type": "integer",
          "title": "Hydraceptfeemicros",
          "default": 0
        },
        "includedProcessing": {
          "type": "boolean",
          "title": "Includedprocessing",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "label",
        "upstreamMicros"
      ],
      "title": "PricingLineItem"
    },
    "ProviderCostBearer": {
      "type": "string",
      "enum": [
        "hydracept",
        "customer",
        "none",
        "unknown"
      ],
      "title": "ProviderCostBearer"
    },
    "QuoteKind": {
      "type": "string",
      "enum": [
        "fixed",
        "estimate",
        "range"
      ],
      "title": "QuoteKind"
    },
    "ReceiptCharge": {
      "properties": {
        "customerCharge": {
          "$ref": "#/$defs/Money",
          "description": "Amount the customer owes Hydracept for this execution. $0 when Hydracept covers it."
        },
        "customerDebit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "description": "Amount actually removed from a customer-visible stored balance."
        },
        "chargedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Chargedat"
        }
      },
      "type": "object",
      "required": [
        "customerCharge"
      ],
      "title": "ReceiptCharge"
    },
    "ReceiptPricingPolicy": {
      "properties": {
        "serviceFeeBps": {
          "type": "integer",
          "title": "Servicefeebps",
          "default": 0
        },
        "pricingMode": {
          "$ref": "#/$defs/CredentialPricingMode"
        }
      },
      "type": "object",
      "required": [
        "pricingMode"
      ],
      "title": "ReceiptPricingPolicy"
    },
    "ReceiptProviderCost": {
      "properties": {
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "title": "Status",
          "default": "unknown"
        },
        "basis": {
          "type": "string",
          "title": "Basis",
          "default": "unknown"
        },
        "priceScheduleId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pricescheduleid"
        }
      },
      "type": "object",
      "title": "ReceiptProviderCost",
      "description": "Provider cost evidence. ``amount`` is null when unknown — never ``0``.\n\n``basis``/``status`` explain how the amount was obtained; a usage-priced cost\nnames the pinned ``priceScheduleId`` so a later catalog change cannot silently\nrewrite historical provider cost."
    },
    "ReceiptProviderUsage": {
      "properties": {
        "reportedCost": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "costBearer": {
          "$ref": "#/$defs/ProviderCostBearer",
          "default": "unknown"
        }
      },
      "type": "object",
      "title": "ReceiptProviderUsage"
    },
    "ReceiptQuote": {
      "properties": {
        "quoteId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quoteid"
        },
        "kind": {
          "$ref": "#/$defs/QuoteKind",
          "default": "fixed"
        },
        "chargeBasis": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "serviceFee": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "customerTotal": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "maximumCustomerTotal": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "expiresAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expiresat"
        },
        "pricingInputsHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pricinginputshash"
        }
      },
      "type": "object",
      "title": "ReceiptQuote"
    },
    "RoutingSelection": {
      "properties": {
        "routingPolicy": {
          "type": "string",
          "title": "Routingpolicy"
        },
        "selectedPlanId": {
          "type": "string",
          "title": "Selectedplanid"
        },
        "selectionReason": {
          "type": "string",
          "title": "Selectionreason"
        },
        "eligiblePlanIds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Eligibleplanids"
        },
        "taskFamily": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Taskfamily"
        },
        "computeLevel": {
          "anyOf": [
            {
              "$ref": "#/$defs/ComputeLevel"
            },
            {
              "type": "null"
            }
          ]
        },
        "serviceClass": {
          "anyOf": [
            {
              "$ref": "#/$defs/ServiceClass"
            },
            {
              "type": "null"
            }
          ]
        },
        "validationGate": {
          "anyOf": [
            {
              "$ref": "#/$defs/ValidationGate"
            },
            {
              "type": "null"
            }
          ]
        },
        "authorizedFallbackPlanIds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Authorizedfallbackplanids"
        },
        "evidenceConfidence": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Evidenceconfidence"
        },
        "evidenceSourceIds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Evidencesourceids"
        }
      },
      "type": "object",
      "required": [
        "routingPolicy",
        "selectedPlanId",
        "selectionReason"
      ],
      "title": "RoutingSelection"
    },
    "ScaledFxRate": {
      "properties": {
        "rateScaled": {
          "type": "integer",
          "title": "Ratescaled"
        },
        "scale": {
          "type": "integer",
          "title": "Scale",
          "default": 8
        },
        "baseCurrency": {
          "type": "string",
          "title": "Basecurrency"
        },
        "quoteCurrency": {
          "type": "string",
          "title": "Quotecurrency"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        },
        "asOf": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Asof"
        }
      },
      "type": "object",
      "required": [
        "rateScaled",
        "baseCurrency",
        "quoteCurrency"
      ],
      "title": "ScaledFxRate",
      "description": "FX snapshot using scaled integers — never IEEE binary floats."
    },
    "ServiceClass": {
      "type": "string",
      "enum": [
        "background",
        "economical",
        "standard",
        "priority"
      ],
      "title": "ServiceClass",
      "description": "Provider-neutral delivery urgency/cost preference."
    },
    "TargetRoutingRecord": {
      "properties": {
        "profile": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Profile"
        },
        "policyVersion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Policyversion"
        },
        "requestedTarget": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requestedtarget"
        },
        "resolvedTarget": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Resolvedtarget"
        },
        "substituted": {
          "type": "boolean",
          "title": "Substituted",
          "default": false
        }
      },
      "type": "object",
      "title": "TargetRoutingRecord",
      "description": "Which target ran. Profile stays null until a real routing profile is published."
    },
    "ValidationGate": {
      "properties": {
        "kind": {
          "$ref": "#/$defs/ValidationGateKind"
        },
        "validatorKey": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Validatorkey"
        },
        "parameters": {
          "additionalProperties": true,
          "type": "object",
          "title": "Parameters"
        }
      },
      "type": "object",
      "required": [
        "kind"
      ],
      "title": "ValidationGate",
      "description": "Objective check that may accept a cheap attempt or trigger escalation."
    },
    "ValidationGateKind": {
      "type": "string",
      "enum": [
        "schema",
        "tool_schema",
        "capability"
      ],
      "title": "ValidationGateKind"
    }
  }
}